Commit c1c6a28f by 李伟康

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

1 parent 19ee7a50
...@@ -88,5 +88,13 @@ module.exports = { ...@@ -88,5 +88,13 @@ module.exports = {
...data ...data
}) })
} },
getInviteRecordCount(data) {
return http.post({
method: "dj.api.smartcarlife.inviteRecord.count.new",
projectName: "boutique",
...data
})
},
}; };
...@@ -27,6 +27,11 @@ ...@@ -27,6 +27,11 @@
class="icon" class="icon"
/> />
{{ i.title }} {{ i.title }}
<template v-if="i.count">
<div class="count">
{{i.count}}
</div>
</template>
</view> </view>
</template> </template>
</view> </view>
...@@ -303,6 +308,7 @@ export default { ...@@ -303,6 +308,7 @@ export default {
this.moduleList = moduleList this.moduleList = moduleList
this.toolList = toolList this.toolList = toolList
this.defaultCarId = defaultCarId this.defaultCarId = defaultCarId
this.getInviteRecordCount()
}, },
toDetail (item) { toDetail (item) {
this.chooseItem = item this.chooseItem = item
...@@ -456,6 +462,17 @@ export default { ...@@ -456,6 +462,17 @@ export default {
{ carBannerList } = this { carBannerList } = this
if (index != 0 && item.seriesId == carBannerList[index - 1].seriesId) result = false if (index != 0 && item.seriesId == carBannerList[index - 1].seriesId) result = false
return result 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 { ...@@ -463,7 +480,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
&::after{ &::after {
background-image: url('@/assets/images/common/home-bg-1.webp'); background-image: url('@/assets/images/common/home-bg-1.webp');
} }
} }
...@@ -479,6 +496,7 @@ export default { ...@@ -479,6 +496,7 @@ export default {
gap: 0 toRpx(32); gap: 0 toRpx(32);
z-index: 2; z-index: 2;
.item { .item {
position: relative;
height: toRpx(56); height: toRpx(56);
background: #ffffff66; background: #ffffff66;
border: toRpx(2) solid #ffffff; border: toRpx(2) solid #ffffff;
...@@ -495,6 +513,20 @@ export default { ...@@ -495,6 +513,20 @@ export default {
width: toRpx(56); width: toRpx(56);
height: 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 { .banner-tab-scroll {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!