BUG 28411

This commit is contained in:
aixianling
2022-03-22 14:36:03 +08:00
parent 11f9119607
commit 3f7875d945
2 changed files with 123 additions and 142 deletions

View File

@@ -2,7 +2,7 @@
<div class="page"> <div class="page">
<div class="credit-points"> <div class="credit-points">
<div class="fixed-top"> <div class="fixed-top">
<div class="header-tab" style="background-color:#197DF0;"> <div class="header-tab">
<div class="tab-item" v-for="(item, index) in tabList" :key="index" @click="tabClick(index)">{{ item }}<span <div class="tab-item" v-for="(item, index) in tabList" :key="index" @click="tabClick(index)">{{ item }}<span
class="active-line" v-if="tabIndex == index"></span></div> class="active-line" v-if="tabIndex == index"></span></div>
</div> </div>

View File

@@ -1,11 +1,9 @@
<template> <template>
<div class="supermarket"> <div class="supermarket">
<div class="title" @click="$linkTo(`./system?areaName=${areaName}`)">{{ areaName }}积分超市管理制度点击查看 >></div> <div class="title" @click="$linkTo(`./system?areaName=${areaName}`)">{{ areaName }}积分超市管理制度点击查看 >></div>
<div class="goods-list" v-if="numList.length" <div class="goods-list fill" v-if="numList.length">
:style="propAreaId == '341021104000' ? 'padding-top:80rpx' : 'padding-top: 0;'">
<div class="left"> <div class="left">
<div <div :class="numIndex == index ? 'item active' : 'item'"
:class="numIndex == index ? 'item active' : 'item'"
v-for="(item, index) in numList" v-for="(item, index) in numList"
:key="index" :key="index"
@click="numClick(index)"> @click="numClick(index)">
@@ -31,7 +29,7 @@
</div> </div>
</div> </div>
</div> </div>
<AiEmpty v-else/> <AiEmpty class="fill" v-else/>
<div class="goods-footer" v-if="numList.length"> <div class="goods-footer" v-if="numList.length">
<div class="goods-footer__top"> <div class="goods-footer__top">
<h2>{{ userInfo.familyName || user.nickName }}{{ userInfo.familyName ? '家' : '' }}</h2> <h2>{{ userInfo.familyName || user.nickName }}{{ userInfo.familyName ? '家' : '' }}</h2>
@@ -67,10 +65,8 @@ export default {
propAreaId: '' propAreaId: ''
} }
}, },
computed: { computed: {
...mapState(['global', 'user', 'token']), ...mapState(['global', 'user', 'token']),
total() { total() {
let total = 0 let total = 0
if (!this.numList.length) { if (!this.numList.length) {
@@ -83,7 +79,6 @@ export default {
return total return total
}, },
money() { money() {
let money = 0 let money = 0
if (!this.goodsList.length) { if (!this.goodsList.length) {
@@ -99,13 +94,11 @@ export default {
return money return money
} }
}, },
onLoad() { onLoad() {
this.propAreaId = this.$areaId this.propAreaId = this.$areaId
uni.$on('update', () => { uni.$on('update', () => {
this.getInfo() this.getInfo()
}) })
this.getUserInfo()
this.getInfo() this.getInfo()
}, },
onShow() { onShow() {
@@ -163,25 +156,19 @@ export default {
this.$instance.post(`/app/appvillagerintegralmerchandise/listByIntegral`, null, { this.$instance.post(`/app/appvillagerintegralmerchandise/listByIntegral`, null, {
params: {areaId: this.user?.areaId} params: {areaId: this.user?.areaId}
}).then(res => { }).then(res => {
if (res.code === 0) { if (res?.data) {
if (res.data) { this.numList = []
this.numList = Object.keys(res.data).map(item => { this.goodsList = []
return { Object.keys(res.data).map(e => {
type: item, this.numList.push({
type: e,
total: 0 total: 0
}
}) })
this.goodsList = Object.values(res.data).map((item) => { let goods = res.data[e]?.map(g => ({
item.map((items) => { ...g, num: 0, photo: g.photo ? JSON.parse(g.photo) : ""
items.num = 0 }))
items.photo = JSON.parse(items.photo) this.goodsList.push(goods)
return items
}) })
return item
})
}
} }
}) })
}, },
@@ -215,115 +202,12 @@ export default {
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import "~dvcp-wui/common";
.item-bottom {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 28px;
.item-bottom__right {
display: flex;
align-items: center;
height: 60px;
}
image {
width: 27px;
height: 27px;
}
input {
width: 90px;
height: 60px;
padding: 020px;
margin: 010px;
background: #F6F6F6;
border-radius: 10px;
font-size: 26px;
color: #666;
text-align: center;
}
}
.goods-footer {
position: fixed;
left: 0;
bottom: 0;
z-index: 111;
width: 100%;
background: #fff;
.goods-footer__top {
display: flex;
align-items: center;
justify-content: space-between;
height: 80px;
padding: 0 30px;
background: #EFF4FF;
color: #333333;
font-size: 32px;
}
.goods-footer__bottom--btn {
width: 212px;
height: 104px;
line-height: 104px;
font-size: 36px;
color: #fff;
text-align: center;
background: #197DF0;
}
.goods-footer__bottom__left {
display: flex;
align-items: center;
justify-content: space-between;
flex: 1;
padding: 0 32px;
h3 {
color: #F94246;
font-size: 32px;
}
.goods-footer__bottom--middle {
display: flex;
align-items: baseline;
span {
color: #F94246;
font-size: 32px;
}
i {
position: relative;
top: 2px;
margin-right: 12px;
color: #FA444B;
font-size: 40px;
}
em {
color: #F94246;
font-size: 24px;
}
}
}
.goods-footer__bottom {
display: flex;
align-items: center;
justify-content: space-between;
height: 104px;
}
}
.supermarket { .supermarket {
min-height: 100vh; height: 100vh;
background: #fff; background: #fff;
overflow-y: hidden; overflow-y: hidden;
display: flex;
flex-direction: column;
.title { .title {
width: 100vw; width: 100vw;
@@ -336,15 +220,12 @@ export default {
} }
.goods-list { .goods-list {
// padding-top:80px; padding-bottom: 184px;
height: 100%;
box-sizing: border-box; box-sizing: border-box;
overflow-y: hidden;
.left { .left {
width: 168px; width: 168px;
height: 100%; height: 100%;
overflow-y: scroll; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
float: left; float: left;
background: #FAF9FB; background: #FAF9FB;
@@ -434,5 +315,105 @@ export default {
} }
} }
} }
.goods-footer {
z-index: 111;
width: 100vw;
background: #fff;
.goods-footer__top {
display: flex;
align-items: center;
justify-content: space-between;
height: 80px;
padding: 0 30px;
background: #EFF4FF;
color: #333333;
font-size: 32px;
}
.goods-footer__bottom--btn {
width: 212px;
height: 104px;
line-height: 104px;
font-size: 36px;
color: #fff;
text-align: center;
background: #197DF0;
}
.goods-footer__bottom__left {
display: flex;
align-items: center;
justify-content: space-between;
flex: 1;
padding: 0 32px;
h3 {
color: #F94246;
font-size: 32px;
}
.goods-footer__bottom--middle {
display: flex;
align-items: baseline;
span {
color: #F94246;
font-size: 32px;
}
i {
position: relative;
top: 2px;
margin-right: 12px;
color: #FA444B;
font-size: 40px;
}
em {
color: #F94246;
font-size: 24px;
}
}
}
.goods-footer__bottom {
display: flex;
align-items: center;
justify-content: space-between;
height: 104px;
}
}
.item-bottom {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 28px;
.item-bottom__right {
display: flex;
align-items: center;
height: 60px;
}
image {
width: 27px;
height: 27px;
}
input {
width: 90px;
height: 60px;
padding: 020px;
margin: 010px;
background: #F6F6F6;
border-radius: 10px;
font-size: 26px;
color: #666;
text-align: center;
}
}
} }
</style> </style>