Commit 5ce0342b authored by pengyunqian's avatar pengyunqian

update:新增通过拒绝接口

parent fc39ec07
const WITHDRAWAL_URI = require("../config").WITHDRAWAL_URI; 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 => { ...@@ -36,3 +36,14 @@ exports.getBlackList = async ctx => {
}; };
ctx.body = await req(ctx, opts); 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 ...@@ -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_apply_list`, withdrawal.getApplyList)
router.post(`${API_VERSION}/get_withdrawal_black_list`, withdrawal.getBlackList) router.post(`${API_VERSION}/get_withdrawal_black_list`, withdrawal.getBlackList)
router.post(`${API_VERSION}/get_withdraw_audit`, withdrawal.getWithdrawAudit)
module.exports = router; module.exports = router;
...@@ -281,7 +281,11 @@ ...@@ -281,7 +281,11 @@
</template> </template>
<script> <script>
import Layout from "../layout/index.vue"; import Layout from "../layout/index.vue";
// import { getApplyList, getBlackList } from "@/service/Withdrawal/withdrawal"; import {
getApplyList,
getBlackList,
getWithdrawAudit,
} from "@/service/Withdrawal/withdrawal";
export default { export default {
name: "Audit", name: "Audit",
components: { Layout }, components: { Layout },
...@@ -317,10 +321,10 @@ export default { ...@@ -317,10 +321,10 @@ export default {
}, },
// 黑名单 // 黑名单
blackList: { blackList: {
user_id:'', user_id: "",
wallet_id:'', wallet_id: "",
is_freezing: 0, is_freezing: 0,
opt_desc: '' opt_desc: "",
}, },
award: "", //奖励明细 award: "", //奖励明细
outerVisible: false, //外层弹框 outerVisible: false, //外层弹框
...@@ -342,11 +346,11 @@ export default { ...@@ -342,11 +346,11 @@ export default {
this.outerVisible = true; this.outerVisible = true;
}, },
// 二次确认弹框 // 二次确认弹框
handleButtonlist(action, url, params) { handleConfirm(action, url, params) {
const urlObj = { const urlObj = {
// 黑名单: getBlackList, 黑名单: getBlackList,
// "通过":, 通过: getWithdrawAudit,
// "拒绝" 拒绝: getWithdrawAudit,
}; };
this.$confirm(`<p>你确定此操作吗</p><p>${action}</p>`, "再次确认", { this.$confirm(`<p>你确定此操作吗</p><p>${action}</p>`, "再次确认", {
confirmButtonText: "取消", confirmButtonText: "取消",
...@@ -367,53 +371,57 @@ export default { ...@@ -367,53 +371,57 @@ export default {
console.log(error); console.log(error);
} }
this.$message({ this.$message({
type: "success", type: "info",
message: "操作成功", message: "已取消操作",
}); });
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({
type: "info", type: "success",
message: "已取消操作", message: "操作成功",
}); });
}); });
}, },
//获取黑名单 //获取黑名单
handleBlackList() { handleBlackList() {
// const {user_id,wallet_id,is_freezing} = this.blackList const { user_id, wallet_id } = this.dialogData.showData;
// const blackList= { const params = {
// user_id, user_id,
// wallet_id, wallet_id,
// is_freezing, is_freezing: 1,
// opt_desc opt_desc: "",
// } };
// // try { this.handleConfirm("黑名单", params);
},
// // } catch (error) { // 通过 & 拒绝
handleAdoptList() {
// // } const { withdraw_apply_id } =this.dialogData.showData;
// handleButtonlist('黑名单', blackList) const params = {
withdraw_apply_id,
withdraw_apply_status: 1,
};
this.handleConfirm("确定", params);
}, },
// 获取提现审核列表 // 获取提现审核列表
// async getApplyList() { async getApplyList() {
// this.loading = true; this.loading = true;
// // setTimeout(() => { // setTimeout(() => {
// // this.loading = false; // this.loading = false;
// // }, 2000); // }, 2000);
// console.log(this.searchProps); console.log(this.searchProps);
// try { try {
// const res = await getApplyList(this.searchProps); const res = await getApplyList(this.searchProps);
// if (res.code !== 0) return this.$message.error(res.reason); if (res.code !== 0) return this.$message.error(res.reason);
// console.log("提现列表", res); console.log("提现列表", res);
// this.goodsList = res.result.list; this.goodsList = res.result.list;
// this.count = res.result.count; this.count = res.result.count;
// this.loading = false; this.loading = false;
// } catch (error) { } catch (error) {
// this.loading = false; this.loading = false;
// console.error(error); console.error(error);
// } }
// }, },
}, },
}; };
</script> </script>
......
...@@ -15,5 +15,9 @@ export async function getApplyList () { ...@@ -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})}); const res = await axios.post("/api/v1/get_withdrawal_black_list" ,{params: getParams({user_id,wallet_id,is_freezing})});
return res; 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