提交 c452c3c5 authored 作者: huaxinzhu's avatar huaxinzhu

1、入驻,获取品牌信息接口更换;2、运费模块bug修改

上级 fe59aa82
...@@ -20,7 +20,7 @@ export function addMain(data) { ...@@ -20,7 +20,7 @@ export function addMain(data) {
// 获取品牌信息 // 获取品牌信息
export function getBrandsInf(query) { export function getBrandsInf(query) {
return request({ return request({
url: '/local/brands', url: '/local/shopbrand',
method: 'get', method: 'get',
params: query params: query
}); });
......
...@@ -486,9 +486,9 @@ ...@@ -486,9 +486,9 @@
// 初始化 // 初始化
//this.resetForm(); //this.resetForm();
getBrandsInf().then(res => { getBrandsInf().then(res => {
console.log("获取品牌:",res); console.log("获取品牌:",res.data);
if(res.code === 1 && res.data.data) { if(res.code === 1 && res.data) {
this.brandForm = res.data.data[0]; this.brandForm = res.data[0];
// 商标logo图片处理 // 商标logo图片处理
let brandList = {}; let brandList = {};
let brandArr = []; let brandArr = [];
......
...@@ -207,13 +207,7 @@ export default { ...@@ -207,13 +207,7 @@ export default {
IsDefault: 0, IsDefault: 0,
ChargeType: 0, ChargeType: 0,
Dispatching: [ Dispatching: [
{ { a: "全国", f: 500, fp: 10, n: 100, np: 5 }
a: "全国",
f: 500,
fp: 10,
n: 100,
np: 5,
}
], ],
Disdispatching: "", Disdispatching: "",
Publish: 0, Publish: 0,
...@@ -226,13 +220,17 @@ export default { ...@@ -226,13 +220,17 @@ export default {
}, },
methods: { methods: {
btndisabled(){ btndisabled(){
console.log(this.checkList , this.btnindex) let checkListString = '';
if(this.btnindex == 99){ if(this.btnindex == 99){
this.goodsDate.Disdispatching = this.checkList.join() checkListString = this.checkList.join();
}else{ if(checkListString.substr(0,1) === ',') {
this.goodsDate.Dispatching[this.btnindex].a = this.checkList.join() checkListString = checkListString.slice(1);
} }
this.dialogVisible = false this.goodsDate.Disdispatching = checkListString;
}else{
this.goodsDate.Dispatching[this.btnindex].a = this.checkList.join()
}
this.dialogVisible = false
}, },
unique (obj, ary){ unique (obj, ary){
return obj.filter(function(item){ return obj.filter(function(item){
...@@ -241,6 +239,7 @@ export default { ...@@ -241,6 +239,7 @@ export default {
}, },
opendias(type, i, index) { opendias(type, i, index) {
this.goodsDate.Dispatching.forEach((element) => { this.goodsDate.Dispatching.forEach((element) => {
let arrd = element.a.split(',') let arrd = element.a.split(',')
for(let i=0;i<arrd.length;i++){ for(let i=0;i<arrd.length;i++){
...@@ -268,9 +267,13 @@ export default { ...@@ -268,9 +267,13 @@ export default {
this.dialogVisible = true; this.dialogVisible = true;
}, },
handleinfomationclick() {//提交 handleinfomationclick() {//提交
this.goodsDate.Disdispatching.forEach(item=>{ //debugger;
this.goodsDate.Dispatching.forEach(item=>{
item.np = Number(item.np*100).toFixed() item.np = Number(item.np*100).toFixed()
}) })
//console.log("提交前的数据:",this.goodsDate);
addFreight(this.goodsDate).then(response => { addFreight(this.goodsDate).then(response => {
console.log(296,response); console.log(296,response);
if(response.data.code === 1) { if(response.data.code === 1) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论