|
@@ -10,31 +10,35 @@
|
|
|
<!-- <view class="phone">187****8783</view>
|
|
<!-- <view class="phone">187****8783</view>
|
|
|
<view class="tips">认证服务由中国移动统一认证提供</view> -->
|
|
<view class="tips">认证服务由中国移动统一认证提供</view> -->
|
|
|
<!-- #ifndef APP-HARMONY -->
|
|
<!-- #ifndef APP-HARMONY -->
|
|
|
-
|
|
|
|
|
- <button class="login-btn x-c" v-if="checkWechatInstalled()" style="margin-top: 74rpx;" :loading="btnLoading" :disabled="btnLoading" @click="quickClick(1)">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <button class="login-btn x-c" v-if="checkWechatInstalled()" style="margin-top: 74rpx;" :loading="btnLoading"
|
|
|
|
|
+ :disabled="btnLoading" @click="quickClick(1)">
|
|
|
<image class="es-icon-50 es-mr-10" src="/static/images/icon_wx.png"></image>
|
|
<image class="es-icon-50 es-mr-10" src="/static/images/icon_wx.png"></image>
|
|
|
<text>微信快捷登录</text>
|
|
<text>微信快捷登录</text>
|
|
|
</button>
|
|
</button>
|
|
|
<!-- #endif -->
|
|
<!-- #endif -->
|
|
|
-
|
|
|
|
|
- <button class="login-btn apple-login-btn x-c" :loading="btnLoading" v-if="$isIos()" :disabled="btnLoading" @click="quickClick(2)">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <button class="login-btn apple-login-btn x-c" :loading="btnLoading" v-if="$isIos()" :disabled="btnLoading"
|
|
|
|
|
+ @click="quickClick(2)">
|
|
|
<image class="es-icon-50 es-mr-10" src="/static/image/login/apple.png"></image>
|
|
<image class="es-icon-50 es-mr-10" src="/static/image/login/apple.png"></image>
|
|
|
<text>苹果登录</text>
|
|
<text>苹果登录</text>
|
|
|
- </button>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <button class="login-btn other-login-btn" :loading="btnLoading" :disabled="btnLoading" @click="submit()">手机号一键登录</button>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ </button>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <button class="login-btn other-login-btn" :loading="btnLoading" :disabled="btnLoading"
|
|
|
|
|
+ @click="submit()">手机号一键登录</button>
|
|
|
|
|
+
|
|
|
<button class="login-btn other-login-btn" :disabled="btnLoading" @tap="handleOtherLogin">其他方式登录</button>
|
|
<button class="login-btn other-login-btn" :disabled="btnLoading" @tap="handleOtherLogin">其他方式登录</button>
|
|
|
<view class="checkbox">
|
|
<view class="checkbox">
|
|
|
<view class="checkbox-icon" @tap="handleAgree">
|
|
<view class="checkbox-icon" @tap="handleAgree">
|
|
|
<image src="../../static/image/login/radio_default.png" v-show="!agree"></image>
|
|
<image src="../../static/image/login/radio_default.png" v-show="!agree"></image>
|
|
|
<image src="../../static/image/login/radio_choose.png" v-show="agree"></image>
|
|
<image src="../../static/image/login/radio_choose.png" v-show="agree"></image>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="es-fs-36" @tap="handleAgree">我已阅读并同意<text @tap.stop="goToWeb(0)">《用户协议》</text><text @tap.stop="goToWeb(1)">《隐私政策》</text> 并使用本机号码登录</view>
|
|
|
|
|
|
|
+ <view class="es-fs-36" @tap="handleAgree">我已阅读并同意<text @tap.stop="goToWeb(0)">《用户协议》</text><text
|
|
|
|
|
+ @tap.stop="goToWeb(1)">《隐私政策》</text> 并使用本机号码登录</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<u-popup :show="show" :safeAreaInsetBottom="false" mode="center" round="16rpx" @close="show=false">
|
|
<u-popup :show="show" :safeAreaInsetBottom="false" mode="center" round="16rpx" @close="show=false">
|
|
|
<view class="popupBox u-f-ajc">
|
|
<view class="popupBox u-f-ajc">
|
|
|
<view class="es-c-33 es-fs-32 es-fw ">
|
|
<view class="es-c-33 es-fs-32 es-fw ">
|
|
@@ -52,23 +56,32 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</u-popup>
|
|
</u-popup>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import {navBack} from "../../utils/common";
|
|
|
|
|
- import {login} from "@/api/user.js"
|
|
|
|
|
- import { quickAppleLogin,quickWechatLogin} from "@/utils/login.js"
|
|
|
|
|
- import { checkWechatInstalled} from '@/utils/common.js'
|
|
|
|
|
|
|
+ import {
|
|
|
|
|
+ navBack
|
|
|
|
|
+ } from "../../utils/common";
|
|
|
|
|
+ import {
|
|
|
|
|
+ login
|
|
|
|
|
+ } from "@/api/user.js"
|
|
|
|
|
+ import {
|
|
|
|
|
+ quickAppleLogin,
|
|
|
|
|
+ quickWechatLogin
|
|
|
|
|
+ } from "@/utils/login.js"
|
|
|
|
|
+ import {
|
|
|
|
|
+ checkWechatInstalled
|
|
|
|
|
+ } from '@/utils/common.js'
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
btnLoading: false,
|
|
btnLoading: false,
|
|
|
agree: false,
|
|
agree: false,
|
|
|
show: false,
|
|
show: false,
|
|
|
- quickLoginType:1 ,// 1:微信登录 2:苹果登录,
|
|
|
|
|
-
|
|
|
|
|
|
|
+ quickLoginType: 1, // 1:微信登录 2:苹果登录,
|
|
|
|
|
+ curRegistrationID: null,
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
@@ -83,7 +96,7 @@
|
|
|
} else {
|
|
} else {
|
|
|
// #ifdef APP-PLUS
|
|
// #ifdef APP-PLUS
|
|
|
//this.submit()
|
|
//this.submit()
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// #endif
|
|
// #endif
|
|
|
// #ifndef APP-PLUS
|
|
// #ifndef APP-PLUS
|
|
|
if (String(navigator.userAgent.toLowerCase().match(/MicroMessenger/i)) === "micromessenger") {
|
|
if (String(navigator.userAgent.toLowerCase().match(/MicroMessenger/i)) === "micromessenger") {
|
|
@@ -122,20 +135,40 @@
|
|
|
animationDuration: 2000
|
|
animationDuration: 2000
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // #ifdef APP-PLUS
|
|
|
|
|
+ let curAgreePrivacy = this.$isAgreePrivacy();
|
|
|
|
|
+ if (curAgreePrivacy) {
|
|
|
|
|
+ this.getRegistrationID();
|
|
|
|
|
+ }
|
|
|
|
|
+ // #endif
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getRegistrationID() {
|
|
|
|
|
+ this.curRegistrationID = uni.getStorageSync('registrationID');
|
|
|
|
|
+ if (!this.curRegistrationID) {
|
|
|
|
|
+ uni.getPushClientId({
|
|
|
|
|
+ success: (res) => {
|
|
|
|
|
+ uni.setStorageSync('registrationID', res.cid);
|
|
|
|
|
+ this.curRegistrationID = res.cid;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
checkWechatInstalled,
|
|
checkWechatInstalled,
|
|
|
- quickClick(type){
|
|
|
|
|
- this.quickLoginType=type;
|
|
|
|
|
- this.show=true;
|
|
|
|
|
|
|
+ quickClick(type) {
|
|
|
|
|
+ this.quickLoginType = type;
|
|
|
|
|
+ this.show = true;
|
|
|
},
|
|
},
|
|
|
quickLogin() {
|
|
quickLogin() {
|
|
|
- this.agree=true;
|
|
|
|
|
- if(this.quickLoginType==1){
|
|
|
|
|
|
|
+ this.agree = true;
|
|
|
|
|
+ if (this.quickLoginType == 1) {
|
|
|
quickWechatLogin(false);
|
|
quickWechatLogin(false);
|
|
|
}
|
|
}
|
|
|
- if(this.quickLoginType==2){
|
|
|
|
|
- quickAppleLogin(false);
|
|
|
|
|
|
|
+ if (this.quickLoginType == 2) {
|
|
|
|
|
+ quickAppleLogin(false);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
goToWeb(index) {
|
|
goToWeb(index) {
|
|
@@ -322,6 +355,7 @@
|
|
|
&-icon {
|
|
&-icon {
|
|
|
flex-shrink: 0;
|
|
flex-shrink: 0;
|
|
|
margin-right: 12rpx;
|
|
margin-right: 12rpx;
|
|
|
|
|
+
|
|
|
image {
|
|
image {
|
|
|
height: 40rpx;
|
|
height: 40rpx;
|
|
|
width: 40rpx;
|
|
width: 40rpx;
|
|
@@ -347,14 +381,14 @@
|
|
|
border: none;
|
|
border: none;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
.apple-login-btn {
|
|
.apple-login-btn {
|
|
|
background: #fff;
|
|
background: #fff;
|
|
|
border: 2rpx solid #000000;
|
|
border: 2rpx solid #000000;
|
|
|
color: #000 !important;
|
|
color: #000 !important;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
.other-login-btn {
|
|
.other-login-btn {
|
|
|
background: #fff;
|
|
background: #fff;
|
|
@@ -366,9 +400,11 @@
|
|
|
padding: 48rpx 24rpx;
|
|
padding: 48rpx 24rpx;
|
|
|
width: 500rpx;
|
|
width: 500rpx;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
|
|
+
|
|
|
.colorFF5C03 {
|
|
.colorFF5C03 {
|
|
|
color: #FF5C03;
|
|
color: #FF5C03;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.popupbox-btn {
|
|
.popupbox-btn {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
border-radius: 8rpx;
|
|
border-radius: 8rpx;
|