withdrawal.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. <template>
  2. <view class="content">
  3. <!-- <uni-notice-bar single="true" text="每月25号到月底可提现上月结算余额"></uni-notice-bar> -->
  4. <view class="content-money">
  5. <view class="flex ">
  6. <view class="buttom">
  7. <view class="icon">{{ money | getMoneyStyle }}</view>
  8. <text class="text">可用额度</text>
  9. </view>
  10. <!-- <view class="interval"></view>
  11. <view class="buttom">
  12. <view class=" icon">{{ freeze | getMoneyStyle }}</view>
  13. <text class="text">待审核提现金额</text>
  14. </view> -->
  15. </view>
  16. </view>
  17. <view class="title">
  18. <view class="title-t">
  19. 提现信息
  20. </view>
  21. </view>
  22. <view class="information">
  23. <view class="left">
  24. 二维码
  25. </view>
  26. <view class="right">
  27. <image src="../../static/img/add.png" @click="updataImg" v-if="!imgUrl"></image>
  28. <image :src="imgUrl" @click="updataImg" v-else></image>
  29. </view>
  30. </view>
  31. <view class="information">
  32. <view class="left">
  33. 提现数量
  34. </view>
  35. <view class="right">
  36. <input type="text" value="" placeholder="输入所需提币数量(最低 USTD起提)"/>
  37. </view>
  38. </view>
  39. <view class="information">
  40. <view class="left">
  41. 手续费
  42. </view>
  43. <view class="right">
  44. 收取 %手续费
  45. </view>
  46. </view>
  47. <view class="information">
  48. <view class="left">
  49. 实际到账数量
  50. </view>
  51. <view class="right"style="color: #000;line-height: 45rpx;">
  52. 0.00
  53. </view>
  54. </view>
  55. <!-- <view class="row-box">
  56. <view class="title">提现金额</view>
  57. <view class="row">
  58. <text class="tit">¥</text>
  59. <input class="input" type="number" v-model="withdrawal" :placeholder="'最低提现金额' + minPrice + '元'" placeholder-class="placeholder" />
  60. <view class="buttom" @click="withdrawal = money">全部提现</view>
  61. </view>
  62. </view> -->
  63. <!-- #ifndef MP-WEIXIN -->
  64. <!-- <view class="list" v-if="!weichatBsrowser">
  65. <radio-group @change="tabRadio">
  66. <label>
  67. <view class="box">
  68. <view class="icon iconfont iconweixin1"></view>
  69. <view class="title-box">
  70. <view class="title"><text>提现至微信</text></view>
  71. </view>
  72. <view class="right"><radio value="weixin" color="#5dbc7c" :checked="type == 'weixin'" /></view>
  73. </view>
  74. </label>
  75. <label>
  76. <view class="box">
  77. <view class="icon iconfont iconzhifubao"></view>
  78. <view class="title-box">
  79. <view class="title">
  80. <text v-if="aliData.fullname">提现至支付宝</text>
  81. <text v-else>请创建支付宝账号</text>
  82. </view>
  83. <view class="node">
  84. <text v-if="aliData.fullname">真实姓名({{ aliData.fullname }})</text>
  85. </view>
  86. </view>
  87. <view class="right"><radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" /></view>
  88. </view>
  89. </label>
  90. <label>
  91. <view class="box">
  92. <view class="icon iconfont"><image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image></view>
  93. <view class="title-box">
  94. <view class="title">
  95. <text v-if="bankData.bankno">{{ bankData.bank + ' ' + bankData.bankno }}</text>
  96. <text v-else>请创建银行账号</text>
  97. </view>
  98. <view class="node">
  99. <text v-if="bankData.fullname">真实姓名({{ bankData.fullname }})</text>
  100. </view>
  101. </view>
  102. <view class="right"><radio value="bank" color="#5dbc7c" :checked="type == 'bank'" /></view>
  103. </view>
  104. </label>
  105. </radio-group>
  106. </view> -->
  107. <!-- #endif -->
  108. <view class="button">
  109. 确认提现
  110. </view>
  111. <!-- <button class="add-btn up" @click="confirm">提交申请</button> -->
  112. <!-- <button class="add-btn modified" v-if="!weichatBsrowser" @click="navTo('/pages/money/account')">账号管理</button> -->
  113. </view>
  114. </template>
  115. <script>
  116. import { getMoneyStyle } from '@/utils/rocessor.js';
  117. import { extractCash, extractBank, aliInfo, bankInfo } from '@/api/wallet.js';
  118. import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
  119. export default {
  120. filters: {
  121. getMoneyStyle
  122. },
  123. components: {
  124. uniNoticeBar
  125. },
  126. data() {
  127. return {
  128. type: 'weixin', //提现方式
  129. money: '0.00', //可提现金额
  130. freeze: '0.0', //冻结金额
  131. withdrawal: '', //提现金额
  132. minPrice: '', //最少提现金额
  133. aliData: {},
  134. bankData: {},
  135. imgUrl: "",
  136. // #ifdef H5
  137. weichatBsrowser: false
  138. // #endif
  139. };
  140. },
  141. // onLoad(options) {
  142. // // #ifdef H5
  143. // this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
  144. // // #endif
  145. // //加载提现信息
  146. // this.loadData();
  147. // // 加载提款账号信息
  148. // this.loadAli();
  149. // this.loadBank();
  150. // },
  151. methods: {
  152. //上传二维码
  153. updataImg() {
  154. uni.chooseImage({
  155. success: (chooseImageRes) => {
  156. this.imgUrl = chooseImageRes.tempFilePaths[0];
  157. console.log(this.imgUrl)
  158. // uni.uploadFile({
  159. // url: 'https://www.example.com/upload', //仅为示例,非真实的接口地址
  160. // filePath: tempFilePaths[0],
  161. // name: 'file',
  162. // formData: {
  163. // 'user': 'test'
  164. // },
  165. // success: (uploadFileRes) => {
  166. // console.log(uploadFileRes.data);
  167. // }
  168. // });
  169. }
  170. });
  171. },
  172. // 更新数据
  173. // dataUp(){
  174. // this.loadAli();
  175. // this.loadBank();
  176. // },
  177. // //加载数据
  178. // async loadAli(source) {
  179. // aliInfo({}).then(e => {
  180. // this.aliData = e.data;
  181. // });
  182. // },
  183. // // 加载银行卡信息
  184. // async loadBank() {
  185. // bankInfo({}).then(e => {
  186. // this.bankData = e.data;
  187. // });
  188. // },
  189. // // 加载余额信息
  190. // async loadData() {
  191. // extractBank({}).then(({ data }) => {
  192. // this.money = data.moneyCount;//可提现余额
  193. // this.minPrice = data.minPrice;//最小提现
  194. // this.freeze =data.inmoneyCount//提现中的余额
  195. // });
  196. // },
  197. // 跳转
  198. navTo(url) {
  199. uni.navigateTo({
  200. url: url
  201. });
  202. },
  203. // 切换选中对象
  204. // tabRadio(e) {
  205. // this.type = e.detail.value;
  206. // },
  207. // 提交
  208. // confirm() {
  209. // let data = {
  210. // extract_type: this.type, //bank -银行卡 alipay-支付宝 weixin-微信
  211. // money: this.withdrawal, //金额
  212. // money_type: 1//0佣金1余额
  213. // }
  214. // if (this.type=='alipay') {
  215. // data.name = this.aliData.fullname;
  216. // data.alipay_code = this.aliData.alino;
  217. // }
  218. // if (this.type=='bank') {
  219. // data.name = this.bankData.fullname;
  220. // data.bankname = this.bankData.bank;
  221. // data.cardnum = this.bankData.bankno;
  222. // }
  223. // extractCash(data)
  224. // .then(e => {
  225. // uni.showToast({
  226. // title: '提交成功',
  227. // duration: 2000,
  228. // position: 'top'
  229. // });
  230. // })
  231. // .catch(e => {
  232. // console.log();
  233. // });
  234. // }
  235. }
  236. };
  237. </script>
  238. <style lang="scss">
  239. page {
  240. height: 100%;
  241. }
  242. .content-money {
  243. padding: 30rpx 0;
  244. background: #ffffff;
  245. }
  246. .flex {
  247. background-color: #ffffff;
  248. text-align: center;
  249. margin: 0 30rpx;
  250. border-radius: $border-radius-sm;
  251. .buttom {
  252. font-size: $font-lg;
  253. width: 100%;
  254. }
  255. .icon {
  256. background-size: 100%;
  257. font-size: 42rpx;
  258. color: $font-color-dark;
  259. font-weight: bold;
  260. background-repeat: no-repeat;
  261. background-position: center;
  262. }
  263. .text {
  264. color: $font-color-light;
  265. }
  266. }
  267. .title {
  268. background-color: #fff;
  269. padding: 30rpx;
  270. margin-bottom: 5rpx;
  271. font-weight: bold;
  272. margin-top: 20rpx;
  273. .title-t {
  274. font-weight: Medium;
  275. padding: 0 15rpx;
  276. color: #333333;
  277. border-left: solid 3rpx #44BFEC;
  278. }
  279. }
  280. .information {
  281. display: flex;
  282. background-color: #fff;
  283. padding: 30rpx;
  284. margin-bottom: 5rpx;
  285. .left {
  286. width: 350rpx;
  287. font-size: 28rpx;
  288. color: #333333;
  289. }
  290. .right {
  291. font-size: 25rpx;
  292. color: #999999;
  293. width: 100%;
  294. input {
  295. font-size: 25rpx;
  296. }
  297. image {
  298. width: 120rpx;
  299. height: 120rpx;
  300. }
  301. }
  302. }
  303. .button {
  304. width: 80%;
  305. text-align: center;
  306. margin: 0 auto;
  307. background: linear-gradient(90deg, #438BED 0%, #44BFEC 100%);
  308. background-color: #438BED;
  309. height: 80rpx;
  310. border-radius: 50rpx;
  311. line-height: 80rpx;
  312. color: #fff;
  313. font-size: 30rpx;
  314. margin-top: 80rpx;
  315. }
  316. .row-box {
  317. margin-top: 30rpx;
  318. padding: 20rpx 30rpx;
  319. background: #fff;
  320. .title {
  321. font-size: $font-base + 2rpx;
  322. color: $font-color-dark;
  323. }
  324. .row {
  325. display: flex;
  326. align-items: center;
  327. position: relative;
  328. height: 80rpx;
  329. .tit {
  330. flex-shrink: 0;
  331. width: 40rpx;
  332. font-size: 30rpx;
  333. color: $font-color-dark;
  334. }
  335. .input {
  336. flex: 1;
  337. font-size: 30rpx;
  338. color: $font-color-dark;
  339. }
  340. .iconlocation {
  341. font-size: 36rpx;
  342. color: $font-color-light;
  343. }
  344. .buttom {
  345. color: $font-color-spec;
  346. font-size: $font-base;
  347. }
  348. }
  349. }
  350. .add-btn {
  351. &.modified {
  352. color: $base-color;
  353. }
  354. &.up {
  355. background-color: $base-color;
  356. color: #fff;
  357. }
  358. display: flex;
  359. align-items: center;
  360. justify-content: center;
  361. width: 690rpx;
  362. height: 80rpx;
  363. margin: 0 auto;
  364. margin-top: 30rpx;
  365. font-size: $font-lg;
  366. border-radius: 10rpx;
  367. // box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
  368. }
  369. .list {
  370. padding-left: 30rpx;
  371. margin-top: 30rpx;
  372. background-color: #ffffff;
  373. .box {
  374. display: flex;
  375. align-items: center;
  376. width: 100%;
  377. height: 120rpx;
  378. border-bottom: 1px solid $border-color-light;
  379. .icon {
  380. font-size: 48rpx;
  381. padding-right: 20rpx;
  382. .icon-img {
  383. height: 50rpx;
  384. width: 50rpx;
  385. }
  386. }
  387. .iconweixin1 {
  388. color: #18bf16;
  389. }
  390. .iconzhifubao {
  391. color: #08aaec;
  392. }
  393. .title-box {
  394. flex-grow: 1;
  395. text-align: left;
  396. .title {
  397. font-size: $font-base + 2rpx;
  398. color: $font-color-base;
  399. }
  400. .node {
  401. font-size: $font-sm;
  402. color: $font-color-light;
  403. }
  404. }
  405. }
  406. }
  407. /deep/ .uni-radio-input {
  408. width: 45rpx;
  409. height: 45rpx;
  410. }
  411. </style>