Files
Xinyue-Search/app/qfadmin/view/source/feedback.html
T
2024-04-04 21:28:09 +08:00

74 lines
2.5 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>{$node.node_title}</title>
{include file="common/header"/}
<el-table :data="dataList.data" v-loading="loading">
<el-table-column prop="id" label="ID" align="center" width="100">
</el-table-column>
<el-table-column prop="content" label="用户想要的资源描述">
</el-table-column>
<el-table-column prop="create_time" label="提交时间" align="center" width="200">
</el-table-column>
</el-table>
<div class="page">
<el-pagination @size-change="handleSizeChange" :page-sizes="[10, 20, 50, 100,200,500]" :page-size="10"
layout="total, sizes, prev, pager, next, jumper" background @current-change="changeCurrentPage"
:current-page="dataList.current_page" :page-count="dataList.last_page" :total="dataList.total">
</el-pagination>
</div>
{include file="common/footer"/}
<script>
var app = new Vue({
el: '#app',
data() {
return {
loading: true,
dataList: [],
form: {
page: 1,
per_page: 10,
order: 'id desc'
},
}
},
created() {
this.getList();
},
methods: {
handleSizeChange(per_page) {
this.form.per_page = per_page;
this.getList();
},
changeCurrentPage(page) {
this.form.page = page;
this.getList();
},
getList() {
var that = this;
that.loading = true;
axios.post('/admin/feedback/getList', Object.assign({}, PostBase, that.form))
.then(function (response) {
that.loading = false;
if (response.data.code == CODE_SUCCESS) {
that.dataList = response.data.data;
} else {
that.$message.error(response.data.message);
}
})
.catch(function (error) {
that.loading = false;
that.$message.error('服务器内部错误');
});
},
}
})
</script>
</html>