diff --git a/src/api/user/recharge.js b/src/api/user/recharge.js index 1f09d00..8345601 100644 --- a/src/api/user/recharge.js +++ b/src/api/user/recharge.js @@ -2,7 +2,9 @@ import { axios } from '@/utils/request' // api接口列表 const api = { - order: '/user.recharge/order' + order: '/user.recharge/order', + detail: '/user.recharge/detail', + audit: '/user.recharge/audit' } // 列表记录 @@ -13,3 +15,21 @@ export function order (params) { params }) } + +// 支付订单详情 +export function detail (params) { + return axios({ + url: api.detail, + method: 'get', + params + }) +} + +// 支付订单审核 +export function audit (data) { + return axios({ + url: api.audit, + method: 'post', + data + }) +} \ No newline at end of file diff --git a/src/config/router.config.js b/src/config/router.config.js index 7677ae4..3742f66 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -539,6 +539,12 @@ export const asyncRouterMap = [ component: () => import(/* webpackChunkName: "content" */ '@/views/user/recharge/Index'), meta: { title: '充值记录', keepAlive: false, permission: ['/user/recharge/index'] }, }, + { + path: '/user/recharge/detail', + component: () => import(/* webpackChunkName: "content" */ '@/views/user/recharge/Detail'), + meta: { title: '充值详情', keepAlive: false, permission: ['/user/recharge/detail'] }, + hidden: true, + }, { path: '/user/balance/index', component: () => import(/* webpackChunkName: "content" */ '@/views/user/balance/Index'), diff --git a/src/views/client/h5/Setting.vue b/src/views/client/h5/Setting.vue index fb8de69..a929fe2 100644 --- a/src/views/client/h5/Setting.vue +++ b/src/views/client/h5/Setting.vue @@ -15,7 +15,9 @@ + 复制链接

请填写H5端实际的访问地址,以 @@ -104,8 +106,16 @@ export default { Api.update(this.key, { form: values }) .then(result => this.$message.success(result.message, 1.5)) .finally(() => this.isLoading = false) - } - + }, + // 复制链接地址 + copyLink () { + console.log(this.record); + if (this.record.baseUrl) { + this.$copyText(this.record.baseUrl).then(res => { + this.$message.success('复制成功', 0.8) + }) + } + }, } } diff --git a/src/views/user/recharge/AuditForm.vue b/src/views/user/recharge/AuditForm.vue new file mode 100644 index 0000000..d469127 --- /dev/null +++ b/src/views/user/recharge/AuditForm.vue @@ -0,0 +1,135 @@ + + + + diff --git a/src/views/user/recharge/Detail.vue b/src/views/user/recharge/Detail.vue new file mode 100644 index 0000000..ee6657e --- /dev/null +++ b/src/views/user/recharge/Detail.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/views/user/recharge/Index.vue b/src/views/user/recharge/Index.vue index 5a86db0..ab25f9a 100644 --- a/src/views/user/recharge/Index.vue +++ b/src/views/user/recharge/Index.vue @@ -41,6 +41,7 @@ :columns="columns" :data="loadData" :pagination="pagination" + :scroll="{ x: 1450 }" > @@ -56,10 +57,26 @@ {{ RechargeTypeEnum[text].name }} - - {{ text == 20 ? '已支付' : '待支付' }} + + {{ text == 20 ? '已支付' : '待支付' }} + + + + {{ text == 10 ? '审核通过' : (text == 20 ? '拒绝' : '') }} + + + 详情 + 审核 + @@ -68,12 +85,14 @@ import * as Api from '@/api/user/recharge' import { STable, UserItem } from '@/components/Table' import PayStatusEnum from '@/common/enum/recharge/order/PayStatus' import RechargeTypeEnum from '@/common/enum/recharge/order/RechargeType' +import AuditForm from './AuditForm.vue'; export default { name: 'Index', components: { STable, - UserItem + UserItem, + AuditForm }, data () { return { @@ -95,10 +114,12 @@ export default { { title: '会员信息', dataIndex: 'user', + width: '250px', scopedSlots: { customRender: 'user' } }, { title: '订单号', + width: '150px', dataIndex: 'order_no' }, { @@ -124,13 +145,25 @@ export default { dataIndex: 'pay_status', scopedSlots: { customRender: 'pay_status' } }, + { + title: '审核状态', + dataIndex: 'audit_status', + scopedSlots: { customRender: 'audit_status' } + }, { title: '付款时间', + width: '150px', dataIndex: 'pay_time' }, { title: '创建时间', + width: '150px', dataIndex: 'create_time' + }, + { + title: '操作', + dataIndex: 'actions', + scopedSlots: { customRender: 'actions' } } ], // 加载数据方法 必须为 Promise 对象 @@ -164,8 +197,11 @@ export default { this.handleRefresh(true) } }) - } - + }, + // 审核 + handleAudit(record) { + this.$refs.AuditForm.show(record) + }, } }