tixianPage.vue
5.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<template>
<view class="content">
<image class="bg" src="../../static/bg_img@2x(2).png"></image>
<view class="card">
<view class="title">提现到微信余额(元)</view>
<!-- <view class="money">100.00</view> -->
<input type="digit" v-model="money" class="money" placeholder-style="padding-bottom: 10rpx;color:rgba(189,196,206,1);font-size: 80rpx;margin-top: 16rpx;border-bottom: 1rpx solid rgba(112,112,112,1);">
<view class="text">最多可提{{yue}}元,<text @click="tixianall">全部提现</text></view>
<view class="btn" @click="tixian">提现</view>
</view>
<!-- <view class="textBox">
YHA青年旅舍会员卡(一年)是国际青年旅舍联盟会员身份证明,全球通用,也是旅行者入住青年旅舍的凭证。拥有会员卡,可以享受国内外国际青年旅舍住宿价格的优惠,同时部分海外青年旅舍只允许会员入住。
成为YHA青年旅舍会员的好处:
<view>1)入住青年旅舍享受房价上的优惠;</view>
<view>2)在世界各地享有食、住、行、游、购、娱等逾3,000项优惠,如:在全球多个国际机场和车船站,凭会员卡兑换外币可免收手续费;观光、租车、购物、参团、购买车船票等均可能有折扣,折扣率高达50%。单是在澳大利亚,优惠项目便接近800种;</view>
<view>3)以优惠价格参与多项由青年旅舍举办的各类文化、旅游等方面的交流活动;</view>
<view>4)优先参与青年旅舍组织的国际交流活动。</view>
</view> -->
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
money:'',
yue:''
}
},
methods:{
tixian(){
var that = this
if(that.money==0){
uni.showToast({
title:'提现金额不能为0',
icon:'none'
})
}else{
if(that.money==''){
uni.showToast({
title:"提现金额不能为空",
icon:"none"
})
return false
}
if(that.money>that.yue){
uni.showToast({
title:"提现金额不足",
icon:"none"
})
return false
}
var url = "money/gotMoney"
var token = uni.getStorageSync('token')
var params = {
token:token,
money:that.money
}
app.post(url,params,"post").then((res)=>{
console.log(res)
uni.showToast({
title:'提现成功',
icon:'none'
})
setTimeout(function(){
uni.navigateBack({
checked:true
})
},1500)
}).catch((err)=>{
console.log(err);
uni.showToast({
title:err.msg,
icon:'none',
duration:2500
})
})
}
},
// 全部提现
tixianall(){
let that=this;
if(that.yue==0.00){
uni.showToast({
title:"余额为0,不能提现",
icon:"none"
})
}else{
uni.showModal({
title: '提示',
content: '是否要全部提现',
success: function (res) {
if (res.confirm) {
that.money=that.yue
var url = "money/gotMoney"
var token = uni.getStorageSync('token')
var params = {
token:token,
money:that.yue
}
app.post(url,params,"post").then((res)=>{
console.log(res)
uni.showToast({
title:'提现成功',
icon:'none'
})
setTimeout(function(){
uni.navigateBack({
checked:true
})
},1500)
}).catch((err)=>{
console.log(err);
uni.showToast({
title:err.msg,
icon:'none'
})
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
}
},
onLoad(options){
this.yue=options.money;
this.money=options.money
}
}
</script>
<style lang="less">
.content{
background-color: #F9F9F9;
.bg{
width: 750rpx;
height: 292rpx;
}
.card{
width:686rpx;
height:514rpx;
background:rgba(255,255,255,1);
box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1);
opacity:1;
border-radius:20rpx;
position: absolute;
top: 26rpx;
left: 32rpx;
padding: 68rpx 46rpx 40rpx;
box-sizing: border-box;
color:rgba(6,18,30,1);
.title{
font-size: 28rpx;
}
.money{
color:rgba(189,196,206,1);
font-size: 80rpx;
margin-top: 16rpx;
border-bottom: 1rpx solid rgba(112,112,112,1);
height: 90rpx;
}
.text{
font-size:24rpx;
margin-top: 22rpx;
text{
color: #81C3BF;
}
}
.btn{
width:596rpx;
height:76rpx;
background:rgba(45,85,117,1);
opacity:1;
border-radius:8rpx;
text-align: center;
line-height: 76rpx;
color: #fff;
font-size: 28rpx;
margin-top: 90rpx;
}
}
.textBox{
width:636rpx;
height:586rpx;
font-size:24rpx;
font-family:PingFang SC;
font-weight:400;
line-height:40rpx;
color:rgba(6,18,30,1);
opacity:1;
margin: 0 auto;
margin-top: 274rpx;
}
}
</style>