From 5af8f9188689b17ef61bd063d63d62e3a39fc86f Mon Sep 17 00:00:00 2001 From: fanfan Date: Mon, 4 Mar 2024 14:23:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=BF=AE=E6=94=B9=20?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83=E5=8A=A0=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=A4=B4=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods/components/setPrice.vue | 9 ++----- pages/user/index.vue | 38 +++++++++++++++++++---------- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/pages/goods/components/setPrice.vue b/pages/goods/components/setPrice.vue index bafa261..712105f 100644 --- a/pages/goods/components/setPrice.vue +++ b/pages/goods/components/setPrice.vue @@ -7,13 +7,8 @@ -<<<<<<< HEAD - 秒杀价: -======= - 秒杀价: - ->>>>>>> 334106d4c315bfefd82a940ba62881c49b6494af + 秒杀区间: diff --git a/pages/user/index.vue b/pages/user/index.vue index 538acce..2f79101 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -12,9 +12,10 @@ 未登录 - @@ -570,6 +571,7 @@ } from '@/core/app' import * as UserApi from '@/api/user'; import * as Api from '@/api/goods' + import * as UploadApi from '@/api/upload' import { createQrCodeImg } from '@/utils/qrcode' @@ -616,7 +618,7 @@ let that = this that.headImgUpload(e.detail.avatarUrl) }, - nickSubmit(avatar_id, nick_name) { + nickSubmit(avatar_id) { UserApi.editUser({ avatar_id: avatar_id }) @@ -639,15 +641,22 @@ .finally() }, headImgUpload(avatarUrl) { - // 获取推荐商品 - const that = this - UserApi.wxHeadImgUpload({ - headImg: avatarUrl, - checkLogin: 1 - }) - .then(res => { - that.nickSubmit(res.data.fileInfo.file_id) - }) + const app = this + const imageList=[{path: avatarUrl}] + // 批量上传 + return new Promise((resolve, reject) => { + if (imageList.length > 0) { + UploadApi.image(imageList) + .then(fileIds => { + console.log(fileIds) + app.nickSubmit(fileIds.join(',')) + resolve(fileIds) + }) + .catch(reject) + } else { + resolve() + } + }) }, goShopOrderList() { uni.navigateTo({ @@ -939,6 +948,7 @@ flex-direction: column; justify-content: flex-end; padding-bottom: 30rpx; + .toTop { position: fixed; bottom: 30rpx; @@ -1127,10 +1137,12 @@ padding: 0; margin: 0; border: none; + ::v-ddep uni-button:after { border: none !important; } - button[type=primary][plain]{ + + button[type=primary][plain] { border: none !important; } }