diff --git a/pages/commonMixins/regionSelect.js b/pages/commonMixins/regionSelect.js
index d66d0ae..5cba226 100644
--- a/pages/commonMixins/regionSelect.js
+++ b/pages/commonMixins/regionSelect.js
@@ -20,7 +20,7 @@ export default {
if (!gradeValue) return
this.gradeValue = gradeValue
const params = {
- type: gradeValue === 80 ? 'city' : 'county',
+ type: 'county',
}
getRegionAreaList(params).then(res => {
this.provinceList = res.data.filter(item => item.parent === 0)
@@ -44,7 +44,6 @@ export default {
)
},
getCityFilterList() {
- if (this.gradeValue === 80) return
if (!this.countyList.length) {
this.cityList = []
}
@@ -53,7 +52,7 @@ export default {
)
},
getCountyFilterList() {
- if (!this.gradeValue || this.gradeValue === 80) {
+ if (!this.gradeValue) {
this.countyList = []
}
},
diff --git a/pages/mine/index.vue b/pages/mine/index.vue
index 78f91af..efaa82b 100644
--- a/pages/mine/index.vue
+++ b/pages/mine/index.vue
@@ -97,49 +97,79 @@
-
-
-
- 收益区域
-
-
+
+
-
-
- {{ '省' }}
- {{
- regionInfo.provinceVal || '-'
- }}
-
-
- {{ '市' }}
- {{
- regionInfo.cityVal || '-'
- }}
-
-
- {{ '区' }}
- {{
- regionInfo.countyVal || '-'
- }}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ {{ '省' }}
+ {{
+ regionInfo.provinceVal || '-'
+ }}
+
+
+ {{ '市' }}
+ {{
+ regionInfo.cityVal || '-'
+ }}
+
+
+ {{ '区' }}
+ {{
+ regionInfo.countyVal || '-'
+ }}
+
+
+
+
+
+
+
+
+ {{ '省' }}
+ {{
+ dstributionCenter.provinceVal || '-'
+ }}
+
+
+ {{ '市' }}
+ {{
+ dstributionCenter.cityVal || '-'
+ }}
+
+
+ {{ '区' }}
+ {{
+ dstributionCenter.countyVal || '-'
+ }}
+
+
+
+
+
+
+
+ 暂无配送中心信息
+
+
+
+
@@ -362,6 +392,7 @@ export default {
ifSpecial: false,
awardsList: '',
regionInfo: {},
+ dstributionCenter: {},
smallAreaBox: 0,
totalBox: 0,
// performanceData: {},
@@ -369,6 +400,7 @@ export default {
totalSumPv: 0,
smallAreaPv: 0,
isNormal: false,
+ currentRegionTab: 0, // 当前选中的tab索引
}
},
onShow() {
@@ -378,7 +410,7 @@ export default {
return
}
this.isNormal = isNormal
- // this.getRegionSelect()
+ this.getRegionSelect()
this.getMemberBoxCount()
this.getMarketDynamicBoxCount()
// this.getUserAwardss()
@@ -428,8 +460,8 @@ export default {
marketWrapperVisible() {
return this.userInfo.memberSign !== MEMBER_SIGN.ZERO_LEVEL
},
- regionInfoVisible() {
- return this.regionInfo?.regionStatus === 0
+ dstributionCenterVisible() {
+ return !!this.dstributionCenter
},
formattedTotalSumPv() {
const value = String(this.totalSumPv || '0.00')
@@ -463,9 +495,54 @@ export default {
decimal: parts.length > 1 ? `.${parts[1]}` : '',
}
},
+ // 是否有已选区域数据
+ hasRegionData() {
+ return !!(
+ this.regionInfo &&
+ (this.regionInfo.provinceVal ||
+ this.regionInfo.cityVal ||
+ this.regionInfo.countyVal)
+ )
+ },
+ // 是否有配送中心数据
+ hasDistributionData() {
+ return !!(
+ this.dstributionCenter &&
+ (this.dstributionCenter.provinceVal ||
+ this.dstributionCenter.cityVal ||
+ this.dstributionCenter.countyVal)
+ )
+ },
+ showRegionTabs() {
+ return !!(
+ (this.regionInfo && Object.keys(this.regionInfo).length) ||
+ (this.dstributionCenter && Object.keys(this.dstributionCenter).length)
+ )
+ },
+ regionTabList() {
+ const tabs = []
+
+ if (this.regionInfo) {
+ tabs.push({
+ name: '已选区域',
+ })
+ }
+
+ if (this.dstributionCenter) {
+ tabs.push({
+ name: '配送中心',
+ })
+ }
+
+ return tabs
+ },
},
methods: {
+ // Tab切换事件
+ onRegionTabChange({ index }) {
+ this.currentRegionTab = index
+ },
getRegionSelect() {
uni.showLoading({
title: '加载中...',
@@ -473,7 +550,12 @@ export default {
getRegionSelect()
.then(res => {
if (res.code == 200) {
- this.regionInfo = res.data
+ this.regionInfo = (res.data || []).filter(
+ item => item.businessType === 1
+ )?.[0]
+ this.dstributionCenter = (res.data || []).filter(
+ item => item.businessType === 2
+ )?.[0]
}
})
.finally(() => {
@@ -1347,7 +1429,25 @@ export default {
}
}
+/* Tab相关样式 */
+.tab-content {
+ padding: 0;
+}
+
+.empty-state {
+ padding: 60rpx 20rpx;
+ text-align: center;
+}
+
+.empty-text {
+ font-size: 28rpx;
+ color: #999999;
+}
+
.region-select-action {
padding: 30rpx 20rpx;
}
+::v-deep .u-tabs__wrapper__nav__item__text {
+ font-size: 26rpx !important;
+}
diff --git a/pages/regiest/index.vue b/pages/regiest/index.vue
index 9df0961..ca16817 100644
--- a/pages/regiest/index.vue
+++ b/pages/regiest/index.vue
@@ -55,7 +55,7 @@
/>