tangning 2 vuotta sitten
vanhempi
commit
aa6bb2494d
4 muutettua tiedostoa jossa 18 lisäystä ja 5 poistoa
  1. 1 0
      src/i18n/en.js
  2. 1 0
      src/i18n/zh.js
  3. 1 1
      src/views/mobile/index.vue
  4. 15 4
      src/views/pc/index.vue

+ 1 - 0
src/i18n/en.js

@@ -32,6 +32,7 @@ export default {
         "nowJieSuan": "Pay Now",
         "nowBuy": "Order Now",
         "countNum": "{num}Product(s) In Total",
+        "vip": "Purchase Member",
         "addBuy": "Add to Cart",
         "confirmOrder": "Confirm Order",
         "submitOrder": "Submit Order",

+ 1 - 0
src/i18n/zh.js

@@ -59,6 +59,7 @@ export default {
         "addAddressTip": "请添加地址",
         "payCenter": "支付中心",
         "nowAccount": "当前帐号",
+        "vip": "购买会员",
         "payType": "支付方式",
         "aliPay": "支付宝",
         "wechatPay": "微信支付",

+ 1 - 1
src/views/mobile/index.vue

@@ -146,7 +146,7 @@ async function handleOpenPay() {
           <span>当前账号{{ getOpenId }}</span>
           <span>{{orderDetal.userName}}</span>
         </div>
-        <div class="cell">
+        <div class="cell" v-if="orderDetal.orderType == 'incrementOrder'">
           <span>购买会员</span>
           <span>专业会员 
             <span v-if="orderDetal.goodsInfo && orderDetal.goodsInfo[0]">{{orderDetal.goodsInfo[0].count}}</span>

+ 15 - 4
src/views/pc/index.vue

@@ -52,6 +52,7 @@ async function handleQueryOrderStatus() {
   if (t1) {
     let response = await getOrderInfo(orderSn.value)
     console.log('response', response)
+    orderDetal.value = response
     if (response.payStatus === 0) {
       //未支付
       console.log('未支付')
@@ -63,9 +64,9 @@ async function handleQueryOrderStatus() {
         text: response.payStatus === 2 ? '支付失败' : '支付成功',
         type: response.payStatus === 2 ? 'err' : 'success',
         callback: () => {
-          if(response.payStatus === 2){
+          if (response.payStatus === 2) {
             getCode()
-          }else{
+          } else {
             window.close()
           }
         }
@@ -107,10 +108,20 @@ async function getCode() {
         </div>
         <div class="pay-content">
           <div class="account">
-            <span class="label">{{ $t('mall.nowAccount') }}:</span><span>{{ info.userName }}</span>
+            <span class="label">{{ $t('mall.nowAccount') }}:</span
+            ><span>{{ orderDetal.userName }}</span>
           </div>
           <div class="account">
-            <span class="label">{{ $t('mall.buyGoods') }}:</span><span>配件</span>
+            <span class="label"
+              >{{ $t('mall.vip') }}:
+              <span>
+                <span v-if="orderDetal.goodsInfo && orderDetal.goodsInfo[0]">{{orderDetal.goodsInfo[0].name}}{{
+                  orderDetal.goodsInfo[0].count
+                }}</span>
+                <span v-else>1</span>
+                ,有效期1年</span
+              ></span
+            >
           </div>
           <div class="pay-types">
             <p class="label">{{ $t('mall.payType') }}:</p>