diff --git a/components/zbpSwiper.vue b/components/zbpSwiper.vue index a035316..8ad5207 100644 --- a/components/zbpSwiper.vue +++ b/components/zbpSwiper.vue @@ -78,7 +78,14 @@ } }, computed: mapGetters(['location']), - watch: {}, + watch: { + location: { + handler(newVal, oldVal) { + this.street = newVal.address_component.street + }, + immediate: true + } + }, created() { this.getBanner() this.Area() diff --git a/pages/gather/gather.vue b/pages/gather/gather.vue index b87f7f7..694c7af 100644 --- a/pages/gather/gather.vue +++ b/pages/gather/gather.vue @@ -43,7 +43,8 @@ 我的店铺 - + 供货采购 @@ -104,7 +105,8 @@ 里海云仓 - + 供货采购 diff --git a/pages/goods_details/index.vue b/pages/goods_details/index.vue index fb90ba5..f94facc 100644 --- a/pages/goods_details/index.vue +++ b/pages/goods_details/index.vue @@ -1,392 +1,416 @@ + >span:nth-child(1) { + display: inline-block; + margin-right: 14rpx; + white-space: nowrap; + } + + .iconfont { + font-size: 24rpx; + } + } + } + + .selectList_tap { + border-bottom: 1px solid #eeeeee; + display: flex; + + &_item { + font-size: 28rpx; + margin-right: 60rpx; + white-space: nowrap; + } + + .selectTap { + color: #e93323; + border-bottom: 3rpx solid #e93323; + padding-bottom: 21rpx; + } + } + + .selectList_area { + .scroll { + height: 597rpx; + } + + .selectList_area_item { + padding: 40rpx 0; + display: flex; + justify-content: space-between; + font-size: 28rpx; + + .iconfont { + color: #e93323; + font-size: 40rpx; + } + + .selectList_area_item_name { + flex: 0.7; + } + } + } + + .handle { + height: 126rpx; + + &_button { + width: 690rpx; + height: 86rpx; + background: #e93323; + border-radius: 43rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 32rpx; + color: #fff; + } + } + } + } + \ No newline at end of file diff --git a/pages/supply_chains/supply_chains.vue b/pages/supply_chains/supply_chains.vue index 3035111..f0e937b 100644 --- a/pages/supply_chains/supply_chains.vue +++ b/pages/supply_chains/supply_chains.vue @@ -119,25 +119,29 @@ getArticleList(19).then(res => { this.recoList = res.data.list }) - console.log("位置", JSON.parse(this.location)); - const LOCA = JSON.parse(this.location) - this.street_id = LOCA.address_reference.town.id - this.getCloudShopMerId(this.street_id) - this.town = LOCA.address_component.street ?? '' + this.getTownAndStoreId() }, onShow() {}, computed: mapGetters(['location']), watch: { - location(newVal, oldVal) { - console.log('newVal', newVal); - return newVal + location: { + handler(newVal, oldVal) { + this.street_id = newVal.address_reference.town.id + this.getCloudShopMerId(this.street_id) + this.town = newVal.address_component.street ?? '' + }, + immediate: true } }, methods: { + getTownAndStoreId() { + const LOCA = JSON.parse(this.location) + this.street_id = LOCA.address_reference.town.id + this.getCloudShopMerId(this.street_id) + this.town = LOCA.address_component.street ?? '' + }, selectPlce(e) { - console.log("e", e); this.street_id = e.value[1].code - this.store_id = e.value[1].id this.town = e.value[1].name this.getCloudShopMerId(e.value[1].code) }, diff --git a/store/modules/app.js b/store/modules/app.js index 790547e..41f744a 100644 --- a/store/modules/app.js +++ b/store/modules/app.js @@ -7,17 +7,10 @@ // +---------------------------------------------------------------------- // | Author: CRMEB Team // +---------------------------------------------------------------------- -import { - getUserInfo -} from "../../api/user.js"; -import { - LOGIN_STATUS, - UID -} from '../../config/cache'; +import { getUserInfo } from "../../api/user.js"; +import { LOGIN_STATUS, UID } from '../../config/cache'; import Cache from '../../utils/cache'; -import { - USER_INFO -} from '../../config/cache'; +import { USER_INFO } from '../../config/cache'; const state = { location: Cache.get('LOCATION_DATA') || {}, @@ -36,7 +29,7 @@ const state = { const mutations = { setLocation(state, data) { - state.loca = data + state.location = data Cache.set('LOCATION_DATA', data); }, LOGIN(state, opt) {