diff --git a/src/api/bxg/yxStoreHotListRecord.js b/src/api/bxg/yxStoreHotListRecord.js new file mode 100644 index 0000000..2cba359 --- /dev/null +++ b/src/api/bxg/yxStoreHotListRecord.js @@ -0,0 +1,27 @@ +import request from '@/utils/request' + +export function add(data) { + return request({ + url: 'bxg/api/yxStoreHotListRecord', + method: 'post', + data + }) +} + +export function del(ids) { + return request({ + url: 'bxg/api/yxStoreHotListRecord/', + method: 'delete', + data: ids + }) +} + +export function edit(data) { + return request({ + url: 'bxg/api/yxStoreHotListRecord', + method: 'put', + data + }) +} + +export default { add, edit, del } diff --git a/src/views/bxg/shop/goods/form.vue b/src/views/bxg/shop/goods/form.vue index 33d46af..9b9daf5 100644 --- a/src/views/bxg/shop/goods/form.vue +++ b/src/views/bxg/shop/goods/form.vue @@ -210,8 +210,8 @@ - - + + 当前栏目标题: - + 当前栏目图标: + + @@ -403,6 +405,29 @@ + + + + 开启 + 关闭 + + + + + + + + + + + + + + + 保存 @@ -427,6 +452,7 @@ export default { components: { editor, picUpload, mulpicUpload, Treeselect, MaterialList, UeditorWrap, singlePic }, data() { return { + hotList:[], tabIndex: 0, editableTabsValue: '1', editableTabs:[], @@ -502,6 +528,8 @@ export default { is_benefit: 0, is_best: 0, is_new: 0, + is_hot_list:0, + hotListId:null, is_good: 0, is_postage: 0, is_sub: 0, @@ -788,6 +816,15 @@ export default { getInfo () { let that = this; let id = that.$route.params.id || 0; + //查询榜单列表 + initData('/bxg/api/yxStoreHotList', { + page: 0, + size: 999, + sort: 'id,desc' + }).then(data => { + that.hotList=data.content + //若为编辑,应初始化一下品牌 + }), //查询商品品牌 initData('/bxg/api/yxStoreBrand', { page: 0, @@ -874,6 +911,9 @@ export default { if(this.formValidate.spec_type === 1 && this.manyFormValidate.length===0){ return this.$message.warning('请点击生成规格!'); } + if(this.formValidate.is_hot_list === 1 && (this.formValidate.hotListId==null||this.formValidate.hotListId=="")){ + return this.$message.warning('需设置参与的榜单列表'); + } // console.log(this.formValidate,'提交的') // return add(this.formValidate).then(async res => { diff --git a/src/views/bxg/shop/set/form.vue b/src/views/bxg/shop/set/form.vue index 97714e6..0a4b8cc 100644 --- a/src/views/bxg/shop/set/form.vue +++ b/src/views/bxg/shop/set/form.vue @@ -73,6 +73,10 @@ export default { value:3, label:'活动专区轮播图', }, + { + value:4, + label:'榜单列表轮播图', + }, ], form: { id: '', diff --git a/src/views/bxg/shop/yxStoreHotList/index.vue b/src/views/bxg/shop/yxStoreHotList/index.vue index f653a9b..0573fb8 100644 --- a/src/views/bxg/shop/yxStoreHotList/index.vue +++ b/src/views/bxg/shop/yxStoreHotList/index.vue @@ -16,34 +16,34 @@ - - - - - - - -
-
- top{{index+1}}:{{item}} -
-
- -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -52,9 +52,9 @@ 隐藏 - - - + + + @@ -78,15 +78,15 @@ - - - - - + + + + + + + + +