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..18d87d9 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/settle/settle.vue b/pagesOrder/settle/settle.vue index 8ab6b1b..7f88f92 100644 --- a/pagesOrder/settle/settle.vue +++ b/pagesOrder/settle/settle.vue @@ -548,25 +548,34 @@ onLoad(options => { if (uni.getStorageSync('location')) { - location = JSON.parse(uni.getStorageSync('location')) - checkOrder(); + try { + location = JSON.parse(uni.getStorageSync('location')) + checkOrder(); + } catch (e) { + getLocation() + } + } 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() {} - }) + getLocation() } }) + + const getLocation = () => { + 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() {} + }) + } onShow(() => { getAddressList(); })