Commit c8d3e1e8 authored by 王's avatar

所有分页的添加

parent 00b2a719
...@@ -12,8 +12,8 @@ module.exports = { ...@@ -12,8 +12,8 @@ module.exports = {
//本地代理设置 //本地代理设置
proxyTable: { proxyTable: {
'/api': { '/api': {
target: 'http://local.base-api.sing.com', // 接口的域名 // target: 'http://local.base-api.sing.com', // 接口的域名
// target: 'http://wechat.test.singsingenglish.com/', target: 'http://wechat.test.singsingenglish.com/',
changeOrigin: true, // 如果接口跨域,需要进行这个参数配置 changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
} }
}, },
......
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/>
<class-dialog :dialogObj="dialogObj" @reflash="getClassList"></class-dialog> <class-dialog :dialogObj="dialogObj" @reflash="getClassList"></class-dialog>
<user-list :userObj="userObj" @reflash="getClassList"/> <user-list :userObj="userObj" @reflash="getClassList"/>
</div> </div>
...@@ -84,9 +85,13 @@ ...@@ -84,9 +85,13 @@
import {getGoodsListApi,getPeriodsApi,getClassListApi,getPeriodsTeacherApi,delClassApi} from "../../service/api"; import {getGoodsListApi,getPeriodsApi,getClassListApi,getPeriodsTeacherApi,delClassApi} from "../../service/api";
import classDialog from './dialog' import classDialog from './dialog'
import UserList from './userList' import UserList from './userList'
import page from '../framework/page'
export default { export default {
data(){ data(){
return { return {
nowPage: 1,
total: 0,
limit: 10,
periodsId:null, periodsId:null,
goodsList:[], goodsList:[],
teacher_id:'', teacher_id:'',
...@@ -109,7 +114,8 @@ ...@@ -109,7 +114,8 @@
}, },
components:{ components:{
UserList, UserList,
classDialog classDialog,
page
}, },
mounted(){ mounted(){
this.initPage() this.initPage()
...@@ -152,9 +158,20 @@ ...@@ -152,9 +158,20 @@
this.getTeacher() this.getTeacher()
} }
}, },
onPageChange(val){
this.nowPage = val;
this.getClassList();
},
getClassList(){ getClassList(){
this.getTeacher(); this.getTeacher();
getClassListApi(this.periods.id,{teacher_id:this.teacher_id}).then(res=>{ let json = {
limit: this.limit,
page: this.nowPage
}
if (this.teacher_id) {
json.teacher_id = this.teacher_id
}
getClassListApi(this.periods.id,json).then(res=>{
this.title = res.periods; this.title = res.periods;
this.classList = res.list; this.classList = res.list;
}) })
......
<template> <template>
<div class="page-div"> <div class="page-div">
<el-pagination <el-pagination
:current-page="nowPage" :page-size="limit"
:current-page.sync="nowPage"
layout="total , prev, pager, next, jumper" layout="total , prev, pager, next, jumper"
:total="total"> :total="total">
</el-pagination> </el-pagination>
...@@ -11,13 +12,22 @@ ...@@ -11,13 +12,22 @@
<script> <script>
export default { export default {
name: "page", name: "page",
props:[ data() {
'nowPage', return {
'total' nowPage: 1
], }
},
props:{
'total' : {
required: true
},
'limit': {
default: 10
}
},
watch:{ watch:{
nowPage(value){ nowPage(value){
this.$emit("pageChange", value);
} }
} }
} }
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" v-model="nowPage"/> <page :total="total" :limit="limit" @pageChange="onPageChange"/>
<dialog-com v-if="dialogObj.show" :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/> <dialog-com v-if="dialogObj.show" :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/>
</div> </div>
</template> </template>
...@@ -93,7 +93,8 @@ ...@@ -93,7 +93,8 @@
}, },
userList:[], userList:[],
total:0, total:0,
nowPage:0, nowPage:1,
limit: 10,
dialogObj:{ dialogObj:{
type:0, type:0,
show:false, show:false,
...@@ -114,8 +115,23 @@ ...@@ -114,8 +115,23 @@
this.getUser() this.getUser()
}, },
methods:{ methods:{
onPageChange(val){
this.nowPage = val
this.getUser()
},
getUser(){ getUser(){
getLessonApi(this.searchFrom).then(res=>{ this.searchFrom.page = this.nowPage;
let json = {
limit: this.limit,
page: this.nowPage
}
if (this.searchFrom.title) {
json.title = this.searchFrom.title
}
if (this.searchFrom.type) {
json.type = this.searchFrom.type
}
getLessonApi(json).then(res=>{
this.userList = res.list; this.userList = res.list;
this.total = res.total this.total = res.total
}) })
......
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
<address-dialog v-if="dialogObj.show" :dialogObj="dialogObj" @reflash="onUpdateAddress"></address-dialog> <address-dialog v-if="dialogObj.show" :dialogObj="dialogObj" @reflash="onUpdateAddress"></address-dialog>
<refund-dialog :dialogObj="refundDialogObj" @reflash="onAfterRefund" @changeShow="changeShow"></refund-dialog> <refund-dialog :dialogObj="refundDialogObj" @reflash="onAfterRefund" @changeShow="changeShow"></refund-dialog>
<detail-dialog :dialogObj="dialogDetailObj" @changeShow="changeDetailShow"/> <detail-dialog :dialogObj="dialogDetailObj" @changeShow="changeDetailShow"/>
<page :nowPage="nowPage" :total="total"/> <page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/>
</div> </div>
</template> </template>
...@@ -188,6 +188,7 @@ ...@@ -188,6 +188,7 @@
return { return {
nowPage: 1, nowPage: 1,
total: 0, total: 0,
limit: 10,
searchFrom: { searchFrom: {
nickname: '', nickname: '',
user_id: '', user_id: '',
...@@ -240,8 +241,15 @@ ...@@ -240,8 +241,15 @@
}); });
}) })
}, },
onPageChange(val){
this.nowPage = val
this.getOrderList()
},
getOrderList(){ getOrderList(){
let json = {}; let json = {
limit: this.limit,
page: this.nowPage
};
if (this.searchFrom.nickname) { if (this.searchFrom.nickname) {
json.nickname = this.searchFrom.nickname json.nickname = this.searchFrom.nickname
} }
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :nowPage="nowPage" :total="total"/> <page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/>
<new-dialog v-if="newDialog.show" :dialogObj="newDialog" @reflash="onSave"></new-dialog> <new-dialog v-if="newDialog.show" :dialogObj="newDialog" @reflash="onSave"></new-dialog>
</div> </div>
</template> </template>
...@@ -115,6 +115,7 @@ ...@@ -115,6 +115,7 @@
return { return {
nowPage: 1, nowPage: 1,
total: 0, total: 0,
limit: 10,
title: '', title: '',
goodsId: null, goodsId: null,
lessonId: null, lessonId: null,
...@@ -153,8 +154,14 @@ ...@@ -153,8 +154,14 @@
page page
}, },
methods: { methods: {
onPageChange(val){
this.nowPage = val
this.onSearch()
},
onSearch(){ onSearch(){
let json={ let json={
limit: this.limit,
page: this.nowPage
} }
if(this.title){ if(this.title){
json.title = this.title; json.title = this.title;
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :nowPage="nowPage" :total="total"/> <page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/>
<el-dialog :title="dialogTitle" v-if="showDialog" :visible.sync="showDialog"> <el-dialog :title="dialogTitle" v-if="showDialog" :visible.sync="showDialog">
<el-form ref="saveuser" :model="nowObj" label-width="70px"> <el-form ref="saveuser" :model="nowObj" label-width="70px">
<el-form-item label="订单状态" v-if="!showDesc"> <el-form-item label="订单状态" v-if="!showDesc">
...@@ -144,6 +144,7 @@ ...@@ -144,6 +144,7 @@
return { return {
nowPage: 1, nowPage: 1,
total: 0, total: 0,
limit: 10,
search:{ search:{
key:'', key:'',
status:0 status:0
...@@ -204,9 +205,14 @@ ...@@ -204,9 +205,14 @@
this.getList() this.getList()
}, },
methods:{ methods:{
onPageChange(val){
this.nowPage = val;
},
//获取列表 //获取列表
getList:function () { getList:function () {
let json = { let json = {
limit: this.limit,
page: this.nowPage
}; };
getWithdrawListApi(json).then(res=>{ getWithdrawListApi(json).then(res=>{
this.tableData = res.list; this.tableData = res.list;
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :nowPage="nowPage" :total="total"/> <page :nowPage="nowPage" :total="total" @pageChange="onPageChange"/>
</div> </div>
</template> </template>
...@@ -103,6 +103,7 @@ ...@@ -103,6 +103,7 @@
return { return {
nowPage: 1, nowPage: 1,
total: 0, total: 0,
limit: 10,
searchFrom: { searchFrom: {
nickname:'', nickname:'',
user_id: '' user_id: ''
...@@ -142,8 +143,15 @@ ...@@ -142,8 +143,15 @@
}); });
}) })
}, },
onPageChange(val){
this.nowPage = val
this.getRefundList()
},
getRefundList(){ getRefundList(){
let json = {} let json = {
limit: this.limit,
page: this.nowPage
}
if(this.searchFrom.nickname){ if(this.searchFrom.nickname){
json.nickname = this.searchFrom.nickname json.nickname = this.searchFrom.nickname
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item> <el-form-item>
<el-button type="primary" plain>搜索</el-button> <el-button type="primary" plain @click="getUser">搜索</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" :offset="12"> <el-col :span="4" :offset="12">
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" v-model="nowPage"/> <page :total="total" :limit="limit" @pageChange="onPageChange"/>
<dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/> <dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/>
</div> </div>
</template> </template>
...@@ -122,7 +122,8 @@ ...@@ -122,7 +122,8 @@
}, },
userList:[], userList:[],
total:0, total:0,
nowPage:0, nowPage:1,
limit: 10,
dialogObj:{ dialogObj:{
type:0, type:0,
show:false, show:false,
...@@ -153,8 +154,19 @@ ...@@ -153,8 +154,19 @@
this.getUser() this.getUser()
}, },
methods:{ methods:{
onPageChange(val){
this.nowPage = val
this.getUser()
},
getUser(){ getUser(){
getGoodsListApi(this.searchFrom).then(res=>{ let json = {
limit: this.limit,
page: this.nowPage
}
if (this.searchFrom.name) {
json.name = this.searchFrom.name
}
getGoodsListApi(json).then(res=>{
this.userList = res.list; this.userList = res.list;
this.total = res.total this.total = res.total
}) })
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" v-model="nowPage"/> <page :total="total" :limit="limit" @pageChange="onPageChange"/>
<dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="initPage"/> <dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="initPage"/>
</div> </div>
</template> </template>
...@@ -83,7 +83,8 @@ ...@@ -83,7 +83,8 @@
data(){ data(){
return { return {
total:0, total:0,
nowPage:0, nowPage:1,
limit: 10,
searchFrom: { searchFrom: {
name:'' name:''
}, },
...@@ -100,7 +101,10 @@ ...@@ -100,7 +101,10 @@
}, },
methods:{ methods:{
initPage(){ initPage(){
let json = {} let json = {
limit: this.limit,
page: this.nowPage
}
if (this.searchFrom.name) { if (this.searchFrom.name) {
json.name = this.searchFrom.name json.name = this.searchFrom.name
} }
...@@ -112,6 +116,10 @@ ...@@ -112,6 +116,10 @@
this.total = res.total this.total = res.total
}) })
}, },
onPageChange(val){
this.nowPage = val
this.initPage()
},
changeShow() { changeShow() {
}, },
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :nowPage="nowPage" :total="total"/> <page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/>
<el-dialog <el-dialog
:title="dialog.title" :title="dialog.title"
center center
...@@ -159,6 +159,7 @@ ...@@ -159,6 +159,7 @@
return { return {
nowPage:1, nowPage:1,
total:0, total:0,
limit: 10,
adminList:[], adminList:[],
dialog:{ dialog:{
dialogType:0, dialogType:0,
...@@ -208,8 +209,16 @@ ...@@ -208,8 +209,16 @@
} }
}) })
}, },
onPageChange(val){
this.nowPage = val
this.getList()
},
getList(){ getList(){
getAdminListApi().then(res=>{ let json = {
limit: this.limit,
page: this.nowPage
}
getAdminListApi(json).then(res=>{
this.adminList = res.list this.adminList = res.list
this.total=Number(res.total) this.total=Number(res.total)
this.$store.commit('mainCanShow') this.$store.commit('mainCanShow')
......
...@@ -39,14 +39,11 @@ ...@@ -39,14 +39,11 @@
<el-form-item label="参数"> <el-form-item label="参数">
<span>{{ props.row.params }}</span> <span>{{ props.row.params }}</span>
</el-form-item> </el-form-item>
<el-form-item label="功能名">
<span>{{ props.row.desc }}</span>
</el-form-item>
</el-form> </el-form>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="用户名" label="登陆名"
prop="user_name"> prop="user_name">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -54,16 +51,20 @@ ...@@ -54,16 +51,20 @@
prop="admin_id"> prop="admin_id">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="用户详情" label="用户"
prop="user_desc"> prop="user_desc">
</el-table-column> </el-table-column>
<el-table-column
label="功能名"
prop="desc">
</el-table-column>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="created_at" prop="created_at"
label="创建时间"> label="创建时间">
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" v-model="nowPage"/> <page :total="total" :limit="limit" @pageChange="onPageChange"/>
</div> </div>
</template> </template>
...@@ -80,6 +81,7 @@ ...@@ -80,6 +81,7 @@
list: [], list: [],
total:0, total:0,
nowPage:1, nowPage:1,
limit: 10,
searchFrom: { searchFrom: {
admin_id: '', admin_id: '',
url: '', url: '',
...@@ -92,10 +94,28 @@ ...@@ -92,10 +94,28 @@
}, },
methods: { methods: {
getList(){ getList(){
getAdminLogLisApi(this.searchFrom).then(res => { this.searchFrom.page = this.nowPage;
let json = {
page: this.nowPage,
limit: this.limit
}
if (this.searchFrom.admin_id){
json.admin_id = this.searchFrom.admin_id
}
if (this.searchFrom.url){
json.url = this.searchFrom.url
}
if (this.searchFrom.desc){
json.desc = this.searchFrom.desc
}
getAdminLogLisApi(json).then(res => {
this.list = res.list this.list = res.list
this.total = res.total this.total = res.total
}) })
},
onPageChange(val){
this.nowPage = val;
this.getList();
} }
} }
} }
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/>
<el-dialog <el-dialog
:title="dialog.title" :title="dialog.title"
center center
...@@ -91,15 +92,20 @@ ...@@ -91,15 +92,20 @@
<script> <script>
import {getBannerListApi,addBannerApi,editBannerApi,getBannerDetailApi,delBannerApi,moveApi,uploadFileApi} from "../../service/api"; import {getBannerListApi,addBannerApi,editBannerApi,getBannerDetailApi,delBannerApi,moveApi,uploadFileApi} from "../../service/api";
import page from '../framework/page'
export default { export default {
name: "banner", name: "banner",
components:{
page
},
data(){ data(){
return { return {
loading: false, loading: false,
bannerList: [], bannerList: [],
total: 0, total: 0,
nowPage: 1,
uploadShow: true, uploadShow: true,
limit: 1, limit: 10,
dialog:{ dialog:{
title:'新增Banner', title:'新增Banner',
show:false, show:false,
...@@ -125,9 +131,17 @@ ...@@ -125,9 +131,17 @@
this.getList() this.getList()
}, },
methods: { methods: {
onPageChange(val){
this.nowPage = val;
this.getList()
},
getList(){ getList(){
this.loading = true; this.loading = true;
getBannerListApi().then(res=>{ let json = {
limit: this.limit,
page: this.nowPage
}
getBannerListApi(json).then(res=>{
if (res) { if (res) {
this.bannerList = res.list; this.bannerList = res.list;
this.total = res.total; this.total = res.total;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :nowPage="nowPage" :total="total"/> <page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/>
<el-dialog <el-dialog
:title="dialog.title" :title="dialog.title"
center center
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
return { return {
nowPage:1, nowPage:1,
total:0, total:0,
limit: 10,
roleList:[], roleList:[],
dialog:{ dialog:{
title:'新增角色', title:'新增角色',
...@@ -120,8 +121,16 @@ ...@@ -120,8 +121,16 @@
} }
}) })
}, },
onPageChange(val){
this.nowPage = val;
this.getList();
},
getList(){ getList(){
getRoleListApi().then(res=>{ let json = {
limit: this.limit,
page: this.nowPage
}
getRoleListApi(json).then(res=>{
if (res) { if (res) {
this.roleList = res.list; this.roleList = res.list;
this.total = res.total; this.total = res.total;
......
...@@ -52,16 +52,21 @@ ...@@ -52,16 +52,21 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getList"/> <dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getList"/>
<page :total="total" :limit="limit" @pageChange="onPageChange"/>
</div> </div>
</template> </template>
<script> <script>
import dialogCom from './sysConfigDialog' import dialogCom from './sysConfigDialog'
import {getConfigListApi,deleteConfigApi,getConfigDetailApi} from "../../service/api"; import {getConfigListApi,deleteConfigApi,getConfigDetailApi} from "../../service/api";
import page from '../framework/page'
export default { export default {
name: "sysConfig", name: "sysConfig",
data() { data() {
return { return {
total:0,
nowPage:1,
limit: 10,
dialogObj:{ dialogObj:{
value:'', value:'',
desc:'', desc:'',
...@@ -72,7 +77,8 @@ ...@@ -72,7 +77,8 @@
} }
}, },
components:{ components:{
dialogCom dialogCom,
page
}, },
mounted(){ mounted(){
this.getList() this.getList()
...@@ -82,10 +88,19 @@ ...@@ -82,10 +88,19 @@
this.dialogObj.show=data this.dialogObj.show=data
}, },
getList(){ getList(){
getConfigListApi().then(res => { let json = {
limit: this.limit,
page: this.nowPage
}
getConfigListApi(json).then(res => {
this.list = res.list this.list = res.list
this.total = res.total
}) })
}, },
onPageChange(val){
this.nowPage = val;
this.getList();
},
add(){ add(){
this.dialogObj.id = ''; this.dialogObj.id = '';
this.dialogObj.key= ''; this.dialogObj.key= '';
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" v-model="nowPage"/> <page :total="total" :limit="limit" @pageChange="onPageChange"/>
<dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/> <dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/>
</div> </div>
</template> </template>
...@@ -105,7 +105,8 @@ ...@@ -105,7 +105,8 @@
}, },
userList:[], userList:[],
total:0, total:0,
nowPage:0, nowPage:1,
limit: 10,
dialogObj:{ dialogObj:{
type:0, type:0,
show:false, show:false,
...@@ -149,8 +150,22 @@ ...@@ -149,8 +150,22 @@
this.getUser() this.getUser()
}, },
methods:{ methods:{
onPageChange(val){
this.nowPage = val
this.getUser()
},
getUser(){ getUser(){
getTeacherListApi(this.searchFrom).then(res=>{ let json = {
limit: this.limit,
page: this.nowPage
}
if (this.searchFrom.type) {
json.type = this.searchFrom.type
}
if (this.searchFrom.name) {
json.name = this.searchFrom.name
}
getTeacherListApi(json).then(res=>{
this.userList = res.list; this.userList = res.list;
this.total = res.total this.total = res.total
}) })
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" v-model="nowPage"/> <page :total="total" :limit="limit" @pageChange="onPageChange"/>
<detail-dialog :dialogObj="dialogDetailObj" @changeShow="changeShow"/> <detail-dialog :dialogObj="dialogDetailObj" @changeShow="changeShow"/>
<teacher-dialog :dialogObj="dialogObj" @reflash="getUser"></teacher-dialog> <teacher-dialog :dialogObj="dialogObj" @reflash="getUser"></teacher-dialog>
</div> </div>
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
userList:[], userList:[],
total:0, total:0,
nowPage:1, nowPage:1,
limit: 10,
showDetail:false, showDetail:false,
showId:'', showId:'',
dialogObj:{ dialogObj:{
...@@ -124,8 +125,25 @@ ...@@ -124,8 +125,25 @@
this.getUser() this.getUser()
}, },
methods:{ methods:{
onPageChange(val){
this.nowPage = val
this.getUser()
},
getUser(){ getUser(){
getUserListApi(this.searchFrom).then(res=>{ let json = {
page: this.nowPage,
limit: this.limit
}
if (this.searchFrom.nickName) {
json.nickname = this.searchFrom.nickName
}
if (this.searchFrom.mobile) {
json.mobile = this.searchFrom.mobile
}
if (this.searchFrom.level) {
json.level = this.searchFrom.level
}
getUserListApi(json).then(res=>{
this.userList = res.list; this.userList = res.list;
this.total = res.total this.total = res.total
}) })
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" v-model="nowPage"/> <page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/>
</div> </div>
</div> </div>
</div> </div>
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
mediaList: [], mediaList: [],
nowPage: 1, nowPage: 1,
total: 0, total: 0,
limit: 5,
loading: false, loading: false,
type: 'image', type: 'image',
imageList: [], imageList: [],
...@@ -120,10 +121,15 @@ ...@@ -120,10 +121,15 @@
this.nowPage = 1; this.nowPage = 1;
this.getMediaList(type); this.getMediaList(type);
}, },
onPageChange(val){
this.nowPage = val
this.getMediaList(this.type)
},
getMediaList(type){ getMediaList(type){
let json = { let json = {
type: type, type: type,
page: this.nowPage page: this.nowPage,
limit: this.limit
}; };
this.loading = true; this.loading = true;
getMediaListApi(json).then(res=>{ getMediaListApi(json).then(res=>{
......
...@@ -20,8 +20,8 @@ export const logoutApi = function() { ...@@ -20,8 +20,8 @@ export const logoutApi = function() {
}; };
//查询账号列表 //查询账号列表
const getAdminListUrl = `${_baseUrl}api/admin/user/list`; const getAdminListUrl = `${_baseUrl}api/admin/user/list`;
export const getAdminListApi = function () { export const getAdminListApi = function (json) {
return Vue.prototype.$fetch(getAdminListUrl) return Vue.prototype.$fetch(getAdminListUrl,json)
}; };
//修改账号信息 //修改账号信息
const editAdminUrl = `${_baseUrl}api/admin/user/info`; const editAdminUrl = `${_baseUrl}api/admin/user/info`;
...@@ -329,8 +329,8 @@ export const delRoleApi = function (id) { ...@@ -329,8 +329,8 @@ export const delRoleApi = function (id) {
}; };
// 获取banner列表 // 获取banner列表
const getBannerListUrl = `${_baseUrl}api/admin/banner/list`; const getBannerListUrl = `${_baseUrl}api/admin/banner/list`;
export const getBannerListApi = function () { export const getBannerListApi = function (json) {
return Vue.prototype.$fetch(`${getBannerListUrl}`) return Vue.prototype.$fetch(`${getBannerListUrl}`, json)
}; };
// 添加banner // 添加banner
const addBannerUrl = `${_baseUrl}api/admin/banner/add`; const addBannerUrl = `${_baseUrl}api/admin/banner/add`;
......
...@@ -295,7 +295,7 @@ export default [ ...@@ -295,7 +295,7 @@ export default [
} }
}, },
{ {
value:'管理员操作日志', value:'操作日志',
routerName:'adminLog', routerName:'adminLog',
path:'/adminLog', path:'/adminLog',
cover:'8-5', cover:'8-5',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment