From f784d411b6b689c5024811874202e082a1229c52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=AE=87=E5=BA=86?= Date: Wed, 16 Oct 2024 16:39:30 +0000 Subject: [PATCH 01/11] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E5=BD=93=E5=8E=9F=E4=BB=B7=E9=AB=98=E4=BA=8E=E5=94=AE=E4=BB=B7?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=89=8D=E6=98=BE=E7=A4=BA=E5=88=92=E7=BA=BF?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 杨宇庆 --- pages/goods/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/goods/index.vue b/pages/goods/index.vue index 03298620..ca07cbdb 100644 --- a/pages/goods/index.vue +++ b/pages/goods/index.vue @@ -85,7 +85,7 @@ {{ fen2yuan(state.selectedSku.price || state.goodsInfo.price) }} - + {{ fen2yuan(state.selectedSku.marketPrice || state.goodsInfo.marketPrice) }} From 959fe83d72dfee137bb6c4c50a46c73f3f2282f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=AE=87=E5=BA=86?= Date: Wed, 16 Oct 2024 16:51:52 +0000 Subject: [PATCH 02/11] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E5=BD=93=E6=97=A0=E4=BC=98=E6=83=A0=E4=BB=B7=E6=A0=BC=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=95=86=E5=93=81=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 杨宇庆 --- pages/goods/index.vue | 2 +- sheep/hooks/useGoods.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/goods/index.vue b/pages/goods/index.vue index 03298620..58f97b7c 100644 --- a/pages/goods/index.vue +++ b/pages/goods/index.vue @@ -361,7 +361,7 @@ // 选择有 promotionPrice 且最小的 state.settlementSku = state.goodsInfo.skus .filter((sku) => sku.stock > 0 && sku.promotionPrice > 0) - .reduce((prev, curr) => (prev.promotionPrice < curr.promotionPrice ? prev : curr)); + .reduce((prev, curr) => (prev.promotionPrice < curr.promotionPrice ? prev : curr), []); // 设置满减送活动 if (data.rewardActivity) { diff --git a/sheep/hooks/useGoods.js b/sheep/hooks/useGoods.js index 9bab54b5..9374cab8 100644 --- a/sheep/hooks/useGoods.js +++ b/sheep/hooks/useGoods.js @@ -416,7 +416,7 @@ export function appendSettlementProduct(spus, settlementInfos) { // 选择价格最小的 SKU 设置到 SPU 上 const settlementSku = settlementInfo.skus .filter((sku) => sku.promotionPrice > 0) - .reduce((prev, curr) => (prev.promotionPrice < curr.promotionPrice ? prev : curr)); + .reduce((prev, curr) => (prev.promotionPrice < curr.promotionPrice ? prev : curr), []); if (settlementSku) { spu.promotionType = settlementSku.promotionType; spu.promotionPrice = settlementSku.promotionPrice; From d916fe5c80fb7866581f44b3e89e5b77fbfe9672 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 28 Oct 2024 09:59:47 +0800 Subject: [PATCH 03/11] =?UTF-8?q?README=20=E6=9B=B4=E6=96=B0=EF=BC=9A?= =?UTF-8?q?=E5=8D=95=E4=BD=93=E3=80=81=E5=BE=AE=E6=9C=8D=E5=8A=A1=E7=9A=84?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2aeb2e42..ba302930 100644 --- a/README.md +++ b/README.md @@ -30,11 +30,11 @@ 支持 Spring Boot、Spring Cloud 两种架构: -① Spring Boot 单体架构: +① Spring Boot 单体架构: ![架构图](/.image/common/ruoyi-vue-pro-architecture.png) -② Spring Cloud 微服务架构: +② Spring Cloud 微服务架构: ![架构图](/.image/common/yudao-cloud-architecture.png) From e9b9ac1f7aa633e30029b5d346cf27e3e7524dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A2=E8=B6=8A?= <552369664@qq.com> Date: Mon, 28 Oct 2024 17:04:57 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91=E4=BF=AE=E5=A4=8D=E7=9C=9F=E6=9C=BA=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E4=B8=8B=E7=9A=84=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../s-uploader/choose-and-upload-file.js | 66 +++++++++++-------- sheep/components/s-uploader/s-uploader.vue | 37 +++++------ sheep/components/s-uploader/utils.js | 5 +- 3 files changed, 57 insertions(+), 51 deletions(-) diff --git a/sheep/components/s-uploader/choose-and-upload-file.js b/sheep/components/s-uploader/choose-and-upload-file.js index d3c5bccc..9c7036cb 100644 --- a/sheep/components/s-uploader/choose-and-upload-file.js +++ b/sheep/components/s-uploader/choose-and-upload-file.js @@ -204,32 +204,46 @@ async function uploadFiles(choosePromise, { onChooseFile, onUploadProgress }) { // 如果是前端直连上传 if (UPLOAD_TYPE.CLIENT === import.meta.env.SHOPRO_UPLOAD_TYPE) { - for (const file of files) { - // 1.1 获取文件预签名地址 - const { data: presignedInfo } = await FileApi.getFilePresignedUrl(file.name); - // 1.2 获取二进制文件对象 - const fileBuffer = await convertToArrayBuffer(file); - // 1.3 上传文件 - await uni.request({ - url: presignedInfo.uploadUrl, // 预签名的上传 URL - method: 'PUT', // 使用 PUT 方法 - header: { - 'Content-Type': file.fileType + '/' + file.name.substring(file.name.lastIndexOf('.') + 1), // 设置内容类型 - }, - data: fileBuffer, // 文件的路径,适用于小程序 - success: (res) => { - // 1.4. 记录文件信息到后端(异步) - createFile(presignedInfo, file); - // 1.5. 重新赋值 - file.url = presignedInfo.url; - console.log('上传成功:', res); - }, - fail: (err) => { - console.error('上传失败:', err); - }, - }); - } - return files; + // 为上传创建一组 Promise + const uploadPromises = files.map(async (file) => { + try { + // 1.1 获取文件预签名地址 + const { data: presignedInfo } = await FileApi.getFilePresignedUrl(file.name); + // 1.2 获取二进制文件对象 + const fileBuffer = await convertToArrayBuffer(file); + + // 返回上传的 Promise + return new Promise((resolve, reject) => { + uni.request({ + url: presignedInfo.uploadUrl, // 预签名的上传 URL + method: 'PUT', // 使用 PUT 方法 + header: { + 'Content-Type': + file.fileType + '/' + file.name.substring(file.name.lastIndexOf('.') + 1), // 设置内容类型 + }, + data: fileBuffer, // 文件的路径,适用于小程序 + success: (res) => { + // 1.4. 记录文件信息到后端(异步) + createFile(presignedInfo, file); + // 1.5. 重新赋值 + file.url = presignedInfo.url; + console.log('上传成功:', res); + resolve(file); + }, + fail: (err) => { + console.error('上传失败:', err); + reject(err); + }, + }); + }); + } catch (error) { + console.error('上传失败:', error); + throw error; + } + }); + + // 等待所有上传完成 + return await Promise.all(uploadPromises); // 返回已上传的文件列表 } else { // 后端上传 for (let file of files) { diff --git a/sheep/components/s-uploader/s-uploader.vue b/sheep/components/s-uploader/s-uploader.vue index a459d84f..e0a37e34 100644 --- a/sheep/components/s-uploader/s-uploader.vue +++ b/sheep/components/s-uploader/s-uploader.vue @@ -44,13 +44,7 @@ \ No newline at end of file + .people { + text-align: right; + flex: 0.27; + } + } + } + } + } + diff --git a/pages/commission/promoter.vue b/pages/commission/promoter.vue index bdf1e1e7..1fb017c5 100644 --- a/pages/commission/promoter.vue +++ b/pages/commission/promoter.vue @@ -1,297 +1,322 @@ - From 951a52d37b4fc21942a1daae92d6606a60a73fab Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 1 Dec 2024 18:19:12 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91=E7=A7=AF=E5=88=86=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods/point.vue | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/pages/goods/point.vue b/pages/goods/point.vue index 475fddf7..7709f1ad 100644 --- a/pages/goods/point.vue +++ b/pages/goods/point.vue @@ -7,7 +7,10 @@ {{ getShowPrice.point }} - {{ !getShowPrice.price || getShowPrice.price === 0 ? '' : `+¥${getShowPrice.price}` }} + {{ + !getShowPrice.price || getShowPrice.price === 0 ? '' : `+¥${getShowPrice.price}` + }} @@ -87,21 +92,19 @@