Commit 11511525 by songbingqi

修复部分bug

parent 442340ee
......@@ -340,9 +340,11 @@ export default {
}
}
.right_bottom {
padding-top: 28.96rpx;
padding-top: 20.96rpx;
margin-right: 32rpx;
.more_info {
padding-bottom: 8rpx;
padding-top: 8rpx;
display: flex;
justify-content: flex-start;
align-items: center;
......
<template>
<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"
:class="item.id == categoryId ? 'active' : ''">
:class="item.id == categoryId ? 'active' : ''" :style="[scrollBottom]">
<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"/>
</view>
......@@ -10,11 +10,11 @@
<!-- <view :class="item.id == categoryId ? 'active-line' : ''"></view> -->
</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>
<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 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">
<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" />
......@@ -56,6 +56,9 @@ export default {
props:['buied','shopState'],
data() {
return {
scrollBottom: {
'--scroll-marginbottom': 0
},
heightStyle: {
'--scroll-height': 0
},
......@@ -77,6 +80,14 @@ export default {
}
},
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){
this.shopCarFlag = val.length>0
},
......@@ -324,6 +335,7 @@ export default {
}
.nav-left-item:last-child {
margin-bottom: var(--scroll-marginbottom);
border-bottom: none;
}
......@@ -506,6 +518,10 @@ export default {
width: 150rpx;
height: 150rpx;
}
.nav-right-item:last-child {
margin-bottom: var(--scroll-marginbottom);
border-bottom: none;
}
::-webkit-scrollbar {
/*取消小程序的默认导航条样式*/
......
......@@ -126,7 +126,6 @@ export default {
this.bottomPadding = this.BottomSafeHeight+132
this.shopCar = uni.getStorageSync('shopCar')
console.log(this.shopCar)
if(!this.userms){
User.wxLoginAndGetOpenid(true).then(loginInfo=>{
this.loginInfo = loginInfo
......@@ -345,6 +344,7 @@ export default {
.scroll-Y {
max-height: 750rpx;
// margin-bottom: 100rpx;
.container {
flex: 1;
}
......@@ -600,7 +600,8 @@ export default {
.shopClose {
width: 100%;
height: 100rpx;
background: linear-gradient(180deg, #FFFFFF 0%, #F0F0F0 100%);
background: rgba(0,83,255,0.7);
backdrop-filter: blur(10px);
position: fixed;
left: 0;
display: flex;
......@@ -608,8 +609,8 @@ export default {
align-items: center;
font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
font-weight: 500;
color: #FFFFFF;
text-align: center;
line-height: 100rpx;
......
......@@ -110,6 +110,7 @@ export default {
}
},
onShow() {
uni.setStorageSync("selectFlag",false)
uni.removeStorageSync('goodsList');
this.BottomSafeHeight = uni.getStorageSync('BottomSafeHeight')
this.shopState = JSON.parse(uni.getStorageSync("shopState"))
......
......@@ -27,7 +27,7 @@
</view>
<view class="usebtn" v-if="canuse.length!=0&&current===0">
<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>
<view class="btnView" @click="setTickcet">确认</view>
......@@ -76,6 +76,7 @@ export default {
name: "不可使用",
},
],
firstFlag:true,
nouserList:[],
current: 0,
actionIndx:0,
......@@ -84,6 +85,11 @@ export default {
};
},
mounted(){
console.log(uni.getStorageSync("selectFlag"))
if(uni.getStorageSync("selectFlag")){
this.firstFlag = false
}
for(let i=0;i<15;i++){
this.nouserList.push({
status:1, // 0可使用 1不可使用/已过期/已失效
......@@ -108,6 +114,8 @@ export default {
},
methods: {
updata(val){
this.firstFlag = false
uni.setStorageSync("selectFlag",true)
const { id, checkStatus } = val
this.canuse.map(item=>{
if(item.id===id){
......
......@@ -172,6 +172,7 @@ export default {
// console.log(q);
if (q) {
console.log('扫码进入')
uni.setStorageSync("selectFlag",false)
this.getMessageFlag()
this.saveGetTicket()
User.getLocation((state, params) => {
......
......@@ -166,6 +166,7 @@ export default {
this.$refs.shopbar.showShopCar = false;
},
async onShow() {
uni.setStorageSync("selectFlag",false)
this.getHomeOrder()
},
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