diff --git a/manifest.json b/manifest.json index 5162ff4..80e7e2b 100644 --- a/manifest.json +++ b/manifest.json @@ -50,7 +50,7 @@ "quickapp" : {}, /* 小程序特有相关 */ "mp-weixin" : { - "appid" : "", + "appid" : "wx2128cb0ee735d71a", "setting" : { "urlCheck" : false }, diff --git a/pages/classify/classify.vue b/pages/classify/classify.vue index bf71b85..909ec1b 100644 --- a/pages/classify/classify.vue +++ b/pages/classify/classify.vue @@ -32,13 +32,15 @@ - - ¥{{item.price_text}} + ¥{{item.price_text}} 可定制 + + 会员价:¥{{item.vip_price}} + @@ -71,14 +73,18 @@ size: 10, is_home: 0, }, - + ifMember:false, + ifMemberPrice:false } }, onLoad() { this.getNavData() }, - + onShow() { + this.ifMember = uni.getStorageSync('ifMember'); + this.ifMemberPrice = uni.getStorageSync('ifMemberPrice'); + }, methods: { @@ -314,12 +320,13 @@ } .classifyConList .list { width: 276rpx; - height: 373rpx; + /* height: 373rpx; */ margin-top: 30rpx; margin-right: 28rpx; position: relative; border-radius: 30rpx; background-color: #FFFFFF; + padding-bottom: 20rpx; } .classifyConList .list:nth-child(2n) { @@ -342,6 +349,7 @@ -webkit-box-orient: vertical; font-size: 24rpx; margin-top: 15rpx; + height: 90rpx; line-height: 44rpx; padding: 0 12rpx; font-weight: bold; @@ -355,9 +363,9 @@ box-sizing: border-box; width: 100%; align-items: center; - position: absolute; + /* position: absolute; left: 0rpx; - bottom: 32rpx; + bottom: 32rpx; */ justify-content: space-between; } @@ -385,4 +393,8 @@ line-height: 28rpx; background-color: #D33333; } + + .memberPrice{ + font-size: 28rpx;font-weight: bold;padding-left: 20rpx;margin-top: 10rpx; + } diff --git a/pages/commodity/commodity.vue b/pages/commodity/commodity.vue index 7f59121..048f990 100644 --- a/pages/commodity/commodity.vue +++ b/pages/commodity/commodity.vue @@ -18,8 +18,9 @@ 可定制 - + {{ commodityData.detail.price_text}} + 会员价: {{ commodityData.detail.vip_price}} @@ -66,14 +67,15 @@ - - {{item.price_text}} + {{item.price_text}} 可定制 - + + 会员价:¥{{item.vip_price}} + @@ -88,9 +90,10 @@ - + {{money}} + 会员价: {{vip_price}} 暂无报价 @@ -127,9 +130,17 @@ indicatorDots: true, commodityData:{}, money:"", - popupState:false + vip_price:"", + popupState:false, + ifMember:false, + ifMemberPrice:false, + current:0 } }, + onShow() { + this.ifMember = uni.getStorageSync('ifMember'); + this.ifMemberPrice = uni.getStorageSync('ifMemberPrice'); + }, onLoad(option) { this.id=option.id this.getData() @@ -140,10 +151,10 @@ phoneNumber: this.commodityData.purchase_phone //仅为示例 }); }, - specificationFun(){ - this.popupState=true - this.money=this.commodityData.sku[0].price_text + this.popupState=true + this.money=this.commodityData.sku[0].price_text + this.vip_price=this.commodityData.sku[0].vip_price for (var i = 0; i < this.commodityData.sku.length; i++) { this.commodityData.sku[i].state=false } @@ -166,10 +177,11 @@ for (var i = 0; i < this.commodityData.sku.length; i++) { this.commodityData.sku[i].state=false } - this.commodityData.sku[index].state =true - this.money=this.commodityData.sku[index].price_text - - this.commodityData.sku=[...this.commodityData.sku] + this.commodityData.sku[index].state =true + this.money=this.commodityData.sku[index].price_text; + this.vip_price = this.commodityData.sku[index].vip_price; + this.current = index; + this.commodityData.sku=[...this.commodityData.sku] }, details(id) { uni.navigateTo({ @@ -415,10 +427,11 @@ .classifyConList .list { width: 320rpx; - height: 433rpx; + /* height: 433rpx; */ margin-top: 30rpx; border-radius: 30rpx; background-color: #FFFFFF; + padding-bottom: 30rpx; } .classifyConList .list .img { @@ -472,4 +485,7 @@ line-height: 58rpx; } + .memberPrice{ + font-size: 28rpx;font-weight: bold;padding-left: 20rpx;margin-top: 10rpx; + } diff --git a/pages/index/index.vue b/pages/index/index.vue index 81869e3..4e6dc08 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -35,8 +35,11 @@ - + {{item.price_text}} + + 会员价:¥{{item.vip_price}} + 可定制 @@ -74,9 +77,15 @@ page: 1, size: 10, is_home: 1, - } + }, + ifMember:false, + ifMemberPrice:false } }, + onShow() { + this.ifMember = uni.getStorageSync('ifMember'); + this.ifMemberPrice = uni.getStorageSync('ifMemberPrice'); + }, onLoad() { this.getbannerData() this.getNavData() diff --git a/pages/personalCenter/personalCenter.vue b/pages/personalCenter/personalCenter.vue index df0305a..b2501cd 100644 --- a/pages/personalCenter/personalCenter.vue +++ b/pages/personalCenter/personalCenter.vue @@ -83,6 +83,14 @@ + + + 是否显示会员价 + + + + + @@ -157,7 +165,9 @@ phone: "", invitee: "", invitee_vip_code: "" - } + }, + ifMember:true,//是否是会员 + ifSwitchMember:false,//是否开启显示会员价 } }, @@ -176,12 +186,17 @@ } }, mounted() { - - console.log(uni.getStorageSync('userData')) + this.ifSwitchMember = uni.getStorageSync('ifMemberPrice'); this.getUserData() }, methods: { + // 是否显示会员价切换事件 + switchMember(e){ + this.ifSwitchMember = e.detail.value; + uni.setStorageSync('ifMemberPrice',this.ifSwitchMember); + this.changeInformation('vip_switch',this.ifSwitchMember ? 1 : 0); + }, getUserData(){ this.requestToken({ url: this.host + "/api/user/info", @@ -189,6 +204,10 @@ success: (res) => { this.userInfo = res.data.data + this.userInfo.is_vip ? this.ifMember = true : this.ifMember = false; + uni.setStorageSync('ifMember',this.ifMember); + this.userInfo.vip_switch ? this.ifSwitchMember = true : this.ifSwitchMember = false; + uni.setStorageSync('ifMemberPrice',this.ifSwitchMember); } diff --git a/pages/search/search.vue b/pages/search/search.vue index d26868d..c38095b 100644 --- a/pages/search/search.vue +++ b/pages/search/search.vue @@ -27,7 +27,9 @@ 可定制 - + + 会员价:¥{{item.vip_price}} + @@ -50,12 +52,18 @@ arr: { page: 1, size: 10, - } + }, + ifMember:false, + ifMemberPrice:false } }, created() { - this.customBar=uni.getStorageSync('customBar')+20+"rpx" + this.customBar=uni.getStorageSync('customBar')+"rpx" }, + onShow() { + this.ifMember = uni.getStorageSync('ifMember'); + this.ifMemberPrice = uni.getStorageSync('ifMemberPrice'); + }, onReachBottom() { this.arr.size= this.arr.size+this.num @@ -103,7 +111,6 @@ this.HomeData = res.data.data.list this.total = res.data.data.total if( (this.arr.page*this.arr.size) <=this.total ){ - }else{ this.loadState="no-more" @@ -125,6 +132,7 @@ padding-right: 40rpx; padding-left: 40rpx; z-index: 2; + padding-top: 20rpx; } .int { width: 670rpx; @@ -185,11 +193,12 @@ .classifyConList .list { width: 320rpx; - height: 433rpx; + /* height: 433rpx; */ margin-top: 30rpx; border-radius: 30rpx; background-color: #FFFFFF; position: relative; + padding-bottom: 30rpx; } .classifyConList .list .img { @@ -207,6 +216,7 @@ -webkit-box-orient: vertical; font-size: 28rpx; margin-top: 15rpx; + height: 100rpx; line-height: 50rpx; padding: 0 12rpx; font-weight: bold; @@ -217,9 +227,9 @@ display: flex; margin-top: 10rpx; padding: 0 12rpx; - position: absolute; + /* position: absolute; bottom: 35rpx; - left: 0rpx; + left: 0rpx; */ width: 100%; align-items: center; justify-content: space-between; @@ -242,4 +252,7 @@ line-height: 28rpx; background-color: #D33333; } + .memberPrice{ + font-size: 28rpx;font-weight: bold;padding-left: 20rpx;margin-top: 10rpx; + } diff --git a/static/23.png b/static/23.png index 5f8fc13..f698d4c 100644 Binary files a/static/23.png and b/static/23.png differ diff --git a/static/47.png b/static/47.png index 55805af..9710d98 100644 Binary files a/static/47.png and b/static/47.png differ diff --git a/static/banner.zip b/static/banner.zip deleted file mode 100644 index 34648aa..0000000 Binary files a/static/banner.zip and /dev/null differ diff --git a/static/fh.png b/static/fh.png index 9afa6d1..d16534e 100644 Binary files a/static/fh.png and b/static/fh.png differ diff --git a/static/fl.png b/static/fl.png index 8b37cdb..cdfb2e7 100644 Binary files a/static/fl.png and b/static/fl.png differ diff --git a/static/fla.png b/static/fla.png index cc8f706..c5be1ee 100644 Binary files a/static/fla.png and b/static/fla.png differ diff --git a/static/gb.png b/static/gb.png index a2d1cd4..3ef03f9 100644 Binary files a/static/gb.png and b/static/gb.png differ diff --git a/static/grzl.png b/static/grzl.png index d95ea03..7df95e6 100644 Binary files a/static/grzl.png and b/static/grzl.png differ diff --git a/static/guig.png b/static/guig.png index c6ad5c7..f64e803 100644 Binary files a/static/guig.png and b/static/guig.png differ diff --git a/static/gy.png b/static/gy.png index 879e76d..8ebd438 100644 Binary files a/static/gy.png and b/static/gy.png differ diff --git a/static/home.png b/static/home.png index c9e8946..e2b9933 100644 Binary files a/static/home.png and b/static/home.png differ diff --git a/static/homea.png b/static/homea.png index f7c8b90..9af4017 100644 Binary files a/static/homea.png and b/static/homea.png differ diff --git a/static/hy.png b/static/hy.png index ab7fbc4..9294dd6 100644 Binary files a/static/hy.png and b/static/hy.png differ diff --git a/static/index.png b/static/index.png index 3f0ded4..3843e71 100644 Binary files a/static/index.png and b/static/index.png differ diff --git a/static/jt.png b/static/jt.png index b3f56a7..e9b1593 100644 Binary files a/static/jt.png and b/static/jt.png differ diff --git a/static/logo.png b/static/logo.png deleted file mode 100644 index b5771e2..0000000 Binary files a/static/logo.png and /dev/null differ diff --git a/static/may.png b/static/may.png index da085fc..52dcb09 100644 Binary files a/static/may.png and b/static/may.png differ diff --git a/static/my.png b/static/my.png index 659a666..c535b97 100644 Binary files a/static/my.png and b/static/my.png differ diff --git a/static/nz.png b/static/nz.png index 24a93b2..5cc0ce2 100644 Binary files a/static/nz.png and b/static/nz.png differ diff --git a/static/sq.png b/static/sq.png index 85bf159..abe9c09 100644 Binary files a/static/sq.png and b/static/sq.png differ diff --git a/static/ss.png b/static/ss.png index dd05c6c..ff8c7a5 100644 Binary files a/static/ss.png and b/static/ss.png differ diff --git a/static/xuan-linkAddress/yes.png b/static/xuan-linkAddress/yes.png index 70b8ca9..f583e9c 100644 Binary files a/static/xuan-linkAddress/yes.png and b/static/xuan-linkAddress/yes.png differ