personal_information.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <template>
  2. <view class="main">
  3. <view class="header-content">
  4. <image src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/mybanner.png" style="width:100%;height:260rpx;"></image>
  5. </view>
  6. <view class="pr" style="z-index:2">
  7. <view class="plr15">
  8. <view class="bdr4 bg-white" style="margin-top: 38rpx;">
  9. <view class="m-dpflex flex-direction align-center justify-center" style="height: 210rpx;">
  10. <view class="text-bold text-black" style="font-size: 68rpx;">
  11. {{info.balance/100}}
  12. </view>
  13. <view class="" style="font-size: 28rpx;color: #666;">
  14. 账户余额(元)
  15. </view>
  16. </view>
  17. <view class="pr m-xcenter plr20 header-box" style="padding: 40rpx 40rpx;background-color: #fff;border-radius: 16rpx;">
  18. <view class="m-flex tl f14 m-ycenter dpb">
  19. <view class="m-gray-big f20 fb pr10">{{info.topup_balance}}</view>
  20. <view class="m-gray-letter mt5 f12">充值金额(元)</view>
  21. </view>
  22. <view class="m-flex tl f14 m-ycenter">
  23. <view class="m-gray-big f20 fb">{{info.giving_balance/100}}</view>
  24. <view class="m-gray-letter mt5 f12">赠送金额(元)</view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="margin-lr" style="box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);margin-top: 86rpx;">
  31. <u-button size="default" :ripple="true" @click="gotopay" :custom-style="customStyle">充值</u-button>
  32. </view>
  33. <view class="margin-lr margin-top" style="box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
  34. <u-button size="default" @click="gotoinfo" :ripple="true" :custom-style="customStyle1">明细</u-button>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. export default {
  40. data() {
  41. return {
  42. customStyle: {
  43. backgroundColor: '#0B73B9',
  44. color: '#FFFFFF'
  45. },
  46. customStyle1: {
  47. backgroundColor: '#ffffff',
  48. color: '#0B73B9'
  49. },
  50. info:{}
  51. };
  52. },
  53. methods: {
  54. gotoinfo() {
  55. uni.navigateTo({
  56. url: "balance_info"
  57. })
  58. },
  59. gotopay() {
  60. uni.navigateTo({
  61. url: "recharge"
  62. })
  63. },
  64. getMoney: async function() {
  65. let res = await this.$request.post("/api/v1/user/userInfo")
  66. console.log(res)
  67. if(res.status == 0){
  68. this.info = res.data
  69. }
  70. }
  71. },
  72. onShow() {
  73. this.getMoney()
  74. }
  75. };
  76. </script>
  77. <style scoped lang="scss">
  78. @import url("../index/mine.css");
  79. .header-content {
  80. position: absolute;
  81. top: 0;
  82. right: 0;
  83. bottom: 0;
  84. left: 0;
  85. width: 100%;
  86. z-index: -1;
  87. overflow: hidden;
  88. box-sizing: border-box;
  89. }
  90. .header-box {
  91. box-shadow: 0px 8rpx 34rpx -6rpx rgba(248, 151, 164, 0.13);
  92. }
  93. .header-img {
  94. width: 36rpx;
  95. height: 36rpx;
  96. }
  97. .tip {
  98. position: absolute;
  99. top: 0;
  100. right: 20%;
  101. bottom: 0;
  102. background-color: red;
  103. width: 12rpx;
  104. height: 12rpx;
  105. border-radius: 50%;
  106. }
  107. .msg {
  108. top: -3rpx;
  109. right: -9rpx;
  110. }
  111. swiper {
  112. height: 320rpx;
  113. }
  114. .swiper-wrapper {
  115. padding: 0 10rpx;
  116. box-sizing: border-box;
  117. }
  118. .swiper-item {
  119. width: 100%;
  120. height: 300rpx;
  121. box-shadow: 0 26rpx 40rpx 0 rgba(255, 255, 255, 0.31);
  122. background: url("http://file.supermm.me/miniProgram/images/personal/bg_doc.png") no-repeat bottom center;
  123. }
  124. .dots {
  125. position: absolute;
  126. left: 0;
  127. right: 0;
  128. bottom: -40rpx;
  129. display: flex;
  130. justify-content: center;
  131. }
  132. .dots .dot {
  133. margin: 0 8rpx;
  134. width: 14rpx;
  135. height: 14rpx;
  136. background: #E4E4E4;
  137. border-radius: 8rpx;
  138. transition: all .6s;
  139. }
  140. .dots .dot.active {
  141. width: 24rpx;
  142. background: rgb(153, 153, 153);
  143. }
  144. .game-wrap {
  145. position: relative;
  146. width: 100%;
  147. height: 100%;
  148. overflow: hidden;
  149. box-sizing: border-box;
  150. }
  151. .game-item {
  152. height: 100%;
  153. background: url("https://file.supermm.me/h5/wechat-h5/integral/personeBg001.jpg") no-repeat;
  154. background-size: 100% 100%;
  155. background-position: center center;
  156. border-radius: 100rpx;
  157. }
  158. </style>