money.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. <template>
  2. <view class="integral-details" ref="container">
  3. <view class="header">
  4. <view class="currentScore">当前余额</view>
  5. <view>{{ data.nowMoney }}</view>
  6. <view class="line"></view>
  7. </view>
  8. <view class="wrapper">
  9. <view class="nav acea-row">
  10. <view
  11. class="item acea-row row-center-wrapper"
  12. :class="current === navListIndex ? 'on' : ''"
  13. v-for="(item, navListIndex) in navList"
  14. :key="navListIndex"
  15. @click="nav(navListIndex)"
  16. >
  17. {{ item.name }}
  18. </view>
  19. </view>
  20. <view class="list" :hidden="current !== 0">
  21. <!--<view class="tip acea-row row-middle">-->
  22. <!--<text class="iconfont icon-shuoming"><text-->
  23. <!--&gt;提示:积分数值的高低会直接影响您的会员等级-->
  24. <!--</view>-->
  25. <view
  26. class="item acea-row row-between-wrapper"
  27. v-for="(item, listIndex) in list"
  28. :key="listIndex"
  29. >
  30. <view>
  31. <text class="state">{{ item.title }}</text>
  32. <div>{{ item.createTime }}</div>
  33. </view>
  34. <text class="num" v-if="item.pm == 1">+{{ item.number }}</text>
  35. <text class="num font-color-red" v-if="item.pm == 0">-{{ item.number }}</text>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. export default {
  43. name: "Integral",
  44. props: {},
  45. data: function() {
  46. return {
  47. navList: [
  48. { name: "分值明细"}
  49. // { name: "分值提升", icon: "icon-tishengfenzhi" }
  50. ],
  51. current: 0,
  52. where: {
  53. pageNum: 1,
  54. pageSize: 15
  55. },
  56. data: {
  57. sign: 1,
  58. integral: 1,
  59. all: 1
  60. },
  61. list: [],
  62. info: [],
  63. loaded: false,
  64. loading: false
  65. };
  66. },
  67. mounted: function() {
  68. this.getNowMoney();
  69. this.getInfo();
  70. },
  71. onReachBottom() {
  72. !this.loading && this.getInfo();
  73. },
  74. methods: {
  75. nav: function(index) {
  76. this.current = index;
  77. },
  78. getInfo: function() {
  79. let that = this;
  80. uni.showLoading({
  81. title: '正在查询'
  82. })
  83. this.$api.request('get','app/userBill/listMoney',that.where).then(
  84. res => {
  85. uni.hideLoading()
  86. that.loaded = res.total < that.where.pageSize;
  87. that.loadTitle = that.loaded ? "人家是有底线的" : "上拉加载更多";
  88. that.where.pageNum = that.where.pageNum + 1;
  89. that.list.push.apply(that.list, res.rows);
  90. },err => {
  91. uni.hideLoading()
  92. uni.showToast({
  93. title: err.msg || err.response.data.msg|| err.response.data.message,
  94. icon: 'none',
  95. duration: 2000
  96. });
  97. }
  98. );
  99. },
  100. getNowMoney: function() {
  101. let that = this;
  102. this.$api.request('get', 'user/app/getUser').then(res => {
  103. that.data.nowMoney = res.data.nowMoney
  104. })
  105. }
  106. }
  107. };
  108. </script>
  109. <style lang="less">
  110. .list {
  111. }
  112. /*积分详情*/
  113. .integral-details .header {
  114. background-image: url('https://kxmalls.oss-cn-hangzhou.aliyuncs.com/bg/bg.png');
  115. background-repeat: no-repeat;
  116. background-size: 100% 100%;
  117. width: 100%;
  118. height: 3.6 * 100rpx;
  119. font-size: 0.72 * 100rpx;
  120. color: #fff;
  121. padding: 0.31 * 100rpx 0 0.45 * 100rpx 0;
  122. text-align: center;
  123. font-family: 'GuildfordProBook 5';
  124. }
  125. .integral-details .header .currentScore {
  126. font-size: 0.26 * 100rpx;
  127. color: rgba(255, 255, 255, 0.8);
  128. text-align: center;
  129. margin-bottom: 0.05 * 100rpx;
  130. }
  131. .integral-details .header .line {
  132. width: 0.6 * 100rpx;
  133. height: 0.03 * 100rpx;
  134. background-color: #fff;
  135. margin: 0.2 * 100rpx auto 0 auto;
  136. }
  137. .integral-details .header .nav {
  138. font-size: 0.22 * 100rpx;
  139. color: rgba(255, 255, 255, 0.8);
  140. flex: 1;
  141. -o-flex: 1;
  142. -ms-flex: 1;
  143. margin-top: 0.35 * 100rpx;
  144. }
  145. .integral-details .header .nav .item {
  146. width: 33.33%;
  147. text-align: center;
  148. }
  149. .integral-details .header .nav .item .num {
  150. color: #fff;
  151. font-size: 0.4 * 100rpx;
  152. }
  153. .integral-details .wrapper .nav {
  154. flex: 1;
  155. -o-flex: 1;
  156. -ms-flex: 1;
  157. width: 6.9 * 100rpx;
  158. border-radius: 0.2 * 100rpx 0.2 * 100rpx 0 0;
  159. margin: -0.96 * 100rpx auto 0 auto;
  160. background-color: #f7f7f7;
  161. height: 0.96 * 100rpx;
  162. font-size: 0.3 * 100rpx;
  163. color: #bbb;
  164. }
  165. .integral-details .wrapper .nav .item {
  166. text-align: center;
  167. width: 100%;
  168. }
  169. /*.integral-details .wrapper .nav .item{text-align:center;width:50%;}*/
  170. .integral-details .wrapper .nav .item.on {
  171. background-color: #fff;
  172. color: #eb3729;
  173. font-weight: bold;
  174. border-radius: 0.2 * 100rpx 0.2 * 100rpx 0 0;
  175. }
  176. .integral-details .wrapper .nav .item .iconfont {
  177. font-size: 0.38 * 100rpx;
  178. margin-right: 0.1 * 100rpx;
  179. }
  180. .integral-details .wrapper .list {
  181. background-color: #fff;
  182. padding: 0.24 * 100rpx 0.3 * 100rpx;
  183. }
  184. .integral-details .wrapper .list .tip {
  185. font-size: 0.25 * 100rpx;
  186. width: 6.9 * 100rpx;
  187. height: 0.6 * 100rpx;
  188. border-radius: 0.5 * 100rpx;
  189. background-color: #fff5e2;
  190. border: 1px solid #ffeac1;
  191. color: #c8a86b;
  192. padding: 0 0.2 * 100rpx;
  193. margin-bottom: 0.24 * 100rpx;
  194. }
  195. .integral-details .wrapper .list .tip .iconfont {
  196. font-size: 0.35 * 100rpx;
  197. margin-right: 0.15 * 100rpx;
  198. }
  199. .integral-details .wrapper .list .item {
  200. height: 1.24 * 100rpx;
  201. border-bottom: 1px solid #eee;
  202. font-size: 0.24 * 100rpx;
  203. color: #999;
  204. }
  205. .integral-details .wrapper .list .item .state {
  206. font-size: 0.28 * 100rpx;
  207. color: #282828;
  208. margin-bottom: 0.08 * 100rpx;
  209. }
  210. .integral-details .wrapper .list .item .num {
  211. font-size: 0.36 * 100rpx;
  212. font-family: 'GuildfordProBook 5';
  213. color: #16ac57;
  214. }
  215. .integral-details .wrapper .list2 {
  216. background-color: #fff;
  217. padding: 0.24 * 100rpx 0;
  218. }
  219. .integral-details .wrapper .list2 .item {
  220. background-image: linear-gradient(to right, #fff7e7 0%, #fffdf9 100%);
  221. background-image: -moz-linear-gradient(to right, #fff7e7 0%, #fffdf9 100%);
  222. width: 6.9 * 100rpx;
  223. height: 1.8 * 100rpx;
  224. position: relative;
  225. border-radius: 0.1 * 100rpx;
  226. margin: 0 auto 0.2 * 100rpx auto;
  227. padding: 0 0.25 * 100rpx 0 1.8 * 100rpx;
  228. }
  229. .integral-details .wrapper .list2 .item .pictrue {
  230. width: 0.9 * 100rpx;
  231. height: 1.5 * 100rpx;
  232. position: absolute;
  233. bottom: 0;
  234. left: 0.45 * 100rpx;
  235. }
  236. .integral-details .wrapper .list2 .item .pictrue image {
  237. width: 100%;
  238. height: 100%;
  239. }
  240. .integral-details .wrapper .list2 .item .name {
  241. width: 2.85 * 100rpx;
  242. font-size: 0.3 * 100rpx;
  243. font-weight: bold;
  244. color: #c8a86b;
  245. }
  246. .integral-details .wrapper .list2 .item .earn {
  247. font-size: 0.26 * 100rpx;
  248. color: #c8a86b;
  249. border: 0.02 * 100rpx solid #c8a86b;
  250. text-align: center;
  251. line-height: 0.52 * 100rpx;
  252. height: 0.52 * 100rpx;
  253. width: 1.6 * 100rpx;
  254. border-radius: 0.5 * 100rpx;
  255. }
  256. .acea-row.row-center-wrapper{
  257. align-items: center;
  258. justify-content: center;
  259. }
  260. .acea-row.row-between-wrapper {
  261. align-items: center;
  262. justify-content: space-between;
  263. }
  264. .acea-row {
  265. display: flex;
  266. flex-wrap: wrap /* 辅助类 */;
  267. }
  268. </style>