home.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <template name="ucenter">
  2. <view>
  3. <scroll-view scroll-y class="page">
  4. <view class="fixed">
  5. <cu-custom bgColor="bg-shadeTop text-white">
  6. <block slot="content">微风的Buykey</block>
  7. </cu-custom>
  8. </view>
  9. <swiper class="screen-swiper" :class="dotStyle?'square-dot':'round-dot'" :indicator-dots="true" :circular="true"
  10. :autoplay="true" interval="5000" duration="500">
  11. <swiper-item v-for="(item,index) in swiperList" :key="index">
  12. <image :src="item.url" mode="aspectFill" v-if="item.type=='image'"></image>
  13. <video :src="item.url" autoplay loop muted :show-play-btn="false" :controls="false" objectFit="cover" v-if="item.type=='video'"></video>
  14. </swiper-item>
  15. </swiper>
  16. <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
  17. <view class="cu-item" v-for="(item,index) in cuIconList" :key="index" v-if="index<gridCol*2">
  18. <view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
  19. <view class="cu-tag badge" v-if="item.badge!=0">
  20. <block v-if="item.badge!=1">{{item.badge>99?'99+':item.badge}}</block>
  21. </view>
  22. </view>
  23. <text>{{item.name}}</text>
  24. </view>
  25. </view>
  26. <view class="cu-bar bg-white solid-bottom margin-top hide">
  27. <view class="action">
  28. <text class="cuIcon-title text-orange "></text> 最新动态
  29. </view>
  30. </view>
  31. <view>
  32. <view class="cu-timeline">
  33. <view class="cu-time">昨天</view>
  34. <view class="cu-item cur cuIcon-noticefill">
  35. <view class="content bg-green shadow-blur">
  36. <text>22:22</text> 【广州市】快件已到达地球
  37. </view>
  38. </view>
  39. <view class="cu-item text-red cuIcon-attentionforbidfill">
  40. <view class="content bg-red shadow-blur">
  41. 这是第一次,我家的铲屎官走了这么久。久到足足有三天!!
  42. </view>
  43. </view>
  44. <view class="cu-item text-grey cuIcon-evaluate_fill">
  45. <view class="content bg-grey shadow-blur">
  46. 这是第一次,我家的铲屎官走了这么久。
  47. </view>
  48. </view>
  49. <view class="cu-item text-blue">
  50. <view class="bg-blue content">
  51. <text>20:00</text> 【月球】快件已到达月球,准备发往地球
  52. </view>
  53. <view class="bg-cyan content">
  54. <text>10:00</text> 【银河系】快件已到达银河系,准备发往月球
  55. </view>
  56. </view>
  57. </view>
  58. <view class="cu-timeline">
  59. <view class="cu-time">06-17</view>
  60. <view class="cu-item">
  61. <view class="content">
  62. <text>01:30</text> 【喵星】 MX-12138 已揽收,准备发往银河系
  63. </view>
  64. </view>
  65. </view>
  66. <view class="cu-timeline">
  67. <view class="cu-time">06-17</view>
  68. <view class="cu-item">
  69. <view class="content">
  70. <view class="cu-capsule radius">
  71. <view class="cu-tag bg-cyan">上午</view>
  72. <view class="cu-tag line-cyan">10:00</view>
  73. </view>
  74. <view class="margin-top">这是第一次,我家的铲屎官走了这么久。久到足足有三天!! 在听到他的脚步声响在楼梯间的那一刻,我简直想要破门而出,对着他狠狠地吼上10分钟,然后再看心情要不要他进门。</view>
  75. </view>
  76. </view>
  77. <view class="cu-item text-blue">
  78. <view class="bg-blue shadow-blur content">
  79. <view class="cu-list menu-avatar radius">
  80. <view class="cu-item">
  81. <view class="cu-avatar round lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg);"></view>
  82. <view class="content">
  83. <view class="text-grey">文晓港</view>
  84. <view class="text-gray text-sm">
  85. <text class="cuIcon-infofill text-red"></text> 消息未送达</view>
  86. </view>
  87. <view class="action">
  88. <view class="text-grey text-xs">22:20</view>
  89. <view class="cu-tag round bg-grey sm">5</view>
  90. </view>
  91. </view>
  92. <view class="cu-item">
  93. <view class="cu-avatar round lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg);">
  94. <view class="cu-tag badge">99+</view>
  95. </view>
  96. <view class="content">
  97. <view class="text-grey">文晓港
  98. <view class="cu-tag round orange sm">SVIP</view>
  99. </view>
  100. <view class="text-gray text-sm">
  101. <text class="cuIcon-redpacket_fill text-red"></text> 收到红包</view>
  102. </view>
  103. <view class="action">
  104. <view class="text-grey text-xs">22:20</view>
  105. <text class="cuIcon-notice_forbid_fill text-gray"></text>
  106. </view>
  107. </view>
  108. </view>
  109. </view>
  110. </view>
  111. </view>
  112. </view>
  113. <view class="cu-tabbar-height"></view>
  114. </scroll-view>
  115. </view>
  116. </template>
  117. <script>
  118. export default {
  119. name: "ucenter",
  120. data() {
  121. return {
  122. cuIconList: [{
  123. cuIcon: 'location',
  124. color: 'red',
  125. badge: 120,
  126. name: '商品'
  127. }, {
  128. cuIcon: 'recordfill',
  129. color: 'orange',
  130. badge: 1,
  131. name: '身份'
  132. }, {
  133. cuIcon: 'picfill',
  134. color: 'yellow',
  135. badge: 0,
  136. name: '图像'
  137. }, {
  138. cuIcon: 'noticefill',
  139. color: 'olive',
  140. badge: 22,
  141. name: '通知'
  142. }, {
  143. cuIcon: 'upstagefill',
  144. color: 'cyan',
  145. badge: 0,
  146. name: '排行榜'
  147. }, {
  148. cuIcon: 'clothesfill',
  149. color: 'blue',
  150. badge: 0,
  151. name: '皮肤'
  152. }, {
  153. cuIcon: 'discoverfill',
  154. color: 'purple',
  155. badge: 0,
  156. name: '发现'
  157. }, {
  158. cuIcon: 'questionfill',
  159. color: 'mauve',
  160. badge: 0,
  161. name: '帮助'
  162. }, {
  163. cuIcon: 'commandfill',
  164. color: 'purple',
  165. badge: 0,
  166. name: '问答'
  167. }, {
  168. cuIcon: 'brandfill',
  169. color: 'mauve',
  170. badge: 0,
  171. name: '版权'
  172. }],
  173. modalName: null,
  174. gridCol: 4,
  175. gridBorder: true,
  176. cardCur: 0,
  177. swiperList: [{
  178. id: 0,
  179. type: 'image',
  180. url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big84000.jpg'
  181. }, {
  182. id: 1,
  183. type: 'image',
  184. url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big37006.jpg',
  185. }, {
  186. id: 2,
  187. type: 'image',
  188. url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big39000.jpg'
  189. }, {
  190. id: 3,
  191. type: 'image',
  192. url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg'
  193. }, {
  194. id: 4,
  195. type: 'image',
  196. url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big25011.jpg'
  197. }, {
  198. id: 5,
  199. type: 'image',
  200. url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big21016.jpg'
  201. }, {
  202. id: 6,
  203. type: 'image',
  204. url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big99008.jpg'
  205. }],
  206. dotStyle: true,
  207. };
  208. },
  209. mounted: function(option) {
  210. console.info(111);
  211. },
  212. methods: {
  213. Gridchange(e) {
  214. this.gridCol = e.detail.value
  215. },
  216. Gridswitch(e) {
  217. this.gridBorder = e.detail.value
  218. },
  219. }
  220. }
  221. </script>
  222. <style>
  223. .fixed {
  224. position: fixed;
  225. z-index: 99;
  226. }
  227. .page {
  228. height: 100Vh;
  229. width: 100vw;
  230. }
  231. .page.show {
  232. overflow: hidden;
  233. }
  234. .switch-sex::after {
  235. content: "\e716";
  236. }
  237. .switch-sex::before {
  238. content: "\e7a9";
  239. }
  240. .switch-music::after {
  241. content: "\e66a";
  242. }
  243. .switch-music::before {
  244. content: "\e6db";
  245. }
  246. .cu-list.grid>.cu-item [class*=cuIcon] {
  247. font-size:50px;
  248. }
  249. </style>