Compare commits

..

No commits in common. "bac6a56c2e841cff802dae24624a860186d79f32" and "7948826a2ab8132c96e28515ea45df44aa1961c3" have entirely different histories.

28 changed files with 42 additions and 144 deletions

View File

@ -50,7 +50,7 @@
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx2128cb0ee735d71a", "appid" : "",
"setting" : { "setting" : {
"urlCheck" : false "urlCheck" : false
}, },

View File

@ -32,15 +32,13 @@
</view> </view>
<view class="textA"> <view class="textA">
<view class="money"> <view class="money">
{{item.price}}
{{item.price_text}}
</view> </view>
<view class="btn" v-if="item.customized==1"> <view class="btn" v-if="item.customized==1">
可定制 可定制
</view> </view>
</view> </view>
<view class="memberPrice" v-if="ifMember && ifMemberPrice && item.vip_price">
会员价{{item.vip_price}}
</view>
</view> </view>
</view> </view>
<uni-load-more :status="moreState"></uni-load-more> <uni-load-more :status="moreState"></uni-load-more>
@ -73,18 +71,14 @@
size: 10, size: 10,
is_home: 0, is_home: 0,
}, },
ifMember:false,
ifMemberPrice:false
} }
}, },
onLoad() { onLoad() {
this.getNavData() this.getNavData()
}, },
onShow() {
this.ifMember = uni.getStorageSync('ifMember');
this.ifMemberPrice = uni.getStorageSync('ifMemberPrice');
},
methods: { methods: {
@ -320,13 +314,12 @@
} }
.classifyConList .list { .classifyConList .list {
width: 276rpx; width: 276rpx;
/* height: 373rpx; */ height: 373rpx;
margin-top: 30rpx; margin-top: 30rpx;
margin-right: 28rpx; margin-right: 28rpx;
position: relative; position: relative;
border-radius: 30rpx; border-radius: 30rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
padding-bottom: 20rpx;
} }
.classifyConList .list:nth-child(2n) { .classifyConList .list:nth-child(2n) {
@ -349,7 +342,6 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
font-size: 24rpx; font-size: 24rpx;
margin-top: 15rpx; margin-top: 15rpx;
height: 90rpx;
line-height: 44rpx; line-height: 44rpx;
padding: 0 12rpx; padding: 0 12rpx;
font-weight: bold; font-weight: bold;
@ -363,9 +355,9 @@
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
align-items: center; align-items: center;
/* position: absolute; position: absolute;
left: 0rpx; left: 0rpx;
bottom: 32rpx; */ bottom: 32rpx;
justify-content: space-between; justify-content: space-between;
} }
@ -393,8 +385,4 @@
line-height: 28rpx; line-height: 28rpx;
background-color: #D33333; background-color: #D33333;
} }
.memberPrice{
font-size: 28rpx;font-weight: bold;padding-left: 20rpx;margin-top: 10rpx;
}
</style> </style>

View File

