Commit 3cf2e67e by baihong

用户列表

parent 7c83ca29
...@@ -25,6 +25,10 @@ export const getActivityConfigByPay = (data) => { ...@@ -25,6 +25,10 @@ export const getActivityConfigByPay = (data) => {
export const deleteConfigAward = (data) => { export const deleteConfigAward = (data) => {
return $http.delete('/cms/configs/configAwards/deleteConfigAward?awardId='+data) return $http.delete('/cms/configs/configAwards/deleteConfigAward?awardId='+data)
} }
//用户列表
export const users = (data) => {
return $http.postObj('/cms/sign-in/users', data)
}
//活动规则 //活动规则
export const getActivityConfigRule = (data) => { export const getActivityConfigRule = (data) => {
return $http.get('/cms/configs/getActivityConfigRule', data) return $http.get('/cms/configs/getActivityConfigRule', data)
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<div class="left"> <div class="left">
用户搜索: 用户搜索:
<Input <Input
v-model="keyword"
style="width:200px" style="width:200px"
enter-button enter-button
placeholder="请输入" placeholder="请输入"
...@@ -15,83 +16,98 @@ ...@@ -15,83 +16,98 @@
<Button type="primary">导 出</Button> <Button type="primary">导 出</Button>
</div> </div>
</div> </div>
<Table :loading="$store.state.app.isLoading" border ref="selection" :columns="columns" :data="data"> <Table
<template slot-scope="{ row }" slot="name"> :loading="$store.state.app.isLoading"
<span>{{ row.details.name }}</span> border
</template> ref="selection"
<template slot-scope="{ row }" slot="title"> :columns="columns"
<span>{{ row.details.title }}</span> :data="data"
</template> >
<template slot-scope="{ row }" slot="created_at"> <template slot-scope="{ row }" slot="default_avatar">
<span>{{ row.created_at | format}}</span> <Avatar shape="square" :src='row.default_avatar' size="large" />
</template>
<template slot-scope="{ row }" slot="enable">
<i-switch
:value="row.is_enable === 1 ? true : false"
@on-change="
value => {
change(value, row);
}
"
/>
</template> </template>
<template slot-scope="{ row }" slot="action"> <template slot-scope="{ row }" slot="action">
<a @click="edit(row)">编辑</a> <a @click="goDetail(row)">详情</a>
</template>
<template slot-scope="{ row }" slot="edit">
<a @click="goTheme(row)">编辑</a>
</template> </template>
</Table> </Table>
<Pager
class="margin-top-10"
:config="config"
@on-change="handlePager"
></Pager>
</div> </div>
</template> </template>
<script> <script>
import { getScenes, delScenes, editScenes } from '@/api/scenes' import { users } from "@/api/clock/activityClocks";
import Pager from "@/view/common/Pager.vue";
export default { export default {
name: 'categories', name: "categories",
components: { components: {
Pager
}, },
data () { data() {
return { return {
keyword: "",
config: { total: 0, size: 10, current: 1 },
pageIndex: 1,
pageSize: 10,
data: [], data: [],
columns: [ columns: [
{ {
title: '用户ID', title: "用户ID",
key: 'created_at' key: "user_uuid"
}, },
{ {
title: '头像', title: "头像",
slot: 'name' slot: "default_avatar"
}, },
{ {
title: '姓名', title: "姓名",
slot: 'title' key: "nick_name"
}, },
{ {
title: '手机号', title: "手机号",
key: 'created_at' key: "phone"
}, },
{ {
title: '真我币', title: "真我币",
slot: 'enable' key: "sign_in_score"
}, },
{ {
title: '操作', title: "操作",
slot: 'action' slot: "action"
} }
] ]
} };
}, },
methods: { methods: {
goDetail () { handlePager(pager) {
this.$router.push({ path: '/signIn/detail', query: { id: 'new' } }) this.pageIndex = pager.current;
this.pageSize = pager.size;
this.search();
},
search() {
let params = {
search: this.keyword,
activity_type: 1,
user_uuid:sessionStorage.getItem('admin_uuid'),
page_index: this.pageIndex,
page_size: this.pageSize
};
users(params).then(res => {
this.config.total = res.total;
this.data = res.data;
});
},
goDetail() {
this.$router.push({ path: "/signIn/detail", query: { id: "new" } });
} }
}, },
mounted () { mounted() {
this.search();
} }
} };
</script> </script>
<style lang="less"></style> <style lang="less"></style>
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<div class="left"> <div class="left">
用户搜索: 用户搜索:
<Input <Input
v-model="keyword"
style="width:200px" style="width:200px"
enter-button enter-button
placeholder="请输入" placeholder="请输入"
...@@ -15,83 +16,98 @@ ...@@ -15,83 +16,98 @@
<Button type="primary">导 出</Button> <Button type="primary">导 出</Button>
</div> </div>
</div> </div>
<Table :loading="$store.state.app.isLoading" border ref="selection" :columns="columns" :data="data"> <Table
<template slot-scope="{ row }" slot="name"> :loading="$store.state.app.isLoading"
<span>{{ row.details.name }}</span> border
</template> ref="selection"
<template slot-scope="{ row }" slot="title"> :columns="columns"
<span>{{ row.details.title }}</span> :data="data"
</template> >
<template slot-scope="{ row }" slot="created_at"> <template slot-scope="{ row }" slot="default_avatar">
<span>{{ row.created_at | format}}</span> <Avatar shape="square" :src='row.default_avatar' size="large" />
</template>
<template slot-scope="{ row }" slot="enable">
<i-switch
:value="row.is_enable === 1 ? true : false"
@on-change="
value => {
change(value, row);
}
"
/>
</template> </template>
<template slot-scope="{ row }" slot="action"> <template slot-scope="{ row }" slot="action">
<a @click="edit(row)">编辑</a> <a @click="goDetail(row)">详情</a>
</template>
<template slot-scope="{ row }" slot="edit">
<a @click="goTheme(row)">编辑</a>
</template> </template>
</Table> </Table>
<Pager
class="margin-top-10"
:config="config"
@on-change="handlePager"
></Pager>
</div> </div>
</template> </template>
<script> <script>
import { getScenes, delScenes, editScenes } from '@/api/scenes' import { users } from "@/api/clock/activityClocks";
import Pager from "@/view/common/Pager.vue";
export default { export default {
name: 'categories', name: "categories",
components: { components: {
Pager
}, },
data () { data() {
return { return {
keyword: "",
config: { total: 0, size: 10, current: 1 },
pageIndex: 1,
pageSize: 10,
data: [], data: [],
columns: [ columns: [
{ {
title: '用户ID', title: "用户ID",
key: 'created_at' key: "user_uuid"
}, },
{ {
title: '头像', title: "头像",
slot: 'name' slot: "default_avatar"
}, },
{ {
title: '姓名', title: "姓名",
slot: 'title' key: "nick_name"
}, },
{ {
title: '手机号', title: "手机号",
key: 'created_at' key: "phone"
}, },
{ {
title: '真我币', title: "真我币",
slot: 'enable' key: "sign_in_score"
}, },
{ {
title: '操作', title: "操作",
slot: 'action' slot: "action"
} }
] ]
} };
}, },
methods: { methods: {
goDetail () { handlePager(pager) {
this.$router.push({ path: '/signIn/detail', query: { id: 'new' } }) this.pageIndex = pager.current;
this.pageSize = pager.size;
this.search();
},
search() {
let params = {
search: this.keyword,
activity_type: 2,
user_uuid:sessionStorage.getItem('admin_uuid'),
page_index: this.pageIndex,
page_size: this.pageSize
};
users(params).then(res => {
this.config.total = res.total;
this.data = res.data;
});
},
goDetail() {
this.$router.push({ path: "/signIn/detail", query: { id: "new" } });
} }
}, },
mounted () { mounted() {
this.search();
} }
} };
</script> </script>
<style lang="less"></style> <style lang="less"></style>
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