Commit 3cf2e67e by baihong

用户列表

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