xyvcard-wechat-auth 0.0.15 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,19 +1,27 @@
|
|
|
1
|
-
import { config } from "../../utils/config.js";
|
|
2
1
|
import { auth } from "../../utils/auth.js";
|
|
3
2
|
Component({
|
|
3
|
+
// 在组件定义时的选项中启用多slot支持
|
|
4
|
+
options: {
|
|
5
|
+
multipleSlots: true
|
|
6
|
+
},
|
|
4
7
|
/**
|
|
5
8
|
* 组件的属性列表
|
|
6
9
|
*/
|
|
7
10
|
properties: {
|
|
8
|
-
//
|
|
9
|
-
|
|
11
|
+
// 登录按钮样式
|
|
12
|
+
loginStyle: {
|
|
13
|
+
type: String,
|
|
14
|
+
value: "width: 100%;background-color: #2563EB;color: #fff;font-size: 15px;"
|
|
15
|
+
},
|
|
16
|
+
// 单选框选中的颜色
|
|
17
|
+
checkedColor: {
|
|
10
18
|
type: String,
|
|
11
|
-
value:
|
|
19
|
+
value: "#0551ff"
|
|
12
20
|
},
|
|
13
|
-
|
|
14
|
-
|
|
21
|
+
// 协议样式
|
|
22
|
+
agreementStyle: {
|
|
15
23
|
type: String,
|
|
16
|
-
value:
|
|
24
|
+
value: "color: #0551ff"
|
|
17
25
|
},
|
|
18
26
|
//登录后跳转页面
|
|
19
27
|
backurl: {
|
|
@@ -77,13 +85,13 @@ Component({
|
|
|
77
85
|
});
|
|
78
86
|
return;
|
|
79
87
|
}
|
|
80
|
-
if (this.
|
|
88
|
+
if (this.properties.tabbar) {
|
|
81
89
|
wx.switchTab({
|
|
82
|
-
url: this.
|
|
90
|
+
url: this.properties.backurl
|
|
83
91
|
});
|
|
84
92
|
} else {
|
|
85
93
|
wx.navigateTo({
|
|
86
|
-
url: this.
|
|
94
|
+
url: this.properties.backurl
|
|
87
95
|
});
|
|
88
96
|
}
|
|
89
97
|
});
|
|
@@ -99,15 +107,7 @@ Component({
|
|
|
99
107
|
goInfo(e) {
|
|
100
108
|
var _a;
|
|
101
109
|
const id = (_a = e.currentTarget) == null ? void 0 : _a.id;
|
|
102
|
-
|
|
103
|
-
wx.navigateTo({
|
|
104
|
-
url: "/pages/cms/agreement/index"
|
|
105
|
-
});
|
|
106
|
-
} else if (id == "1") {
|
|
107
|
-
wx.navigateTo({
|
|
108
|
-
url: "/pages/cms/policy/index"
|
|
109
|
-
});
|
|
110
|
-
}
|
|
110
|
+
this.triggerEvent("policy", id);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
});
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</label>
|
|
13
|
-
</radio-group>
|
|
14
|
-
<view class="tips_box">温馨提示:{{config.name}}手机号授权登录。</view>
|
|
15
|
-
</view>
|
|
1
|
+
<slot name="before"></slot>
|
|
2
|
+
<view class="login_box">
|
|
3
|
+
<button open-type="getPhoneNumber" style="{{ loginStyle }}" bindgetphonenumber="wxPhoneLogin" wx:if="{{ agreeStatus }}">手机号授权登录</button>
|
|
4
|
+
<button bind:tap="wxPhoneLogin" style="{{ loginStyle }}" wx:else>手机号授权登录</button>
|
|
5
|
+
<radio-group bindchange="agreeChange" class="protocol_agree">
|
|
6
|
+
<label>
|
|
7
|
+
<radio value="{{ agreeStatus }}" checked="{{ agreeStatus }}" color="{{ checkedColor }}" />
|
|
8
|
+
已阅读<text id="0" style="{{ agreementStyle }}" catch:tap="goInfo">《用户使用协议》</text> <text id="1" style="{{ agreementStyle }}" catch:tap="goInfo">《隐私权政策》</text>
|
|
9
|
+
</label>
|
|
10
|
+
</radio-group>
|
|
11
|
+
<slot name="after"></slot>
|
|
16
12
|
</view>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.login_box{padding:13% 3% 4%;display:flex;flex-direction:column;align-items:center}.login_box .login_btn{background-color:#2563eb;color:#fff;padding:16px 0;width:100%;font-size:14px}.login_box .protocol_agree{color:#999;font-size:14px;margin-top:20px}.login_box .protocol_agree text{color:#2563eb}
|