Commit 35da1d29c4f1a56565f21349b7330b575fa6ef98

Authored by yvan.ni
1 parent 00ddf4f0

拼团参团优化 隐私安全的优化

packageA/pages/serviceCard_pd/team_show/team_show.js
@@ -140,7 +140,13 @@ Page({ @@ -140,7 +140,13 @@ Page({
140 140
141 //显示加载 141 //显示加载
142 onShow:function(){ 142 onShow:function(){
143 - getApp().check_can_share(); 143 + //-- 看一下隐私政策要不要显示 --
  144 + var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id
  145 + if (privacy_pop) {
  146 + privacy_pop.check_pri_show();
  147 + }
  148 +
  149 + getApp().check_can_share();
144 var tg_id = this.data.tg_id,th=this; 150 var tg_id = this.data.tg_id,th=this;
145 this.init(tg_id); 151 this.init(tg_id);
146 }, 152 },
@@ -1615,7 +1621,46 @@ Page({ @@ -1615,7 +1621,46 @@ Page({
1615 go_to:function (e) { 1621 go_to:function (e) {
1616 var url=e.currentTarget.dataset.url; 1622 var url=e.currentTarget.dataset.url;
1617 getApp().goto(url); 1623 getApp().goto(url);
1618 - } 1624 + },
  1625 +
  1626 + //-- 弹出框的同意的优化,重新获取定位 ---
  1627 + agree_pri:function (){
  1628 + var th=this;
  1629 + var bconfig = th.data.bconfig;
  1630 + if (bconfig && bconfig.is_sort_storage) {
  1631 + wx.getLocation({
  1632 + type: 'gcj02',
  1633 + success: function (res) {
  1634 + th.data.lat = res.latitude;
  1635 + th.data.lon = res.longitude;
  1636 + th.data.is_get_local_ok = 1;
  1637 + th.setData({
  1638 + is_gps: 1
  1639 + });
  1640 + //th.onShow();
  1641 + th.get_sto();
  1642 + },
  1643 + fail: function (res) {
  1644 + //th.onShow();
  1645 + th.data.is_get_local_ok = 1;
  1646 + th.get_sto();
  1647 + if (res.errCode == 2) {
  1648 + th.setData({
  1649 + is_gps: 0
  1650 + });
  1651 + if (th.data.is_gps == 0) {
  1652 + getApp().confirmBox("请开启GPS定位", null, 25000, !1);
  1653 + }
  1654 + } else {
  1655 + th.setData({
  1656 + is_gps: "3"
  1657 + });
  1658 + }
  1659 +
  1660 + }
  1661 + })
  1662 + }
  1663 + },
1619 1664
1620 1665
1621 1666
packageA/pages/serviceCard_pd/team_show/team_show.json
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 "backgroundColor": "#eeeeee" 7 "backgroundColor": "#eeeeee"
8 }, 8 },
9 "usingComponents": { 9 "usingComponents": {
10 - "warn": "/components/long_warn/long_warn" 10 + "warn": "/components/long_warn/long_warn",
  11 + "privacy_pop": "/components/privacy_pop/privacy_pop"
11 } 12 }
12 } 13 }
13 \ No newline at end of file 14 \ No newline at end of file
packageA/pages/serviceCard_pd/team_show/team_show.wxml
  1 +<!-- 判断隐私是不是显示 -->
  2 +<privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop>
  3 +
1 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> 4 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
2 <!---- //文字"--> 5 <!---- //文字"-->
3 <view wx:if="{{is_show}}"> 6 <view wx:if="{{is_show}}">
@@ -11,13 +14,13 @@ @@ -11,13 +14,13 @@
11 <view class='cenrt'> 14 <view class='cenrt'>
12 15
13 <view class='xc-goods-details ellipsis-2 fs28'> 16 <view class='xc-goods-details ellipsis-2 fs28'>
14 - <span>{{goods.serviceName}}</span> 17 + <text>{{goods.serviceName}}</text>
15 </view> 18 </view>
16 </view> 19 </view>
17 <view class='cenrcen flex-vertical-between'> 20 <view class='cenrcen flex-vertical-between'>
18 <view> 21 <view>
19 <view class="fs40 xc-wc" style='font-size:40rpx'> 22 <view class="fs40 xc-wc" style='font-size:40rpx'>
20 - <span class="fs28" style="font-weight:500;">¥</span>{{teamlist.price}}</view> 23 + <text class="fs28" style="font-weight:500;">¥</text>{{teamlist.price}}</view>
21 <view class="fs22 word-line xc-wc"> 24 <view class="fs22 word-line xc-wc">
22 零售价¥{{goods.show_price}} 25 零售价¥{{goods.show_price}}
23 </view> 26 </view>
@@ -62,7 +65,7 @@ @@ -62,7 +65,7 @@
62 <view class='bodyimg flex-level' wx:for="{{ordertx2}}" wx:key> 65 <view class='bodyimg flex-level' wx:for="{{ordertx2}}" wx:key>
63 <view class='d'> 66 <view class='d'>
64 <image src='{{item.head_pic}}'></image> 67 <image src='{{item.head_pic}}'></image>
65 - <span wx:if="{{item.is_pt_tz==1}}">团长</span> 68 + <text wx:if="{{item.is_pt_tz==1}}">团长</text>
66 </view> 69 </view>
67 </view> 70 </view>
68 <view class='d' wx:for="{{sf_arr}}"> 71 <view class='d' wx:for="{{sf_arr}}">
@@ -84,10 +87,10 @@ @@ -84,10 +87,10 @@
84 <!--许程 <view class='bodytimecen' wx:if='{{obj}}'> --> 87 <!--许程 <view class='bodytimecen' wx:if='{{obj}}'> -->
85 <view class='bodytimecen'> 88 <view class='bodytimecen'>
86 剩余 89 剩余
87 - <span wx:if="{{obj.day!=0}}"> {{obj.day}} </span>:  
88 - <span> {{obj.hou}} </span>:  
89 - <span> {{obj.min}} </span>:  
90 - <span> {{obj.sec}} </span>结束 90 + <text wx:if="{{obj.day!=0}}"> {{obj.day}} </text>:
  91 + <text> {{obj.hou}} </text>:
  92 + <text> {{obj.min}} </text>:
  93 + <text> {{obj.sec}} </text>结束
91 </view> 94 </view>
92 95
93 96
@@ -131,21 +134,21 @@ @@ -131,21 +134,21 @@
131 <view class='mck'> 134 <view class='mck'>
132 <view class='bodyfoot'> 135 <view class='bodyfoot'>
133 <view class='bodyselect' wx:if="{{zk}}" bindtap='czk'> 136 <view class='bodyselect' wx:if="{{zk}}" bindtap='czk'>
134 - <span>展开拼团列表 137 + <text>展开拼团列表
135 <view class='down-arrow'></view> 138 <view class='down-arrow'></view>
136 - </span> 139 + </text>
137 </view> 140 </view>
138 <!----收起拼团列表----> 141 <!----收起拼团列表---->
139 <view class='zhangxi' wx:if="{{hiddenName}}"> 142 <view class='zhangxi' wx:if="{{hiddenName}}">
140 143
141 - <view class='zspan' bindtap='click'>收起拼团列表 144 + <view class='ztext' bindtap='click'>收起拼团列表
142 <view class='down-arrow1'></view> 145 <view class='down-arrow1'></view>
143 </view> 146 </view>
144 147
145 <view class="ia" wx:for="{{ordertx}}" wx:for-index="ky"> 148 <view class="ia" wx:for="{{ordertx}}" wx:for-index="ky">
146 <view class='img'> 149 <view class='img'>
147 <image src='{{item.head_pic}}'></image> 150 <image src='{{item.head_pic}}'></image>
148 - <span>{{item.nickname}}</span> 151 + <text>{{item.nickname}}</text>
149 </view> 152 </view>
150 <view class='zssj' wx:if="{{ky==0}}">{{item.add_time_date}} 开团</view> 153 <view class='zssj' wx:if="{{ky==0}}">{{item.add_time_date}} 开团</view>
151 <view class='zssj' wx:else>{{item.add_time_date}} 参团</view> 154 <view class='zssj' wx:else>{{item.add_time_date}} 参团</view>
@@ -157,7 +160,7 @@ @@ -157,7 +160,7 @@
157 <!--大家都在团--> 160 <!--大家都在团-->
158 <view class='goodslist'> 161 <view class='goodslist'>
159 <view class='goodslisttop'> 162 <view class='goodslisttop'>
160 - <span class='goodslistspan'>大家都在团</span> 163 + <text class='goodslisttext'>大家都在团</text>
161 <view class='goodslisttopright'></view> 164 <view class='goodslisttopright'></view>
162 </view> 165 </view>
163 <view class="changxin"> 166 <view class="changxin">
@@ -171,7 +174,7 @@ @@ -171,7 +174,7 @@
171 <view class='price'> 174 <view class='price'>
172 <view class='jgleft'>¥{{item.price}}</view> 175 <view class='jgleft'>¥{{item.price}}</view>
173 <view class='jgright'>{{item.ct_num}}人 176 <view class='jgright'>{{item.ct_num}}人
174 - <span>参团</span> 177 + <text>参团</text>
175 </view> 178 </view>
176 </view> 179 </view>
177 </view> 180 </view>
@@ -194,7 +197,7 @@ @@ -194,7 +197,7 @@
194 <view class="spec-goods-name ellipsis-1">{{goods.serviceName}}</view> 197 <view class="spec-goods-name ellipsis-1">{{goods.serviceName}}</view>
195 <view class="flex ai_end xc-val-money"> 198 <view class="flex ai_end xc-val-money">
196 <view class="spec-goods-price"> 199 <view class="spec-goods-price">
197 - <span class='t1'>¥</span><text class='t2'>{{teamlist.kttype==3?teamlist.yf_price:teamlist.price}}</text> 200 + <text class='t1'>¥</text><text class='t2'>{{teamlist.kttype==3?teamlist.yf_price:teamlist.price}}</text>
198 </view> 201 </view>
199 </view> 202 </view>
200 <view class="flex"> 203 <view class="flex">
@@ -300,7 +303,7 @@ @@ -300,7 +303,7 @@
300 </view> 303 </view>
301 </view> 304 </view>
302 <view> 305 <view>
303 - <view class="distance fs24 address-val"wx:if="{{item.distance!=null}}"> 306 + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
304 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}}</view> 307 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}}</view>
305 </view> 308 </view>
306 </view> 309 </view>
@@ -360,7 +363,7 @@ @@ -360,7 +363,7 @@
360 </view> 363 </view>
361 </view> 364 </view>
362 <view> 365 <view>
363 - <view class="distance fs24 address-val"wx:if="{{item.distance!=null}}"> 366 + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
364 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}}</view> 367 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}}</view>
365 </view> 368 </view>
366 </view> 369 </view>
@@ -377,7 +380,7 @@ @@ -377,7 +380,7 @@
377 <view class="store-bottom flex-vertical-between"> 380 <view class="store-bottom flex-vertical-between">
378 <view class="determine red-b fs28 white t-c" bindtap="sure_pick" 381 <view class="determine red-b fs28 white t-c" bindtap="sure_pick"
379 data-openindstore="{{open_ind_store}}">确定</view> 382 data-openindstore="{{open_ind_store}}">确定</view>
380 - <view class="default t-c fs28" bindtap="set_def_pick"data-openindstore="{{open_ind_store}}">设为默认</view> 383 + <view class="default t-c fs28" bindtap="set_def_pick" data-openindstore="{{open_ind_store}}">设为默认</view>
381 </view> 384 </view>
382 </view> 385 </view>
383 386
pages/team/team_show/team_show.js
@@ -144,7 +144,13 @@ Page({ @@ -144,7 +144,13 @@ Page({
144 144
145 //显示加载 145 //显示加载
146 onShow:function(){ 146 onShow:function(){
147 - getApp().check_can_share(); 147 + //-- 看一下隐私政策要不要显示 --
  148 + var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id
  149 + if (privacy_pop) {
  150 + privacy_pop.check_pri_show();
  151 + }
  152 +
  153 + getApp().check_can_share();
148 var tg_id = this.data.tg_id,th=this; 154 var tg_id = this.data.tg_id,th=this;
149 this.init(tg_id); 155 this.init(tg_id);
150 }, 156 },
@@ -1633,7 +1639,45 @@ Page({ @@ -1633,7 +1639,45 @@ Page({
1633 }) 1639 })
1634 1640
1635 }, 1641 },
1636 - 1642 +
  1643 + //-- 弹出框的同意的优化,重新获取定位 ---
  1644 + agree_pri:function (){
  1645 + var th=this;
  1646 + var bconfig = th.data.bconfig;
  1647 + if (bconfig && bconfig.is_sort_storage) {
  1648 + wx.getLocation({
  1649 + type: 'gcj02',
  1650 + success: function (res) {
  1651 + th.data.lat = res.latitude;
  1652 + th.data.lon = res.longitude;
  1653 + th.data.is_get_local_ok = 1;
  1654 + th.setData({
  1655 + is_gps: 1
  1656 + });
  1657 + //th.onShow();
  1658 + th.get_sto();
  1659 + },
  1660 + fail: function (res) {
  1661 + //th.onShow();
  1662 + th.data.is_get_local_ok = 1;
  1663 + th.get_sto();
  1664 + if (res.errCode == 2) {
  1665 + th.setData({
  1666 + is_gps: 0
  1667 + });
  1668 + if (th.data.is_gps == 0) {
  1669 + getApp().confirmBox("请开启GPS定位", null, 25000, !1);
  1670 + }
  1671 + } else {
  1672 + th.setData({
  1673 + is_gps: "3"
  1674 + });
  1675 + }
  1676 +
  1677 + }
  1678 + })
  1679 + }
  1680 + },
1637 1681
1638 1682
1639 1683
pages/team/team_show/team_show.json
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 "backgroundColor": "#eeeeee" 7 "backgroundColor": "#eeeeee"
8 }, 8 },
9 "usingComponents": { 9 "usingComponents": {
10 - "warn": "/components/long_warn/long_warn" 10 + "warn": "/components/long_warn/long_warn",
  11 + "privacy_pop": "/components/privacy_pop/privacy_pop"
11 } 12 }
12 } 13 }
13 \ No newline at end of file 14 \ No newline at end of file
pages/team/team_show/team_show.wxml
  1 +<!-- 判断隐私是不是显示 -->
  2 +<privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop>
  3 +
1 <wxs module="filters" src="../../../utils/filter.wxs"></wxs> 4 <wxs module="filters" src="../../../utils/filter.wxs"></wxs>
2 <!---- //文字"--> 5 <!---- //文字"-->
3 <view wx:if="{{is_show}}"> 6 <view wx:if="{{is_show}}">