Commit ed49a07c by Tang

feat: 境内码查询链接修改

parent ae9b3cd3
......@@ -394,7 +394,7 @@ export default {
} else {
this.searchCodeShow = this.companySearch.address;
}
if(this.hasSpecialString(this.searchCodeShow)){
if (this.hasSpecialString(this.searchCodeShow)) {
return true
}
this.showResult = true;
......@@ -425,26 +425,26 @@ export default {
if (!this.productSearch.code) {
return this.$message.error('请输入商品条码');
}
if(this.hasSpecialString(this.productSearch.code)){
if (this.hasSpecialString(this.productSearch.code)) {
return true
}
this.showResult = true;
this.resultType = 'product';
const params = {code: this.productSearch.code};
const searchGlnRes = await this.$api.search.searchInternalProduct(params);
if (searchGlnRes.returnCode === "0") {
const a = document.createElement('a')
a.setAttribute('href', searchGlnRes.data)
// a.setAttribute('target', '_blank')
a.setAttribute('id', 'cow-link-temp')
document.body.appendChild(a)
a.click()
} else {
this.errorMsg =
searchGlnRes.returnMsg ||
"没有符合条件的记录!";
this.result = null;
}
// this.showResult = true;
// this.resultType = 'product';
// const params = {code: this.productSearch.code};
// const searchGlnRes = await this.$api.search.searchInternalProduct(params);
// if (searchGlnRes.returnCode === "0") {
// const a = document.createElement('a')
// a.setAttribute('href', searchGlnRes.data)
// // a.setAttribute('target', '_blank')
// a.setAttribute('id', 'cow-link-temp')
// document.body.appendChild(a)
// a.click()
// } else {
// this.errorMsg =
// searchGlnRes.returnMsg ||
// "没有符合条件的记录!";
// this.result = null;
// }
// const a = document.createElement('a')
// a.setAttribute('href', `/internal_code_search/searchResult2.aspx?keyword=${this.productSearch.code}`)
// // a.setAttribute('target', '_blank')
......@@ -452,7 +452,7 @@ export default {
// document.body.appendChild(a)
// a.click()
// document.body.removeChild(document.getElementById('cow-link-temp'))
// window.open(`http://search.anccnet.com/searchResult2.aspx?keyword=${this.productSearch.code}`, '_blank')
window.open(`https://www.gds.org.cn/#/barcodeList/index?type=barcode&keyword=${this.productSearch.code}`, '_blank')
}
// this.showResult = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment