xyvcard-wechat-auth 0.0.40 → 0.0.42
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/auth-user/jmash-user/index.js +4 -0
- package/dist/components/auth-user/jmash-user/index.wxml +1 -0
- package/dist/components/common/auth-btn/three-btn/index.json +3 -3
- package/dist/components/common/auth-btn/three-btn/index.wxml +5 -5
- package/dist/components/common/auth-form/upload-file/index.json +6 -6
- package/dist/components/common/auth-form/upload-file/index.wxml +8 -8
- package/dist/components/common/auth-form/upload-image/index.js +31 -10
- package/dist/components/common/auth-form/upload-image/index.json +3 -3
- package/dist/components/common/auth-form/upload-image/index.wxml +8 -8
- package/dist/components/jmash-login/index.js +1 -1
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<block wx:if="{{ token }}">
|
|
3
3
|
<view class="auth-user-l">
|
|
4
4
|
<image src="{{ BASE_URL + userInfo.avatar }}" class="avatar-img" wx:if="{{ userInfo.avatar }}"></image>
|
|
5
|
+
<image src="{{ resourceUrl + '/' + defaultAvatar }}" class="avatar-img" wx:elif="{{ defaultAvatar }}"></image>
|
|
5
6
|
<image src="{{ resourceUrl }}/tswk.png" class="avatar-img" wx:else></image>
|
|
6
7
|
<view class="auth-user-r">
|
|
7
8
|
<view class="user-edit">{{ userInfo.realName }}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
2
|
-
"component": true,
|
|
3
|
-
"usingComponents": {}
|
|
1
|
+
{
|
|
2
|
+
"component": true,
|
|
3
|
+
"usingComponents": {}
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<view class="auth-btn-box">
|
|
2
|
-
<button class="btn-left" style="background: {{ leftBgColor }}; color: {{ leftColor }}; border-radius: {{ leftRadius }}; border: {{ leftBorder }};" bind:tap="handleLeft">{{ leftText }}</button>
|
|
3
|
-
<button class="btn-left" style="background: {{ centerBgColor }}; color: {{ centerColor }}; border-radius: {{ centerRadius }}; border: {{ centerBorder }};" bind:tap="handleCenter">{{ centerText }}</button>
|
|
4
|
-
<button class="btn-right" style="background: {{ rightBgColor }}; color: {{ rightColor }}; border-radius: {{ rightRadius }}; border: {{ rightBorder }};" bind:tap="handleRight">{{ rightText }}</button>
|
|
5
|
-
</view>
|
|
1
|
+
<view class="auth-btn-box">
|
|
2
|
+
<button class="btn-left" style="background: {{ leftBgColor }}; color: {{ leftColor }}; border-radius: {{ leftRadius }}; border: {{ leftBorder }};" bind:tap="handleLeft">{{ leftText }}</button>
|
|
3
|
+
<button class="btn-left" style="background: {{ centerBgColor }}; color: {{ centerColor }}; border-radius: {{ centerRadius }}; border: {{ centerBorder }};" bind:tap="handleCenter">{{ centerText }}</button>
|
|
4
|
+
<button class="btn-right" style="background: {{ rightBgColor }}; color: {{ rightColor }}; border-radius: {{ rightRadius }}; border: {{ rightBorder }};" bind:tap="handleRight">{{ rightText }}</button>
|
|
5
|
+
</view>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"component": true,
|
|
3
|
-
"usingComponents": {
|
|
4
|
-
"van-progress": "@vant/weapp/progress/index",
|
|
5
|
-
"auth-popup": "../../auth-popup/index"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"component": true,
|
|
3
|
+
"usingComponents": {
|
|
4
|
+
"van-progress": "@vant/weapp/progress/index",
|
|
5
|
+
"auth-popup": "../../auth-popup/index"
|
|
6
|
+
}
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<button class="file-btn" bindtap="chooseFileModel" style="{{ fileStyle }}">上传附件</button>
|
|
2
|
-
|
|
3
|
-
<van-progress wx:if="{{ percentage < 100 }}" percentage="{{ percentage }}" />
|
|
4
|
-
|
|
5
|
-
<auth-popup show="{{ closeModel }}" titleShow="{{ false }}">
|
|
6
|
-
<view class="item" bind:tap="handleUploadFile">微信</view>
|
|
7
|
-
<view class="item" bind:tap="handleAlbumImg">相册</view>
|
|
8
|
-
</auth-popup>
|
|
1
|
+
<button class="file-btn" bindtap="chooseFileModel" style="{{ fileStyle }}">上传附件</button>
|
|
2
|
+
|
|
3
|
+
<van-progress wx:if="{{ percentage < 100 }}" percentage="{{ percentage }}" />
|
|
4
|
+
|
|
5
|
+
<auth-popup show="{{ closeModel }}" titleShow="{{ false }}">
|
|
6
|
+
<view class="item" bind:tap="handleUploadFile">微信</view>
|
|
7
|
+
<view class="item" bind:tap="handleAlbumImg">相册</view>
|
|
8
|
+
</auth-popup>
|
|
@@ -18,6 +18,21 @@ Component({
|
|
|
18
18
|
delIconUrl: {
|
|
19
19
|
type: String,
|
|
20
20
|
value: "/icon_image/close_circle2x.png"
|
|
21
|
+
},
|
|
22
|
+
// 图片和视频选择的来源(album 从相册选择 | camera 使用相机拍摄)
|
|
23
|
+
sourceType: {
|
|
24
|
+
type: String,
|
|
25
|
+
value: ""
|
|
26
|
+
},
|
|
27
|
+
// 上传之后的值 Array<FileInfo>
|
|
28
|
+
previewImageUrls: {
|
|
29
|
+
type: Array,
|
|
30
|
+
value: [],
|
|
31
|
+
observer(val) {
|
|
32
|
+
this.setData({
|
|
33
|
+
imageArray: val
|
|
34
|
+
});
|
|
35
|
+
}
|
|
21
36
|
}
|
|
22
37
|
},
|
|
23
38
|
/**
|
|
@@ -42,17 +57,23 @@ Component({
|
|
|
42
57
|
});
|
|
43
58
|
return;
|
|
44
59
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
if (that.properties.sourceType === "album") {
|
|
61
|
+
that.chooseWxHeadImage("album");
|
|
62
|
+
} else if (that.properties.sourceType === "camera") {
|
|
63
|
+
that.chooseWxHeadImage("camera");
|
|
64
|
+
} else {
|
|
65
|
+
wx.showActionSheet({
|
|
66
|
+
itemList: ["从相册中选择", "拍照"],
|
|
67
|
+
itemColor: "#486aff",
|
|
68
|
+
success: function(res) {
|
|
69
|
+
if (res.tapIndex === 0) {
|
|
70
|
+
that.chooseWxHeadImage("album");
|
|
71
|
+
} else if (res.tapIndex == 1) {
|
|
72
|
+
that.chooseWxHeadImage("camera");
|
|
73
|
+
}
|
|
53
74
|
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
56
77
|
},
|
|
57
78
|
chooseWxHeadImage(type) {
|
|
58
79
|
const that = this;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
2
|
-
"component": true,
|
|
3
|
-
"usingComponents": {}
|
|
1
|
+
{
|
|
2
|
+
"component": true,
|
|
3
|
+
"usingComponents": {}
|
|
4
4
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<view class="upload-box">
|
|
2
|
-
<view class="upload-image" wx:for="{{ imageArray }}" wx:key="index">
|
|
3
|
-
<image src="{{ baseUrl + item.fileSrc }}" class="plus-image"></image>
|
|
4
|
-
<image src="{{ resourceUrl + delIconUrl }}" class="delete-image" data-index="{{ index }}" bind:tap="handleDel"></image>
|
|
5
|
-
</view>
|
|
6
|
-
<view class="upload-cover" bind:tap="handleUploadImage">
|
|
7
|
-
<image src="{{ resourceUrl + coverUpload }}" class="plus-image"></image>
|
|
8
|
-
</view>
|
|
1
|
+
<view class="upload-box">
|
|
2
|
+
<view class="upload-image" wx:for="{{ imageArray }}" wx:key="index">
|
|
3
|
+
<image src="{{ baseUrl + item.fileSrc }}" class="plus-image"></image>
|
|
4
|
+
<image src="{{ resourceUrl + delIconUrl }}" class="delete-image" data-index="{{ index }}" bind:tap="handleDel"></image>
|
|
5
|
+
</view>
|
|
6
|
+
<view class="upload-cover" bind:tap="handleUploadImage">
|
|
7
|
+
<image src="{{ resourceUrl + coverUpload }}" class="plus-image"></image>
|
|
8
|
+
</view>
|
|
9
9
|
</view>
|