From c23e7ac3d018a7e4425a7e7d9f4b970cf2759300 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=A2=E8=B6=8A?= <552369664@qq.com>
Date: Tue, 24 Sep 2024 17:16:38 +0800
Subject: [PATCH 01/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E3=80=91=E7=8E=B0=E5=B7=B2=E6=94=AF=E6=8C=81=E5=89=8D?=
=?UTF-8?q?=E7=AB=AF=E6=96=87=E4=BB=B6=E7=9B=B4=E4=BC=A0=E5=88=B0OSS?=
=?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env | 5 +-
package.json | 3 +-
sheep/api/infra/file.js | 21 +++
.../s-uploader/choose-and-upload-file.js | 158 ++++++++++++++----
sheep/components/s-uploader/s-uploader.vue | 6 +-
5 files changed, 158 insertions(+), 35 deletions(-)
diff --git a/.env b/.env
index 6172fd55..a78c4d81 100644
--- a/.env
+++ b/.env
@@ -2,12 +2,15 @@
SHOPRO_VERSION = v1.8.3
# 后端接口 - 正式环境(通过 process.env.NODE_ENV 非 development)
-SHOPRO_BASE_URL = http://api-dashboard.yudao.iocoder.cn
+SHOPRO_BASE_URL = http://123.183.21.179:48080
# 后端接口 - 测试环境(通过 process.env.NODE_ENV = development)
SHOPRO_DEV_BASE_URL = http://127.0.0.1:48080
### SHOPRO_DEV_BASE_URL = http://yunai.natapp1.cc
+# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
+SHOPRO_UPLOAD_TYPE = client
+
# 后端接口前缀(一般不建议调整)
SHOPRO_API_PATH = /app-api
diff --git a/package.json b/package.json
index d2e3bb5f..cf0e81dd 100644
--- a/package.json
+++ b/package.json
@@ -94,7 +94,8 @@
"luch-request": "^3.0.8",
"pinia": "^2.0.33",
"pinia-plugin-persist-uni": "^1.2.0",
- "weixin-js-sdk": "^1.6.0"
+ "weixin-js-sdk": "^1.6.0",
+ "crypto-js": "^4.2.0"
},
"devDependencies": {
"prettier": "^2.8.7",
diff --git a/sheep/api/infra/file.js b/sheep/api/infra/file.js
index f7f2a964..fdf59ac5 100644
--- a/sheep/api/infra/file.js
+++ b/sheep/api/infra/file.js
@@ -1,4 +1,5 @@
import { baseUrl, apiPath, tenantId } from '@/sheep/config';
+import request from '@/sheep/request';
const FileApi = {
// 上传文件
@@ -40,6 +41,26 @@ const FileApi = {
});
});
},
+
+ // 获取文件预签名地址
+ getFilePresignedUrl: (path) => {
+ return request({
+ url: '/infra/file/presigned-url',
+ method: 'GET',
+ params: {
+ path,
+ },
+ });
+ },
+
+ // 创建文件
+ createFile: (data) => {
+ return request({
+ url: '/infra/file/create', // 请求的 URL
+ method: 'POST', // 请求方法
+ data: data, // 要发送的数据
+ });
+ },
};
export default FileApi;
diff --git a/sheep/components/s-uploader/choose-and-upload-file.js b/sheep/components/s-uploader/choose-and-upload-file.js
index 604ff9d8..64175e4c 100644
--- a/sheep/components/s-uploader/choose-and-upload-file.js
+++ b/sheep/components/s-uploader/choose-and-upload-file.js
@@ -1,5 +1,6 @@
'use strict';
import FileApi from '@/sheep/api/infra/file';
+import CryptoJS from 'crypto-js';
const ERR_MSG_OK = 'chooseAndUploadFile:ok';
const ERR_MSG_FAIL = 'chooseAndUploadFile:fail';
@@ -106,7 +107,7 @@ function normalizeChooseAndUploadFileRes(res, fileType) {
item.name = item.path.substring(item.path.lastIndexOf('/') + 1);
}
if (fileType) {
- item.fileType = fileType;
+ item.type = fileType;
}
item.cloudPath = Date.now() + '_' + index + item.name.substring(item.name.lastIndexOf('.'));
});
@@ -116,6 +117,28 @@ function normalizeChooseAndUploadFileRes(res, fileType) {
return res;
}
+function convertToArrayBuffer(uniFile) {
+ return new Promise((resolve, reject) => {
+ const fs = uni.getFileSystemManager();
+
+ fs.readFile({
+ filePath: uniFile.path, // 确保路径正确
+ success: (fileRes) => {
+ try {
+ // 将读取的内容转换为 ArrayBuffer
+ const arrayBuffer = new Uint8Array(fileRes.data).buffer;
+ resolve(arrayBuffer);
+ } catch (error) {
+ reject(new Error(`转换为 ArrayBuffer 失败: ${error.message}`));
+ }
+ },
+ fail: (error) => {
+ reject(new Error(`读取文件失败: ${error.errMsg}`));
+ },
+ });
+ });
+}
+
function uploadCloudFiles(files, max = 5, onUploadProgress) {
files = JSON.parse(JSON.stringify(files));
const len = files.length;
@@ -165,36 +188,61 @@ function uploadCloudFiles(files, max = 5, onUploadProgress) {
});
}
-function uploadFiles(choosePromise, { onChooseFile, onUploadProgress }) {
- return choosePromise
- .then((res) => {
- if (onChooseFile) {
- const customChooseRes = onChooseFile(res);
- if (typeof customChooseRes !== 'undefined') {
- return Promise.resolve(customChooseRes).then((chooseRes) =>
- typeof chooseRes === 'undefined' ? res : chooseRes,
- );
- }
+async function uploadFiles(choosePromise, { onChooseFile, onUploadProgress }) {
+ // 获取选择的文件
+ const res = await choosePromise;
+ // 处理文件选择回调
+ let files = res.tempFiles || [];
+ if (onChooseFile) {
+ const customChooseRes = onChooseFile(res);
+ if (typeof customChooseRes !== 'undefined') {
+ files = await Promise.resolve(customChooseRes);
+ if (typeof files === 'undefined') {
+ files = res.tempFiles || []; // Fallback
}
- return res;
- })
- .then((res) => {
- if (res === false) {
- return {
- errMsg: ERR_MSG_OK,
- tempFilePaths: [],
- tempFiles: [],
- };
- }
- return res;
- })
- .then(async (files) => {
- for (let file of files.tempFiles) {
- const { data } = await FileApi.uploadFile(file.path);
- file.url = data;
- }
- return files;
- });
+ }
+ }
+
+ // 如果是前端直连上传
+ if (UPLOAD_TYPE.CLIENT === import.meta.env.SHOPRO_UPLOAD_TYPE) {
+ for (const file of files) {
+ // 获取二进制文件对象
+ const fileBuffer = await convertToArrayBuffer(file);
+ // 1.1 生成文件名称
+ const fileName = await generateFileName(fileBuffer, file.name);
+ // 1.2 获取文件预签名地址
+ const { data: presignedInfo } = await FileApi.getFilePresignedUrl(file.name);
+ // 1.3 上传文件
+ await uni.request({
+ url: presignedInfo.uploadUrl, // 预签名的上传 URL
+ method: 'PUT', // 使用 PUT 方法
+ header: {
+ 'Content-Type': file.type + '/' + file.name.substring(file.name.lastIndexOf('.') + 1), // 设置内容类型
+ },
+ data: fileBuffer, // 文件的路径,适用于小程序
+ success: (res) => {
+ // 1.4. 记录文件信息到后端(异步)
+ createFile(presignedInfo, fileName, file);
+ // 1.5. 重新赋值
+ file.url = presignedInfo.url;
+ file.name = fileName;
+ console.log('上传成功:', res);
+ },
+ fail: (err) => {
+ console.error('上传失败:', err);
+ },
+ });
+ }
+ return files;
+ } else {
+ // 后端上传
+ for (let file of files) {
+ const { data } = await FileApi.uploadFile(file.path);
+ file.url = data;
+ }
+
+ return files;
+ }
}
function chooseAndUploadFile(
@@ -210,4 +258,54 @@ function chooseAndUploadFile(
return uploadFiles(chooseAll(opts), opts);
}
+/**
+ * 生成文件名称(使用算法SHA256)
+ * @param arrayBuffer 二进制文件对象
+ * @param fileName 文件名称
+ */
+async function generateFileName(arrayBuffer, fileName) {
+ return new Promise((resolve, reject) => {
+ try {
+ // 创建 WordArray
+ const wordArray = CryptoJS.lib.WordArray.create(new Uint8Array(arrayBuffer));
+ // 计算SHA256
+ const sha256 = CryptoJS.SHA256(wordArray).toString();
+ // 拼接后缀
+ const ext = fileName.substring(fileName.lastIndexOf('.'));
+ resolve(`${sha256}${ext}`);
+ } catch (error) {
+ reject(new Error('计算SHA256失败: ' + error.message));
+ }
+ });
+}
+
+/**
+ * 创建文件信息
+ * @param vo 文件预签名信息
+ * @param name 文件名称
+ * @param file 文件
+ */
+function createFile(vo, name, file) {
+ const fileVo = {
+ configId: vo.configId,
+ url: vo.url,
+ path: name,
+ name: file.name,
+ type: file.fileType,
+ size: file.size,
+ };
+ FileApi.createFile(fileVo);
+ return fileVo;
+}
+
+/**
+ * 上传类型
+ */
+const UPLOAD_TYPE = {
+ // 客户端直接上传(只支持S3服务)
+ CLIENT: 'client',
+ // 客户端发送到后端上传
+ SERVER: 'server',
+};
+
export { chooseAndUploadFile, uploadCloudFiles };
diff --git a/sheep/components/s-uploader/s-uploader.vue b/sheep/components/s-uploader/s-uploader.vue
index 95cfb057..a459d84f 100644
--- a/sheep/components/s-uploader/s-uploader.vue
+++ b/sheep/components/s-uploader/s-uploader.vue
@@ -369,7 +369,7 @@
},
})
.then((result) => {
- this.setSuccessAndError(result.tempFiles);
+ this.setSuccessAndError(result);
})
.catch((err) => {
console.log('选择失败', err);
@@ -453,7 +453,7 @@
if (index === -1 || !this.files) break;
if (item.errMsg === 'request:fail') {
- this.files[index].url = item.path;
+ this.files[index].url = item.url;
this.files[index].status = 'error';
this.files[index].errMsg = item.errMsg;
// this.files[index].progress = -1
@@ -587,7 +587,7 @@
path: v.path,
size: v.size,
fileID: v.fileID,
- url: v.url,
+ url: v.path,
});
});
return newFilesData;
From f6b2eb69252d46404cfdf2fe5214d3d04d3456d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=A2=E8=B6=8A?= <552369664@qq.com>
Date: Tue, 24 Sep 2024 17:17:18 +0800
Subject: [PATCH 02/28] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=BD=BF=E7=94=A8?=
=?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=AB=AF=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.env b/.env
index a78c4d81..ef22147e 100644
--- a/.env
+++ b/.env
@@ -9,7 +9,7 @@ SHOPRO_DEV_BASE_URL = http://127.0.0.1:48080
### SHOPRO_DEV_BASE_URL = http://yunai.natapp1.cc
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
-SHOPRO_UPLOAD_TYPE = client
+SHOPRO_UPLOAD_TYPE = server
# 后端接口前缀(一般不建议调整)
SHOPRO_API_PATH = /app-api
From 76e7ed8f250bc0ee658ef4d8c672d61a987bb613 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=A2=E8=B6=8A?= <552369664@qq.com>
Date: Tue, 24 Sep 2024 19:14:52 +0800
Subject: [PATCH 03/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E3=80=91=E6=96=87=E4=BB=B6=E7=9B=B4=E4=BC=A0=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sheep/components/s-uploader/choose-and-upload-file.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sheep/components/s-uploader/choose-and-upload-file.js b/sheep/components/s-uploader/choose-and-upload-file.js
index 64175e4c..a92e0ace 100644
--- a/sheep/components/s-uploader/choose-and-upload-file.js
+++ b/sheep/components/s-uploader/choose-and-upload-file.js
@@ -107,7 +107,7 @@ function normalizeChooseAndUploadFileRes(res, fileType) {
item.name = item.path.substring(item.path.lastIndexOf('/') + 1);
}
if (fileType) {
- item.type = fileType;
+ item.fileType = fileType;
}
item.cloudPath = Date.now() + '_' + index + item.name.substring(item.name.lastIndexOf('.'));
});
@@ -217,7 +217,7 @@ async function uploadFiles(choosePromise, { onChooseFile, onUploadProgress }) {
url: presignedInfo.uploadUrl, // 预签名的上传 URL
method: 'PUT', // 使用 PUT 方法
header: {
- 'Content-Type': file.type + '/' + file.name.substring(file.name.lastIndexOf('.') + 1), // 设置内容类型
+ 'Content-Type': file.fileType + '/' + file.name.substring(file.name.lastIndexOf('.') + 1), // 设置内容类型
},
data: fileBuffer, // 文件的路径,适用于小程序
success: (res) => {
From 6c958914766b327ac0f90005d29e4a46abc0484d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=A2=E8=B6=8A?= <552369664@qq.com>
Date: Wed, 25 Sep 2024 08:25:20 +0800
Subject: [PATCH 04/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E3=80=91=E7=AE=80=E5=8C=96=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../s-uploader/choose-and-upload-file.js | 37 +++----------------
1 file changed, 6 insertions(+), 31 deletions(-)
diff --git a/sheep/components/s-uploader/choose-and-upload-file.js b/sheep/components/s-uploader/choose-and-upload-file.js
index a92e0ace..18f0487a 100644
--- a/sheep/components/s-uploader/choose-and-upload-file.js
+++ b/sheep/components/s-uploader/choose-and-upload-file.js
@@ -206,12 +206,10 @@ async function uploadFiles(choosePromise, { onChooseFile, onUploadProgress }) {
// 如果是前端直连上传
if (UPLOAD_TYPE.CLIENT === import.meta.env.SHOPRO_UPLOAD_TYPE) {
for (const file of files) {
- // 获取二进制文件对象
- const fileBuffer = await convertToArrayBuffer(file);
- // 1.1 生成文件名称
- const fileName = await generateFileName(fileBuffer, file.name);
- // 1.2 获取文件预签名地址
+ // 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
@@ -222,10 +220,9 @@ async function uploadFiles(choosePromise, { onChooseFile, onUploadProgress }) {
data: fileBuffer, // 文件的路径,适用于小程序
success: (res) => {
// 1.4. 记录文件信息到后端(异步)
- createFile(presignedInfo, fileName, file);
+ createFile(presignedInfo, file);
// 1.5. 重新赋值
file.url = presignedInfo.url;
- file.name = fileName;
console.log('上传成功:', res);
},
fail: (err) => {
@@ -258,38 +255,16 @@ function chooseAndUploadFile(
return uploadFiles(chooseAll(opts), opts);
}
-/**
- * 生成文件名称(使用算法SHA256)
- * @param arrayBuffer 二进制文件对象
- * @param fileName 文件名称
- */
-async function generateFileName(arrayBuffer, fileName) {
- return new Promise((resolve, reject) => {
- try {
- // 创建 WordArray
- const wordArray = CryptoJS.lib.WordArray.create(new Uint8Array(arrayBuffer));
- // 计算SHA256
- const sha256 = CryptoJS.SHA256(wordArray).toString();
- // 拼接后缀
- const ext = fileName.substring(fileName.lastIndexOf('.'));
- resolve(`${sha256}${ext}`);
- } catch (error) {
- reject(new Error('计算SHA256失败: ' + error.message));
- }
- });
-}
-
/**
* 创建文件信息
* @param vo 文件预签名信息
- * @param name 文件名称
* @param file 文件
*/
-function createFile(vo, name, file) {
+function createFile(vo, file) {
const fileVo = {
configId: vo.configId,
url: vo.url,
- path: name,
+ path: file.name,
name: file.name,
type: file.fileType,
size: file.size,
From 6f8e82e6cf0463920978215905c3bddc3e368e40 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=A2=E8=B6=8A?= <552369664@qq.com>
Date: Wed, 25 Sep 2024 23:16:50 +0800
Subject: [PATCH 05/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E3=80=91=E7=AE=80=E5=8C=96=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env | 20 +++++++++----------
.../s-uploader/choose-and-upload-file.js | 1 -
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/.env b/.env
index ef22147e..1ccae9a0 100644
--- a/.env
+++ b/.env
@@ -1,31 +1,31 @@
# 版本号
-SHOPRO_VERSION = v1.8.3
+SHOPRO_VERSION=v1.8.3
# 后端接口 - 正式环境(通过 process.env.NODE_ENV 非 development)
-SHOPRO_BASE_URL = http://123.183.21.179:48080
+SHOPRO_BASE_URL=http://api-dashboard.yudao.iocoder.cn
# 后端接口 - 测试环境(通过 process.env.NODE_ENV = development)
-SHOPRO_DEV_BASE_URL = http://127.0.0.1:48080
+SHOPRO_DEV_BASE_URL=http://127.0.0.1:48080
### SHOPRO_DEV_BASE_URL = http://yunai.natapp1.cc
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
-SHOPRO_UPLOAD_TYPE = server
+SHOPRO_UPLOAD_TYPE=client
# 后端接口前缀(一般不建议调整)
-SHOPRO_API_PATH = /app-api
+SHOPRO_API_PATH=/app-api
# 后端 websocket 接口前缀
-SHOPRO_WEBSOCKET_PATH = /infra/ws
+SHOPRO_WEBSOCKET_PATH=/infra/ws
# 开发环境运行端口
-SHOPRO_DEV_PORT = 3000
+SHOPRO_DEV_PORT=3000
# 客户端静态资源地址 空=默认使用服务端指定的CDN资源地址前缀 | local=本地 | http(s)://xxx.xxx=自定义静态资源地址前缀
-SHOPRO_STATIC_URL = http://test.yudao.iocoder.cn
+SHOPRO_STATIC_URL=http://test.yudao.iocoder.cn
### SHOPRO_STATIC_URL = https://file.sheepjs.com
# 是否开启直播 1 开启直播 | 0 关闭直播 (小程序官方后台未审核开通直播权限时请勿开启)
-SHOPRO_MPLIVE_ON = 0
+SHOPRO_MPLIVE_ON=0
# 租户ID 默认 1
-SHOPRO_TENANT_ID = 1
+SHOPRO_TENANT_ID=1
diff --git a/sheep/components/s-uploader/choose-and-upload-file.js b/sheep/components/s-uploader/choose-and-upload-file.js
index 18f0487a..d3c5bccc 100644
--- a/sheep/components/s-uploader/choose-and-upload-file.js
+++ b/sheep/components/s-uploader/choose-and-upload-file.js
@@ -1,6 +1,5 @@
'use strict';
import FileApi from '@/sheep/api/infra/file';
-import CryptoJS from 'crypto-js';
const ERR_MSG_OK = 'chooseAndUploadFile:ok';
const ERR_MSG_FAIL = 'chooseAndUploadFile:fail';
From f491e87d6afc9beb8983a9f5d4f29f7aaac1e4ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=A2=E8=B6=8A?= <552369664@qq.com>
Date: Thu, 26 Sep 2024 09:08:57 +0800
Subject: [PATCH 06/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E3=80=91=E7=AE=80=E5=8C=96=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/package.json b/package.json
index cf0e81dd..d2e3bb5f 100644
--- a/package.json
+++ b/package.json
@@ -94,8 +94,7 @@
"luch-request": "^3.0.8",
"pinia": "^2.0.33",
"pinia-plugin-persist-uni": "^1.2.0",
- "weixin-js-sdk": "^1.6.0",
- "crypto-js": "^4.2.0"
+ "weixin-js-sdk": "^1.6.0"
},
"devDependencies": {
"prettier": "^2.8.7",
From 18484f7ee88d195e58d30627859e3749acc1412e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=A2=E8=B6=8A?= <552369664@qq.com>
Date: Fri, 27 Sep 2024 16:46:09 +0800
Subject: [PATCH 07/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E3=80=91=E7=A7=92=E6=9D=80=E8=AF=A6=E6=83=85=E9=A1=B5?=
=?UTF-8?q?=E8=BF=87=E6=9C=9F=E6=B4=BB=E5=8A=A8=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/goods/seckill.vue | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pages/goods/seckill.vue b/pages/goods/seckill.vue
index 34708d62..7f00b0a9 100644
--- a/pages/goods/seckill.vue
+++ b/pages/goods/seckill.vue
@@ -7,7 +7,9 @@
Date: Fri, 27 Sep 2024 19:58:00 +0800
Subject: [PATCH 08/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E3=80=91=E6=8B=BC=E5=9B=A2=E3=80=81=E7=A7=92=E6=9D=80?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=9A=84SPU=E5=90=8D=E7=A7=B0=E4=BD=BF?=
=?UTF-8?q?=E7=94=A8=E6=B4=BB=E5=8A=A8=E7=9A=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sheep/components/s-groupon-block/s-groupon-block.vue | 2 ++
sheep/components/s-seckill-block/s-seckill-block.vue | 2 ++
2 files changed, 4 insertions(+)
diff --git a/sheep/components/s-groupon-block/s-groupon-block.vue b/sheep/components/s-groupon-block/s-groupon-block.vue
index 1a5a5918..cf924969 100644
--- a/sheep/components/s-groupon-block/s-groupon-block.vue
+++ b/sheep/components/s-groupon-block/s-groupon-block.vue
@@ -261,6 +261,8 @@
// 查找对应的 spu 并更新价格
const spu = state.spuList.find((spu) => activity.spuId === spu.id);
if (spu) {
+ // 赋值活动名称
+ spu.name = activity.name;
// 赋值最低价格
spu.price = Math.min(combinationPrice, spu.price);
// 赋值活动ID,为了点击跳转详情页
diff --git a/sheep/components/s-seckill-block/s-seckill-block.vue b/sheep/components/s-seckill-block/s-seckill-block.vue
index 4eced427..d7e80136 100644
--- a/sheep/components/s-seckill-block/s-seckill-block.vue
+++ b/sheep/components/s-seckill-block/s-seckill-block.vue
@@ -261,6 +261,8 @@
// 查找对应的 spu 并更新价格
const spu = state.spuList.find((spu) => activity.spuId === spu.id);
if (spu) {
+ // 赋值活动名称
+ spu.name = activity.name;
// 赋值最低价格
spu.price = Math.min(seckillPrice, spu.price);
// 赋值活动ID,为了点击跳转详情页
From 4a0ea9b43c3322e2c13c44611d1b3c25db23f73e Mon Sep 17 00:00:00 2001
From: YunaiV
Date: Sat, 28 Sep 2024 20:25:32 +0800
Subject: [PATCH 09/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E3=80=91=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=EF=BC=8C?=
=?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=BD=BF=E7=94=A8=20server=20=E6=A8=A1?=
=?UTF-8?q?=E5=BC=8F=EF=BC=8C=E5=85=BC=E5=AE=B9=E6=9B=B4=E5=A4=9A=E5=AD=98?=
=?UTF-8?q?=E5=82=A8=E5=99=A8=E7=9A=84=E7=B1=BB=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.env b/.env
index 1ccae9a0..e463ea6d 100644
--- a/.env
+++ b/.env
@@ -9,7 +9,7 @@ SHOPRO_DEV_BASE_URL=http://127.0.0.1:48080
### SHOPRO_DEV_BASE_URL = http://yunai.natapp1.cc
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
-SHOPRO_UPLOAD_TYPE=client
+SHOPRO_UPLOAD_TYPE=server
# 后端接口前缀(一般不建议调整)
SHOPRO_API_PATH=/app-api
From 2e572639b0fa2060caeb5243c261f0012caec5d0 Mon Sep 17 00:00:00 2001
From: YunaiV
Date: Sun, 29 Sep 2024 09:22:29 +0800
Subject: [PATCH 10/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E3=80=91=E4=BF=AE=E6=94=B9=20h5=20=E7=9A=84=20base=20?=
=?UTF-8?q?=E6=98=AF=20/=EF=BC=8C=E8=A7=A3=E5=86=B3=20https://gitee.com/yu?=
=?UTF-8?q?daocode/yudao-mall-uniapp/issues/IATB5V=20=E9=9D=99=E6=80=81?=
=?UTF-8?q?=E8=B5=84=E6=BA=90=E8=AE=BF=E9=97=AE=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
manifest.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/manifest.json b/manifest.json
index ac575dbe..47b8960f 100644
--- a/manifest.json
+++ b/manifest.json
@@ -218,7 +218,7 @@
"template": "index.html",
"router": {
"mode": "history",
- "base": "./"
+ "base": "/"
},
"sdkConfigs": {
"maps": {}
From 518c8988821786e4733eb7dad709370822bb6f0b Mon Sep 17 00:00:00 2001
From: Lcp <2767378157@qq.com>
Date: Sun, 29 Sep 2024 15:52:32 +0800
Subject: [PATCH 11/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E3=80=91=E6=8F=90=E4=BA=A4=E5=94=AE=E5=90=8E=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=E5=90=8E=E7=9B=B4=E6=8E=A5=E8=BF=94=E5=9B=9E=E5=88=B0?=
=?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/order/aftersale/apply.vue | 2 +-
pages/order/detail.vue | 9 +++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/pages/order/aftersale/apply.vue b/pages/order/aftersale/apply.vue
index 805ea944..581ca576 100644
--- a/pages/order/aftersale/apply.vue
+++ b/pages/order/aftersale/apply.vue
@@ -171,7 +171,7 @@
uni.showToast({
title: '申请成功',
});
- sheep.$router.go('/pages/order/aftersale/list');
+ sheep.$router.redirect('/pages/order/aftersale/list');
}
}
diff --git a/pages/order/detail.vue b/pages/order/detail.vue
index ed0119fa..4e0514de 100644
--- a/pages/order/detail.vue
+++ b/pages/order/detail.vue
@@ -256,7 +256,7 @@
From b476305e302d2b42868e84593a508cdfc84554d8 Mon Sep 17 00:00:00 2001
From: Lcp <2767378157@qq.com>
Date: Sun, 29 Sep 2024 16:37:43 +0800
Subject: [PATCH 12/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E3=80=91=E7=A1=AE=E8=AE=A4=E6=94=B6=E8=B4=A7=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E6=8F=90=E7=A4=BA=E7=A1=AE=E8=AE=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/order/detail.vue | 19 ++++++++++++++-----
pages/order/list.vue | 21 +++++++++++++++------
2 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/pages/order/detail.vue b/pages/order/detail.vue
index 4e0514de..0e716c48 100644
--- a/pages/order/detail.vue
+++ b/pages/order/detail.vue
@@ -341,11 +341,20 @@
return;
}
- // 正常的确认收货流程
- const { code } = await OrderApi.receiveOrder(orderId);
- if (code === 0) {
- await getOrderDetail(orderId);
- }
+ uni.showModal({
+ title: '提示',
+ content: '确认收货吗?',
+ success: async function (res) {
+ if (!res.confirm) {
+ return;
+ }
+ // 正常的确认收货流程
+ const { code } = await OrderApi.receiveOrder(orderId);
+ if (code === 0) {
+ await getOrderDetail(orderId);
+ }
+ },
+ });
}
// #ifdef MP-WEIXIN
diff --git a/pages/order/list.vue b/pages/order/list.vue
index 926ecfde..fc02fedc 100644
--- a/pages/order/list.vue
+++ b/pages/order/list.vue
@@ -223,12 +223,21 @@
return;
}
- // 正常的确认收货流程
- const { code } = await OrderApi.receiveOrder(order.id);
- if (code === 0) {
- resetPagination(state.pagination);
- await getOrderList();
- }
+ uni.showModal({
+ title: '提示',
+ content: '确认收货吗?',
+ success: async function (res) {
+ if (!res.confirm) {
+ return;
+ }
+ // 正常的确认收货流程
+ const { code } = await OrderApi.receiveOrder(order.id);
+ if (code === 0) {
+ resetPagination(state.pagination);
+ await getOrderList();
+ }
+ },
+ });
}
// #ifdef MP-WEIXIN
From 47ac7d1fbce9244cca76ba1d9cb42e9a4835b30d Mon Sep 17 00:00:00 2001
From: YunaiV
Date: Tue, 1 Oct 2024 10:15:08 +0800
Subject: [PATCH 13/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E3=80=91?=
=?UTF-8?q?=E4=B8=8B=E5=8D=95=E9=A1=B5=E7=9A=84=E4=BC=98=E6=83=A0=E6=98=8E?=
=?UTF-8?q?=E7=BB=86=E5=BC=B9=E7=AA=97=EF=BC=8C=E4=B8=8D=E5=B1=95=E7=A4=BA?=
=?UTF-8?q?=E7=A7=AF=E5=88=86=E3=80=81=E4=BC=98=E6=83=A0=E5=8A=B5=E3=80=81?=
=?UTF-8?q?=E4=BC=9A=E5=91=98=E6=8A=98=E6=89=A3=EF=BC=8C=E5=9B=A0=E4=B8=BA?=
=?UTF-8?q?=E5=AE=83=E4=BB=AC=E5=B7=B2=E7=BB=8F=E5=8D=95=E7=8B=AC=E5=B1=95?=
=?UTF-8?q?=E7=A4=BA=E4=BA=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sheep/components/s-discount-list/s-discount-list.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sheep/components/s-discount-list/s-discount-list.vue b/sheep/components/s-discount-list/s-discount-list.vue
index 652cd600..0526a736 100644
--- a/sheep/components/s-discount-list/s-discount-list.vue
+++ b/sheep/components/s-discount-list/s-discount-list.vue
@@ -17,7 +17,7 @@
>
-
+
{{ item.description }}
From 5f496038c5ec793791f37508b769e96cdd561b7f Mon Sep 17 00:00:00 2001
From: YunaiV
Date: Tue, 1 Oct 2024 19:00:19 +0800
Subject: [PATCH 14/28] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?=
=?UTF-8?q?=E5=AE=A1=E3=80=91=E5=95=86=E5=9F=8E=E9=A6=96=E9=A1=B5=E7=9A=84?=
=?UTF-8?q?=20activity=20name=20=E7=9A=84=E5=B1=95=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sheep/components/s-groupon-block/s-groupon-block.vue | 1 +
sheep/components/s-seckill-block/s-seckill-block.vue | 1 +
sheep/platform/share.js | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/sheep/components/s-groupon-block/s-groupon-block.vue b/sheep/components/s-groupon-block/s-groupon-block.vue
index cf924969..b8415567 100644
--- a/sheep/components/s-groupon-block/s-groupon-block.vue
+++ b/sheep/components/s-groupon-block/s-groupon-block.vue
@@ -262,6 +262,7 @@
const spu = state.spuList.find((spu) => activity.spuId === spu.id);
if (spu) {
// 赋值活动名称
+ // TODO 芋艿:暂定活动名。会在调研一些类似有赞、淘宝、京东的选择
spu.name = activity.name;
// 赋值最低价格
spu.price = Math.min(combinationPrice, spu.price);
diff --git a/sheep/components/s-seckill-block/s-seckill-block.vue b/sheep/components/s-seckill-block/s-seckill-block.vue
index d7e80136..b5b21a3a 100644
--- a/sheep/components/s-seckill-block/s-seckill-block.vue
+++ b/sheep/components/s-seckill-block/s-seckill-block.vue
@@ -262,6 +262,7 @@
const spu = state.spuList.find((spu) => activity.spuId === spu.id);
if (spu) {
// 赋值活动名称
+ // TODO 芋艿:暂定活动名。会在调研一些类似有赞、淘宝、京东的选择
spu.name = activity.name;
// 赋值最低价格
spu.price = Math.min(seckillPrice, spu.price);
diff --git a/sheep/platform/share.js b/sheep/platform/share.js
index d200f671..a3cf4124 100644
--- a/sheep/platform/share.js
+++ b/sheep/platform/share.js
@@ -140,7 +140,7 @@ const decryptSpm = (spm) => {
query = shareParamsArray[2].split(',');
shareParams.query = {
id: query[0],
- activity_id: query[1], // TODO 芋艿:接入分享后,应该统一成 id 参数
+ activity_id: query[1],
};
break;
case '4':
From b6635a5d5cfbae6e4845851765bcb6f6c9881646 Mon Sep 17 00:00:00 2001
From: YunaiV
Date: Wed, 2 Oct 2024 14:19:23 +0800
Subject: [PATCH 15/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E3=80=91WebSocket=20=E4=BD=BF=E7=94=A8=20refreshToken?=
=?UTF-8?q?=20=E8=AE=A4=E8=AF=81=EF=BC=8C=E8=A7=A3=E5=86=B3=E6=97=A0?=
=?UTF-8?q?=E6=B3=95=E5=88=B7=E6=96=B0=E8=AE=BF=E9=97=AE=E4=BB=A4=E7=89=8C?=
=?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
---
sheep/hooks/useWebSocket.js | 25 +--
sheep/request/index.js | 348 ++++++++++++++++++------------------
2 files changed, 184 insertions(+), 189 deletions(-)
diff --git a/sheep/hooks/useWebSocket.js b/sheep/hooks/useWebSocket.js
index 18316176..81bc0b39 100644
--- a/sheep/hooks/useWebSocket.js
+++ b/sheep/hooks/useWebSocket.js
@@ -1,6 +1,7 @@
import { onBeforeUnmount, reactive, ref } from 'vue';
import { baseUrl, websocketPath } from '@/sheep/config';
import { copyValueToTarget } from '@/sheep/util';
+import { getRefreshToken } from '@/sheep/request';
/**
* WebSocket 创建 hook
@@ -8,12 +9,8 @@ import { copyValueToTarget } from '@/sheep/util';
* @return {{options: *}}
*/
export function useWebSocket(opt) {
- const getAccessToken = () => {
- return uni.getStorageSync('token');
- };
-
const options = reactive({
- url: (baseUrl + websocketPath).replace('http', 'ws') + '?token=' + getAccessToken(), // ws 地址
+ url: (baseUrl + websocketPath).replace('http', 'ws') + '?token=' + getRefreshToken(), // ws 地址
isReconnecting: false, // 正在重新连接
reconnectInterval: 3000, // 重连间隔,单位毫秒
heartBeatInterval: 5000, // 心跳间隔,单位毫秒
@@ -22,12 +19,9 @@ export function useWebSocket(opt) {
destroy: false, // 是否销毁
pingTimeout: null, // 心跳检测定时器
reconnectTimeout: null, // 重连定时器ID的属性
- onConnected: () => {
- }, // 连接成功时触发
- onClosed: () => {
- }, // 连接关闭时触发
- onMessage: (data) => {
- }, // 收到消息
+ onConnected: () => {}, // 连接成功时触发
+ onClosed: () => {}, // 连接关闭时触发
+ onMessage: (data) => {}, // 收到消息
});
const SocketTask = ref(null); // SocketTask 由 uni.connectSocket() 接口创建
@@ -58,7 +52,8 @@ export function useWebSocket(opt) {
// 情况一:实例销毁
if (options.destroy) {
options.onClosed();
- } else { // 情况二:连接失败重连
+ } else {
+ // 情况二:连接失败重连
// 停止心跳检查
stopHeartBeat();
// 重连
@@ -140,10 +135,8 @@ export function useWebSocket(opt) {
copyValueToTarget(options, opt);
SocketTask.value = uni.connectSocket({
url: options.url,
- complete: () => {
- },
- success: () => {
- },
+ complete: () => {},
+ success: () => {},
});
initEventListeners();
};
diff --git a/sheep/request/index.js b/sheep/request/index.js
index 492f08c9..b6e4b9e0 100644
--- a/sheep/request/index.js
+++ b/sheep/request/index.js
@@ -12,224 +12,226 @@ import AuthUtil from '@/sheep/api/member/auth';
import { getTerminal } from '@/sheep/util/const';
const options = {
- // 显示操作成功消息 默认不显示
- showSuccess: false,
- // 成功提醒 默认使用后端返回值
- successMsg: '',
- // 显示失败消息 默认显示
- showError: true,
- // 失败提醒 默认使用后端返回信息
- errorMsg: '',
- // 显示请求时loading模态框 默认显示
- showLoading: true,
- // loading提醒文字
- loadingMsg: '加载中',
- // 需要授权才能请求 默认放开
- auth: false,
- // ...
+ // 显示操作成功消息 默认不显示
+ showSuccess: false,
+ // 成功提醒 默认使用后端返回值
+ successMsg: '',
+ // 显示失败消息 默认显示
+ showError: true,
+ // 失败提醒 默认使用后端返回信息
+ errorMsg: '',
+ // 显示请求时loading模态框 默认显示
+ showLoading: true,
+ // loading提醒文字
+ loadingMsg: '加载中',
+ // 需要授权才能请求 默认放开
+ auth: false,
+ // ...
};
// Loading全局实例
let LoadingInstance = {
- target: null,
- count: 0,
+ target: null,
+ count: 0,
};
/**
* 关闭loading
*/
function closeLoading() {
- if (LoadingInstance.count > 0) LoadingInstance.count--;
- if (LoadingInstance.count === 0) uni.hideLoading();
+ if (LoadingInstance.count > 0) LoadingInstance.count--;
+ if (LoadingInstance.count === 0) uni.hideLoading();
}
/**
* @description 请求基础配置 可直接使用访问自定义请求
*/
const http = new Request({
- baseURL: baseUrl + apiPath,
- timeout: 8000,
- method: 'GET',
- header: {
- Accept: 'text/json',
- 'Content-Type': 'application/json;charset=UTF-8',
- platform: $platform.name,
- },
- // #ifdef APP-PLUS
- sslVerify: false,
- // #endif
- // #ifdef H5
- // 跨域请求时是否携带凭证(cookies)仅H5支持(HBuilderX 2.6.15+)
- withCredentials: false,
- // #endif
- custom: options,
+ baseURL: baseUrl + apiPath,
+ timeout: 8000,
+ method: 'GET',
+ header: {
+ Accept: 'text/json',
+ 'Content-Type': 'application/json;charset=UTF-8',
+ platform: $platform.name,
+ },
+ // #ifdef APP-PLUS
+ sslVerify: false,
+ // #endif
+ // #ifdef H5
+ // 跨域请求时是否携带凭证(cookies)仅H5支持(HBuilderX 2.6.15+)
+ withCredentials: false,
+ // #endif
+ custom: options,
});
/**
* @description 请求拦截器
*/
http.interceptors.request.use(
- (config) => {
+ (config) => {
// 自定义处理【auth 授权】:必须登录的接口,则跳出 AuthModal 登录弹窗
- if (config.custom.auth && !$store('user').isLogin) {
- showAuthModal();
- return Promise.reject();
- }
+ if (config.custom.auth && !$store('user').isLogin) {
+ showAuthModal();
+ return Promise.reject();
+ }
// 自定义处理【loading 加载中】:如果需要显示 loading,则显示 loading
- if (config.custom.showLoading) {
- LoadingInstance.count++;
- LoadingInstance.count === 1 &&
- uni.showLoading({
- title: config.custom.loadingMsg,
- mask: true,
- fail: () => {
- uni.hideLoading();
- },
- });
- }
+ if (config.custom.showLoading) {
+ LoadingInstance.count++;
+ LoadingInstance.count === 1 &&
+ uni.showLoading({
+ title: config.custom.loadingMsg,
+ mask: true,
+ fail: () => {
+ uni.hideLoading();
+ },
+ });
+ }
// 增加 token 令牌、terminal 终端、tenant 租户的请求头
- const token = getAccessToken();
- if (token) {
- config.header['Authorization'] = token;
- }
- config.header['terminal'] = getTerminal();
+ const token = getAccessToken();
+ if (token) {
+ config.header['Authorization'] = token;
+ }
+ config.header['terminal'] = getTerminal();
config.header['Accept'] = '*/*';
config.header['tenant-id'] = tenantId;
- return config;
- },
- (error) => {
- return Promise.reject(error);
- },
+ return config;
+ },
+ (error) => {
+ return Promise.reject(error);
+ },
);
/**
* @description 响应拦截器
*/
http.interceptors.response.use(
- (response) => {
- // 约定:如果是 /auth/ 下的 URL 地址,并且返回了 accessToken 说明是登录相关的接口,则自动设置登陆令牌
- if (response.config.url.indexOf('/member/auth/') >= 0 && response.data?.data?.accessToken) {
- $store('user').setToken(response.data.data.accessToken, response.data.data.refreshToken);
- }
+ (response) => {
+ // 约定:如果是 /auth/ 下的 URL 地址,并且返回了 accessToken 说明是登录相关的接口,则自动设置登陆令牌
+ if (response.config.url.indexOf('/member/auth/') >= 0 && response.data?.data?.accessToken) {
+ $store('user').setToken(response.data.data.accessToken, response.data.data.refreshToken);
+ }
// 自定处理【loading 加载中】:如果需要显示 loading,则关闭 loading
- response.config.custom.showLoading && closeLoading();
+ response.config.custom.showLoading && closeLoading();
// 自定义处理【error 错误提示】:如果需要显示错误提示,则显示错误提示
- if (response.data.code !== 0) {
+ if (response.data.code !== 0) {
// 特殊:如果 401 错误码,则跳转到登录页 or 刷新令牌
if (response.data.code === 401) {
return refreshToken(response.config);
}
// 错误提示
- if (response.config.custom.showError) {
- uni.showToast({
- title: response.data.msg || '服务器开小差啦,请稍后再试~',
- icon: 'none',
- mask: true,
- });
+ if (response.config.custom.showError) {
+ uni.showToast({
+ title: response.data.msg || '服务器开小差啦,请稍后再试~',
+ icon: 'none',
+ mask: true,
+ });
}
- }
+ }
- // 自定义处理【showSuccess 成功提示】:如果需要显示成功提示,则显示成功提示
- if (response.config.custom.showSuccess
- && response.config.custom.successMsg !== ''
- && response.data.code === 0) {
+ // 自定义处理【showSuccess 成功提示】:如果需要显示成功提示,则显示成功提示
+ if (
+ response.config.custom.showSuccess &&
+ response.config.custom.successMsg !== '' &&
+ response.data.code === 0
+ ) {
uni.showToast({
- title: response.config.custom.successMsg,
- icon: 'none',
- });
- }
+ title: response.config.custom.successMsg,
+ icon: 'none',
+ });
+ }
// 返回结果:包括 code + data + msg
- return Promise.resolve(response.data);
- },
- (error) => {
- const userStore = $store('user');
- const isLogin = userStore.isLogin;
- let errorMessage = '网络请求出错';
- if (error !== undefined) {
- switch (error.statusCode) {
- case 400:
- errorMessage = '请求错误';
- break;
- case 401:
+ return Promise.resolve(response.data);
+ },
+ (error) => {
+ const userStore = $store('user');
+ const isLogin = userStore.isLogin;
+ let errorMessage = '网络请求出错';
+ if (error !== undefined) {
+ switch (error.statusCode) {
+ case 400:
+ errorMessage = '请求错误';
+ break;
+ case 401:
errorMessage = isLogin ? '您的登陆已过期' : '请先登录';
// 正常情况下,后端不会返回 401 错误,所以这里不处理 handleAuthorized
break;
- case 403:
- errorMessage = '拒绝访问';
- break;
- case 404:
- errorMessage = '请求出错';
- break;
- case 408:
- errorMessage = '请求超时';
- break;
- case 429:
- errorMessage = '请求频繁, 请稍后再访问';
- break;
- case 500:
- errorMessage = '服务器开小差啦,请稍后再试~';
- break;
- case 501:
- errorMessage = '服务未实现';
- break;
- case 502:
- errorMessage = '网络错误';
- break;
- case 503:
- errorMessage = '服务不可用';
- break;
- case 504:
- errorMessage = '网络超时';
- break;
- case 505:
- errorMessage = 'HTTP 版本不受支持';
- break;
- }
- if (error.errMsg.includes('timeout')) errorMessage = '请求超时';
- // #ifdef H5
- if (error.errMsg.includes('Network'))
- errorMessage = window.navigator.onLine ? '服务器异常' : '请检查您的网络连接';
- // #endif
- }
+ case 403:
+ errorMessage = '拒绝访问';
+ break;
+ case 404:
+ errorMessage = '请求出错';
+ break;
+ case 408:
+ errorMessage = '请求超时';
+ break;
+ case 429:
+ errorMessage = '请求频繁, 请稍后再访问';
+ break;
+ case 500:
+ errorMessage = '服务器开小差啦,请稍后再试~';
+ break;
+ case 501:
+ errorMessage = '服务未实现';
+ break;
+ case 502:
+ errorMessage = '网络错误';
+ break;
+ case 503:
+ errorMessage = '服务不可用';
+ break;
+ case 504:
+ errorMessage = '网络超时';
+ break;
+ case 505:
+ errorMessage = 'HTTP 版本不受支持';
+ break;
+ }
+ if (error.errMsg.includes('timeout')) errorMessage = '请求超时';
+ // #ifdef H5
+ if (error.errMsg.includes('Network'))
+ errorMessage = window.navigator.onLine ? '服务器异常' : '请检查您的网络连接';
+ // #endif
+ }
- if (error && error.config) {
- if (error.config.custom.showError === false) {
- uni.showToast({
- title: error.data?.msg || errorMessage,
- icon: 'none',
- mask: true,
- });
- }
- error.config.custom.showLoading && closeLoading();
- }
+ if (error && error.config) {
+ if (error.config.custom.showError === false) {
+ uni.showToast({
+ title: error.data?.msg || errorMessage,
+ icon: 'none',
+ mask: true,
+ });
+ }
+ error.config.custom.showLoading && closeLoading();
+ }
- return false;
- },
+ return false;
+ },
);
// Axios 无感知刷新令牌,参考 https://www.dashingdog.cn/article/11 与 https://segmentfault.com/a/1190000020210980 实现
-let requestList = [] // 请求队列
-let isRefreshToken = false // 是否正在刷新中
+let requestList = []; // 请求队列
+let isRefreshToken = false; // 是否正在刷新中
const refreshToken = async (config) => {
// 如果当前已经是 refresh-token 的 URL 地址,并且还是 401 错误,说明是刷新令牌失败了,直接返回 Promise.reject(error)
if (config.url.indexOf('/member/auth/refresh-token') >= 0) {
- return Promise.reject('error')
+ return Promise.reject('error');
}
// 如果未认证,并且未进行刷新令牌,说明可能是访问令牌过期了
if (!isRefreshToken) {
- isRefreshToken = true
+ isRefreshToken = true;
// 1. 如果获取不到刷新令牌,则只能执行登出操作
- const refreshToken = getRefreshToken()
+ const refreshToken = getRefreshToken();
if (!refreshToken) {
- return handleAuthorized()
+ return handleAuthorized();
}
// 2. 进行刷新访问令牌
try {
@@ -240,34 +242,34 @@ const refreshToken = async (config) => {
throw new Error('刷新令牌失败');
}
// 2.1 刷新成功,则回放队列的请求 + 当前请求
- config.header.Authorization = 'Bearer ' + getAccessToken()
+ config.header.Authorization = 'Bearer ' + getAccessToken();
requestList.forEach((cb) => {
- cb()
- })
- requestList = []
- return request(config)
+ cb();
+ });
+ requestList = [];
+ return request(config);
} catch (e) {
// 为什么需要 catch 异常呢?刷新失败时,请求因为 Promise.reject 触发异常。
// 2.2 刷新失败,只回放队列的请求
requestList.forEach((cb) => {
- cb()
- })
+ cb();
+ });
// 提示是否要登出。即不回放当前请求!不然会形成递归
- return handleAuthorized()
+ return handleAuthorized();
} finally {
- requestList = []
- isRefreshToken = false
+ requestList = [];
+ isRefreshToken = false;
}
} else {
// 添加到队列,等待刷新获取到新的令牌
return new Promise((resolve) => {
requestList.push(() => {
- config.header.Authorization = 'Bearer ' + getAccessToken() // 让每个请求携带自定义token 请根据实际情况自行修改
- resolve(request(config))
- })
- })
+ config.header.Authorization = 'Bearer ' + getAccessToken(); // 让每个请求携带自定义token 请根据实际情况自行修改
+ resolve(request(config));
+ });
+ });
}
-}
+};
/**
* 处理 401 未登录的错误
@@ -279,22 +281,22 @@ const handleAuthorized = () => {
// 登录超时
return Promise.reject({
code: 401,
- msg: userStore.isLogin ? '您的登陆已过期' : '请先登录'
- })
-}
+ msg: userStore.isLogin ? '您的登陆已过期' : '请先登录',
+ });
+};
/** 获得访问令牌 */
-const getAccessToken = () => {
+export const getAccessToken = () => {
return uni.getStorageSync('token');
-}
+};
/** 获得刷新令牌 */
-const getRefreshToken = () => {
+export const getRefreshToken = () => {
return uni.getStorageSync('refresh-token');
-}
+};
const request = (config) => {
- return http.middleware(config);
+ return http.middleware(config);
};
export default request;
From 1ffa754dbe42fcd3b7761029190fff5695b152d9 Mon Sep 17 00:00:00 2001
From: YunaiV
Date: Fri, 4 Oct 2024 19:17:40 +0800
Subject: [PATCH 16/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E5=AE=8C?=
=?UTF-8?q?=E5=96=84=E3=80=91=E7=BA=AF=E7=A7=AF=E5=88=86=E5=85=91=E6=8D=A2?=
=?UTF-8?q?=E6=97=B6=EF=BC=8C=E7=9B=B4=E6=8E=A5=E8=B7=B3=E8=BD=AC=E5=88=B0?=
=?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/order/confirm.vue | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/pages/order/confirm.vue b/pages/order/confirm.vue
index bf22b835..426df6d9 100644
--- a/pages/order/confirm.vue
+++ b/pages/order/confirm.vue
@@ -40,7 +40,10 @@
-
+
兑换积分
0) {
+ sheep.$router.redirect('/pages/pay/index', {
+ id: data.payOrderId,
+ });
+ } else {
+ sheep.$router.redirect('/pages/order/detail', {
+ id: data.id,
+ });
+ }
}
// 检查库存 & 计算订单价格
From 0961aa610ba8bda34fae7a5c11d682842965ecb8 Mon Sep 17 00:00:00 2001
From: YunaiV
Date: Mon, 7 Oct 2024 15:28:12 +0800
Subject: [PATCH 17/28] =?UTF-8?q?=E3=80=90=E7=89=88=E6=9C=AC=E5=8F=91?=
=?UTF-8?q?=E5=B8=83=E3=80=912.3.0=20=E5=8F=91=E5=B8=83~?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env | 2 +-
package.json | 2 +-
sheep/store/app.js | 32 ++++++++++++++++----------------
3 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/.env b/.env
index e463ea6d..8cc0bf56 100644
--- a/.env
+++ b/.env
@@ -1,5 +1,5 @@
# 版本号
-SHOPRO_VERSION=v1.8.3
+SHOPRO_VERSION=v2.3.0
# 后端接口 - 正式环境(通过 process.env.NODE_ENV 非 development)
SHOPRO_BASE_URL=http://api-dashboard.yudao.iocoder.cn
diff --git a/package.json b/package.json
index d2e3bb5f..647aeea7 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"id": "shopro",
"name": "shopro",
"displayName": "芋道商城",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "芋道商城,一套代码,同时发行到iOS、Android、H5、微信小程序多个平台,请使用手机扫码快速体验强大功能",
"scripts": {
"prettier": "prettier --write \"{pages,sheep}/**/*.{js,json,tsx,css,less,scss,vue,html,md}\""
diff --git a/sheep/store/app.js b/sheep/store/app.js
index 4ffdb092..17680971 100644
--- a/sheep/store/app.js
+++ b/sheep/store/app.js
@@ -43,7 +43,7 @@ const app = defineStore({
},
},
shareInfo: {}, // 全局分享信息
- has_wechat_trade_managed: 0 // 小程序发货信息管理 0 没有 || 1 有
+ has_wechat_trade_managed: 0, // 小程序发货信息管理 0 没有 || 1 有
}),
actions: {
// 获取Shopro应用配置和模板
@@ -55,14 +55,14 @@ const app = defineStore({
}
// 加载装修配置
- await adaptTemplate(this.template, templateId)
+ await adaptTemplate(this.template, templateId);
// TODO 芋艿:未来支持管理后台可配;对应 https://api.shopro.sheepjs.com/shop/api/init
if (true) {
this.info = {
name: '芋道商城',
logo: 'https://static.iocoder.cn/ruoyi-vue-pro-logo.png',
- version: '2.2.0',
+ version: '2.3.0',
copyright: '全部开源,个人与企业可 100% 免费使用',
copytime: 'Copyright© 2018-2024',
@@ -71,15 +71,15 @@ const app = defineStore({
};
this.platform = {
share: {
- methods: ["poster", "link"],
- linkAddress: "http://127.0.0.1:3000", // TODO 芋艿:可以考虑改到 .env 那
+ methods: ['poster', 'link'],
+ linkAddress: 'http://127.0.0.1:3000', // TODO 芋艿:可以考虑改到 .env 那
posterInfo: {
- "user_bg": "/static/img/shop/config/user-poster-bg.png",
- "goods_bg": "/static/img/shop/config/goods-poster-bg.png",
- "groupon_bg": "/static/img/shop/config/groupon-poster-bg.png"
- }
+ user_bg: '/static/img/shop/config/user-poster-bg.png',
+ goods_bg: '/static/img/shop/config/goods-poster-bg.png',
+ groupon_bg: '/static/img/shop/config/groupon-poster-bg.png',
+ },
},
- bind_mobile: 0
+ bind_mobile: 0,
};
this.has_wechat_trade_managed = 0;
@@ -111,24 +111,24 @@ const app = defineStore({
// todo: @owen 先做数据适配,后期重构
const adaptTemplate = async (appTemplate, templateId) => {
const { data: diyTemplate } = templateId
- // 查询指定模板,一般是预览时使用
- ? await DiyApi.getDiyTemplate(templateId)
- : await DiyApi.getUsedDiyTemplate();
+ ? // 查询指定模板,一般是预览时使用
+ await DiyApi.getDiyTemplate(templateId)
+ : await DiyApi.getUsedDiyTemplate();
// 模板不存在
if (!diyTemplate) {
$router.error('TemplateError');
- return
+ return;
}
const tabBar = diyTemplate?.property?.tabBar;
if (tabBar) {
- appTemplate.basic.tabbar = tabBar
+ appTemplate.basic.tabbar = tabBar;
if (tabBar?.theme) {
appTemplate.basic.theme = tabBar?.theme;
}
}
appTemplate.home = diyTemplate?.home;
appTemplate.user = diyTemplate?.user;
-}
+};
export default app;
From a4ec421412e200ffc3870da7d4d77a690f6292c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=97=B4=E8=B4=A7?= <252048765@qq.com>
Date: Tue, 1 Oct 2024 14:42:58 +0800
Subject: [PATCH 18/28] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=94=AF=E4=BB=98?=
=?UTF-8?q?=E6=9C=AA=E5=AE=8C=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/commission/components/account-type-select.vue | 7 ++++++-
pages/commission/withdraw.vue | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/pages/commission/components/account-type-select.vue b/pages/commission/components/account-type-select.vue
index 89b4c209..e7b14060 100644
--- a/pages/commission/components/account-type-select.vue
+++ b/pages/commission/components/account-type-select.vue
@@ -75,7 +75,12 @@
icon: '/static/img/shop/pay/alipay.png',
title: '支付宝账户',
value: '4',
- }
+ },
+ {
+ icon: '/static/img/shop/pay/wechat.png',
+ title: '微信零钱',
+ value: '5',
+ }
];
function onChange(e) {
diff --git a/pages/commission/withdraw.vue b/pages/commission/withdraw.vue
index 4ce3ad40..9d050838 100644
--- a/pages/commission/withdraw.vue
+++ b/pages/commission/withdraw.vue
@@ -32,6 +32,7 @@
银行卡转账
微信零钱
支付宝账户
+ 微信零钱2
From b59c41c5f8ae87dfede2c576d345a862f1455c63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=97=B4=E8=B4=A7?= <252048765@qq.com>
Date: Fri, 4 Oct 2024 10:22:33 +0800
Subject: [PATCH 19/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E3=80=91=E5=A2=9E=E5=8A=A0=E8=BD=AC=E8=B4=A6=E5=9B=9E?=
=?UTF-8?q?=E8=B0=83=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/commission/withdraw.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pages/commission/withdraw.vue b/pages/commission/withdraw.vue
index 9d050838..c934fdd1 100644
--- a/pages/commission/withdraw.vue
+++ b/pages/commission/withdraw.vue
@@ -32,7 +32,7 @@
银行卡转账
微信零钱
支付宝账户
- 微信零钱2
+ 微信零钱
@@ -49,7 +49,7 @@
/>
-
+
提现账号
Date: Mon, 7 Oct 2024 20:10:56 +0800
Subject: [PATCH 20/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E5=AE=8C?=
=?UTF-8?q?=E5=96=84=E3=80=91=E7=A7=AF=E5=88=86=E5=95=86=E5=9F=8E=EF=BC=9A?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=AF=8F=E9=A1=B5=E6=98=BE=E7=A4=BA=E5=95=86?=
=?UTF-8?q?=E5=93=81=E6=95=B0=E9=87=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/commission/wallet.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pages/commission/wallet.vue b/pages/commission/wallet.vue
index 2181b30c..4742beab 100644
--- a/pages/commission/wallet.vue
+++ b/pages/commission/wallet.vue
@@ -168,7 +168,7 @@
list: [],
total: 0,
pageNo: 1,
- pageSize: 1,
+ pageSize: 8,
},
loadStatus: '',
From 945109233513b749384afb06a76703ae73c57536 Mon Sep 17 00:00:00 2001
From: YunaiV
Date: Sat, 12 Oct 2024 20:23:26 +0800
Subject: [PATCH 21/28] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?=
=?UTF-8?q?=E9=83=A8=E5=88=86=E7=95=8C=E9=9D=A2=E7=9A=84=20pageSize=20=3D?=
=?UTF-8?q?=201=EF=BC=8C=E5=AF=BC=E8=87=B4=E6=97=A0=E6=B3=95=E4=B8=8A?=
=?UTF-8?q?=E5=95=A6=E5=88=B7=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/commission/components/commission-log.vue | 2 +-
pages/commission/goods.vue | 2 +-
pages/commission/order.vue | 2 +-
pages/coupon/detail.vue | 2 +-
pages/goods/comment/list.vue | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/pages/commission/components/commission-log.vue b/pages/commission/components/commission-log.vue
index 809d747e..cee3b3cb 100644
--- a/pages/commission/components/commission-log.vue
+++ b/pages/commission/components/commission-log.vue
@@ -63,7 +63,7 @@
list: [],
total: 0,
pageNo: 1,
- pageSize: 1,
+ pageSize: 8,
},
});
diff --git a/pages/commission/goods.vue b/pages/commission/goods.vue
index 4a3d9eba..7435e402 100644
--- a/pages/commission/goods.vue
+++ b/pages/commission/goods.vue
@@ -70,7 +70,7 @@
list: [],
total: 0,
pageNo: 1,
- pageSize: 1,
+ pageSize: 8,
},
loadStatus: '',
shareInfo: {},
diff --git a/pages/commission/order.vue b/pages/commission/order.vue
index c759d2a6..51952c8f 100644
--- a/pages/commission/order.vue
+++ b/pages/commission/order.vue
@@ -97,7 +97,7 @@
list: [],
total: 0,
pageNo: 1,
- pageSize: 1,
+ pageSize: 8,
},
});
diff --git a/pages/coupon/detail.vue b/pages/coupon/detail.vue
index 2fca5257..f0fa1131 100644
--- a/pages/coupon/detail.vue
+++ b/pages/coupon/detail.vue
@@ -164,7 +164,7 @@
list: [],
total: 0,
pageNo: 1,
- pageSize: 1,
+ pageSize: 8,
},
categoryId: 0, // 选中的商品分类编号
tabMaps: [], // 指定分类时,每个分类构成一个 tab
diff --git a/pages/goods/comment/list.vue b/pages/goods/comment/list.vue
index ed43e1b7..ed55988b 100644
--- a/pages/goods/comment/list.vue
+++ b/pages/goods/comment/list.vue
@@ -48,7 +48,7 @@
list: [],
total: 0,
pageNo: 1,
- pageSize: 1,
+ pageSize: 8,
},
});
From fd10210972374917e5bca9f63f08cdc9265adced Mon Sep 17 00:00:00 2001
From: YunaiV
Date: Sun, 13 Oct 2024 12:42:08 +0800
Subject: [PATCH 22/28] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=E3=80=91=E6=B7=BB=E5=8A=A0=E5=BE=AE=E4=BF=A1=E8=BD=AC?=
=?UTF-8?q?=E8=B4=A6=E5=88=B0=E9=9B=B6=E9=92=B1=E6=8F=90=E7=8E=B0=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/account-type-select.vue | 19 ++++++++++---------
pages/commission/withdraw.vue | 4 ++--
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/pages/commission/components/account-type-select.vue b/pages/commission/components/account-type-select.vue
index e7b14060..cbbfc6db 100644
--- a/pages/commission/components/account-type-select.vue
+++ b/pages/commission/components/account-type-select.vue
@@ -45,7 +45,8 @@
type: Boolean,
default: false,
},
- methods: { // 开启的提现方式
+ methods: {
+ // 开启的提现方式
type: Array,
default: [],
},
@@ -57,7 +58,7 @@
const typeList = [
{
- // icon: '/static/img/shop/pay/wechat.png', // TODO 芋艿:后续给个 icon
+ icon: '/static/img/shop/pay/wechat.png',
title: '钱包余额',
value: '1',
},
@@ -68,7 +69,7 @@
},
{
icon: '/static/img/shop/pay/wechat.png',
- title: '微信零钱',
+ title: '微信账户', // 微信手动转账
value: '3',
},
{
@@ -76,11 +77,11 @@
title: '支付宝账户',
value: '4',
},
- {
- icon: '/static/img/shop/pay/wechat.png',
- title: '微信零钱',
- value: '5',
- }
+ {
+ icon: '/static/img/shop/pay/wechat.png',
+ title: '微信零钱', // 微信 API 转账
+ value: '5',
+ },
];
function onChange(e) {
@@ -94,7 +95,7 @@
}
// 赋值
emits('update:modelValue', {
- type: state.currentValue
+ type: state.currentValue,
});
// 关闭弹窗
emits('close');
diff --git a/pages/commission/withdraw.vue b/pages/commission/withdraw.vue
index c934fdd1..6cde0283 100644
--- a/pages/commission/withdraw.vue
+++ b/pages/commission/withdraw.vue
@@ -30,9 +30,9 @@
请选择提现方式
钱包余额
银行卡转账
- 微信零钱
+ 微信账户
支付宝账户
- 微信零钱
+ 微信零钱
From 8e50c5da4946dc44b92bfd96d39a5847cf44e8bd Mon Sep 17 00:00:00 2001
From: FN <13263199260@163.com>
Date: Sun, 13 Oct 2024 14:55:58 +0800
Subject: [PATCH 23/28] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=911.?=
=?UTF-8?q?=E5=88=86=E9=94=80=E4=B8=AD=E5=BF=83=E7=94=A8=E6=88=B7=E5=8D=A1?=
=?UTF-8?q?=E7=89=87=E6=A0=B7=E5=BC=8F=E6=B2=A1=E6=9C=89=E5=B1=85=E4=B8=AD?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=202.=E6=8E=A8=E5=B9=BF=E6=8E=92=E8=A1=8C?=
=?UTF-8?q?=E6=A6=9C=E5=91=A8=E6=8E=92=E8=A1=8C=E3=80=81=E6=9C=88=E6=8E=92?=
=?UTF-8?q?=E8=A1=8C=E5=88=87=E6=8D=A2=E6=A0=B7=E5=BC=8F=E7=95=99=E7=99=BD?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/commission/components/commission-info.vue | 7 ++++---
pages/commission/promoter.vue | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/pages/commission/components/commission-info.vue b/pages/commission/components/commission-info.vue
index 65f2c592..79f7cd86 100644
--- a/pages/commission/components/commission-info.vue
+++ b/pages/commission/components/commission-info.vue
@@ -31,9 +31,10 @@
\ No newline at end of file
+
diff --git a/pages/commission/promoter.vue b/pages/commission/promoter.vue
index b7d0a89b..bdf1e1e7 100644
--- a/pages/commission/promoter.vue
+++ b/pages/commission/promoter.vue
@@ -163,7 +163,7 @@
}
.PromoterRank .header .nav {
- width: 450rpx;
+ width: 440rpx;
height: 66rpx;
border: 1px solid #fff;
border-radius: 33rpx;
@@ -294,4 +294,4 @@
width: 175rpx;
text-align: right;
}
-
\ No newline at end of file
+
From 789ec69933dcad7c0f6ec56d9e16017025fbe242 Mon Sep 17 00:00:00 2001
From: YunaiV
Date: Sun, 13 Oct 2024 21:30:14 +0800
Subject: [PATCH 24/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E3=80=91=E8=AE=A2=E5=8D=95=E7=A1=AE=E8=AE=A4=E9=A1=B5?=
=?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=8C=89=E7=85=A7=E9=A1=BA=E5=BA=8F?=
=?UTF-8?q?=E8=87=AA=E5=8A=A8=E9=80=89=E6=8B=A9=E7=89=A9=E6=B5=81=E6=96=B9?=
=?UTF-8?q?=E5=BC=8F=EF=BC=8C=E6=9B=BF=E4=BB=A3=E5=8E=9F=E6=9C=89=E5=8F=AA?=
=?UTF-8?q?=E9=80=89=E6=8B=A9=E2=80=9C=E5=BF=AB=E9=80=92=E9=85=8D=E9=80=81?=
=?UTF-8?q?=E2=80=9D=E7=9A=84=E6=96=B9=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/order/addressSelection.vue | 12 ++++++++----
pages/order/confirm.vue | 27 ++++++++++++++++++++++++---
sheep/api/trade/config.js | 3 +++
sheep/api/trade/order.js | 3 +++
4 files changed, 38 insertions(+), 7 deletions(-)
diff --git a/pages/order/addressSelection.vue b/pages/order/addressSelection.vue
index d54c68d3..d4789ea0 100644
--- a/pages/order/addressSelection.vue
+++ b/pages/order/addressSelection.vue
@@ -29,9 +29,9 @@
[默认]
- {{ state.addressInfo.areaName }} {{ state.addressInfo.detailAddress }}
+
+ {{ state.addressInfo.areaName }} {{ state.addressInfo.detailAddress }}
+
@@ -44,7 +44,11 @@
-
+
{{ state.pickUpInfo.name }}
diff --git a/pages/order/confirm.vue b/pages/order/confirm.vue
index 426df6d9..5e8e2ba4 100644
--- a/pages/order/confirm.vue
+++ b/pages/order/confirm.vue
@@ -244,7 +244,7 @@
const addressState = ref({
addressInfo: {}, // 选择的收货地址
- deliveryType: 1, // 收货方式:1-快递配送,2-门店自提
+ deliveryType: undefined, // 收货方式:1-快递配送,2-门店自提
isPickUp: true, // 门店自提是否开启
pickUpInfo: {}, // 选择的自提门店信息
receiverName: '', // 收件人名称
@@ -349,7 +349,7 @@
pointActivityId: state.orderPayload.pointActivityId,
});
if (code !== 0) {
- return;
+ return code;
}
state.orderInfo = data;
state.couponInfo = data.coupons || [];
@@ -357,20 +357,41 @@
if (state.orderInfo.address) {
addressState.value.addressInfo = state.orderInfo.address;
}
+ return code;
}
onLoad(async (options) => {
+ // 解析参数
if (!options.data) {
sheep.$helper.toast('参数不正确,请检查!');
return;
}
state.orderPayload = JSON.parse(options.data);
- await getOrderInfo();
+
// 获取交易配置
const { data, code } = await TradeConfigApi.getTradeConfig();
if (code === 0) {
addressState.value.isPickUp = data.deliveryPickUpEnabled;
}
+
+ // 价格计算
+ // 情况一:先自动选择“快递物流”
+ addressState.value.deliveryType = 1;
+ let orderCode = await getOrderInfo();
+ if (orderCode === 0) {
+ return;
+ }
+ // 情况二:失败,再自动选择“门店自提”
+ if (addressState.value.isPickUp) {
+ addressState.value.deliveryType = 2;
+ let orderCode = await getOrderInfo();
+ if (orderCode === 0) {
+ return;
+ }
+ }
+ // 情况三:都失败,则不选择
+ addressState.value.deliveryType = undefined;
+ await getOrderInfo();
});
// 使用 watch 监听地址和配送方式的变化
diff --git a/sheep/api/trade/config.js b/sheep/api/trade/config.js
index 16806ed8..d49235e4 100644
--- a/sheep/api/trade/config.js
+++ b/sheep/api/trade/config.js
@@ -6,6 +6,9 @@ const TradeConfigApi = {
return request({
url: `/trade/config/get`,
method: 'GET',
+ custom: {
+ showLoading: false,
+ },
});
},
};
diff --git a/sheep/api/trade/order.js b/sheep/api/trade/order.js
index 4091c0dc..10cb6352 100644
--- a/sheep/api/trade/order.js
+++ b/sheep/api/trade/order.js
@@ -35,6 +35,9 @@ const OrderApi = {
if (!(data.pointActivityId > 0)) {
delete data2.pointActivityId;
}
+ if (!(data.deliveryType > 0)) {
+ delete data2.deliveryType;
+ }
// 解决 SpringMVC 接受 List- 参数的问题
delete data2.items;
for (let i = 0; i < data.items.length; i++) {
From c8f9043869d14ebc626d0eed5f00cf7f49a51bab Mon Sep 17 00:00:00 2001
From: YunaiV
Date: Sun, 13 Oct 2024 21:41:25 +0800
Subject: [PATCH 25/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D=E3=80=91=E7=A7=AF=E5=88=86=E5=95=86=E5=9F=8E=EF=BC=8C?=
=?UTF-8?q?=E5=95=86=E5=93=81=E4=B8=8D=E6=94=AF=E6=8C=81=E4=B8=8B=E6=8B=89?=
=?UTF-8?q?=E5=B1=95=E7=A4=BA=E6=9B=B4=E5=A4=9A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/activity/point/list.vue | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pages/activity/point/list.vue b/pages/activity/point/list.vue
index 129f9880..c706f008 100644
--- a/pages/activity/point/list.vue
+++ b/pages/activity/point/list.vue
@@ -8,7 +8,7 @@
:scroll-with-animation="false"
:enable-back-to-top="true"
>
-
+
@@ -60,7 +60,7 @@
// 加载更多
function loadMore() {
- if (state.loadStatus !== 'noMore') {
+ if (loadStatus !== 'noMore') {
activityPageParams.pageNo += 1;
getActivityList();
}
From f36b1834079d535de6ce9238f000d3675748dc3d Mon Sep 17 00:00:00 2001
From: YunaiV
Date: Sun, 27 Oct 2024 18:17:36 +0800
Subject: [PATCH 26/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E3=80=91=E7=AD=BE=E5=88=B0=E7=9A=84=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/app/sign.vue | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/pages/app/sign.vue b/pages/app/sign.vue
index cf299d3c..4b1cd550 100644
--- a/pages/app/sign.vue
+++ b/pages/app/sign.vue
@@ -25,7 +25,7 @@
-
+
签到说明
- 1、已累计签到{{state.signInfo.totalDay}}天
+ 1.已累计签到{{ state.signInfo.totalDay }}天
- 2、据说连续签到第 {{ state.maxDay }} 天可获得超额积分,一定要坚持签到哦~~~
+ 2.据说连续签到第 {{ state.maxDay }} 天可获得超额积分,要坚持签到哦~~
+ 3.积分可以在购物时抵现金结算的哦 ~~
@@ -347,8 +348,7 @@
.title {
font-size: 34rpx;
font-weight: bold;
- // color: var(--ui-BG-Main);
- color: #ff6000;
+ color: var(--ui-BG-Main-TC);
}
.subtitle {
@@ -410,12 +410,10 @@
background-color: #f4b409;
border-radius: 16rpx;
font-size: 20rpx;
- color: #a57d3f;
+ color: var(--ui-BG-Main-TC);
line-height: 32rpx;
- }
-
- .venusSelect {
- background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZ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8nkoixkMesiGzT1Q19q20t+0dTvwnU/A0iQSDYeoNinBQLOTE/2BjUcvCE5rMoJ2XcSYYBr3FOPmoHHLU+APdtJMpvg7bp8XAr19mKJ1weK9u5CJxUDpMt+HxfJ2HbsoVLzwa1aT4fw8dD3/Au43lv7YYjQF19gAHXv6UYMJa7UepQZFJzMT9fp9lJidorCvgbfkSRXbBB2UDRX5MdREnZYNwZECRcxQXLUnl8s5KPw6MNFsdBFzzdaaE8xGwrUx0eXZORrw3c1NNdEk0ZwUi2OQn7fvZBz9fEZKDjNzFLqn7dYApnVtNtKvecx5oxVfHCsmSt4ts/0rrxiO5NO6jvUWyC0guZgT+SPllu4Jzjr9AT0bjqKWQ1qH0RWQfvKcwzm+s6BB01X6RC1pHIf82w02NRmnsng7WjX28iJqLu5Ec4XXSE5XYg+S91A+UlHS/H2riXfq1n3N8mM2HKOOgutsodkNqZKIMxGQokvFw40jhnFMoZZ70CzyrpLd2S0kb00Oa5KMJDC8LAHL4QEmK4HGKYaSq+/bJFTyZ/GyX+VK3pzUStA1SRJrkTNZrWHG1e8IGuMZt5eqrUH9U8iwUbVci1w1BKnW65RWSVaVnBomAKoI3E9IQEEipX3jap9Q1hxmBElBocp/AmIYcQaRQSQQ36r/E8odvepOxoa5khfRT1pf+8q0/wUYAFU/P0XyeZQPAAAAAElFTkSuQmCC');
+ text-align: center;
+ padding: 2rpx;
}
.venus {
@@ -424,7 +422,11 @@
background-size: 100% 100%;
width: 56rpx;
height: 56rpx;
- margin: 10rpx 0;
+ margin: 10rpx auto;
+ }
+
+ .venusSelect {
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4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1aT4fw8dD3/Au43lv7YYjQF19gAHXv6UYMJa7UepQZFJzMT9fp9lJidorCvgbfkSRXbBB2UDRX5MdREnZYNwZECRcxQXLUnl8s5KPw6MNFsdBFzzdaaE8xGwrUx0eXZORrw3c1NNdEk0ZwUi2OQn7fvZBz9fEZKDjNzFLqn7dYApnVtNtKvecx5oxVfHCsmSt4ts/0rrxiO5NO6jvUWyC0guZgT+SPllu4Jzjr9AT0bjqKWQ1qH0RWQfvKcwzm+s6BB01X6RC1pHIf82w02NRmnsng7WjX28iJqLu5Ec4XXSE5XYg+S91A+UlHS/H2riXfq1n3N8mM2HKOOgutsodkNqZKIMxGQokvFw40jhnFMoZZ70CzyrpLd2S0kb00Oa5KMJDC8LAHL4QEmK4HGKYaSq+/bJFTyZ/GyX+VK3pzUStA1SRJrkTNZrWHG1e8IGuMZt5eqrUH9U8iwUbVci1w1BKnW65RWSVaVnBomAKoI3E9IQEEipX3jap9Q1hxmBElBocp/AmIYcQaRQSQQ36r/E8odvepOxoa5khfRT1pf+8q0/wUYAFU/P0XyeZQPAAAAAElFTkSuQmCC');
}
.num {
@@ -435,7 +437,7 @@
.item {
align-items: center;
justify-content: space-between;
- border-bottom: 1px solid #eee;
+ flex-direction: column;
height: 130rpx;
}
@@ -446,6 +448,6 @@
}
.on {
- background-color: #999 !important;
+ color: #f4b409;
}
From 4bdc82786e7d76ca6a600f70c99379656bbf83af Mon Sep 17 00:00:00 2001
From: YunaiV
Date: Sun, 27 Oct 2024 18:22:47 +0800
Subject: [PATCH 27/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D=E3=80=91s-title-block=20=E7=9A=84=20fontWeight=20?=
=?UTF-8?q?=E5=A4=9A=E5=8A=A0=E4=BA=86=20px=20=E5=83=8F=E7=B4=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../s-title-block/s-title-block.vue | 187 +++++++++---------
1 file changed, 95 insertions(+), 92 deletions(-)
diff --git a/sheep/components/s-title-block/s-title-block.vue b/sheep/components/s-title-block/s-title-block.vue
index cb610336..58f999db 100644
--- a/sheep/components/s-title-block/s-title-block.vue
+++ b/sheep/components/s-title-block/s-title-block.vue
@@ -1,108 +1,111 @@
-
-
-
- {{ data.title }}
-
- {{ data.description }}
-
-
-
- {{ data.more.text }}
-
-
-
+
+
+
+ {{ data.title }}
+
+ {{
+ data.description
+ }}
+
+
+
+ {{ data.more.text }}
+
+
+
\ No newline at end of file
+ .more-box {
+ white-space: nowrap;
+ font-size: 22rpx;
+ color: #999;
+ position: absolute;
+ top: 50%;
+ transform: translateY(-50%);
+ right: 20rpx;
+ }
+ }
+
From 0213a4b88aad8a84821d5b0143a3a4a0308f5814 Mon Sep 17 00:00:00 2001
From: YunaiV
Date: Sun, 27 Oct 2024 20:23:29 +0800
Subject: [PATCH 28/28] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D=E3=80=91=E9=A2=86=E5=8F=96=E4=BC=98=E6=83=A0=E5=8A=B5?=
=?UTF-8?q?=E5=9C=A8=20validityType=20=3D=201=20=E6=97=B6=EF=BC=88?=
=?UTF-8?q?=E5=9B=BA=E5=AE=9A=E6=97=A5=E6=9C=9F=EF=BC=89=EF=BC=8C=E5=B1=95?=
=?UTF-8?q?=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sheep/components/s-activity-pop/s-activity-pop.vue | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sheep/components/s-activity-pop/s-activity-pop.vue b/sheep/components/s-activity-pop/s-activity-pop.vue
index 44a028ac..e6ee26bb 100644
--- a/sheep/components/s-activity-pop/s-activity-pop.vue
+++ b/sheep/components/s-activity-pop/s-activity-pop.vue
@@ -57,8 +57,9 @@
{{
item.validityType == 1
- ? sheep.$helper.timeFormat(item.validStartTime, 'yyyy.mm.dd') -
- sheep.$helper.timeFormat(item.validEndTime, 'yyyy.mm.dd')
+ ? sheep.$helper.timeFormat(item.validStartTime, 'yyyy-mm-dd') +
+ '-' +
+ sheep.$helper.timeFormat(item.validEndTime, 'yyyy-mm-dd')
: '领取后' + item.fixedStartTerm + '-' + item.fixedEndTerm + '天可用'
}}