applywithdraw.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  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 style="margin: 30rpx;padding: 30rpx 10rpx;background-color: #eaeaea;border-radius: 5rpx;">
  73. <p style="color: #878994;">样叽严格按照《用户协议》及《隐私政策;</p>
  74. <p style="color: #878994;">用户输入的银行卡号和支付宝账号信息仅在用户提现时使用。</p>
  75. </view>
  76. </view>
  77. </template>
  78. <script>
  79. import mvBar from "@/components/mys_navBar/mysNavBar";
  80. import {
  81. money
  82. } from '@/components/utils.js';
  83. export default {
  84. components: {
  85. mvBar,
  86. },
  87. data() {
  88. return {
  89. picture: {
  90. icon_person: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-person.png',
  91. icon_location: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-location.png',
  92. icon_account: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-account.png',
  93. icon_rmb: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-rmb.png',
  94. icon_message: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-message.png',
  95. icon_right: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent_upload/icon-arrow-right.png',
  96. defaultavatarUrl: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/logoxin01.png',
  97. },
  98. bankType: 1,
  99. taskIdList: [],
  100. totalAmount: 0,
  101. realAmount: 0,
  102. showRealAmount: 0,
  103. showTotalAmount: 0,
  104. activeRadio: "支付宝",
  105. radioGroup: ['支付宝', '银行卡'],
  106. formData: {},
  107. mysNavConfig: {
  108. /* 开启单页显示首页图标 */
  109. isHome: true,
  110. /* 固定导航 */
  111. navFixed: true,
  112. /* 标题 (屏幕中心居中 两边图标中心居中使用slot center1) */
  113. navTitle: {
  114. text: "申请提现",
  115. color: "",
  116. fontSize: "32rpx", // px upx rpx
  117. fontWeight: "normal", // 100 - 700
  118. },
  119. btnType: "type2",
  120. onLeftClick: "",
  121. /* type2 按钮 */
  122. type2Config: {
  123. // 左图标
  124. leftPath: "/static/img/png2.png",
  125. // 右图标
  126. rightPath: "/static/img/png4.png",
  127. // 圆角
  128. radius: "40rpx",
  129. },
  130. },
  131. }
  132. },
  133. onLoad(options) {
  134. let data = options.textObj.replace(/""/g, "");
  135. data = JSON.parse(decodeURIComponent(data))
  136. this.taskIdList = data.taskIdList
  137. this.totalAmount = data.totalAmount
  138. this.realAmount = data.totalAmount * 0.95
  139. this.showTotalAmount = money(this.totalAmount)
  140. this.showRealAmount = money(this.realAmount)
  141. },
  142. onShow() {
  143. this.getInfo()
  144. },
  145. methods: {
  146. chan(e) {
  147. if (e.detail.value == "支付宝")
  148. this.bankType = 1
  149. else
  150. this.bankType = 2
  151. this.activeRadio = e.detail.value;
  152. console.log(this.activeRadio);
  153. },
  154. // 默认信息表,获取平台logo
  155. getInfo() {
  156. this.$https.get('/youngee/c/g/get-info-tables')
  157. .then(res => {
  158. this.array1 = res.data.data.Bank
  159. })
  160. this.getBankInfo()
  161. },
  162. getBankInfo() {
  163. this.$https.get('/youngee/c/t/g/get-talent-bank-info')
  164. .then(res => {
  165. console.log(res)
  166. if (res.data.data != null) {
  167. this.formData = res.data.data
  168. }
  169. })
  170. },
  171. withdraw() {
  172. this.$https.post('/youngee/c/t/p/withdraw', {
  173. task_id_list: this.taskIdList,
  174. total_amount: this.totalAmount,
  175. real_amount: this.realAmount,
  176. bank_type: this.bankType,
  177. })
  178. .then(res => {
  179. console.log(res)
  180. let pages = getCurrentPages(); // 当前页面
  181. let beforePage = pages[pages.length - 2]; // 上一页
  182. setTimeout(() => {
  183. uni.navigateBack({
  184. success: function() {
  185. beforePage
  186. .onLoad(); // 执行上一页的onLoad方法
  187. }
  188. })
  189. uni.navigateBack()
  190. })
  191. })
  192. },
  193. toModifyBank() {
  194. uni.navigateTo({
  195. url: '/pages/mycenter/myinformation/mybank'
  196. });
  197. },
  198. toModifyZhifubao() {
  199. uni.navigateTo({
  200. url: '/pages/mycenter/myinformation/myzhifubao'
  201. });
  202. }
  203. }
  204. }
  205. </script>
  206. <style lang="scss" scoped>
  207. p {
  208. font-size: 32rpx;
  209. }
  210. .show-form {
  211. margin: 0 25rpx;
  212. }
  213. .show-form-cell {
  214. display: flex;
  215. margin: 30rpx 0;
  216. }
  217. .show-form-cell-left {
  218. width: 150rpx;
  219. }
  220. .tips {
  221. margin: 30rpx;
  222. padding: 30rpx 20rpx;
  223. background-color: #eaeaea;
  224. border-radius: 15rpx;
  225. }
  226. .tips p {
  227. font-size: 28rpx;
  228. }
  229. .withdraw-btn {
  230. display: flex;
  231. align-items: center;
  232. width: 100%;
  233. position: fixed;
  234. bottom: 0rpx;
  235. display: flex;
  236. height: 100rpx;
  237. padding-top: 2%;
  238. }
  239. .btn1 {
  240. width: 60%;
  241. background-color: #f2d22d;
  242. color: #000;
  243. border-color: #ffffff;
  244. border-radius: 10rpx;
  245. font-size: 36rpx;
  246. line-height: 240%;
  247. letter-spacing: 10rpx;
  248. font-weight: 500;
  249. height: 80%;
  250. }
  251. .show-body1-icon {
  252. width: 30rpx;
  253. height: 30rpx;
  254. }
  255. </style>