|
@@ -158,6 +158,16 @@
|
|
<view class="grid-text">联系客服</view>
|
|
<view class="grid-text">联系客服</view>
|
|
</button>
|
|
</button>
|
|
</u-grid-item>
|
|
</u-grid-item>
|
|
|
|
+
|
|
|
|
+ <u-grid-item v-show="showPrivacy" @click="authorize2" >
|
|
|
|
+ <button class="btncontact" open-type="agreePrivacyAuthorization">
|
|
|
|
+ <view class="icon">
|
|
|
|
+
|
|
|
|
+ <img src="@/assets/img/riLine-logout-box-r-line@1x.png" alt="">
|
|
|
|
+ </view>
|
|
|
|
+ <view class="grid-text">授权</view>
|
|
|
|
+ </button>
|
|
|
|
+ </u-grid-item>
|
|
|
|
|
|
<!-- <u-grid-item>
|
|
<!-- <u-grid-item>
|
|
<view class="icon">
|
|
<view class="icon">
|
|
@@ -176,8 +186,10 @@
|
|
登录荆州经开区共享用工平台
|
|
登录荆州经开区共享用工平台
|
|
</view>
|
|
</view>
|
|
<view>
|
|
<view>
|
|
- <button class="login-btn" @click="decryptPhoneNumberH5" open-type="getPhoneNumber"
|
|
|
|
- @getphonenumber="decryptPhoneNumber">
|
|
|
|
|
|
+ <button class="login-btn" @click="decryptPhoneNumberH5" open-type="getPhoneNumber|agreePrivacyAuthorization"
|
|
|
|
+ @getphonenumber="decryptPhoneNumber"
|
|
|
|
+ bindagreeprivacyauthorization="handleAgreePrivacyAuthorization"
|
|
|
|
+ >
|
|
<u-icon name="phone-fill" size="46"></u-icon> <text>手机号码一键登录</text>
|
|
<u-icon name="phone-fill" size="46"></u-icon> <text>手机号码一键登录</text>
|
|
</button>
|
|
</button>
|
|
|
|
|
|
@@ -229,6 +241,7 @@
|
|
updateintention:false,
|
|
updateintention:false,
|
|
bannerlist: [
|
|
bannerlist: [
|
|
],
|
|
],
|
|
|
|
+ showPrivacy:false,
|
|
intentionList:[
|
|
intentionList:[
|
|
{
|
|
{
|
|
value: '1',
|
|
value: '1',
|
|
@@ -245,15 +258,68 @@
|
|
onLoad() {
|
|
onLoad() {
|
|
this.userInfo = this.carhelp.getPersonInfo()
|
|
this.userInfo = this.carhelp.getPersonInfo()
|
|
this.findByOpenId();
|
|
this.findByOpenId();
|
|
- this.getNewsInfo()
|
|
|
|
|
|
+ this.getNewsInfo()
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ this.authorize(true)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
onShow(){
|
|
onShow(){
|
|
|
|
+ this.authorize()
|
|
if(this.isReady){
|
|
if(this.isReady){
|
|
this.findByOpenId();
|
|
this.findByOpenId();
|
|
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ authorize2(){
|
|
|
|
+
|
|
|
|
+ uni.authorize({
|
|
|
|
+ scope:'scope.camera',
|
|
|
|
+ success() {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title:"授权成功"
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ fail(res){
|
|
|
|
+ console.log(res)
|
|
|
|
+
|
|
|
|
+ if(res.errMsg=="authorize:fail auth deny"||res.errMsg=="authorize:fail:auth deny"){
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ uni.showModal({
|
|
|
|
+ showCancel:false,
|
|
|
|
+ content:"授权失败,可点击'右上角...'-'设置'-'摄像头'授权",
|
|
|
|
+ title:"提示",
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ complete:()=> {
|
|
|
|
+ this.authorize()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ authorize(bl){
|
|
|
|
+ uni.getSetting({
|
|
|
|
+ success:(settingRes)=> {
|
|
|
|
+
|
|
|
|
+ if(!settingRes.authSetting['scope.camera']){
|
|
|
|
+ this.showPrivacy=true
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ this.showPrivacy=false
|
|
|
|
+ }
|
|
|
|
+ },fail(res){
|
|
|
|
+ console.log(res)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ handleAgreePrivacyAuthorization(){
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
getNewsInfo(){
|
|
getNewsInfo(){
|
|
|
|
|
|
API_weixin.bannerList({
|
|
API_weixin.bannerList({
|
|
@@ -446,7 +512,8 @@
|
|
API_weixin.findByOpenId({
|
|
API_weixin.findByOpenId({
|
|
openId: this.carhelp.getOpenId(),
|
|
openId: this.carhelp.getOpenId(),
|
|
noerror: true
|
|
noerror: true
|
|
- }).then((res) => {
|
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
+
|
|
this.isReady=true;
|
|
this.isReady=true;
|
|
this.carhelp.setPersonInfo(res.data.regUser);
|
|
this.carhelp.setPersonInfo(res.data.regUser);
|
|
this.carhelp.setToken(res.data.token);
|
|
this.carhelp.setToken(res.data.token);
|
|
@@ -474,7 +541,7 @@
|
|
if (this.ck2()) {
|
|
if (this.ck2()) {
|
|
this.getNum2()
|
|
this.getNum2()
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
//.log("11111")
|
|
//.log("11111")
|
|
this.carhelp.logoff();
|
|
this.carhelp.logoff();
|