myAccount.vue 3.2 KB

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