diff --git a/app/admin/view/content/forum/add.html b/app/admin/view/content/forum/add.html index dd75fbb..f99bee6 100644 --- a/app/admin/view/content/forum/add.html +++ b/app/admin/view/content/forum/add.html @@ -5,286 +5,256 @@ 新增帖子 - -
-
-
- -
-
- -
- -
-
-
- -
- - -
-
    -
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ + +
+
    +
+
+
+
+
+
-
-
-
-
-
-
-
- -
-
-
- -
- +
+
+ +
- -
-
- -
- -
-
- {//关键词} -
- -
- - +
+ +
+ +
+ +
+
+ +
+ +
+
+ {//关键词} +
+ +
+ + +
+
+ {//tag} +
+ +
+
+
- {//tag} -
- -
-
-
+
+
+
+ +
+
+ + + + + -
+ - - - - - - - - - - + // 百度词条 + var baidu_title_switch = "{:config('taoler.config.baidu_title_switch')}"; + if(baidu_title_switch === 1) { + $("#L_title").bind('input propertychange',function () { + var title = $(this).val(); + var str = ''; + if(title.length > 0 ) { + $.post("{:url('content.forum/getWordList')}",{title:title},function(res){ + // 动态生成ur>li内容 + if (res.code === 0) { + // 显示动态框 + $(".bdsug").removeClass('layui-hide'); + for (var i = 0; i < res.data.length; i++) { + //str += '
  • ' + res.data[i].q.replace(title,'') + '
  • '; + str += '
  • ' + res.data[i].q + '
  • '; + } + // 清空ul并追加li + $('.wordlist').empty().append(str); + // 点击李获取li值并复制给#L_title input的value + $(".bdsug li").on('click',function(){ + var word = $(this).attr('data-key'); + var words = title + '(' + word + ')'; + $("#L_title").val(words); + // 关闭动态框 + $(".bdsug").addClass('layui-hide'); + }); + } else { + $(".bdsug").addClass('layui-hide'); + } + }); + } else { + $(".bdsug").addClass('layui-hide'); + } + }); + } + + //上传附件 + upload.render({ + elem: "#zip-button", + url: "{:url('content.forum/uploads')}", //改成您自己的上传接口 + data: { type: "zip" }, + accept: "file", //普通文件 + done: function (res) { + if (res.status === 0) { + $('input[name="upzip"]').val(res.url); + layer.msg("上传成功"); + } else { + layer.msg(res.msg); + } + }, + }); + + // 改变标题颜色 + colorpicker.render({ + elem: "#color", + color: "#393d49", + predefine: true, // 开启预定义颜色 + done: function (color) { + //譬如你可以在回调中把得到的 color 赋值给表单 + $("#L_title_color").val(color); + $("#L_title").css("color", color); + }, + }); + + form.on('submit(forum-save)', function(data) { + $.ajax({ + url: "{:url('content.forum/add')}", + data: JSON.stringify(data.field), + dataType: 'json', + contentType: 'application/json', + type: 'post', + success: function(result) { + if (result.code === 0) { + layer.msg(result.msg, { + icon: 1, + time: 1000 + }, function() { + parent.layer.close(parent.layer.getFrameIndex(window + .name)); //关闭当前页 + parent.layui.table.reload("user-table"); + }); + } else { + layer.msg(result.msg, { + icon: 2, + time: 1000 + }); + } + } + }) + return false; + }); + + }); + + diff --git a/app/admin/view/content/forum/edit.html b/app/admin/view/content/forum/edit.html index 5b63aac..dad9bf6 100644 --- a/app/admin/view/content/forum/edit.html +++ b/app/admin/view/content/forum/edit.html @@ -5,233 +5,248 @@ 修改页面 - -
    -
    -
    - - -
    -
    - -
    - -
    -
    -
    - -
    - - - -
    -
    -
    -
    -
    -
    -
    - -
    -
    - -
    -
    -
    -
    - -
    - -
    - -
    -
    -
    - -
    - -
    -
    - {//关键词} -
    - -
    - + + +
    +
    + +
    +
    + +
    + +
    +
    +
    + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    + {//关键词} +
    + +
    + +
    +
    + {//tag} +
    + +
    +
    +
    +
    +
    + +
    - {//tag} -
    - -
    -
    +
    +
    + +
    -
    - -
    + + + + + -
    + - + $(function(){ + //1.渲染标签 + var addTags = xmSelect.render({ + el: '#tag', + name: 'tagid', + layVerify: '', + layVerType: 'msg', + paging: true, + pageSize: 5, + data: [] + }); + //2.动态赋值 + $.get("{:url('content.tag/getArticleTag')}",{id:artId},function(res){ + if(res.code === 0){ + addTags.setValue( + res.data + ) + } + }); + //3.动态标签赋值 + $.get("{:url('content.tag/getAllTag')}",function(res){ + if(res.code === 0){ + addTags.update({ + data: res.data, + autoRow: true, + }) + } + }); + }) - - - - - - - + }); + + \ No newline at end of file diff --git a/app/admin/view/content/forum/index.html b/app/admin/view/content/forum/index.html index ad6be29..e2e125a 100644 --- a/app/admin/view/content/forum/index.html +++ b/app/admin/view/content/forum/index.html @@ -104,18 +104,19 @@ + +{block name="js"}js文件{/block} + + \ No newline at end of file diff --git a/app/admin/view/public/admin_form.html b/app/admin/view/public/admin_form.html new file mode 100644 index 0000000..0ef4131 --- /dev/null +++ b/app/admin/view/public/admin_form.html @@ -0,0 +1,14 @@ + + + + + {block name="title"}TaoLerCMS后台管理系统{/block} + + + +{block name="body"}内容{/block} + + +{block name="js"}js文件{/block} + + \ No newline at end of file diff --git a/config/taoler.php b/config/taoler.php index cf15d5d..b231272 100644 --- a/config/taoler.php +++ b/config/taoler.php @@ -16,7 +16,7 @@ return [ // 应用名,此项不可更改 'appname' => 'TaoLer', // 版本配置 - 'version' => '2.2.3', + 'version' => '2.2.4', // 加盐 'salt' => 'taoler', // 数据库备份目录