diff --git a/pages/consignment-painting/index.vue b/pages/consignment-painting/index.vue index b62decc..1d2ba07 100644 --- a/pages/consignment-painting/index.vue +++ b/pages/consignment-painting/index.vue @@ -252,6 +252,23 @@ export default { this.data = [today.getFullYear(), today.getMonth() + 1, today.getDate()] }, methods: { + uploadFilePromise(url, type = null) { + return new Promise((resolve) => { + uni.uploadFile({ + url: http.baseUrl + "/api/wxuser/uploadpic", + filePath: url, + name: "file", + success: (res) => { + const { path } = JSON.parse(res.data).data; + console.log('@@@@', path) + resolve(path); + if (type === 'check') { + this.chenckId(path) + } + }, + }); + }) + }, // 删除图片 deletePic(event) { this[`fileList${event.name}`].splice(event.index, 1)