From 3bfc26905813a13c9ee0a7b288e86ad27f2b3813 Mon Sep 17 00:00:00 2001 From: xingyy <373639591@qq.com> Date: Mon, 25 Sep 2023 20:05:55 +0800 Subject: [PATCH] submit --- pages/consignment-painting/index.vue | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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)