diff --git a/components/privacy_pop/privacy_pop.js b/components/privacy_pop/privacy_pop.js index 665b0a8..1ec796c 100644 --- a/components/privacy_pop/privacy_pop.js +++ b/components/privacy_pop/privacy_pop.js @@ -13,6 +13,7 @@ Component({ this.setData({store:e}) }) }, + methods: { //判断用户有没有同意安全隐私 check_pri_show(){ @@ -25,6 +26,9 @@ Component({ show_pri: 1 }) }else{ + this.setData({ + show_pri: 0 + }) this.triggerEvent('agree_pri');// 调用同意的函数 } } diff --git a/packageA/pages/goodsInfo/goodsInfo.js b/packageA/pages/goodsInfo/goodsInfo.js index f25da78..4cb8a4c 100644 --- a/packageA/pages/goodsInfo/goodsInfo.js +++ b/packageA/pages/goodsInfo/goodsInfo.js @@ -560,6 +560,12 @@ Page({ // gid 在onload阶段已经保存在this.data中 onShow: function() { + //-- 看一下隐私政策要不要显示 -- + var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id + if (privacy_pop) { + privacy_pop.check_pri_show(); + } + getApp().check_can_share(); var that=this;var th=this; @@ -4047,22 +4053,43 @@ Page({ hiddenCS: true, }); }, - - - - - - - - - + //-- 弹出框的同意的优化,重新获取定位 --- + 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.get_sto(); + }, + fail: function (res) { + 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/goodsInfo/goodsInfo.json b/packageA/pages/goodsInfo/goodsInfo.json index d201627..4d70c35 100644 --- a/packageA/pages/goodsInfo/goodsInfo.json +++ b/packageA/pages/goodsInfo/goodsInfo.json @@ -4,6 +4,7 @@ "usingComponents": { "nav_box": "/components/nav_box/nav_box", "warn": "/components/long_warn/long_warn", - "serviceCard_recommend": "/components/serviceCard_list/serviceCard_list" + "serviceCard_recommend": "/components/serviceCard_list/serviceCard_list", + "privacy_pop": "/components/privacy_pop/privacy_pop" } } \ No newline at end of file diff --git a/packageA/pages/goodsInfo/goodsInfo.wxml b/packageA/pages/goodsInfo/goodsInfo.wxml index 431ccb4..d0aa400 100644 --- a/packageA/pages/goodsInfo/goodsInfo.wxml +++ b/packageA/pages/goodsInfo/goodsInfo.wxml @@ -3,6 +3,9 @@ + + + diff --git a/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.js b/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.js index 0ebda43..5778cf0 100644 --- a/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.js +++ b/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.js @@ -554,6 +554,12 @@ Page({ // gid 在onload阶段已经保存在this.data中 onShow: function () { + //-- 看一下隐私政策要不要显示 -- + var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id + if (privacy_pop) { + privacy_pop.check_pri_show(); + } + getApp().check_can_share(this); var that = this; var ee = this, gid = this.data.gid, i = getApp().request; @@ -3885,6 +3891,38 @@ Page({ 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.get_sto(); + }, + fail: function(res) { + + 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/goodsInfo/goodsInfo.json b/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.json index ffdfeb2..b1f6157 100644 --- a/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.json +++ b/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.json @@ -5,6 +5,7 @@ "nav_box": "/components/nav_box/nav_box", "warn": "/components/long_warn/long_warn", "serviceCard_recommend": "/components/serviceCard_list/serviceCard_list", - "share": "/components/share/share" + "share": "/components/share/share", + "privacy_pop": "/components/privacy_pop/privacy_pop" } } \ No newline at end of file diff --git a/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml b/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml index 4e33079..5c2e02c 100644 --- a/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml +++ b/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml @@ -3,6 +3,9 @@ + + + diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js index 4d85d5a..f126775 100644 --- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js +++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js @@ -898,6 +898,12 @@ Page({ //---展示--- onShow: async function () { + //-- 看一下隐私政策要不要显示 -- + var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id + if (privacy_pop) { + privacy_pop.check_pri_show(); + } + //添加购物车的控制要清理0 this.data.adding=0; @@ -7346,7 +7352,40 @@ Page({ break; } } - } + }, + + //-- 弹出框的同意的优化,重新获取定位 --- + 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.get_sto(); + }, + fail: function(res) { + + 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/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.json b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.json index 53c58c3..58bee0f 100644 --- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.json +++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.json @@ -5,6 +5,7 @@ "nav_box": "/components/nav_box/nav_box", "warn": "/components/long_warn/long_warn", "goods_recommend": "/components/goods_list/goods_list", - "share": "/components/share/share" + "share": "/components/share/share", + "privacy_pop": "/components/privacy_pop/privacy_pop" } } \ No newline at end of file diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml index f8fcb1c..a7b3b15 100644 --- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml +++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml @@ -3,6 +3,8 @@ + + diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.js b/packageC/pages/presell/goodsInfo/goodsInfo.js index d6ef67f..3e8cfae 100644 --- a/packageC/pages/presell/goodsInfo/goodsInfo.js +++ b/packageC/pages/presell/goodsInfo/goodsInfo.js @@ -703,6 +703,13 @@ Page({ //---展示--- onShow: function () { + + //-- 看一下隐私政策要不要显示 -- + var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id + if (privacy_pop) { + privacy_pop.check_pri_show(); + } + getApp().check_can_share(this); var goods_list = null, th = this, that = this; @@ -4821,4 +4828,48 @@ 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/packageC/pages/presell/goodsInfo/goodsInfo.json b/packageC/pages/presell/goodsInfo/goodsInfo.json index feb03a7..2bd588d 100644 --- a/packageC/pages/presell/goodsInfo/goodsInfo.json +++ b/packageC/pages/presell/goodsInfo/goodsInfo.json @@ -5,6 +5,7 @@ "nav_box": "/components/nav_box/nav_box", "warn": "/components/long_warn/long_warn", "goods_recommend": "/components/goods_list/goods_list", - "share": "/components/share/share" + "share": "/components/share/share", + "privacy_pop": "/components/privacy_pop/privacy_pop" } } \ No newline at end of file diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.wxml b/packageC/pages/presell/goodsInfo/goodsInfo.wxml index 71b9393..dde2587 100644 --- a/packageC/pages/presell/goodsInfo/goodsInfo.wxml +++ b/packageC/pages/presell/goodsInfo/goodsInfo.wxml @@ -3,6 +3,8 @@ + + diff --git a/pages/cart/cart/cart.js b/pages/cart/cart/cart.js index 37a3917..2204ac4 100644 --- a/pages/cart/cart/cart.js +++ b/pages/cart/cart/cart.js @@ -125,6 +125,13 @@ Page({ }, onShow: function () { + + //-- 看一下隐私政策要不要显示 -- + var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id + if (privacy_pop) { + privacy_pop.check_pri_show(); + } + //每次显示都清空 this.data.in_zhact_gdmap = {}; this.setData({ diff --git a/pages/cart/cart/cart.json b/pages/cart/cart/cart.json index 08f0ff2..0aa5062 100644 --- a/pages/cart/cart/cart.json +++ b/pages/cart/cart/cart.json @@ -3,6 +3,7 @@ "usingComponents": { "warn": "/components/long_warn/long_warn", "goods_recommend":"/components/goods_list/goods_list", - "pro_pop": "/components/promate_pop/promate_pop" + "pro_pop": "/components/promate_pop/promate_pop", + "privacy_pop": "/components/privacy_pop/privacy_pop" } } \ No newline at end of file diff --git a/pages/cart/cart/cart.wxml b/pages/cart/cart/cart.wxml index 4f49c23..f1a1e78 100644 --- a/pages/cart/cart/cart.wxml +++ b/pages/cart/cart/cart.wxml @@ -1,3 +1,5 @@ + + diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 44c188d..e2c0f75 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -921,6 +921,13 @@ Page({ //---展示--- onShow: function () { + + //-- 看一下隐私政策要不要显示 -- + var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id + if (privacy_pop) { + privacy_pop.check_pri_show(); + } + //添加购物车的控制要清理0 this.data.adding=0; @@ -8741,7 +8748,46 @@ Page({ break; } } - } + }, + + //-- 弹出框的同意的优化,重新获取定位 --- + 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" + }); + } + + } + }) + } + }, }) \ No newline at end of file diff --git a/pages/goods/goodsInfo/goodsInfo.json b/pages/goods/goodsInfo/goodsInfo.json index 0fd8f27..8be378d 100644 --- a/pages/goods/goodsInfo/goodsInfo.json +++ b/pages/goods/goodsInfo/goodsInfo.json @@ -6,6 +6,7 @@ "warn": "/components/long_warn/long_warn", "goods_recommend": "/components/goods_list/goods_list", "share": "/components/share/share", - "pro_pop": "/components/promate_pop/promate_pop" + "pro_pop": "/components/promate_pop/promate_pop", + "privacy_pop": "/components/privacy_pop/privacy_pop" } } \ No newline at end of file diff --git a/pages/goods/goodsInfo/goodsInfo.wxml b/pages/goods/goodsInfo/goodsInfo.wxml index 4a8445f..17a87e5 100644 --- a/pages/goods/goodsInfo/goodsInfo.wxml +++ b/pages/goods/goodsInfo/goodsInfo.wxml @@ -1,3 +1,5 @@ + +