Commit 5d137ca2 authored by home's avatar home

zxf

parent 2ea13ed6
......@@ -514,14 +514,21 @@
this.typeManagerfun();
this.getActivityListfun(); //获取数据列表
if(opdata.results){
if(JSON.parse(opdata.results).data.code==1){
let results=JSON.parse(opdata.results);//扫描得到得商品信息
this.findEleProduct(results);
}else{
if(opdata.results){
// return;JSON.parse(opdata.results).errMsg == "request:fail abort statusCode:-1"
if(JSON.parse(opdata.results).errMsg == "request:fail abort statusCode:-1"){
let results = JSON.parse(opdata.results);
this.form.code = results.code
this.findEleProduct(results)
}else{
if(JSON.parse(opdata.results).data.code==1){
let results=JSON.parse(opdata.results);//扫描得到得商品信息
this.findEleProduct(results);
}else{
let results = JSON.parse(opdata.results);
this.form.code = results.code
this.findEleProduct(results)
}
}
}
},
......@@ -540,9 +547,7 @@
this.classData[1].push(item.product_name);
})
}
console.log(this.classData[1])
// console.log(this.classData[1])
}else {
console.log('我滑动到称重商品')
// this.classData[1] = [];
......@@ -621,6 +626,7 @@
},
async findEleProduct(results){
console.log('查找商品')
console.log(results)
uni.showLoading({title:'请稍后'});
let res=await findEleProduct({code:results.code});
uni.hideLoading();
......@@ -638,7 +644,7 @@
this.codeDisabled=false;//条形码输入框是否禁止输入
}else if(res.code==0){ //有就把信息展示
console.log('进tsadadadfafasdffsa');
// console.log('进tsadadadfafasdffsa');
this.isadd=1;
this.form.quality_guarantee_period = res.data.quality_guarantee_period
this.qualitYears = parseInt(res.data.quality_guarantee_period/365)
......
......@@ -472,6 +472,10 @@
return;
} else{
//https://www.mxnzp.com/api/barcode/create
//barcode=6902538005141
//&app_id=ihrnqdrpunchxsfr
//&app_secret=WFluM1dPMU9IbWlRUmpVVUJmdmN0QT09
uni.request({
url: 'https://www.mxnzp.com/api/barcode/goods/details', //仅为示例,并非真实接口地址。
data: {
......@@ -482,7 +486,6 @@
},
method: 'GET',
success: (results) => {
console.log(results)
if (results.data.code == 0) {
results.isScanCode = false;
results.code = res.result;
......
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