MS-IOHQJGHXZHQD\Administrator il y a 5 mois
Parent
commit
680acbbd29

+ 3 - 97
src/points/productDetails/components/selectProduct.vue

@@ -9,11 +9,11 @@
 
             <text class="address" v-if="defaultAddress">{{ defaultAddress.address + defaultAddress.atlasAdd
                 }}</text>
-            <view style="position: absolute;right: 0;display: flex;width: 115rpx;align-items: center;height: 33rpx;
+            <view style="position: absolute;right: 0;display: flex;width: 195rpx;align-items: center;height: 33rpx;
             ">
-                <text class="address" style="color: #999;" v-if='!defaultAddress'>去添加</text>
+                <text class="address" style="color: #999;" v-if='!defaultAddress'>添加收货地址</text>
 
-                <image style="width: 35rpx;height: 35rpx;position: absolute;right: 0;top: 1rpx;" @click="addressSelectFun"
+                <image style="width: 35rpx;height: 35rpx;position: absolute;right: 0;top: 0;" @click="addressSelectFun"
                     src="@/static/points/Keyboard_arrow_rifht.png" mode=""></image>
             </view>
 
@@ -103,100 +103,6 @@
             </view>
         </u-radio-group>
 
-
-        <!-- ========== -->
-        <u-radio-group v-if="selectPayMeth" class="nodeClass" v-model="selectPayMeth">
-            <view style="width: 100%;">
-                <view style="display: flex;justify-content: space-between;width: 100%;">
-                    <view style="display: flex;">
-                        <image style="width: 40rpx;height: 40rpx;" src="@/static/points/weiXin.png" mode="">
-                        </image>
-                        <view class="text" style="color: #333;margin-left: 16rpx;">微信支付</view>
-                    </view>
-                    <view>
-                        <u-radio activeColor="#03C1B8 " name='1' style="margin: 0;"></u-radio>
-                    </view>
-
-                </view>
-                <view style="display: flex;justify-content: space-between;width: 100%;margin-top: 24rpx;">
-                    <view style="display: flex;">
-                        <image style="width: 40rpx;height: 40rpx;" src="@/static/points/yue.png" mode="">
-                        </image>
-                        <view class="text" style="color: #333;margin-left: 16rpx;">余额支付</view>
-                    </view>
-                    <u-radio activeColor="#03C1B8 " name='2'></u-radio>
-                </view>
-            </view>
-        </u-radio-group><u-radio-group v-if="selectPayMeth" class="nodeClass" v-model="selectPayMeth">
-            <view style="width: 100%;">
-                <view style="display: flex;justify-content: space-between;width: 100%;">
-                    <view style="display: flex;">
-                        <image style="width: 40rpx;height: 40rpx;" src="@/static/points/weiXin.png" mode="">
-                        </image>
-                        <view class="text" style="color: #333;margin-left: 16rpx;">微信支付</view>
-                    </view>
-                    <view>
-                        <u-radio activeColor="#03C1B8 " name='1' style="margin: 0;"></u-radio>
-                    </view>
-
-                </view>
-                <view style="display: flex;justify-content: space-between;width: 100%;margin-top: 24rpx;">
-                    <view style="display: flex;">
-                        <image style="width: 40rpx;height: 40rpx;" src="@/static/points/yue.png" mode="">
-                        </image>
-                        <view class="text" style="color: #333;margin-left: 16rpx;">余额支付</view>
-                    </view>
-                    <u-radio activeColor="#03C1B8 " name='2'></u-radio>
-                </view>
-            </view>
-        </u-radio-group><u-radio-group v-if="selectPayMeth" class="nodeClass" v-model="selectPayMeth">
-            <view style="width: 100%;">
-                <view style="display: flex;justify-content: space-between;width: 100%;">
-                    <view style="display: flex;">
-                        <image style="width: 40rpx;height: 40rpx;" src="@/static/points/weiXin.png" mode="">
-                        </image>
-                        <view class="text" style="color: #333;margin-left: 16rpx;">微信支付</view>
-                    </view>
-                    <view>
-                        <u-radio activeColor="#03C1B8 " name='1' style="margin: 0;"></u-radio>
-                    </view>
-
-                </view>
-                <view style="display: flex;justify-content: space-between;width: 100%;margin-top: 24rpx;">
-                    <view style="display: flex;">
-                        <image style="width: 40rpx;height: 40rpx;" src="@/static/points/yue.png" mode="">
-                        </image>
-                        <view class="text" style="color: #333;margin-left: 16rpx;">余额支付</view>
-                    </view>
-                    <u-radio activeColor="#03C1B8 " name='2'></u-radio>
-                </view>
-            </view>
-        </u-radio-group><u-radio-group v-if="selectPayMeth" class="nodeClass" v-model="selectPayMeth">
-            <view style="width: 100%;">
-                <view style="display: flex;justify-content: space-between;width: 100%;">
-                    <view style="display: flex;">
-                        <image style="width: 40rpx;height: 40rpx;" src="@/static/points/weiXin.png" mode="">
-                        </image>
-                        <view class="text" style="color: #333;margin-left: 16rpx;">微信支付</view>
-                    </view>
-                    <view>
-                        <u-radio activeColor="#03C1B8 " name='1' style="margin: 0;"></u-radio>
-                    </view>
-
-                </view>
-                <view style="display: flex;justify-content: space-between;width: 100%;margin-top: 24rpx;">
-                    <view style="display: flex;">
-                        <image style="width: 40rpx;height: 40rpx;" src="@/static/points/yue.png" mode="">
-                        </image>
-                        <view class="text" style="color: #333;margin-left: 16rpx;">余额支付</view>
-                    </view>
-                    <u-radio activeColor="#03C1B8 " name='2'></u-radio>
-                </view>
-            </view>
-        </u-radio-group>
-
-        <!-- ------------- -->
-
         <view class="footer-bar">
 
             <u-button v-if="!selectedObj" :customStyle="{

