lilei 4 months ago
parent
commit
ff061ff406
3 changed files with 18 additions and 4 deletions
  1. 1 1
      App.vue
  2. 1 1
      pages/morePage/morePage.vue
  3. 16 2
      pagesB/shopiing/productDetail.vue

+ 1 - 1
App.vue

@@ -1,7 +1,7 @@
 <script>
 	export default {
 		globalData: {
-			// baseUrl: 'http://192.168.2.132:9110/saas/clz/', // 本地
+			// baseUrl: 'http://192.168.2.10:9110/saas/clz/', // 本地
 			baseUrl: 'https://md.test.zyucgj.com/saas/clz/', // 预发布
 			// baseUrl: 'https://car.zyucgj.com/saas/clz/' // 生产
 		},

+ 1 - 1
pages/morePage/morePage.vue

@@ -41,7 +41,7 @@
 			</view>
 			<!-- 余额数据 -->
 			<view class="list-box">
-				<view class="list-title" style="padding-bottom: 0;padding-top:5px;color: #999;">
+				<view class="list-title" v-if="hasLogin&&hasBalaceAuth" style="padding-bottom: 0;padding-top:5px;color: #999;">
 					<text style="font-size: 10px;">ⓛ点击充值余额去充值</text>
 				</view>
 				<view class="list-body">

+ 16 - 2
pagesB/shopiing/productDetail.vue

@@ -195,10 +195,10 @@
 							</view>
 							<view class="flex align_center justify_end" v-if="detail.shopProductSubsidy">
 								<view>合计:</view>
-								<view><text class="pf">¥</text>{{payAmount}}</view>
+								<view style="font-weight: bold;"><text class="pf">¥</text>{{payAmount}}</view>
 							</view>
 						</view>
-						<payOptions v-model="payType" :hasBalancePay="showBalanceAuth" :hasPay="hasPay" @change="v=>hasKdk=v!=2" :balance="storeAccount?storeAccount.rechargeBalance:0"></payOptions>
+						<payOptions v-model="payType" :hasBalancePay="showBalanceAuth" :hasPay="hasPay" @change="payTypeChange" :balance="storeAccount?storeAccount.rechargeBalance:0"></payOptions>
 					</view>
 				</view>
 				<view class="popu-content-btn">
@@ -539,6 +539,7 @@
 							if(!this.showPopu){
 								this.showPopu = true
 								this.payType = this.showBalanceAuth ? 0 : (this.hasPay ? 1 : 2)
+								
 								this.hasKdk = this.detail.shopProductSubsidy&&this.detail.shopProductSubsidy.subsidyAmount>0&&this.detail.shopProductSubsidy.subsidyAmount<this.storeAccount.giveBalance
 							}else{
 								// 充值余额支付
@@ -758,6 +759,19 @@
 					}
 				}
 			},
+			payTypeChange(v){
+				this.hasKdk=v!=2
+				// 充值余额支付,判断是否不足
+				if(v==0){
+					if(this.payAmount>this.storeAccount.rechargeBalance){
+						uni.showToast({
+								title: '充值余额不足',
+								icon: 'none'
+						})
+						this.payType = this.hasPay ? 1 : 2
+					}
+				}
+			},
 			// 确认付款
 			confirmPay(){
 				const _this = this