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="credit-points">
<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
class="active-line" v-if="tabIndex == index"></span></div>
</div>

View File

@@ -1,14 +1,12 @@
<template>
<div class="supermarket">
<div class="title" @click="$linkTo(`./system?areaName=${areaName}`)">{{ areaName }}积分超市管理制度点击查看 >></div>
<div class="goods-list" v-if="numList.length"
:style="propAreaId == '341021104000' ? 'padding-top:80rpx' : 'padding-top: 0;'">
<div class="goods-list fill" v-if="numList.length">
<div class="left">
<div
:class="numIndex == index ? 'item active' : 'item'"
v-for="(item, index) in numList"
:key="index"
@click="numClick(index)">
<div :class="numIndex == index ? 'item active' : 'item'"
v-for="(item, index) in numList"
:key="index"
@click="numClick(index)">
<i v-show="item.total > 0">{{ item.total }}</i>
{{ item.type }}分区
</div>
@@ -31,7 +29,7 @@
</div>
</div>
</div>
<AiEmpty v-else/>
<AiEmpty class="fill" v-else/>
<div class="goods-footer" v-if="numList.length">
<div class="goods-footer__top">
<h2>{{ userInfo.familyName || user.nickName }}{{ userInfo.familyName ? '家' : '' }}</h2>
@@ -67,10 +65,8 @@ export default {
propAreaId: ''
}
},
computed: {
...mapState(['global', 'user', 'token']),
total() {
let total = 0
if (!this.numList.length) {
@@ -83,7 +79,6 @@ export default {
return total
},
money() {
let money = 0
if (!this.goodsList.length) {
@@ -99,13 +94,11 @@ export default {
return money
}
},
onLoad() {
this.propAreaId = this.$areaId
uni.$on('update', () => {
this.getInfo()
})
this.getUserInfo()
this.getInfo()
},
onShow() {
@@ -163,25 +156,19 @@ export default {
this.$instance.post(`/app/appvillagerintegralmerchandise/listByIntegral`, null, {
params: {areaId: this.user?.areaId}
}).then(res => {
if (res.code === 0) {
if (res.data) {
this.numList = Object.keys(res.data).map(item => {
return {
type: item,
total: 0
}
if (res?.data) {
this.numList = []
this.goodsList = []
Object.keys(res.data).map(e => {
this.numList.push({
type: e,
total: 0
})
this.goodsList = Object.values(res.data).map((item) => {
item.map((items) => {
items.num = 0
items.photo = JSON.parse(items.photo)
return items
})
return item
})
}
let goods = res.data[e]?.map(g => ({
...g, num: 0, photo: g.photo ? JSON.parse(g.photo) : ""
}))
this.goodsList.push(goods)
})
}
})
},
@@ -215,115 +202,12 @@ export default {
}
</script>
<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 {
min-height: 100vh;
height: 100vh;
background: #fff;
overflow-y: hidden;
display: flex;
flex-direction: column;
.title {
width: 100vw;
@@ -336,15 +220,12 @@ export default {
}
.goods-list {
// padding-top:80px; padding-bottom: 184px;
height: 100%;
box-sizing: border-box;
overflow-y: hidden;
.left {
width: 168px;
height: 100%;
overflow-y: scroll;
overflow-y: auto;
overflow-x: hidden;
float: left;
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>