index.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. <template>
  2. <view class="">
  3. <view class="bg padding">
  4. <view class="box">
  5. <view class="tit">可用资金(元)</view>
  6. <view class="pri"><text>{{balance?balance:'0'}}</text> </view>
  7. <view class="flex align-center justify-between margin-top-xl">
  8. <!-- <view class="">
  9. <view>总资金</view>
  10. <view style="font-size: 44rpx;">{{money?money:'0'}}</view>
  11. </view> -->
  12. <!-- <view class="">
  13. <view>冻结资金</view>
  14. <view style="font-size: 44rpx;">2.00</view>
  15. </view> -->
  16. </view>
  17. </view>
  18. <view class="flex align-center justify-between padding-top">
  19. <view>
  20. <view class="padding-bottom-xs">总资产(元)</view>
  21. <view class="text-bold" style="font-size: 48rpx;">{{balance?balance:'0'}}</view>
  22. </view>
  23. <view class="flex align-center">
  24. <view class="cz" @click="goTo('/my/wallet/Txmoney')">提现</view>
  25. <!-- <view class="tx" @click="gocz()">充值</view> -->
  26. </view>
  27. </view>
  28. </view>
  29. <!-- 我的列表 -->
  30. <view class="mylist">
  31. <view class="list_box" @click="goTo('/my/wallet/Acontlist')">
  32. <view class="list_left">
  33. <view class="margin-right-xs">
  34. <image src="../static/zijin.png" style="width: 52rpx;height: 52rpx;"></image>
  35. </view>
  36. <view class="t">资金明细</view>
  37. </view>
  38. <view class="">
  39. <image src="../static/icon_go.png" style="width: 18rpx;height: 32rpx;"></image>
  40. </view>
  41. </view>
  42. <view class="list_box" @click="goTo('/my/wallet/zhifubao')">
  43. <view class="list_left">
  44. <view class="margin-right-xs">
  45. <image src="../static/zhanghao.png" style="width: 52rpx;height: 52rpx;"></image>
  46. </view>
  47. <view class="t">提现账号</view>
  48. </view>
  49. <view class="">
  50. <image src="../static/icon_go.png" style="width: 18rpx;height: 32rpx;"></image>
  51. </view>
  52. </view>
  53. <view class="list_box" @click="goTo('/my/wallet/cashList')">
  54. <view class="list_left">
  55. <view class="margin-right-xs">
  56. <image src="../static/tixian.png" style="width: 52rpx;height: 52rpx;"></image>
  57. </view>
  58. <view class="t">提现记录</view>
  59. </view>
  60. <view class="">
  61. <image src="../static/icon_go.png" style="width: 18rpx;height: 32rpx;"></image>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. export default {
  69. data() {
  70. return {
  71. money: 0,
  72. mylist: [{
  73. id: 1,
  74. name: '保证金',
  75. image: '../../../static/rider/qqq.png'
  76. }, {
  77. id: 2,
  78. name: '账户明细',
  79. image: '../../../static/rider/qq.png'
  80. }],
  81. shangxian: '是',
  82. balance:0
  83. }
  84. },
  85. onLoad() {
  86. this.shangxian = uni.getStorageSync('shangxian')
  87. },
  88. onShow() {
  89. // this.taskData()
  90. this.getUserInfo()
  91. },
  92. methods: {
  93. // 获取个人信息
  94. getUserInfo() {
  95. let userId = this.$queue.getData('userId');
  96. this.$Request.getT("/app/user/selectUserDetails?userId=" + userId).then(res => {
  97. if (res.code == 0) {
  98. this.balance = res.data.balance
  99. } else {
  100. this.$queue.logout();
  101. uni.showModal({
  102. showCancel: false,
  103. title: '登录失败',
  104. content: res.msg,
  105. });
  106. }
  107. });
  108. },
  109. goTo(url){
  110. uni.navigateTo({
  111. url
  112. })
  113. },
  114. // 获取任务数据
  115. taskData() {
  116. this.$Request.getT('/app/userinfo/findBalance').then(res => {
  117. if (res.code == 0) {
  118. if (res.data) {
  119. this.money = res.data
  120. }
  121. }
  122. console.log('res', res)
  123. });
  124. },
  125. bindTxmoney() {
  126. uni.navigateTo({
  127. url: '/pages/riderMy/myAccount/Txmoney/Txmoney'
  128. })
  129. },
  130. }
  131. }
  132. </script>
  133. <style lang="less">
  134. page {
  135. background: #F5F5F5;
  136. }
  137. .bg {
  138. background: #FFFFFF;
  139. }
  140. .box {
  141. width: 690rpx;
  142. // height: 312rpx;
  143. background: linear-gradient(90deg, #3C7BFC 0%, #6FB3FF 100%);
  144. border-radius: 16rpx;
  145. color: #FFFFFF;
  146. // text-align: center;
  147. padding: 50rpx 40rpx 30rpx;
  148. .tit {
  149. font-size: 32rpx;
  150. font-family: PingFang SC;
  151. font-weight: 500;
  152. }
  153. .pri {
  154. margin-top: 20rpx;
  155. text {
  156. font-size: 68rpx;
  157. font-family: DINPro;
  158. font-weight: 500;
  159. color: #FFFFFF;
  160. margin-right: 10rpx;
  161. }
  162. }
  163. }
  164. .tx {
  165. width: 160rpx;
  166. height: 70rpx;
  167. border: 3rpx solid #0186FF;
  168. border-radius: 8rpx;
  169. text-align: center;
  170. line-height: 70rpx;
  171. color: #0186FF;
  172. }
  173. .cz {
  174. width: 160rpx;
  175. height: 70rpx;
  176. border-radius: 8rpx;
  177. text-align: center;
  178. line-height: 70rpx;
  179. color: #FFFFFF;
  180. margin-left: 20rpx;
  181. background: #0186FF;
  182. }
  183. /* 我的列表 */
  184. .mylist {
  185. background-color: #FFFFFF;
  186. margin-top: 20rpx;
  187. padding: 30rpx 28rpx;
  188. }
  189. .list_box {
  190. display: flex;
  191. height: 95rpx;
  192. align-items: center;
  193. }
  194. .list_left {
  195. flex: 1;
  196. display: flex;
  197. justify-content: left;
  198. align-items: center;
  199. .t{
  200. letter-spacing: 1rpx;
  201. }
  202. }
  203. </style>