xyvcard-wechat-auth 0.0.18 → 0.0.19
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/api/auth/index.js +1 -159
- package/dist/api/auth/types.js +1 -1
- package/dist/api/dict/index.js +1 -36
- package/dist/api/dict/types.js +1 -1
- package/dist/api/dicts.js +1 -53
- package/dist/api/files/index.js +1 -135
- package/dist/api/files/types.js +1 -1
- package/dist/api/index.js +1 -12
- package/dist/api/myorgan/index.js +1 -1
- package/dist/api/myorgan/types.js +1 -1
- package/dist/api/types.js +1 -9
- package/dist/app.d.ts +0 -0
- package/dist/app.js +1 -0
- package/dist/app.json +27 -0
- package/dist/app.wxss +0 -0
- package/dist/components/auth-user/jmash-update-user/index.js +1 -133
- package/dist/components/auth-user/jmash-user/index.js +1 -56
- package/dist/components/common/auth-avatar/avatar-edit/index.js +1 -82
- package/dist/components/common/auth-btn/double-btn/index.js +1 -67
- package/dist/components/common/auth-btn/single-btn/index.js +1 -34
- package/dist/components/common/auth-none-data/none-data-image/index.js +1 -53
- package/dist/components/common/auth-popup/index.js +1 -50
- package/dist/components/common/auth-search/index.js +1 -60
- package/dist/components/common/auth-top-navigation/index.js +1 -49
- package/dist/components/jmash-half-login/index.js +1 -105
- package/dist/components/jmash-login/index.js +1 -113
- package/dist/constant.js +1 -15
- package/dist/index.js +1 -35
- package/dist/pages/auth/login/index.d.ts +1 -0
- package/dist/pages/auth/login/index.js +1 -0
- package/dist/pages/auth/login/index.json +5 -0
- package/dist/pages/auth/login/index.wxml +6 -0
- package/dist/pages/auth/login/index.wxss +1 -0
- package/dist/pages/demo/index.d.ts +0 -0
- package/dist/pages/demo/index.js +1 -0
- package/dist/pages/demo/index.json +14 -0
- package/dist/pages/demo/index.wxml +11 -0
- package/dist/pages/demo/index.wxss +0 -0
- package/dist/pages/half-home/index.d.ts +1 -0
- package/dist/pages/half-home/index.js +1 -0
- package/dist/pages/half-home/index.json +5 -0
- package/dist/pages/half-home/index.wxml +5 -0
- package/dist/pages/half-home/index.wxss +0 -0
- package/dist/pages/home/index.d.ts +1 -0
- package/dist/pages/home/index.js +1 -0
- package/dist/pages/home/index.json +3 -0
- package/dist/pages/home/index.wxml +2 -0
- package/dist/pages/home/index.wxss +0 -0
- package/dist/pages/index/index.d.ts +1 -0
- package/dist/pages/index/index.js +1 -0
- package/dist/pages/index/index.json +4 -0
- package/dist/pages/index/index.wxml +8 -0
- package/dist/pages/index/index.wxss +0 -0
- package/dist/sitemap.json +7 -0
- package/dist/utils/auth.js +1 -212
- package/dist/utils/common.d.ts +1 -1
- package/dist/utils/common.js +1 -112
- package/dist/utils/config.js +1 -29
- package/dist/utils/db.js +1 -188
- package/dist/utils/request.js +1 -86
- package/dist/utils/util.js +1 -88
- package/package.json +1 -1
|
@@ -1,82 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { fileApi } from "../../../../api/files/index.js";
|
|
3
|
-
Component({
|
|
4
|
-
/**
|
|
5
|
-
* 组件的属性列表
|
|
6
|
-
*/
|
|
7
|
-
properties: {
|
|
8
|
-
// 头像路径 form绑定的这个属性
|
|
9
|
-
value: {
|
|
10
|
-
type: String,
|
|
11
|
-
value: "",
|
|
12
|
-
observer() {
|
|
13
|
-
this.setData({
|
|
14
|
-
avatar: this.properties.value ? fileApi.imageUrl(this.properties.value, 320, 320, "trans") : this.data.avatar
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
// logo图片路径-全路径 编辑回显使用
|
|
19
|
-
logoImg: {
|
|
20
|
-
type: String,
|
|
21
|
-
value: "",
|
|
22
|
-
observer() {
|
|
23
|
-
this.setData({
|
|
24
|
-
avatar: this.properties.logoImg ? this.properties.logoImg : this.data.avatar
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
// 是否显示默认logo
|
|
29
|
-
logo: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
value: false,
|
|
32
|
-
observer() {
|
|
33
|
-
this.setData({
|
|
34
|
-
avatar: this.properties.logo ? this.data.defaultlogo : this.data.avatar
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
// 路径的类型,全路径状态为true,相对路径状态为false
|
|
39
|
-
pathType: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
value: false
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
/**
|
|
45
|
-
* 组件的初始数据
|
|
46
|
-
*/
|
|
47
|
-
data: {
|
|
48
|
-
resourceUrl: config.resourceUrl + "/images",
|
|
49
|
-
// 默认头像图片
|
|
50
|
-
avatar: config.resourceUrl + "/images/components/gray_head2x.png",
|
|
51
|
-
// 默认logo图片
|
|
52
|
-
defaultlogo: config.resourceUrl + "/images/components/gray_logo.png"
|
|
53
|
-
},
|
|
54
|
-
/**
|
|
55
|
-
* 组件的生命周期
|
|
56
|
-
*/
|
|
57
|
-
lifetimes: {
|
|
58
|
-
attached() {
|
|
59
|
-
if (this.properties.value != "") {
|
|
60
|
-
this.data.avatar = this.properties.pathType ? this.properties.value : fileApi.imageUrl(this.properties.value, 320, 320, "trans");
|
|
61
|
-
this.setData({
|
|
62
|
-
avatar: this.data.avatar
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
/**
|
|
68
|
-
* 组件的方法列表
|
|
69
|
-
*/
|
|
70
|
-
methods: {
|
|
71
|
-
// 选择头像
|
|
72
|
-
onChooseAvatar(e) {
|
|
73
|
-
const { avatarUrl } = e.detail;
|
|
74
|
-
fileApi.uploadFile(avatarUrl).then((res) => {
|
|
75
|
-
this.triggerEvent("change", res, {});
|
|
76
|
-
this.setData({
|
|
77
|
-
avatar: fileApi.imageUrl(res.data.fileSrc, 320, 320, "trans")
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
});
|
|
1
|
+
"use strict";const e=require("../../../../utils/config.js"),t=require("../../../../api/files/index.js");Component({properties:{value:{type:String,value:"",observer(){this.setData({avatar:this.properties.value?t.fileApi.imageUrl(this.properties.value,320,320,"trans"):this.data.avatar})}},logoImg:{type:String,value:"",observer(){this.setData({avatar:this.properties.logoImg?this.properties.logoImg:this.data.avatar})}},logo:{type:Boolean,value:!1,observer(){this.setData({avatar:this.properties.logo?this.data.defaultlogo:this.data.avatar})}},pathType:{type:Boolean,value:!1}},data:{resourceUrl:e.config.resourceUrl+"/images",avatar:e.config.resourceUrl+"/images/components/gray_head2x.png",defaultlogo:e.config.resourceUrl+"/images/components/gray_logo.png"},lifetimes:{attached(){""!=this.properties.value&&(this.data.avatar=this.properties.pathType?this.properties.value:t.fileApi.imageUrl(this.properties.value,320,320,"trans"),this.setData({avatar:this.data.avatar}))}},methods:{onChooseAvatar(e){const{avatarUrl:a}=e.detail;t.fileApi.uploadFile(a).then(e=>{this.triggerEvent("change",e,{}),this.setData({avatar:t.fileApi.imageUrl(e.data.fileSrc,320,320,"trans")})})}}}),"object"==typeof exports&&"undefined"!=typeof module&&Object.keys(module.exports).forEach(function(e){exports[e]=module.exports[e]});
|
|
@@ -1,67 +1 @@
|
|
|
1
|
-
Component({
|
|
2
|
-
/**
|
|
3
|
-
* 组件的属性列表
|
|
4
|
-
*/
|
|
5
|
-
properties: {
|
|
6
|
-
// 左侧的文本内容
|
|
7
|
-
leftText: {
|
|
8
|
-
type: String,
|
|
9
|
-
value: ""
|
|
10
|
-
},
|
|
11
|
-
// 右侧的文本内容
|
|
12
|
-
rightText: {
|
|
13
|
-
type: String,
|
|
14
|
-
value: ""
|
|
15
|
-
},
|
|
16
|
-
// 左侧按钮背景色
|
|
17
|
-
leftBgColor: {
|
|
18
|
-
type: String,
|
|
19
|
-
value: ""
|
|
20
|
-
},
|
|
21
|
-
// 右侧按钮背景色
|
|
22
|
-
rightBgColor: {
|
|
23
|
-
type: String,
|
|
24
|
-
value: ""
|
|
25
|
-
},
|
|
26
|
-
// 左侧按钮字体颜色
|
|
27
|
-
leftColor: {
|
|
28
|
-
type: String,
|
|
29
|
-
value: ""
|
|
30
|
-
},
|
|
31
|
-
// 右侧按钮字体颜色
|
|
32
|
-
rightColor: {
|
|
33
|
-
type: String,
|
|
34
|
-
value: ""
|
|
35
|
-
},
|
|
36
|
-
// 按钮圆角
|
|
37
|
-
btnRadius: {
|
|
38
|
-
type: String,
|
|
39
|
-
value: ""
|
|
40
|
-
},
|
|
41
|
-
// 左侧按钮边框
|
|
42
|
-
leftBorder: {
|
|
43
|
-
type: String,
|
|
44
|
-
value: ""
|
|
45
|
-
},
|
|
46
|
-
// 右侧按钮边框
|
|
47
|
-
rightBorder: {
|
|
48
|
-
type: String,
|
|
49
|
-
value: ""
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
/**
|
|
53
|
-
* 组件的初始数据
|
|
54
|
-
*/
|
|
55
|
-
data: {},
|
|
56
|
-
/**
|
|
57
|
-
* 组件的方法列表
|
|
58
|
-
*/
|
|
59
|
-
methods: {
|
|
60
|
-
handleLeft() {
|
|
61
|
-
this.triggerEvent("leftbtn");
|
|
62
|
-
},
|
|
63
|
-
handleRight() {
|
|
64
|
-
this.triggerEvent("rightbtn");
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
});
|
|
1
|
+
"use strict";Component({properties:{leftText:{type:String,value:""},rightText:{type:String,value:""},leftBgColor:{type:String,value:""},rightBgColor:{type:String,value:""},leftColor:{type:String,value:""},rightColor:{type:String,value:""},btnRadius:{type:String,value:""},leftBorder:{type:String,value:""},rightBorder:{type:String,value:""}},data:{},methods:{handleLeft(){this.triggerEvent("leftbtn")},handleRight(){this.triggerEvent("rightbtn")}}}),"object"==typeof exports&&"undefined"!=typeof module&&Object.keys(module.exports).forEach(function(t){exports[t]=module.exports[t]});
|
|
@@ -1,34 +1 @@
|
|
|
1
|
-
Component({
|
|
2
|
-
/**
|
|
3
|
-
* 组件的属性列表
|
|
4
|
-
*/
|
|
5
|
-
properties: {
|
|
6
|
-
// 文本
|
|
7
|
-
text: {
|
|
8
|
-
type: String,
|
|
9
|
-
value: ""
|
|
10
|
-
},
|
|
11
|
-
// 禁用
|
|
12
|
-
disabled: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
value: false
|
|
15
|
-
},
|
|
16
|
-
// 按钮的样式(包括字体颜色,背景色等)
|
|
17
|
-
buttonStyle: {
|
|
18
|
-
type: String,
|
|
19
|
-
value: "background-color: #2563EB;color: #fff;"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
/**
|
|
23
|
-
* 组件的初始数据
|
|
24
|
-
*/
|
|
25
|
-
data: {},
|
|
26
|
-
/**
|
|
27
|
-
* 组件的方法列表
|
|
28
|
-
*/
|
|
29
|
-
methods: {
|
|
30
|
-
onClick() {
|
|
31
|
-
this.triggerEvent("click", null, {});
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
});
|
|
1
|
+
"use strict";Component({properties:{text:{type:String,value:""},disabled:{type:Boolean,value:!1},buttonStyle:{type:String,value:"background-color: #2563EB;color: #fff;"}},data:{},methods:{onClick(){this.triggerEvent("click",null,{})}}}),"object"==typeof exports&&"undefined"!=typeof module&&Object.keys(module.exports).forEach(function(e){exports[e]=module.exports[e]});
|
|
@@ -1,53 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Component({
|
|
3
|
-
/**
|
|
4
|
-
* 组件的属性列表
|
|
5
|
-
*/
|
|
6
|
-
properties: {
|
|
7
|
-
// 上外边距
|
|
8
|
-
marginTop: {
|
|
9
|
-
type: Number,
|
|
10
|
-
value: 300
|
|
11
|
-
},
|
|
12
|
-
// 上内边距
|
|
13
|
-
paddingTop: {
|
|
14
|
-
type: Number,
|
|
15
|
-
value: 0
|
|
16
|
-
},
|
|
17
|
-
// 文本内容
|
|
18
|
-
content: {
|
|
19
|
-
type: String,
|
|
20
|
-
value: "暂无数据"
|
|
21
|
-
},
|
|
22
|
-
// 图片的宽
|
|
23
|
-
imgWidth: {
|
|
24
|
-
type: String,
|
|
25
|
-
value: "auto"
|
|
26
|
-
},
|
|
27
|
-
// 图片的高
|
|
28
|
-
imgHeight: {
|
|
29
|
-
type: String,
|
|
30
|
-
value: "125px"
|
|
31
|
-
},
|
|
32
|
-
// 图片的路径
|
|
33
|
-
imgUrl: {
|
|
34
|
-
type: String,
|
|
35
|
-
value: "/components/contacts_nomore2x.png"
|
|
36
|
-
},
|
|
37
|
-
contentColor: {
|
|
38
|
-
type: String,
|
|
39
|
-
value: "#b6b6b6"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
/**
|
|
43
|
-
* 组件的初始数据
|
|
44
|
-
*/
|
|
45
|
-
data: {
|
|
46
|
-
// 图片资源路径/v1/file/path/wxapp/
|
|
47
|
-
resourceUrl: config.resourceUrl + "/images"
|
|
48
|
-
},
|
|
49
|
-
/**
|
|
50
|
-
* 组件的方法列表
|
|
51
|
-
*/
|
|
52
|
-
methods: {}
|
|
53
|
-
});
|
|
1
|
+
"use strict";const e=require("../../../../utils/config.js");Component({properties:{marginTop:{type:Number,value:300},paddingTop:{type:Number,value:0},content:{type:String,value:"暂无数据"},imgWidth:{type:String,value:"auto"},imgHeight:{type:String,value:"125px"},imgUrl:{type:String,value:"/components/contacts_nomore2x.png"},contentColor:{type:String,value:"#b6b6b6"}},data:{resourceUrl:e.config.resourceUrl+"/images"},methods:{}}),"object"==typeof exports&&"undefined"!=typeof module&&Object.keys(module.exports).forEach(function(e){exports[e]=module.exports[e]});
|
|
@@ -1,50 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Component({
|
|
3
|
-
/**
|
|
4
|
-
* 组件的属性列表
|
|
5
|
-
*/
|
|
6
|
-
properties: {
|
|
7
|
-
// 是否显示
|
|
8
|
-
show: {
|
|
9
|
-
type: Boolean,
|
|
10
|
-
value: false
|
|
11
|
-
},
|
|
12
|
-
// 标题
|
|
13
|
-
title: {
|
|
14
|
-
type: String,
|
|
15
|
-
value: ""
|
|
16
|
-
},
|
|
17
|
-
// 是否显示标题
|
|
18
|
-
titleShow: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
value: false
|
|
21
|
-
},
|
|
22
|
-
// 高
|
|
23
|
-
height: {
|
|
24
|
-
type: String,
|
|
25
|
-
value: "300px"
|
|
26
|
-
},
|
|
27
|
-
// 背景色
|
|
28
|
-
backColor: {
|
|
29
|
-
type: String,
|
|
30
|
-
value: "#fff"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
/**
|
|
34
|
-
* 组件的初始数据
|
|
35
|
-
*/
|
|
36
|
-
data: {
|
|
37
|
-
resourceUrl: config.resourceUrl + "/images",
|
|
38
|
-
// 是否显示
|
|
39
|
-
closeModel: false,
|
|
40
|
-
titleShow: true
|
|
41
|
-
},
|
|
42
|
-
/**
|
|
43
|
-
* 组件的方法列表
|
|
44
|
-
*/
|
|
45
|
-
methods: {
|
|
46
|
-
closePopup() {
|
|
47
|
-
this.triggerEvent("close", null, {});
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
});
|
|
1
|
+
"use strict";const e=require("../../../utils/config.js");Component({properties:{show:{type:Boolean,value:!1},title:{type:String,value:""},titleShow:{type:Boolean,value:!1},height:{type:String,value:"300px"},backColor:{type:String,value:"#fff"}},data:{resourceUrl:e.config.resourceUrl+"/images",closeModel:!1,titleShow:!0},methods:{closePopup(){this.triggerEvent("close",null,{})}}}),"object"==typeof exports&&"undefined"!=typeof module&&Object.keys(module.exports).forEach(function(e){exports[e]=module.exports[e]});
|
|
@@ -1,60 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Component({
|
|
3
|
-
/**
|
|
4
|
-
* 组件的属性列表
|
|
5
|
-
*/
|
|
6
|
-
properties: {
|
|
7
|
-
placeholder: {
|
|
8
|
-
type: String,
|
|
9
|
-
value: ""
|
|
10
|
-
},
|
|
11
|
-
disabled: {
|
|
12
|
-
type: Boolean,
|
|
13
|
-
value: false
|
|
14
|
-
},
|
|
15
|
-
// 是否显示右侧内容
|
|
16
|
-
isSearchBtn: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
value: false
|
|
19
|
-
},
|
|
20
|
-
// value值
|
|
21
|
-
likeName: {
|
|
22
|
-
type: String,
|
|
23
|
-
value: ""
|
|
24
|
-
},
|
|
25
|
-
// 背景色
|
|
26
|
-
backColor: {
|
|
27
|
-
type: String,
|
|
28
|
-
value: "#fff"
|
|
29
|
-
},
|
|
30
|
-
// 是否有阴影
|
|
31
|
-
searchStyle: {
|
|
32
|
-
type: String,
|
|
33
|
-
value: ""
|
|
34
|
-
},
|
|
35
|
-
// 是否聚焦
|
|
36
|
-
focus: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
value: false
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
/**
|
|
42
|
-
* 组件的初始数据
|
|
43
|
-
*/
|
|
44
|
-
data: {
|
|
45
|
-
resourceUrl: config.resourceUrl + "/images"
|
|
46
|
-
},
|
|
47
|
-
/**
|
|
48
|
-
* 组件的方法列表
|
|
49
|
-
*/
|
|
50
|
-
methods: {
|
|
51
|
-
handleInput(e) {
|
|
52
|
-
const { value } = e.detail;
|
|
53
|
-
this.triggerEvent("handleSearch", value);
|
|
54
|
-
},
|
|
55
|
-
// 一般用于点击搜索框跳转到搜索页
|
|
56
|
-
handleTap() {
|
|
57
|
-
this.triggerEvent("click");
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
});
|
|
1
|
+
"use strict";const e=require("../../../utils/config.js");Component({properties:{placeholder:{type:String,value:""},disabled:{type:Boolean,value:!1},isSearchBtn:{type:Boolean,value:!1},likeName:{type:String,value:""},backColor:{type:String,value:"#fff"},searchStyle:{type:String,value:""},focus:{type:Boolean,value:!1}},data:{resourceUrl:e.config.resourceUrl+"/images"},methods:{handleInput(e){const{value:t}=e.detail;this.triggerEvent("handleSearch",t)},handleTap(){this.triggerEvent("click")}}}),"object"==typeof exports&&"undefined"!=typeof module&&Object.keys(module.exports).forEach(function(e){exports[e]=module.exports[e]});
|
|
@@ -1,49 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { getHeight } from "../../../utils/common.js";
|
|
3
|
-
Component({
|
|
4
|
-
/**
|
|
5
|
-
* 组件的属性列表
|
|
6
|
-
*/
|
|
7
|
-
properties: {
|
|
8
|
-
// 标题
|
|
9
|
-
title: {
|
|
10
|
-
type: String,
|
|
11
|
-
value: ""
|
|
12
|
-
},
|
|
13
|
-
// 左侧icon图标 跳转到查看消息页面
|
|
14
|
-
isLeftIcon: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
value: true
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
/**
|
|
20
|
-
* 组件的初始数据
|
|
21
|
-
*/
|
|
22
|
-
data: {
|
|
23
|
-
resourceUrl: config.resourceUrl + "/images",
|
|
24
|
-
// 样式控制对象
|
|
25
|
-
style: {
|
|
26
|
-
// 导航栏的高度
|
|
27
|
-
height: getHeight().MenuButtonBottom - getHeight().MenuButtonTop,
|
|
28
|
-
// 标题顶部内边距
|
|
29
|
-
titlePaddingTop: getHeight().MenuButtonBounding / 10,
|
|
30
|
-
// 导航栏顶部内边距
|
|
31
|
-
paddingTop: getHeight().MenuButtonTop,
|
|
32
|
-
// 存储当前页面滚动的高度
|
|
33
|
-
pageScrollTop: 0,
|
|
34
|
-
// 胶囊球的宽度
|
|
35
|
-
buttonWidth: getHeight().MenuButtonWidth,
|
|
36
|
-
// 背景色
|
|
37
|
-
color: ""
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
/**
|
|
41
|
-
* 组件的方法列表
|
|
42
|
-
*/
|
|
43
|
-
methods: {
|
|
44
|
-
// 返回
|
|
45
|
-
handleBack() {
|
|
46
|
-
this.triggerEvent("eventBackTo");
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
});
|
|
1
|
+
"use strict";const e=require("../../../utils/config.js"),t=require("../../../utils/common.js");Component({properties:{title:{type:String,value:""},isLeftIcon:{type:Boolean,value:!0}},data:{resourceUrl:e.config.resourceUrl+"/images",style:{height:t.getHeight().MenuButtonBottom-t.getHeight().MenuButtonTop,titlePaddingTop:t.getHeight().MenuButtonBounding/10,paddingTop:t.getHeight().MenuButtonTop,pageScrollTop:0,buttonWidth:t.getHeight().MenuButtonWidth,color:""}},methods:{handleBack(){this.triggerEvent("eventBackTo")}}}),"object"==typeof exports&&"undefined"!=typeof module&&Object.keys(module.exports).forEach(function(e){exports[e]=module.exports[e]});
|
|
@@ -1,105 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { config } from "../../utils/config.js";
|
|
3
|
-
Component({
|
|
4
|
-
/**
|
|
5
|
-
* 组件的属性列表
|
|
6
|
-
*/
|
|
7
|
-
properties: {
|
|
8
|
-
show: {
|
|
9
|
-
type: Boolean,
|
|
10
|
-
value: false,
|
|
11
|
-
observer() {
|
|
12
|
-
this.setData({
|
|
13
|
-
isShow: this.properties.show
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
/**
|
|
19
|
-
* 组件的初始数据
|
|
20
|
-
*/
|
|
21
|
-
data: {
|
|
22
|
-
resourceUrl: config.resourceUrl + "/images",
|
|
23
|
-
avatar: config.resourceUrl + "/images/components/gray_head2x.png",
|
|
24
|
-
isShow: false,
|
|
25
|
-
// 是否勾选协议
|
|
26
|
-
isCheckBox: false,
|
|
27
|
-
// 微信姓名
|
|
28
|
-
nameValue: "",
|
|
29
|
-
// 检验是否通过
|
|
30
|
-
isValidate: false
|
|
31
|
-
},
|
|
32
|
-
/**
|
|
33
|
-
* 组件的方法列表
|
|
34
|
-
*/
|
|
35
|
-
methods: {
|
|
36
|
-
onClose: function() {
|
|
37
|
-
this.setData({ isShow: false });
|
|
38
|
-
this.triggerEvent("close", this.data.isShow);
|
|
39
|
-
},
|
|
40
|
-
// 协议勾选方法
|
|
41
|
-
onChange: function() {
|
|
42
|
-
this.data.isCheckBox = !this.data.isCheckBox;
|
|
43
|
-
let res = this.validate();
|
|
44
|
-
this.setData({ isCheckBox: this.data.isCheckBox, isValidate: res.validate });
|
|
45
|
-
},
|
|
46
|
-
onLogin: function() {
|
|
47
|
-
let res = this.validate();
|
|
48
|
-
if (!res.validate) {
|
|
49
|
-
wx.showToast({
|
|
50
|
-
icon: "error",
|
|
51
|
-
title: res.message,
|
|
52
|
-
duration: 2e3
|
|
53
|
-
});
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
// 获取微信头像
|
|
58
|
-
onChooseAvatar: function(e) {
|
|
59
|
-
const { avatarUrl } = e.detail;
|
|
60
|
-
this.setData({ avatar: avatarUrl });
|
|
61
|
-
},
|
|
62
|
-
// 手机号授权登录
|
|
63
|
-
wxPhoneLogin: function(event) {
|
|
64
|
-
if (event.detail.errMsg === "getPhoneNumber:ok") {
|
|
65
|
-
auth.phoneCodeLogin(event.detail.code, this.data.nameValue).then((resp) => {
|
|
66
|
-
if (resp.status) {
|
|
67
|
-
this.triggerEvent("status", resp.status);
|
|
68
|
-
this.onClose();
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
// 输入姓名
|
|
74
|
-
bindKeyInput: function(e) {
|
|
75
|
-
var _a;
|
|
76
|
-
this.data.nameValue = (_a = e.detail) == null ? void 0 : _a.value;
|
|
77
|
-
let res = this.validate();
|
|
78
|
-
this.setData({ nameValue: this.data.nameValue, isValidate: res.validate });
|
|
79
|
-
},
|
|
80
|
-
// 校验
|
|
81
|
-
validate() {
|
|
82
|
-
if (!this.data.isCheckBox) {
|
|
83
|
-
return { validate: false, message: "是否已阅读协议" };
|
|
84
|
-
}
|
|
85
|
-
if (!this.data.nameValue) {
|
|
86
|
-
return { validate: false, message: "请输入姓名" };
|
|
87
|
-
}
|
|
88
|
-
return { validate: true, message: "" };
|
|
89
|
-
},
|
|
90
|
-
// 跳转隐私协议
|
|
91
|
-
goInfo(e) {
|
|
92
|
-
var _a;
|
|
93
|
-
const id = (_a = e.currentTarget) == null ? void 0 : _a.id;
|
|
94
|
-
if (id == "0") {
|
|
95
|
-
wx.navigateTo({
|
|
96
|
-
url: "/pages/cms/agreement/index"
|
|
97
|
-
});
|
|
98
|
-
} else if (id == "1") {
|
|
99
|
-
wx.navigateTo({
|
|
100
|
-
url: "/pages/cms/policy/index"
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
});
|
|
1
|
+
"use strict";const e=require("../../utils/auth.js"),t=require("../../utils/config.js");Component({properties:{show:{type:Boolean,value:!1,observer(){this.setData({isShow:this.properties.show})}}},data:{resourceUrl:t.config.resourceUrl+"/images",avatar:t.config.resourceUrl+"/images/components/gray_head2x.png",isShow:!1,isCheckBox:!1,nameValue:"",isValidate:!1},methods:{onClose:function(){this.setData({isShow:!1}),this.triggerEvent("close",this.data.isShow)},onChange:function(){this.data.isCheckBox=!this.data.isCheckBox;let e=this.validate();this.setData({isCheckBox:this.data.isCheckBox,isValidate:e.validate})},onLogin:function(){let e=this.validate();e.validate||wx.showToast({icon:"error",title:e.message,duration:2e3})},onChooseAvatar:function(e){const{avatarUrl:t}=e.detail;this.setData({avatar:t})},wxPhoneLogin:function(t){"getPhoneNumber:ok"===t.detail.errMsg&&e.auth.phoneCodeLogin(t.detail.code,this.data.nameValue).then(e=>{e.status&&(this.triggerEvent("status",e.status),this.onClose())})},bindKeyInput:function(e){var t;this.data.nameValue=null==(t=e.detail)?void 0:t.value;let a=this.validate();this.setData({nameValue:this.data.nameValue,isValidate:a.validate})},validate(){return this.data.isCheckBox?this.data.nameValue?{validate:!0,message:""}:{validate:!1,message:"请输入姓名"}:{validate:!1,message:"是否已阅读协议"}},goInfo(e){var t;const a=null==(t=e.currentTarget)?void 0:t.id;"0"==a?wx.navigateTo({url:"/pages/cms/agreement/index"}):"1"==a&&wx.navigateTo({url:"/pages/cms/policy/index"})}}}),"object"==typeof exports&&"undefined"!=typeof module&&Object.keys(module.exports).forEach(function(e){exports[e]=module.exports[e]});
|
|
@@ -1,113 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Component({
|
|
3
|
-
// 在组件定义时的选项中启用多slot支持
|
|
4
|
-
options: {
|
|
5
|
-
multipleSlots: true
|
|
6
|
-
},
|
|
7
|
-
/**
|
|
8
|
-
* 组件的属性列表
|
|
9
|
-
*/
|
|
10
|
-
properties: {
|
|
11
|
-
// 登录按钮样式
|
|
12
|
-
loginStyle: {
|
|
13
|
-
type: String,
|
|
14
|
-
value: "width: 100%;background-color: #2563EB;color: #fff;font-size: 15px;"
|
|
15
|
-
},
|
|
16
|
-
// 单选框选中的颜色
|
|
17
|
-
checkedColor: {
|
|
18
|
-
type: String,
|
|
19
|
-
value: "#0551ff"
|
|
20
|
-
},
|
|
21
|
-
// 协议样式
|
|
22
|
-
agreementStyle: {
|
|
23
|
-
type: String,
|
|
24
|
-
value: "color: #0551ff"
|
|
25
|
-
},
|
|
26
|
-
//登录后跳转页面
|
|
27
|
-
backurl: {
|
|
28
|
-
type: String,
|
|
29
|
-
value: "/pages/home/index"
|
|
30
|
-
},
|
|
31
|
-
//登录后调转是否是Tabbar
|
|
32
|
-
tabbar: {
|
|
33
|
-
type: Boolean,
|
|
34
|
-
value: true
|
|
35
|
-
},
|
|
36
|
-
//遮罩层效果
|
|
37
|
-
isShowModel: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
value: false
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
/**
|
|
43
|
-
* 组件的初始数据
|
|
44
|
-
*/
|
|
45
|
-
data: {
|
|
46
|
-
// 同意协议
|
|
47
|
-
agreeStatus: false
|
|
48
|
-
},
|
|
49
|
-
/**
|
|
50
|
-
* 组件的方法列表
|
|
51
|
-
*/
|
|
52
|
-
methods: {
|
|
53
|
-
// 协议勾选事件
|
|
54
|
-
agreeChange() {
|
|
55
|
-
this.setData({
|
|
56
|
-
agreeStatus: !this.data.agreeStatus
|
|
57
|
-
});
|
|
58
|
-
},
|
|
59
|
-
// 手机号授权登录
|
|
60
|
-
wxPhoneLogin(event) {
|
|
61
|
-
let that = this;
|
|
62
|
-
if (!this.data.agreeStatus) {
|
|
63
|
-
wx.showModal({
|
|
64
|
-
title: "提示",
|
|
65
|
-
content: "您是否已阅读《用户使用协议》《隐私权政策》?",
|
|
66
|
-
success(res) {
|
|
67
|
-
if (res.confirm) {
|
|
68
|
-
that.setData({ agreeStatus: true });
|
|
69
|
-
} else if (res.cancel) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
if (event.detail.errMsg === "getPhoneNumber:ok") {
|
|
77
|
-
console.log(event.detail.code);
|
|
78
|
-
auth.phoneCodeLogin(event.detail.code).then((resp) => {
|
|
79
|
-
console.log(resp);
|
|
80
|
-
if (resp.status == false) {
|
|
81
|
-
wx.showToast({
|
|
82
|
-
title: resp.message ? resp.message : "登录失败联系管理员",
|
|
83
|
-
icon: "none",
|
|
84
|
-
duration: 2e3
|
|
85
|
-
});
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
if (this.properties.tabbar) {
|
|
89
|
-
wx.switchTab({
|
|
90
|
-
url: this.properties.backurl
|
|
91
|
-
});
|
|
92
|
-
} else {
|
|
93
|
-
wx.navigateTo({
|
|
94
|
-
url: this.properties.backurl
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
} else {
|
|
99
|
-
wx.showToast({
|
|
100
|
-
title: "您已取消授权",
|
|
101
|
-
icon: "none",
|
|
102
|
-
duration: 2e3
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
// 跳转隐私协议
|
|
107
|
-
goInfo(e) {
|
|
108
|
-
var _a;
|
|
109
|
-
const id = (_a = e.currentTarget) == null ? void 0 : _a.id;
|
|
110
|
-
this.triggerEvent("policy", id);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
});
|
|
1
|
+
"use strict";const e=require("../../utils/auth.js");Component({options:{multipleSlots:!0},properties:{loginStyle:{type:String,value:"width: 100%;background-color: #2563EB;color: #fff;font-size: 15px;"},checkedColor:{type:String,value:"#0551ff"},agreementStyle:{type:String,value:"color: #0551ff"},backurl:{type:String,value:"/pages/home/index"},tabbar:{type:Boolean,value:!0},isShowModel:{type:Boolean,value:!1}},data:{agreeStatus:!1},methods:{agreeChange(){this.setData({agreeStatus:!this.data.agreeStatus})},wxPhoneLogin(t){let a=this;this.data.agreeStatus?"getPhoneNumber:ok"===t.detail.errMsg?e.auth.phoneCodeLogin(t.detail.code).then(e=>{0!=e.status?this.data.tabbar?wx.switchTab({url:this.data.backurl}):wx.navigateTo({url:this.data.backurl}):wx.showToast({title:e.message?e.message:"登录失败联系管理员",icon:"none",duration:2e3})}):wx.showToast({title:"您已取消授权",icon:"none",duration:2e3}):wx.showModal({title:"提示",content:"您是否已阅读《用户使用协议》《隐私权政策》?",success(e){if(e.confirm)a.setData({agreeStatus:!0});else if(e.cancel)return}})},goInfo(e){var t;const a=null==(t=e.currentTarget)?void 0:t.id;"0"==a?wx.navigateTo({url:"/pages/cms/agreement/index"}):"1"==a&&wx.navigateTo({url:"/pages/cms/policy/index"})}}}),"object"==typeof exports&&"undefined"!=typeof module&&Object.keys(module.exports).forEach(function(e){exports[e]=module.exports[e]});
|
package/dist/constant.js
CHANGED
|
@@ -1,15 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
3
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
4
|
-
};
|
|
5
|
-
var require_constant = __commonJS({
|
|
6
|
-
"constant.js"(exports, module) {
|
|
7
|
-
const _Constant = class _Constant {
|
|
8
|
-
};
|
|
9
|
-
_Constant.MODULE_RBAC = "rbac";
|
|
10
|
-
_Constant.ENUM_GENDER = "jmash.protobuf.Gender";
|
|
11
|
-
let Constant = _Constant;
|
|
12
|
-
module.exports = Constant;
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
export default require_constant();
|
|
1
|
+
"use strict";const e=class e{};e.MODULE_RBAC="rbac",e.ENUM_GENDER="jmash.protobuf.Gender";let o=e;module.exports=o,"object"==typeof exports&&"undefined"!=typeof module&&Object.keys(module.exports).forEach(function(e){exports[e]=module.exports[e]});
|