applywithdraw.vue 6.7 KB

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