用工小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
1.8 KiB

7 months ago
4 months ago
7 months ago
4 months ago
7 months ago
4 months ago
7 months ago
4 months ago
7 months ago
4 months ago
7 months ago
4 months ago
3 months ago
4 months ago
7 months ago
  1. <template>
  2. <view class="u-page">
  3. <view class="se-p-40 se-pos">
  4. <image class="se-w-p-100 se-h-300 se-br-20" src="@/static/image/6584.png" mode=""></image>
  5. <view class="se-pos-lc se-fs-32 se-c-white se-flex se-flex-v se-flex-ff se-pl-60">
  6. <text>钱包</text>
  7. <text class="se-mt-20 se-fw-6 se-fs-34">{{myMoney}}</text>
  8. </view>
  9. </view>
  10. <view class="se-mx-40">
  11. <u-tabs :list="nav"
  12. :current="current"
  13. lineColor="#ff7a31"
  14. :activeStyle="{
  15. color: '#ff7a31',
  16. transform: 'scale(1.05)'
  17. }"
  18. :inactiveStyle="{
  19. color: '#333',
  20. transform: 'scale(1)'
  21. }"
  22. :scrollable="true"
  23. itemStyle="padding-left: 20rpx; padding-right: 20rpx;font-size:18rpx; height: 60rpx;"
  24. @click="tabClick"></u-tabs>
  25. </view>
  26. <withdrawalBox @onParent="onUserInfo()" :userId="userId" :myMoney="myMoney" v-if="current==0" />
  27. <rechargeBox @onParent="onUserInfo()" :userId="userId" :myMoney="myMoney" v-if="current==1" />
  28. </view>
  29. </template>
  30. <script>
  31. import withdrawalBox from "./component/withdrawal.vue"
  32. import rechargeBox from "./component/recharge.vue"
  33. import {
  34. userInfo
  35. } from "@/common/api.js"
  36. export default{
  37. components:{
  38. withdrawalBox,
  39. rechargeBox
  40. },
  41. data(){
  42. return{
  43. myMoney:0,
  44. userId:"",
  45. current:0,
  46. nav: [
  47. {
  48. name: '提现',
  49. }, {
  50. name: '充值',
  51. }
  52. ],
  53. money:null,
  54. }
  55. },
  56. onShow(options) {
  57. this.onUserInfo()
  58. },
  59. methods:{
  60. onUserInfo(){
  61. let params={}
  62. userInfo(params).then(response=>{
  63. console.info("userInfo",response)
  64. this.userId=response.result.id
  65. this.myMoney=response.result.amount?response.result.amount:0
  66. }).catch(error=>{
  67. })
  68. },
  69. tabClick(event){
  70. this.current = event.index
  71. }
  72. }
  73. }
  74. </script>
  75. <style>
  76. </style>