@ -18,9 +18,8 @@
<view class="dz" v-if="item.customized==1"> <view class="dz" v-if="item.customized==1">
可定制 可定制
</view> </view>
<view class="money" style="display: flex;"> <view class="money">
<text ></text>{{ commodityData.detail.price}} <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>
<view class="specification" @click="specificationFun()"> <view class="specification" @click="specificationFun()">
<view class="text"> <view class="text">
@ -67,15 +66,14 @@
</view> </view>
<view class="textA"> <view class="textA">
<view class="money"> <view class="money">
<text ></text>{{item.price}}
<text ></text>{{item.price_text}}
</view> </view>
<view class="btn" v-if="item.customized==1"> <view class="btn" v-if="item.customized==1">
可定制 可定制
</view> </view>
</view> </view>
<view class="memberPrice" v-if="ifMember && ifMemberPrice && item.vip_price">
会员价{{item.vip_price}}
</view>
</view> </view>
@ -90,10 +88,9 @@
<view class="popup" :class="popupState?'popupB':''"> <view class="popup" :class="popupState?'popupB':''">
<image class="imgGb" @click="specificationFunState()" src="../../static/47.png" mode=""></image> <image class="imgGb" @click="specificationFunState()" src="../../static/47.png" mode=""></image>
<view class="popupTitle"> <view class="popupTitle">
<image class="img" @click="previewImg(commodityData.sku[current].picture || commodityData.detail.cover)" :src="commodityData.sku[current].picture || commodityData.detail.cover" mode="aspectFill"></image> <image class="img" @click="previewImg(commodityData.detail.cover)" :src="commodityData.detail.cover" mode="aspectFill"></image>
<view class="money" v-if="money"> <view class="money" v-if="money">
<text ></text> {{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>
<view class="money textmoney" v-else> <view class="money textmoney" v-else>
暂无报价 暂无报价
@ -130,17 +127,9 @@
indicatorDots: true, indicatorDots: true,
commodityData:{}, commodityData:{},
money:"", money:"",
vip_price:"", popupState:false
popupState:false,
ifMember:false,
ifMemberPrice:false,
current:0
} }
}, },
onShow() {
this.ifMember = uni.getStorageSync('ifMember');
this.ifMemberPrice = uni.getStorageSync('ifMemberPrice');
},
onLoad(option) { onLoad(option) {
this.id=option.id this.id=option.id
this.getData() this.getData()
@ -151,10 +140,10 @@
phoneNumber: this.commodityData.purchase_phone // phoneNumber: this.commodityData.purchase_phone //
}); });
}, },
specificationFun(){ specificationFun(){
this.popupState=true this.popupState=true
this.money=this.commodityData.sku[0].price 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++) { for (var i = 0; i < this.commodityData.sku.length; i++) {
this.commodityData.sku[i].state=false this.commodityData.sku[i].state=false
} }
@ -178,9 +167,8 @@
this.commodityData.sku[i].state=false this.commodityData.sku[i].state=false
} }
this.commodityData.sku[index].state =true this.commodityData.sku[index].state =true
this.money=this.commodityData.sku[index].price; 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] this.commodityData.sku=[...this.commodityData.sku]
}, },
details(id) { details(id) {
@ -427,11 +415,10 @@
.classifyConList .list { .classifyConList .list {
width: 320rpx; width: 320rpx;
/* height: 433rpx; */ height: 433rpx;
margin-top: 30rpx; margin-top: 30rpx;
border-radius: 30rpx; border-radius: 30rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
padding-bottom: 30rpx;
} }
.classifyConList .list .img { .classifyConList .list .img {
@ -485,7 +472,4 @@
line-height: 58rpx; line-height: 58rpx;
} }
.memberPrice{
font-size: 28rpx;font-weight: bold;padding-left: 20rpx;margin-top: 10rpx;
}
</style> </style>

View File

@ -35,11 +35,8 @@
</view> </view>
<view class="money"> <view class="money">
<view class="moneyNum" style="display: flex;"> <view class="moneyNum">
<text ></text>{{item.price}} <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>
<view class="btn" v-if="item.customized==1"> <view class="btn" v-if="item.customized==1">
可定制 可定制
@ -77,21 +74,13 @@
page: 1, page: 1,
size: 10, size: 10,
is_home: 1, is_home: 1,
},
ifMember:false,
ifMemberPrice:false
} }
}, }
onShow() {
this.ifMember = uni.getStorageSync('ifMember');
this.ifMemberPrice = uni.getStorageSync('ifMemberPrice');
}, },
onLoad() { onLoad() {
if(uni.getStorageSync('userData')) {
this.getbannerData() this.getbannerData()
this.getNavData() this.getNavData()
}
this.getUserData();
}, },
onReachBottom() { onReachBottom() {
@ -109,37 +98,6 @@
} }
}, },
methods: { methods: {
getUserData(){
if(!uni.getStorageSync('userData')) {
uni.login({
success:(res)=> {
console.log(res);
this.request({
url: this.host + "/api/user/login",
type:"POST",
data: {
code: res.code,
},
success:(data)=>{
uni.setStorageSync('userData',data.data.data);
this.request({
url: this.host + "/api/user/info",
type: "post",
success: (res) => {
res.data.data.is_vip ? this.ifMember = true : this.ifMember = false;
uni.setStorageSync('ifMember',this.ifMember);
res.data.data.vip_switch ? this.ifSwitchMember = true : this.ifSwitchMember = false;
uni.setStorageSync('ifMemberPrice',this.ifSwitchMember);
}
})
this.getbannerData()
this.getNavData()
}
})
}
})
}
},
getHomeData() { getHomeData() {
this.moreState="loading" this.moreState="loading"
this.request({ this.request({

View File

@ -5,7 +5,7 @@
<view class="imgCon"> <view class="imgCon">
<image class="img" :src="userInfo.headimgurl" mode="aspectFill"></image> <image class="img" :src="userInfo.headimgurl" mode="aspectFill"></image>
</view> </view>
<view class="name" v-if="userInfo.nickname"> <view class="name">
{{userInfo.nickname}} {{userInfo.nickname}}
</view> </view>
<view class="Id" v-if="userInfo.vip_code"> <view class="Id" v-if="userInfo.vip_code">
@ -83,14 +83,6 @@
<image class="arrows" src="../../static/jt.png" mode=""></image> <image class="arrows" src="../../static/jt.png" mode=""></image>
</view> </view>
</navigator> </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>
<view class="make" v-if="memberState"> <view class="make" v-if="memberState">
<view class="member"> <view class="member">
@ -165,9 +157,7 @@
phone: "", phone: "",
invitee: "", invitee: "",
invitee_vip_code: "" invitee_vip_code: ""
}, }
ifMember:true,//
ifSwitchMember:false,//
} }
}, },
@ -186,17 +176,12 @@
} }
}, },
mounted() { mounted() {
this.ifSwitchMember = uni.getStorageSync('ifMemberPrice');
console.log(uni.getStorageSync('userData'))
this.getUserData() this.getUserData()
}, },
methods: { methods: {
//
switchMember(e){
this.ifSwitchMember = e.detail.value;
uni.setStorageSync('ifMemberPrice',this.ifSwitchMember);
this.changeInformation('vip_switch',this.ifSwitchMember ? 1 : 0);
},
getUserData(){ getUserData(){
this.requestToken({ this.requestToken({
url: this.host + "/api/user/info", url: this.host + "/api/user/info",
@ -204,10 +189,6 @@
success: (res) => { success: (res) => {
this.userInfo = res.data.data 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);
} }

View File

@ -21,15 +21,13 @@
</view> </view>
<view class="textA"> <view class="textA">
<view class="money"> <view class="money">
<text ></text>{{item.price}} <text ></text>{{item.price_text}}
</view> </view>
<view class="btn" v-if="item.customized==1"> <view class="btn" v-if="item.customized==1">
可定制 可定制
</view> </view>
</view> </view>
<view class="memberPrice" v-if="ifMember && ifMemberPrice && item.vip_price">
会员价{{item.vip_price}}
</view>
</view> </view>
</view> </view>
@ -52,17 +50,11 @@
arr: { arr: {
page: 1, page: 1,
size: 10, size: 10,
}, }
ifMember:false,
ifMemberPrice:false
} }
}, },
created() { created() {
this.customBar=uni.getStorageSync('customBar')+"rpx" this.customBar=uni.getStorageSync('customBar')+20+"rpx"
},
onShow() {
this.ifMember = uni.getStorageSync('ifMember');
this.ifMemberPrice = uni.getStorageSync('ifMemberPrice');
}, },
onReachBottom() { onReachBottom() {
this.arr.size= this.arr.size+this.num this.arr.size= this.arr.size+this.num
@ -111,6 +103,7 @@
this.HomeData = res.data.data.list this.HomeData = res.data.data.list
this.total = res.data.data.total this.total = res.data.data.total
if( (this.arr.page*this.arr.size) <=this.total ){ if( (this.arr.page*this.arr.size) <=this.total ){
}else{ }else{
this.loadState="no-more" this.loadState="no-more"
@ -132,7 +125,6 @@
padding-right: 40rpx; padding-right: 40rpx;
padding-left: 40rpx; padding-left: 40rpx;
z-index: 2; z-index: 2;
padding-top: 20rpx;
} }
.int { .int {
width: 670rpx; width: 670rpx;
@ -193,12 +185,11 @@
.classifyConList .list { .classifyConList .list {
width: 320rpx; width: 320rpx;
/* height: 433rpx; */ height: 433rpx;
margin-top: 30rpx; margin-top: 30rpx;
border-radius: 30rpx; border-radius: 30rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
position: relative; position: relative;
padding-bottom: 30rpx;
} }
.classifyConList .list .img { .classifyConList .list .img {
@ -216,7 +207,6 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
font-size: 28rpx; font-size: 28rpx;
margin-top: 15rpx; margin-top: 15rpx;
height: 100rpx;
line-height: 50rpx; line-height: 50rpx;
padding: 0 12rpx; padding: 0 12rpx;
font-weight: bold; font-weight: bold;
@ -227,9 +217,9 @@
display: flex; display: flex;
margin-top: 10rpx; margin-top: 10rpx;
padding: 0 12rpx; padding: 0 12rpx;
/* position: absolute; position: absolute;
bottom: 35rpx; bottom: 35rpx;
left: 0rpx; */ left: 0rpx;
width: 100%; width: 100%;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@ -252,7 +242,4 @@
line-height: 28rpx; line-height: 28rpx;
background-color: #D33333; background-color: #D33333;
} }
.memberPrice{
font-size: 28rpx;font-weight: bold;padding-left: 20rpx;margin-top: 10rpx;
}
</style> </style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 924 B

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/banner.zip Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 683 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 907 B

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 759 B

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 501 B

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 678 B

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 B

After

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 863 B

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 B

After

Width:  |  Height:  |  Size: 445 B

BIN
static/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 530 B

After

Width:  |  Height:  |  Size: 829 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

After

Width:  |  Height:  |  Size: 835 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 712 B

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 524 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 629 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 464 B

After

Width:  |  Height:  |  Size: 1.3 KiB