applywithdraw.vue 6.0 KB

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