wangxin 2 سال پیش
والد
کامیت
d25cafe8b9

+ 39 - 39
app.js

@@ -157,7 +157,7 @@ App({
       fail: function (res) {
         console.log(res)
       },
-      complete: function (res) { }
+      complete: function (res) {}
     })
   },
   // 跳转登录页面
@@ -169,44 +169,44 @@ App({
   setAreaList() {
     if (!wx.getStorageSync('areaList')) {
       wx.setStorageSync('areaList', [{
-        "countryCode": "",
-        "countryName": "不限",
-        "firstNameLetter": "X"
-      }, {
-        "countryCode": "320205",
-        "countryName": "锡山区",
-        "firstNameLetter": "X"
-      },
-      {
-        "countryCode": "320206",
-        "countryName": "惠山区",
-        "firstNameLetter": "H"
-      },
-      {
-        "countryCode": "320211",
-        "countryName": "滨湖区",
-        "firstNameLetter": "B"
-      },
-      {
-        "countryCode": "320213",
-        "countryName": "梁溪区",
-        "firstNameLetter": "L"
-      },
-      {
-        "countryCode": "320214",
-        "countryName": "新吴区",
-        "firstNameLetter": "X"
-      },
-      {
-        "countryCode": "320281",
-        "countryName": "江阴市",
-        "firstNameLetter": "J"
-      },
-      {
-        "countryCode": "320282",
-        "countryName": "宜兴市",
-        "firstNameLetter": "Y"
-      }
+          "countryCode": "",
+          "countryName": "不限",
+          "firstNameLetter": "X"
+        }, {
+          "countryCode": "320205",
+          "countryName": "锡山区",
+          "firstNameLetter": "X"
+        },
+        {
+          "countryCode": "320206",
+          "countryName": "惠山区",
+          "firstNameLetter": "H"
+        },
+        {
+          "countryCode": "320211",
+          "countryName": "滨湖区",
+          "firstNameLetter": "B"
+        },
+        {
+          "countryCode": "320213",
+          "countryName": "梁溪区",
+          "firstNameLetter": "L"
+        },
+        {
+          "countryCode": "320214",
+          "countryName": "新吴区",
+          "firstNameLetter": "X"
+        },
+        {
+          "countryCode": "320281",
+          "countryName": "江阴市",
+          "firstNameLetter": "J"
+        },
+        {
+          "countryCode": "320282",
+          "countryName": "宜兴市",
+          "firstNameLetter": "Y"
+        }
       ])
     }
   }

+ 6 - 2
components/privacy-popup/privacy-popup.js

@@ -7,11 +7,15 @@ Component({
     initCheck: {
       type: Boolean,
       value: false
+    },
+    changTabBar: {
+      type: Boolean,
+      value: true
     }
   },
   observers: {
     show: function (value) {
-      if (!this.properties.initCheck) {
+      if(this.properties.changTabBar){
         if (value) {
           wx.hideTabBar()
         } else {
@@ -72,7 +76,7 @@ Component({
       })
     },
     cancel() {
-      this.triggerEvent('cancel')
+      this.triggerEvent('privacyCancel')
       this.hidden()
     },
     openPrivacyContract() {

+ 5 - 0
pages/auth/auth.js

@@ -25,6 +25,11 @@ Page({
       noPhone: false
     })
   },
+  privacyCancel(){
+    wx.switchTab({
+      url: '/pages/index/index',
+    })
+  },
   getPhoneNumber: function(e) {
     let iv = e.detail.iv || ''
     let encryptedData = e.detail.encryptedData || ''

+ 3 - 1
pages/auth/auth.json

@@ -1,3 +1,5 @@
 {
-  "usingComponents": {}
+  "usingComponents": {
+    "privacy-popup": "/components/privacy-popup/privacy-popup"
+  }
 }

+ 2 - 1
pages/auth/auth.wxml

@@ -15,4 +15,5 @@
 </view>
  
 <view wx:else>请升级微信版本</view>
-</view>
+</view>
+<privacy-popup initCheck bind:privacyCancel="privacyCancel"> </privacy-popup>

+ 5 - 0
pages/bind-phone/index.js

@@ -31,6 +31,11 @@ Page({
   onLoad: function (options) {
 
   },
+  privacyCancel(){
+    wx.switchTab({
+      url: '/pages/index/index',
+    })
+  },
   // 清除输入
   clear() {
     this.setData({

+ 2 - 1
pages/bind-phone/index.json

@@ -1,6 +1,7 @@
 {
   "usingComponents": {
-    "phone-input": "../../components/phone-input/phone-input"
+    "phone-input": "../../components/phone-input/phone-input",
+    "privacy-popup": "/components/privacy-popup/privacy-popup"
   },
   "navigationBarTitleText": "绑定手机号"
 }

+ 1 - 1
pages/bind-phone/index.wxml

@@ -1,7 +1,7 @@
 <view class="container">
 	<phone-input title='{{title}}' bind:done='toSend'/>
 </view>
-
+<privacy-popup initCheck bind:privacyCancel="privacyCancel"> </privacy-popup>
 
 
 <!-- 手机号 -->

+ 6 - 3
pages/city/index.wxml

@@ -47,12 +47,15 @@
         <view class='location_city'>
           <view data-text="{{currcity}}" data-code="{{currcityCode}}">
             <text>{{currcity}}</text>
-            <text class="active">当前定位</text>
+            <!-- <text class="active">当前定位</text> -->
+            <text class="active">当前城市</text>
           </view>
-          <view class='position' catchtap="cxgps">
-            <!-- <i-icon type="refresh" /> -->
+          <!--
+           <view class='position' catchtap="cxgps">
+            <i-icon type="refresh" />
             <text>重新定位</text>
           </view>
+           -->
         </view>
         <view class='panel' wx:if="{{hotList.length}}">热门城市</view>
         <view class='hot_city' wx:if="{{hotList.length}}">

+ 25 - 17
pages/clock/clock.js

@@ -326,24 +326,12 @@ Page({
       })
     }
   },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
+  privacyCancel(){
+    wx.switchTab({
+      url: '/pages/index/index',
+    })
   },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: async function () {
+  async privacySubmit(){
     this.setData({
       userInfo: wx.getStorageSync('userInfo'),
       hpMember: wx.getStorageSync('hpMember')
@@ -367,6 +355,26 @@ Page({
       },
     })
   },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: async function () {
+
+  },
 
   /**
    * 生命周期函数--监听页面隐藏

+ 2 - 1
pages/clock/clock.json

@@ -2,6 +2,7 @@
   "enablePullDownRefresh": true,
   "usingComponents": {
     "modal":"../../ui/modal/index",
-    "avatar": "../../components/avatar/avatar"
+    "avatar": "../../components/avatar/avatar",
+    "privacy-popup": "/components/privacy-popup/privacy-popup"
   }
 }

+ 3 - 1
pages/clock/clock.wxml

@@ -154,4 +154,6 @@
 
 <modal visible='{{settingVisible}}' actions='{{actions}}' bind:click='closeSettingVisible'>
   <view class="settingVisible">请前往设置打开用户定位权限</view>
-</modal>
+</modal>
+
+<privacy-popup initCheck bind:privacySubmit='privacySubmit' bind:privacyCancel="privacyCancel"> </privacy-popup>

+ 0 - 1
pages/detail/index.js

@@ -15,7 +15,6 @@ import {
 } from '../../utils/tips.js'
 
 const WxParse = require('../../plugins/wxParse/wxParse.js');
-// var $ = require('../../libs/gdconf.js');
 import Poster from '../../components/wxa-plugin-canvas/poster/poster';
 const app = getApp();
 

+ 24 - 33
pages/fulltime/index.js

@@ -4,7 +4,6 @@ import {
 } from '../../services/index.js'
 import {
   imgServerUrl} from '../../config/config.js'
-var $ = require('../../libs/gdconf.js');
 Page({
 
   /**
@@ -118,40 +117,32 @@ Page({
       }, _ => {
         that.fullList();
       })
-
     } else {
-      wx.getSetting({
-        success: function (res) {
-          if (!res.authSetting['scope.userLocation']) {
-            wx.hideLoading();
-            wx.showModal({
-              title: '授权提示',
-              content: '当前服务需要获取您的位置信息,请确认授权',
-              confirmText: '去授权',
-              cancelText: '暂不授权',
-              success: function (res) {
-                if (res.confirm) {
-                  wx.openSetting();
-                } else if (res.cancel) {
-
-                }
-              }
-            })
-          } else {
-            $.map.getRegeo({
-              success(data) {
-                wx.hideLoading();
-                var data = data[0];
-                that.setData({
-                  longitude: data.longitude,
-                  latitude: data.latitude
-                }, _ => {
-                  wx.setStorageSync('distance', data);
-                  that.fullList();
-                })
+      wx.getLocation({
+        success:data=>{
+          console.log(data);
+          wx.hideLoading();
+          that.setData({
+            longitude: data.longitude,
+            latitude: data.latitude
+          }, _ => {
+            wx.setStorageSync('distance', data);
+            that.fullList();
+          })
+        },
+        fail:()=>{
+          wx.hideLoading();
+          wx.showModal({
+            title: '授权提示',
+            content: '当前服务需要获取您的位置信息,请确认授权',
+            confirmText: '去授权',
+            cancelText: '暂不授权',
+            success: function (res) {
+              if (res.confirm) {
+                wx.openSetting();
               }
-            })
-          }
+            }
+          })
         }
       })
     }

+ 3 - 1
pages/identification/index.json

@@ -1,4 +1,6 @@
 {
   "navigationBarTitleText": "实名认证",
-  "usingComponents": {}
+  "usingComponents": {
+    "privacy-popup": "/components/privacy-popup/privacy-popup"
+  }
 }

+ 6 - 2
pages/identification/index.wxml

@@ -3,7 +3,8 @@
 </view>
 
 <view class='idphoto'>
-  <view class='leftid' data-index="{{1}}" bindtap='chooseImage'>
+<privacy-popup data-index="{{1}}" bind:privacySubmit='chooseImage'>
+  <view class='leftid' >
     <view class="id-img">
       <image class="idCard" wx:if="{{idFrontPic}}" src="{{idFrontPic}}" />
       <image class='default-img' wx:else src='../../images/happyjob/id-uploaded-front.png'></image>
@@ -15,7 +16,9 @@
       <image wx:if="{{frontStatus === false}}" src="../../images/happyjob/status-failed.png"></image>
     </view>
   </view>
-  <view class='leftid' data-index="{{2}}" bindtap='chooseImage'>
+</privacy-popup>
+<privacy-popup data-index="{{2}}" bind:privacySubmit='chooseImage'>
+  <view class='leftid' >
     <view class="id-img">
       <image class="idCard" wx:if="{{idBackPic}}" src="{{idBackPic}}" />
       <image class='default-img' wx:else src='../../images/happyjob/id-uploaded-black.png'></image>
@@ -27,6 +30,7 @@
       <image wx:if="{{backStatus === false}}" src="../../images/happyjob/status-failed.png"></image>
     </view>
   </view>
+</privacy-popup>
 </view>
 
 

+ 4 - 3
pages/index/index.js

@@ -282,8 +282,9 @@ Page({
   },
   privacySubmit(e) {
     console.log('privacySubmit', e)
-    if (e.detail.status) {
-      app.init()
-    }
+    console.log(this.data.disclaimer)
+  },
+  privacyCancel(){
+    console.log(this.data.disclaimer)
   }
 })

+ 1 - 1
pages/index/index.wxml

@@ -99,4 +99,4 @@
     </view>
   </view>
 </view>
-<privacy-popup initCheck bind:privacySubmit='privacySubmit'> </privacy-popup>
+<privacy-popup initCheck changTabBar="{{!disclaimer}}" bind:privacySubmit='privacySubmit' bind:privacyCancel="privacyCancel"> </privacy-popup>

+ 24 - 32
pages/jipin/index.js

@@ -4,7 +4,6 @@ import {
 } from '../../services/index.js'
 import {
   imgServerUrl} from '../../config/config.js'
-var $ = require('../../libs/gdconf.js');
 Page({
 
   /**
@@ -124,38 +123,31 @@ Page({
         that.goodMoneyList();
       })
     } else {
-      wx.getSetting({
-        success: function (res) {
-          if (!res.authSetting['scope.userLocation']) {
-            wx.hideLoading();
-            wx.showModal({
-              title: '授权提示',
-              content: '当前服务需要获取您的位置信息,请确认授权',
-              confirmText: '去授权',
-              cancelText: '暂不授权',
-              success: function (res) {
-                if (res.confirm) {
-                  wx.openSetting();
-                } else if (res.cancel) {
-
-                }
-              }
-            })
-          } else {
-            $.map.getRegeo({
-              success(data) {
-                wx.hideLoading();
-                var data = data[0];
-                that.setData({
-                  longitude: data.longitude,
-                  latitude: data.latitude
-                }, _ => {
-                  wx.setStorageSync('distance', data);
-                  that.goodMoneyList();
-                })
+      wx.getLocation({
+        success:data=>{
+          console.log(data);
+          wx.hideLoading();
+          that.setData({
+            longitude: data.longitude,
+            latitude: data.latitude
+          }, _ => {
+            wx.setStorageSync('distance', data);
+            that.fullList();
+          })
+        },
+        fail:()=>{
+          wx.hideLoading();
+          wx.showModal({
+            title: '授权提示',
+            content: '当前服务需要获取您的位置信息,请确认授权',
+            confirmText: '去授权',
+            cancelText: '暂不授权',
+            success: function (res) {
+              if (res.confirm) {
+                wx.openSetting();
               }
-            })
-          }
+            }
+          })
         }
       })
     }

+ 1 - 1
pages/login/login.js

@@ -168,7 +168,7 @@ Page({
       })
     }, 1000)
   },
-  cancel(){
+  privacyCancel(){
     wx.switchTab({
       url: '/pages/index/index',
     })

+ 1 - 1
pages/login/login.wxml

@@ -14,4 +14,4 @@
 	</button>
 
 </view>
-<privacy-popup initCheck bind:cancel="cancel"></privacy-popup>
+<privacy-popup initCheck bind:privacyCancel="privacyCancel"></privacy-popup>

+ 24 - 31
pages/parttime/index.js

@@ -4,7 +4,6 @@ import {
 } from '../../services/index.js'
 import {
   imgServerUrl} from '../../config/config.js'
-var $ = require('../../libs/gdconf.js');
 Page({
 
   /**
@@ -150,37 +149,31 @@ Page({
       })
       that.parttimeList();
     } else {
-      wx.getSetting({
-        success: function (res) {
-          if (!res.authSetting['scope.userLocation']) {
-            wx.hideLoading();
-            wx.showModal({
-              title: '授权提示',
-              content: '当前服务需要获取您的位置信息,请确认授权',
-              confirmText: '去授权',
-              cancelText: '暂不授权',
-              success: function (res) {
-                if (res.confirm) {
-                  wx.openSetting();
-                } else if (res.cancel) {
-
-                }
-              }
-            })
-          } else {
-            $.map.getRegeo({
-              success(data) {
-                wx.hideLoading();
-                var data = data[0];
-                that.setData({
-                  longitude: data.longitude,
-                  latitude: data.latitude
-                })
-                wx.setStorageSync('distance', data);
-                that.parttimeList();
+      wx.getLocation({
+        success:data=>{
+          console.log(data);
+          wx.hideLoading();
+          that.setData({
+            longitude: data.longitude,
+            latitude: data.latitude
+          }, _ => {
+            wx.setStorageSync('distance', data);
+            that.fullList();
+          })
+        },
+        fail:()=>{
+          wx.hideLoading();
+          wx.showModal({
+            title: '授权提示',
+            content: '当前服务需要获取您的位置信息,请确认授权',
+            confirmText: '去授权',
+            cancelText: '暂不授权',
+            success: function (res) {
+              if (res.confirm) {
+                wx.openSetting();
               }
-            })
-          }
+            }
+          })
         }
       })
     }

+ 24 - 32
pages/reward/index.js

@@ -4,7 +4,6 @@ import {
 } from '../../services/index.js'
 import {
   imgServerUrl} from '../../config/config.js'
-var $ = require('../../libs/gdconf.js');
 Page({
 
   /**
@@ -123,38 +122,31 @@ Page({
       })
       that.rewardList();
     } else {
-      wx.getSetting({
-        success: function (res) {
-          if (!res.authSetting['scope.userLocation']) {
-            wx.hideLoading();
-            wx.showModal({
-              title: '授权提示',
-              content: '当前服务需要获取您的位置信息,请确认授权',
-              confirmText: '去授权',
-              cancelText: '暂不授权',
-              success: function (res) {
-                if (res.confirm) {
-                  wx.openSetting();
-                } else if (res.cancel) {
-
-                }
-              }
-            })
-          } else {
-            $.map.getRegeo({
-              success(data) {
-                wx.hideLoading();
-                var data = data[0];
-                that.setData({
-                  longitude: data.longitude,
-                  latitude: data.latitude
-                }, _ => {
-                  wx.setStorageSync('distance', data);
-                  that.rewardList();
-                })
+      wx.getLocation({
+        success:data=>{
+          console.log(data);
+          wx.hideLoading();
+          that.setData({
+            longitude: data.longitude,
+            latitude: data.latitude
+          }, _ => {
+            wx.setStorageSync('distance', data);
+            that.fullList();
+          })
+        },
+        fail:()=>{
+          wx.hideLoading();
+          wx.showModal({
+            title: '授权提示',
+            content: '当前服务需要获取您的位置信息,请确认授权',
+            confirmText: '去授权',
+            cancelText: '暂不授权',
+            success: function (res) {
+              if (res.confirm) {
+                wx.openSetting();
               }
-            })
-          }
+            }
+          })
         }
       })
     }

+ 5 - 0
pages/select-info/index.js

@@ -112,6 +112,11 @@ Page({
   onShow: function () {
 
   },
+  privacyCancel(){
+    wx.switchTab({
+      url: '/pages/index/index',
+    })
+  },
   closeMessage() {
     this.setData({
       show_message: false,

+ 2 - 1
pages/select-info/index.json

@@ -1,7 +1,8 @@
 {
   "usingComponents": {
     "i-modal": "../../ui/modal/index",
-    "avatar": "../../components/avatar/avatar"
+    "avatar": "../../components/avatar/avatar",
+    "privacy-popup": "/components/privacy-popup/privacy-popup"
   },
   "navigationBarTitleText": "信息选择"
 }

+ 1 - 1
pages/select-info/index.wxml

@@ -41,7 +41,7 @@
 			</label>
 
 		</view>
-
+    <privacy-popup initCheck bind:privacyCancel="privacyCancel"> </privacy-popup>