新增全局提示
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import {genAnti} from "@/api/genAnti";
|
import { genAnti } from "@/api/genAnti";
|
||||||
|
import { Message } from 'element-ui'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 向Chrome发送消息
|
* 向Chrome发送消息
|
||||||
@@ -20,9 +21,16 @@ export async function sendChromeAPIMessage(message) {
|
|||||||
if (message.anti) {
|
if (message.anti) {
|
||||||
message.anti = await genAnti.a()
|
message.anti = await genAnti.a()
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
// @ts-ignore
|
// @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
|
// @ts-ignore
|
||||||
chrome.runtime.sendMessage(message, resolve)
|
chrome.runtime.sendMessage(message, resolve)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<el-radio-group v-model="addType" @click="lableList = [], search.productSkuId = '', search.productSkcId = ''">
|
<el-radio-group v-model="addType" @click="lableList = [], search.productSkuId = '', search.productSkcId = ''">
|
||||||
<el-radio-button label="1">按备货单打印</el-radio-button>
|
<el-radio-button label="1">按发货单打印</el-radio-button>
|
||||||
<el-radio-button label="2">按SKC打印</el-radio-button>
|
<el-radio-button label="2">按SKC打印</el-radio-button>
|
||||||
<el-radio-button label="3">按SKU打印</el-radio-button>
|
<el-radio-button label="3">按SKU打印</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
|||||||
@@ -442,6 +442,7 @@
|
|||||||
await this.requestSKUList(true)
|
await this.requestSKUList(true)
|
||||||
await this.$sleepSync(500)
|
await this.$sleepSync(500)
|
||||||
}
|
}
|
||||||
|
this.isLoading = false
|
||||||
},
|
},
|
||||||
|
|
||||||
requestSKUList(flag) {
|
requestSKUList(flag) {
|
||||||
@@ -482,6 +483,8 @@
|
|||||||
} else {
|
} else {
|
||||||
!flag && (this.isLoading = false)
|
!flag && (this.isLoading = false)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.isLoading = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user