|
@@ -2135,31 +2135,38 @@
|
|
|
success: function (res) {
|
|
|
console.log(res, '数据')
|
|
|
var localIds = res.localIds;
|
|
|
- if (that.workForm.domains[index].pics == null) {
|
|
|
- that.workForm.domains[index].pics = [];
|
|
|
- that.workForm.domains[index].iospics = [];
|
|
|
- }
|
|
|
- if (that.user.companyId == 7) {
|
|
|
- that.workForm.domains[index].pics = that.workForm.domains[index].pics.concat(localIds);
|
|
|
- } else {
|
|
|
- that.workForm.domains[index].pics = localIds;
|
|
|
- }
|
|
|
- that.$forceUpdate();
|
|
|
- if (that.workForm.domains[index].serverPics == null) {
|
|
|
- that.workForm.domains[index].serverPics = [];
|
|
|
- }
|
|
|
- for (var i=0;i<localIds.length; i++) {
|
|
|
- wx.uploadImage({
|
|
|
- localId: localIds[i], // 需要上传的图片的本地ID,由chooseImage接口获得
|
|
|
- isShowProgressTips: 1, // 默认为1,显示进度提示
|
|
|
- success: function (res) {
|
|
|
- var serverId = res.serverId; // 返回图片的服务器端ID
|
|
|
- that.workForm.domains[index].serverPics.push(serverId);
|
|
|
-
|
|
|
- console.log(that.workForm.domains, '数据')
|
|
|
+ wx.getLocalImgData({
|
|
|
+ localId: localIds, // 图片的localID
|
|
|
+ success: function (res) {
|
|
|
+ var localData = res.localData;
|
|
|
+ if (that.workForm.domains[index].pics == null) {
|
|
|
+ that.workForm.domains[index].pics = [];
|
|
|
+ that.workForm.domains[index].iospics = [];
|
|
|
}
|
|
|
- });
|
|
|
- }
|
|
|
+ if (that.user.companyId == 7) {
|
|
|
+ that.workForm.domains[index].pics = that.workForm.domains[index].pics.concat(localData);
|
|
|
+ } else {
|
|
|
+ that.workForm.domains[index].pics = localData;
|
|
|
+ }
|
|
|
+ that.$forceUpdate();
|
|
|
+ if (that.workForm.domains[index].serverPics == null) {
|
|
|
+ that.workForm.domains[index].serverPics = [];
|
|
|
+ }
|
|
|
+ for (var i=0;i<localIds.length; i++) {
|
|
|
+ wx.uploadImage({
|
|
|
+ localId: localIds[i], // 需要上传的图片的本地ID,由chooseImage接口获得
|
|
|
+ isShowProgressTips: 1, // 默认为1,显示进度提示
|
|
|
+ success: function (res) {
|
|
|
+ var serverId = res.serverId; // 返回图片的服务器端ID
|
|
|
+ that.workForm.domains[index].serverPics.push(serverId);
|
|
|
+
|
|
|
+ console.log(that.workForm.domains, '数据')
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
},
|