|
@@ -7,19 +7,15 @@ var decoration = new Vue({
|
|
logoShow:false,
|
|
logoShow:false,
|
|
formData:new FormData(),
|
|
formData:new FormData(),
|
|
params:{
|
|
params:{
|
|
|
|
+ shopID:'',
|
|
title:'',
|
|
title:'',
|
|
link:'',
|
|
link:'',
|
|
info:'',
|
|
info:'',
|
|
image:'',
|
|
image:'',
|
|
},
|
|
},
|
|
|
|
+ shopBannerId:'',
|
|
name:'',
|
|
name:'',
|
|
- list:[
|
|
|
|
- {title:'华熙生物润百颜液体华熙生物润',link:'功效性产品/其他-其他',info:'功效性产品/其他-其他',image:'https://img-b.caimei365.com/group1/M00/02/FC/Cmgy619gZQeAe8KQAAHWNoNlmYM356.jpg'},
|
|
|
|
- {title:'华熙生物润百颜液体华熙生物润',link:'功效性产品/其他-其他',info:'功效性产品/其他-其他',image:'https://img-b.caimei365.com/group1/M00/02/FC/Cmgy619gZTqACueJAABbKjW7oaQ584.jpg'},
|
|
|
|
- {title:'华熙生物润百颜液体华熙生物润',link:'功效性产品/其他-其他',info:'功效性产品/其他-其他',image:'https://img-b.caimei365.com/group1/M00/02/FC/Cmgy619gZUqAFJ4BAABHHJZiQ3o518.jpg'},
|
|
|
|
- {title:'华熙生物润百颜液体华熙生物润',link:'功效性产品/其他-其他',info:'功效性产品/其他-其他',image:'https://img-b.caimei365.com/group1/M00/02/FC/Cmgy619gZQeAe8KQAAHWNoNlmYM356.jpg'},
|
|
|
|
- {title:'华熙生物润百颜液体华熙生物润',link:'功效性产品/其他-其他',info:'功效性产品/其他-其他',image:'https://img-b.caimei365.com/group1/M00/02/FC/Cmgy619gZQeAe8KQAAHWNoNlmYM356.jpg'},
|
|
|
|
- ]
|
|
|
|
|
|
+ list:[],
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
uploadlogo:function () { //上传图片
|
|
uploadlogo:function () { //上传图片
|
|
@@ -36,14 +32,34 @@ var decoration = new Vue({
|
|
},
|
|
},
|
|
addpictures:function () {
|
|
addpictures:function () {
|
|
var _this = this;
|
|
var _this = this;
|
|
- _this.name = '添加主页广告图';
|
|
|
|
- _this.bgflag = true;
|
|
|
|
- _this.iconflag=true;
|
|
|
|
- _this.logoShow =false;
|
|
|
|
|
|
+ if(_this.list.length==4){
|
|
|
|
+ CAIMEI.dialog('主页广告图的上限是4张图');
|
|
|
|
+ }else {
|
|
|
|
+ _this.name = '添加主页广告图';
|
|
|
|
+ _this.bgflag = true;
|
|
|
|
+ _this.iconflag=true;
|
|
|
|
+ _this.logoShow =false;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ submit:function(){//提交
|
|
|
|
+ var _this = this;
|
|
|
|
+ if(_this.name.indexOf('编辑') > -1) {
|
|
|
|
+ _this.params.shopBannerID = _this.shopBannerId
|
|
|
|
+ }
|
|
|
|
+ if(_this.params.image==''){
|
|
|
|
+ CAIMEI.dialog('请上传广告图片')
|
|
|
|
+ }else {
|
|
|
|
+ console.log(_this.params)
|
|
|
|
+ SupplierApi.ShopBanner(_this.params,function (res) {
|
|
|
|
+ CAIMEI.dialog('提交成功');
|
|
|
|
+ location.reload()
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
editpictures:function(item){
|
|
editpictures:function(item){
|
|
var _this = this;
|
|
var _this = this;
|
|
_this.name = '编辑主页广告图';
|
|
_this.name = '编辑主页广告图';
|
|
|
|
+ _this.shopBannerId = item.shopBannerID;
|
|
_this.bgflag = true;
|
|
_this.bgflag = true;
|
|
_this.params.title = item.title;
|
|
_this.params.title = item.title;
|
|
_this.params.link = item.link;
|
|
_this.params.link = item.link;
|
|
@@ -59,8 +75,16 @@ var decoration = new Vue({
|
|
}
|
|
}
|
|
},
|
|
},
|
|
deletepictures:function(item){
|
|
deletepictures:function(item){
|
|
|
|
+ var _this = this;
|
|
|
|
+ var shopBannerId = item.shopBannerID;
|
|
|
|
+ console.log(shopBannerId)
|
|
CAIMEI.Modal('您确定要删除么?','取消','确定',function () {
|
|
CAIMEI.Modal('您确定要删除么?','取消','确定',function () {
|
|
-
|
|
|
|
|
|
+ SupplierApi.deleteShopBanner({shopBannerId:shopBannerId},function (res) {
|
|
|
|
+ if(res.code==0){
|
|
|
|
+ CAIMEI.dialog('删除成功');
|
|
|
|
+ location.reload()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
})
|
|
})
|
|
},
|
|
},
|
|
close:function () {
|
|
close:function () {
|
|
@@ -74,6 +98,19 @@ var decoration = new Vue({
|
|
|
|
|
|
},
|
|
},
|
|
mounted:function () {
|
|
mounted:function () {
|
|
|
|
+ var _self = this;
|
|
|
|
+ if(globalUserData){
|
|
|
|
+ _self.params.shopID = globalUserData.shopId;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ SupplierApi.dressUpList({shopId:_self.params.shopID},function (res) {
|
|
|
|
+ if(res.code==0){
|
|
|
|
+ console.log(res)
|
|
|
|
+ if(res.data.length>0){
|
|
|
|
+ _self.list =res.data;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|