From 56ee90ed30c36afdabe1223b0ce0ae6d0fe1b7ca Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Wed, 30 Oct 2024 22:01:46 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug=E5=92=8C=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E4=BC=9A=E5=91=98=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LablesMember.vue | 106 +++++++------------------ src/components/print/customProvider.js | 6 +- src/store/index.js | 10 ++- src/view/Home.vue | 9 +-- src/view/lables/SkuManage.vue | 2 + src/view/lables/Template.vue | 25 ++++++ 6 files changed, 70 insertions(+), 88 deletions(-) diff --git a/src/components/LablesMember.vue b/src/components/LablesMember.vue index 26c618f..c9e946a 100644 --- a/src/components/LablesMember.vue +++ b/src/components/LablesMember.vue @@ -20,42 +20,15 @@
金币充值
-
- 基础功能 +
+ 年度会员
高级功能
-
-
金币充值
-
- - - - - - - - - - - -
-
-
基础功能
+
金币充值
¥ {{ price.originPrice }}
-

{{ price.coin }}金币

+

{{ price.coin }}条/每年

+
+
+ +
+
年度会员
+
+
+

{{ price.title }}

+
+ ¥ + {{ price.price }} +
+
+ ¥ + {{ price.originPrice }} +
+
@@ -99,8 +94,8 @@ -
支付方式
-
+
支付方式
+
@@ -123,15 +118,6 @@
-
-
-
-
-
- 确定 -
-
-
@@ -203,45 +189,13 @@ } }) }, + show () { this.isShow = true }, hide () { this.isShow = false - }, - - onConfirm () { - this.$refs.form.validate((valid) => { - if (valid) { - this.$http.post(`/api/coupon/getDetail`, null, { - params: { - code: this.form.code - } - }).then(res => { - if (res.code == 0) { - let msg = this.getMessage(res.data.type); - this.$confirm(msg, '温馨提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'info' - }).then(() => { - this.$http.post(`/api/order/upgradeByCode`, null, { - params: { - ...this.form - } - }).then(res => { - if (res.code == 0) { - this.$message.success('激活成功') - this.$store.dispatch('getUserInfo') - this.isShow = false - } - }) - }) - } - }) - } - }) } } } @@ -280,7 +234,7 @@ top: 50%; left: 50%; z-index: 11; - min-width: 840px; + min-width: 916px; // height: 620px; padding: 40px 40px; transform: translate(-50%, -50%); diff --git a/src/components/print/customProvider.js b/src/components/print/customProvider.js index 7789a48..d5c2111 100644 --- a/src/components/print/customProvider.js +++ b/src/components/print/customProvider.js @@ -117,8 +117,10 @@ export const customProvider = function () { { tid: 'providerModule1.image', title: '图片', - data: 'https://foruda.gitee.com/avatar/1677050350324030848/5400665_ccsimple_1591166830.png!avatar200', - type: 'image' + type: 'image', + options: { + src: 'http://lyshunong.oss-cn-beijing.aliyuncs.com/image/material/a6e14259412606502e49f1abd866039.png', + } } ]) ]) diff --git a/src/store/index.js b/src/store/index.js index 4d1f521..bca7163 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -57,7 +57,7 @@ export default new Vuex.Store({ state.showTemuAlert = flag }, setLabelInfo(state, info) { - state.info = info + state.labelInfo = info } }, @@ -70,7 +70,7 @@ export default new Vuex.Store({ resolve(res.data) } }) - // this.getLabelInfo() + store.dispatch('getLabelInfo') }) }, @@ -78,7 +78,11 @@ export default new Vuex.Store({ return new Promise(resolve => { request.post('/api/userExtend/getLabelDetail').then(res => { if (res.code === 0) { - store.commit('setLabelInfo', res.data) + const isExpires = new Date().getTime() > new Date(res.data.expireTime).getTime() || res.data.skuUsed > res.data.skuTotal + store.commit('setLabelInfo', { + ...res.data, + isExpires + }) resolve(res.data) } }) diff --git a/src/view/Home.vue b/src/view/Home.vue index 6f14ded..ab3423f 100644 --- a/src/view/Home.vue +++ b/src/view/Home.vue @@ -7,7 +7,7 @@
-
+
{{ $store.state.userInfo.coin }}
@@ -15,7 +15,7 @@ 签到 -
+
会员信息:
{{ getStateInfo }}
@@ -252,11 +252,6 @@
- -
diff --git a/src/view/lables/SkuManage.vue b/src/view/lables/SkuManage.vue index 3cf8a9f..df6a12e 100644 --- a/src/view/lables/SkuManage.vue +++ b/src/view/lables/SkuManage.vue @@ -531,6 +531,8 @@ this.getList() } + this.btnLoading = false + }).catch(() => { this.btnLoading = false }) }, diff --git a/src/view/lables/Template.vue b/src/view/lables/Template.vue index 0193f40..ccdaf1f 100644 --- a/src/view/lables/Template.vue +++ b/src/view/lables/Template.vue @@ -4,6 +4,12 @@ slot="title" title="模板管理" isShowBottomBorder> + \ No newline at end of file + + diff --git a/src/view/lables/Template.vue b/src/view/lables/Template.vue index 842ebd9..c068778 100644 --- a/src/view/lables/Template.vue +++ b/src/view/lables/Template.vue @@ -7,7 +7,7 @@ @@ -52,7 +52,7 @@ Date: Sat, 2 Nov 2024 15:47:39 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/print/Print.vue | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/components/print/Print.vue b/src/components/print/Print.vue index b3a61ca..b8dc195 100644 --- a/src/components/print/Print.vue +++ b/src/components/print/Print.vue @@ -36,10 +36,6 @@ 圆形
-
- - 图片 -
常用元素
From b6e721826fda1240737879240a3344dcf7341a06 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Sat, 2 Nov 2024 23:16:52 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=BA=93=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/print/Print.vue | 83 +++++++++++++++++++++++++++++++--- 1 file changed, 77 insertions(+), 6 deletions(-) diff --git a/src/components/print/Print.vue b/src/components/print/Print.vue index b8dc195..ee4545a 100644 --- a/src/components/print/Print.vue +++ b/src/components/print/Print.vue @@ -181,8 +181,23 @@ - - +
+
+
+ + + +

{{ item.name }}

+ 使用模板 +
+
+
+ @@ -320,7 +335,7 @@ }, searchTemplate: { current: 1, - size: 10, + size: 8, type: 1 }, templateTotal: 0, @@ -331,7 +346,8 @@ { prop: 'name', label: '模板名称', align: 'left' }, { slot: 'img'} ], - templateLoading: false + templateLoading: false, + hasMore: true } }, @@ -431,12 +447,23 @@ }, getTemplateList() { + if (!this.hasMore) return + if (this.templateLoading) return + this.templateLoading = true this.$http.post(`/api/templateRecommend/getRecommendPage`, null, { params: this.searchTemplate }).then(res => { if (res.code === 0) { - this.templateList = res.data.records + this.templateList = [...this.templateList, ...res.data.records] this.templateTotal = res.data.total + + if (res.data.records.length < this.searchTemplate.size) { + this.hasMore = false + } else { + this.searchTemplate.current = this.searchTemplate.current + 1 + } + + this.templateLoading = false } }) }, @@ -861,5 +888,49 @@ .print-viewer { color: #000; } + + .templateList-wrapper { + padding-right: 10px; + + .templateList { + display: flex; + flex-wrap: wrap; + + .templateList-item { + display: flex; + flex-direction: column; + align-items: center; + position: relative; + width: 24%; + margin-bottom: 20px; + margin-right: 1.333%; + padding: 10px; + border-radius: 3px; + overflow: hidden; + background-color: #f4f4f4; + + .el-button { + position: absolute; + top: 0; + right: 0; + z-index: 1; + } + + h2 { + margin-top: 12px; + font-size: 14px; + font-weight: 600; + color: #333; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + &:nth-of-type(4n) { + margin-right: 0; + } + } + } + } } From 1285b0644c90cddef37412f60d8b89e42a1e9b3a Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Sun, 3 Nov 2024 20:27:49 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/chromeApi.js | 14 +++++++++++--- src/view/lables/Print.vue | 2 +- src/view/lables/SkuManage.vue | 3 +++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/api/chromeApi.js b/src/api/chromeApi.js index 5b6bcb3..be4f3b2 100644 --- a/src/api/chromeApi.js +++ b/src/api/chromeApi.js @@ -1,5 +1,6 @@ import store from '@/store' -import {genAnti} from "@/api/genAnti"; +import { genAnti } from "@/api/genAnti"; +import { Message } from 'element-ui' /** * 向Chrome发送消息 @@ -20,9 +21,16 @@ export async function sendChromeAPIMessage(message) { if (message.anti) { message.anti = await genAnti.a() } + return new Promise((resolve) => { // @ts-ignore - chrome.runtime.sendMessage(message, resolve) + // chrome.runtime.sendMessage(message, resolve) + chrome.runtime.sendMessage(message, res => { + if (res.error_code === 40001) { + Message.error('请先登录拼多多跨境卖家中心') + } + resolve(res) + }) }) } @@ -164,4 +172,4 @@ export async function sendXcAPIMessage(message) { // @ts-ignore chrome.runtime.sendMessage(message, resolve) }) -} \ No newline at end of file +} diff --git a/src/view/lables/Print.vue b/src/view/lables/Print.vue index 724b870..9013ac4 100644 --- a/src/view/lables/Print.vue +++ b/src/view/lables/Print.vue @@ -10,7 +10,7 @@
- 按备货单打印 + 按发货单打印 按SKC打印 按SKU打印 diff --git a/src/view/lables/SkuManage.vue b/src/view/lables/SkuManage.vue index ff9eeac..25cf108 100644 --- a/src/view/lables/SkuManage.vue +++ b/src/view/lables/SkuManage.vue @@ -442,6 +442,7 @@ await this.requestSKUList(true) await this.$sleepSync(500) } + this.isLoading = false }, requestSKUList(flag) { @@ -482,6 +483,8 @@ } else { !flag && (this.isLoading = false) } + } else { + this.isLoading = false } }) },