zpj 1 tahun lalu
induk
melakukan
bdaa326fea
3 mengubah file dengan 18 tambahan dan 7 penghapusan
  1. 5 5
      pages/index/order.vue
  2. 12 2
      pages/index/success.vue
  3. 1 0
      pages/login/index.vue

+ 5 - 5
pages/index/order.vue

@@ -44,7 +44,7 @@
 				<image src="@/static/img/txm.png" mode=""></image>
 				<view class="fs-30 fc-3 fw-400">手输条码</view>
 			</view>
-			<view class="box-2-shou flex-justify-center align-items-center" @click="openMenber()">
+			<view v-if="shop_id == 299" class="box-2-shou flex-justify-center align-items-center" @click="openMenber()">
 				<image src="@/static/img/txm.png" mode=""></image>
 				<view class="fs-30 fc-3 fw-400">扫会员码</view>
 			</view>
@@ -185,7 +185,7 @@ export default {
   data() {
     return {
 	  isMemeber:false,
-	  discount:'',//折扣
+	  discount:0,//折扣
 	  member_id:'',//会员id
 	  invite_code:'',//推荐码
 		
@@ -206,7 +206,7 @@ export default {
 	  
 	  headValue:'',//手动输入的值
 	  
-	  
+	  shop_id:'',
     };
   },
   onLoad() {
@@ -219,8 +219,8 @@ export default {
     this.outscan=false
   },
   
-  mounted() {
-	  
+  onShow() {
+	  this.shop_id = uni.getStorageSync('shop_id')
   },
   
   methods: {

+ 12 - 2
pages/index/success.vue

@@ -28,14 +28,24 @@
 				money:'',//原价
 				discount:'',
 				invite_code:'',
+				shop_id:'',
 			}
 		},
 		onLoad(e) {
-			this.totalPrice = ((e.money*1)*(e.discount*1)).toFixed(2);
+			if(e.discount*1 > 0){
+				this.totalPrice = ((e.money*1)*(e.discount*1)).toFixed(2);
+			}else{
+				this.totalPrice = e.money;
+			}
+			
 			this.money = e.money;
 			this.invite_code = e.invite_code;
 			this.discount = e.discount;
-			this.upData();
+			
+			this.shop_id = uni.getStorageSync('shop_id')
+			if(this.shop_id == 299){
+				this.upData();
+			}
 		},
 		methods:{
 			buy(){

+ 1 - 0
pages/login/index.vue

@@ -55,6 +55,7 @@
 					if(res.code == 1){
 						uni.setStorageSync('token',res.data.token);
 						uni.setStorageSync('u_id',res.data.u_id);
+						uni.setStorageSync('shop_id',res.data.shop_id);
 						tools.success("登录成功");
 						setTimeout(() => {
 						  this.isAJAX = false;