From 35da1d29c4f1a56565f21349b7330b575fa6ef98 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Wed, 30 Aug 2023 10:00:36 +0800 Subject: [PATCH] 拼团参团优化 隐私安全的优化 --- packageA/pages/serviceCard_pd/team_show/team_show.js | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- packageA/pages/serviceCard_pd/team_show/team_show.json | 3 ++- packageA/pages/serviceCard_pd/team_show/team_show.wxml | 37 ++++++++++++++++++++----------------- pages/team/team_show/team_show.js | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- pages/team/team_show/team_show.json | 3 ++- pages/team/team_show/team_show.wxml | 3 +++ 6 files changed, 120 insertions(+), 23 deletions(-) diff --git a/packageA/pages/serviceCard_pd/team_show/team_show.js b/packageA/pages/serviceCard_pd/team_show/team_show.js index e2f1254..84d9943 100644 --- a/packageA/pages/serviceCard_pd/team_show/team_show.js +++ b/packageA/pages/serviceCard_pd/team_show/team_show.js @@ -140,7 +140,13 @@ Page({ //显示加载 onShow:function(){ - getApp().check_can_share(); + //-- 看一下隐私政策要不要显示 -- + var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id + if (privacy_pop) { + privacy_pop.check_pri_show(); + } + + getApp().check_can_share(); var tg_id = this.data.tg_id,th=this; this.init(tg_id); }, @@ -1615,7 +1621,46 @@ Page({ go_to:function (e) { var url=e.currentTarget.dataset.url; getApp().goto(url); - } + }, + + //-- 弹出框的同意的优化,重新获取定位 --- + agree_pri:function (){ + var th=this; + var bconfig = th.data.bconfig; + if (bconfig && bconfig.is_sort_storage) { + wx.getLocation({ + type: 'gcj02', + success: function (res) { + th.data.lat = res.latitude; + th.data.lon = res.longitude; + th.data.is_get_local_ok = 1; + th.setData({ + is_gps: 1 + }); + //th.onShow(); + th.get_sto(); + }, + fail: function (res) { + //th.onShow(); + th.data.is_get_local_ok = 1; + th.get_sto(); + if (res.errCode == 2) { + th.setData({ + is_gps: 0 + }); + if (th.data.is_gps == 0) { + getApp().confirmBox("请开启GPS定位", null, 25000, !1); + } + } else { + th.setData({ + is_gps: "3" + }); + } + + } + }) + } + }, diff --git a/packageA/pages/serviceCard_pd/team_show/team_show.json b/packageA/pages/serviceCard_pd/team_show/team_show.json index 1f536c0..199474a 100644 --- a/packageA/pages/serviceCard_pd/team_show/team_show.json +++ b/packageA/pages/serviceCard_pd/team_show/team_show.json @@ -7,6 +7,7 @@ "backgroundColor": "#eeeeee" }, "usingComponents": { - "warn": "/components/long_warn/long_warn" + "warn": "/components/long_warn/long_warn", + "privacy_pop": "/components/privacy_pop/privacy_pop" } } \ No newline at end of file diff --git a/packageA/pages/serviceCard_pd/team_show/team_show.wxml b/packageA/pages/serviceCard_pd/team_show/team_show.wxml index e473387..abb7500 100644 --- a/packageA/pages/serviceCard_pd/team_show/team_show.wxml +++ b/packageA/pages/serviceCard_pd/team_show/team_show.wxml @@ -1,3 +1,6 @@ + + + @@ -11,13 +14,13 @@ - {{goods.serviceName}} + {{goods.serviceName}} - {{teamlist.price}} + {{teamlist.price}} 零售价¥{{goods.show_price}} @@ -62,7 +65,7 @@ - 团长 + 团长 @@ -84,10 +87,10 @@ 剩余 - {{obj.day}} : - {{obj.hou}} : - {{obj.min}} : - {{obj.sec}} 结束 + {{obj.day}} : + {{obj.hou}} : + {{obj.min}} : + {{obj.sec}} 结束 @@ -131,21 +134,21 @@ - 展开拼团列表 + 展开拼团列表 - + - 收起拼团列表 + 收起拼团列表 - {{item.nickname}} + {{item.nickname}} {{item.add_time_date}} 开团 {{item.add_time_date}} 参团 @@ -157,7 +160,7 @@ - 大家都在团 + 大家都在团 @@ -171,7 +174,7 @@ ¥{{item.price}} {{item.ct_num}}人 - 参团 + 参团 @@ -194,7 +197,7 @@ {{goods.serviceName}} - ¥{{teamlist.kttype==3?teamlist.yf_price:teamlist.price}} + ¥{{teamlist.kttype==3?teamlist.yf_price:teamlist.price}} @@ -300,7 +303,7 @@ - + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}} @@ -360,7 +363,7 @@ - + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} @@ -377,7 +380,7 @@ 确定 - 设为默认 + 设为默认 diff --git a/pages/team/team_show/team_show.js b/pages/team/team_show/team_show.js index 9202e8f..7068b32 100644 --- a/pages/team/team_show/team_show.js +++ b/pages/team/team_show/team_show.js @@ -144,7 +144,13 @@ Page({ //显示加载 onShow:function(){ - getApp().check_can_share(); + //-- 看一下隐私政策要不要显示 -- + var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id + if (privacy_pop) { + privacy_pop.check_pri_show(); + } + + getApp().check_can_share(); var tg_id = this.data.tg_id,th=this; this.init(tg_id); }, @@ -1633,7 +1639,45 @@ Page({ }) }, - + + //-- 弹出框的同意的优化,重新获取定位 --- + agree_pri:function (){ + var th=this; + var bconfig = th.data.bconfig; + if (bconfig && bconfig.is_sort_storage) { + wx.getLocation({ + type: 'gcj02', + success: function (res) { + th.data.lat = res.latitude; + th.data.lon = res.longitude; + th.data.is_get_local_ok = 1; + th.setData({ + is_gps: 1 + }); + //th.onShow(); + th.get_sto(); + }, + fail: function (res) { + //th.onShow(); + th.data.is_get_local_ok = 1; + th.get_sto(); + if (res.errCode == 2) { + th.setData({ + is_gps: 0 + }); + if (th.data.is_gps == 0) { + getApp().confirmBox("请开启GPS定位", null, 25000, !1); + } + } else { + th.setData({ + is_gps: "3" + }); + } + + } + }) + } + }, diff --git a/pages/team/team_show/team_show.json b/pages/team/team_show/team_show.json index 1f536c0..199474a 100644 --- a/pages/team/team_show/team_show.json +++ b/pages/team/team_show/team_show.json @@ -7,6 +7,7 @@ "backgroundColor": "#eeeeee" }, "usingComponents": { - "warn": "/components/long_warn/long_warn" + "warn": "/components/long_warn/long_warn", + "privacy_pop": "/components/privacy_pop/privacy_pop" } } \ No newline at end of file diff --git a/pages/team/team_show/team_show.wxml b/pages/team/team_show/team_show.wxml index b5bc562..bdee04a 100644 --- a/pages/team/team_show/team_show.wxml +++ b/pages/team/team_show/team_show.wxml @@ -1,3 +1,6 @@ + + + -- libgit2 0.21.4