diff --git a/.env b/.env index 424b022b..4b0f5bf6 100644 --- a/.env +++ b/.env @@ -18,3 +18,8 @@ VITE_APP_DOCALERT_ENABLE=true # 百度统计 VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc + +# 默认账户密码 +VITE_APP_DEFAULT_LOGIN_TENANT = 芋道源码 +VITE_APP_DEFAULT_LOGIN_USERNAME = admin +VITE_APP_DEFAULT_LOGIN_PASSWORD = admin123 diff --git a/README.md b/README.md index 55d1abf8..738fc6d1 100644 --- a/README.md +++ b/README.md @@ -56,8 +56,7 @@ | 插件名 | 功能 | |-------------------------------|--------------------------| -| TypeScript Vue Plugin (Volar) | 用于 TypeScript 的 Vue 插件 | -| Vue Language Features (Volar) | Vue3.0 语法支持 | +| Vue - Official | Vue与TypeScript支持 | | unocss | unocss for vscode | | Iconify IntelliSense | Iconify 预览和搜索 | | i18n Ally | 国际化智能提示 | diff --git a/src/utils/constants.ts b/src/utils/constants.ts index f4d67b4e..cfa785b0 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -109,6 +109,14 @@ export const PayChannelEnum = { code: 'wx_app', name: '微信 APP 支付' }, + WX_NATIVE: { + code: 'wx_native', + name: '微信 Native 支付' + }, + WX_WAP: { + code: 'wx_wap', + name: '微信 WAP 网站支付' + }, WX_BAR: { code: 'wx_bar', name: '微信条码支付' diff --git a/src/utils/index.ts b/src/utils/index.ts index 2590bce8..2c2fbbd0 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -313,7 +313,7 @@ export const fenToYuan = (price: string | number): string => { */ export const calculateRelativeRate = (value?: number, reference?: number) => { // 防止除0 - if (!reference) return 0 + if (!reference || reference == 0) return 0 return ((100 * ((value || 0) - reference)) / reference).toFixed(0) } diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue index e61ccbe9..3dbaff3f 100644 --- a/src/views/Login/components/LoginForm.vue +++ b/src/views/Login/components/LoginForm.vue @@ -184,9 +184,9 @@ const loginData = reactive({ captchaEnable: import.meta.env.VITE_APP_CAPTCHA_ENABLE, tenantEnable: import.meta.env.VITE_APP_TENANT_ENABLE, loginForm: { - tenantName: '芋道源码', - username: 'admin', - password: 'admin123', + tenantName: import.meta.env.VITE_APP_DEFAULT_LOGIN_TENANT || '', + username: import.meta.env.VITE_APP_DEFAULT_LOGIN_USERNAME || '', + password: import.meta.env.VITE_APP_DEFAULT_LOGIN_PASSWORD || '', captchaVerification: '', rememberMe: true // 默认记录我。如果不需要,可手动修改 } diff --git a/src/views/bpm/oa/leave/index.vue b/src/views/bpm/oa/leave/index.vue index 2cb53247..27dbc19e 100644 --- a/src/views/bpm/oa/leave/index.vue +++ b/src/views/bpm/oa/leave/index.vue @@ -36,9 +36,9 @@ value-format="YYYY-MM-DD HH:mm:ss" /> - + - + diff --git a/src/views/mall/home/components/TradeTrendCard.vue b/src/views/mall/home/components/TradeTrendCard.vue index a8cab828..7930e212 100644 --- a/src/views/mall/home/components/TradeTrendCard.vue +++ b/src/views/mall/home/components/TradeTrendCard.vue @@ -186,7 +186,7 @@ const getOrderCountTrendComparison = async ( dates.push(item.value.date) if (series.length === 2) { series[0].data.push(fenToYuan(item?.value?.orderPayPrice || 0)) // 当前金额 - series[1].data.push(fenToYuan(item?.value?.orderPayCount || 0)) // 当前数量 + series[1].data.push(item?.value?.orderPayCount || 0) // 当前数量 } else { series[0].data.push(fenToYuan(item?.reference?.orderPayPrice || 0)) // 对照金额 series[1].data.push(fenToYuan(item?.value?.orderPayPrice || 0)) // 当前金额 diff --git a/src/views/mall/product/spu/form/ProductPropertyAddForm.vue b/src/views/mall/product/spu/form/ProductPropertyAddForm.vue index 9a8eee00..15c5a8d5 100644 --- a/src/views/mall/product/spu/form/ProductPropertyAddForm.vue +++ b/src/views/mall/product/spu/form/ProductPropertyAddForm.vue @@ -7,6 +7,7 @@ :model="formData" :rules="formRules" label-width="80px" + @keydown.enter.prevent="submitForm" > diff --git a/src/views/pay/app/components/channel/WeixinChannelForm.vue b/src/views/pay/app/components/channel/WeixinChannelForm.vue index 34e92c69..cfd46bc0 100644 --- a/src/views/pay/app/components/channel/WeixinChannelForm.vue +++ b/src/views/pay/app/components/channel/WeixinChannelForm.vue @@ -80,7 +80,8 @@ :http-request="keyContentUpload" > - 点击上传 + + 点击上传 @@ -120,7 +121,8 @@ :http-request="privateKeyContentUpload" > - 点击上传 + + 点击上传 @@ -148,7 +150,8 @@ :http-request="privateCertContentUpload" > - 点击上传 + + 点击上传 @@ -310,7 +313,7 @@ const pemFileBeforeUpload = (file) => { /** * 读取 apiclient_key.pem 到 privateKeyContent 字段 */ -const privateKeyContentUpload = (event) => { +const privateKeyContentUpload = async (event) => { const readFile = new FileReader() readFile.onload = (e: any) => { formData.value.config.privateKeyContent = e.target.result @@ -321,7 +324,7 @@ const privateKeyContentUpload = (event) => { /** * 读取 apiclient_cert.pem 到 privateCertContent 字段 */ -const privateCertContentUpload = (event) => { +const privateCertContentUpload = async (event) => { const readFile = new FileReader() readFile.onload = (e: any) => { formData.value.config.privateCertContent = e.target.result @@ -332,7 +335,7 @@ const privateCertContentUpload = (event) => { /** * 读取 apiclient_cert.p12 到 keyContent 字段 */ -const keyContentUpload = (event) => { +const keyContentUpload = async (event) => { const readFile = new FileReader() readFile.onload = (e: any) => { formData.value.config.keyContent = e.target.result.split(',')[1] diff --git a/src/views/pay/app/index.vue b/src/views/pay/app/index.vue index 2f4a9c1e..6b60d9b1 100644 --- a/src/views/pay/app/index.vue +++ b/src/views/pay/app/index.vue @@ -45,10 +45,17 @@ /> - 搜索 - 重置 + + + 搜索 + + + + 重置 + - 新增 + + 新增 @@ -70,12 +77,17 @@ - + - - - - - - - - - - - -