浏览代码

Merge branch 'v4.7.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v4.7.0dev

From-wh 2 年之前
父节点
当前提交
c7c70a2f97
共有 1 个文件被更改,包括 5 次插入12 次删除
  1. 5 12
      template/uni-app/pages/annex/offline_pay/index.vue

+ 5 - 12
template/uni-app/pages/annex/offline_pay/index.vue

@@ -7,7 +7,7 @@
 					{{$t(`¥`)}}
 					<input v-model.number="money" class="input" name="money" type="digit" @input="inputChange" placeholder="0.00" />
 				</view>
-				<view v-if="payPrice" class="discount">{{$t(`会员优惠价`)}}:{{$t(`¥`)}}{{ payPrice }}</view>
+				<view v-if="payPrice && show" class="discount">{{$t(`会员优惠价`)}}:{{$t(`¥`)}}{{ payPrice }}</view>
 			</view>
 		</view>
 		<view class="radio-section">
@@ -62,18 +62,10 @@
 				now_money: 0,
 				isWeixin: false,
 				site_name: '',
-				isCommitted: false
+				isCommitted: false,
+				show: false
 			};
 		},
-		watch: {
-			money(newValue, oldValue) {
-				if (newValue && typeof newValue === 'number') {
-					this.checkPrice();
-				} else {
-					this.payPrice = '';
-				}
-			}
-		},
 		computed: mapGetters(['isLogin']),
 		onLoad(options) {
 			if (!this.isLogin) {
@@ -104,7 +96,7 @@
 				e.target.value = (e.target.value.match(/^\d*(.?\d{0,2})/g)[0]) || ""
 				this.$nextTick(() => {
 					this.money = e.target.value
-					this.checkPrice()
+					this.checkPrice();
 				})
 			},
 			getPayType() {
@@ -169,6 +161,7 @@
 					})
 					.then(res => {
 						this.payPrice = res.data.pay_price;
+						this.show = res.data.show
 					})
 					.catch(err => {
 						uni.showToast({