Commit c1c6a28f by 李伟康

feat(boutique): 添加邀请记录计数功能

1 parent 19ee7a50
......@@ -88,5 +88,13 @@ module.exports = {
...data
})
}
},
getInviteRecordCount(data) {
return http.post({
method: "dj.api.smartcarlife.inviteRecord.count.new",
projectName: "boutique",
...data
})
},
};
......@@ -27,6 +27,11 @@
class="icon"
/>
{{ i.title }}
<template v-if="i.count">
<div class="count">
{{i.count}}
</div>
</template>
</view>
</template>
</view>
......@@ -303,6 +308,7 @@ export default {
this.moduleList = moduleList
this.toolList = toolList
this.defaultCarId = defaultCarId
this.getInviteRecordCount()
},
toDetail (item) {
this.chooseItem = item
......@@ -456,6 +462,17 @@ export default {
{ carBannerList } = this
if (index != 0 && item.seriesId == carBannerList[index - 1].seriesId) result = false
return result
},
async getInviteRecordCount () {
const { moduleList } = this,
userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId: merchantId } = userInfo,
{ notInvitedCount } = await uni.$api.boutiqueApi.getInviteRecordCount({
merchantId
})
moduleList.map(e => {
if (e.id == 3) e.count = notInvitedCount ? notInvitedCount > 99 ? 99 : notInvitedCount : 0
})
}
}
}
......@@ -463,7 +480,7 @@ export default {
<style scoped lang="scss">
.container {
&::after{
&::after {
background-image: url('@/assets/images/common/home-bg-1.webp');
}
}
......@@ -479,6 +496,7 @@ export default {
gap: 0 toRpx(32);
z-index: 2;
.item {
position: relative;
height: toRpx(56);
background: #ffffff66;
border: toRpx(2) solid #ffffff;
......@@ -495,6 +513,20 @@ export default {
width: toRpx(56);
height: toRpx(56);
}
.count {
width: fit-content;
position: absolute;
top: toMinusRpx(12);
right: 0;
transform: translateX(50%);
height: toRpx(24);
line-height: toRpx(24);
padding: 0 toRpx(6);
border-radius: toRpx(708);
background: #f24724;
color: #ffffff;
font-size: toRpx(20);
}
}
}
.banner-tab-scroll {
......@@ -513,7 +545,7 @@ export default {
.banner-item {
position: relative;
flex-shrink: 0;
margin-right: toRpx(40);
margin-right: toRpx(40);
.banner-title {
color: #333333b3;
font-size: toRpx(24);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!