feat: 修改配置文件和页面逻辑,优化门店信息获取功能
This commit is contained in:
parent
d7255d9690
commit
3dd2ed5777
|
@ -17,7 +17,7 @@ switch (env) {
|
||||||
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
|
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
|
||||||
break;
|
break;
|
||||||
case 'local':
|
case 'local':
|
||||||
BASE_URL = 'http://192.168.1.7:8545';
|
BASE_URL = 'http://192.168.1.22:8545';
|
||||||
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
|
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -316,17 +316,17 @@
|
||||||
for (let key in data) {
|
for (let key in data) {
|
||||||
STORE_INFO[key] = data[key]
|
STORE_INFO[key] = data[key]
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
getStoreInfo().then(res => {
|
getStoreInfo().then(res => {
|
||||||
uni.setStorageSync("STORE_INFO", JSON.stringify(res.data));
|
uni.setStorageSync("STORE_INFO", JSON.stringify(res.data));
|
||||||
let data = res.data;
|
let data = res.data;
|
||||||
for (let key in data) {
|
for (let key in data) {
|
||||||
STORE_INFO[key] = data[key]
|
STORE_INFO[key] = data[key]
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
getgoodClassList(0);
|
getgoodClassList(0);
|
||||||
getGoodList();
|
getGoodList();
|
||||||
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -334,7 +334,8 @@
|
||||||
onShareAppMessage(() => {
|
onShareAppMessage(() => {
|
||||||
let shareStr = '?id=' + STORE_INFO.id;
|
let shareStr = '?id=' + STORE_INFO.id;
|
||||||
if (vipList.includes(userStore.userInfo.user_ship)) {
|
if (vipList.includes(userStore.userInfo.user_ship)) {
|
||||||
shareStr = shareStr + '&spread_uid=' + userStore.userInfo.id + '&real_name=' + (userStore.userInfo.share_name)
|
shareStr = shareStr + '&spread_uid=' + userStore.userInfo.id + '&real_name=' + (userStore.userInfo
|
||||||
|
.share_name)
|
||||||
}
|
}
|
||||||
let shareInfo = {
|
let shareInfo = {
|
||||||
// title: (userStore.userInfo.real_name || userStore.userInfo.nickname) + '的供销个人门店',
|
// title: (userStore.userInfo.real_name || userStore.userInfo.nickname) + '的供销个人门店',
|
||||||
|
@ -699,12 +700,11 @@
|
||||||
store_id: ''
|
store_id: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
const getShareInfo = () => {
|
// const getShareInfo = () => {
|
||||||
if (uni.getStorageSync('SHARE_INFO')) {
|
// if (uni.getStorageSync('SHARE_INFO')) {
|
||||||
shareInfo.value = (uni.getStorageSync('SHARE_INFO'))
|
// shareInfo.value = (uni.getStorageSync('SHARE_INFO'))
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
getShareInfo()
|
|
||||||
|
|
||||||
onLoad(async (opt) => {
|
onLoad(async (opt) => {
|
||||||
console.log('opt', opt)
|
console.log('opt', opt)
|
||||||
|
@ -726,6 +726,8 @@
|
||||||
shareInfo.value.store_id = opt.id;
|
shareInfo.value.store_id = opt.id;
|
||||||
uni.setStorageSync('SHARE_INFO', shareInfo.value);
|
uni.setStorageSync('SHARE_INFO', shareInfo.value);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
uni.removeStorageSync('SHARE_INFO')
|
||||||
}
|
}
|
||||||
|
|
||||||
getStoreInfoFn()
|
getStoreInfoFn()
|
||||||
|
|
|
@ -117,6 +117,8 @@
|
||||||
<up-skeleton :loading="true" :animate="true"></up-skeleton>
|
<up-skeleton :loading="true" :animate="true"></up-skeleton>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<up-alert v-if="timeContent!=''" type = "error" :description = "timeContent"></up-alert>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="m-card order-remark">
|
<view class="m-card order-remark">
|
||||||
|
@ -207,6 +209,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
<up-modal :show="timeShow" :content='timeContent' @confirm="timeShow=false"></up-modal>
|
||||||
|
|
||||||
<addressPopup ref="addressRef" :show="showAddress" :list="addressList" @close="showAddress = false"
|
<addressPopup ref="addressRef" :show="showAddress" :list="addressList" @close="showAddress = false"
|
||||||
@change="changeAddress" />
|
@change="changeAddress" />
|
||||||
|
@ -277,7 +280,8 @@
|
||||||
const reservation_time = ref('')
|
const reservation_time = ref('')
|
||||||
const is_storage = ref(0)
|
const is_storage = ref(0)
|
||||||
const LocationShow = ref(false)
|
const LocationShow = ref(false)
|
||||||
|
const timeShow=ref(false)
|
||||||
|
const timeContent=ref('')
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
remark: ""
|
remark: ""
|
||||||
})
|
})
|
||||||
|
@ -419,6 +423,10 @@
|
||||||
cartList.value = res.data.cart_list;
|
cartList.value = res.data.cart_list;
|
||||||
orderInfo.value = res.data.order;
|
orderInfo.value = res.data.order;
|
||||||
shop_Info.value = res.data.shopInfo || {}
|
shop_Info.value = res.data.shopInfo || {}
|
||||||
|
if(res.data.alert!=''){
|
||||||
|
timeShow.value=true
|
||||||
|
timeContent.value=res.data.alert
|
||||||
|
}
|
||||||
checkInventoryApi({
|
checkInventoryApi({
|
||||||
cart_id: cartStore.cartList,
|
cart_id: cartStore.cartList,
|
||||||
store_id: store_id || res.data.shopInfo.id
|
store_id: store_id || res.data.shopInfo.id
|
||||||
|
|
Loading…
Reference in New Issue