注释代码

wujiamei_branch
wjm 8 months ago
parent a37a7c23e4
commit 3af043d946

@ -1,6 +1,4 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page isELIgnored="true" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="true" %>
<!-- 论坛中心 -->
<!DOCTYPE html>
<html>
@ -16,18 +14,10 @@
<!-- 通用的css -->
<link rel="stylesheet" href="../../css/common.css" />
</head>
<style>
.layui-laypage .layui-laypage-count {
padding: 0 10px;
}
.layui-laypage .layui-laypage-skip {
padding-left: 10px;
}
</style>
<body>
<div id="app">
<!-- 轮播图 -->
<div id="layui-carousel" class="layui-carousel">
<div id="layui-carousel" class="layui-carousel" lay-filter="carousel">
<div carousel-item>
<div class="layui-carousel-item" v-for="(item,index) in swiperList" :key="index">
<img :src="item.img" />
@ -35,17 +25,14 @@
</div>
</div>
<!-- 轮播图 -->
<!-- 标题 -->
<div id="breadcrumb">
<span class="en">FORUM / INFORMATION</span>
<span class="cn">我的发布</span>
</div>
<!-- 标题 -->
<div class="forum-container">
<table class="layui-table" lay-skin="nob">
<table class="layui-table nob" lay-skin="line">
<thead>
<tr>
<th>标题</th>
@ -54,7 +41,7 @@
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in dataList" v-bind:key="index">
<tr v-for="(item,index) in dataList" v-key="index">
<td @click="jump('../forum/detail.jsp?id='+item.id);" style="text-align:left">{{item.title}}</td>
<td style="text-align:left">{{item.addtime}}</td>
<td style="text-align:left">
@ -70,37 +57,34 @@
</table>
<div class="pager" id="pager"></div>
</div>
</div>
<!-- layui -->
<script src="../../layui/layui.js"></script>
<!-- vue -->
<script src="../../js/vue.js"></script>
<!-- 组件配置信息 -->
<script src="../../js/config.js"></script>
<script src="../../js/component.js"></script>
<!-- 扩展插件配置信息 -->
<script src="../../modules/config.js"></script>
<script src="../../js/extend.js"></script>
<!-- 工具方法 -->
<script src="../../js/utils.js"></script>
<script src="../../js/tool.js"></script>
<script>
var vue = new Vue({
el: '#app',
// 轮播图
data: {
// 轮播图
swiperList: [{
img: '../../img/banner.jpg'
}],
swiperList: [],
// 列表数据
dataList: []
},
filters: {
newsDesc: function(val) {
if (val) {
if (val.length > 200) {
return val.substring(0, 200).replace(/<[^>]*>/g).replace(/undefined/g, '');
return val.substring(0, 200) + '...';
} else {
return val.replace(/<[^>]*>/g).replace(/undefined/g, '');
return val.replace(/<\/?[^>]+>/g, '').replace(/undefined/g, '');
}
}
return '';
@ -114,19 +98,18 @@
layui.layer.confirm('是否确认删除?', {
btn: ['删除', '取消'] //按钮
}, function() {
layui.http.requestJson(`forum/delete`, 'post', [id], function(res) {
layui.http.requestJson(`forum/delete`, 'post', [id], function() {
layer.msg('删除成功', {
time: 2000,
icon: 6
}, function(res) {
icon: 6,
}, function() {
window.location.reload();
});
})
});
}
}
})
});
layui.use(['layer', 'element', 'carousel', 'laypage', 'http', 'jquery'], function() {
var layer = layui.layer;
var element = layui.element;
@ -136,7 +119,6 @@
var jquery = layui.jquery;
var limit = 10;
// 获取轮播图 数据
http.request('config/list', 'get', {
page: 1,
@ -147,7 +129,7 @@
res.data.list.forEach(element => {
if (element.value != null) {
swiperList.push({
img: http.baseurl+element.value
img: httpbaseurl+element.value
});
}
});
@ -167,13 +149,12 @@
})
}
});
// 获取列表数据
http.request('forum/page?parentid=0&sort=addtime&order=desc', 'get', {
page: 1,
limit: limit
}, function(res) {
vue.dataList = res.data.list
vue.dataList = res.data.list;
// 分页
laypage.render({
elem: 'pager',
@ -190,13 +171,12 @@
page: obj.curr,
limit: obj.limit
}, function(res) {
vue.dataList = res.data.list
})
vue.dataList = res.data.list;
});
}
}
});
})
});
});
</script>
</body>

@ -9,6 +9,7 @@
//清空上次查选的痕迹
editor.firstForSR = 0;
editor.currentRangeForSR = null;
//给tab注册切换事件
/**
* tab点击处理事件
@ -33,7 +34,6 @@ function clickHandler( tabHeads,tabBodys,obj ) {
body.style.zIndex = 200;
}
}
}
/**
@ -50,17 +50,20 @@ function switchTab( tabParentId ) {
if (head.className === "focus") clickHandler(tabHeads, tabBodys, head);
head.onclick = function () {
clickHandler(tabHeads, tabBodys, this);
};
}
}
}
$G('searchtab').onmousedown = function(){
$G('searchtab').onclick = function () {
$G('search-msg').innerHTML = '';
$G('replace-msg').innerHTML = ''
}
$G('replace-msg').innerHTML = '';
};
//是否区分大小写
function getMatchCase(id) {
return $G(id).checked ? true : false;
}
//查找
$G("nextFindBtn").onclick = function (txt, dir, mcase) {
var findtxt = $G("findtxt").value, obj;
@ -76,10 +79,9 @@ $G("nextFindBtn").onclick = function (txt, dir, mcase) {
var bk = editor.selection.getRange().createBookmark();
$G('search-msg').innerHTML = lang.getEnd;
editor.selection.getRange().moveToBookmark(bk).select();
}
};
$G("nextReplaceBtn").onclick = function (txt, dir, mcase) {
var findtxt = $G("findtxt1").value, obj;
if (!findtxt) {
@ -92,6 +94,7 @@ $G("nextReplaceBtn").onclick = function (txt, dir, mcase) {
};
frCommond(obj);
};
$G("preFindBtn").onclick = function (txt, dir, mcase) {
var findtxt = $G("findtxt").value, obj;
if (!findtxt) {
@ -106,6 +109,7 @@ $G("preFindBtn").onclick = function (txt, dir, mcase) {
$G('search-msg').innerHTML = lang.getStart;
}
};
$G("preReplaceBtn").onclick = function (txt, dir, mcase) {
var findtxt = $G("findtxt1").value, obj;
if (!findtxt) {
@ -118,6 +122,7 @@ $G("preReplaceBtn").onclick = function (txt, dir, mcase) {
};
frCommond(obj);
};
//替换
$G("repalceBtn").onclick = function () {
var findtxt = $G("findtxt1").value.replace(/^\s|\s$/g, ""), obj,
@ -136,6 +141,7 @@ $G("repalceBtn").onclick = function () {
};
frCommond(obj);
};
//全部替换
$G("repalceAllBtn").onclick = function () {
var findtxt = $G("findtxt1").value.replace(/^\s|\s$/g, ""), obj,
@ -157,8 +163,10 @@ $G("repalceAllBtn").onclick = function () {
$G('replace-msg').innerHTML = lang.countMsg.replace("{#count}", num);
}
};
//执行
var frCommond = function (obj) {
return editor.execCommand("searchreplace", obj);
};
switchTab("searchtab");
switchTab("searchtab"); //注释代码
Loading…
Cancel
Save