dev #5

Merged
mkm merged 26 commits from dev into master 2024-12-30 16:22:20 +08:00
3 changed files with 33 additions and 23 deletions
Showing only changes of commit 3dd2ed5777 - Show all commits

View File

@ -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:

View File

@ -23,7 +23,7 @@
<template #left> <template #left>
<view class="store-info"> <view class="store-info">
<view style="display: flex;font-size: 30rpx;font-weight: bold;"> <view style="display: flex;font-size: 30rpx;font-weight: bold;">
<!-- <text v-if=" vipList.includes(userStore.userInfo.user_ship) || shareInfo.store_id" <!-- <text v-if=" vipList.includes(userStore.userInfo.user_ship) || shareInfo.store_id"
style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"> style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
<text v-if="vipList.includes(userStore.userInfo.user_ship)"> <text v-if="vipList.includes(userStore.userInfo.user_ship)">
{{ (userStore.userInfo.real_name || userStore.userInfo.nickname) + '的个人门店' }}</text> {{ (userStore.userInfo.real_name || userStore.userInfo.nickname) + '的个人门店' }}</text>
@ -32,7 +32,7 @@
</text> --> </text> -->
<text v-if="shareInfo.uid" <text v-if="shareInfo.uid"
style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"> style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
{{shareInfo.real_name}} {{shareInfo.real_name}}
</text> </text>
<text v-else <text v-else
style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{ style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{
@ -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 => {
uni.setStorageSync("STORE_INFO", JSON.stringify(res.data));
let data = res.data;
for (let key in data) {
STORE_INFO[key] = data[key]
}
})
} }
getStoreInfo().then(res => { getgoodClassList(0);
uni.setStorageSync("STORE_INFO", JSON.stringify(res.data)); getGoodList();
let data = res.data;
for (let key in data) {
STORE_INFO[key] = data[key]
}
getgoodClassList(0);
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) + '',
@ -655,7 +656,7 @@
} }
const settleAccounts = () => { const settleAccounts = () => {
if (+cartInfo.value.pay_price < 500 && userStore.userInfo.user_ship==0 ) return showOverlay.value = true; if (+cartInfo.value.pay_price < 500 && userStore.userInfo.user_ship == 0) return showOverlay.value = true;
uni.navigateTo({ uni.navigateTo({
url: '/pagesOrder/settle/settle' url: '/pagesOrder/settle/settle'
}) })
@ -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()

View File

@ -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