提交 ce04d107 authored 作者: 王天霸's avatar 王天霸

111

上级 ccf5f386
......@@ -5,8 +5,8 @@ ENV = 'development'
#VUE_APP_BASE_API = 'http://sj.jxhh.com/api/v1'
# 测试环境
#VUE_APP_BASE_API = 'http://192.168.26.179:6605/api/v1'
VUE_APP_BASE_API = 'http://192.168.111.240:6605/api/v1'
VUE_APP_BASE_API = 'http://192.168.26.179:6605/api/v1'
#VUE_APP_BASE_API = 'http://192.168.111.240:6605/api/v1'
# 文档模块 直接调用 sys开放接口
VUE_APP_BASE_SYS_API = 'http://sysapi.jxhh.com'
......
......@@ -376,9 +376,9 @@
name: "Shop",
data() {
let logoValidator = (rule, value, callback) => {
if (this.logoImgFileList.length > 0) {
if (this.editLogoImgFileList.length > 0) {
callback();
} else if (this.logoImgFileList.length === 0) {
} else if (this.editLogoImgFileList.length === 0) {
callback(new Error("店铺logo图片至少上传一张"));
}
};
......@@ -707,12 +707,13 @@
data['emergency_tel'] = this.editForm.emergency_tel;
data['scope'] = this.editForm.scope.join(',');
// 编辑 的店铺logolist
debugger
if(this.editLogoImgFileList.length > 0) {
for(let i = 0; i < this.editLogoImgFileList.length; i++) {
if(i === 0) {
data['shop_logo'] = this.editLogoImgFileList[i].image_url;
data['shop_logo'] = this.editLogoImgFileList[i].url;
}else {
data['shop_logo'] += ',' + this.editLogoImgFileList[i].image_url;
data['shop_logo'] += ',' + this.editLogoImgFileList[i].url;
}
}
}
......@@ -790,7 +791,8 @@
let data = {"img_data": this.Base64img,"type":2};
upLoadImg(data).then((res) => {
if (res && res.code == 1) {
this.logoImgFileList.push({'url': res.data.image_url});
this.editLogoImgFileList.push({'url': res.data.image_url});
debugger
this.$message({message: '上传成功', type: 'success'});
this.$refs.storeForm.clearValidate('shop_logo');
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论