account.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <template>
  2. <view class="container index">
  3. <nav-header>我的账户</nav-header>
  4. <!-- 我的余额 -->
  5. <view class="mymoney">
  6. <view class="">
  7. 我的余额
  8. </view>
  9. <view class="systemColor">
  10. {{money}} <text>元</text>
  11. </view>
  12. <view>付款时将优先使用余额抵扣</view>
  13. <view class="btn_box">
  14. <view class="" @click="href('/pages/my/wallet/recharge')">
  15. <view class="">
  16. <image src="/static/my/6014@2x.png"/> 充值 <image src="/static/my/5730@2x.png"/>
  17. </view>
  18. </view>
  19. <view class="" @click="href('/pages/my/wallet/whit')">
  20. <view class="">
  21. <image src="/static/my/6013@2x.png"/> 提现 <image src="/static/my/5730@2x.png"/>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <!-- 我的余额 结束-->
  27. <!-- 明细列表 -->
  28. <view class="content">
  29. <view class="title">账单明细</view>
  30. <view class="item" v-for="(item,index) in list" :key="index">
  31. <view class="">
  32. <view class="">
  33. {{item.name}}
  34. </view>
  35. <view class="">
  36. {{item.create_at}}
  37. </view>
  38. </view>
  39. <view class="orange" v-if="item.amount>0">
  40. {{item.amount}}
  41. </view>
  42. <view class="fff" v-else>
  43. {{item.amount}}
  44. </view>
  45. </view>
  46. </view>
  47. <!-- 明细列表 结束-->
  48. </view>
  49. </template>
  50. <script>
  51. import navHeader from "@/components/my/nav_header.vue"
  52. export default {
  53. components: {
  54. navHeader
  55. },
  56. data() {
  57. return {
  58. money: "",
  59. page: 0,
  60. list: []
  61. }
  62. },
  63. onReachBottom() {
  64. this.get_mx()
  65. console.log(1)
  66. },
  67. onShow() {
  68. this.api.get_user_info()
  69. this.money = uni.getStorageSync("user_info").balance
  70. this.get_mx()
  71. },
  72. methods: {
  73. get_mx() {
  74. this.api.mx(30, ++this.page).then(res => {
  75. res.data.data.forEach(ele => {
  76. this.list.push(ele)
  77. })
  78. })
  79. }
  80. }
  81. }
  82. </script>
  83. <style scoped>
  84. .index {
  85. box-sizing: border-box;
  86. padding-top: 100rpx;
  87. }
  88. .mymoney {
  89. width: 710rpx;
  90. height: 382rpx;
  91. background: #fff;
  92. margin: 24rpx auto;
  93. border-radius: 16rpx;
  94. box-sizing: border-box;
  95. background: linear-gradient(225deg, #FFBB80 0%, #F1984B 100%);
  96. border-radius: 40rpx;
  97. position: relative;
  98. }
  99. .mymoney>view:first-child {
  100. padding-top: 60rpx;
  101. font-size: 28rpx;
  102. font-weight: 400;
  103. text-align: center;
  104. color: #fff;
  105. }
  106. .mymoney>view:nth-child(2) {
  107. margin-top: 30rpx;
  108. text-align: center;
  109. font-size: 44rpx;
  110. font-weight: 400;
  111. color: #FFFFFF;
  112. }
  113. .mymoney>view:nth-child(2) text{
  114. font-size: 24rpx;
  115. }
  116. .mymoney>view:nth-child(3){
  117. color: #FFFFFF;
  118. font-size: 24rpx;
  119. text-align: center;
  120. margin-top: 20rpx;
  121. }
  122. .btn_box {
  123. position: absolute;
  124. left: 0;
  125. bottom: 0;
  126. font-size: 24rpx;
  127. display: flex;
  128. justify-content: space-between;
  129. align-items: center;
  130. box-sizing: border-box;
  131. width: 100%;
  132. height: 100rpx;
  133. background: linear-gradient(48deg, #FFBB80 0%, #F1984B 100%);
  134. border-radius: 0px 0px 16px 16px;
  135. }
  136. .btn_box>view {
  137. flex: 1;
  138. text-align: center;
  139. font-size: 28rpx;
  140. color: #FFFFFF;
  141. }
  142. .btn_box image:first-child{
  143. width: 54rpx;
  144. height: 54rpx;
  145. vertical-align: middle;
  146. margin-right: 10rpx;
  147. }
  148. .btn_box image:last-child{
  149. width: 34rpx;
  150. height: 34rpx;
  151. vertical-align: middle;
  152. margin-left: 10rpx;
  153. }
  154. .btn_box>view:nth-child(1) {
  155. position: relative;
  156. }
  157. .btn_box>view:nth-child(1)::after {
  158. content: '';
  159. position: absolute;
  160. top: 50%;
  161. right: 0;
  162. width: 3rpx;
  163. height: 40rpx;
  164. background: #fff;
  165. display: inline-block;
  166. transform: translateY(-50%);
  167. }
  168. .content {
  169. width: 710rpx;
  170. box-sizing: border-box;
  171. padding: 0 32rpx;
  172. margin: 0 auto;
  173. margin-top: 20rpx;
  174. }
  175. .content .title{
  176. font-size: 30rpx;
  177. font-weight: 400;
  178. color: #000000;
  179. padding: 30rpx 0;
  180. border-bottom: 1rpx solid #cacaca;
  181. }
  182. .content .item {
  183. display: flex;
  184. justify-content: space-between;
  185. box-sizing: border-box;
  186. padding-top: 20rpx;
  187. padding-bottom: 20rpx;
  188. }
  189. .item:last-of-type {
  190. border: none;
  191. }
  192. .item>view:first-child>view:last-child {
  193. margin-top: 10rpx;
  194. color: #999;
  195. font-size: 24rpx;
  196. }
  197. .item>view:first-child>view:first-child {
  198. font-size: 28rpx;
  199. }
  200. .item>view:last-child {
  201. align-self: center;
  202. font-size: 32rpx;
  203. color: #FF8000;
  204. }
  205. </style>