li.shaoyi 11 月之前
父節點
當前提交
c9ff512a44

+ 2 - 2
app/package.json

@@ -1,6 +1,6 @@
 {
-  "name": "trading-beta",
-  "version": "1.0.28",
+  "name": "trading",
+  "version": "1.0.29",
   "main": "main.js",
   "dependencies": {
     "electron-updater": "^6.1.4",

+ 1 - 1
oem/sbyj/config/appconfig.json

@@ -3,7 +3,7 @@
   "appName": "水贝亿爵",
   "version": "1.0.23",
   "versionCode": "100023",
-  "apiUrl": "http://192.168.31.209:8080/cfg?key=test_209",
+  "apiUrl": "http://192.168.31.158:15240/cfg?key=dev_104",
   "tradeChannel": "ws",
   "modules": [
     "register",

+ 29 - 0
src/constants/payment.ts

@@ -0,0 +1,29 @@
+import { useEnumStore } from '@/stores'
+
+const { getEnumTypeList, getEnumTypeName } = useEnumStore()
+
+/**
+ * 支付方式
+ */
+export enum PayModel {
+    UnionPay = 1,  // 银联
+    WeChatPay = 2,  // 微信支付
+    AliPay = 3,  // 支付宝
+}
+
+/**
+ * 获取支付方式列表
+ * @returns 
+ */
+export function getPayModelList() {
+    return getEnumTypeList('paymodel')
+}
+
+/**
+ * 获取支付方式名称
+ * @returns 
+ */
+export function getPayModelName(value: number) {
+    const enums = getPayModelList()
+    return getEnumTypeName(enums, value)
+}

File diff suppressed because it is too large
+ 0 - 0
src/packages/sbyj/assets/images/icons/alipay.svg


File diff suppressed because it is too large
+ 0 - 0
src/packages/sbyj/assets/images/icons/unionpay.svg


+ 1 - 0
src/packages/sbyj/assets/images/icons/wechatpay.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1733465393133" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10440" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M910.1 317.5l-516 298-3.1 2.1c-4.1 2.1-8.3 3.1-13.5 3.1-11.4 0-20.8-6.2-26-15.6l-2.1-4.1-82-178.7c-1-2.1-1-4.1-1-6.2 0-8.3 6.2-14.6 14.6-14.6 3.1 0 6.2 1 9.3 3.1l96.6 68.6c7.2 4.1 15.6 7.2 24.9 7.2 5.2 0 10.3-1 15.6-3.1l452.8-201.5C799.2 180.4 665.3 118 513.6 118 266.5 118 65 285.3 65 491.9c0 112.1 60.2 213.9 154.7 282.5 7.2 5.2 12.4 14.6 12.4 23.9 0 3.1-1 6.2-2.1 9.3-7.2 28-19.8 73.8-19.8 75.8-1 3.1-2.1 7.2-2.1 11.4 0 8.3 6.2 14.6 14.6 14.6 3.1 0 6.2-1 8.3-3.1l97.6-57.1c7.2-4.1 15.6-7.2 23.9-7.2 4.1 0 9.3 1 13.5 2.1 45.7 13.5 95.6 20.8 146.5 20.8C759.5 864.8 961 697.5 961 491c0-62.4-18.7-121.5-50.9-173.5z" fill="#09BB07" p-id="10441"></path></svg>

+ 19 - 8
src/packages/sbyj/views/bank/wallet/components/deposit/index.less

@@ -35,31 +35,42 @@
     }
 
     .tips {
-        color: #993333; 
+        color: #993333;
         font-size: 12px;
     }
 
     .tips_time {
-        background-color: white; 
-        border-radius: 5px; 
-        margin: 10px 15px; 
+        background-color: white;
+        border-radius: 5px;
+        margin: 10px 15px;
         padding: 10px 15px;
     }
 
     .tips_bank {
         display: flex;
         flex-direction: column;
-        background-color: white; 
-        margin: 0px 15px 10px 15px; 
+        background-color: white;
+        margin: 0px 15px 10px 15px;
         padding: 10px 15px;
-        border-radius: 5px; 
+        border-radius: 5px;
+
+        &:empty {
+            display: none;
+        }
 
         .tips_bank_row {
             height: 30px;
+
             &__label {
-                font-size: 14px; 
+                font-size: 14px;
                 color: #333;
             }
         }
     }
+
+    .paybar {
+        .van-radio-group {
+            padding: 10px;
+        }
+    }
 }

+ 41 - 26
src/packages/sbyj/views/bank/wallet/components/deposit/index.vue

@@ -18,7 +18,7 @@
                 <span class="tips">付款时间:交易日 {{ startTime }} - {{ endTime }}</span>
                 <span class="tips"><br>节假日以通知、公告为准,非交易日请勿操作!</span>
             </div>
-            <div class="tips_bank" v-if="msg_320">
+            <div class="tips_bank">
                 <div class="tips_bank_row" v-if="msg_320">
                     <span class="tips_bank_row__label">平台付款银行</span>
                     <span class="msg_tips" :data-clipboard-text="msg_320" v-copy="onCopy">{{ msg_320 }}</span>
@@ -36,11 +36,25 @@
                     <span class="msg_tips" :data-clipboard-text="msg_323" v-copy="onCopy">{{ msg_323 }}</span>
                 </div>
             </div>
-            <div class="member_payinfos" v-for="(item, index) in dataList" :key="index">
-                <button>{{ getPayInfoIcon(item.paymodel) }}</button>
-                <span>{{ item.payinfo }}</span>
-                <app-qrcode class="app-register-code__qrcode" :width="240" :text="getFileUrl(item.payqrcode)" />
-            </div>
+            <cell-group class="paybar" inset>
+                <RadioGroup v-model="checkedPayModel" direction="horizontal">
+                    <template v-for="(item, index) in dataList" :key="index">
+                        <Radio :name="index">
+                            <img :src="payModelIcon[item.paymodel]" width="40" />
+                        </Radio>
+                    </template>
+                </RadioGroup>
+                <template v-for="(item, index) in dataList" :key="index">
+                    <cell :title="getPayModelName(item.paymodel)" v-if="checkedPayModel === index">
+                        <template #value>
+                            <app-qrcode :width="128" :text="getFileUrl(item.payqrcode)" />
+                        </template>
+                        <template #label>
+                            <pre>{{ item.payinfo }}</pre>
+                        </template>
+                    </cell>
+                </template>
+            </cell-group>
             <CellGroup inset v-if="msg_324">
                 <Cell :title="$t('common.tips')">
                     <template #label>
@@ -58,26 +72,31 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, ref } from 'vue'
-import { Form, Field, Cell, CellGroup, Button, FieldRule, FormInstance, showToast, showFailToast } from 'vant'
+import { shallowRef } from 'vue'
+import { Form, Field, Cell, CellGroup, Button, FieldRule, FormInstance, showToast, showFailToast, RadioGroup, Radio } from 'vant'
 import { fullloading, dialog } from '@/utils/vant'
