Commit b9346456 authored by haitao's avatar haitao

Merge branch 'dev' of http://rungit.jxdsy.cn:10000/xys/lumastoreapp into dev

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