shish 2 лет назад
Родитель
Сommit
08e934001a

+ 17 - 15
ghsApp/src/pagesClient/member/detail.vue

@@ -126,13 +126,9 @@
               </div>
             </tui-list-cell>
 
-            <tui-list-cell class="line-cell" :hover="false">
-              <div class="tui-title">超级会员</div>
-              <div class="switch_bx">
-                <text v-if="form.level == 1">否</text>
-                <text v-else>是</text>
-                <switch :checked="form.level == 1 ? false : true" @change="levelChangeFn" style="transform: scale(0.8,0.8)" />
-              </div>
+            <tui-list-cell class="line-cell" :hover="true" :arrow="true">
+              <div class="tui-title">享受价格</div>
+              <view class="tui-input" @click="changeLevelPrice()" style="text-align:right;margin-right:120upx;">{{ form.level == 0 ? '零售价':form.level == 1 ? '批发价':form.level == 2 ? '会员价':'-' }}</view>
             </tui-list-cell>
 
             <tui-list-cell class="line-cell" :hover="false">
@@ -236,6 +232,20 @@ export default {
     this.getUserDetail()
   },
   methods: {
+    changeLevelPrice(){
+			const that = this;
+			uni.showActionSheet({
+				itemList: ['零售价', '批发价', '超级会员价'],
+				success: e => {
+          changeLevel({customId:that.userInfo.id,level:e.tapIndex}).then(res=>{
+            if(res.code == 1){
+              that.form.level = e.tapIndex
+              that.$msg(res.msg)
+            }
+          })
+				}
+			})
+    },
     changeWlFn() {
       let wlName = this.userInfo.wlName||''
       changeWlName({id:this.option.id,wlName:wlName}).then(res=>{
@@ -315,14 +325,6 @@ export default {
       let msg = e.detail.value?'已开启':'已禁用'
       this.$msg(msg)
     },
-    levelChangeFn(e){
-      this.form.level = e.detail.value ? 2 : 1
-      changeLevel({customId:this.userInfo.id,level:this.form.level}).then(res=>{
-        if(res.code == 1){
-          this.$msg(res.msg)
-        }
-      })
-    },
     showStockChangeFn(e){
       this.form.showStock = e.detail.value ? 1 : 0
       changeShowStock({customId:this.userInfo.id,showStock:this.form.showStock}).then(res=>{

+ 1 - 17
hdApp/src/pagesPurchase/bookProduct.vue

@@ -81,7 +81,6 @@
 
 		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent" @showCartItem="showCartItem"></FooterCart>
 		<wangCg :show.sync="notOpenShop" @bthClick="goToCg()"></wangCg>
-		<personComponent :isHd.sync="isHd" @goToMall="goToMall()"></personComponent>
     	<sel-popup :show="popupShow" :info="infoData" @close="hidePopup" />
 		<app-activily-coupon :show.sync="isNewCustom" :info="newCustomGift" :ghsId="ghsId" />
 
@@ -157,7 +156,6 @@ import { getGhsDataApi, ghsInfo,visitMall } from "@/api/ghs/index";
 import SelPopup from "@/components/sel-popup.vue";
 import AppActivilyCoupon from "@/components/module/app-activily-coupon";
 import { mapGetters } from "vuex";
-import personComponent from "./components/person";
 import { getWeixinId } from "@/api/invite";
 export default {
 	name: "bookProduct",
@@ -171,8 +169,7 @@ export default {
 		allMoreSelectInput,
 		wangCg,
 		SelPopup,
-		AppActivilyCoupon,
-		personComponent
+		AppActivilyCoupon
 	},
 	props: {
 		ghsShopAdminId:{
@@ -224,7 +221,6 @@ export default {
 			cartItemShow:false,
 			offVerifyRepertory:true,
 			buyNotice:0,
-			isHd:1,
 			getappIdList: {}
 		};
 	},
@@ -455,12 +451,6 @@ export default {
 					if(this.buyNotice == 1){
 						this.myClass = 'fadeIn'
 					}
-					//只有注册了和没有列入黑名单才判断他是不是花店身份
-					if(Number(id)>0){
-						if(res.data.black && res.data.black == 1){
-							this.isHd = Number(res.data.isHd)
-						}
-					}
 					//获取供货商花材
 					if(id>0){
 						this.visitMall(id)
@@ -485,12 +475,6 @@ export default {
 					this.shopId = res.data.shopId
 
 					this.buyNotice = res.data.buyNotice
-					//只有注册了和没有列入黑名单才判断他是不是花店身份
-					if(this.option.id && Number(this.option.id)>0){
-						if(res.data.black && res.data.black == 1){
-							this.isHd = Number(res.data.isHd)
-						}
-					}
 					if(this.buyNotice == 1){
 						this.myClass = 'fadeIn'
 					}

+ 1 - 15
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -113,7 +113,6 @@
 
 		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent" @showCartItem="showCartItem"></FooterCart>
 		<wangCg :show.sync="notOpenShop" @bthClick="goToCg()"></wangCg>
-		<personComponent :isHd.sync="isHd" @goToMall="goToMall()"></personComponent>
     	<sel-popup :show="popupShow" :info="infoData" @close="hidePopup" />
 		<app-activily-coupon :show.sync="isNewCustom" :info="newCustomGift" :ghsId="ghsId" />
 
@@ -189,7 +188,6 @@ import productMins from "@/mixins/cgProduct";
 import { getGhsDataApi, ghsInfo,visitMall,getClassRemind,hasClassRemind } from "@/api/ghs";
 import SelPopup from "@/components/sel-popup.vue";
 import { getWeixinId } from "@/api/invite";
-import personComponent from "./components/person";
 import AppActivilyCoupon from "@/components/module/app-activily-coupon";
 import { mapGetters } from "vuex";
 export default {
@@ -204,8 +202,7 @@ export default {
 		allMoreSelectInput,
 		PxClassCommondity,
 		wangCg,SelPopup,
-		AppActivilyCoupon,
-		personComponent
+		AppActivilyCoupon
 	},
 	props: {
 		ghsShopAdminId:{
@@ -254,7 +251,6 @@ export default {
 			cartItemShow:false,
 			showClassRemind:false,
 			buyNotice:0,
-			isHd:1,
 			getappIdList: {},
 			backAction:''
 		};
@@ -516,11 +512,6 @@ export default {
 					this.ghsId = id
 					this.buyNotice = res.data.buyNotice
 					//只有注册了和没有列入黑名单才判断他是不是花店身份
-					if(Number(id)>0){
-						if(res.data.black && res.data.black == 1){
-							this.isHd = Number(res.data.isHd)
-						}
-					}
 					if(this.buyNotice == 1){
 						this.myClass = 'fadeIn'
 					}
@@ -549,11 +540,6 @@ export default {
 					this.shopId = res.data.shopId
 					this.buyNotice = res.data.buyNotice
 					//只有注册了和没有列入黑名单才判断他是不是花店身份
-					if(this.option.id && Number(this.option.id)>0){
-						if(res.data.black && res.data.black == 1){
-							this.isHd = Number(res.data.isHd)
-						}
-					}
 					if(this.buyNotice == 1){
 						this.myClass = 'fadeIn'
 					}