From bf8afdc0f4e25a074301095faa65041b007a69fc Mon Sep 17 00:00:00 2001 From: 15386982806 Date: Tue, 16 Jan 2024 17:29:19 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=B9=B0=E5=AE=B6=E7=AB=AF=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/public/config.js | 12 ++-- buyer/src/pages/home/enumeration.js | 2 +- manager/public/config.js | 58 ++++++++++--------- seller/public/config.js | 12 ++-- .../goods/goods-seller/goodsOperationSec.vue | 46 ++++++++++++--- 5 files changed, 86 insertions(+), 44 deletions(-) diff --git a/buyer/public/config.js b/buyer/public/config.js index 2272ff76..f1061804 100644 --- a/buyer/public/config.js +++ b/buyer/public/config.js @@ -3,10 +3,14 @@ var BASE = { * @description api请求基础路径 */ API_DEV: { - common: "https://common-api.pickmall.cn", - buyer: "https://buyer-api.pickmall.cn", - seller: "https://store-api.pickmall.cn", - manager: "https://admin-api.pickmall.cn" + // common: "https://common-api.pickmall.cn", + // buyer: "https://buyer-api.pickmall.cn", + // seller: "https://store-api.pickmall.cn", + // manager: "https://admin-api.pickmall.cn" + common: "http://192.168.31.225:8890", + buyer: "http://192.168.31.225:8888", + seller: "http://192.168.31.225:8889", + manager: "http://192.168.31.225:8887" }, API_PROD: { common: "https://common-api.pickmall.cn", diff --git a/buyer/src/pages/home/enumeration.js b/buyer/src/pages/home/enumeration.js index 60a6f82f..60caf556 100644 --- a/buyer/src/pages/home/enumeration.js +++ b/buyer/src/pages/home/enumeration.js @@ -30,7 +30,7 @@ export const orderStatusList = [ status: 'TAKE' }, { - name: '已取消', + name: '已关闭', status: 'CANCELLED' }, { diff --git a/manager/public/config.js b/manager/public/config.js index ada826fc..5be44003 100644 --- a/manager/public/config.js +++ b/manager/public/config.js @@ -1,29 +1,33 @@ var BASE = { - /** - * @description api请求基础路径 - */ - API_DEV: { - common: "https://common-api.pickmall.cn", - buyer: "https://buyer-api.pickmall.cn", - seller: "https://store-api.pickmall.cn", - manager: "https://admin-api.pickmall.cn" - }, - API_PROD: { - common: "https://common-api.pickmall.cn", - buyer: "https://buyer-api.pickmall.cn", - seller: "https://store-api.pickmall.cn", - manager: "https://admin-api.pickmall.cn" - }, - /** - * @description // 跳转买家端地址 pc端 - */ - PC_URL: "https://pc-b2b2c.pickmall.cn", - /** - * @description // 跳转买家端地址 wap端 - */ - WAP_URL: "https://m-b2b2c.pickmall.cn", - /** - * @description api请求基础路径前缀 - */ - PREFIX: "/manager" + /** + * @description api请求基础路径 + */ + API_DEV: { + // common: "https://common-api.pickmall.cn", + // buyer: "https://buyer-api.pickmall.cn", + // seller: "https://store-api.pickmall.cn", + // manager: "https://admin-api.pickmall.cn", + common: "http://192.168.31.225:8890", + buyer: "http://192.168.31.225:8888", + seller: "http://192.168.31.225:8889", + manager: "http://192.168.31.225:8887" + }, + API_PROD: { + common: "https://common-api.pickmall.cn", + buyer: "https://buyer-api.pickmall.cn", + seller: "https://store-api.pickmall.cn", + manager: "https://admin-api.pickmall.cn" + }, + /** + * @description // 跳转买家端地址 pc端 + */ + PC_URL: "https://pc-b2b2c.pickmall.cn", + /** + * @description // 跳转买家端地址 wap端 + */ + WAP_URL: "https://m-b2b2c.pickmall.cn", + /** + * @description api请求基础路径前缀 + */ + PREFIX: "/manager" }; diff --git a/seller/public/config.js b/seller/public/config.js index 87161bcb..939235af 100644 --- a/seller/public/config.js +++ b/seller/public/config.js @@ -3,10 +3,14 @@ var BASE = { * @description api请求基础路径 */ API_DEV: { - common: "https://common-api.pickmall.cn", - buyer: "https://buyer-api.pickmall.cn", - seller: "https://store-api.pickmall.cn", - manager: "https://admin-api.pickmall.cn", + // common: "https://common-api.pickmall.cn", + // buyer: "https://buyer-api.pickmall.cn", + // seller: "https://store-api.pickmall.cn", + // manager: "https://admin-api.pickmall.cn", + common: "http://192.168.31.225:8890", + buyer: "http://192.168.31.225:8888", + seller: "http://192.168.31.225:8889", + manager: "http://192.168.31.225:8887" }, API_PROD: { common: "https://common-api.pickmall.cn", diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue index 3c5f1323..b526b55d 100644 --- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue +++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue @@ -178,9 +178,9 @@ + @on-change="skuValueChange(val, index, item, $index)">   @@ -1220,8 +1221,41 @@ export default { } return len; }, + truncateString(str) { + let len = str.length; // 获取原始字符串的长度 + if (len <= 10 && /^[\u4e00-\u9fa5]+$/.test(str)) { // 判断字符串长度小于等于10且只包含中文时直接返回原字符串 + return str; + } else { + let count = 0; // 记录已经统计的字节数(UTF-8编码) + for (let i = 0; i < len; i++) { + let charCode = str.charCodeAt(i); + if ((charCode >= 0x0001 && charCode <= 0x007F) || (charCode >= 0xFF60 && charCode <= 0xFF9F)) { // ASCII字符或全角字符 + count += 1; + } else { + count += 2; // UTF-8编码中非ASCII字符占两个字节 + } + if (count > 10 * 2) { // 当已经统计的字节数大于10*2时,说明已经达到了限制条件 + break; + } + } + console.log('根据统计得到的字节数进行切片并返回结果', str, str.substr(0, Math.floor((count - 1) / 2))); + return str.substr(0, Math.floor((count - 1) / 2)); // 根据统计得到的字节数进行切片并返回结果 + } + }, // 编辑规格值 - skuValueChange(val, index, item) { + skuValueChange(val, index, item, $index) { + if (this.zz(0, val.value) > 20) { + this.$Message.error("规格值最多十个字符长度!"); + // val.value = val.value.toString().slice(0, 4); + this.$forceUpdate();// 调用该方法会触发组件的重新渲染 + // val.value = this.truncateString(val.value); + this.skuInfo[$index].spec_values[index].value = this.truncateString(val.value); + // this.$set(this.skuInfo[$index].spec_values[index], 'value', this.truncateString(val.value)); + // this.$set(item, 'value', this.truncateString(val.value)); + this.$forceUpdate();// 调用该方法会触发组件的重新渲染 + return; + } + console.log('编辑规格值改变', item); if (this.skuTableData.find((i) => i[val.name] === val.value)) { this.$Message.error("已存在相同规格值!"); return; @@ -1230,10 +1264,6 @@ export default { this.$Message.error("规格值不能为空!"); return; } - if (this.zz(0, val.value) > 20) { - this.$Message.error("规格值最多十个字符长度!"); - return; - } let curVal = this.currentSkuVal; this.skuTableData = this.skuTableData.map((e) => { if (e[val.name] === curVal) { @@ -1437,7 +1467,7 @@ export default { key: columnName, }); }); - + console.log('渲染头部', this.skuInfo); // 有成本价和价格的情况 if (this.baseInfoForm.salesModel !== "WHOLESALE") { pushData.push( From 7ba94c7fe113f1633af72c4db382618512780615 Mon Sep 17 00:00:00 2001 From: 15386982806 Date: Tue, 16 Jan 2024 17:54:28 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=95=86=E5=93=81?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/public/config.js | 12 ++--- manager/public/config.js | 12 ++--- seller/public/config.js | 12 ++--- .../goods/goods-seller/goodsOperationSec.vue | 45 ++++++++++++------- 4 files changed, 41 insertions(+), 40 deletions(-) diff --git a/buyer/public/config.js b/buyer/public/config.js index f1061804..2272ff76 100644 --- a/buyer/public/config.js +++ b/buyer/public/config.js @@ -3,14 +3,10 @@ var BASE = { * @description api请求基础路径 */ API_DEV: { - // common: "https://common-api.pickmall.cn", - // buyer: "https://buyer-api.pickmall.cn", - // seller: "https://store-api.pickmall.cn", - // manager: "https://admin-api.pickmall.cn" - common: "http://192.168.31.225:8890", - buyer: "http://192.168.31.225:8888", - seller: "http://192.168.31.225:8889", - manager: "http://192.168.31.225:8887" + common: "https://common-api.pickmall.cn", + buyer: "https://buyer-api.pickmall.cn", + seller: "https://store-api.pickmall.cn", + manager: "https://admin-api.pickmall.cn" }, API_PROD: { common: "https://common-api.pickmall.cn", diff --git a/manager/public/config.js b/manager/public/config.js index 5be44003..9f51858a 100644 --- a/manager/public/config.js +++ b/manager/public/config.js @@ -3,14 +3,10 @@ var BASE = { * @description api请求基础路径 */ API_DEV: { - // common: "https://common-api.pickmall.cn", - // buyer: "https://buyer-api.pickmall.cn", - // seller: "https://store-api.pickmall.cn", - // manager: "https://admin-api.pickmall.cn", - common: "http://192.168.31.225:8890", - buyer: "http://192.168.31.225:8888", - seller: "http://192.168.31.225:8889", - manager: "http://192.168.31.225:8887" + common: "https://common-api.pickmall.cn", + buyer: "https://buyer-api.pickmall.cn", + seller: "https://store-api.pickmall.cn", + manager: "https://admin-api.pickmall.cn", }, API_PROD: { common: "https://common-api.pickmall.cn", diff --git a/seller/public/config.js b/seller/public/config.js index 939235af..87161bcb 100644 --- a/seller/public/config.js +++ b/seller/public/config.js @@ -3,14 +3,10 @@ var BASE = { * @description api请求基础路径 */ API_DEV: { - // common: "https://common-api.pickmall.cn", - // buyer: "https://buyer-api.pickmall.cn", - // seller: "https://store-api.pickmall.cn", - // manager: "https://admin-api.pickmall.cn", - common: "http://192.168.31.225:8890", - buyer: "http://192.168.31.225:8888", - seller: "http://192.168.31.225:8889", - manager: "http://192.168.31.225:8887" + common: "https://common-api.pickmall.cn", + buyer: "https://buyer-api.pickmall.cn", + seller: "https://store-api.pickmall.cn", + manager: "https://admin-api.pickmall.cn", }, API_PROD: { common: "https://common-api.pickmall.cn", diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue index b526b55d..623da940 100644 --- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue +++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue @@ -196,7 +196,7 @@ - {{skuInfo}} +   @@ -1197,9 +1197,20 @@ export default { this.$Message.error("已存在相同规格项!"); return; } + // if (this.zz(0, val) > 20) { + // this.$Message.error("规格项最多十个字符长度!"); + // return; + // } if (this.zz(0, val) > 20) { - this.$Message.error("规格项最多十个字符长度!"); - return; + this.$Message.error("规格值最多十个字符长度!"); + // val = val.toString().slice(0, 4); + this.$forceUpdate();// 调用该方法会触发组件的重新渲染 + // val = this.truncateString(val); + this.skuInfo[index].name = this.truncateString(val); + // this.$set(this.skuInfo[$index].spec_values[index], 'value', this.truncateString(val)); + // this.$set(item, 'value', this.truncateString(val)); + this.$forceUpdate();// 调用该方法会触发组件的重新渲染 + // return; } this.skuTableData = this.skuTableData.map((e) => { e[val] = e[this.currentSkuItem]; @@ -1238,12 +1249,20 @@ export default { break; } } - console.log('根据统计得到的字节数进行切片并返回结果', str, str.substr(0, Math.floor((count - 1) / 2))); - return str.substr(0, Math.floor((count - 1) / 2)); // 根据统计得到的字节数进行切片并返回结果 + // console.log('根据统计得到的字节数进行切片并返回结果', str, str.substr(0, Math.floor((count - 1) / 2))); + return str.substr(0, Math.floor((count + 1) / 2)); // 根据统计得到的字节数进行切片并返回结果 } }, // 编辑规格值 skuValueChange(val, index, item, $index) { + if (this.skuTableData.find((i) => i[val.name] === val.value)) { + this.$Message.error("已存在相同规格值!"); + return; + } + if (val.value === '') { + this.$Message.error("规格值不能为空!"); + return; + } if (this.zz(0, val.value) > 20) { this.$Message.error("规格值最多十个字符长度!"); // val.value = val.value.toString().slice(0, 4); @@ -1253,17 +1272,12 @@ export default { // this.$set(this.skuInfo[$index].spec_values[index], 'value', this.truncateString(val.value)); // this.$set(item, 'value', this.truncateString(val.value)); this.$forceUpdate();// 调用该方法会触发组件的重新渲染 - return; - } - console.log('编辑规格值改变', item); - if (this.skuTableData.find((i) => i[val.name] === val.value)) { - this.$Message.error("已存在相同规格值!"); - return; - } - if (val.value === '') { - this.$Message.error("规格值不能为空!"); - return; + // return; } + // console.log('编辑规格值改变', item); + + + let curVal = this.currentSkuVal; this.skuTableData = this.skuTableData.map((e) => { if (e[val.name] === curVal) { @@ -1467,7 +1481,6 @@ export default { key: columnName, }); }); - console.log('渲染头部', this.skuInfo); // 有成本价和价格的情况 if (this.baseInfoForm.salesModel !== "WHOLESALE") { pushData.push( From 94e389ab23e32f7e0bfa9d648fc4adc095cd52af Mon Sep 17 00:00:00 2001 From: 15386982806 Date: Tue, 16 Jan 2024 18:09:11 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E9=95=BF=E5=BA=A6=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goods/goods-seller/goodsOperationSec.vue | 55 +++++++------------ 1 file changed, 19 insertions(+), 36 deletions(-) diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue index 623da940..bc78f691 100644 --- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue +++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue @@ -1197,18 +1197,10 @@ export default { this.$Message.error("已存在相同规格项!"); return; } - // if (this.zz(0, val) > 20) { - // this.$Message.error("规格项最多十个字符长度!"); - // return; - // } if (this.zz(0, val) > 20) { this.$Message.error("规格值最多十个字符长度!"); // val = val.toString().slice(0, 4); - this.$forceUpdate();// 调用该方法会触发组件的重新渲染 - // val = this.truncateString(val); - this.skuInfo[index].name = this.truncateString(val); - // this.$set(this.skuInfo[$index].spec_values[index], 'value', this.truncateString(val)); - // this.$set(item, 'value', this.truncateString(val)); + this.skuInfo[index].name = this.countCharacters(val, 10); this.$forceUpdate();// 调用该方法会触发组件的重新渲染 // return; } @@ -1232,26 +1224,25 @@ export default { } return len; }, - truncateString(str) { - let len = str.length; // 获取原始字符串的长度 - if (len <= 10 && /^[\u4e00-\u9fa5]+$/.test(str)) { // 判断字符串长度小于等于10且只包含中文时直接返回原字符串 + countCharacters (defaultStr, defaultNum) { + let str = '' + defaultStr || '', + num = + defaultNum || 0, + res = '', + length = 0; + if (!str || !num) { return str; - } else { - let count = 0; // 记录已经统计的字节数(UTF-8编码) - for (let i = 0; i < len; i++) { - let charCode = str.charCodeAt(i); - if ((charCode >= 0x0001 && charCode <= 0x007F) || (charCode >= 0xFF60 && charCode <= 0xFF9F)) { // ASCII字符或全角字符 - count += 1; - } else { - count += 2; // UTF-8编码中非ASCII字符占两个字节 - } - if (count > 10 * 2) { // 当已经统计的字节数大于10*2时,说明已经达到了限制条件 - break; - } - } - // console.log('根据统计得到的字节数进行切片并返回结果', str, str.substr(0, Math.floor((count - 1) / 2))); - return str.substr(0, Math.floor((count + 1) / 2)); // 根据统计得到的字节数进行切片并返回结果 } + // 循环字符串,判断长度 最少也会返回一个字 + for (const i in str) { + res += str[i]; + // 测试长度 + length += /[\u4e00-\u9fa5]/.test(str[i]) ? 2 : 1; + // 如果长度大于设置长度 或者 循环到最后则终止循环 + if (length >= num || +i == str.length - 1) { + break; + } + } + return res; }, // 编辑规格值 skuValueChange(val, index, item, $index) { @@ -1266,18 +1257,10 @@ export default { if (this.zz(0, val.value) > 20) { this.$Message.error("规格值最多十个字符长度!"); // val.value = val.value.toString().slice(0, 4); - this.$forceUpdate();// 调用该方法会触发组件的重新渲染 - // val.value = this.truncateString(val.value); - this.skuInfo[$index].spec_values[index].value = this.truncateString(val.value); - // this.$set(this.skuInfo[$index].spec_values[index], 'value', this.truncateString(val.value)); - // this.$set(item, 'value', this.truncateString(val.value)); + this.skuInfo[$index].spec_values[index].value = this.countCharacters(val.value, 10); this.$forceUpdate();// 调用该方法会触发组件的重新渲染 // return; } - // console.log('编辑规格值改变', item); - - - let curVal = this.currentSkuVal; this.skuTableData = this.skuTableData.map((e) => { if (e[val.name] === curVal) { From ebaf5e34d82c7b0e8e1cc344e0ff71f08516555d Mon Sep 17 00:00:00 2001 From: Yer <17633066053@163.com> Date: Wed, 17 Jan 2024 18:35:11 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix:=20:bug:=20=E4=BF=AE=E6=94=B9=E5=95=86?= =?UTF-8?q?=E5=AE=B6=E7=AB=AF=E8=AE=A2=E5=8D=95=E8=AF=84=E8=AE=BA=E5=8F=91?= =?UTF-8?q?=E7=8E=B0=E7=9A=84bug=20=E5=92=8C=E5=90=8E=E7=AB=AF=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E4=B8=8D=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seller/src/views/member/memberComment.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/seller/src/views/member/memberComment.vue b/seller/src/views/member/memberComment.vue index 604644ec..191922bd 100644 --- a/seller/src/views/member/memberComment.vue +++ b/seller/src/views/member/memberComment.vue @@ -84,8 +84,8 @@ export default { pageSize: 10, // 页面大小 sort: "createTime", // 默认排序字段 order: "desc", // 默认排序方式 - startDate: "", // 起始时间 - endDate: "", // 终止时间 + startTime: "", // 起始时间 + endTime: "", // 终止时间 }, selectDate: null, form: { @@ -232,8 +232,8 @@ export default { // 选择日期回调 selectDateRange(v) { if (v) { - this.searchForm.startDate = v[0]; - this.searchForm.endDate = v[1]; + this.searchForm.startTime = v[0]; + this.searchForm.endTime = v[1]; } }, // 获取列表数据