Commit ed49a07c by Tang

feat: 境内码查询链接修改

parent ae9b3cd3
...@@ -394,7 +394,7 @@ export default { ...@@ -394,7 +394,7 @@ export default {
} else { } else {
this.searchCodeShow = this.companySearch.address; this.searchCodeShow = this.companySearch.address;
} }
if(this.hasSpecialString(this.searchCodeShow)){ if (this.hasSpecialString(this.searchCodeShow)) {
return true return true
} }
this.showResult = true; this.showResult = true;
...@@ -425,26 +425,26 @@ export default { ...@@ -425,26 +425,26 @@ export default {
if (!this.productSearch.code) { if (!this.productSearch.code) {
return this.$message.error('请输入商品条码'); return this.$message.error('请输入商品条码');
} }
if(this.hasSpecialString(this.productSearch.code)){ if (this.hasSpecialString(this.productSearch.code)) {
return true return true
} }
this.showResult = true; // this.showResult = true;
this.resultType = 'product'; // this.resultType = 'product';
const params = {code: this.productSearch.code}; // const params = {code: this.productSearch.code};
const searchGlnRes = await this.$api.search.searchInternalProduct(params); // const searchGlnRes = await this.$api.search.searchInternalProduct(params);
if (searchGlnRes.returnCode === "0") { // if (searchGlnRes.returnCode === "0") {
const a = document.createElement('a') // const a = document.createElement('a')
a.setAttribute('href', searchGlnRes.data) // a.setAttribute('href', searchGlnRes.data)
// a.setAttribute('target', '_blank') // // a.setAttribute('target', '_blank')
a.setAttribute('id', 'cow-link-temp') // a.setAttribute('id', 'cow-link-temp')
document.body.appendChild(a) // document.body.appendChild(a)
a.click() // a.click()
} else { // } else {
this.errorMsg = // this.errorMsg =
searchGlnRes.returnMsg || // searchGlnRes.returnMsg ||
"没有符合条件的记录!"; // "没有符合条件的记录!";
this.result = null; // this.result = null;
} // }
// const a = document.createElement('a') // const a = document.createElement('a')
// a.setAttribute('href', `/internal_code_search/searchResult2.aspx?keyword=${this.productSearch.code}`) // a.setAttribute('href', `/internal_code_search/searchResult2.aspx?keyword=${this.productSearch.code}`)
// // a.setAttribute('target', '_blank') // // a.setAttribute('target', '_blank')
...@@ -452,7 +452,7 @@ export default { ...@@ -452,7 +452,7 @@ export default {
// document.body.appendChild(a) // document.body.appendChild(a)
// a.click() // a.click()
// document.body.removeChild(document.getElementById('cow-link-temp')) // 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; // 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