|
@@ -9,7 +9,7 @@
|
|
|
<!-- 搜素栏 -->
|
|
|
<view class="search flex">
|
|
|
<image src="../../static/icon/address.png" class="address"></image>
|
|
|
- <view class="shop-name clamp" @click.stop="nav('/pages/shoping/list')">{{ storeInfo.name }}</view>
|
|
|
+ <view class="shop-name clamp" @click.stop="canChange == 1?nav('/pages/shoping/list'):''">{{ storeInfo.name }}</view>
|
|
|
<view class="input-box flex" @click.stop="clickSearch">
|
|
|
<view class=" input-content flex">
|
|
|
<view class="iconfont iconsearch"></view>
|
|
@@ -32,7 +32,7 @@
|
|
|
<text>全部分类</text>
|
|
|
</view>
|
|
|
</navigator>
|
|
|
- <navigator url="/pages/shoping/list">
|
|
|
+ <navigator :url="canChange==0 ? '/pages/shoping/list?type=5': ''">
|
|
|
<view class="cate-item">
|
|
|
<image src="/static/icon/in1.png"></image>
|
|
|
<text>附近门店</text>
|
|
@@ -131,7 +131,7 @@
|
|
|
<script>
|
|
|
import seckill from './seckill';
|
|
|
import { openMap } from '@/utils/rocessor.js';
|
|
|
-import { loadIndexs, store_list } from '@/api/index.js';
|
|
|
+import { loadIndexs, store_list, getStore } from '@/api/index.js';
|
|
|
import { interceptor } from '@/utils/loginUtils';
|
|
|
import { userinfo } from '@/api/user.js';
|
|
|
import { mapState, mapMutations } from 'vuex';
|
|
@@ -168,7 +168,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapState(['loginInterceptor', 'storeInfo']),
|
|
|
+ ...mapState(['loginInterceptor', 'storeInfo','canChange']),
|
|
|
...mapState('user', ['hasLogin', 'userInfo'])
|
|
|
},
|
|
|
onLoad(option) {
|
|
@@ -177,15 +177,26 @@ export default {
|
|
|
if (!agree) {
|
|
|
uni.redirectTo({ url: '/pages/contract/start' });
|
|
|
}
|
|
|
-
|
|
|
- if (option.spread) {
|
|
|
+
|
|
|
+ if (option.spread) {
|
|
|
// 存储邀请人
|
|
|
uni.setStorage({
|
|
|
key: 'spread',
|
|
|
data: option.spread
|
|
|
});
|
|
|
}
|
|
|
- this.getaddress();
|
|
|
+ if(option.store_id) {
|
|
|
+ getStore({
|
|
|
+ id: option.store_id
|
|
|
+ }).then(({data}) => {
|
|
|
+ this.setStoreInfo(data)
|
|
|
+ console.log(data)
|
|
|
+ })
|
|
|
+ this.setCanChange()
|
|
|
+ }else {
|
|
|
+ this.getaddress();
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
onShow() {
|
|
|
// 判断是否强制登录
|
|
@@ -226,7 +237,7 @@ export default {
|
|
|
},
|
|
|
// #endif
|
|
|
methods: {
|
|
|
- ...mapMutations(['setLat', 'setLon', 'setStoreInfo']),
|
|
|
+ ...mapMutations(['setLat', 'setLon', 'setStoreInfo','setCanChange']),
|
|
|
//获取定位信息
|
|
|
getaddress() {
|
|
|
console.log('dizhi+++++++++++');
|