Commit 11511525 by songbingqi

修复部分bug

parent 442340ee
...@@ -340,9 +340,11 @@ export default { ...@@ -340,9 +340,11 @@ export default {
} }
} }
.right_bottom { .right_bottom {
padding-top: 28.96rpx; padding-top: 20.96rpx;
margin-right: 32rpx; margin-right: 32rpx;
.more_info { .more_info {
padding-bottom: 8rpx;
padding-top: 8rpx;
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
......
<template> <template>
<view class="page-body"> <view class="page-body">
<scroll-view class="nav-left" :style="[heightStyle]" :class="[shopCarFlag||!shopState?'shopCarcss':'' ]" scroll-y :scroll-top="scrollLeftTop" scroll-with-animation> <scroll-view class="nav-left" :style="[heightStyle]" :class="[shopCarFlag?'shopCarcss':'' ]" scroll-y :scroll-top="scrollLeftTop" scroll-with-animation>
<view class="nav-left-item" v-for="(item,index) in classifyData" @click="categoryClickMain(item.id)" :key="item.id" <view class="nav-left-item" v-for="(item,index) in classifyData" @click="categoryClickMain(item.id)" :key="item.id"
:class="item.id == categoryId ? 'active' : ''"> :class="item.id == categoryId ? 'active' : ''" :style="[scrollBottom]">
<view class="imgbox" v-if="item.icon&&sizeList[index].width"> <view class="imgbox" v-if="item.icon&&sizeList[index].width">
<image :style="{'height':sizeList[index].height+'rpx','width':sizeList[index].width+'rpx'}" :src="item.icon"/> <image :style="{'height':sizeList[index].height+'rpx','width':sizeList[index].width+'rpx'}" :src="item.icon"/>
</view> </view>
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
<!-- <view :class="item.id == categoryId ? 'active-line' : ''"></view> --> <!-- <view :class="item.id == categoryId ? 'active-line' : ''"></view> -->
</view> </view>
</scroll-view> </scroll-view>
<scroll-view class="nav-right" :style="[heightStyle]" :class="[shopCarFlag||!shopState?'shopCarcss':'' ]" scroll-y :scroll-top="scrollTop" @scroll="scroll" @touchstart="openScroll" <scroll-view class="nav-right" :style="[heightStyle]" :class="[shopCarFlag?'shopCarcss':'' ]" scroll-y :scroll-top="scrollTop" @scroll="scroll" @touchstart="openScroll"
scroll-with-animation> scroll-with-animation>
<view v-for="(category,index) in classifyData" :id="category.id" :key="category.id" class="box" :style="[goodBottom]"> <view v-for="(category,index) in classifyData" :id="category.id" :key="category.id" class="box" :style="[goodBottom]">
<view :style="loads" class="right-title">{{ category.name }}</view> <view :style="loads" class="right-title">{{ category.name }}</view>
<view class="nav-right-item" v-for="item in category.goods" :key="item.goodsId"> <view class="nav-right-item" v-for="item in category.goods" :key="item.goodsId" :style="[scrollBottom]">
<view class="thumbnailBox"> <view class="thumbnailBox">
<image src="/static/imgs/aixin.png" v-if="item.isRecommend == 1" class="isRecommend" /> <image src="/static/imgs/aixin.png" v-if="item.isRecommend == 1" class="isRecommend" />
<image @click="cart(item, category)" class="thumbnail" v-if="item.pics.thumbnailApplet" :src="item.pics.thumbnailApplet" /> <image @click="cart(item, category)" class="thumbnail" v-if="item.pics.thumbnailApplet" :src="item.pics.thumbnailApplet" />
...@@ -56,6 +56,9 @@ export default { ...@@ -56,6 +56,9 @@ export default {
props:['buied','shopState'], props:['buied','shopState'],
data() { data() {
return { return {
scrollBottom: {
'--scroll-marginbottom': 0
},
heightStyle: { heightStyle: {
'--scroll-height': 0 '--scroll-height': 0
}, },
...@@ -77,6 +80,14 @@ export default { ...@@ -77,6 +80,14 @@ export default {
} }
}, },
watch:{ watch:{
shopState(val) {
if(!val) {
this.scrollBottom['--scroll-marginbottom'] = 100+'rpx'
}else{
this.scrollBottom['--scroll-marginbottom'] = 0+'rpx'
}
console.log(this.scrollBottom['--scroll-marginbottom'])
},
goods(val){ goods(val){
this.shopCarFlag = val.length>0 this.shopCarFlag = val.length>0
}, },
...@@ -324,6 +335,7 @@ export default { ...@@ -324,6 +335,7 @@ export default {
} }
.nav-left-item:last-child { .nav-left-item:last-child {
margin-bottom: var(--scroll-marginbottom);
border-bottom: none; border-bottom: none;
} }
...@@ -506,6 +518,10 @@ export default { ...@@ -506,6 +518,10 @@ export default {
width: 150rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
} }
.nav-right-item:last-child {
margin-bottom: var(--scroll-marginbottom);
border-bottom: none;
}
::-webkit-scrollbar { ::-webkit-scrollbar {
/*取消小程序的默认导航条样式*/ /*取消小程序的默认导航条样式*/
......
...@@ -126,7 +126,6 @@ export default { ...@@ -126,7 +126,6 @@ export default {
this.bottomPadding = this.BottomSafeHeight+132 this.bottomPadding = this.BottomSafeHeight+132
this.shopCar = uni.getStorageSync('shopCar') this.shopCar = uni.getStorageSync('shopCar')
console.log(this.shopCar)
if(!this.userms){ if(!this.userms){
User.wxLoginAndGetOpenid(true).then(loginInfo=>{ User.wxLoginAndGetOpenid(true).then(loginInfo=>{
this.loginInfo = loginInfo this.loginInfo = loginInfo
...@@ -345,6 +344,7 @@ export default { ...@@ -345,6 +344,7 @@ export default {
.scroll-Y { .scroll-Y {
max-height: 750rpx; max-height: 750rpx;
// margin-bottom: 100rpx;
.container { .container {
flex: 1; flex: 1;
} }
...@@ -600,7 +600,8 @@ export default { ...@@ -600,7 +600,8 @@ export default {
.shopClose { .shopClose {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
background: linear-gradient(180deg, #FFFFFF 0%, #F0F0F0 100%); background: rgba(0,83,255,0.7);
backdrop-filter: blur(10px);
position: fixed; position: fixed;
left: 0; left: 0;
display: flex; display: flex;
...@@ -608,8 +609,8 @@ export default { ...@@ -608,8 +609,8 @@ export default {
align-items: center; align-items: center;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 500;
color: #666666; color: #FFFFFF;
text-align: center; text-align: center;
line-height: 100rpx; line-height: 100rpx;
......
...@@ -110,6 +110,7 @@ export default { ...@@ -110,6 +110,7 @@ export default {
} }
}, },
onShow() { onShow() {
uni.setStorageSync("selectFlag",false)
uni.removeStorageSync('goodsList'); uni.removeStorageSync('goodsList');
this.BottomSafeHeight = uni.getStorageSync('BottomSafeHeight') this.BottomSafeHeight = uni.getStorageSync('BottomSafeHeight')
this.shopState = JSON.parse(uni.getStorageSync("shopState")) this.shopState = JSON.parse(uni.getStorageSync("shopState"))
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</view> </view>
<view class="usebtn" v-if="canuse.length!=0&&current===0"> <view class="usebtn" v-if="canuse.length!=0&&current===0">
<view class="content"> <view class="content">
<view class="text" v-if="price!=0">已选1张HOOLOO券,可优惠<span class="money">{{price}}</span></view> <view class="text" v-if="price!=0"><span>{{firstFlag?'已为您选择最佳优惠券,可优惠':'已选1张HOOLOO券,可优惠'}}</span><span class="money">{{price}}</span></view>
<view class="text" v-else>暂未选择HOOLOO优惠券</view> <view class="text" v-else>暂未选择HOOLOO优惠券</view>
<view> <view>
<view class="btnView" @click="setTickcet">确认</view> <view class="btnView" @click="setTickcet">确认</view>
...@@ -76,6 +76,7 @@ export default { ...@@ -76,6 +76,7 @@ export default {
name: "不可使用", name: "不可使用",
}, },
], ],
firstFlag:true,
nouserList:[], nouserList:[],
current: 0, current: 0,
actionIndx:0, actionIndx:0,
...@@ -84,6 +85,11 @@ export default { ...@@ -84,6 +85,11 @@ export default {
}; };
}, },
mounted(){ mounted(){
console.log(uni.getStorageSync("selectFlag"))
if(uni.getStorageSync("selectFlag")){
this.firstFlag = false
}
for(let i=0;i<15;i++){ for(let i=0;i<15;i++){
this.nouserList.push({ this.nouserList.push({
status:1, // 0可使用 1不可使用/已过期/已失效 status:1, // 0可使用 1不可使用/已过期/已失效
...@@ -108,6 +114,8 @@ export default { ...@@ -108,6 +114,8 @@ export default {
}, },
methods: { methods: {
updata(val){ updata(val){
this.firstFlag = false
uni.setStorageSync("selectFlag",true)
const { id, checkStatus } = val const { id, checkStatus } = val
this.canuse.map(item=>{ this.canuse.map(item=>{
if(item.id===id){ if(item.id===id){
......
...@@ -172,6 +172,7 @@ export default { ...@@ -172,6 +172,7 @@ export default {
// console.log(q); // console.log(q);
if (q) { if (q) {
console.log('扫码进入') console.log('扫码进入')
uni.setStorageSync("selectFlag",false)
this.getMessageFlag() this.getMessageFlag()
this.saveGetTicket() this.saveGetTicket()
User.getLocation((state, params) => { User.getLocation((state, params) => {
......
...@@ -166,6 +166,7 @@ export default { ...@@ -166,6 +166,7 @@ export default {
this.$refs.shopbar.showShopCar = false; this.$refs.shopbar.showShopCar = false;
}, },
async onShow() { async onShow() {
uni.setStorageSync("selectFlag",false)
this.getHomeOrder() this.getHomeOrder()
}, },
methods: { methods: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment