applywithdraw.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <template>
  2. <view style="position: relative;">
  3. <!-- 胶囊 -->
  4. <mvBar :mysNavConfig="mysNavConfig"></mvBar>
  5. <view :style="{marginTop:navH}"></view>
  6. <view class="show-form">
  7. <view class="show-form-cell" v-if="activeRadio == '银行卡'">
  8. <view class="show-form-cell-left">
  9. <p>银行卡号</p>
  10. </view>
  11. <view style="display: flex;justify-content: space-between;width: 550rpx;">
  12. <view>
  13. <p>{{formData.bank_card_number}}</p>
  14. </view>
  15. <view style="display: flex;align-items: center;justify-content: center;" @click="toModifyBank()">
  16. <p>前往修改/绑定</p>
  17. <image class="show-body1-icon" :src="picture.icon_right"></image>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="show-form-cell">
  22. <view class="show-form-cell-left">
  23. <p>提现金额</p>
  24. </view>
  25. <p>{{showTotalAmount}}</p>
  26. </view>
  27. <view class="show-form-cell">
  28. <view class="show-form-cell-left">
  29. <p>实际金额</p>
  30. </view>
  31. <p>{{showRealAmount}}</p>
  32. </view>
  33. </view>
  34. <view class="tips">
  35. <p>*根据国家法规,平台需代扣代缴5%个人所得税</p>
  36. <p>*预计5个工作日到账,法定节假日顺延</p>
  37. </view>
  38. <view class="withdraw-btn">
  39. <button type="default" class="btn1" @click="withdraw()">
  40. 确认提现</button>
  41. </view>
  42. <!-- <view style="margin: 30rpx;padding: 30rpx 10rpx;background-color: #eaeaea;border-radius: 5rpx;">
  43. <p style="color: #878994;">提现需绑定用户个人名下真实使用的银行卡与身份等信息</p>
  44. <p style="color: #878994;">平台严格按照《用户协议》及《隐私政策》保护个人隐私</p>
  45. </view> -->
  46. </view>
  47. </template>
  48. <script>
  49. import mvBar from "@/components/mys_navBar/mysNavBar";
  50. import {
  51. money
  52. } from '@/components/utils.js';
  53. export default {
  54. components: {
  55. mvBar,
  56. },
  57. data() {
  58. return {
  59. navH: getApp().globalData.navHeight,
  60. picture: {
  61. icon_person: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-person.png',
  62. icon_location: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-location.png',
  63. icon_account: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-account.png',
  64. icon_rmb: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-rmb.png',
  65. icon_message: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-message.png',
  66. icon_right: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent_upload/icon-arrow-right.png',
  67. defaultavatarUrl: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/logoxin01.png',
  68. },
  69. bankType: 1,
  70. taskIdList: [],
  71. totalAmount: 0,
  72. realAmount: 0,
  73. showRealAmount: 0,
  74. showTotalAmount: 0,
  75. activeRadio: "银行卡",
  76. radioGroup: ['支付宝', '银行卡'],
  77. formData: {},
  78. mysNavConfig: {
  79. /* 开启单页显示首页图标 */
  80. isHome: true,
  81. /* 固定导航 */
  82. navFixed: true,
  83. /* 标题 (屏幕中心居中 两边图标中心居中使用slot center1) */
  84. navTitle: {
  85. text: "申请提现",
  86. color: "",
  87. fontSize: "32rpx", // px upx rpx
  88. fontWeight: "normal", // 100 - 700
  89. },
  90. btnType: "type2",
  91. onLeftClick: "",
  92. /* type2 按钮 */
  93. type2Config: {
  94. // 左图标
  95. leftPath: "/static/img/png2.png",
  96. // 右图标
  97. rightPath: "/static/img/png4.png",
  98. // 圆角
  99. radius: "40rpx",
  100. },
  101. },
  102. }
  103. },
  104. onLoad(options) {
  105. let data = options.textObj.replace(/""/g, "");
  106. data = JSON.parse(decodeURIComponent(data))
  107. this.taskIdList = data.taskIdList
  108. this.totalAmount = data.totalAmount
  109. this.realAmount = data.totalAmount * 0.95
  110. this.showTotalAmount = money(this.totalAmount)
  111. this.showRealAmount = money(this.realAmount)
  112. },
  113. onShow() {
  114. this.getInfo()
  115. },
  116. methods: {
  117. chan(e) {
  118. if (e.detail.value == "支付宝")
  119. this.bankType = 1
  120. else
  121. this.bankType = 2
  122. this.activeRadio = e.detail.value;
  123. console.log(this.activeRadio);
  124. },
  125. // 默认信息表,获取平台logo
  126. getInfo() {
  127. this.$https.get('/youngee/c/g/get-info-tables')
  128. .then(res => {
  129. this.array1 = res.data.data.Bank
  130. })
  131. this.getBankInfo()
  132. },
  133. getBankInfo() {
  134. this.$https.get('/youngee/c/t/g/get-talent-bank-info')
  135. .then(res => {
  136. console.log(res)
  137. if (res.data.data != null) {
  138. this.formData = res.data.data
  139. }
  140. })
  141. },
  142. withdraw() {
  143. this.$https.post('/youngee/c/t/p/withdraw', {
  144. task_id_list: this.taskIdList,
  145. total_amount: this.totalAmount,
  146. real_amount: this.realAmount,
  147. bank_type: this.bankType,
  148. })
  149. .then(res => {
  150. console.log(res)
  151. let pages = getCurrentPages(); // 当前页面
  152. let beforePage = pages[pages.length - 2]; // 上一页
  153. setTimeout(() => {
  154. uni.navigateBack({
  155. success: function() {
  156. beforePage
  157. .onLoad(); // 执行上一页的onLoad方法
  158. }
  159. })
  160. uni.navigateBack()
  161. })
  162. })
  163. },
  164. toModifyBank() {
  165. uni.navigateTo({
  166. url: '/pages/mycenter/myinformation/mybank'
  167. });
  168. },
  169. toModifyZhifubao() {
  170. uni.navigateTo({
  171. url: '/pages/mycenter/myinformation/myzhifubao'
  172. });
  173. }
  174. }
  175. }
  176. </script>
  177. <style lang="scss" scoped>
  178. p {
  179. font-size: 32rpx;
  180. }
  181. .show-form {
  182. margin: 0 25rpx;
  183. }
  184. .show-form-cell {
  185. display: flex;
  186. margin: 30rpx 0;
  187. }
  188. .show-form-cell-left {
  189. width: 150rpx;
  190. }
  191. .tips {
  192. margin: 30rpx;
  193. padding: 30rpx 20rpx;
  194. background-color: #eaeaea;
  195. border-radius: 15rpx;
  196. }
  197. .tips p {
  198. font-size: 28rpx;
  199. }
  200. .withdraw-btn {
  201. display: flex;
  202. align-items: center;
  203. width: 100%;
  204. position: fixed;
  205. bottom: 0rpx;
  206. display: flex;
  207. height: 100rpx;
  208. padding-top: 2%;
  209. }
  210. .btn1 {
  211. width: 60%;
  212. background-color: #f2d22d;
  213. color: #000;
  214. border-color: #ffffff;
  215. border-radius: 10rpx;
  216. font-size: 36rpx;
  217. line-height: 240%;
  218. letter-spacing: 10rpx;
  219. font-weight: 500;
  220. height: 80%;
  221. }
  222. .show-body1-icon {
  223. width: 30rpx;
  224. height: 30rpx;
  225. }
  226. </style>