xyvcard-wechat-auth 0.0.18 → 0.0.20
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.
- package/dist/components/common/auth-basic-title/basic-title-view/index.d.ts +1 -0
- package/dist/components/common/auth-basic-title/basic-title-view/index.js +39 -0
- package/dist/components/common/auth-basic-title/basic-title-view/index.json +4 -0
- package/dist/components/common/auth-basic-title/basic-title-view/index.wxml +5 -0
- package/dist/components/common/auth-basic-title/basic-title-view/index.wxss +1 -0
- package/dist/components/common/auth-popup/index.js +6 -3
- package/dist/components/common/auth-popup/index.wxml +2 -2
- package/dist/components/common/auth-popup/index.wxss +1 -1
- package/dist/components/jmash-login/index.js +14 -6
- package/dist/utils/common.d.ts +1 -1
- package/dist/utils/common.js +2 -1
- package/package.json +1 -1
- package/xyvcard-wechat-auth-0.0.1.tgz +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { config } from "../../../../utils/config.js";
|
|
2
|
+
Component({
|
|
3
|
+
/**
|
|
4
|
+
* 组件的属性列表
|
|
5
|
+
*/
|
|
6
|
+
properties: {
|
|
7
|
+
// 主题色
|
|
8
|
+
themeColor: {
|
|
9
|
+
type: String,
|
|
10
|
+
value: ""
|
|
11
|
+
},
|
|
12
|
+
// 标题
|
|
13
|
+
title: {
|
|
14
|
+
type: String,
|
|
15
|
+
value: ""
|
|
16
|
+
},
|
|
17
|
+
// 是否显示查看更多
|
|
18
|
+
isMore: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
value: true
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* 组件的初始数据
|
|
25
|
+
*/
|
|
26
|
+
data: {
|
|
27
|
+
// 图片资源路径/v1/file/path/wxapp/
|
|
28
|
+
resourceUrl: config.resourceUrl + "/images/icon_image"
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* 组件的方法列表
|
|
32
|
+
*/
|
|
33
|
+
methods: {
|
|
34
|
+
// 查看更多
|
|
35
|
+
handleMore() {
|
|
36
|
+
this.triggerEvent("more");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.basic-view{display:flex;align-items:center;padding:12px 0}.basic-view .basic-icon{margin-right:8px;width:4px;height:15px}.basic-view .basic-more{margin-left:auto;color:#999;font-size:12px}.basic-view .basic-title{font-size:15px;font-weight:bold;color:#333}
|
|
@@ -17,7 +17,7 @@ Component({
|
|
|
17
17
|
// 是否显示标题
|
|
18
18
|
titleShow: {
|
|
19
19
|
type: Boolean,
|
|
20
|
-
value:
|
|
20
|
+
value: true
|
|
21
21
|
},
|
|
22
22
|
// 高
|
|
23
23
|
height: {
|
|
@@ -28,6 +28,10 @@ Component({
|
|
|
28
28
|
backColor: {
|
|
29
29
|
type: String,
|
|
30
30
|
value: "#fff"
|
|
31
|
+
},
|
|
32
|
+
borderRadius: {
|
|
33
|
+
type: String,
|
|
34
|
+
value: "25px"
|
|
31
35
|
}
|
|
32
36
|
},
|
|
33
37
|
/**
|
|
@@ -36,8 +40,7 @@ Component({
|
|
|
36
40
|
data: {
|
|
37
41
|
resourceUrl: config.resourceUrl + "/images",
|
|
38
42
|
// 是否显示
|
|
39
|
-
closeModel: false
|
|
40
|
-
titleShow: true
|
|
43
|
+
closeModel: false
|
|
41
44
|
},
|
|
42
45
|
/**
|
|
43
46
|
* 组件的方法列表
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<view class="auth-mask-box" wx:if="{{ show }}"></view>
|
|
2
|
-
<view class="auth-mask-popup" wx:if="{{ show }}" style="height: {{ height }}; background-color: {{ backColor }};">
|
|
1
|
+
<view class="auth-mask-box" wx:if="{{ show }}" bind:tap="closePopup"></view>
|
|
2
|
+
<view class="auth-mask-popup" wx:if="{{ show }}" style="height: {{ height }}; background-color: {{ backColor }};border-top-left-radius: {{ borderRadius }};border-top-right-radius: {{ borderRadius }};width: 100%;">
|
|
3
3
|
<view class="popup-title" titleShow="{{ titleShow }}">
|
|
4
4
|
{{ title }}
|
|
5
5
|
<image mode="widthFix" src="{{ resourceUrl + '/icon_image/close_circle2x.png' }}" class="close-icon" bind:tap="closePopup"></image>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.auth-mask-box{position:fixed;left:0;top:0;bottom:0;right:0;width:100%;background-color:rgba(0,0,0,.5);z-index:99999}.auth-mask-popup{position:fixed;bottom:0;left:0;
|
|
1
|
+
.auth-mask-box{position:fixed;left:0;top:0;bottom:0;right:0;width:100%;background-color:rgba(0,0,0,.5);z-index:99999}.auth-mask-popup{position:fixed;bottom:0;left:0;padding:10px 0 30px 0;width:92%;z-index:99999}.auth-mask-popup .popup-title{color:#333;font-size:14px;padding:10px 0;font-weight:bold;display:flex;align-items:center;justify-content:space-between}.auth-mask-popup .popup-title .close-icon{width:20px}
|
|
@@ -28,10 +28,10 @@ Component({
|
|
|
28
28
|
type: String,
|
|
29
29
|
value: "/pages/home/index"
|
|
30
30
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
type:
|
|
34
|
-
value:
|
|
31
|
+
// 登录后跳转方式 "redirectTo switchTab reLaunch navigateTo"
|
|
32
|
+
linkType: {
|
|
33
|
+
type: String,
|
|
34
|
+
value: ""
|
|
35
35
|
},
|
|
36
36
|
//遮罩层效果
|
|
37
37
|
isShowModel: {
|
|
@@ -85,14 +85,22 @@ Component({
|
|
|
85
85
|
});
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
|
-
if (this.properties.
|
|
88
|
+
if (this.properties.linkType === "switchTab") {
|
|
89
89
|
wx.switchTab({
|
|
90
90
|
url: this.properties.backurl
|
|
91
91
|
});
|
|
92
|
-
} else {
|
|
92
|
+
} else if (this.properties.linkType === "navigateTo") {
|
|
93
93
|
wx.navigateTo({
|
|
94
94
|
url: this.properties.backurl
|
|
95
95
|
});
|
|
96
|
+
} else if (this.properties.linkType === "reLaunch") {
|
|
97
|
+
wx.reLaunch({
|
|
98
|
+
url: this.properties.backurl
|
|
99
|
+
});
|
|
100
|
+
} else {
|
|
101
|
+
wx.redirectTo({
|
|
102
|
+
url: this.properties.backurl
|
|
103
|
+
});
|
|
96
104
|
}
|
|
97
105
|
});
|
|
98
106
|
} else {
|
package/dist/utils/common.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare const validateRules: (value: string, message: string, rules: any)
|
|
|
10
10
|
* @param {string} value 需要校验的值
|
|
11
11
|
* @param {string} message 错误提示信息
|
|
12
12
|
*/
|
|
13
|
-
export declare const validateRequired: (value: string, message: string) => boolean;
|
|
13
|
+
export declare const validateRequired: (value: string | number, message: string) => boolean;
|
|
14
14
|
/**
|
|
15
15
|
* 格式化日期时间字符串
|
|
16
16
|
* @param dateTimeString 日期时间字符串
|
package/dist/utils/common.js
CHANGED
|
@@ -11,7 +11,8 @@ const validateRules = (value, message, rules) => {
|
|
|
11
11
|
};
|
|
12
12
|
const validateRequired = (value, message) => {
|
|
13
13
|
console.log(value, message);
|
|
14
|
-
|
|
14
|
+
const valueStr = typeof value === "number" ? String(value) : value;
|
|
15
|
+
if (!valueStr || valueStr.trim() == "") {
|
|
15
16
|
wx.showToast({
|
|
16
17
|
title: message,
|
|
17
18
|
icon: "none",
|
package/package.json
CHANGED
|
Binary file
|