提现功能

This commit is contained in:
admin-lmm
2023-08-01 14:29:32 +08:00
parent 24557e62ff
commit 020453d744
2 changed files with 26 additions and 4 deletions

View File

@@ -64,3 +64,12 @@ export function updateAdapayMember(data) {
data: data data: data
}) })
} }
// 提现金额接口
export function withdraw(data) {
return request({
url: '/adapay/member/drawCash',
method: 'post',
data: data
})
}

View File

@@ -129,7 +129,7 @@
</p> </p>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false">提交</el-button> <el-button type="primary" @click="submit">提交</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@@ -137,7 +137,7 @@
<script> <script>
import { import {
queryAdapayAccountBalance queryAdapayAccountBalance,withdraw
} from "@/api/adapayMember/adapayMember"; } from "@/api/adapayMember/adapayMember";
export default { export default {
props:['merchantId'], props:['merchantId'],
@@ -175,6 +175,20 @@ export default {
this.buttonBoolean = !this.buttonBoolean; this.buttonBoolean = !this.buttonBoolean;
} }
}, },
// 提现弹窗确定事件
submit(){
let params = {
merchantId: this.merchantId,
cashAmt:this.adapayMember.avlBalance
}
withdraw(params).then((response) =>{
console.log('res 提现金额',response);
if(response.code !== 200) return this.$modal.msgError(response.msg);
this.$modal.msgSuccess("操作成功");
this.getList()
})
this.dialogVisible = false
},
getList() { getList() {
console.log("this.merchantId", this.merchantId); console.log("this.merchantId", this.merchantId);
let param = { let param = {
@@ -183,7 +197,6 @@ export default {
queryAdapayAccountBalance(param).then((response) => { queryAdapayAccountBalance(param).then((response) => {
console.log("查询 queryAdapayAccountBalance", response); console.log("查询 queryAdapayAccountBalance", response);
this.adapayMember = response.data; this.adapayMember = response.data;
}); });
}, },