diff --git a/api/good.js b/api/good.js index a61c66a..fa7a5df 100644 --- a/api/good.js +++ b/api/good.js @@ -6,4 +6,8 @@ export const goodListApi = (data) => { export const goodClassListApi = (data) => { return request.get('/cate/cate/lists', data); +} + +export const storeProductListApi = (data) => { + return request.get('/product/product/store_lists', data); } \ No newline at end of file diff --git a/pageQuota/vipUser/index.vue b/pageQuota/vipUser/index.vue index d710b7e..6705cbf 100644 --- a/pageQuota/vipUser/index.vue +++ b/pageQuota/vipUser/index.vue @@ -318,6 +318,11 @@ {{ popPhone }} + + + + + \ No newline at end of file diff --git a/pagesOrder/detail/detail.vue b/pagesOrder/detail/detail.vue index 03d12e5..d48143b 100644 --- a/pagesOrder/detail/detail.vue +++ b/pagesOrder/detail/detail.vue @@ -105,7 +105,7 @@ - + 核销码 {{datas.verify_code}} diff --git a/pagesOrder/order/order.vue b/pagesOrder/order/order.vue index 5bac574..437103f 100644 --- a/pagesOrder/order/order.vue +++ b/pagesOrder/order/order.vue @@ -107,7 +107,7 @@ - + 核销码 {{orderData.verify_code}} diff --git a/pagesOrder/settle/settle.vue b/pagesOrder/settle/settle.vue index 8ab6b1b..315e0b0 100644 --- a/pagesOrder/settle/settle.vue +++ b/pagesOrder/settle/settle.vue @@ -98,7 +98,7 @@ 优惠减免 - {{ c_price(orderInfo.frozen_money, 0) }}.{{ c_price(orderInfo.frozen_money, 1) }} + ¥{{ c_price(orderInfo.frozen_money, 0) }}.{{ c_price(orderInfo.frozen_money, 1) }} @@ -209,6 +209,20 @@ + + + + + + + + + + + + + + @@ -249,6 +263,7 @@ const cartStore = useCartStore(); const reservation_time = ref('') const is_storage = ref(0) + const LocationShow = ref(false) const formData = ref({ remark: "" @@ -547,26 +562,95 @@ } onLoad(options => { - if (uni.getStorageSync('location')) { - location = JSON.parse(uni.getStorageSync('location')) - checkOrder(); - } else { - uni.getLocation({ - type: "gcj02", - success(res) { - location.lat = res.latitude; - location.long = res.longitude; - uni.setStorageSync('location', JSON.stringify(location)) - checkOrder(); - }, - fail() { - uni.$u.toast('获取位置当前失败,为你推荐当前门店') - checkOrder(STORE_INFO.id); - }, - complete() {} - }) - } + // if (uni.getStorageSync('location')) { + // try { + // location = JSON.parse(uni.getStorageSync('location')) + // checkOrder(); + // } catch (e) { + // getLocation() + // } + // } else { + getLocation() + // } }) + + const getLocation = () => { + // #ifdef H5 + userLocationfalse() + // #endif + // #ifdef MP-WEIXIN + uni.getSetting({ + success(res) { + if (res.authSetting["scope.userLocation"] == false) { + LocationShowOpen() + } else { + opensettings(true) + } + } + }) + // #endif + + } + const LocationShowOpen = () => { + LocationShow.value = true; + } + const userLocationfalse = () => { + LocationShow.value = false; + uni.$u.toast('获取位置当前失败,为你推荐当前门店') + checkOrder(STORE_INFO.id); + } + const opensettings = (a = false) => { + if (a == false) { + uni.openSetting({ + success(res) { + LocationShow.value = false; + if (res.authSetting["scope.userLocation"] == true) { + uni.authorize({ + scope: 'scope.userLocation', + success() { + uni.getLocation({ + type: "gcj02", + success(res) { + location.lat = res.latitude; + location.long = res.longitude; + uni.setStorageSync('location', JSON.stringify( + location)) + checkOrder(); + }, + }) + }, + fail(e) { + userLocationfalse() + }, + }) + } + }, + fail(e) { + userLocationfalse() + } + }); + } else { + uni.authorize({ + scope: 'scope.userLocation', + success() { + uni.getLocation({ + type: "gcj02", + success(res) { + location.lat = res.latitude; + location.long = res.longitude; + uni.setStorageSync('location', JSON.stringify(location)) + checkOrder(); + }, + }) + }, + fail(e) { + userLocationfalse() + }, + }) + + } + + } onShow(() => { getAddressList(); })