mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 22:43:25 +08:00
【新增】后台设计界面,导航租模块,链接类型里增加商品分类选择
This commit is contained in:
@@ -866,7 +866,7 @@ Vue.component('layout-config', {
|
||||
coreHelper.Post(getDesign, { id: id }, function (e) {
|
||||
if (e.code === 0) {
|
||||
//console.log(e);
|
||||
linkType = { "1": "URL链接", "2": "商品", "3": "文章", "4": "文章分类", "5": "智能表单" };
|
||||
linkType = { "1": "URL链接", "2": "商品", "6": "商品分类", "3": "文章", "4": "文章分类", "5": "智能表单" };
|
||||
that.pageCode = e.data.model.code;
|
||||
that.brandList = e.data.brandList;
|
||||
that.pageConfig = e.data.pageConfig;
|
||||
@@ -953,6 +953,9 @@ Vue.component('layout-config', {
|
||||
case 5:
|
||||
this.form_list()
|
||||
break;
|
||||
case 6:
|
||||
this.goodType_list()
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -991,6 +994,17 @@ Vue.component('layout-config', {
|
||||
}
|
||||
});
|
||||
},
|
||||
goodType_list: function () {
|
||||
//console.log("获取商品分类列表");
|
||||
layui.admin.popup({
|
||||
title: '商品分类列表',
|
||||
area: ['800px', '98%'],
|
||||
id: 'LAY-app-CoreCmsCommon-GetGoodTypes',
|
||||
success: function (layero, index) {
|
||||
layui.view(this.id).render('common/getGoodTypes', null).done(function () { });
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
resetColor: function () {
|
||||
this.selectWg.value.backgroundColor = '#FFFFFF'
|
||||
|
||||
66
CoreCms.Net.Web.Admin/wwwroot/views/common/getGoodTypes.html
Normal file
66
CoreCms.Net.Web.Admin/wwwroot/views/common/getGoodTypes.html
Normal file
@@ -0,0 +1,66 @@
|
||||
<script type="text/html" template lay-done="layui.data.done(d);">
|
||||
</script>
|
||||
<div class="table-body">
|
||||
<table id="LAY-app-CoreCmsArticleType-tableBox" lay-filter="LAY-app-CoreCmsArticleType-tableBox"></table>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var indexData;
|
||||
var debug = layui.setter.debug;
|
||||
layui.data.done = function (d) {
|
||||
//开启调试情况下获取接口赋值数据
|
||||
if (debug) { console.log(d); }
|
||||
|
||||
indexData = d.data;
|
||||
layui.use(['index', 'table', 'laydate', 'util', 'coreHelper', 'treeTable'],
|
||||
function () {
|
||||
var $ = layui.$
|
||||
, admin = layui.admin
|
||||
, table = layui.table
|
||||
, form = layui.form
|
||||
, laydate = layui.laydate
|
||||
, setter = layui.setter
|
||||
, coreHelper = layui.coreHelper
|
||||
, util = layui.util
|
||||
, treeTable = layui.treeTable
|
||||
, view = layui.view;
|
||||
|
||||
//重载form
|
||||
form.render();
|
||||
var searchwhere;
|
||||
|
||||
//数据绑定
|
||||
var insTb = treeTable.render({
|
||||
elem: '#LAY-app-CoreCmsArticleType-tableBox',
|
||||
tree: {
|
||||
iconIndex: 1,
|
||||
idName: 'id', // id的字段名
|
||||
pidName: 'parentId', // pid的字段名
|
||||
openName: 'name',
|
||||
isPidData: true
|
||||
},
|
||||
height: 'full-232',//无面包屑127,搜索框189,1行62
|
||||
cols: [
|
||||
{ field: 'id', title: '序列', width: 60, sort: false },
|
||||
{ field: 'name', title: '分类名称', sort: false },
|
||||
{ field: 'sort', title: '排序 ', sort: false, width: 105 },
|
||||
{ width: 140, title: '操作', align: 'center', toolbar: '#articleTypeBar' }
|
||||
],
|
||||
reqData: function (data, callback) {
|
||||
coreHelper.Post('Api/Tools/GetGoodTypes', null, function (res) {
|
||||
if (res.code === 0) {
|
||||
callback(res.data);
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 5, time: 2000 });
|
||||
}
|
||||
})
|
||||
},
|
||||
style: 'margin-top:0;'
|
||||
});
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="articleTypeBar">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="selectType">选择</a>
|
||||
</script>
|
||||
@@ -1236,6 +1236,9 @@
|
||||
<div v-if="selectType==5">
|
||||
<input type="text" v-model="id" class="selectLinkVal" :readonly="true" @click="selectLink" placeholder="请选择">
|
||||
</div>
|
||||
<div v-if="selectType==6">
|
||||
<input type="text" v-model="id" class="selectLinkVal" :readonly="true" @click="selectLink" placeholder="请选择">
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user