mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-14 20:30:04 +08:00
提现功能
This commit is contained in:
@@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user