+import { getFileUrl } from '@/filters'
 import { useNavigation } from '@mobile/router/navigation'
-import { useDoDeposit, useDoCusBankExtendConfigs } from '@/business/bank'
+import { PayModel, getPayModelName } from '@/constants/payment'
+import { useRequest } from '@/hooks/request'
 import { getServerTime } from '@/services/api/common'
+import { queryMemberPayInfos } from '@/services/api/order'
+import { useDoDeposit, useDoCusBankExtendConfigs } from '@/business/bank'
 import { useUserStore } from '@/stores'
-import AppUploader from '@mobile/components/base/uploader/index.vue'
 import moment from 'moment'
-import { useRequest } from '@/hooks/request'
-import { queryMemberPayInfos } from '@/services/api/order'
+import AppUploader from '@mobile/components/base/uploader/index.vue'
 import AppQrcode from '@/components/base/qrcode/index.vue'
-import { getFileUrl } from '@/filters'
+import WeChatPay from '../../../../../assets/images/icons/wechatpay.svg'
+import AliPay from '../../../../../assets/images/icons/alipay.svg'
+import UnionPay from '../../../../../assets/images/icons/unionpay.svg'
 
 const formRef = shallowRef<FormInstance>()
 const { formData, onSubmit } = useDoDeposit()
 const { router } = useNavigation()
 const { getSystemParamValue } = useUserStore()
 const { configs, cusBank, startTime, endTime } = useDoCusBankExtendConfigs(2)
