123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <template>
- <view style="padding: 20rpx;font-size: 30rpx;">
- <view style="background: #fff;padding: 50rpx;border-radius:10rpx;">
- <view style="font-size: 30rpx;font-weight: bold;">转出金额</view>
- <view style="display: table;width: 100%;margin-top: 30rpx;border-bottom: #ececec solid 1rpx;padding-bottom: 30rpx;">
- <view style="float: left;font-size: 50rpx;">¥</view>
- <view><input class="srk" placeholder="输入转账金额" disabled="" v-model="data.price" style="background: #f6f6f6;"/></view>
- </view>
- <view style="padding-top: 20rpx;">可转出余额:¥{{userinfo.lzc}}</view>
- </view>
- <view style="background: #fff;padding: 50rpx;border-radius:10rpx;margin-top: 20rpx;">
- <input class="srk" placeholder="输入交易密码确认" password="true" v-model="data.jymm" style="background: #f6f6f6;margin-top: 20rpx;"/>
- </view>
- <button type="warn" style="margin-top: 40rpx;" @click="add">确认转出到卡单账户</button>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- data: {
- 'sjh': '',
- 'price': '1000',
- 'jymm':''
- },
- userinfo:[]
- }
- },
- methods: {
- MhMyInteger(){
- var data = this.data;
- data.uid=this.userinfo.id;
- this.$api
- .MhPostModel(data, 'user/lzc')
- .then(res => {
- //console.log(44)
- this.userinfo.lzc=res.data.lzc;
- this.userinfo.dsf=res.data.dsf;
- })
- .catch(err => {
- // console.log('request fail', JSON.stringify(err));
- });
- },
- add() {
- if(this.userinfo.lzc<this.data.price){
- uni.showToast({
- title:"账户余额不足",
- icon:"none"
- })
- return;
- }
- var data = this.data;
- data.uid=this.userinfo.id;
- this.$api
- .MhGetModel(data, 'ppb/paylzc_kd')
- .then(res => {
- if(res.data.code==1){
- uni.showToast({
- title:"转出成功",
- icon:"none"
- })
- uni.navigateTo({
- url:"/pages/my/index"
- })
- }else{
- uni.showModal({
- title: '提示',
- content: res.data.msg,
- showCancel:false,
- success: function (res) {
- if (res.confirm) {
-
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- }
- })
- .catch(err => {
- // console.log('request fail', JSON.stringify(err));
- });
- }
- },
- onLoad() {
- var user = this.$api.getUserinfo();
- this.userinfo = user;
- this.MhMyInteger();
- }
- }
- </script>
- <style>
- page {
- padding: 15rpx;
- background: #f2f2f6;
- background-attachment: fixed !important;
- background-repeat: no-repeat !important;
- }
- .srk {
- color: #000;
- height: 80rpx;
- line-height: 80rpx;
- background: #fff;
- border-radius: 10rpx;
- padding-left: 20rpx;
- font-size: 30rpx;
- }
- .tit {
- color: #333;
- height: 60rpx;
- line-height: 60rpx;
- margin-top: 30rpx;
- }
- </style>
|