Browse Source

点数支付

lifanagju_citu 9 months ago
parent
commit
6f3b33972b
3 changed files with 12 additions and 6 deletions
  1. 1 0
      src/assets/svg/currency.svg
  2. 3 2
      src/components/pay/index.vue
  3. 8 4
      src/components/pay/until/payType.js

+ 1 - 0
src/assets/svg/currency.svg

@@ -0,0 +1 @@
+<svg t="1724142589919" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7764" width="200" height="200"><path d="M512 0c282.752 0 512 229.248 512 512s-229.248 512-512 512S0 794.752 0 512 229.248 0 512 0zM395.349333 256H314.965333l-3.285333 0.341333a16.810667 16.810667 0 0 0-13.013333 16.64v478.08l0.341333 3.413334c1.493333 7.68 8.106667 13.525333 15.957333 13.525333h79.616l3.157334-0.298667a15.957333 15.957333 0 0 0 11.690666-9.386666 68.010667 68.010667 0 0 1 62.378667-42.453334c27.904 0 51.84 17.493333 62.378667 42.453334 2.56 5.973333 8.533333 9.685333 14.848 9.685333h79.616l3.285333-0.341333a16.810667 16.810667 0 0 0 13.013333-16.64V272.981333l-0.341333-3.413333A16.512 16.512 0 0 0 628.650667 256H548.266667l-3.072 0.298667a16 16 0 0 0-11.648 9.088 68.010667 68.010667 0 0 1-61.738667 40.832c-27.306667 0-50.858667-16.725333-61.738667-40.832A16.128 16.128 0 0 0 395.349333 256z m305.066667 137.088l-2.688 0.170667a11.178667 11.178667 0 0 0-6.741333 3.925333 48.554667 48.554667 0 0 1-40.106667 18.090667v335.786666l-0.341333 4.053334a24.106667 24.106667 0 0 1-2.645334 7.338666l18.346667 5.12 2.688 0.426667a11.904 11.904 0 0 0 11.776-9.088l86.869333-334.549333 0.426667-2.816a12.245333 12.245333 0 0 0-8.746667-12.245334l-56.234666-15.786666-2.645334-0.426667z m-145.92-19.498667c1.706667 0 2.986667 1.408 2.986667 3.114667 0 1.706667-1.28 3.072-2.986667 3.072h-33.066667l-1.152-0.213333a3.114667 3.114667 0 0 1-1.834666-2.858667c0-1.706667 1.365333-3.114667 2.986666-3.114667z m-66.133333 0c1.621333 0 2.986667 1.408 2.986666 3.114667 0 1.706667-1.365333 3.072-2.986666 3.072h-33.109334l-1.152-0.213333a3.114667 3.114667 0 0 1-1.792-2.858667c0-1.706667 1.28-3.114667 2.986667-3.114667z m-66.176 0c1.664 0 2.986667 1.408 2.986666 3.114667 0 1.706667-1.322667 3.072-2.986666 3.072h-33.109334l-1.152-0.213333a3.114667 3.114667 0 0 1-1.792-2.858667c0-1.706667 1.28-3.114667 2.986667-3.114667z" fill="#FA9D3B" p-id="7765"></path></svg>

+ 3 - 2
src/components/pay/index.vue

@@ -28,7 +28,8 @@
         <!-- 钱包支付 -->
         <div v-if="isWalletPay" class="py-10" style="text-align: center;">
           <div>
-            <span >{{ $t('enterprise.account.accountBalances') }}:</span>
+            <!-- <span >{{ $t('enterprise.account.accountBalances') }}:</span> -->
+             <span>剩余点数:</span>
             <span style="color: var(--v-primary-base);">{{ balance }}</span>
           </div>
           <div class="my-3" v-if="balanceNotEnough">
@@ -214,7 +215,7 @@ const getCodeList = async () => {
     if (!codeList.value?.length) {
       const list = await getEnableCodeList({appId: props.appId})
       codeList.value = list || []
-      sharedState.setPayCodeList(codeList.value)
+      // sharedState.setPayCodeList(codeList.value) // 返回的支付方式列表会变
     } else {
       codeList.value = sharedState.payCodeList
     }

+ 8 - 4
src/components/pay/until/payType.js

@@ -21,7 +21,6 @@ const channelsAlipay = [
     icon: 'alipay',
     size: 23,
     color: '#3383c6',
-    type: 'qrCode',
     code: 'alipay_qr'
   },
   {
@@ -52,7 +51,6 @@ const channelsWechat = [
     icon: 'weChat',
     size: 21,
     color: 'success',
-    type: 'qrCode',
     code: 'wx_native'
   },
   {
@@ -67,9 +65,15 @@ const channelsMock = [
     icon: 'wallet',
     size: 22,
     color: 'success',
-    type: 'qrCode',
     code: 'wallet'
   },
+  {
+    name: '点数支付',
+    icon: 'currency',
+    size: 20,
+    color: 'success',
+    code: 'currency'
+  },
   {
     name: '模拟支付',
     icon: 'wallet',
@@ -85,4 +89,4 @@ export const definePayTypeList = [
   ...channelsMock
 ]
 export const qrCodePay = ['wx_native', 'alipay_qr']
-export const walletPay = ['wallet']
+export const walletPay = ['wallet', 'currency']