| | |
| | | import search from '@/components/search.vue' |
| | | import searchShopList from '@/components/searchShopList.vue' |
| | | import { categoryList, goodsList, brandList, h5Image, logout, getByLoginNew, listForH5 } from '@/apis/index.js' |
| | | import { ANCHOR_PAGE_V3, getAnchorHomePath, normalizeAnchorPageVersion } from '@/utils/anchorHome.js' |
| | | import { mapState } from 'vuex' |
| | | export default { |
| | | data() { |
| | |
| | | onLoad() { |
| | | getByLoginNew({}) |
| | | .then(res => { |
| | | if (!res.data) { |
| | | const data = (res && res.data) || res |
| | | if (!data) { |
| | | return |
| | | } |
| | | this.configuration = JSON.parse(res.data.newParam) |
| | | const version = normalizeAnchorPageVersion(data.anchorPageVersion) |
| | | if (version === ANCHOR_PAGE_V3) { |
| | | uni.redirectTo({ url: getAnchorHomePath(version) }) |
| | | return |
| | | } |
| | | const paramStr = data.newParam |
| | | if (!paramStr) { |
| | | return |
| | | } |
| | | this.configuration = JSON.parse(paramStr) |
| | | this.fontColor = this.configuration.pull.selType === 1 ? this.percentage(this.configuration.pull.selColor, this.configuration.pull.selAlpha) : 'rgba(255, 220, 108, 1)' |
| | | if (this.configuration.bgImg.type === 0) { |
| | | this.bgImg = require('@/static/mb.png') |