feat(mine): 添加盒数接口

This commit is contained in:
woody 2025-06-11 15:13:12 +08:00
parent 4ca69f368a
commit 87ccf55b39
2 changed files with 19 additions and 3 deletions

View File

@ -31,3 +31,8 @@ export const setRegion = data =>
// 获取可选择区域
export const getRegionAreaTree = params =>
http.get('/retail-member/api/retail-member/region-tree', { params })
// 获取用户盒数
export const getMemberBoxCount = () =>
http.get('/retail-member/api/retail-member/member-box')

View File

@ -148,12 +148,12 @@
</view>
<template v-if="userInfo.memberSign === 0">
<view class="info-item">
<text class="info-value">{{ userInfo.totalBox || '0' }}</text>
<text class="info-value">{{ totalBox || '0' }}</text>
<text class="info-label">总盒数</text>
</view>
<view class="info-item">
<text class="info-value">
{{ userInfo.smallAreaBox || '0' }}
{{ smallAreaBox || '0' }}
</text>
<text class="info-label">小区盒数</text>
</view>
@ -344,7 +344,7 @@ import clTabbar from '@/components/cl-tabbar.vue'
import * as min from '@/config/balance.js'
import * as api from '@/config/login.js'
import { MEMBER_SIGN } from '@/util/common.js'
import { getRegionSelect } from '@/config/mine.js'
import { getRegionSelect, getMemberBoxCount } from '@/config/mine.js'
// import talentList from "@/components/talentList.vue";
export default {
components: {
@ -479,12 +479,15 @@ export default {
ifSpecial: false,
awardsList: '',
regionInfo: {},
smallAreaBox: 0,
totalBox: 0,
}
},
onShow() {
this.getInfo()
this.orderNum()
this.getRegionSelect()
this.getMemberBoxCount()
// this.getUserAwardss()
},
@ -772,6 +775,14 @@ export default {
url: '/pages/login/index',
})
},
getMemberBoxCount() {
getMemberBoxCount().then(res => {
if (res.code == 200) {
this.totalBox = res.data?.totalBox || 0
this.smallAreaBox = res.data?.smallAreaBox || 0
}
})
},
surePsw() {
min
.checkPwd({