玩家查询、商业信息查询
This commit is contained in:
parent
a32a4e4e39
commit
41ee9ada74
26
src/api/nft.js
Normal file
26
src/api/nft.js
Normal file
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取用户信息
|
||||
export function getOrderInfo(data, cursor, pagesize) {
|
||||
return request({
|
||||
url: '/nft/orderquery?cursor=' + cursor + '&page_size=' + pagesize,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getSaleInfo(data, cursor, pagesize) {
|
||||
return request({
|
||||
url: '/nft/salequery?cursor=' + cursor + '&page_size=' + pagesize,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getNFTInfo(data, cursor, pagesize) {
|
||||
return request({
|
||||
url: '/nft/nftquery?cursor=' + cursor + '&page_size=' + pagesize,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
26
src/api/player.js
Normal file
26
src/api/player.js
Normal file
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取用户信息
|
||||
export function getPlayerInfo(data, cursor, pagesize) {
|
||||
return request({
|
||||
url: '/player/info?cursor=' + cursor + '&page_size=' + pagesize,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getPlayerBag(data, cursor, pagesize) {
|
||||
return request({
|
||||
url: '/player/bagquery?cursor=' + cursor + '&page_size=' + pagesize,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getPlayerHeroes(data, cursor, pagesize) {
|
||||
return request({
|
||||
url: '/player/heroesquery?cursor=' + cursor + '&page_size=' + pagesize,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
12
src/main.js
12
src/main.js
@ -54,3 +54,15 @@ new Vue({
|
||||
i18n,
|
||||
render: h => h(App)
|
||||
})
|
||||
|
||||
Vue.directive('table-scroll-load', {
|
||||
bind(el, binding) {
|
||||
const selectWrap = el.querySelector('.el-table__body-wrapper')
|
||||
selectWrap.addEventListener('scroll', function() {
|
||||
// 判断是否滚动到底部
|
||||
if (this.clientHeight + this.scrollTop + 3 >= this.scrollHeight) {
|
||||
binding.value()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
@ -161,8 +161,65 @@ export const constantRoutes = [
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
}, {
|
||||
path: '/player',
|
||||
component: Layout,
|
||||
redirect: '/index',
|
||||
meta: {
|
||||
title: '玩家信息查询',
|
||||
icon: 'user'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'info',
|
||||
component: () => import('@/views/player/info'),
|
||||
name: 'playerinfo',
|
||||
meta: { title: '玩家查询' },
|
||||
hidden: false
|
||||
}, {
|
||||
path: 'bagquery',
|
||||
component: () => import('@/views/player/bagquery'),
|
||||
name: 'bagquery',
|
||||
meta: { title: '玩家背包查询' },
|
||||
hidden: false
|
||||
}, {
|
||||
path: 'heroesquery',
|
||||
component: () => import('@/views/player/heroesquery'),
|
||||
name: 'heroesquery',
|
||||
meta: { title: '玩家英雄查询' },
|
||||
hidden: false
|
||||
}
|
||||
]
|
||||
}, {
|
||||
path: '/nft',
|
||||
component: Layout,
|
||||
redirect: '/index',
|
||||
meta: {
|
||||
title: '商业信息查询',
|
||||
icon: 'shopping'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'orderquery',
|
||||
component: () => import('@/views/nft/orderquery'),
|
||||
name: 'orderquery',
|
||||
meta: { title: '订单查询' },
|
||||
hidden: false
|
||||
}, {
|
||||
path: 'salequery',
|
||||
component: () => import('@/views/nft/salequery'),
|
||||
name: 'salequery',
|
||||
meta: { title: '售卖查询' },
|
||||
hidden: false
|
||||
}, {
|
||||
path: 'nftquery',
|
||||
component: () => import('@/views/nft/nftquery'),
|
||||
name: 'nftquery',
|
||||
meta: { title: 'NFT查询' },
|
||||
hidden: false
|
||||
}
|
||||
]
|
||||
}, {
|
||||
path: '*', // 匹配未定义的路由
|
||||
redirect: '/404'// 重定向
|
||||
}
|
||||
|
14
src/utils/directive/index.js
Normal file
14
src/utils/directive/index.js
Normal file
@ -0,0 +1,14 @@
|
||||
import { StreamPagination } from './streampagination'
|
||||
|
||||
const directive = {
|
||||
StreamPagination
|
||||
}
|
||||
|
||||
export default {
|
||||
install(app) {
|
||||
// 注册指令
|
||||
Object.keys(directive).forEach(key => {
|
||||
app.directive(key, directive[key])
|
||||
})
|
||||
}
|
||||
}
|
274
src/views/nft/nftquery.vue
Normal file
274
src/views/nft/nftquery.vue
Normal file
@ -0,0 +1,274 @@
|
||||
<template>
|
||||
<div class="createPost-container">
|
||||
<el-form ref="postForm" :model="postForm" :rules="rules" class="form-container">
|
||||
<div class="createPost-main-container">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item label-width="120px" label="所有者地址:" class="postInfo-container-item" prop="owner_address">
|
||||
<el-input v-model="postForm.owner_address" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label-width="120px" label="上一个所有者:" class="postInfo-container-item" prop="last_owner_address">
|
||||
<el-input v-model="postForm.last_owner_address" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label-width="120px" label="net_id:" class="postInfo-container-item" prop="net_id">
|
||||
<el-input v-model.number="postForm.net_id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-button style="margin-left: 10px;" type="success" @click="submitForm()">
|
||||
查询
|
||||
</el-button>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-table-scroll-load="nextStream"
|
||||
:empty-text="emptytext"
|
||||
height="400"
|
||||
:data="NFTList"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-table-column
|
||||
prop="idx"
|
||||
label="ID"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="owner_address"
|
||||
label="所有者地址"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="creator_address"
|
||||
label="创建者"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="token_id"
|
||||
label="token_id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="token_type"
|
||||
label="nft类型 1:英雄 2:枪支 3:芯片 6:荣誉 7:徽章"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="token_state"
|
||||
label="0:正常状态 1:出售中 2:出租中"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="item_id"
|
||||
label="道具id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="deleted"
|
||||
label="deleted"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="confirm_count"
|
||||
label="confirm_count"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="confirm_block_number"
|
||||
label="confirm_block_number"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="tags"
|
||||
label="tags"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="net_id"
|
||||
label="net_id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="contract_address"
|
||||
label="contract_address"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="createtime"
|
||||
label="创建时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="modifytime"
|
||||
label="修改时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="last_owner_address"
|
||||
label="上一个所有者"
|
||||
width="100"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getNFTInfo } from '@/api/nft'
|
||||
|
||||
const pagesize = 10
|
||||
|
||||
export default {
|
||||
name: 'NFT',
|
||||
data() {
|
||||
var validatequery = (rule, value, callback) => {
|
||||
if (!this.postForm.owner_address && !this.postForm.last_owner_address && !this.postForm.net_id) {
|
||||
callback(new Error('请至少填写一项'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
var number_validatequery = (rule, value, callback) => {
|
||||
if (!this.postForm.owner_address && !this.postForm.last_owner_address) {
|
||||
if (!value) {
|
||||
callback(new Error('请至少填写一项'))
|
||||
} else {
|
||||
var num = Number(value)
|
||||
if (isNaN(num)) {
|
||||
callback(new Error('请填写数字'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
postForm: {
|
||||
owner_address: '',
|
||||
last_owner_address: '',
|
||||
net_id: ''
|
||||
},
|
||||
rules: {
|
||||
owner_address: [{ required: false, validator: validatequery, trigger: 'blur' }],
|
||||
last_owner_address: [{ required: false, validator: validatequery, trigger: 'blur' }],
|
||||
net_id: [{ required: false, validator: number_validatequery, trigger: 'blur' }]
|
||||
},
|
||||
emptytext: ' ',
|
||||
NFTList: [],
|
||||
cursor: 0,
|
||||
remaining: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
console.log('valid begin')
|
||||
try {
|
||||
this.$refs['postForm'].validate((valid) => {
|
||||
console.log('valid end', valid)
|
||||
if (valid) {
|
||||
const querydata = JSON.parse(JSON.stringify(this.postForm))
|
||||
console.log('querydata:', querydata)
|
||||
if (querydata.net_id === '') {
|
||||
querydata.net_id = 0
|
||||
}
|
||||
getNFTInfo(querydata, 0, pagesize).then(response => {
|
||||
if (response.code === 0) {
|
||||
console.log('response', response)
|
||||
this.NFTList = response.data
|
||||
this.cursor = response.page.next_cursor
|
||||
this.remaining = response.page.remaining
|
||||
if (this.NFTList === undefined || this.NFTList.length <= 0) {
|
||||
this.emptytext = 'No data'
|
||||
}
|
||||
this.$message({
|
||||
message: '收到回应',
|
||||
type: 'success',
|
||||
duration: 1200,
|
||||
onClose: () => {
|
||||
// this.$router.push('index')
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log('error', error)
|
||||
})
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
nextStream() {
|
||||
if (this.remaining > 0) {
|
||||
this.remaining = 0
|
||||
const querydata = JSON.parse(JSON.stringify(this.postForm))
|
||||
console.log('next querydata:', querydata)
|
||||
if (querydata.net_id === '') {
|
||||
querydata.net_id = 0
|
||||
}
|
||||
getNFTInfo(querydata, this.cursor, pagesize).then(response => {
|
||||
if (response.code === 0) {
|
||||
console.log('next response', response)
|
||||
this.NFTList = this.NFTList.concat(response.data)
|
||||
this.cursor = response.page.next_cursor
|
||||
this.remaining = response.page.remaining
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/styles/mixin.scss";
|
||||
|
||||
.createPost-container {
|
||||
position: relative;
|
||||
|
||||
.createPost-main-container {
|
||||
padding: 40px 45px 20px 50px;
|
||||
|
||||
.postInfo-container {
|
||||
position: relative;
|
||||
@include clearfix;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.postInfo-container-item {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.word-counter {
|
||||
width: 40px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.article-textarea ::v-deep {
|
||||
textarea {
|
||||
padding-right: 40px;
|
||||
resize: none;
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
border-bottom: 1px solid #bfcbd9;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
284
src/views/nft/orderquery.vue
Normal file
284
src/views/nft/orderquery.vue
Normal file
@ -0,0 +1,284 @@
|
||||
<template>
|
||||
<div class="createPost-container">
|
||||
<el-form ref="postForm" :model="postForm" :rules="rules" class="form-container">
|
||||
<div class="createPost-main-container">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item label-width="120px" label="订单ID:" class="postInfo-container-item" prop="order_id">
|
||||
<el-input v-model="postForm.order_id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label-width="120px" label="合约地址:" class="postInfo-container-item" prop="contract_address">
|
||||
<el-input v-model="postForm.contract_address" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label-width="120px" label="Token_id:" class="postInfo-container-item" prop="token_id">
|
||||
<el-input v-model="postForm.token_id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-button style="margin-left: 10px;" type="success" @click="submitForm()">
|
||||
查询
|
||||
</el-button>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-table-scroll-load="nextStream"
|
||||
:empty-text="emptytext"
|
||||
height="400"
|
||||
:data="orderList"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-table-column
|
||||
prop="idx"
|
||||
label="ID"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="order_id"
|
||||
label="订单ID"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="chain"
|
||||
label="chain"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="status"
|
||||
label="状态"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="net_id"
|
||||
label="net_id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="token_id"
|
||||
label="Token_id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="contract_address"
|
||||
label="合约地址"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="item_id"
|
||||
label="物品ID"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="hero_quality"
|
||||
label="英雄品质"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="price"
|
||||
label="价格"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="start_time"
|
||||
label="开始时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="end_time"
|
||||
label="结束时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="created_at"
|
||||
label="created_at"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="updated_at"
|
||||
label="updated_at"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="event_id"
|
||||
label="事件id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="event_data"
|
||||
label="事件内容"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="createtime"
|
||||
label="创建时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="modifytime"
|
||||
label="修改时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="src_price_exchange_rate"
|
||||
label="src_price_exchange_rate"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="src_price_amount"
|
||||
label="src_price_amount"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="src_price_item_type"
|
||||
label="src_price_item_type"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="src_price_contract_address"
|
||||
label="src_price_contract_address"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="price_len"
|
||||
label="price_len"
|
||||
width="100"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getOrderInfo } from '@/api/nft'
|
||||
|
||||
const pagesize = 10
|
||||
|
||||
export default {
|
||||
name: 'Order',
|
||||
data() {
|
||||
var validatequery = (rule, value, callback) => {
|
||||
if (!this.postForm.order_id && !this.postForm.contract_address && !this.postForm.token_id) {
|
||||
callback(new Error('请至少填写一项'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
postForm: {
|
||||
order_id: '',
|
||||
contract_address: '',
|
||||
token_id: ''
|
||||
},
|
||||
rules: {
|
||||
order_id: [{ required: false, validator: validatequery, trigger: 'blur' }],
|
||||
contract_address: [{ required: false, validator: validatequery, trigger: 'blur' }],
|
||||
token_id: [{ required: false, validator: validatequery, trigger: 'blur' }]
|
||||
},
|
||||
emptytext: ' ',
|
||||
orderList: [],
|
||||
cursor: 0,
|
||||
remaining: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
console.log('valid begin')
|
||||
try {
|
||||
this.$refs['postForm'].validate((valid) => {
|
||||
console.log('valid end', valid)
|
||||
if (valid) {
|
||||
const querydata = JSON.parse(JSON.stringify(this.postForm))
|
||||
getOrderInfo(querydata, 0, pagesize).then(response => {
|
||||
if (response.code === 0) {
|
||||
console.log('response', response)
|
||||
this.orderList = response.data
|
||||
if (this.orderList === undefined || this.orderList.length <= 0) {
|
||||
this.emptytext = 'No data'
|
||||
}
|
||||
this.cursor = response.page.next_cursor
|
||||
this.remaining = response.page.remaining
|
||||
this.$message({
|
||||
message: '收到回应',
|
||||
type: 'success',
|
||||
duration: 1200,
|
||||
onClose: () => {
|
||||
// this.$router.push('index')
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log('error', error)
|
||||
})
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
nextStream() {
|
||||
if (this.remaining > 0) {
|
||||
this.remaining = 0
|
||||
const querydata = JSON.parse(JSON.stringify(this.postForm))
|
||||
getOrderInfo(querydata, this.cursor, pagesize).then(response => {
|
||||
if (response.code === 0) {
|
||||
console.log('next response', response)
|
||||
this.orderList = this.orderList.concat(response.data)
|
||||
this.cursor = response.page.next_cursor
|
||||
this.remaining = response.page.remaining
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/styles/mixin.scss";
|
||||
|
||||
.createPost-container {
|
||||
position: relative;
|
||||
|
||||
.createPost-main-container {
|
||||
padding: 40px 45px 20px 50px;
|
||||
|
||||
.postInfo-container {
|
||||
position: relative;
|
||||
@include clearfix;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.postInfo-container-item {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.word-counter {
|
||||
width: 40px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.article-textarea ::v-deep {
|
||||
textarea {
|
||||
padding-right: 40px;
|
||||
resize: none;
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
border-bottom: 1px solid #bfcbd9;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
246
src/views/nft/salequery.vue
Normal file
246
src/views/nft/salequery.vue
Normal file
@ -0,0 +1,246 @@
|
||||
<template>
|
||||
<div class="createPost-container">
|
||||
<el-form ref="postForm" :model="postForm" :rules="rules" class="form-container">
|
||||
<div class="createPost-main-container">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item label-width="120px" label="订单ID:" class="postInfo-container-item" prop="order_id">
|
||||
<el-input v-model="postForm.order_id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label-width="120px" label="买家:" class="postInfo-container-item" prop="buyer">
|
||||
<el-input v-model="postForm.buyer" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label-width="120px" label="卖家:" class="postInfo-container-item" prop="seller">
|
||||
<el-input v-model="postForm.seller" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-button style="margin-left: 10px;" type="success" @click="submitForm()">
|
||||
查询
|
||||
</el-button>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-table-scroll-load="nextStream"
|
||||
:empty-text="emptytext"
|
||||
height="400"
|
||||
:data="saleList"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-table-column
|
||||
prop="idx"
|
||||
label="ID"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="order_id"
|
||||
label="订单ID"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="chain"
|
||||
label="chain"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="net_id"
|
||||
label="net_id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="token_id"
|
||||
label="token_id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="contract_address"
|
||||
label="合约地址"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="buyer"
|
||||
label="buyer"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="seller"
|
||||
label="seller"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="item_id"
|
||||
label="物品ID"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="hero_quality"
|
||||
label="hero_quality"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="price"
|
||||
label="price"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Indexed_at"
|
||||
label="Indexed_at"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="event_id"
|
||||
label="事件id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="event_data"
|
||||
label="事件内容"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="createtime"
|
||||
label="创建时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="modifytime"
|
||||
label="修改时间"
|
||||
width="100"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSaleInfo } from '@/api/nft'
|
||||
|
||||
const pagesize = 10
|
||||
|
||||
export default {
|
||||
name: 'Sale',
|
||||
data() {
|
||||
var validatequery = (rule, value, callback) => {
|
||||
if (!this.postForm.order_id && !this.postForm.buyer && !this.postForm.seller) {
|
||||
callback(new Error('请至少填写一项'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
postForm: {
|
||||
order_id: '',
|
||||
buyer: '',
|
||||
seller: ''
|
||||
},
|
||||
rules: {
|
||||
order_id: [{ required: false, validator: validatequery, trigger: 'blur' }],
|
||||
buyer: [{ required: false, validator: validatequery, trigger: 'blur' }],
|
||||
seller: [{ required: false, validator: validatequery, trigger: 'blur' }]
|
||||
},
|
||||
emptytext: ' ',
|
||||
saleList: [],
|
||||
cursor: 0,
|
||||
remaining: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
console.log('valid begin')
|
||||
try {
|
||||
this.$refs['postForm'].validate((valid) => {
|
||||
console.log('valid end', valid)
|
||||
if (valid) {
|
||||
const querydata = JSON.parse(JSON.stringify(this.postForm))
|
||||
getSaleInfo(querydata, 0, pagesize).then(response => {
|
||||
if (response.code === 0) {
|
||||
console.log('response', response)
|
||||
this.saleList = response.data
|
||||
if (this.saleList === undefined || this.saleList.length <= 0) {
|
||||
this.emptytext = 'No data'
|
||||
}
|
||||
this.cursor = response.page.next_cursor
|
||||
this.remaining = response.page.remaining
|
||||
this.$message({
|
||||
message: '收到回应',
|
||||
type: 'success',
|
||||
duration: 1200
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log('error', error)
|
||||
})
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
nextStream() {
|
||||
if (this.remaining > 0) {
|
||||
this.remaining = 0
|
||||
const querydata = JSON.parse(JSON.stringify(this.postForm))
|
||||
getSaleInfo(querydata, this.cursor, pagesize).then(response => {
|
||||
if (response.code === 0) {
|
||||
console.log('next response', response)
|
||||
this.saleList = this.saleList.concat(response.data)
|
||||
this.cursor = response.page.next_cursor
|
||||
this.remaining = response.page.remaining
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/styles/mixin.scss";
|
||||
|
||||
.createPost-container {
|
||||
position: relative;
|
||||
|
||||
.createPost-main-container {
|
||||
padding: 40px 45px 20px 50px;
|
||||
|
||||
.postInfo-container {
|
||||
position: relative;
|
||||
@include clearfix;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.postInfo-container-item {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.word-counter {
|
||||
width: 40px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.article-textarea ::v-deep {
|
||||
textarea {
|
||||
padding-right: 40px;
|
||||
resize: none;
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
border-bottom: 1px solid #bfcbd9;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
210
src/views/player/bagquery.vue
Normal file
210
src/views/player/bagquery.vue
Normal file
@ -0,0 +1,210 @@
|
||||
<template>
|
||||
<div class="createPost-container">
|
||||
<el-form ref="postForm" :model="postForm" :rules="rules" class="form-container">
|
||||
<div class="createPost-main-container">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item label-width="120px" label="账号id:" class="postInfo-container-item" prop="account_id">
|
||||
<el-input v-model="postForm.account_id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-button style="margin-left: 10px;" type="success" @click="submitForm()">
|
||||
查询
|
||||
</el-button>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-table-scroll-load="nextStream"
|
||||
:empty-text="emptytext"
|
||||
height="400"
|
||||
:data="bagitemList"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-table-column
|
||||
prop="idx"
|
||||
label="ID"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="token_id"
|
||||
label="token_id"
|
||||
width="70"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="account_id"
|
||||
label="用户id"
|
||||
width="150"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="item_id"
|
||||
label="物品id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="item_num"
|
||||
label="物品数量"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="rand_attr"
|
||||
label="随机属性"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="today_get_gold"
|
||||
label="今日获得金币"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="last_get_gold_time"
|
||||
label="最后获得金币时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="createtime"
|
||||
label="创建时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="modifytime"
|
||||
label="修改时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="is_old"
|
||||
label="0:展示红点 1:不用展示"
|
||||
width="100"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPlayerBag } from '@/api/player'
|
||||
|
||||
const pagesize = 10
|
||||
|
||||
export default {
|
||||
name: 'PlayerBag',
|
||||
data() {
|
||||
var validatequery = (rule, value, callback) => {
|
||||
if (!this.postForm.account_id) {
|
||||
callback(new Error('请填写玩家账号id'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
postForm: {
|
||||
account_id: ''
|
||||
},
|
||||
rules: {
|
||||
account_id: [{ required: true, validator: validatequery, trigger: 'blur' }]
|
||||
},
|
||||
emptytext: ' ',
|
||||
bagitemList: [],
|
||||
cursor: 0,
|
||||
remaining: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
console.log('valid begin')
|
||||
try {
|
||||
this.$refs['postForm'].validate((valid) => {
|
||||
console.log('valid end', valid)
|
||||
if (valid) {
|
||||
const querydata = JSON.parse(JSON.stringify(this.postForm))
|
||||
getPlayerBag(querydata, 0, pagesize).then(response => {
|
||||
if (response.code === 0) {
|
||||
console.log('response', response)
|
||||
this.bagitemList = response.data
|
||||
if (this.bagitemList === undefined || this.bagitemList.length <= 0) {
|
||||
this.emptytext = 'No data'
|
||||
}
|
||||
this.cursor = response.page.next_cursor
|
||||
this.remaining = response.page.remaining
|
||||
this.$message({
|
||||
message: '收到回应',
|
||||
type: 'success',
|
||||
duration: 1200,
|
||||
onClose: () => {
|
||||
// this.$router.push('index')
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log('error', error)
|
||||
})
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
nextStream() {
|
||||
if (this.remaining > 0) {
|
||||
this.remaining = 0
|
||||
const querydata = JSON.parse(JSON.stringify(this.postForm))
|
||||
getPlayerBag(querydata, this.cursor, pagesize).then(response => {
|
||||
if (response.code === 0) {
|
||||
console.log('next response', response)
|
||||
this.bagitemList = this.bagitemList.concat(response.data)
|
||||
this.cursor = response.page.next_cursor
|
||||
this.remaining = response.page.remaining
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/styles/mixin.scss";
|
||||
|
||||
.createPost-container {
|
||||
position: relative;
|
||||
|
||||
.createPost-main-container {
|
||||
padding: 40px 45px 20px 50px;
|
||||
|
||||
.postInfo-container {
|
||||
position: relative;
|
||||
@include clearfix;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.postInfo-container-item {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.word-counter {
|
||||
width: 40px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.article-textarea ::v-deep {
|
||||
textarea {
|
||||
padding-right: 40px;
|
||||
resize: none;
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
border-bottom: 1px solid #bfcbd9;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
345
src/views/player/heroesquery.vue
Normal file
345
src/views/player/heroesquery.vue
Normal file
@ -0,0 +1,345 @@
|
||||
<template>
|
||||
<div class="createPost-container">
|
||||
<el-form ref="postForm" :model="postForm" :rules="rules" class="form-container">
|
||||
<div class="createPost-main-container">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item label-width="120px" label="账号id:" class="postInfo-container-item" prop="account_id">
|
||||
<el-input v-model="postForm.account_id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-button style="margin-left: 10px;" type="success" @click="submitForm()">
|
||||
查询
|
||||
</el-button>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-table-scroll-load="nextStream"
|
||||
:empty-text="emptytext"
|
||||
height="400"
|
||||
:data="heroes"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-table-column
|
||||
prop="idx"
|
||||
label="ID"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="token_id"
|
||||
label="token_id"
|
||||
width="70"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="account_id"
|
||||
label="用户id"
|
||||
width="150"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="hero_id"
|
||||
label="英雄id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="hero_tili"
|
||||
label="英雄体力"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="state"
|
||||
label="状态"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="skin_id"
|
||||
label="皮肤id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="hero_lv"
|
||||
label="英雄等级"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="quality"
|
||||
label="品阶"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="skill_lv1"
|
||||
label="必杀技等级"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="skill_lv2"
|
||||
label="躲避技能等级"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="try_count"
|
||||
label="剩余体验次数"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="advanced_count"
|
||||
label="进阶次数"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="lock_type"
|
||||
label="0:无锁 1:升级 2:升阶 3:悬赏"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="unlock_time"
|
||||
label="解锁时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="unlock_trade_time"
|
||||
label="出售解锁时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="rand_attr"
|
||||
label="随机属性"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="today_get_gold"
|
||||
label="今日获得金币"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="last_get_gold_time"
|
||||
label="最后获得金币时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="today_pve_get_ceg"
|
||||
label="pve金币"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="last_pve_get_ceg_time"
|
||||
label="最后获得pve金币时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="today_mission_get_ceg"
|
||||
label="悬赏任务获得金币"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="last_mission_get_ceg_time"
|
||||
label="最后获得悬赏任务金币时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="createtime"
|
||||
label="创建时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="modifytime"
|
||||
label="修改时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="chip_ids"
|
||||
label="已镶嵌的芯片idx组"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Skill_common"
|
||||
label="通用技能"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="skill_points"
|
||||
label="技能点"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="labour"
|
||||
label="劳力值"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="active_token_id"
|
||||
label="active_token_id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="active_count"
|
||||
label="active_count"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="active"
|
||||
label="是否激活 1:已初始激活"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="wealth_attr"
|
||||
label="财富值属性"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="activate_time"
|
||||
label="激活时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="seal_type"
|
||||
label="0:未封存 1:已封存"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="unseal_time"
|
||||
label="解封时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="is_old"
|
||||
label="0:展示红点 1:不用展示"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="on_chain_time"
|
||||
label="上链时间"
|
||||
width="100"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPlayerHeroes } from '@/api/player'
|
||||
|
||||
const pagesize = 10
|
||||
|
||||
export default {
|
||||
name: 'Heroes',
|
||||
data() {
|
||||
var validatequery = (rule, value, callback) => {
|
||||
if (!this.postForm.account_id) {
|
||||
callback(new Error('请填写玩家账号id'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
postForm: {
|
||||
account_id: ''
|
||||
},
|
||||
rules: {
|
||||
account_id: [{ required: true, validator: validatequery, trigger: 'blur' }]
|
||||
},
|
||||
emptytext: ' ',
|
||||
heroes: [],
|
||||
cursor: 0,
|
||||
remaining: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
console.log('valid begin')
|
||||
try {
|
||||
this.$refs['postForm'].validate((valid) => {
|
||||
console.log('valid end', valid)
|
||||
if (valid) {
|
||||
const querydata = JSON.parse(JSON.stringify(this.postForm))
|
||||
getPlayerHeroes(querydata, 0, pagesize).then(response => {
|
||||
if (response.code === 0) {
|
||||
console.log('response', response)
|
||||
this.heroes = response.data
|
||||
if (this.heroes === undefined || this.heroes.length <= 0) {
|
||||
this.emptytext = 'No data'
|
||||
}
|
||||
this.cursor = response.page.next_cursor
|
||||
this.remaining = response.page.remaining
|
||||
this.$message({
|
||||
message: '收到回应',
|
||||
type: 'success',
|
||||
duration: 1200,
|
||||
onClose: () => {
|
||||
// this.$router.push('index')
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log('error', error)
|
||||
})
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
nextStream() {
|
||||
if (this.remaining > 0) {
|
||||
this.remaining = 0
|
||||
const querydata = JSON.parse(JSON.stringify(this.postForm))
|
||||
getPlayerHeroes(querydata, this.cursor, pagesize).then(response => {
|
||||
if (response.code === 0) {
|
||||
console.log('next response', response)
|
||||
this.heroes = this.heroes.concat(response.data)
|
||||
this.cursor = response.page.next_cursor
|
||||
this.remaining = response.page.remaining
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/styles/mixin.scss";
|
||||
|
||||
.createPost-container {
|
||||
position: relative;
|
||||
|
||||
.createPost-main-container {
|
||||
padding: 40px 45px 20px 50px;
|
||||
|
||||
.postInfo-container {
|
||||
position: relative;
|
||||
@include clearfix;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.postInfo-container-item {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.word-counter {
|
||||
width: 40px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.article-textarea ::v-deep {
|
||||
textarea {
|
||||
padding-right: 40px;
|
||||
resize: none;
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
border-bottom: 1px solid #bfcbd9;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
379
src/views/player/info.vue
Normal file
379
src/views/player/info.vue
Normal file
@ -0,0 +1,379 @@
|
||||
<template>
|
||||
<div class="createPost-container">
|
||||
<el-form ref="postForm" :model="postForm" :rules="rules" class="form-container">
|
||||
<div class="createPost-main-container">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item label-width="120px" label="玩家名字:" class="postInfo-container-item" prop="playername">
|
||||
<el-input v-model="postForm.playername" />
|
||||
<el-checkbox v-model="postForm.accurate_name" label="accurate_name">
|
||||
精确匹配
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label-width="120px" label="账号id:" class="postInfo-container-item" prop="account_id">
|
||||
<el-input v-model="postForm.account_id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label-width="120px" label="钱包地址:" class="postInfo-container-item" prop="address">
|
||||
<el-input v-model="postForm.address" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-button style="margin-left: 10px;" type="success" @click="submitForm()">
|
||||
查询
|
||||
</el-button>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-table-scroll-load="nextStream"
|
||||
:empty-text="emptytext"
|
||||
height="400"
|
||||
:data="playerList"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-table-column
|
||||
prop="idx"
|
||||
label="ID"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="account_id"
|
||||
label="用户id"
|
||||
width="150"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="channel"
|
||||
label="渠道id"
|
||||
width="70"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="用户名"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="sex"
|
||||
label="性别"
|
||||
width="50"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="head_id"
|
||||
label="头像id"
|
||||
width="70"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="head_frame"
|
||||
label="头像框id"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="level"
|
||||
label="等级"
|
||||
width="50"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="exp"
|
||||
label="经验"
|
||||
width="50"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="rank"
|
||||
label="段位"
|
||||
width="50"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="history_best_rank"
|
||||
label="历史最高段位"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="score"
|
||||
label="积分"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="history_best_score"
|
||||
label="历史最高积分"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="elo"
|
||||
label="隐藏elo积分"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="bceg"
|
||||
label="治理代币"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="gold"
|
||||
label="金币"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="diamond"
|
||||
label="钻石"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="hero_id"
|
||||
label="当前上阵英雄id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="first_fight"
|
||||
label="是否首战"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="last_season_id"
|
||||
label="最后一次赛季id"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="activated"
|
||||
label="是否已激活"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="rename_count"
|
||||
label="改名次数"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="activatetime"
|
||||
label="激活时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="already_guide"
|
||||
label="已引导"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="pve_instance_id"
|
||||
label="已过pve副本id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="like_count"
|
||||
label="被点赞次数"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="head_list"
|
||||
label="拥有的头像列表"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="head_frame_list"
|
||||
label="拥有的头像框列表"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="consume_gold"
|
||||
label="消费金币数"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="score_modifytime"
|
||||
label="积分修改时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="best_rank_modifytime"
|
||||
label="积分修改次数"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="createtime"
|
||||
label="创建时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="last_login_time"
|
||||
label="上次登录时间"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="is_gain_item"
|
||||
label="是否获取免费item道具"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="guild_id"
|
||||
label="工会id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="guild_job"
|
||||
label="工会职位"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="guild_name"
|
||||
label="工会名称"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ring_id"
|
||||
label="戒指id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="parachute"
|
||||
label="降落伞id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="star_num"
|
||||
label="星星数(成长任务)"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="钱包地址"
|
||||
width="100"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPlayerInfo } from '@/api/player'
|
||||
|
||||
const pagesize = 10
|
||||
|
||||
export default {
|
||||
name: 'Player',
|
||||
data() {
|
||||
var validatequery = (rule, value, callback) => {
|
||||
if (!this.postForm.playername && !this.postForm.account_id && !this.postForm.address) {
|
||||
callback(new Error('请至少填写一项'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
postForm: {
|
||||
playername: '',
|
||||
accurate_name: false,
|
||||
account_id: '',
|
||||
address: ''
|
||||
},
|
||||
rules: {
|
||||
playername: [{ required: false, validator: validatequery, trigger: 'blur' }],
|
||||
accurate_name: [{ required: false, message: '', trigger: 'blur' }],
|
||||
account_id: [{ required: false, validator: validatequery, trigger: 'blur' }],
|
||||
address: [{ required: false, validator: validatequery, trigger: 'blur' }]
|
||||
},
|
||||
emptytext: ' ',
|
||||
playerList: [],
|
||||
cursor: 0,
|
||||
remaining: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
console.log('valid begin')
|
||||
try {
|
||||
this.$refs['postForm'].validate((valid) => {
|
||||
console.log('valid end', valid)
|
||||
if (valid) {
|
||||
const querydata = JSON.parse(JSON.stringify(this.postForm))
|
||||
getPlayerInfo(querydata, 0, pagesize).then(response => {
|
||||
if (response.code === 0) {
|
||||
console.log('response', response)
|
||||
this.playerList = response.data
|
||||
if (this.playerList === undefined || this.playerList.length <= 0) {
|
||||
this.emptytext = 'No data'
|
||||
}
|
||||
this.cursor = response.page.next_cursor
|
||||
this.remaining = response.page.remaining
|
||||
this.$message({
|
||||
message: '收到回应',
|
||||
type: 'success',
|
||||
duration: 1200,
|
||||
onClose: () => {
|
||||
// this.$router.push('index')
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log('error', error)
|
||||
})
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
nextStream() {
|
||||
if (this.remaining > 0) {
|
||||
this.remaining = 0
|
||||
const querydata = JSON.parse(JSON.stringify(this.postForm))
|
||||
getPlayerInfo(querydata, this.cursor, pagesize).then(response => {
|
||||
if (response.code === 0) {
|
||||
console.log('next response', response)
|
||||
this.playerList = this.playerList.concat(response.data)
|
||||
this.cursor = response.page.next_cursor
|
||||
this.remaining = response.page.remaining
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/styles/mixin.scss";
|
||||
|
||||
.createPost-container {
|
||||
position: relative;
|
||||
|
||||
.createPost-main-container {
|
||||
padding: 40px 45px 20px 50px;
|
||||
|
||||
.postInfo-container {
|
||||
position: relative;
|
||||
@include clearfix;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.postInfo-container-item {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.word-counter {
|
||||
width: 40px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.article-textarea ::v-deep {
|
||||
textarea {
|
||||
padding-right: 40px;
|
||||
resize: none;
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
border-bottom: 1px solid #bfcbd9;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
Loading…
x
Reference in New Issue
Block a user