Commit 54d766dc authored by 王's avatar

同步最新数据”

parent 51942411
<template>
<div class="user">
<div class="user" v-loading="loading">
<el-form ref="searchFrom" :model="searchFrom" label-width="80px">
<el-row>
<el-col :span="4">
......@@ -24,7 +24,10 @@
</el-col>
<el-col :span="4">
<el-form-item>
<el-button type="primary" plain @click="getUser">搜索</el-button>
<div class="flexRow">
<el-button type="primary" plain @click="getUser">搜索</el-button>
<el-button type="success" plain @click="syncUser">同步最新数据</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
......@@ -71,7 +74,7 @@
</template>
<script>
import {getUserListApi} from "../../service/api";
import {getUserListApi,getSyncUserApi} from "../../service/api";
import page from '../framework/page'
import detailDialog from './detail'
import teacherDialog from './dialog'
......@@ -100,7 +103,8 @@
dialogDetailObj: {
show: false,
id: ''
}
},
loading: false
}
},
components:{
......@@ -162,6 +166,14 @@
},
goToDetail(id){
this.$router.push('/userDetail/'+ id);
},
syncUser(){
this.loading = true
getSyncUserApi().then(()=>{
this.loading = false
}).catch(()=>{
this.loading = false
})
}
}
}
......@@ -182,6 +194,12 @@
text-align: center;
}
}
.flexRow {
display: flex;
flex-flow: row;
justify-content: flex-start;
align-items: center;
}
</style>
<style>
......
......@@ -625,3 +625,8 @@ const getWechatStatisticListUrl = '/api/admin/wechat/statistics';
export const getWechatStatisticListApi = function (json) {
return Vue.prototype.$fetch(getWechatStatisticListUrl,json)
};
// 同步用户手机号
const getSyncUserUrl = '/api/admin/student/mobile';
export const getSyncUserApi = function (json) {
return Vue.prototype.$fetch(getSyncUserUrl,json)
};
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