-const certificate_photo_url = ref('')
+const certificate_photo_url = shallowRef('')
+const checkedPayModel = shallowRef(0) // 选中的支付方式
 const userStore = useUserStore()
 
 const msg_320 = getSystemParamValue('320')
@@ -86,20 +105,16 @@ const msg_322 = getSystemParamValue('322')
 const msg_323 = getSystemParamValue('323')
 const msg_324 = getSystemParamValue('324')
 
-// 获取所属会员的支付信息
-const { dataList } = useRequest(queryMemberPayInfos, {})
-// 获取对应的显示信息
-const getPayInfoIcon = (type: number) => {
-    switch (type) {
-        case 1:
-            return '银行卡'
-        case  2:
-            return '微信'
-        default:
-            return ' 支付宝'
-    }
+// 支付图标
+const payModelIcon: { [key: number]: string } = {
+    [PayModel.AliPay]: AliPay,
+    [PayModel.UnionPay]: UnionPay,
+    [PayModel.WeChatPay]: WeChatPay,
 }
 
+// 获取所属会员的支付信息
+const { dataList } = useRequest(queryMemberPayInfos)
+
 // 表单验证规则
 const formRules: { [key: string]: FieldRule[] } = {
     Amount: [{

+ 2 - 1
src/shims-vue.d.ts

@@ -24,4 +24,5 @@ declare module 'element-plus/dist/locale/zh-tw.mjs'
 declare module 'hqchart'
 declare module 'protobufjs'
 declare module '*.jpg'
-declare module '*.png'
+declare module '*.png'
+declare module '*.svg'

+ 1 - 1
src/stores/modules/enum.ts

@@ -14,7 +14,7 @@ export interface EnumType {
     bankmappedvalue?: string
 }
 
-const enumKeys = ['confirmStatus', 'countrycode', 'executetype', 'currency', 'deliveryOrderStatus', 'operatetypesearch', 'deliveryPayMode', 'applystatus', 'deliveryStatus', 'operateType', 'WRPresaleStatus', 'clientType', 'stepStatus', 'scoreConfigType', 'GZBSCPayStatus', 'gt_kksjdw', 'performanceStatus', 'handlestatus', 'performanceType', 'accountBusinessCode', 'certificatetype', 'signstatus', 'thjOrderStatus', 'THJDeliveryMode', 'goodsunit', 'WROutInApplyStatus2', 'THJTransferStatus', 'WRTradeOrderStatus', 'THJMarket', 'THJProfitRoleType', 'appointmentModelOut', 'orderstatus', 'Pricemode2', 'buildtype', 'listingselecttype', 'certypeperson', 'runstatus', 'traderstatus', 'transferapplystatus', 'ePayFlag','goodscurrency'] as const
+const enumKeys = ['confirmStatus', 'countrycode', 'executetype', 'currency', 'deliveryOrderStatus', 'operatetypesearch', 'deliveryPayMode', 'applystatus', 'deliveryStatus', 'operateType', 'WRPresaleStatus', 'clientType', 'stepStatus', 'scoreConfigType', 'GZBSCPayStatus', 'gt_kksjdw', 'performanceStatus', 'handlestatus', 'performanceType', 'accountBusinessCode', 'certificatetype', 'signstatus', 'thjOrderStatus', 'THJDeliveryMode', 'goodsunit', 'WROutInApplyStatus2', 'THJTransferStatus', 'WRTradeOrderStatus', 'THJMarket', 'THJProfitRoleType', 'appointmentModelOut', 'orderstatus', 'Pricemode2', 'buildtype', 'listingselecttype', 'certypeperson', 'runstatus', 'traderstatus', 'transferapplystatus', 'ePayFlag', 'goodscurrency', 'paymodel'] as const
 
 const enumMap = new Map<typeof enumKeys[number], ShallowRef<Model.EnumRsp[]>>()
 

Some files were not shown because too many files changed in this diff