|
|
@@ -56,6 +56,7 @@
|
|
|
<script>
|
|
|
import { userMixin } from 'assets/js/mixin'
|
|
|
import {
|
|
|
+ approveCharge, declineCharge,
|
|
|
getChargeReq, getVipPlan
|
|
|
} from '@/api/admin'
|
|
|
|
|
|
@@ -70,10 +71,16 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
document.title = '站点配置'
|
|
|
+ getVipPlan().then(resp => {
|
|
|
+ if (resp.code === 0) {
|
|
|
+ this.vipPlanList = resp.data
|
|
|
+ } else {
|
|
|
+ this.$message.error(resp.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
this.getData()
|
|
|
},
|
|
|
- mounted() {
|
|
|
- },
|
|
|
methods: {
|
|
|
getData() {
|
|
|
getChargeReq(1).then(resp => {
|
|
|
@@ -83,20 +90,24 @@ export default {
|
|
|
this.$message.error(resp.msg)
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
- getVipPlan().then(resp => {
|
|
|
+ },
|
|
|
+ onApprove(row) {
|
|
|
+ approveCharge(row.chargeId).then(resp => {
|
|
|
if (resp.code === 0) {
|
|
|
- this.vipPlanList = resp.data
|
|
|
+ this.getData()
|
|
|
} else {
|
|
|
this.$message.error(resp.msg)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- onApprove(row) {
|
|
|
- this.$message.info('同意充值 ' + row.chargeId)
|
|
|
- },
|
|
|
onDecline(row) {
|
|
|
- this.$message.info('拒绝充值' + row.chargeId)
|
|
|
+ declineCharge(row.chargeId).then(resp => {
|
|
|
+ if (resp.code === 0) {
|
|
|
+ this.getData()
|
|
|
+ } else {
|
|
|
+ this.$message.error(resp.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|