|
@@ -15,7 +15,7 @@ Component({
|
|
|
attinfos: {
|
|
|
type: Object
|
|
|
},
|
|
|
- /* 上传类型 Logo-品牌logo userImage-用户头像 productImage-产品图片*/
|
|
|
+ /* 上传类型 Logo-品牌logo userImage-用户头像 productImage-产品图片 SupplyAndDemand-供需*/
|
|
|
upType: {
|
|
|
type: String
|
|
|
},
|
|
@@ -60,6 +60,9 @@ Component({
|
|
|
fisadministrator: {
|
|
|
type: Boolean,
|
|
|
value: false
|
|
|
+ },
|
|
|
+ tsupplyanddemand: {
|
|
|
+ type: Number
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -160,6 +163,20 @@ Component({
|
|
|
"ftype": "default"
|
|
|
}
|
|
|
}
|
|
|
+ } else if (this.data.upType == "SupplyAndDemand") {
|
|
|
+ //供需附件上传
|
|
|
+ data = {
|
|
|
+ "accesstoken": wx.getStorageSync('userData').token,
|
|
|
+ "classname": "system.system.docManage",
|
|
|
+ "method": "getFileName",
|
|
|
+ "content": {
|
|
|
+ "filename": timestamp,
|
|
|
+ "filetype": ext,
|
|
|
+ "ownertable": "tsupplyanddemand",
|
|
|
+ "ownerid": this.data.tsupplyanddemand,
|
|
|
+ "ftype": "default"
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
//发送请求
|
|
|
wx.getFileSystemManager().readFile({
|
|
@@ -220,7 +237,6 @@ Component({
|
|
|
that.triggerEvent("imageChange", {
|
|
|
fileList
|
|
|
})
|
|
|
-
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
console.log(err)
|
|
@@ -230,7 +246,7 @@ Component({
|
|
|
},
|
|
|
/* 删除文件 */
|
|
|
imagesDelete(e) {
|
|
|
- if (this.data.fisadministrator) return;
|
|
|
+ if (this.data.fisadministrator && this.data.upType != 'SupplyAndDemand') return;
|
|
|
const that = this;
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
@@ -255,6 +271,8 @@ Component({
|
|
|
} else if (that.data.upType == 'userImage') {
|
|
|
//用户头像
|
|
|
ownertable = "tenterprise_users"
|
|
|
+ } else if (that.data.upType == "SupplyAndDemand") {
|
|
|
+ ownertable = "tsupplyanddemand"
|
|
|
};
|
|
|
let content = {}
|
|
|
if (that.data.upType != "userImage") {
|