index.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <template>
  2. <view class="myPoints">
  3. <!-- 积分和积分签到 -->
  4. <view class="signIn">
  5. <view>20000</view>
  6. <view
  7. class="signIn-item"
  8. @tap="$Router.push('/pages/points/checkIn/index')"
  9. >
  10. <text>签到获取积分</text>
  11. <u-icon name="arrow-right" color="#fff" size="16"></u-icon>
  12. </view>
  13. </view>
  14. <!-- 积分列表 -->
  15. <view class="integral">
  16. <u-grid :border="false" col="4">
  17. <u-grid-item
  18. v-for="(listItem, listIndex) in list1"
  19. :key="listIndex"
  20. @tap="$Router.push(listItem.url)"
  21. >
  22. <u-icon :name="listItem.name" :size="40" color="#347caf" />
  23. <text class="integral-text">{{ listItem.title }}</text>
  24. </u-grid-item>
  25. </u-grid>
  26. </view>
  27. <!-- 邀请好友 -->
  28. <view class="invite">
  29. <view class="invite-item">
  30. <view class="invite-text">
  31. <u-icon name="red-packet" color="#f9cf99" size="28" />
  32. <text class="friends">邀请好友</text>
  33. </view>
  34. <view class="gotoInvite">去邀请</view>
  35. </view>
  36. <view class="inviteFriends">
  37. <view class="flex-invite">
  38. <u-icon name="scan" color="#f9cf99" size="20" />
  39. <text class="scan-text">当面扫描</text>
  40. </view>
  41. <text>|</text>
  42. <view class="flex-invite">
  43. <u-icon name="weixin-fill" color="#28c445" size="20" />
  44. <text class="scan-text">微信邀请</text>
  45. </view>
  46. </view>
  47. </view>
  48. <!-- 获取积分方式 -->
  49. <view class="method">
  50. <u-cell-group :border="false" v-for="(item, index) in list2" :key="index">
  51. <u-cell
  52. size="mini"
  53. :border="false"
  54. :icon="item.icon"
  55. :title="item.title"
  56. isLink
  57. :url="item.url"
  58. />
  59. </u-cell-group>
  60. </view>
  61. </view>
  62. </template>
  63. <script>
  64. export default {
  65. data() {
  66. return {
  67. list1: [
  68. {
  69. name: 'photo',
  70. title: '积分说明',
  71. url: '/pages/points/instructions/index',
  72. },
  73. {
  74. name: 'lock',
  75. title: '积分明细',
  76. url: '/pages/points/detail/index',
  77. },
  78. {
  79. name: 'star',
  80. title: '积分提现',
  81. url: '/pages/points/withdraw/index',
  82. },
  83. {
  84. name: 'hourglass',
  85. title: '积分活动',
  86. url: '/pages/points/activity/index',
  87. },
  88. ],
  89. list2: [
  90. {
  91. icon: 'red-packet',
  92. title: '发帖',
  93. url: '/pages/pointMethod/foren/index',
  94. },
  95. {
  96. icon: 'red-packet',
  97. title: '消费',
  98. url: '/pages/pointMethod/consume/index',
  99. },
  100. {
  101. icon: 'red-packet',
  102. title: '点评',
  103. url: '/pages/pointMethod/comment/index',
  104. },
  105. {
  106. icon: 'red-packet',
  107. title: '分享',
  108. url: '/pages/pointMethod/share/index',
  109. },
  110. {
  111. icon: 'red-packet',
  112. title: '回帖',
  113. url: '/pages/pointMethod/recover/index',
  114. },
  115. {
  116. icon: 'red-packet',
  117. title: '广告',
  118. url: '/pages/pointMethod/advertise/index',
  119. },
  120. ],
  121. };
  122. },
  123. };
  124. </script>
  125. <style lang="scss" scoped>
  126. .myPoints {
  127. /* 签到获取积分 */
  128. height: 100vh;
  129. margin-bottom: 50rpx;
  130. background-color: #efefef;
  131. .signIn {
  132. height: 300rpx;
  133. font-size: 35px;
  134. color: #fff;
  135. padding-top: 40px;
  136. text-align: center;
  137. background-color: #347caf;
  138. .signIn-item {
  139. display: flex;
  140. font-size: 16px;
  141. justify-content: center;
  142. }
  143. }
  144. /* 积分列表 */
  145. .integral {
  146. height: 220rpx;
  147. padding-top: 20px;
  148. box-sizing: border-box;
  149. border-radius: 20rpx;
  150. background-color: #fff;
  151. margin: -100rpx 20rpx 30rpx 20rpx;
  152. }
  153. /* 邀请好友 */
  154. .invite {
  155. margin: 0 20rpx;
  156. padding: 10px;
  157. height: 220rpx;
  158. background-color: #fff;
  159. .invite-item {
  160. display: flex;
  161. justify-content: space-between;
  162. .invite-text {
  163. display: flex;
  164. }
  165. .gotoInvite {
  166. width: 60px;
  167. height: 30px;
  168. color: #fff;
  169. line-height: 30px;
  170. border-radius: 15px;
  171. text-align: center;
  172. background-color: #347caf;
  173. }
  174. .friends {
  175. margin-top: 5px;
  176. }
  177. }
  178. .inviteFriends {
  179. width: 500rpx;
  180. height: 90rpx;
  181. display: flex;
  182. border-radius: 45rpx;
  183. margin: 50rpx 0 0 80rpx;
  184. padding: 25rpx 30rpx;
  185. box-sizing: border-box;
  186. background-color: #e6f5fd;
  187. justify-content: space-between;
  188. .flex-invite {
  189. display: flex;
  190. }
  191. .scan-text {
  192. margin-top: 2px;
  193. color: #626c79;
  194. }
  195. }
  196. }
  197. /* 获取积分的方式 */
  198. .method {
  199. height: 460rpx;
  200. background-color: #fff;
  201. margin: 40rpx 20rpx 100rpx 20rpx;
  202. }
  203. }
  204. </style>