shish 3 лет назад
Родитель
Сommit
6afbbe40f5
1 измененных файлов с 14 добавлено и 18 удалено
  1. 14 18
      hdApp/src/pagesPurchase/wechatPay.vue

+ 14 - 18
hdApp/src/pagesPurchase/wechatPay.vue

@@ -19,6 +19,7 @@
           <div v-else class="order-num app-color-3" style="margin-top:12upx;font-size:26upx;">订单已失效</div>
           <div v-else class="order-num app-color-3" style="margin-top:12upx;font-size:26upx;">订单已失效</div>
         </block>
         </block>
         <block>
         <block>
+<!-- #ifdef MP-WEIXIN -->
           <div class="call-one-btn">
           <div class="call-one-btn">
             <view v-if="Number(balance) >= Number(realPrice)">
             <view v-if="Number(balance) >= Number(realPrice)">
               <button class="button-com pay-wx" :class="[remainPayTime >0 ? 'green':'default']" :disabled="remainPayTime >0 ? false : true" @click="wxPayFn">微信支付</button>
               <button class="button-com pay-wx" :class="[remainPayTime >0 ? 'green':'default']" :disabled="remainPayTime >0 ? false : true" @click="wxPayFn">微信支付</button>
@@ -28,10 +29,17 @@
             </view>
             </view>
             <button class="button-com pay-wx" :class="[remainPayTime >0 ? 'green':'default']" :disabled="remainPayTime >0 ? false : true" @click="debtPay" v-if="hasDebtPay === '1'">赊账</button>
             <button class="button-com pay-wx" :class="[remainPayTime >0 ? 'green':'default']" :disabled="remainPayTime >0 ? false : true" @click="debtPay" v-if="hasDebtPay === '1'">赊账</button>
           </div>
           </div>
+<!-- #endif -->
+<!-- #ifdef APP-PLUS -->
+          <div class="call-one-btn">
+            <button class="button-com pay-wx green" @click="debtPay">赊账</button>
+          </div>
+<!-- #endif -->
+
         </block>
         </block>
       </div>
       </div>
     </div>
     </div>
-    <keyboard-module :show="keyShow" @comfirm="hideKeyFn" @clickKey="clickKeyFn" :psdShow="true" :type="_type" @closeKey="closeKeyFn" />
+    <keyboard-module :show="keyShow" @comfirm="hideKeyFn" @clickKey="clickKeyFn" :psdShow="true" :type="typeNum" @closeKey="closeKeyFn" />
     <alert-module>
     <alert-module>
       <div class="go-login-module">
       <div class="go-login-module">
         <div>请先设置支付密码!</div>
         <div>请先设置支付密码!</div>
@@ -63,7 +71,7 @@ export default {
       psdKey: '',
       psdKey: '',
       orderSn: '',
       orderSn: '',
       realPrice: '',
       realPrice: '',
-      _type: '1',
+      typeNum: '1',
       pageId: '',
       pageId: '',
       remainPayTime:120,
       remainPayTime:120,
       hasDebtPay:0,
       hasDebtPay:0,
@@ -107,17 +115,9 @@ export default {
     },
     },
     debtPay () {
     debtPay () {
       let that = this
       let that = this
-      uni.showModal({
-				title: '提示',
-				content: '确认赊账?',
-				success: function (res) {
-					if (res.confirm) {
-
-            uni.showLoading({title: '加载中',mask:true})
-
+      that.$util.confirmModal({content:'确认赊账?'},() => {
+            uni.showLoading({mask:true})
 						purchaseDebtPay({ orderSn: that.orderSn }).then(res => {
 						purchaseDebtPay({ orderSn: that.orderSn }).then(res => {
-
-              //关闭加载中
               uni.hideLoading()
               uni.hideLoading()
               if(res.code == 1){
               if(res.code == 1){
                 that.pageTo({
                 that.pageTo({
@@ -125,12 +125,8 @@ export default {
                   type: 2
                   type: 2
                 })
                 })
               }
               }
-
-            }).catch(err => { })
-					}
-				}
-			});
-      
+            })
+      })      
     },
     },
     wxPayFn () {
     wxPayFn () {
       let that = this
       let that = this