From e2ae755323783ebd33dfb53aaf70f4f7099533c0 Mon Sep 17 00:00:00 2001
From: mkm <727897186@qq.com>
Date: Sat, 13 Jul 2024 18:00:01 +0800
Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=95=86?=
=?UTF-8?q?=E5=93=81=E5=88=97=E8=A1=A8=E5=92=8C=E8=8E=B7=E5=8F=96=E4=BD=8D?=
=?UTF-8?q?=E7=BD=AE=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/good.js | 4 +
pageQuota/vipUser/index.vue | 7 +-
pages.json | 8 ++
pages/my/my.vue | 1 +
pages/product/product.vue | 199 +++++++++++++++++++++++++++++++++++
pagesOrder/settle/settle.vue | 41 +++++---
6 files changed, 243 insertions(+), 17 deletions(-)
create mode 100644 pages/product/product.vue
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();
})
--
2.40.1
From 91bdf533489611366a7a10766569fbbc10c8c3a3 Mon Sep 17 00:00:00 2001
From: mkm <727897186@qq.com>
Date: Fri, 19 Jul 2024 16:51:39 +0800
Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=BD=8D?=
=?UTF-8?q?=E7=BD=AE=E6=8E=88=E6=9D=83=E5=92=8C=E8=8E=B7=E5=8F=96=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesOrder/settle/settle.vue | 94 +++++++++++++++++++++++++++++++-----
1 file changed, 82 insertions(+), 12 deletions(-)
diff --git a/pagesOrder/settle/settle.vue b/pagesOrder/settle/settle.vue
index 7f88f92..451f4fc 100644
--- a/pagesOrder/settle/settle.vue
+++ b/pagesOrder/settle/settle.vue
@@ -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: ""
@@ -561,21 +576,76 @@
})
const getLocation = () => {
- uni.getLocation({
- type: "gcj02",
+ uni.getSetting({
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 (res.authSetting["scope.userLocation"] == false) {
+ LocationShowOpen()
+ } else {
+ opensettings(true)
+ }
+ }
})
}
+ 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();
})
--
2.40.1
From 20013124b9720ba74e1b762a9cdab25230e7d430 Mon Sep 17 00:00:00 2001
From: mkm <727897186@qq.com>
Date: Mon, 22 Jul 2024 17:59:27 +0800
Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E9=97=A8?=
=?UTF-8?q?=E5=BA=97=E6=89=8B=E6=9C=BA=E5=8F=B7=E4=BF=9D=E7=95=99=E4=B8=80?=
=?UTF-8?q?=E5=A4=A9=E5=92=8C=E6=A0=B8=E9=94=80=E7=A0=81=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BC=98=E5=8C=96=E4=BD=8D=E7=BD=AE?=
=?UTF-8?q?=E6=8E=88=E6=9D=83=E8=8E=B7=E5=8F=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pageQuota/vipUser/index.vue | 2 +-
pagesOrder/detail/detail.vue | 2 +-
pagesOrder/order/order.vue | 2 +-
pagesOrder/settle/settle.vue | 27 ++++++++++++++++-----------
4 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/pageQuota/vipUser/index.vue b/pageQuota/vipUser/index.vue
index 18d87d9..6705cbf 100644
--- a/pageQuota/vipUser/index.vue
+++ b/pageQuota/vipUser/index.vue
@@ -422,7 +422,7 @@
// 门店手机号保留一天
const setPhoneOneDay = () => {
- if (uni.getStorageSync('VIP_PHONE')) return;
+ // if (uni.getStorageSync('VIP_PHONE')) return;
const currentDate = new Date();
const nextDay = new Date(currentDate);
nextDay.setDate(currentDate.getDate() + 1);
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 451f4fc..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) }}
@@ -562,20 +562,23 @@
}
onLoad(options => {
- if (uni.getStorageSync('location')) {
- try {
- location = JSON.parse(uni.getStorageSync('location'))
- checkOrder();
- } catch (e) {
- getLocation()
- }
-
- } else {
+ // 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) {
@@ -585,6 +588,8 @@
}
}
})
+ // #endif
+
}
const LocationShowOpen = () => {
LocationShow.value = true;
--
2.40.1