xyvcard-wechat-auth 0.0.39 → 0.0.41
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.
|
@@ -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
|
/**
|
|
@@ -25,7 +40,7 @@ Component({
|
|
|
25
40
|
*/
|
|
26
41
|
data: {
|
|
27
42
|
resourceUrl: config.resourceUrl,
|
|
28
|
-
baseUrl: config.baseUrl + "/v1/file/image/
|
|
43
|
+
baseUrl: config.baseUrl + "/v1/file/image/clip/400/320/",
|
|
29
44
|
imageArray: []
|
|
30
45
|
},
|
|
31
46
|
/**
|
|
@@ -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 +1 @@
|
|
|
1
|
-
.upload-box{display:flex;align-items:center;flex-wrap:wrap}.upload-box .upload-image{margin:0
|
|
1
|
+
.upload-box{display:flex;align-items:center;flex-wrap:wrap}.upload-box .upload-image{margin:0 20rpx 30rpx 0;position:relative;width:calc(100% - 20px)/3;height:200rpx}.upload-box .upload-image:nth-child(3n){margin-right:0}.upload-box .upload-image .delete-image{width:40rpx;height:40rpx;position:absolute;right:-14rpx;top:-14rpx}.plus-image{width:200rpx;height:200rpx}
|