applywithdraw.vue 6.1 KB

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