|
|
@@ -6,13 +6,18 @@ var downloadNumber = 0;
|
|
6
|
6
|
var shareUrl = "";
|
|
7
|
7
|
|
|
8
|
8
|
Page({
|
|
9
|
|
- data: {},
|
|
|
9
|
+ data: {
|
|
|
10
|
+ Containnerheight:0,
|
|
|
11
|
+ ServerImage:"",
|
|
|
12
|
+ },
|
|
10
|
13
|
onLoad: function (options) {
|
|
11
|
|
- this.setData({
|
|
|
14
|
+ var that=this;
|
|
|
15
|
+ that.setData({
|
|
12
|
16
|
Containnerheight: main.getWindowHeight(),
|
|
13
|
17
|
ServerImage: app.globalData.uploadImageUrl + "web/"
|
|
14
|
18
|
});
|
|
15
|
|
- this.init();
|
|
|
19
|
+
|
|
|
20
|
+ that.init();
|
|
16
|
21
|
downloadNumber = 0;
|
|
17
|
22
|
|
|
18
|
23
|
shareUrl = "WebExtend?UserID=" + app.globalData.userInfo.UserID;
|
|
|
@@ -61,7 +66,11 @@ Page({
|
|
61
|
66
|
app.globalData.userInfo.HasACode=1;
|
|
62
|
67
|
}
|
|
63
|
68
|
|
|
64
|
|
- var downloadUrl = app.globalData.uploadImageUrl + "MiaoguoUser" + common.Encrypt(app.globalData.userInfo.UserID) + ".png";
|
|
|
69
|
+ var idStr=common.Encrypt(app.globalData.userInfo.UserID);
|
|
|
70
|
+ idStr=idStr.replace("/","___");
|
|
|
71
|
+ idStr=idStr.replace("+","___");
|
|
|
72
|
+
|
|
|
73
|
+ var downloadUrl = app.globalData.uploadImageUrl + "MiaoguoUser" + idStr + ".png";
|
|
65
|
74
|
setTimeout(function () {
|
|
66
|
75
|
var downloadTask = wx.downloadFile({
|
|
67
|
76
|
url: downloadUrl,
|
|
|
@@ -105,6 +114,10 @@ Page({
|
|
105
|
114
|
}
|
|
106
|
115
|
}
|
|
107
|
116
|
});
|
|
|
117
|
+ }
|
|
|
118
|
+ else if (res.statusCode === 404){
|
|
|
119
|
+ console.log("图片404");
|
|
|
120
|
+ wx.hideLoading();
|
|
108
|
121
|
} else {
|
|
109
|
122
|
wx.hideLoading();
|
|
110
|
123
|
}
|
|
|
@@ -158,5 +171,5 @@ Page({
|
|
158
|
171
|
path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
|
|
159
|
172
|
imageUrl: "../../pages/images/program_screenshot_main.png",
|
|
160
|
173
|
}
|
|
161
|
|
- },
|
|
|
174
|
+ }
|
|
162
|
175
|
});
|