+ 10 - 6
src/points/productDetails/index.vue

@@ -52,7 +52,7 @@
                 <text v-if="selectedObj" style="color: #666666;margin-right: 30rpx;">已选:{{
                   selectedObj.specValueText }}</text>
                 <text v-else style="color: #999;margin-right: 30rpx;">选择商品</text>
-                <span style="position: absolute;right: 0;top: 0;">
+                <span style="position: absolute;right: 0;top: -3rpx;">
                   <image style="width: 35rpx;height: 35rpx;" @click="selectProductShowFun"
                     src="@/static/points/Keyboard_arrow_rifht.png" mode=""></image>
                 </span>
@@ -66,7 +66,7 @@
               style="width: 520rpx;white-space:nowrap;overflow: hidden;text-overflow: ellipsis;">
               {{ defaultAddress.address }}</text>
             <text v-else style="color: #999;position: absolute;right: 30rpx;">添加收货地址</text>
-            <span style="position: absolute;right: 0;top: 0;">
+            <span style="position: absolute;right: 0;top: -3rpx;">
               <image style="width: 35rpx;height: 35rpx;" @click="addressSelectFun"
                 src="@/static/points/Keyboard_arrow_rifht.png" mode=""></image>
             </span>
@@ -187,6 +187,7 @@ export default {
       addressList: [],
       dBalance: 0.00,
       wxconfig: {},
+      orderNo:null,
 
 
     }
@@ -352,6 +353,7 @@ export default {
     weixinPay(params) {
       productOrderCreate(params).then(res => {
         if (res.data.code == 200) {
+          this.orderNo = res.data.data
           productOrderPay({
             orderNo: res.data.data, //订单编号
             payType: params.payType, //支付方式:1微信支付 2:余额支付
@@ -387,14 +389,15 @@ export default {
                   function (res) {
                     console.log(res, '---------------付款')
                     // 使用以上方式判断前端返回,微信团队郑重提示:res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
-                    this.redeemNowBtnDisable = false
+                    
                     // JSON.stringify(res);
                     if (res.err_msg == "get_brand_wcpay_request:ok") {
-
+                      this.redeemNowBtnDisable = false
                       uni.navigateTo({
                         url: '/points/productDetails/paymentSuccessful?orderNo=' + this.orderNo
                       });
                     } else if (res.err_msg == "get_brand_wcpay_request:cancel") {
+                      this.redeemNowBtnDisable = false
                       uni.showToast({
                         title: '已取消支付',
                         icon: 'none'
@@ -459,6 +462,7 @@ export default {
                   url: '/points/productDetails/paymentSuccessful'
                 });
               } else {
+                this.redeemNowBtnDisable = false
                 uni.showToast({
                   icon: 'error',
                   title: res.data.msg,
@@ -466,20 +470,20 @@ export default {
               }
 
             }).catch(err => {
+              this.redeemNowBtnDisable = false
               uni.showToast({
                 title: err,
                 icon: 'none'
               })
-              this.redeemNowBtnDisable = false
             })
           }
 
         }).catch(err => {
+          this.redeemNowBtnDisable = false
           uni.showToast({
             title: err,
             icon: 'none'
           })
-          this.redeemNowBtnDisable = false
         })
 
       }

+ 8 - 5
src/points/productDetails/pendingPayment.vue

@@ -320,38 +320,41 @@ export default {
                         },
                         function (res) {
                             // 使用以上方式判断前端返回,微信团队郑重提示:res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
-                            this.goPayBtnDisable = false
+                            
                             // JSON.stringify(res);
                             if (res.err_msg == "get_brand_wcpay_request:ok") {
+                                this.goPayBtnDisable = false
                                 uni.navigateTo({
                                     url: '/points/productDetails/paymentSuccessful?orderNo=' + this.orderNo
                                 });
                             } else if (res.err_msg == "get_brand_wcpay_request:cancel") {
+                                this.goPayBtnDisable = false
                                 uni.showToast({
                                     title: '已取消支付',
                                     icon: 'none'
                                 })
 
                             } else {
+                                this.redeemNowBtnDisable = false
                                 alert('付款失败');
-                                this.goPayBtnDisable = false
                             }
                         }
                     )
 
                 }).catch(err => {
+                    this.redeemNowBtnDisable = false
                     uni.showToast({
                         title: err,
                         icon: 'none'
                     })
-                    this.redeemNowBtnDisable = false
                 })
             }).catch(err => {
+                this.redeemNowBtnDisable = false
                 uni.showToast({
                     title: err,
                     icon: 'none'
                 })
-                this.redeemNowBtnDisable = false
+                
             })
         },
         //账号余额支付
@@ -480,7 +483,7 @@ export default {
         display: flex;
         align-items: center;
         height: 56rpx;
-        line-height: 40rpx;
+        line-height: 56rpx;
         border-radius: 98rpx 98rpx 98rpx 98rpx;
 
         font-size: 26rpx;