index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. <template>
  2. <view>
  3. <view class='integral-details' :style="colorStyle">
  4. <view class='header'>
  5. <view class='my'>
  6. <view class='currentScore'>{{$t(`红包余额`)}}</view>
  7. <view class="scoreNum">{{userInfo.redMoney}}</view>
  8. <view class='line'></view>
  9. </view>
  10. <!-- <view class='my'>
  11. <view class='currentScore'>{{$t(`加速提现额度`)}}</view>
  12. <view class="scoreNum">{{userInfo.accBalance}}</view>
  13. <view class='line'></view>
  14. </view> -->
  15. </view>
  16. <view class='wrapper'>
  17. <view class='list' :hidden='current!=0'>
  18. <view class='item acea-row row-between-wrapper' v-for="(item,index) in integralList" :key="index">
  19. <view>
  20. <view class='state'>{{$t(item.source)}}</view>
  21. <view v-if="(item.sourceCode == 4 ||item.sourceCode == 6)">
  22. <view>手续费:{{item.chargeAmount}}</view>
  23. </view>
  24. <view>{{item.createTime}}</view>
  25. </view>
  26. <view>
  27. <view class='num font-color' v-if="item.type == 1">+{{item.fluctuantAmount}}</view>
  28. <view class='num' v-else>-{{item.fluctuantAmount}}</view>
  29. <view>余额:{{item.afterMoney}}</view>
  30. </view>
  31. </view>
  32. <view class='loadingicon acea-row row-center-wrapper' v-if="integralList.length>0">
  33. <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
  34. </view>
  35. <view v-if="integralList.length == 0">
  36. <emptyPage :title="$t(`暂无积分记录哦~`)"></emptyPage>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="op-area">
  41. <button formType="submit" @click="tixianEvent" class='sdw bnt bg-color'>{{$t(`提现`)}}</button>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. import {
  48. getUserInfo,
  49. redMoneyRecordList,
  50. } from '@/api/user.js';
  51. import dayjs from '@/plugin/dayjs/dayjs.min.js';
  52. import {
  53. toLogin
  54. } from '@/libs/login.js';
  55. import {
  56. mapGetters
  57. } from "vuex";
  58. // #ifdef MP
  59. import authorize from '@/components/Authorize';
  60. // #endif
  61. import emptyPage from '@/components/emptyPage.vue';
  62. import colors from '@/mixins/color'
  63. export default {
  64. components: {
  65. // #ifdef MP
  66. authorize,
  67. // #endif
  68. emptyPage
  69. },
  70. filters: {
  71. dateFormat: function(value) {
  72. return dayjs(value * 1000).format('YYYY-MM-DD');
  73. }
  74. },
  75. mixins: [colors],
  76. data() {
  77. return {
  78. current: 0,
  79. page: 1,
  80. limit: 10,
  81. integralList: [],
  82. userInfo: {},
  83. loadend: false,
  84. loading: false,
  85. loadTitle: this.$t(`加载更多`),
  86. isAuto: false, //没有授权的不会自动授权
  87. isShowAuth: false, //是否隐藏授权
  88. isTime: 0
  89. };
  90. },
  91. computed: mapGetters(['isLogin']),
  92. watch: {
  93. isLogin: {
  94. handler: function(newV, oldV) {
  95. if (newV) {
  96. this.getUserInfo();
  97. this.getIntegralList();
  98. }
  99. },
  100. deep: true
  101. }
  102. },
  103. onLoad() {
  104. if (this.isLogin) {
  105. this.getUserInfo();
  106. this.getIntegralList();
  107. } else {
  108. toLogin();
  109. }
  110. },
  111. /**
  112. * 页面上拉触底事件的处理函数
  113. */
  114. onReachBottom: function() {
  115. this.getIntegralList();
  116. },
  117. methods: {
  118. tixianEvent(){
  119. this.$util.Tips({
  120. title:this.$t(`请下载app进行提现操作!`)
  121. });
  122. },
  123. /**
  124. * 授权回调
  125. */
  126. onLoadFun: function() {
  127. this.getUserInfo();
  128. this.getIntegralList();
  129. },
  130. // 授权关闭
  131. authColse: function(e) {
  132. this.isShowAuth = e
  133. },
  134. getUserInfo: function() {
  135. let that = this;
  136. getUserInfo().then(function(res) {
  137. that.$set(that, 'userInfo', res.data);
  138. });
  139. },
  140. /**
  141. * 获取积分明细
  142. */
  143. getIntegralList: function() {
  144. let that = this;
  145. if (that.loading) return;
  146. if (that.loadend) return;
  147. that.loading = true;
  148. that.loadTitle = '';
  149. redMoneyRecordList({
  150. current: that.page,
  151. size: that.limit
  152. }).then(function(res) {
  153. let list = res.data,
  154. loadend = list.length < that.limit;
  155. that.integralList = that.$util.SplitArray(list, that.integralList);
  156. that.$set(that, 'integralList', that.integralList);
  157. that.page = that.page + 1;
  158. that.loading = false;
  159. that.loadend = loadend;
  160. that.loadTitle = loadend ? that.$t(`我也是有底线的`) : that.$t(`加载更多`);
  161. }, function(res) {
  162. this.loading = false;
  163. that.loadTitle = that.$t(`加载更多`);
  164. });
  165. },
  166. nav: function(current) {
  167. this.current = current;
  168. }
  169. }
  170. }
  171. </script>
  172. <style>
  173. .integral-details .header {
  174. // background-image: url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAoHBwkHBgoJCAkLCwoMDxkQDw4ODx4WFxIZJCAmJSMgIyIoLTkwKCo2KyIjMkQyNjs9QEBAJjBGS0U+Sjk/QD3/2wBDAQsLCw8NDx0QEB09KSMpPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT3/wgARCAHMAu4DAREAAhEBAxEB/8QAGQABAQEBAQEAAAAAAAAAAAAAAAECAwQF/8QAGQEBAQEBAQEAAAAAAAAAAAAAAAECAwUH/9oADAMBAAIQAxAAAAD5nh/QwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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dLBctl06IxIxvwJzwrpz4Ifp+w+D24vVdUiH6aMGR/VaJMhOrPgmP0/YSaIzFfuapSlKUyMjIyMjIyMjIyKUpS/GU6vOwTxTq02n2n//EACQRAAMAAgICAgIDAQAAAAAAAAABERIgAjBQYAMQQFExQZCw/9oACAEDAQE/AP8AmZ5GRWVlZkUvqlL1UT9Qpe5OCfpre9RTIpVun6W3rS9FE9U/SW9W+xPVPxdKUpSmRkUpSlKZFRUVfgN9yeq8HSlL+RWVmTMjJFX29G98kZoyW6ei8BfC16PZ8/0Nt6JtC5/vZenz65cm+jjygtFovTnwTH8f6Hwa24P+tV9oqMkZGRWV9lKXzrSY/jQ/jaI198XVoil/IpfOvgmP42cE1/Pgr56E8DS/5/QhCEIQhCEIQhCEIQhCEIQhNqZGRkZFMjIyMi7YmJiYmJiYmJiYGBgYmJiYmJiQnlmtoTaE2S9La6IRE6EvTp3QXqEJ1JCXqs2S8T//2Q==');
  175. background-repeat: no-repeat;
  176. background-size: 100% 100%;
  177. width: 100%;
  178. height: 210rpx;
  179. font-size: 72rpx;
  180. color: #fff;
  181. padding: 31rpx 0 45rpx 0;
  182. box-sizing: border-box;
  183. text-align: center;
  184. font-family: 'Guildford Pro';
  185. background-color: var(--view-theme);
  186. }
  187. .my {
  188. width: 50%;
  189. display: inline-block;
  190. /* float: left; */
  191. }
  192. .integral-details .header .currentScore {
  193. font-size: 26rpx;
  194. color: rgba(255, 255, 255, 0.8);
  195. text-align: center;
  196. margin-bottom: 11rpx;
  197. }
  198. .integral-details .header .scoreNum {
  199. font-family: "Guildford Pro";
  200. }
  201. .integral-details .header .line {
  202. width: 60rpx;
  203. height: 3rpx;
  204. background-color: #fff;
  205. margin: 20rpx auto 0 auto;
  206. }
  207. .integral-details .header .nav {
  208. font-size: 22rpx;
  209. color: rgba(255, 255, 255, 0.8);
  210. flex: 1;
  211. margin-top: 35rpx;
  212. }
  213. .integral-details .header .nav .item {
  214. width: 33.33%;
  215. text-align: center;
  216. }
  217. .integral-details .header .nav .item .num {
  218. color: #fff;
  219. font-size: 40rpx;
  220. margin-bottom: 5rpx;
  221. font-family: 'Guildford Pro';
  222. }
  223. .integral-details .wrapper .nav {
  224. flex: 1;
  225. width: 690rpx;
  226. border-radius: 20rpx 20rpx 0 0;
  227. margin: -96rpx auto 0 auto;
  228. background-color: #f7f7f7;
  229. height: 96rpx;
  230. font-size: 30rpx;
  231. color: #bbb;
  232. }
  233. .integral-details .wrapper .nav .item {
  234. text-align: center;
  235. width: 50%;
  236. }
  237. .integral-details .wrapper .nav .item.on {
  238. background-color: #fff;
  239. color: var(--view-theme);
  240. font-weight: bold;
  241. border-radius: 20rpx 0 0 0;
  242. }
  243. .integral-details .wrapper .nav .item:nth-of-type(2).on {
  244. border-radius: 0 20rpx 0 0;
  245. }
  246. .integral-details .wrapper .nav .item .iconfont {
  247. font-size: 38rpx;
  248. margin-right: 10rpx;
  249. }
  250. .integral-details .wrapper .list {
  251. background-color: #fff;
  252. padding: 24rpx 30rpx;
  253. }
  254. .integral-details .wrapper .list .tip {
  255. font-size: 25rpx;
  256. width: 690rpx;
  257. height: 60rpx;
  258. border-radius: 50rpx;
  259. background-color: #fff5e2;
  260. border: 1rpx solid #ffeac1;
  261. color: #c8a86b;
  262. padding: 0 20rpx;
  263. box-sizing: border-box;
  264. margin-bottom: 24rpx;
  265. }
  266. .integral-details .wrapper .list .tip .iconfont {
  267. font-size: 35rpx;
  268. margin-right: 15rpx;
  269. }
  270. .integral-details .wrapper .list .item {
  271. height: 124rpx;
  272. border-bottom: 1rpx solid #eee;
  273. font-size: 24rpx;
  274. color: #999;
  275. }
  276. .integral-details .wrapper .list .item .state {
  277. font-size: 28rpx;
  278. color: #282828;
  279. margin-bottom: 8rpx;
  280. }
  281. .integral-details .wrapper .list .item .num {
  282. font-size: 36rpx;
  283. font-family: 'Guildford Pro';
  284. color: #16AC57;
  285. }
  286. .integral-details .wrapper .list .item .num.font-color {
  287. color: #E93323 !important;
  288. }
  289. .integral-details .wrapper .list2 {
  290. background-color: #fff;
  291. padding: 24rpx 0;
  292. }
  293. .integral-details .wrapper .list2 .item {
  294. background-image: linear-gradient(to right, #fff7e7 0%, #fffdf9 100%);
  295. width: 690rpx;
  296. height: 180rpx;
  297. position: relative;
  298. border-radius: 10rpx;
  299. margin: 0 auto 20rpx auto;
  300. padding: 0 25rpx 0 180rpx;
  301. box-sizing: border-box;
  302. }
  303. .integral-details .wrapper .list2 .item .pictrue {
  304. width: 90rpx;
  305. height: 150rpx;
  306. position: absolute;
  307. bottom: 0;
  308. left: 45rpx;
  309. }
  310. .integral-details .wrapper .list2 .item .pictrue image {
  311. width: 100%;
  312. height: 100%;
  313. }
  314. .integral-details .wrapper .list2 .item .name {
  315. width: 285rpx;
  316. font-size: 30rpx;
  317. font-weight: bold;
  318. color: #c8a86b;
  319. }
  320. .integral-details .wrapper .list2 .item .earn {
  321. font-size: 26rpx;
  322. color: #c8a86b;
  323. border: 2rpx solid #c8a86b;
  324. text-align: center;
  325. line-height: 52rpx;
  326. height: 52rpx;
  327. width: 160rpx;
  328. border-radius: 50rpx;
  329. }
  330. .apply {
  331. top: 52rpx;
  332. right: 0;
  333. position: absolute;
  334. width: max-content;
  335. height: 56rpx;
  336. padding: 0 14rpx;
  337. background-color: #fff1db;
  338. color: #a56a15;
  339. font-size: 22rpx;
  340. border-radius: 30rpx 0 0 30rpx;
  341. display: flex;
  342. align-items: center;
  343. justify-content: center;
  344. }
  345. .op-area{
  346. position: fixed;
  347. bottom: 0;
  348. height: 100rpx;
  349. width: 100%;
  350. padding: 0 20px;
  351. background: white;
  352. }
  353. .op-area button{
  354. font-size: 32rpx;
  355. font-weight: 600;
  356. letter-spacing: 2px;
  357. border-radius: 50rpx;
  358. height: 80rpx;
  359. line-height: 80rpx;
  360. color: white;
  361. }
  362. </style>