cash.vue 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. <template>
  2. <view class="main">
  3. <view class="top">
  4. <view class="yue">
  5. <image src="" style="background: #F5CC57;border-radius: 8px;"></image>
  6. <!-- <view class="top" bindtap="goIntegral">提现记录</view> -->
  7. <view class="money">{{promoteInfo.balance}}<text style="font-size:16px;">元</text></view>
  8. <view class="txt">可提现金额</view>
  9. </view>
  10. </view>
  11. <view class="detail">
  12. <view class="input">
  13. <input class="num" placeholder="请输入提现的金额" onblue v-model="amount" style="width: 65%;border:none;margin:0;"></input>
  14. <view class="all" @tap="amount=promoteInfo.balance">全部提现</view>
  15. </view>
  16. <view class="info">
  17. <view class="ttxt">提现基础额为{{configDatas.min_withdraw_amount}}元,手续费{{configDatas.withdraw_ratio}}%</view>
  18. <!-- <view class="ttxt" style="color:#F7A731;">提现将在24小时内到账。</view> -->
  19. <view class="ttxt" style="color:#F7A731;">
  20. <view class="">
  21. 手续费: {{ numFilter(((configDatas.withdraw_ratio/100)*amount)) }}元
  22. </view>
  23. <view class="">
  24. 预计到账金额为: {{numFilter((100-configDatas.withdraw_ratio)/100*amount)}}元
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <!-- <view class="listtx">
  30. <view class="title">选择到账方式:</view>
  31. <view class="chose">
  32. <radio-group class="radio-group" bindchange="radioChange">
  33. <radio class="radio" v-for="( item , index ) in selects" :value="item.index" :checked="item.checked" style="margin:10px 10px;" v-if="item.value==1">
  34. <text>{{item.text}}</text>
  35. </radio>
  36. </radio-group>
  37. </view>
  38. <view class="input" v-if="txway&&txway=='bank'">
  39. <input class="num" placeholder="请输入姓名" bindinput="tixianname" :value="name"></input>
  40. </view>
  41. <view class="input" v-if="txway=='wxtransfer'">
  42. <input class="num" placeholder="请输入微信号" bindinput="tixianweixin" :value="weixin"></input>
  43. </view>
  44. <view class="input" v-if="txway=='aliPay'">
  45. <input class="num" placeholder="请输入支付宝账号" bindinput="tixianali" :value="alipay"></input>
  46. <input class="num" placeholder="请输入支付宝绑定的用户名称" bindinput="tixianaliname" :value="aliname"></input>
  47. </view>
  48. <view class="input" v-if="txway=='bank'">
  49. <input class="num" placeholder="请输入银行卡号" bindinput="tixianbankid" :value="bankid"></input>
  50. <input class="num" placeholder="请输入开户行" bindinput="tixianbank" :value="banks"></input>
  51. </view>
  52. </view> -->
  53. <view class="btn" @click="tixian">提交申请</view>
  54. </view>
  55. </template>
  56. <script>
  57. export default {
  58. data() {
  59. return {
  60. myIntegral: 0,
  61. amount: '',
  62. dian:0,
  63. datas:'',
  64. index:0,
  65. paymethods: [],
  66. currentPay: "",
  67. lessUp: !1,
  68. sending: !1,
  69. disable: !1,
  70. bindedPhone: !1,
  71. list: {},
  72. withdraw: !0,
  73. counttime: 10,
  74. btnState: !1,
  75. focus: !0,
  76. maskModal: !1,
  77. wechatNumber: "",
  78. explain: "",
  79. userInfo:'',
  80. usersi:'',
  81. selects:[
  82. { name: '微信零钱', way: '1', checked: true },
  83. { name: '微信转账', way: '4', checked: false },
  84. { name: '银行卡提现', way: '2', checked: false },
  85. { name: '支付宝提现', way: '3', checked: false },
  86. ],
  87. txway: "wechat",
  88. alipay:'',
  89. name:'',
  90. bankid:'',
  91. weixin: '',
  92. aliname:'',
  93. banks:'',
  94. promoteInfo:{},
  95. configDatas:''
  96. }
  97. },
  98. onLoad() {
  99. this.getPromoteInfo()
  100. },
  101. mounted(){
  102. this.configData()
  103. },
  104. methods: {
  105. numFilter(value){
  106. const realVal = parseFloat(value).toFixed(2);
  107. return realVal;
  108. },
  109. configData: async function() {
  110. let res = await this.$request.post('/api/SystemConfig/getSysteConfig');
  111. console.log(res.data);
  112. if (res.code == 200) {
  113. this.configDatas = res.data;
  114. }
  115. },
  116. getPromoteInfo:async function(){
  117. let res = await this.$request.post('/api/userPromote/promoteInfo',{});
  118. console.log(res)
  119. if(res.code == 200){
  120. this.promoteInfo = res.data
  121. }else {
  122. uni.showToast({
  123. icon: 'none',
  124. title: res.message
  125. });
  126. }
  127. },
  128. tixian:async function(){
  129. if(Number(this.amount) < Number(this.configDatas.min_withdraw_amount)){
  130. uni.showToast({
  131. icon: 'none',
  132. title: '未达最低提现金额,不能提现'
  133. });
  134. return false;
  135. }
  136. if(Number(this.amount) > Number(this.promoteInfo.balance)){
  137. uni.showToast({
  138. icon: 'none',
  139. title: '提现金额不能超过余额'
  140. });
  141. return false;
  142. }
  143. uni.navigateTo({
  144. url: "./bankCard?amount="+this.amount
  145. })
  146. }
  147. }
  148. }
  149. </script>
  150. <style>
  151. .header {
  152. height: 200rpx;
  153. border-bottom: 1rpx solid #e0e0e0;
  154. text-align: center;
  155. position: relative;
  156. box-sizing: border-box;
  157. padding-top: 50rpx;
  158. }
  159. .header:after {
  160. content: '';
  161. position: absolute;
  162. right: 30rpx;
  163. top: 50%;
  164. transform: translateY(-50%) rotate(-45deg);
  165. border-right: 1rpx solid #999;
  166. border-bottom: 1rpx solid #999;
  167. width: 24rpx;
  168. height: 24rpx;
  169. }
  170. .header .tit {
  171. font-size: 26rpx;
  172. color: #999;
  173. margin-bottom: 14rpx;
  174. }
  175. .header .count {
  176. font-size: 45rpx;
  177. line-height: 1;
  178. color: #333;
  179. position: relative;
  180. }
  181. .withdraw_detail {
  182. position: absolute;
  183. top: 10rpx;
  184. left: 30rpx;
  185. color: #f08300;
  186. border: 1rpx solid #f08300;
  187. border-radius: 30rpx;
  188. padding: 4rpx 10rpx;
  189. font-size: 22rpx;
  190. }
  191. .count .sup {
  192. position: absolute;
  193. top: 0;
  194. width: 100%;
  195. left: 0;
  196. color: red;
  197. font-size: 45rpx;
  198. line-break: 1;
  199. font-weight: bold;
  200. animation: buble .8s ease-in-out both;
  201. }
  202. @-webkit-keyframes buble {
  203. 0% {
  204. transform: translateY(0);
  205. opacity: 1;
  206. }
  207. 100% {
  208. transform: translateY(-100rpx);
  209. opacity: 0;
  210. }
  211. }
  212. @keyframes buble {
  213. 0% {
  214. transform: translateY(0);
  215. opacity: 1;
  216. }
  217. 100% {
  218. transform: translateY(-100rpx);
  219. opacity: 0;
  220. }
  221. }
  222. .body {
  223. padding: 30rpx;
  224. margin-bottom: 30rpx;
  225. }
  226. .body .form {
  227. display: flex;
  228. }
  229. .body input {
  230. flex: 2;
  231. vertical-align: middle;
  232. height: 70rpx;
  233. background: #e6e6e6;
  234. border-radius: 50px;
  235. font-size: 26rpx;
  236. display: inline-block;
  237. padding-left: 30rpx;
  238. margin-right: 30rpx;
  239. }
  240. .body .btn-exc {
  241. margin: 0;
  242. flex: 1;
  243. vertical-align: middle;
  244. }
  245. .body .tips {
  246. color: #666;
  247. font-size: 26rpx;
  248. padding-top: 20rpx;
  249. margin-bottom: 30rpx;
  250. }
  251. .body .tips .explain {
  252. color: #f00;
  253. }
  254. .paymethods {
  255. border-top: 1rpx solid #e0e0e0;
  256. padding-top: 30rpx;
  257. color: #666;
  258. }
  259. .paymethods .tit {
  260. margin-bottom: 40rpx;
  261. color: #333;
  262. }
  263. .paymethods .radio {
  264. margin-left: -30rpx;
  265. margin-right: -30rpx;
  266. }
  267. .mask {
  268. width: 100vw;
  269. height: 100vh;
  270. position: fixed;
  271. top: 0;
  272. left: 0;
  273. z-index: 100;
  274. background: rgba(0,0,0,0.3);
  275. display: flex;
  276. justify-content: center;
  277. align-items: center;
  278. }
  279. .mask .mask_box {
  280. background: #fff;
  281. width: 600rpx;
  282. padding: 30rpx;
  283. border-radius: 10rpx;
  284. }
  285. .mask .mask_box .mask_input {
  286. display: flex;
  287. align-items: center;
  288. justify-content: space-between;
  289. }
  290. .mask .mask_box input {
  291. text-align: left;
  292. padding: 20rpx;
  293. width: 410rpx;
  294. }
  295. .top{
  296. width: 100%;
  297. height: auto;
  298. }
  299. .top .yue{
  300. width: 86vw;
  301. height: 43vw;
  302. margin:10px 7vw;
  303. position: relative;
  304. }
  305. .yue image{
  306. width: 100%;
  307. height: 100%;
  308. position: absolute;
  309. top: 0;
  310. left: 0;
  311. z-index: 0;
  312. }
  313. .yue .top{
  314. width: auto;
  315. height: 20px;
  316. line-height: 20px;
  317. position: absolute;
  318. top: 20px;
  319. left: 30px;
  320. color: #fff;
  321. z-index: 1;
  322. font-weight: 300;
  323. }
  324. .yue .money{
  325. width: 100%;
  326. height: 80px;
  327. line-height: 80px;
  328. text-align: center;
  329. color: #fff;
  330. z-index: 1;
  331. font-size: 34px;
  332. position: absolute;
  333. left: 0;
  334. top: 40px;
  335. }
  336. .yue .txt{
  337. width: 100%;
  338. height: 20px;
  339. line-height: 20px;
  340. text-align: center;
  341. color: #fff;
  342. z-index: 1;
  343. position: absolute;
  344. left: 0;
  345. bottom: 20px;
  346. font-weight: 300;
  347. }
  348. .detail{
  349. width: 86vw;
  350. height: auto;
  351. margin:10px 7vw;
  352. position: relative;
  353. }
  354. .detail .input{
  355. width: 100%;
  356. height: 40px;
  357. line-height: 40px;
  358. margin: 20px 0;
  359. border: 2px solid #eee;
  360. border-radius: 8px;
  361. display: flex;
  362. justify-content: space-between;
  363. }
  364. .input input{
  365. width: 80vw;
  366. height: 40px;
  367. line-height: 40px;
  368. padding-left: 5%;
  369. border-radius: 8px;
  370. border: 2px solid #eee;
  371. margin:10px 0;
  372. }
  373. input::-webkit-input-placeholder{
  374. color: #ccc;
  375. }
  376. .info{
  377. width: 100%;
  378. height: auto;
  379. }
  380. .info .ttxt{
  381. font-size: 12px;
  382. height: 20px;
  383. line-height: 20px;
  384. color: #aaa;
  385. }
  386. .listtx{
  387. width: 86vw;
  388. height: auto;
  389. margin:10px 7vw;
  390. position: relative;
  391. }
  392. .listtx .title{
  393. width: 100%;
  394. height: 30px;
  395. line-height: 30px;
  396. margin: 10px 0;
  397. }
  398. .btn{
  399. background: #F5CC57;
  400. width: 70vw;
  401. height: 40px;
  402. line-height: 40px;
  403. text-align: center;
  404. color: #fff;
  405. border-radius: 40px;
  406. margin: 30px 15vw 20px 15vw;
  407. box-shadow:0px 10px 20px 14px rgba(0,0,0,0.06);
  408. }
  409. .all{
  410. width: auto;
  411. height: 40px;
  412. line-height: 40px;
  413. color: #f08300;
  414. text-underline-position: auto;
  415. margin: 0;
  416. margin-right: 5%;
  417. }
  418. </style>