|
|
@@ -119,7 +119,19 @@
|
|
|
<view class="heng1" @click="queren" style="background-color: orangered;">确认</view>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
+ <u-popup v-model="privacyPolicyValidation" mode="bottom" border-radius="12">
|
|
|
+ <view class="privacyPolicyValidationclass dis f-c a-start">
|
|
|
+ <text class="title">用户协议及隐私政策</text>
|
|
|
+ <text class="content">未注册的用户将自动注册,请您认真阅读 <text @tap="nav('/pages/login/xieyi')"
|
|
|
+ class="text-color">《用户协议》</text>和<text class="text-color"
|
|
|
+ @tap="nav('/pages/login/mimi')">《隐私政策》</text>的全部条款,接受后可开始使用本产品 </text>
|
|
|
+ <view class="dis a-c j-s" style="margin-top: 10px;width: 100%;">
|
|
|
+ <u-button type="default" @click="butongyi">不同意</u-button>
|
|
|
+ <u-button type="primary" style="width: 70%;" @click="tongyi">同意并继续</u-button>
|
|
|
+ </view>
|
|
|
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -138,6 +150,8 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ privacyPolicyValidation: false,
|
|
|
+ loginMethod: "weixin",
|
|
|
checked: false,
|
|
|
list: [{
|
|
|
name: '账号登录'
|
|
|
@@ -288,7 +302,18 @@
|
|
|
url: url
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+ butongyi() {
|
|
|
+ this.privacyPolicyValidation = false;
|
|
|
+ return uni.showToast({
|
|
|
+ title: '请先同意协议',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ },
|
|
|
+ tongyi() {
|
|
|
+ this.privacyPolicyValidation = false;
|
|
|
+ this.checked = true;
|
|
|
+ this[this.loginMethod]();
|
|
|
+ },
|
|
|
// 图片验证码
|
|
|
refreshCaptcha() {
|
|
|
let randnum = Math.floor(Math.random() * (1000000 - 1 + 1)) + 1
|
|
|
@@ -516,41 +541,53 @@
|
|
|
},
|
|
|
// 微信APP登录
|
|
|
onWxAppLogin() {
|
|
|
+ this.loginMethod = 'onWxAppLogin';
|
|
|
var that = this;
|
|
|
- uni.login({
|
|
|
- provider: 'weixin',
|
|
|
- onlyAuthorize: true,
|
|
|
- success: function(loginRes) {
|
|
|
- that.codeRes(loginRes.code);
|
|
|
-
|
|
|
- },
|
|
|
- fail: (err) => {
|
|
|
- uni.showToast({
|
|
|
- title: '绑定失败',
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ if (!this.checked) {
|
|
|
+ this.privacyPolicyValidation = true;
|
|
|
+ } else {
|
|
|
+ uni.login({
|
|
|
+ provider: 'weixin',
|
|
|
+ onlyAuthorize: true,
|
|
|
+ success: function(loginRes) {
|
|
|
+ that.codeRes(loginRes.code);
|
|
|
+
|
|
|
+ },
|
|
|
+ fail: (err) => {
|
|
|
+ uni.showToast({
|
|
|
+ title: '绑定失败',
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
onzfbAppLogin() {
|
|
|
- let urls =
|
|
|
- 'https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=2021004153668213&scope=auth_user&redirect_uri=https://test.baoxianzhanggui.com/pay/';
|
|
|
- urls = encodeURIComponent(urls); //将地址编码成浏览器访问的格式
|
|
|
- plus.runtime.openURL(
|
|
|
- 'alipays://platformapi/startapp?appId=20000067&url=' + urls,
|
|
|
- res => {
|
|
|
- //这里写打开URL地址失败后的处理0
|
|
|
- uni.showModal({
|
|
|
- content: '本机未检测到对应客户端,是否打开浏览器访问页面?',
|
|
|
- success: function(res) {
|
|
|
- if (res.confirm) {
|
|
|
- //plus.runtime.openURL();
|
|
|
+ this.loginMethod = 'onzfbAppLogin';
|
|
|
+ if (!this.checked) {
|
|
|
+ this.privacyPolicyValidation = true;
|
|
|
+ } else {
|
|
|
+ let urls =
|
|
|
+ 'https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=2021004153668213&scope=auth_user&redirect_uri=https://test.baoxianzhanggui.com/pay/';
|
|
|
+ urls = encodeURIComponent(urls); //将地址编码成浏览器访问的格式
|
|
|
+ plus.runtime.openURL(
|
|
|
+ 'alipays://platformapi/startapp?appId=20000067&url=' + urls,
|
|
|
+ res => {
|
|
|
+ //这里写打开URL地址失败后的处理0
|
|
|
+ uni.showModal({
|
|
|
+ content: '本机未检测到对应客户端,是否打开浏览器访问页面?',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ //plus.runtime.openURL();
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- 'com.eg.android.AlipayGphone'
|
|
|
- );
|
|
|
+ });
|
|
|
+ },
|
|
|
+ 'com.eg.android.AlipayGphone'
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
codeRes(code) {
|
|
|
this.$login({
|
|
|
@@ -726,6 +763,22 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .privacyPolicyValidationclass {
|
|
|
+ padding: 20px;
|
|
|
+
|
|
|
+ .title {
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 14px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .content {
|
|
|
+ font-size: 13px;
|
|
|
+ color: #333;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.shu1 {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|