Commit 42143be7 authored by home's avatar home

zxf

parent 97936343
......@@ -3,8 +3,8 @@
//"appid" : "__UNI__FC9419E",
"appid" : "__UNI__1EA80F1", //这个是 web
"description" : "商家",
"versionName" : "1.103",
"versionCode" : 1103,
"versionName" : "1.106",
"versionCode" : 1106,
"transformPx" : false,
"compatible" : {
"ignoreVersion" : true, //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
......
......@@ -563,7 +563,7 @@
console.log(that.ordinary.length,'左边')
if(that.ordinary.length != 0){
that.linkage_id = that.ordinary[e.detail.value[1]].product_id
that.product_id = that.ordinary[e.detail.value[1]].product_id
// that.product_id = that.ordinary[e.detail.value[1]].product_id
that.classValue = that.ordinary[e.detail.value[1]].product_name
}else{AZ
uni.showToast({
......@@ -576,7 +576,7 @@
console.log(that.weigh.length,'右边')
if(that.weigh.length != 0){
that.linkage_id = that.weigh[e.detail.value[1]].product_id
that.product_id = that.weigh[e.detail.value[1]].product_id
// that.product_id = that.weigh[e.detail.value[1]].product_id
that.classValue = that.weigh[e.detail.value[1]].product_name
}else{
uni.showToast({
......@@ -586,7 +586,7 @@
return false;
}
}
that.eleProductInfofun();
that.eleProductInfofun(that.linkage_id);
this.is_datashow = false;
console.log(this.is_datashow)
......@@ -654,7 +654,13 @@
this.form.cost_price=res.data.cost_price //进货价钱
this.form.code=res.data.code //条形编码
this.form.commission=res.data.commission //返佣比例
this.form.commodity_data= typeof(res.data.commodity_data) == 'string'?JSON.parse(res.data.commodity_data):res.data.commodity_data //原始商品名
if(res.data.commodity_data == "" ){
this.form.commodity_data= res.data.commodity_data
}else{
this.form.commodity_data= typeof(res.data.commodity_data) == 'string'?JSON.parse(res.data.commodity_data):res.data.commodity_data //原始商品名
}
this.form.product_id=res.data.product_id//修改的时候的产品id
this.form.product_name=res.data.product_name//产品名称
this.form.desc=res.data.desc//产品描述
......@@ -778,10 +784,10 @@
},
//修改的时候赋初始值
async eleProductInfofun(){
async eleProductInfofun(product_id){
let that=this;
let res = await eleProductInfo({
product_id:this.product_id,
product_id:product_id,
});
if(res.code==0){
this.form.cate_id = res.data.cate_id;//分类id
......@@ -919,6 +925,9 @@
// return false;
// }
console.log(this.form.product_id)
console.log(this.product_id)
let can = {
action:this.product_id==''?'add':'edit',
linkage_id:this.linkage_id,
......@@ -946,10 +955,13 @@
limit_num:this.form.limit_num ,//秒杀限购数量
detail_photos:this.detail_photos,//详情图
video_photos:this.video_photos,//轮播图
cate_id:this.form.cate_id,
cate_id:this.form.cate_id,
};
if(can.action=='edit'){
can.product_id=this.product_id
}
if(this.c_pics.length > 0){
can.photo = this.c_pics[0].data; //图片
}
......@@ -1015,7 +1027,7 @@
this.chindformList = res.data;
if(this.product_id!=undefined && this.product_id!=""){
this.eleProductInfofun();
this.eleProductInfofun(this.product_id);
}
}else{
this.$api.msg(res.msg);
......
......@@ -471,7 +471,7 @@
return;
} else{
uni.request({
url: 'https://www.mxnzp.com/api/barcode/goods/details', //仅为示例,并非真实接口地址。
data: {
......@@ -482,6 +482,7 @@
},
method: 'GET',
success: (results) => {
console.log(results)
if (results.data.code == 0) {
console.log(results);
results.isScanCode = false;
......@@ -495,6 +496,12 @@
uni.navigateTo({
url: '/pages/addEditEleProduct/addEditEleProduct?results=' + JSON.stringify(results)
})
}else{
results.isScanCode = false;
results.code = res.result;
uni.navigateTo({
url: '/pages/addEditEleProduct/addEditEleProduct?results=' + JSON.stringify(results)
})
}
},
fail: (results) => {
......
......@@ -5,8 +5,8 @@ module.exports = {
// isdebug:false,//正式
isdebug:true,//测试
isdebug:false,//正式
// isdebug:true,//测试
// xqdebug:false,//正式权限
......
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