新增会员价开关、修改详情切换规格时,图片没改变
|
@ -50,7 +50,7 @@
|
|||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "",
|
||||
"appid" : "wx2128cb0ee735d71a",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
|
|
|
@ -32,13 +32,15 @@
|
|||
</view>
|
||||
<view class="textA">
|
||||
<view class="money">
|
||||
|
||||
¥{{item.price_text}}
|
||||
</view>
|
||||
<view class="btn" v-if="item.customized==1">
|
||||
可定制
|
||||
</view>
|
||||
</view>
|
||||
<view class="memberPrice" v-if="ifMember && ifMemberPrice && item.vip_price">
|
||||
会员价:¥{{item.vip_price}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<uni-load-more :status="moreState"></uni-load-more>
|
||||
|
@ -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;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -18,8 +18,9 @@
|
|||
<view class="dz" v-if="item.customized==1">
|
||||
可定制
|
||||
</view>
|
||||
<view class="money">
|
||||
<view class="money" style="display: flex;">
|
||||
<text >¥</text>{{ commodityData.detail.price_text}}
|
||||
<view v-if="ifMember && ifMemberPrice && commodityData.detail.vip_price" style="margin-left: 40rpx;">会员价:<text >¥</text> {{ commodityData.detail.vip_price}}</view>
|
||||
</view>
|
||||
<view class="specification" @click="specificationFun()">
|
||||
<view class="text">
|
||||
|
@ -66,14 +67,15 @@
|
|||
</view>
|
||||
<view class="textA">
|
||||
<view class="money">
|
||||
|
||||
<text >¥</text>{{item.price_text}}
|
||||
</view>
|
||||
<view class="btn" v-if="item.customized==1">
|
||||
可定制
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="memberPrice" v-if="ifMember && ifMemberPrice && item.vip_price">
|
||||
会员价:¥{{item.vip_price}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
@ -88,9 +90,10 @@
|
|||
<view class="popup" :class="popupState?'popupB':''">
|
||||
<image class="imgGb" @click="specificationFunState()" src="../../static/47.png" mode=""></image>
|
||||
<view class="popupTitle">
|
||||
<image class="img" @click="previewImg(commodityData.detail.cover)" :src="commodityData.detail.cover" mode="aspectFill"></image>
|
||||
<image class="img" @click="previewImg(commodityData.sku[current].picture)" :src="commodityData.sku[current].picture" mode="aspectFill"></image>
|
||||
<view class="money" v-if="money">
|
||||
<text >¥</text> {{money}}
|
||||
<view v-if="ifMember && ifMemberPrice && vip_price" style="margin-left: 40rpx;margin-bottom: 10rpx;">会员价:<text >¥</text> {{vip_price}}</view>
|
||||
</view>
|
||||
<view class="money textmoney" v-else>
|
||||
暂无报价
|
||||
|
@ -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.vip_price=this.commodityData.sku[0].vip_price
|
||||
for (var i = 0; i < this.commodityData.sku.length; i++) {
|
||||
this.commodityData.sku[i].state=false
|
||||
}
|
||||
|
@ -167,8 +178,9 @@
|
|||
this.commodityData.sku[i].state=false
|
||||
}
|
||||
this.commodityData.sku[index].state =true
|
||||
this.money=this.commodityData.sku[index].price_text
|
||||
|
||||
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) {
|
||||
|
@ -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;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -35,8 +35,11 @@
|
|||
</view>
|
||||
|
||||
<view class="money">
|
||||
<view class="moneyNum">
|
||||
<view class="moneyNum" style="display: flex;">
|
||||
<text >¥</text>{{item.price_text}}
|
||||
<view v-if="ifMember && ifMemberPrice && item.vip_price">
|
||||
<text style="margin-left: 40rpx;">会员价:¥</text>{{item.vip_price}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn" v-if="item.customized==1">
|
||||
可定制
|
||||
|
@ -74,8 +77,14 @@
|
|||
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()
|
||||
|
|
|
@ -83,6 +83,14 @@
|
|||
<image class="arrows" src="../../static/jt.png" mode=""></image>
|
||||
</view>
|
||||
</navigator>
|
||||
<view class="con" v-if="ifMember">
|
||||
<view class="listName">
|
||||
<view class="text">是否显示会员价</view>
|
||||
</view>
|
||||
<view class="" style="margin-right: -20rpx;">
|
||||
<switch :checked="ifSwitchMember" @change="switchMember" style="transform: scale(.7);" color="#D33333" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="make" v-if="memberState">
|
||||
<view class="member">
|
||||
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,9 @@
|
|||
可定制
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="memberPrice" v-if="ifMember && ifMemberPrice && item.vip_price">
|
||||
会员价:¥{{item.vip_price}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
@ -50,11 +52,17 @@
|
|||
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;
|
||||
}
|
||||
</style>
|
||||
|
|
BIN
static/23.png
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 24 KiB |
BIN
static/47.png
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 924 B |
BIN
static/fh.png
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
static/fl.png
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 640 B |
BIN
static/fla.png
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 683 B |
BIN
static/gb.png
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 907 B |
BIN
static/grzl.png
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 759 B |
BIN
static/guig.png
Before Width: | Height: | Size: 568 B After Width: | Height: | Size: 501 B |
BIN
static/gy.png
Before Width: | Height: | Size: 787 B After Width: | Height: | Size: 678 B |
BIN
static/home.png
Before Width: | Height: | Size: 721 B After Width: | Height: | Size: 474 B |
BIN
static/homea.png
Before Width: | Height: | Size: 727 B After Width: | Height: | Size: 504 B |
BIN
static/hy.png
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 863 B |
BIN
static/index.png
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
static/jt.png
Before Width: | Height: | Size: 445 B After Width: | Height: | Size: 317 B |
BIN
static/logo.png
Before Width: | Height: | Size: 3.9 KiB |
BIN
static/may.png
Before Width: | Height: | Size: 829 B After Width: | Height: | Size: 530 B |
BIN
static/my.png
Before Width: | Height: | Size: 835 B After Width: | Height: | Size: 508 B |
BIN
static/nz.png
Before Width: | Height: | Size: 892 B After Width: | Height: | Size: 712 B |
BIN
static/sq.png
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 524 B |
BIN
static/ss.png
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 629 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 464 B |