Commit 5ce0342b authored by pengyunqian's avatar pengyunqian

update:新增通过拒绝接口

parent fc39ec07
const WITHDRAWAL_URI = require("../config").WITHDRAWAL_URI;
const req = require("../utils/request_withdraw").httpReq;
const req = require("../utils/request").httpReq;
/**
* 示例
......@@ -36,3 +36,14 @@ exports.getBlackList = async ctx => {
};
ctx.body = await req(ctx, opts);
};
// 获取通过、拒绝订单审核
exports.getWithdrawAudit = async ctx => {
const url = `${WITHDRAWAL_URI}/wallet/background/withdraw_audit`;
const opts = {
url,
method: "POST",
json:true,
body:ctx.request.body
}
ctx.body = await req(ctx,opts)
}
\ No newline at end of file
......@@ -66,4 +66,6 @@ router.post(`${API_VERSION}/merchant/authority/get_user_info`, user.getUser_deta
// 钱包提现审核
router.post(`${API_VERSION}/get_withdrawal_apply_list`, withdrawal.getApplyList)
router.post(`${API_VERSION}/get_withdrawal_black_list`, withdrawal.getBlackList)
router.post(`${API_VERSION}/get_withdraw_audit`, withdrawal.getWithdrawAudit)
module.exports = router;
......@@ -281,7 +281,11 @@
</template>
<script>
import Layout from "../layout/index.vue";
// import { getApplyList, getBlackList } from "@/service/Withdrawal/withdrawal";
import {
getApplyList,
getBlackList,
getWithdrawAudit,
} from "@/service/Withdrawal/withdrawal";
export default {
name: "Audit",
components: { Layout },
......@@ -317,10 +321,10 @@ export default {
},
// 黑名单
blackList: {
user_id:'',
wallet_id:'',
user_id: "",
wallet_id: "",
is_freezing: 0,
opt_desc: ''
opt_desc: "",
},
award: "", //奖励明细
outerVisible: false, //外层弹框
......@@ -342,11 +346,11 @@ export default {
this.outerVisible = true;
},
// 二次确认弹框
handleButtonlist(action, url, params) {
handleConfirm(action, url, params) {
const urlObj = {
// 黑名单: getBlackList,
// "通过":,
// "拒绝"
黑名单: getBlackList,
通过: getWithdrawAudit,
拒绝: getWithdrawAudit,
};
this.$confirm(`<p>你确定此操作吗</p><p>${action}</p>`, "再次确认", {
confirmButtonText: "取消",
......@@ -367,53 +371,57 @@ export default {
console.log(error);
}
this.$message({
type: "success",
message: "操作成功",
type: "info",
message: "已取消操作",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
type: "success",
message: "操作成功",
});
});
},
//获取黑名单
handleBlackList() {
// const {user_id,wallet_id,is_freezing} = this.blackList
// const blackList= {
// user_id,
// wallet_id,
// is_freezing,
// opt_desc
// }
// // try {
// // } catch (error) {
// // }
// handleButtonlist('黑名单', blackList)
const { user_id, wallet_id } = this.dialogData.showData;
const params = {
user_id,
wallet_id,
is_freezing: 1,
opt_desc: "",
};
this.handleConfirm("黑名单", params);
},
// 通过 & 拒绝
handleAdoptList() {
const { withdraw_apply_id } =this.dialogData.showData;
const params = {
withdraw_apply_id,
withdraw_apply_status: 1,
};
this.handleConfirm("确定", params);
},
// 获取提现审核列表
// async getApplyList() {
// this.loading = true;
// // setTimeout(() => {
// // this.loading = false;
// // }, 2000);
// console.log(this.searchProps);
// try {
// const res = await getApplyList(this.searchProps);
// if (res.code !== 0) return this.$message.error(res.reason);
// console.log("提现列表", res);
// this.goodsList = res.result.list;
// this.count = res.result.count;
// this.loading = false;
// } catch (error) {
async getApplyList() {
this.loading = true;
// setTimeout(() => {
// this.loading = false;
// console.error(error);
// }
// },
// }, 2000);
console.log(this.searchProps);
try {
const res = await getApplyList(this.searchProps);
if (res.code !== 0) return this.$message.error(res.reason);
console.log("提现列表", res);
this.goodsList = res.result.list;
this.count = res.result.count;
this.loading = false;
} catch (error) {
this.loading = false;
console.error(error);
}
},
},
};
</script>
......
......@@ -15,5 +15,9 @@ export async function getApplyList () {
const res = await axios.post("/api/v1/get_withdrawal_black_list" ,{params: getParams({user_id,wallet_id,is_freezing})});
return res;
}
// 获取订单审核--通过,拒绝
export async function getWithdrawAudit ({withdraw_apply_id,withdraw_apply_status}) {
const res = await axios.post("/api/v1/get_withdraw_audit",{params: getParams({withdraw_apply_id,withdraw_apply_status})});
return res;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment