inapp order query
This commit is contained in:
parent
c3881eb2a1
commit
829e9f96cd
@ -49,6 +49,14 @@ export function getGameMall(data, cursor, pagesize) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getInappOrder(data, cursor, pagesize) {
|
||||
return request({
|
||||
url: '/player/inapporderquery?cursor=' + cursor + '&page_size=' + pagesize,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getRecharge(data, cursor, pagesize) {
|
||||
return request({
|
||||
url: '/player/rechargequery?cursor=' + cursor + '&page_size=' + pagesize,
|
||||
|
@ -282,6 +282,12 @@ export const asyncRoutes = [
|
||||
name: 'gamemallquery',
|
||||
meta: { title: '游戏内商品查询', pername: 'gamemallquery' },
|
||||
hidden: false
|
||||
}, {
|
||||
path: 'inapporderquery',
|
||||
component: () => import('@/views/player/inapporderquery'),
|
||||
name: 'inapporderquery',
|
||||
meta: { title: '游戏内购订单查询', pername: 'inapporderquery' },
|
||||
hidden: false
|
||||
}, {
|
||||
path: 'rechargequery',
|
||||
component: () => import('@/views/player/rechargequery'),
|
||||
|
234
src/views/player/inapporderquery.vue
Normal file
234
src/views/player/inapporderquery.vue
Normal file
@ -0,0 +1,234 @@
|
||||
<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="6">
|
||||
<el-form-item label-width="180px" label="App Store order id:" class="postInfo-container-item" prop="sp_order_id">
|
||||
<el-input v-model="postForm.sp_order_id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="130px" label="account_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="inappOrders"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-table-column
|
||||
prop="order_id"
|
||||
label="订单id"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="sp_order_id"
|
||||
label="App Store order id"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="platform"
|
||||
label="平台"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<svg-icon v-if="scope.row.platform === 1" style="font-size: 20px;color: #4A9FF9" icon-class="Android" />
|
||||
<svg-icon v-if="scope.row.platform === 2" style="font-size: 20px;color: #333333" icon-class="IOS" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="account_id"
|
||||
label="游戏账号id"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="goods_id"
|
||||
label="物品id"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="price"
|
||||
label="价格"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="status"
|
||||
label="状态"
|
||||
width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status === 0" effect="plain" type="">进行中</el-tag>
|
||||
<el-tag v-if="scope.row.status === 1" effect="plain" type="success">成功</el-tag>
|
||||
<el-tag v-if="scope.row.status === 2" effect="plain" type="warning">失败</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createtime"
|
||||
label="创建时间UTC"
|
||||
>
|
||||
<template slot-scope="{row}">
|
||||
<span>
|
||||
{{ parseUTCTime(row.createtime) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="modifytime"
|
||||
label="修改时间UTC"
|
||||
>
|
||||
<template slot-scope="{row}">
|
||||
<span>
|
||||
{{ parseUTCTime(row.modifytime) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getInappOrder } from '@/api/player'
|
||||
import { parseUTCTime } from '@/utils'
|
||||
|
||||
const pagesize = 10
|
||||
|
||||
export default {
|
||||
name: 'InappOrder',
|
||||
data() {
|
||||
var validatequery = (rule, value, callback) => {
|
||||
if (!this.postForm.order_id && !this.postForm.sp_order_id && !this.postForm.account_id) {
|
||||
callback(new Error('请至少填写一项'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
postForm: {
|
||||
order_id: '',
|
||||
sp_order_id: '',
|
||||
account_id: ''
|
||||
},
|
||||
rules: {
|
||||
order_id: [{ required: true, validator: validatequery, trigger: 'blur' }],
|
||||
sp_order_id: [{ required: true, validator: validatequery, trigger: 'blur' }],
|
||||
account_id: [{ required: true, validator: validatequery, trigger: 'blur' }]
|
||||
},
|
||||
emptytext: ' ',
|
||||
inappOrders: [],
|
||||
cursor: 0,
|
||||
remaining: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
parseUTCTime,
|
||||
submitForm() {
|
||||
try {
|
||||
this.$refs['postForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
const querydata = JSON.parse(JSON.stringify(this.postForm))
|
||||
getInappOrder(querydata, 0, pagesize).then(response => {
|
||||
if (response.code === 0) {
|
||||
this.inappOrders = response.data
|
||||
if (this.inappOrders === undefined || this.inappOrders.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))
|
||||
getInappOrder(querydata, this.cursor, pagesize).then(response => {
|
||||
if (response.code === 0) {
|
||||
this.inappOrders = this.inappOrders.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