用工小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

74 lines
1.9 KiB

<template>
<view class="se-m-40">
<u--input v-model="realName" type="text" class="se-bgc-f5 se-fs-32" placeholder="请输入真实姓名">
</u--input>
<u--input v-model="money" type="number" class="se-bgc-f5 se-mt-20 se-fs-32" placeholder="请输入提现金额">
</u--input>
<view class="se-flex se-flex-v se-pb-20 se-mt-80">
<view class="se-ml-10 se-fs-26 se-c-black se-fw-5">
提现说明
</view>
<view class="se-flex se-flex-v se-fs-24 se-c-66 se-mt-30">
<u-parse :content="getValueByName('txsm')"></u-parse>
<!-- <text class="se-hl-50">
1、本次提现必须通过银行卡提现,暂不支持其他途径。</br>
2、如若遇到24小时提现未到账,请联系客服。</br>
3、提现金额至少不能低于300元。
</text> -->
</view>
</view>
<view class="se-pt-80 se-fs-20 se-flex">
<view @click="onWithdrawal"
class="se-mx-10 se-flex-1 se-br-40 se-flex-h-c se-h-80 se-lh-80 se-ta-c se-fs-28 se-c-white se-bgc-orange">
<text>立即提现</text>
</view>
</view>
</view>
</template>
<script>
import {
withdrawal
} from "@/common/api.js"
export default{
props:["userId","myMoney"],
data(){
return{
realName:"",
money:"",
sysList:[]
}
},
mounted() {
this.sysList = uni.getStorageSync('sysList')
},
methods:{
getValueByName(name) {
const item = this.sysList.find((item) => item.name == name);
return item ? item.value : "";
},
onWithdrawal(){
let that = this
let params = {
realName:that.realName,
money:that.money
}
if(!that.money){
return that.$u.toast("请填写金额!")
}
withdrawal(params).then(response=>{
console.info("response",response)
that.money=""
that.$u.toast("申请成功!")
that.$emit("onParent")
}).catch(error=>{
})
}
}
}
</script>
<style>
</style>