myAccount.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <template>
  2. <view class="my_account">
  3. <view class="account_top">
  4. <view class="account_name">账户余额</view>
  5. <view class="account_price">{{moneys}}<text>元</text></view>
  6. <view class="account_btn" @click="bindTxmoney">立即提现</view>
  7. </view>
  8. <!-- 我的列表 -->
  9. <view class="mylist">
  10. <view class="list_box" v-for="(item,index) in mylist" :key="index" @click="bindTomy(item.name)">
  11. <view class="list_left">
  12. <view class="list_img">
  13. <image :src="item.image"></image>
  14. </view>
  15. <view class="list_name">{{item.name}}</view>
  16. </view>
  17. <view class="list_right">
  18. <image src="../../../static/my/icon_go.png"></image>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. data() {
  27. return {
  28. moneys:0,
  29. mylist: [{
  30. id: 1,
  31. name: '保证金',
  32. image: '../../../static/rider/qqq.png'
  33. }, {
  34. id: 2,
  35. name: '账户明细',
  36. image: '../../../static/rider/qq.png'
  37. }]
  38. }
  39. },
  40. onShow() {
  41. this.taskData()
  42. },
  43. methods: {
  44. // 获取任务数据
  45. taskData() {
  46. this.$Request.getT('/app/userinfo/findBalance').then(res => {
  47. if(res.code==0){
  48. if(res.data){
  49. this.moneys = res.data
  50. }
  51. }
  52. console.log('res',res)
  53. });
  54. },
  55. bindTxmoney() {
  56. uni.navigateTo({
  57. url: '/pages/riderMy/myAccount/Txmoney/Txmoney'
  58. })
  59. },
  60. bindTomy(name) {
  61. console.log(name)
  62. if (name == '保证金') {
  63. uni.navigateTo({
  64. url: '/pages/riderMy/myAccount/AcontMoney/AcontMoney'
  65. })
  66. } else if (name == '账户明细') {
  67. uni.navigateTo({
  68. url: '/pages/riderMy/myAccount/Acontlist/Acontlist'
  69. })
  70. }
  71. }
  72. }
  73. }
  74. </script>
  75. <style>
  76. .my_account {
  77. width: 100%;
  78. }
  79. .account_top {
  80. width: 100%;
  81. height: 280rpx;
  82. background: #FF7F00;
  83. position: relative;
  84. }
  85. .account_name {
  86. position: absolute;
  87. top: 80rpx;
  88. left: 80rpx;
  89. color: white;
  90. font-size: 30rpx;
  91. letter-spacing: 2rpx;
  92. }
  93. .account_price {
  94. position: absolute;
  95. top: 140rpx;
  96. left: 80rpx;
  97. color: white;
  98. font-size: 50rpx;
  99. letter-spacing: 2rpx;
  100. }
  101. .account_price text {
  102. font-size: 25rpx;
  103. margin-left: 10rpx;
  104. }
  105. .account_btn {
  106. width: 190rpx;
  107. height: 66rpx;
  108. background: #ffffff;
  109. color: #FF7F00;
  110. border-radius: 66rpx;
  111. text-align: center;
  112. line-height: 66rpx;
  113. position: absolute;
  114. top: 140rpx;
  115. right: 40rpx;
  116. font-size: 24rpx;
  117. }
  118. /* 我的列表 */
  119. .mylist {
  120. width: 93%;
  121. margin: 0 auto;
  122. background-color: #FFFFFF;
  123. margin-top: 10rpx;
  124. border-radius: 23rpx;
  125. }
  126. .list_box {
  127. width: 90%;
  128. margin: 0 auto;
  129. display: flex;
  130. height: 95rpx;
  131. }
  132. .list_left {
  133. flex: 1;
  134. display: flex;
  135. justify-content: left;
  136. align-items: center;
  137. }
  138. .list_img {
  139. margin-right: 10rpx;
  140. }
  141. .list_img image {
  142. width: 50rpx;
  143. height: 50rpx;
  144. }
  145. .list_name {
  146. font-size: 25rpx;
  147. letter-spacing: 2rpx;
  148. }
  149. .list_right {
  150. flex: 1;
  151. display: flex;
  152. justify-content: flex-end;
  153. align-items: center;
  154. }
  155. .list_right image {
  156. width: 12rpx;
  157. height: 20rpx;
  158. }
  159. </style>