mypoint.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <view style="position: relative;">
  3. <!-- 胶囊 -->
  4. <mvBar :mysNavConfig="mysNavConfig"></mvBar>
  5. <view :style="{marginTop:navH}"></view>
  6. <view class="head">
  7. <view class="show-point">
  8. <p style="font-size: 36rpx">当前积分</p>
  9. <p style="margin-top: 20rpx;font-size: 36rpx;font-weight: 600;">0</p>
  10. </view>
  11. </view>
  12. <!--
  13. <view class="content">
  14. <view class="point-card">
  15. <view class="point-card-left">
  16. <p>成团新用户</p>
  17. <p style="margin-top: 20rpx;font-size: 32rpx;">2022-7-12 14:00</p>
  18. </view>
  19. <view class="point-card-right">
  20. <p>+100</p>
  21. </view>
  22. </view>
  23. <view class="point-card">
  24. <view class="point-card-left">
  25. <p>成团新用户</p>
  26. <p style="margin-top: 20rpx;font-size: 32rpx;">2022-7-12 14:00</p>
  27. </view>
  28. <view class="point-card-right">
  29. <p>+100</p>
  30. </view>
  31. </view>
  32. </view> -->
  33. </view>
  34. </template>
  35. <script>
  36. import mvBar from "@/components/mys_navBar/mysNavBar";
  37. import {
  38. fansview
  39. } from '@/components/utils.js';
  40. export default {
  41. components: {
  42. mvBar,
  43. },
  44. data() {
  45. return {
  46. navH: getApp().globalData.navHeight,
  47. mysNavConfig: {
  48. /* 开启单页显示首页图标 */
  49. isHome: true,
  50. /* 固定导航 */
  51. navFixed: true,
  52. /* 标题 (屏幕中心居中 两边图标中心居中使用slot center1) */
  53. navTitle: {
  54. text: "创作者积分明细",
  55. color: "",
  56. fontSize: "32rpx", // px upx rpx
  57. fontWeight: "normal", // 100 - 700
  58. },
  59. btnType: "type2",
  60. onLeftClick: "/pages/mycenter/mycenter",
  61. /* type2 按钮 */
  62. type2Config: {
  63. // 左图标
  64. leftPath: "/static/img/png2.png",
  65. // 右图标
  66. rightPath: "/static/img/png4.png",
  67. // 圆角
  68. radius: "40rpx",
  69. },
  70. },
  71. }
  72. },
  73. async onLoad(options) {
  74. // 判断登录
  75. await this.isLogin();
  76. if (this.token === '') {
  77. uni.showModal({
  78. content: '请先登录',
  79. success: function(res) {
  80. if (res.confirm) {
  81. uni.navigateTo({
  82. url: '/pages/login/login'
  83. });
  84. } else if (res.cancel) {
  85. uni.navigateBack();
  86. }
  87. }
  88. });
  89. }
  90. },
  91. methods: {
  92. // 判断登陆是否过期
  93. isLogin() {
  94. return this.$https.get('/youngee/c/t/g/is-login')
  95. .then(res => {
  96. if (res.data.code === 403) {
  97. // 登陆已失效
  98. this.token = ""
  99. uni.clearStorage();
  100. } else {
  101. this.token = uni.getStorageSync('token')
  102. }
  103. })
  104. },
  105. }
  106. }
  107. </script>
  108. <style>
  109. p {
  110. font-size: 32rpx;
  111. }
  112. .head {
  113. margin: 10rpx 3%;
  114. border-radius: 15rpx;
  115. background-color: #f0d232;
  116. height: 200rpx;
  117. display: flex;
  118. align-items: center;
  119. justify-content: center;
  120. }
  121. .show-point {
  122. display: flex;
  123. flex-direction: column;
  124. align-items: center;
  125. }
  126. .content {
  127. margin: 10rpx 3%;
  128. }
  129. .point-card {
  130. padding: 20rpx 3%;
  131. display: flex;
  132. justify-content: space-between;
  133. align-items: center;
  134. }
  135. .point-card-left {
  136. display: flex;
  137. flex-direction: column;
  138. justify-content: start;
  139. }
  140. .point-card-right p {
  141. color: #f0d232;
  142. font-weight: 600;
  143. }
  144. </style>