diff --git a/src/manifest.production.json b/src/manifest.production.json index 06f1987..c595e1a 100644 --- a/src/manifest.production.json +++ b/src/manifest.production.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "TEMU助手", "description": "TEMU助手 - 自动化提高生产效率", - "version": "1.0", + "version": "2.0", "background": { "service_worker": "/background.js" }, diff --git a/src/utils/index.js b/src/utils/index.js index 0eaf6f2..393e267 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -90,7 +90,7 @@ const dateUtil = { } } -const userCheck = () => { +const userCheck = (mallId) => { return new Promise((resolve, reject) => { store.dispatch('getUserInfo').then(res => { if (res.flag != 1) { @@ -99,7 +99,7 @@ const userCheck = () => { reject('您的账号未激活或已失效,请激活后使用') return false } - if (res.type != 4 && store.state.mallId != store.state.userInfo.mallId) { + if (res.type != 4 && mallId != store.state.userInfo.mallId) { Message.error('您当前登录的TEMU账号与会员绑定账号不一致') reject('您当前登录的TEMU账号与会员绑定账号不一致') return false diff --git a/src/view/CopyProduct.vue b/src/view/CopyProduct.vue index 472e54c..e63bb6d 100644 --- a/src/view/CopyProduct.vue +++ b/src/view/CopyProduct.vue @@ -248,7 +248,6 @@ import { Message } from 'element-ui' if (res.errorCode == 1000000) { this.productPage.total = res.result.total this.productTableData = res.result.pageItems.map((item) => { - console.log(item.createdAt) return { productSpu: item.productId, productSkc: item.productSkcId, @@ -256,6 +255,8 @@ import { Message } from 'element-ui' createTime: timestampToTime(item.createdAt) }; }) + } else { + Message.error("【拼多多】" + res.errorMsg) } }); }, diff --git a/src/view/ExportSaleData.vue b/src/view/ExportSaleData.vue index a081a59..c04b097 100644 --- a/src/view/ExportSaleData.vue +++ b/src/view/ExportSaleData.vue @@ -153,17 +153,10 @@ import { Message } from 'element-ui' Message.error("请先选择店铺") return } - this.$http.post('/api/malluser/info').then(res => { - if (res.code == 0) { - this.$store.commit('setUserInfo', res.data) - if (res.data.flag != 1) { - Message.error('您的账号未激活或已失效,请激活后使用') - this.$store.commit('setActiveDlgShow', true) - return; - } else { - this.getList() - } - } + this.$userCheck(this.mallId).then(() => { + this.getList() + }).catch((err) => { + console.log(err) }) }, getList () { @@ -197,10 +190,9 @@ import { Message } from 'element-ui' } else { Message.success('销售数据加载完成,可进行导出') } + } else { + Message.error("【拼多多】" + res.errorMsg) } - - - console.log(this.list) }); }, startDownload() { diff --git a/src/view/Home.vue b/src/view/Home.vue index 3f23493..86b8888 100644 --- a/src/view/Home.vue +++ b/src/view/Home.vue @@ -127,7 +127,12 @@ if (this.$store.state.userInfo.flag == 0) { return '未激活'; } else if (this.$store.state.userInfo.flag == 1) { - return this.vipType[this.$store.state.userInfo.type] + '/有效期至' + this.$store.state.userInfo.expireTime; + if (this.$store.state.userInfo.type != 4) { + return `(${this.$store.state.userInfo.mallName})` + this.vipType[this.$store.state.userInfo.type] + '/有效期至' + this.$store.state.userInfo.expireTime; + } else { + return this.vipType[this.$store.state.userInfo.type] + '/有效期至' + this.$store.state.userInfo.expireTime + } + } else { return '已过期'; } diff --git a/src/view/Message.vue b/src/view/Message.vue index 2661932..95882b3 100644 --- a/src/view/Message.vue +++ b/src/view/Message.vue @@ -35,6 +35,7 @@ @@ -136,6 +137,19 @@ this.isShowForm = true }, + remove (e) { + this.$confirm('确定要删除该条数据?', '温馨提示', { + type: 'warning' + }).then(() => { + this.$http.post(`/api/malluser/delWxuser?id=${e.id}`).then(res => { + if (res.code == 0) { + this.$message.success('删除成功!') + this.getList() + } + }) + }) + }, + collection (id, isFavorite) { this.$confirm(isFavorite === '0' ? '确定收藏该文章?' : '确定取消收藏?', '温馨提示', { confirmButtonText: '确定', diff --git a/src/view/NormalSendGoods.vue b/src/view/NormalSendGoods.vue index fd7034b..fcc0cfb 100644 --- a/src/view/NormalSendGoods.vue +++ b/src/view/NormalSendGoods.vue @@ -22,7 +22,7 @@ :total="total" :isShowPagination="false" style="margin-top: 8px;" - @getList="getList">center + @getList="getList">