2025-06-03 11:47:06 +08:00
|
|
|
<template>
|
|
|
|
<view>
|
2025-06-03 16:40:49 +08:00
|
|
|
<AreaWrapper v-if="!loading" :areaSpecialAreaList="areaSpecialAreaList" />
|
2025-06-03 11:47:06 +08:00
|
|
|
<cl-tabbar :current="1"></cl-tabbar>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import clTabbar from '@/components/cl-tabbar.vue'
|
2025-06-03 16:40:49 +08:00
|
|
|
import AreaWrapper from '@/components/area-wrapper/index.vue'
|
|
|
|
import { REPEAT_PURCHASE, RESCISSION } from '@/util/specialAreaMap'
|
|
|
|
import { mapActions } from 'vuex'
|
2025-06-03 11:47:06 +08:00
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
'cl-tabbar': clTabbar,
|
2025-06-03 16:40:49 +08:00
|
|
|
AreaWrapper,
|
|
|
|
},
|
|
|
|
computed: {},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
areaSpecialAreaList: [],
|
|
|
|
visible: false,
|
|
|
|
loading: true,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onLoad(options) {
|
|
|
|
this.init()
|
|
|
|
},
|
|
|
|
onShow() {},
|
|
|
|
onHide() {},
|
|
|
|
beforeDestroy() {},
|
|
|
|
methods: {
|
|
|
|
...mapActions(['getSpecialAreaAuth']),
|
|
|
|
init() {
|
|
|
|
uni.showLoading({
|
|
|
|
title: '加载中...',
|
|
|
|
})
|
|
|
|
this.getSpecialAreaAuth()
|
|
|
|
.then(specialAreaList => {
|
|
|
|
if (specialAreaList.includes(REPEAT_PURCHASE.menuKey)) {
|
|
|
|
this.areaSpecialAreaList.push(REPEAT_PURCHASE)
|
|
|
|
}
|
|
|
|
if (specialAreaList.includes(RESCISSION.menuKey)) {
|
|
|
|
this.areaSpecialAreaList.push(RESCISSION)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.finally(() => {
|
|
|
|
this.loading = false
|
|
|
|
this.$nextTick(() => {
|
|
|
|
uni.hideLoading()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
2025-06-03 11:47:06 +08:00
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|