|
@@ -16,7 +16,7 @@
|
|
<script>
|
|
<script>
|
|
import boxItem from '@/ui/box-item'
|
|
import boxItem from '@/ui/box-item'
|
|
import Taro from "@tarojs/taro";
|
|
import Taro from "@tarojs/taro";
|
|
-import {mapActions, mapGetters, mapState} from "vuex";
|
|
|
|
|
|
+import {mapGetters} from "vuex";
|
|
import adSingle from "@/components/common/Ad.vue";
|
|
import adSingle from "@/components/common/Ad.vue";
|
|
import {setTrackLog} from "@/track";
|
|
import {setTrackLog} from "@/track";
|
|
import {ajaxGetBoxInfo} from "@/api/modules/common";
|
|
import {ajaxGetBoxInfo} from "@/api/modules/common";
|
|
@@ -27,7 +27,6 @@ export default {
|
|
},
|
|
},
|
|
created () {
|
|
created () {
|
|
this.$instance = Taro.getCurrentInstance()
|
|
this.$instance = Taro.getCurrentInstance()
|
|
- this.getSubscribeInfo({ force: false })
|
|
|
|
},
|
|
},
|
|
onShow () {
|
|
onShow () {
|
|
this.getBoxInfo()
|
|
this.getBoxInfo()
|
|
@@ -41,22 +40,11 @@ export default {
|
|
...mapGetters('env', ['miniEnv']),
|
|
...mapGetters('env', ['miniEnv']),
|
|
...mapGetters('box', ['list']),
|
|
...mapGetters('box', ['list']),
|
|
...mapGetters('user', ['nowActiveArea']),
|
|
...mapGetters('user', ['nowActiveArea']),
|
|
- ...mapState({
|
|
|
|
- subscribeInfo: (state) => state.subscribe.subscribeInfo
|
|
|
|
- }),
|
|
|
|
- areaSelectText() {
|
|
|
|
- let tip = this.nowActiveArea
|
|
|
|
- const { area } = this.subscribeInfo
|
|
|
|
- if (Array.isArray(area) && area.length > 0) {
|
|
|
|
- tip = area.join('、')
|
|
|
|
- }
|
|
|
|
- return tip
|
|
|
|
- },
|
|
|
|
formatBoxList () {
|
|
formatBoxList () {
|
|
const result = this.list.map((v, index) => {
|
|
const result = this.list.map((v, index) => {
|
|
v.self = v.id === this.miniEnv.appId
|
|
v.self = v.id === this.miniEnv.appId
|
|
if (index === 0) {
|
|
if (index === 0) {
|
|
- v.tip = this.boxInfo?.Data || v.tip.replace('河南省', this.areaSelectText)
|
|
|
|
|
|
+ v.tip = this.boxInfo?.Data
|
|
}
|
|
}
|
|
if (v.self) {
|
|
if (v.self) {
|
|
v.afterTitle = '您当前所在'
|
|
v.afterTitle = '您当前所在'
|
|
@@ -83,7 +71,6 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...mapActions('subscribe', ['getSubscribeInfo']),
|
|
|
|
getBoxInfo () {
|
|
getBoxInfo () {
|
|
ajaxGetBoxInfo({
|
|
ajaxGetBoxInfo({
|
|
Area: this.nowActiveArea
|
|
Area: this.nowActiveArea
|