integral.vue 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216
  1. <<<<<<< HEAD
  2. <template>
  3. <view>
  4. <view class="top-cont">
  5. <!-- 背景图片 -->
  6. <image class="bg"
  7. src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/ed4a8ff0406747a68e40988b210d1c78.png"
  8. mode=""></image>
  9. <view class="top-inner">
  10. <!-- 这里是状态栏 -->
  11. <view class="fixed-top-box" :style="{ background: bg }">
  12. <view class="status_bar" :style="{height: statusBarHeight}"></view>
  13. <view class="back-box" @click="back">
  14. <text class="title">我的积分</text>
  15. <text></text>
  16. </view>
  17. </view>
  18. <!-- 顶部固定后站位元素 -->
  19. <view style="padding-bottom: 88upx;">
  20. <view :style="{height: statusBarHeight}"></view>
  21. </view>
  22. <!-- 可用积分 -->
  23. <view class="available-points">
  24. <text class="label">可用积分</text>
  25. <text class="num">{{integral}}</text>
  26. </view>
  27. <view class="content">
  28. <!-- 积分列表 -->
  29. <view class="points-cont">
  30. <!-- 列表 -->
  31. <view class="point-list">
  32. <view v-for="(item,index) in list" :key="index" class="item">
  33. <view class="left">
  34. <text class="title">
  35. <!-- {{item.logTypeName}} -->
  36. <!-- 直播间完课积分 -->
  37. {{utils.getDictLabel2Name(typeOptions,item.logType)}}
  38. </text>
  39. <view class="time">{{item.createTime}}</view>
  40. </view>
  41. <view class="right">
  42. <text v-if="item.integral<0" class="less">{{item.integral}}</text>
  43. <text v-else class="add">+{{item.integral}}</text>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </template>
  53. <script>
  54. // import {
  55. // getUserIntegralInfo
  56. // } from '@/api/living.js' // 积分
  57. // import {
  58. // completionRecords,
  59. // completionInfo,doSign
  60. // } from '@/api/integral.js'
  61. import {getUserIntegralLogsList,getUserSign} from '@/api/integral';
  62. import {getDictByKey} from '@/api/common.js'
  63. // import {getUserSign,getUserIntegralLogsList,doSign} from '@/api/integral';
  64. // import {
  65. // doSign
  66. // } from '@/api/integral';
  67. export default {
  68. comments() {
  69. Loading
  70. },
  71. data() {
  72. return {
  73. totalDays: null,
  74. records: null,
  75. liveId: 712,
  76. signNum: 0,
  77. typeOptions: [],
  78. top: 0,
  79. integral: 0,
  80. sign: [],
  81. // 状态栏的高度
  82. statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
  83. // tab切换
  84. // {lable:'获得',value:1},{lable:'消耗',value:2}
  85. // tags: [{lable:'最近十条',value:0},],
  86. // 选中的tab
  87. tabIndex: 0,
  88. current: 0,
  89. page: {
  90. type: 0,
  91. page: 1,
  92. pageSize: 10
  93. },
  94. list: [],
  95. loaded: false,
  96. loading: false
  97. };
  98. },
  99. onLoad(option) {
  100. this.getDictByKey("sys_integral_log_type");
  101. if (option.liveId) {
  102. this.liveId = option.liveId
  103. }
  104. console.log("进入积分页面了")
  105. // this.integrallogs()
  106. // this.getUserIntegralInfo()
  107. // this.completionRecords()
  108. // this.completionInfo()
  109. this.getUserSign()
  110. this.getUserIntegralLogsList();
  111. },
  112. computed: {
  113. // 计算属性的 getter
  114. bg: function() {
  115. return 'rgba(255,142,60, ' + this.top / 30 + ')';
  116. },
  117. },
  118. methods: {
  119. // integrallogs() {
  120. // integrallogs(data).then((res) => {
  121. // if (res.code == 200) {
  122. // console.log("用户领取看课积分", res)
  123. // // receiveList
  124. // }
  125. // }).catch((error) => {});
  126. // },
  127. // 查询用户积分领取记录
  128. // completionRecords() {
  129. // if (!this.liveId) return;
  130. // const data = {
  131. // liveId: this.liveId
  132. // }
  133. // completionRecords(data).then((res) => {
  134. // if (res.code == 200) {
  135. // this.list = res.data
  136. // console.log("查询用户积分领取记录", res)
  137. // }
  138. // }).catch((error) => {
  139. // });
  140. // },
  141. //查询用户积分余额和看直播信息统计
  142. // completionInfo() {
  143. // if (!this.liveId) return;
  144. // const data = {
  145. // liveId: this.liveId
  146. // }
  147. // completionInfo(data).then((res) => {
  148. // if (res.code == 200) {
  149. // this.integral = res.data.integral
  150. // this.records = res.data.records
  151. // this.totalDays = res.data.totalDays
  152. // console.log("查询用户积分余额和看直播信息统计", res)
  153. // }
  154. // }).catch((error) => {
  155. // });
  156. // },
  157. // doSign() {
  158. // var data = {};
  159. // // uni.showLoading({
  160. // // title:"正在加载中..."
  161. // // })
  162. // doSign(data).then(
  163. // res => {
  164. // // uni.hideLoading()
  165. // if (res.code == 200) {
  166. // uni.showToast({
  167. // icon: 'success',
  168. // title: res.msg,
  169. // });
  170. // this.list = [];
  171. // this.page.page = 1;
  172. // this.list = [];
  173. // this.loaded = false;
  174. // this.loading = false;
  175. // this.getUserIntegralLogsList();
  176. // this.getUserSign();
  177. // } else {
  178. // uni.showToast({
  179. // icon: 'none',
  180. // title: res.msg,
  181. // });
  182. // }
  183. // },
  184. // rej => {}
  185. // );
  186. // },
  187. getUserSign() {
  188. getUserSign().then(
  189. res => {
  190. if (res.code == 200) {
  191. this.data = res.member;
  192. this.signNum = res.signNum;
  193. this.isDaySign = res.isDaySign;
  194. this.integral = res.integral;
  195. this.sign = JSON.parse(res.sign);
  196. } else {
  197. uni.showToast({
  198. icon: 'none',
  199. title: "请求失败",
  200. });
  201. }
  202. },
  203. rej => {}
  204. );
  205. },
  206. // // 积分
  207. // getUserIntegralInfo() {
  208. // uni.showLoading({
  209. // title: "正在加载中..."
  210. // })
  211. // getUserIntegralInfo().then(res => {
  212. // uni.hideLoading()
  213. // if (res.code == 200) {
  214. // console.log("积分>>", res)
  215. // // 处理列表数据,将"积分"替换为"积分"
  216. // this.list = res.data.logs.map(item => {
  217. // return {
  218. // ...item,
  219. // logTypeName: item.logTypeName ? item.logTypeName.replace(/积分/g, '积分') :
  220. // item.logTypeName
  221. // }
  222. // })
  223. // this.integral = res.data.integral
  224. // }
  225. // }).catch(error => {
  226. // console.error("获取积分数据失败:", error);
  227. // });
  228. // },
  229. getDictByKey(key) {
  230. var data = {
  231. key: key
  232. }
  233. getDictByKey(data).then(
  234. res => {
  235. if (res.code == 200) {
  236. this.typeOptions = res.data;
  237. }
  238. },
  239. err => {}
  240. );
  241. },
  242. getUserIntegralLogsList() {
  243. let that = this;
  244. if (that.loaded == true || that.loading == true) return;
  245. that.loading = true;
  246. uni.showLoading({
  247. title: "加载中..."
  248. })
  249. getUserIntegralLogsList(that.page).then(
  250. res => {
  251. that.loading = false;
  252. that.loaded = res.data.list.length < that.page.pageSize;
  253. that.page.page = that.page.page + 1;
  254. that.list.push.apply(that.list, res.data.list);
  255. uni.hideLoading()
  256. },
  257. err => {
  258. uni.hideLoading()
  259. uni.showToast({
  260. title: err.msg,
  261. icon: 'none',
  262. duration: 2000
  263. });
  264. }
  265. );
  266. },
  267. // 返回上一页
  268. back() {
  269. uni.navigateBack()
  270. },
  271. // tab选择
  272. // tabChange(item) {
  273. // console.log(item)
  274. // this.tabIndex = item.value
  275. // this.page.type=this.tabIndex;
  276. // this.page.page=1;
  277. // this.list=[];
  278. // this.loaded=false;
  279. // this.loading=false;
  280. // this.getUserIntegralLogsList();
  281. // }
  282. }
  283. }
  284. </script>
  285. <style lang="scss">
  286. .fixed-top-box {
  287. width: 100%;
  288. position: fixed;
  289. top: 0;
  290. left: 0;
  291. z-index: 1000;
  292. transition: all 0.5s;
  293. }
  294. .top-cont {
  295. width: 100%;
  296. height: 654upx;
  297. position: relative;
  298. .bg {
  299. width: 100%;
  300. height: 100%;
  301. position: absolute;
  302. top: 0;
  303. left: 0;
  304. z-index: 1;
  305. }
  306. .top-inner {
  307. width: 100%;
  308. height: 100%;
  309. position: absolute;
  310. top: 0;
  311. left: 0;
  312. z-index: 2;
  313. .back-box {
  314. height: 88upx;
  315. padding-left: 22upx;
  316. display: flex;
  317. align-items: center;
  318. justify-content: space-between;
  319. padding: 0 20upx;
  320. image {
  321. width: 40upx;
  322. height: 40upx;
  323. }
  324. .title {
  325. font-size: 36upx;
  326. font-family: PingFang SC;
  327. font-weight: 500;
  328. color: #FFFFFF;
  329. }
  330. }
  331. .available-points {
  332. margin-top: 140upx;
  333. display: flex;
  334. flex-direction: column;
  335. align-items: center;
  336. justify-content: center;
  337. .label {
  338. font-size: 30upx;
  339. font-family: PingFang SC;
  340. font-weight: bold;
  341. color: #FFFFFF;
  342. line-height: 1;
  343. }
  344. .num {
  345. font-size: 80upx;
  346. font-family: Gilroy;
  347. font-weight: 500;
  348. color: #FFFFFF;
  349. line-height: 1;
  350. margin-top: 28upx;
  351. }
  352. }
  353. .singn-content {
  354. padding: 0 20upx;
  355. margin-top: 50upx;
  356. }
  357. .sign-in-box {
  358. height: 380upx;
  359. background: #FFFFFF;
  360. border-radius: 16upx;
  361. .inner {
  362. padding: 40upx 30upx;
  363. .title-box {
  364. font-size: 26upx;
  365. font-family: PingFang SC;
  366. font-weight: 500;
  367. color: #666666;
  368. line-height: 1;
  369. .num {
  370. font-size: 32upx;
  371. font-family: PingFang SC;
  372. font-weight: Bold;
  373. color: #FF7511;
  374. margin: 0 10upx;
  375. line-height: 1;
  376. }
  377. }
  378. .sign-list {
  379. display: flex;
  380. align-items: center;
  381. justify-content: space-between;
  382. margin-top: 40upx;
  383. .item {
  384. display: flex;
  385. justify-content: center;
  386. .right {
  387. display: flex;
  388. flex-direction: column;
  389. align-items: center;
  390. justify-content: center;
  391. image {
  392. width: 44upx;
  393. height: 44upx;
  394. margin-bottom: 20upx;
  395. }
  396. .text {
  397. font-size: 24upx;
  398. font-family: PingFang SC;
  399. font-weight: 500;
  400. color: #FF7511;
  401. line-height: 1;
  402. white-space: nowrap;
  403. }
  404. }
  405. .line {
  406. width: 34upx;
  407. height: 4upx;
  408. background: #F6CDA7;
  409. border-radius: 2upx;
  410. margin-top: 22upx;
  411. }
  412. &:first-child {
  413. .line {
  414. display: none;
  415. }
  416. }
  417. &.active {
  418. .line {
  419. background: #FF8E3C;
  420. }
  421. }
  422. }
  423. }
  424. }
  425. .sign-btn-box {
  426. padding: 0 14upx;
  427. .btn {
  428. width: 100%;
  429. height: 88upx;
  430. box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.05);
  431. background-color: #FF7511;
  432. border-radius: 44rpx;
  433. display: flex;
  434. justify-content: center;
  435. align-items: center;
  436. image {
  437. width: 32upx;
  438. height: 32upx;
  439. }
  440. .text {
  441. font-size: 30upx;
  442. font-family: PingFang SC;
  443. font-weight: bold;
  444. color: #FFFFFF;
  445. line-height: 1;
  446. }
  447. }
  448. }
  449. }
  450. }
  451. }
  452. .content {
  453. margin-top: 20upx;
  454. padding: 0 20upx 40upx;
  455. .points-cont {
  456. background-color: #FFFFFF;
  457. border-radius: 16upx;
  458. .pub-tab-box {
  459. padding: 0 80upx;
  460. .tab-inner {
  461. height: 88upx;
  462. line-height: 88upx;
  463. display: flex;
  464. align-items: center;
  465. justify-content: space-between;
  466. }
  467. .item {
  468. font-size: 28upx;
  469. white-space: nowrap;
  470. line-height: 1;
  471. font-family: PingFang SC;
  472. font-weight: 500;
  473. color: #666666;
  474. display: flex;
  475. align-items: center;
  476. justify-content: center;
  477. &.active {
  478. font-weight: bold;
  479. color: #333333;
  480. }
  481. .text {
  482. position: relative;
  483. z-index: 1;
  484. }
  485. .tab-bg {
  486. width: 72upx;
  487. height: 28upx;
  488. position: absolute;
  489. top: 17upx;
  490. left: 50%;
  491. transform: translateX(-36upx);
  492. z-index: -1;
  493. }
  494. }
  495. }
  496. .point-list {
  497. padding: 0 30upx;
  498. .item {
  499. padding: 30upx 0;
  500. display: flex;
  501. align-items: center;
  502. justify-content: space-between;
  503. border-bottom: 1px solid #F0F0F0;
  504. &:last-child {
  505. border-bottom: none;
  506. }
  507. .left {
  508. .title {
  509. font-size: 28upx;
  510. font-family: PingFang SC;
  511. font-weight: 500;
  512. color: #111111;
  513. line-height: 1;
  514. }
  515. .time {
  516. font-size: 24upx;
  517. font-family: PingFang SC;
  518. font-weight: 500;
  519. color: #999999;
  520. line-height: 1;
  521. margin-top: 22upx;
  522. }
  523. }
  524. .right {
  525. .add {
  526. font-size: 28upx;
  527. font-family: PingFang SC;
  528. font-weight: 500;
  529. color: #111111;
  530. }
  531. .less {
  532. font-size: 28upx;
  533. font-family: PingFang SC;
  534. font-weight: 500;
  535. color: #F56C6C;
  536. }
  537. }
  538. }
  539. }
  540. }
  541. }
  542. =======
  543. <template>
  544. <view>
  545. <view class="top-cont">
  546. <!-- 背景图片 -->
  547. <image class="bg"
  548. src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/ed4a8ff0406747a68e40988b210d1c78.png"
  549. mode=""></image>
  550. <view class="top-inner">
  551. <!-- 这里是状态栏 -->
  552. <view class="fixed-top-box" :style="{ background: bg }">
  553. <view class="status_bar" :style="{height: statusBarHeight}"></view>
  554. <view class="back-box" @click="back">
  555. <text class="title">我的积分</text>
  556. <text></text>
  557. </view>
  558. </view>
  559. <!-- 顶部固定后站位元素 -->
  560. <view style="padding-bottom: 88upx;">
  561. <view :style="{height: statusBarHeight}"></view>
  562. </view>
  563. <!-- 可用积分 -->
  564. <view class="available-points">
  565. <text class="label">可用积分</text>
  566. <text class="num">{{integral}}</text>
  567. </view>
  568. <view class="content">
  569. <!-- 积分列表 -->
  570. <view class="points-cont">
  571. <!-- 列表 -->
  572. <view class="point-list">
  573. <view v-for="(item,index) in list" :key="index" class="item">
  574. <view class="left">
  575. <text class="title">
  576. <!-- {{item.logTypeName}} -->
  577. <!-- 直播间完课积分 -->
  578. {{utils.getDictLabel2Name(typeOptions,item.logType)}}
  579. </text>
  580. <view class="time">{{item.createTime}}</view>
  581. </view>
  582. <view class="right">
  583. <text v-if="item.integral<0" class="less">{{item.integral}}</text>
  584. <text v-else class="add">+{{item.integral}}</text>
  585. </view>
  586. </view>
  587. </view>
  588. </view>
  589. </view>
  590. </view>
  591. </view>
  592. </view>
  593. </template>
  594. <script>
  595. // import {
  596. // getUserIntegralInfo
  597. // } from '@/api/living.js' // 积分
  598. // import {
  599. // completionRecords,
  600. // completionInfo,doSign
  601. // } from '@/api/integral.js'
  602. import {getUserIntegralLogsList,getUserSign} from '@/api/integral';
  603. import {getDictByKey} from '@/api/common.js'
  604. // import {getUserSign,getUserIntegralLogsList,doSign} from '@/api/integral';
  605. // import {
  606. // doSign
  607. // } from '@/api/integral';
  608. export default {
  609. comments() {
  610. Loading
  611. },
  612. data() {
  613. return {
  614. totalDays: null,
  615. records: null,
  616. liveId: 712,
  617. signNum: 0,
  618. typeOptions: [],
  619. top: 0,
  620. integral: 0,
  621. sign: [],
  622. // 状态栏的高度
  623. statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
  624. // tab切换
  625. // {lable:'获得',value:1},{lable:'消耗',value:2}
  626. // tags: [{lable:'最近十条',value:0},],
  627. // 选中的tab
  628. tabIndex: 0,
  629. current: 0,
  630. page: {
  631. type: 0,
  632. page: 1,
  633. pageSize: 10
  634. },
  635. list: [],
  636. loaded: false,
  637. loading: false
  638. };
  639. },
  640. onLoad(option) {
  641. this.getDictByKey("sys_integral_log_type");
  642. if (option.liveId) {
  643. this.liveId = option.liveId
  644. }
  645. console.log("进入积分页面了")
  646. // this.integrallogs()
  647. // this.getUserIntegralInfo()
  648. // this.completionRecords()
  649. // this.completionInfo()
  650. this.getUserSign()
  651. this.getUserIntegralLogsList();
  652. },
  653. computed: {
  654. // 计算属性的 getter
  655. bg: function() {
  656. return 'rgba(255,142,60, ' + this.top / 30 + ')';
  657. },
  658. },
  659. methods: {
  660. // integrallogs() {
  661. // integrallogs(data).then((res) => {
  662. // if (res.code == 200) {
  663. // console.log("用户领取看课积分", res)
  664. // // receiveList
  665. // }
  666. // }).catch((error) => {});
  667. // },
  668. // 查询用户积分领取记录
  669. // completionRecords() {
  670. // if (!this.liveId) return;
  671. // const data = {
  672. // liveId: this.liveId
  673. // }
  674. // completionRecords(data).then((res) => {
  675. // if (res.code == 200) {
  676. // this.list = res.data
  677. // console.log("查询用户积分领取记录", res)
  678. // }
  679. // }).catch((error) => {
  680. // });
  681. // },
  682. //查询用户积分余额和看直播信息统计
  683. // completionInfo() {
  684. // if (!this.liveId) return;
  685. // const data = {
  686. // liveId: this.liveId
  687. // }
  688. // completionInfo(data).then((res) => {
  689. // if (res.code == 200) {
  690. // this.integral = res.data.integral
  691. // this.records = res.data.records
  692. // this.totalDays = res.data.totalDays
  693. // console.log("查询用户积分余额和看直播信息统计", res)
  694. // }
  695. // }).catch((error) => {
  696. // });
  697. // },
  698. // doSign() {
  699. // var data = {};
  700. // // uni.showLoading({
  701. // // title:"正在加载中..."
  702. // // })
  703. // doSign(data).then(
  704. // res => {
  705. // // uni.hideLoading()
  706. // if (res.code == 200) {
  707. // uni.showToast({
  708. // icon: 'success',
  709. // title: res.msg,
  710. // });
  711. // this.list = [];
  712. // this.page.page = 1;
  713. // this.list = [];
  714. // this.loaded = false;
  715. // this.loading = false;
  716. // this.getUserIntegralLogsList();
  717. // this.getUserSign();
  718. // } else {
  719. // uni.showToast({
  720. // icon: 'none',
  721. // title: res.msg,
  722. // });
  723. // }
  724. // },
  725. // rej => {}
  726. // );
  727. // },
  728. getUserSign() {
  729. getUserSign().then(
  730. res => {
  731. if (res.code == 200) {
  732. this.data = res.member;
  733. this.signNum = res.signNum;
  734. this.isDaySign = res.isDaySign;
  735. this.integral = res.integral;
  736. this.sign = JSON.parse(res.sign);
  737. } else {
  738. uni.showToast({
  739. icon: 'none',
  740. title: "请求失败",
  741. });
  742. }
  743. },
  744. rej => {}
  745. );
  746. },
  747. // // 积分
  748. // getUserIntegralInfo() {
  749. // uni.showLoading({
  750. // title: "正在加载中..."
  751. // })
  752. // getUserIntegralInfo().then(res => {
  753. // uni.hideLoading()
  754. // if (res.code == 200) {
  755. // console.log("积分>>", res)
  756. // // 处理列表数据,将"积分"替换为"积分"
  757. // this.list = res.data.logs.map(item => {
  758. // return {
  759. // ...item,
  760. // logTypeName: item.logTypeName ? item.logTypeName.replace(/积分/g, '积分') :
  761. // item.logTypeName
  762. // }
  763. // })
  764. // this.integral = res.data.integral
  765. // }
  766. // }).catch(error => {
  767. // console.error("获取积分数据失败:", error);
  768. // });
  769. // },
  770. getDictByKey(key) {
  771. var data = {
  772. key: key
  773. }
  774. getDictByKey(data).then(
  775. res => {
  776. if (res.code == 200) {
  777. this.typeOptions = res.data;
  778. }
  779. },
  780. err => {}
  781. );
  782. },
  783. getUserIntegralLogsList() {
  784. let that = this;
  785. if (that.loaded == true || that.loading == true) return;
  786. that.loading = true;
  787. uni.showLoading({
  788. title: "加载中..."
  789. })
  790. getUserIntegralLogsList(that.page).then(
  791. res => {
  792. that.loading = false;
  793. that.loaded = res.data.list.length < that.page.pageSize;
  794. that.page.page = that.page.page + 1;
  795. that.list.push.apply(that.list, res.data.list);
  796. uni.hideLoading()
  797. },
  798. err => {
  799. uni.hideLoading()
  800. uni.showToast({
  801. title: err.msg,
  802. icon: 'none',
  803. duration: 2000
  804. });
  805. }
  806. );
  807. },
  808. // 返回上一页
  809. back() {
  810. uni.navigateBack()
  811. },
  812. // tab选择
  813. // tabChange(item) {
  814. // console.log(item)
  815. // this.tabIndex = item.value
  816. // this.page.type=this.tabIndex;
  817. // this.page.page=1;
  818. // this.list=[];
  819. // this.loaded=false;
  820. // this.loading=false;
  821. // this.getUserIntegralLogsList();
  822. // }
  823. }
  824. }
  825. </script>
  826. <style lang="scss">
  827. .fixed-top-box {
  828. width: 100%;
  829. position: fixed;
  830. top: 0;
  831. left: 0;
  832. z-index: 1000;
  833. transition: all 0.5s;
  834. }
  835. .top-cont {
  836. width: 100%;
  837. height: 654upx;
  838. position: relative;
  839. .bg {
  840. width: 100%;
  841. height: 100%;
  842. position: absolute;
  843. top: 0;
  844. left: 0;
  845. z-index: 1;
  846. }
  847. .top-inner {
  848. width: 100%;
  849. height: 100%;
  850. position: absolute;
  851. top: 0;
  852. left: 0;
  853. z-index: 2;
  854. .back-box {
  855. height: 88upx;
  856. padding-left: 22upx;
  857. display: flex;
  858. align-items: center;
  859. justify-content: space-between;
  860. padding: 0 20upx;
  861. image {
  862. width: 40upx;
  863. height: 40upx;
  864. }
  865. .title {
  866. font-size: 36upx;
  867. font-family: PingFang SC;
  868. font-weight: 500;
  869. color: #FFFFFF;
  870. }
  871. }
  872. .available-points {
  873. margin-top: 140upx;
  874. display: flex;
  875. flex-direction: column;
  876. align-items: center;
  877. justify-content: center;
  878. .label {
  879. font-size: 30upx;
  880. font-family: PingFang SC;
  881. font-weight: bold;
  882. color: #FFFFFF;
  883. line-height: 1;
  884. }
  885. .num {
  886. font-size: 80upx;
  887. font-family: Gilroy;
  888. font-weight: 500;
  889. color: #FFFFFF;
  890. line-height: 1;
  891. margin-top: 28upx;
  892. }
  893. }
  894. .singn-content {
  895. padding: 0 20upx;
  896. margin-top: 50upx;
  897. }
  898. .sign-in-box {
  899. height: 380upx;
  900. background: #FFFFFF;
  901. border-radius: 16upx;
  902. .inner {
  903. padding: 40upx 30upx;
  904. .title-box {
  905. font-size: 26upx;
  906. font-family: PingFang SC;
  907. font-weight: 500;
  908. color: #666666;
  909. line-height: 1;
  910. .num {
  911. font-size: 32upx;
  912. font-family: PingFang SC;
  913. font-weight: Bold;
  914. color: #FF7511;
  915. margin: 0 10upx;
  916. line-height: 1;
  917. }
  918. }
  919. .sign-list {
  920. display: flex;
  921. align-items: center;
  922. justify-content: space-between;
  923. margin-top: 40upx;
  924. .item {
  925. display: flex;
  926. justify-content: center;
  927. .right {
  928. display: flex;
  929. flex-direction: column;
  930. align-items: center;
  931. justify-content: center;
  932. image {
  933. width: 44upx;
  934. height: 44upx;
  935. margin-bottom: 20upx;
  936. }
  937. .text {
  938. font-size: 24upx;
  939. font-family: PingFang SC;
  940. font-weight: 500;
  941. color: #FF7511;
  942. line-height: 1;
  943. white-space: nowrap;
  944. }
  945. }
  946. .line {
  947. width: 34upx;
  948. height: 4upx;
  949. background: #F6CDA7;
  950. border-radius: 2upx;
  951. margin-top: 22upx;
  952. }
  953. &:first-child {
  954. .line {
  955. display: none;
  956. }
  957. }
  958. &.active {
  959. .line {
  960. background: #FF8E3C;
  961. }
  962. }
  963. }
  964. }
  965. }
  966. .sign-btn-box {
  967. padding: 0 14upx;
  968. .btn {
  969. width: 100%;
  970. height: 88upx;
  971. box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.05);
  972. background-color: #FF7511;
  973. border-radius: 44rpx;
  974. display: flex;
  975. justify-content: center;
  976. align-items: center;
  977. image {
  978. width: 32upx;
  979. height: 32upx;
  980. }
  981. .text {
  982. font-size: 30upx;
  983. font-family: PingFang SC;
  984. font-weight: bold;
  985. color: #FFFFFF;
  986. line-height: 1;
  987. }
  988. }
  989. }
  990. }
  991. }
  992. }
  993. .content {
  994. margin-top: 20upx;
  995. padding: 0 20upx 40upx;
  996. .points-cont {
  997. background-color: #FFFFFF;
  998. border-radius: 16upx;
  999. .pub-tab-box {
  1000. padding: 0 80upx;
  1001. .tab-inner {
  1002. height: 88upx;
  1003. line-height: 88upx;
  1004. display: flex;
  1005. align-items: center;
  1006. justify-content: space-between;
  1007. }
  1008. .item {
  1009. font-size: 28upx;
  1010. white-space: nowrap;
  1011. line-height: 1;
  1012. font-family: PingFang SC;
  1013. font-weight: 500;
  1014. color: #666666;
  1015. display: flex;
  1016. align-items: center;
  1017. justify-content: center;
  1018. &.active {
  1019. font-weight: bold;
  1020. color: #333333;
  1021. }
  1022. .text {
  1023. position: relative;
  1024. z-index: 1;
  1025. }
  1026. .tab-bg {
  1027. width: 72upx;
  1028. height: 28upx;
  1029. position: absolute;
  1030. top: 17upx;
  1031. left: 50%;
  1032. transform: translateX(-36upx);
  1033. z-index: -1;
  1034. }
  1035. }
  1036. }
  1037. .point-list {
  1038. padding: 0 30upx;
  1039. .item {
  1040. padding: 30upx 0;
  1041. display: flex;
  1042. align-items: center;
  1043. justify-content: space-between;
  1044. border-bottom: 1px solid #F0F0F0;
  1045. &:last-child {
  1046. border-bottom: none;
  1047. }
  1048. .left {
  1049. .title {
  1050. font-size: 28upx;
  1051. font-family: PingFang SC;
  1052. font-weight: 500;
  1053. color: #111111;
  1054. line-height: 1;
  1055. }
  1056. .time {
  1057. font-size: 24upx;
  1058. font-family: PingFang SC;
  1059. font-weight: 500;
  1060. color: #999999;
  1061. line-height: 1;
  1062. margin-top: 22upx;
  1063. }
  1064. }
  1065. .right {
  1066. .add {
  1067. font-size: 28upx;
  1068. font-family: PingFang SC;
  1069. font-weight: 500;
  1070. color: #111111;
  1071. }
  1072. .less {
  1073. font-size: 28upx;
  1074. font-family: PingFang SC;
  1075. font-weight: 500;
  1076. color: #F56C6C;
  1077. }
  1078. }
  1079. }
  1080. }
  1081. }
  1082. }
  1083. >>>>>>> db97a32e991ee7a9b5a59978a4bee9ad519591ce
  1084. </style>