mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-04-25 07:57:18 +08:00
feat: 用户信息接口对接
This commit is contained in:
parent
46c6aec0b8
commit
0cbf62ad20
121
src/api/basic.ts
121
src/api/basic.ts
@ -34,16 +34,18 @@ export type CurrentDayData = {
|
|||||||
data: Array<dailyData>
|
data: Array<dailyData>
|
||||||
}
|
}
|
||||||
|
|
||||||
interface OHistoricalData {
|
interface IHistoricalData {
|
||||||
play_account: number
|
user_name: string
|
||||||
register_account: number
|
register_account: number
|
||||||
active_account: number
|
active_account: number
|
||||||
channel: string
|
channel: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type HistoricalData = {
|
export type HistoricalData = {
|
||||||
success: boolean
|
count: number
|
||||||
data: Array<OHistoricalData>
|
data: {
|
||||||
|
list: Array<IHistoricalData>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 当日用户数据 */
|
/** 当日用户数据 */
|
||||||
@ -75,3 +77,114 @@ export const getUserData = (data?: object) => {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// export type IGameInfo = {
|
||||||
|
// uid?: string
|
||||||
|
// play: string //总玩牌局数
|
||||||
|
// totalhands: string //总手数
|
||||||
|
// r_in: string //入池率
|
||||||
|
// r_win: string //入池胜率
|
||||||
|
// r_fc: string //翻牌前
|
||||||
|
// r_ds: string //3bet率
|
||||||
|
// r_jin: string //激进度
|
||||||
|
// r_sd: string //摊牌率
|
||||||
|
// r_100hands: string //百手盈利
|
||||||
|
// totalwin: string //总盈利
|
||||||
|
// }
|
||||||
|
export interface IGameInfo {
|
||||||
|
uid: number
|
||||||
|
cb: string
|
||||||
|
rDs: string
|
||||||
|
rD3b: string
|
||||||
|
rFbt: number
|
||||||
|
rFc: string
|
||||||
|
rRuwin: string
|
||||||
|
rSd: string
|
||||||
|
rSf: string
|
||||||
|
r100hands: number
|
||||||
|
rSdw: string
|
||||||
|
rRuTimes: number
|
||||||
|
'3b': string
|
||||||
|
play: number
|
||||||
|
rCh: string
|
||||||
|
rJin: string
|
||||||
|
totalwin: string
|
||||||
|
rRu: string
|
||||||
|
totalbuyin: number
|
||||||
|
utime: string
|
||||||
|
bmaxlose: number
|
||||||
|
hmaxwin: number
|
||||||
|
rWin: string
|
||||||
|
maxcard: string
|
||||||
|
bmaxwin: number
|
||||||
|
totalhands: number
|
||||||
|
rIn: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GameInfo {
|
||||||
|
ploFive: IGameInfo
|
||||||
|
ploSix: IGameInfo
|
||||||
|
omaha: IGameInfo
|
||||||
|
texas: IGameInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
export type IUserInfo = {
|
||||||
|
data: {
|
||||||
|
base_info: {}
|
||||||
|
game_info: GameInfo
|
||||||
|
join_club_list?: any[]
|
||||||
|
create_club_list?: any[]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export interface BaseInfo {
|
||||||
|
lastName: string
|
||||||
|
uid: number
|
||||||
|
registerChannel: string
|
||||||
|
user_phone: string
|
||||||
|
street: string
|
||||||
|
postalCode: string
|
||||||
|
enterCount: number
|
||||||
|
gbgCheck: string
|
||||||
|
isHideFlag: number
|
||||||
|
city: string
|
||||||
|
firstName: string
|
||||||
|
houseNumber: string
|
||||||
|
enterTime: number
|
||||||
|
playTime: number
|
||||||
|
user_name: string
|
||||||
|
channel: string
|
||||||
|
scrapAmount: number
|
||||||
|
diamond: number
|
||||||
|
regTime: number
|
||||||
|
birthday: number
|
||||||
|
remarks: string
|
||||||
|
nationality: string
|
||||||
|
usersig: string
|
||||||
|
nickname: string
|
||||||
|
createGroupLimit: number
|
||||||
|
icon: string
|
||||||
|
regIp: string
|
||||||
|
identityCard: string
|
||||||
|
country: string
|
||||||
|
gender: number
|
||||||
|
userCategory: number
|
||||||
|
user_email: string
|
||||||
|
}
|
||||||
|
|
||||||
|
type Result = {
|
||||||
|
code: number
|
||||||
|
data?: {
|
||||||
|
/** 列表数据 */
|
||||||
|
base_info: BaseInfo
|
||||||
|
create_club_list: Array<any>
|
||||||
|
join_club_list: Array<any>
|
||||||
|
game_info: GameInfo
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/** 搜索用户 基本信息 */
|
||||||
|
export const getUserInfo = (data?: object) => {
|
||||||
|
console.log('_', data)
|
||||||
|
return http.request<Result>('post', baseUrlApi('/cms/user/info'), {
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -31,29 +31,69 @@ export default {
|
|||||||
{
|
{
|
||||||
path: '/basic/queryUser',
|
path: '/basic/queryUser',
|
||||||
name: 'QueryUser',
|
name: 'QueryUser',
|
||||||
component: () => import('@/views/basic/queryUser/queryUser.vue'),
|
redirect: '/basic/queryUser/index',
|
||||||
|
// component: () => import('@/views/basic/queryUser/components/empty.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: $t('menus.searchUser')
|
// title: $t('menus.searchUser'),
|
||||||
}
|
title: '搜索用户1'
|
||||||
},
|
},
|
||||||
{
|
children: [
|
||||||
path: '/basic/queryUser/users/:id',
|
{
|
||||||
name: 'UserInfo',
|
path: '/basic/queryUser/index',
|
||||||
component: () => import('@/views/basic/queryUser/user/index.vue'),
|
name: 'QueryUser',
|
||||||
meta: {
|
component: () => import('@/views/basic/queryUser/queryUser.vue'),
|
||||||
title: '用户信息',
|
meta: {
|
||||||
showLink: false
|
// title: $t('menus.searchUser')
|
||||||
}
|
title: '搜索用户2'
|
||||||
},
|
}
|
||||||
{
|
},
|
||||||
path: '/basic/queryUser/users/:id/basicInfo',
|
{
|
||||||
name: 'UserBasicInfo',
|
path: '/basic/queryUser/users/',
|
||||||
component: () => import('@/views/basic/queryUser/user/basicInfo.vue'),
|
name: 'UserInformation',
|
||||||
meta: {
|
component: () => import('@/views/basic/queryUser/user/index.vue'),
|
||||||
title: '基础信息',
|
meta: {
|
||||||
showLink: false
|
title: '用户信息q',
|
||||||
}
|
showLink: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/basic/queryUser/users-params/:id',
|
||||||
|
name: 'UserInformation2',
|
||||||
|
component: () => import('@/views/basic/queryUser/user/index2.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '用户信息p',
|
||||||
|
showLink: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/basic/queryUser/users/:id/basicInfo',
|
||||||
|
name: 'UserBasicInfo',
|
||||||
|
component: () => import('@/views/basic/queryUser/user/basicInfo.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '基础信息',
|
||||||
|
showLink: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// path: '/basic/queryUser/users/:id',
|
||||||
|
// name: 'UserInfo',
|
||||||
|
// component: () => import('@/views/basic/queryUser/user/index.vue'),
|
||||||
|
// meta: {
|
||||||
|
// title: '用户信息',
|
||||||
|
// showLink: false
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/basic/queryUser/users/:id/basicInfo',
|
||||||
|
// name: 'UserBasicInfo',
|
||||||
|
// component: () => import('@/views/basic/queryUser/user/basicInfo.vue'),
|
||||||
|
// meta: {
|
||||||
|
// title: '基础信息',
|
||||||
|
// showLink: false
|
||||||
|
// }
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
path: '/basic/gameData',
|
path: '/basic/gameData',
|
||||||
name: 'GameData',
|
name: 'GameData',
|
||||||
|
@ -58,7 +58,7 @@ const defaultConfig: AxiosRequestConfig = {
|
|||||||
tz_name: 'Asia%2FShanghai',
|
tz_name: 'Asia%2FShanghai',
|
||||||
tz_delta: 'GMT%2B8'
|
tz_delta: 'GMT%2B8'
|
||||||
},
|
},
|
||||||
request: { method: 'sysversion%23getsysversion' },
|
request: { method: 'sysversion%23getsysversion', ...data },
|
||||||
public: {
|
public: {
|
||||||
channel: 'POKIO_H5_NORMAL',
|
channel: 'POKIO_H5_NORMAL',
|
||||||
version: 1311,
|
version: 1311,
|
||||||
|
9
src/views/basic/queryUser/components/empty.vue
Normal file
9
src/views/basic/queryUser/components/empty.vue
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<template>
|
||||||
|
<router-view />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
defineOptions({ name: 'Empty' })
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
@ -72,6 +72,8 @@ export function useUser() {
|
|||||||
function onSearchHistory() {
|
function onSearchHistory() {
|
||||||
console.log('onSearchHistory1', form.dateRange)
|
console.log('onSearchHistory1', form.dateRange)
|
||||||
console.log('onSearchHistory2', form.dateRange[0])
|
console.log('onSearchHistory2', form.dateRange[0])
|
||||||
|
loading.value = false
|
||||||
|
|
||||||
getHistoricalData({
|
getHistoricalData({
|
||||||
start_date: form.dateRange[0],
|
start_date: form.dateRange[0],
|
||||||
end_date: form.dateRange[1]
|
end_date: form.dateRange[1]
|
||||||
|
@ -15,7 +15,7 @@ export function useDetail() {
|
|||||||
// 保存信息到标签页
|
// 保存信息到标签页
|
||||||
useMultiTagsStoreHook().handleTags('push', {
|
useMultiTagsStoreHook().handleTags('push', {
|
||||||
path: `/basic/queryUser/users/`,
|
path: `/basic/queryUser/users/`,
|
||||||
name: 'UserInfo',
|
name: 'UserInformation',
|
||||||
query: { id: String(index) },
|
query: { id: String(index) },
|
||||||
meta: {
|
meta: {
|
||||||
title: {
|
title: {
|
||||||
@ -27,11 +27,11 @@ export function useDetail() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 路由跳转
|
// 路由跳转
|
||||||
router.push({ name: 'TabQueryDetail', query: { id: String(index) } })
|
router.push({ name: 'UserInformation', query: { id: String(index) } })
|
||||||
} else {
|
} else {
|
||||||
useMultiTagsStoreHook().handleTags('push', {
|
useMultiTagsStoreHook().handleTags('push', {
|
||||||
path: `/basic/queryUser/users/:id`,
|
path: `/basic/queryUser/users-params/:id`,
|
||||||
name: 'UserInfo',
|
name: 'UserInformation2',
|
||||||
params: { id: String(index) },
|
params: { id: String(index) },
|
||||||
meta: {
|
meta: {
|
||||||
title: {
|
title: {
|
||||||
@ -40,7 +40,7 @@ export function useDetail() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
router.push({ name: 'UserInfo', params: { id: String(index) } })
|
router.push({ name: 'UserInformation2', params: { id: String(index) } })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ defineOptions({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const { toDetail, router } = useDetail()
|
const { toDetail, router } = useDetail()
|
||||||
|
console.log('router:', router)
|
||||||
|
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const { form, historicalData, historicalColumns, loading, onSearchUser } =
|
const { form, historicalData, historicalColumns, loading, onSearchUser } =
|
||||||
@ -25,67 +26,63 @@ const { form, historicalData, historicalColumns, loading, onSearchUser } =
|
|||||||
<span class="font-medium"> 搜索用户 </span>
|
<span class="font-medium"> 搜索用户 </span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div>
|
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:inline="true"
|
:inline="true"
|
||||||
:model="form"
|
:model="form"
|
||||||
class="bg-bg_color w-[99/100]"
|
class="bg-bg_color w-[99/100]"
|
||||||
>
|
>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.username"
|
v-model="form.username"
|
||||||
placeholder="用户名"
|
placeholder="用户名"
|
||||||
clearable
|
clearable
|
||||||
class="!w-[160px]"
|
class="!w-[160px]"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="mobile">
|
<el-form-item prop="mobile">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.mobile"
|
v-model="form.mobile"
|
||||||
placeholder="手机号码"
|
placeholder="手机号码"
|
||||||
clearable
|
clearable
|
||||||
class="!w-[160px]"
|
class="!w-[160px]"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="email">
|
<el-form-item prop="email">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.email"
|
v-model="form.email"
|
||||||
placeholder="邮箱"
|
placeholder="邮箱"
|
||||||
clearable
|
clearable
|
||||||
class="!w-[200px]"
|
class="!w-[200px]"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="dateRange">
|
<el-form-item prop="dateRange">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.dateRange"
|
v-model="form.dateRange"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
range-separator="To"
|
range-separator="To"
|
||||||
start-placeholder="Start date"
|
start-placeholder="Start date"
|
||||||
end-placeholder="End date"
|
end-placeholder="End date"
|
||||||
format="YYYY/MM/DD"
|
format="YYYY/MM/DD"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
:icon="useRenderIcon(Search)"
|
:icon="useRenderIcon(Search)"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@click="onSearchUser"
|
@click="onSearchUser"
|
||||||
>
|
>
|
||||||
搜索
|
搜索
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
|
||||||
<pure-table :data="historicalData" :columns="historicalColumns" border />
|
<pure-table :data="historicalData" :columns="historicalColumns" border />
|
||||||
<!-- <el-button>
|
|
||||||
<router-link :to="{ name: 'UserInfo', params: { id: 12318 } }"
|
<!-- <div class="flex flex-wrap items-center">
|
||||||
>User</router-link
|
|
||||||
>
|
|
||||||
</el-button> -->
|
|
||||||
<div class="flex flex-wrap items-center">
|
|
||||||
<p>params传参模式:</p>
|
<p>params传参模式:</p>
|
||||||
<el-button
|
<el-button
|
||||||
class="m-2"
|
class="m-2"
|
||||||
@ -95,6 +92,17 @@ const { form, historicalData, historicalColumns, loading, onSearchUser } =
|
|||||||
>
|
>
|
||||||
打开{{ index }}详情页
|
打开{{ index }}详情页
|
||||||
</el-button>
|
</el-button>
|
||||||
|
</div> -->
|
||||||
|
<div class="flex flex-wrap items-center">
|
||||||
|
<p>query传参模式:</p>
|
||||||
|
<el-button
|
||||||
|
class="m-2"
|
||||||
|
v-for="index in 6"
|
||||||
|
:key="index"
|
||||||
|
@click="toDetail(index, 'query')"
|
||||||
|
>
|
||||||
|
打开{{ index }}详情页
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
@ -10,7 +10,7 @@ export function useUser() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所属俱乐部',
|
label: '所属俱乐部',
|
||||||
prop: 'club_name'
|
prop: 'first_joined_club'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '注册渠道',
|
label: '注册渠道',
|
||||||
@ -18,7 +18,7 @@ export function useUser() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '绑定手机/邮箱',
|
label: '绑定手机/邮箱',
|
||||||
prop: 'mobile'
|
prop: 'user_email/user_phone'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '注册IP及归属地',
|
label: '注册IP及归属地',
|
||||||
@ -26,11 +26,11 @@ export function useUser() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '最后登录',
|
label: '最后登录',
|
||||||
prop: 'last_login_date'
|
prop: 'enter_time'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '最后登录IP及归属地',
|
label: '最后登录IP及归属地',
|
||||||
prop: 'last_area'
|
prop: 'login_ip'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -47,10 +47,14 @@ export function useUser() {
|
|||||||
function onSearchUser() {
|
function onSearchUser() {
|
||||||
console.log(form.dateRange)
|
console.log(form.dateRange)
|
||||||
console.log(form.dateRange[0])
|
console.log(form.dateRange[0])
|
||||||
getUserData({ date: form }).then(res => {
|
getUserData({ date: form })
|
||||||
historicalData.value = res.data
|
.then(res => {
|
||||||
loading.value = false
|
historicalData.value = res.data.list
|
||||||
})
|
loading.value = false
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// const resetHistoryForm = formEl => {
|
// const resetHistoryForm = formEl => {
|
||||||
|
@ -1,135 +1,116 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>基础信息-{{ id }}-{{ props.uid }}</div>
|
<div>基础信息-{{ id }}-{{ props.uid }}</div>
|
||||||
<el-divider />
|
<el-divider />
|
||||||
<div>
|
<div class="grid grid-cols-12">
|
||||||
<div>
|
<div class="col-span-1 flex flex-col items-center justify-center">
|
||||||
<el-avatar
|
<el-avatar :size="60" :src="pageData.base_info['icon']" />
|
||||||
class="float-left"
|
<el-button size="small" class="icon-avatar-change">修改</el-button>
|
||||||
:size="60"
|
|
||||||
src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<el-descriptions class="ml-21">
|
|
||||||
<el-descriptions-item label="用户名">kooriookami</el-descriptions-item>
|
<el-descriptions class="col-span-10">
|
||||||
<el-descriptions-item label="钻石">kooriookami</el-descriptions-item>
|
<el-descriptions-item label="用户名">{{
|
||||||
<el-descriptions-item label="国家">kooriookami</el-descriptions-item>
|
pageData.base_info['user_name']
|
||||||
<el-descriptions-item label="绑定手机">18100000000</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="绑定邮箱">Suzhou</el-descriptions-item>
|
<el-descriptions-item label="钻石">{{
|
||||||
<el-descriptions-item label="Remarks">
|
pageData.base_info.diamond
|
||||||
<el-tag size="small">School</el-tag>
|
}}</el-descriptions-item>
|
||||||
</el-descriptions-item>
|
<el-descriptions-item label="国家">{{
|
||||||
|
pageData.base_info.country
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="绑定手机">{{
|
||||||
|
pageData.base_info.user_phone
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="绑定邮箱">{{
|
||||||
|
pageData.base_info.user_email
|
||||||
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<el-button>click1</el-button>
|
<el-button>封号</el-button>
|
||||||
<el-button>click2</el-button>
|
<el-button>清除登录限制</el-button>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
<el-divider />
|
<el-divider />
|
||||||
<el-descriptions>
|
|
||||||
<el-descriptions-item label="用户名">kooriookami</el-descriptions-item>
|
<div class="grid grid-cols-2">
|
||||||
<el-descriptions-item label="绑定手机">18100000000</el-descriptions-item>
|
<el-descriptions :column="1">
|
||||||
<el-descriptions-item label="绑定邮箱">Suzhou</el-descriptions-item>
|
<el-descriptions-item
|
||||||
<el-descriptions-item label="Remarks">
|
v-for="(item, i) in loginInfoMap"
|
||||||
<el-tag size="small">School</el-tag>
|
:key="i"
|
||||||
</el-descriptions-item>
|
:label="item.label"
|
||||||
<el-descriptions-item label="Address"
|
>{{ pageData.base_info[item.prop] }}111</el-descriptions-item
|
||||||
>北京的王府井1215</el-descriptions-item
|
>
|
||||||
>
|
</el-descriptions>
|
||||||
</el-descriptions>
|
|
||||||
|
<el-descriptions :column="1">
|
||||||
|
<el-descriptions-item
|
||||||
|
v-for="(item, i) in registerInfoMap"
|
||||||
|
:key="i"
|
||||||
|
:label="item.label"
|
||||||
|
>{{ pageData.base_info[item.prop] }}</el-descriptions-item
|
||||||
|
>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
<el-divider />
|
<el-divider />
|
||||||
<el-descriptions title="俱乐部信息" border />
|
<el-descriptions title="俱乐部信息" border />
|
||||||
<div class="flex justify-between">
|
<div class="grid grid-cols-2 gap-4">
|
||||||
<el-table :data="tableData" border style="width: 47%" table-layout="auto">
|
<pure-table
|
||||||
<el-table-column prop="date" label="Date" width="180" />
|
:data="pageData.create_club_list"
|
||||||
<el-table-column prop="name" label="Name" width="180" />
|
:columns="created_club_columns"
|
||||||
<el-table-column prop="address" label="Address" />
|
border
|
||||||
</el-table>
|
/>
|
||||||
<el-table :data="tableData" border style="width: 47%" table-layout="auto">
|
|
||||||
<el-table-column prop="date" label="Date" width="180" />
|
<pure-table
|
||||||
<el-table-column prop="name" label="Name" width="180" />
|
:data="pageData.join_club_list"
|
||||||
<el-table-column prop="address" label="Address" />
|
:columns="joined_club_columns"
|
||||||
</el-table>
|
border
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-divider />
|
<el-divider />
|
||||||
|
|
||||||
<div class="grid grid-cols-4">
|
<div class="grid grid-cols-4">
|
||||||
<el-descriptions column="1" title="NLH">
|
<el-descriptions :column="1" title="NLH">
|
||||||
<el-descriptions-item label="总玩牌局数"
|
<el-descriptions-item
|
||||||
>kooriookami</el-descriptions-item
|
v-for="(item, i) in gameMap"
|
||||||
>
|
:key="i"
|
||||||
<el-descriptions-item label="总玩牌手数"
|
:label="item.label"
|
||||||
>18100000000</el-descriptions-item
|
>{{ pageData.game_info.omaha[item.prop] }}
|
||||||
>
|
|
||||||
<el-descriptions-item label="入池率">Suzhou</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="入池胜率">
|
|
||||||
<el-tag size="small">School</el-tag>
|
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="翻牌前入池率">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="3bet率">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="激进率">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="摊牌率">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="百手盈利">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="总盈利">1215</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
<el-descriptions :column="1" title="PLO4">
|
<el-descriptions :column="1" title="PLO4">
|
||||||
<el-descriptions-item label="总玩牌局数"
|
<el-descriptions-item
|
||||||
>kooriookami</el-descriptions-item
|
v-for="(item, i) in gameMap"
|
||||||
|
:key="i"
|
||||||
|
:label="item.label"
|
||||||
|
>{{ pageData.game_info.texas[item.prop] }}</el-descriptions-item
|
||||||
>
|
>
|
||||||
<el-descriptions-item label="总玩牌手数"
|
|
||||||
>18100000000</el-descriptions-item
|
|
||||||
>
|
|
||||||
<el-descriptions-item label="入池率">Suzhou</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="入池胜率">
|
|
||||||
<el-tag size="small">School</el-tag>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="翻牌前入池率">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="3bet率">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="激进率">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="摊牌率">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="百手盈利">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="总盈利">1215</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-descriptions :column="1" title="PLO5">
|
<el-descriptions :column="1" title="PLO5">
|
||||||
<el-descriptions-item label="总玩牌局数"
|
<el-descriptions-item
|
||||||
>kooriookami</el-descriptions-item
|
v-for="(item, i) in gameMap"
|
||||||
|
:key="i"
|
||||||
|
:label="item.label"
|
||||||
|
>{{ pageData.game_info.plo_five[item.prop] }}</el-descriptions-item
|
||||||
>
|
>
|
||||||
<el-descriptions-item label="总玩牌手数"
|
|
||||||
>18100000000</el-descriptions-item
|
|
||||||
>
|
|
||||||
<el-descriptions-item label="入池率">Suzhou</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="入池胜率">
|
|
||||||
<el-tag size="small">School</el-tag>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="翻牌前入池率">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="3bet率">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="激进率">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="摊牌率">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="百手盈利">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="总盈利">1215</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-descriptions :column="1" title="PLO6">
|
<el-descriptions :column="1" title="PLO6">
|
||||||
<el-descriptions-item label="总玩牌局数"
|
<el-descriptions-item
|
||||||
>kooriookami</el-descriptions-item
|
v-for="(item, i) in gameMap"
|
||||||
|
:key="i"
|
||||||
|
:label="item.label"
|
||||||
|
>{{ pageData.game_info.plo_six[item.prop] }}</el-descriptions-item
|
||||||
>
|
>
|
||||||
<el-descriptions-item label="总玩牌手数"
|
|
||||||
>18100000000</el-descriptions-item
|
|
||||||
>
|
|
||||||
<el-descriptions-item label="入池率">Suzhou</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="入池胜率">
|
|
||||||
<el-tag size="small">School</el-tag>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="翻牌前入池率">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="3bet率">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="激进率">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="摊牌率">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="百手盈利">1215</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="总盈利">1215</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
|
|
||||||
|
import { getUserInfo } from '@/api/basic'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
// name 作为一种规范最好必须写上并且和路由的name保持一致
|
// name 作为一种规范最好必须写上并且和路由的name保持一致
|
||||||
name: 'BasicInfo'
|
name: 'BasicInfo'
|
||||||
@ -141,28 +122,120 @@ const route = useRoute()
|
|||||||
// const router = useRouter()
|
// const router = useRouter()
|
||||||
const id = route.query?.id ? route.query?.id : route.params?.id
|
const id = route.query?.id ? route.query?.id : route.params?.id
|
||||||
|
|
||||||
const tableData = [
|
const pageData = ref({
|
||||||
|
base_info: {},
|
||||||
|
create_club_list: [],
|
||||||
|
game_info: {
|
||||||
|
omaha: {},
|
||||||
|
texas: {},
|
||||||
|
plo_five: {},
|
||||||
|
plo_six: {}
|
||||||
|
},
|
||||||
|
join_club_list: []
|
||||||
|
})
|
||||||
|
|
||||||
|
// const base_info: any = ref({})
|
||||||
|
// const create_club_list: any = ref([])
|
||||||
|
// const join_club_list: any = ref([])
|
||||||
|
// let game_info: {
|
||||||
|
// omaha: IGameInfo
|
||||||
|
// } = reactive({ omaha: {} })
|
||||||
|
// const { base_info, create_club_list, game_info, join_club_list } = pageData
|
||||||
|
|
||||||
|
// getUserInfo({ uid: 20475 }).then(res => {
|
||||||
|
// console.log('res.data', res.data)
|
||||||
|
// // pageData = res.data
|
||||||
|
// })
|
||||||
|
|
||||||
|
function onSearch() {
|
||||||
|
console.log('onSearch')
|
||||||
|
// loading.value = true
|
||||||
|
getUserInfo({ uid: 20475 }).then(res => {
|
||||||
|
const { data } = res
|
||||||
|
console.log('data-basic', data)
|
||||||
|
pageData.value = data
|
||||||
|
// pageData.base_info = data.base_info
|
||||||
|
// pageData.create_club_list = data.create_club_list
|
||||||
|
// pageData.join_club_list = data.join_club_list
|
||||||
|
// pageData.game_info = data.game_info
|
||||||
|
// const { base_info, create_club_list, join_club_list, game_info } =
|
||||||
|
// toRef(pageData)
|
||||||
|
// console.log('game_info', game_info)
|
||||||
|
// console.log('game_info', game_info.omaha)
|
||||||
|
// const { omaha } = game_info
|
||||||
|
// console.log('uid', game_info.omaha.uid)
|
||||||
|
// setTimeout(() => {
|
||||||
|
// loading.value = false
|
||||||
|
// }, 500)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const created_club_columns: TableColumnList = [
|
||||||
{
|
{
|
||||||
date: '2016-05-03',
|
label: '俱乐部名称(创建)',
|
||||||
name: 'Tom',
|
prop: 'name'
|
||||||
address: 'No. 189, Grove St, Los Angeles'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
date: '2016-05-02',
|
label: '创建时间',
|
||||||
name: 'Tom',
|
prop: 'date'
|
||||||
address: 'No. 189, Grove St, Los Angeles'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
date: '2016-05-04',
|
label: '俱乐部分积分',
|
||||||
name: 'Tom',
|
prop: 'jifen'
|
||||||
address: 'No. 189, Grove St, Los Angeles'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: '2016-05-01',
|
|
||||||
name: 'Tom',
|
|
||||||
address: 'No. 189, Grove St, Los Angeles'
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
const joined_club_columns: TableColumnList = [
|
||||||
|
{
|
||||||
|
label: '俱乐部名称(创建)',
|
||||||
|
prop: 'name'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '创建时间',
|
||||||
|
prop: 'date'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '俱乐部分积分',
|
||||||
|
prop: 'jifen'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
const loginInfoMap = [
|
||||||
|
{ label: '登录渠道', prop: 'channel' },
|
||||||
|
{ label: '登录版本', prop: 'last_login_version' },
|
||||||
|
{ label: '最近登录IP', prop: 'last_login_ip' },
|
||||||
|
{ label: '最近登录IP位置', prop: 'last_login_country' },
|
||||||
|
{ label: '最近登录时间', prop: 'enter_time' },
|
||||||
|
{ label: '最近登录IP设备', prop: 'last_login_device' }
|
||||||
|
]
|
||||||
|
|
||||||
|
const registerInfoMap = [
|
||||||
|
{ label: '注册渠道', prop: 'register_channel' },
|
||||||
|
{ label: '注册版本', prop: '' }, // 先空着
|
||||||
|
{ label: '注册时间', prop: 'reg_time' },
|
||||||
|
{ label: '注册IP', prop: 'reg_ip' },
|
||||||
|
{ label: '注册设备', prop: '' } // 先空着
|
||||||
|
]
|
||||||
|
|
||||||
|
const gameMap = [
|
||||||
|
{ label: '总玩牌手数', prop: 'totalhands' },
|
||||||
|
{ label: '总玩牌局数', prop: 'play' },
|
||||||
|
{ label: '入池率', prop: 'r_in' },
|
||||||
|
{ label: '入池胜率', prop: 'r_win' },
|
||||||
|
{ label: '翻牌前入池率', prop: 'r_fc' },
|
||||||
|
{ label: '3bet率', prop: 'r_ds' },
|
||||||
|
{ label: '激进度', prop: 'r_jin' },
|
||||||
|
{ label: '摊牌度', prop: 'r_sd' },
|
||||||
|
{ label: '百手盈利', prop: 'r_100hands' },
|
||||||
|
{ label: '盈利', prop: 'totalwin' }
|
||||||
|
]
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
onSearch()
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped lang="scss">
|
||||||
|
.icon-avatar-change {
|
||||||
|
margin-top: -8px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -41,11 +41,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-table :data="tableData" stripe border style="width: 100%">
|
<pure-table :data="tableData" :columns="tableRecordColumn" border />
|
||||||
<el-table-column prop="date" label="Date" width="180" />
|
|
||||||
<el-table-column prop="name" label="Name" width="180" />
|
|
||||||
<el-table-column prop="address" label="Address" />
|
|
||||||
</el-table>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="手牌历史" name="second">
|
<el-tab-pane label="手牌历史" name="second">
|
||||||
@ -101,26 +97,56 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
|
|||||||
console.log(tab, event)
|
console.log(tab, event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const tableRecordColumn: TableColumnList = [
|
||||||
|
{
|
||||||
|
label: '时间',
|
||||||
|
prop: 'date'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '级别/玩法',
|
||||||
|
prop: 'club_name'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '牌局名称',
|
||||||
|
prop: 'club_integral'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '创建者',
|
||||||
|
prop: 'club_integral'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '牌局ID',
|
||||||
|
prop: 'club_integral'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '战绩',
|
||||||
|
prop: 'club_integral'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '服务费贡献',
|
||||||
|
prop: 'club_integral'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '保险贡献',
|
||||||
|
prop: 'club_integral'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
const tableData = [
|
const tableData = [
|
||||||
{
|
{
|
||||||
|
club_name: 'Tom-club',
|
||||||
date: '2016-05-03',
|
date: '2016-05-03',
|
||||||
name: 'Tom',
|
club_integral: '299'
|
||||||
address: 'No. 189, Grove St, Los Angeles'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
date: '2016-05-02',
|
club_name: 'Tom-club',
|
||||||
name: 'Tom',
|
date: '2016-05-03',
|
||||||
address: 'No. 189, Grove St, Los Angeles'
|
club_integral: '299'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
date: '2016-05-04',
|
club_name: 'Tom-club',
|
||||||
name: 'Tom',
|
date: '2016-05-03',
|
||||||
address: 'No. 189, Grove St, Los Angeles'
|
club_integral: '299'
|
||||||
},
|
|
||||||
{
|
|
||||||
date: '2016-05-01',
|
|
||||||
name: 'Tom',
|
|
||||||
address: 'No. 189, Grove St, Los Angeles'
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -31,7 +31,8 @@ defineOptions({
|
|||||||
|
|
||||||
const { initToDetail, id } = useDetail()
|
const { initToDetail, id } = useDetail()
|
||||||
|
|
||||||
initToDetail('params')
|
// initToDetail('params')
|
||||||
|
initToDetail('query')
|
||||||
|
|
||||||
const activeName = ref('basicInfo')
|
const activeName = ref('basicInfo')
|
||||||
|
|
||||||
|
69
src/views/basic/queryUser/user/index2.vue
Normal file
69
src/views/basic/queryUser/user/index2.vue
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<template>
|
||||||
|
<el-card>
|
||||||
|
<!-- params 传参的形式,面包屑导航有点问题,先不管,暂时使用 query 形式传参 -->
|
||||||
|
<div>用户信息 列表页面</div>
|
||||||
|
<div>{{ id }} - 详情页内容在此(params传参)</div>
|
||||||
|
<el-tabs v-model="activeName" type="border-card">
|
||||||
|
<el-tab-pane
|
||||||
|
v-for="(_, tab) in tabsMap"
|
||||||
|
:key="tabsMap[tab].name"
|
||||||
|
:name="tabsMap[tab].name"
|
||||||
|
:label="tabsMap[tab].label"
|
||||||
|
/>
|
||||||
|
<!-- <component :is="tabsMap[activeName].component" :uid="id" /> -->
|
||||||
|
</el-tabs>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
import { useDetail } from '../infoHook'
|
||||||
|
import basicInfo from './basicInfo.vue'
|
||||||
|
import gameRecord from './gameRecord.vue'
|
||||||
|
import diamondRecord from './diamondRecord.vue'
|
||||||
|
import loginRecord from './loginRecord.vue'
|
||||||
|
import chatRecord from './chatRecord.vue'
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
// name 作为一种规范最好必须写上并且和路由的name保持一致
|
||||||
|
name: 'UserInformation'
|
||||||
|
})
|
||||||
|
|
||||||
|
const { initToDetail, id } = useDetail()
|
||||||
|
|
||||||
|
initToDetail('params')
|
||||||
|
// initToDetail('query')
|
||||||
|
|
||||||
|
const activeName = ref('basicInfo')
|
||||||
|
|
||||||
|
const tabsMap = {
|
||||||
|
basicInfo: {
|
||||||
|
name: 'basicInfo',
|
||||||
|
label: '用户信息',
|
||||||
|
component: basicInfo
|
||||||
|
},
|
||||||
|
gameRecord: {
|
||||||
|
name: 'gameRecord',
|
||||||
|
label: '游戏记录',
|
||||||
|
component: gameRecord
|
||||||
|
},
|
||||||
|
diamondRecord: {
|
||||||
|
name: 'diamondRecord',
|
||||||
|
label: '钻石记录',
|
||||||
|
component: diamondRecord
|
||||||
|
},
|
||||||
|
loginRecord: {
|
||||||
|
name: 'loginRecord',
|
||||||
|
label: '登录记录',
|
||||||
|
component: loginRecord
|
||||||
|
},
|
||||||
|
chatRecord: {
|
||||||
|
name: 'chatRecord',
|
||||||
|
label: '聊天记录',
|
||||||
|
component: chatRecord
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
@ -46,7 +46,7 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
|
|||||||
proxy: {
|
proxy: {
|
||||||
'^/dev-api/.*': {
|
'^/dev-api/.*': {
|
||||||
// 这里填写后端地址
|
// 这里填写后端地址
|
||||||
target: 'http://192.168.100.87:8000',
|
target: 'http://192.168.100.71:8000',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: path => path.replace(/^\/dev-api/, '')
|
rewrite: path => path.replace(/^\/dev-api/, '')
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user