海南旅游项目 前端仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

260 lines
8.2 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <template>
  2. <view>
  3. <view class="flex-direction justify-between align-center text-center lf-p-t-30 lf-p-b-30" style="height: 340rpx;position: relative;">
  4. <view>
  5. <image src="../../static/logo.png" mode="aspectFill" style="width: 200rpx;height: 200rpx;border-radius: 50%;border: 2rpx solid #FFFFFF;" @click="lookImg('')"></image>
  6. </view>
  7. <view class="lf-font-36 align-center text-center text-white lf-m-t-30">
  8. 小小的小可爱
  9. </view>
  10. <image class="bg-img" src="https://picsum.photos/seed/picsum/375/340"></image>
  11. </view>
  12. <view class="list">
  13. <view class="lf-row-between list-item" hover-class="lf-opacity" @click="$url('/pages/order/order')">
  14. <view class="lf-row-center">
  15. <image class="icon-img" src="../../static/center/order.png"></image>
  16. <text class="lf-text-vertical lf-m-l-20 lf-font-28 lf-color-black">我的订单</text>
  17. </view>
  18. <view>
  19. <text class="lf-iconfont lf-icon-xiangyou lf-text-vertical"></text>
  20. </view>
  21. </view>
  22. <view class="lf-row-between list-item" hover-class="lf-opacity" @click="$url('/pages/message/index')">
  23. <view class="lf-row-center">
  24. <image class="icon-img" src="../../static/center/message.png"></image>
  25. <text class="lf-text-vertical lf-m-l-16 lf-font-28 lf-color-black">消息中心</text>
  26. </view>
  27. <view>
  28. <text class="lf-iconfont lf-icon-xiangyou lf-text-vertical"></text>
  29. </view>
  30. </view>
  31. <view class="lf-row-between list-item" hover-class="lf-opacity">
  32. <view class="lf-row-center">
  33. <image class="icon-img" src="../../static/center/feedback.png"></image>
  34. <text class="lf-text-vertical lf-m-l-16 lf-font-28 lf-color-black">意见反馈</text>
  35. </view>
  36. <view>
  37. <text class="lf-iconfont lf-icon-xiangyou lf-text-vertical"></text>
  38. </view>
  39. <button class="feedback-btn" open-type="feedback"></button>
  40. </view>
  41. <view class="lf-row-between list-item" hover-class="lf-opacity" @click="$url('/pages/collect/index')">
  42. <view class="lf-row-center">
  43. <image class="icon-img" src="../../static/center/collect.png"></image>
  44. <text class="lf-text-vertical lf-m-l-16 lf-font-28 lf-color-black">我的收藏</text>
  45. </view>
  46. <view>
  47. <text class="lf-iconfont lf-icon-xiangyou lf-text-vertical"></text>
  48. </view>
  49. </view>
  50. <view class="lf-row-between list-item" hover-class="lf-opacity" @click="$url('/pages/about/index')">
  51. <view class="lf-row-center">
  52. <image class="icon-img" src="../../static/center/about.png"></image>
  53. <text class="lf-text-vertical lf-m-l-16 lf-font-28 lf-color-black">关于我们</text>
  54. </view>
  55. <view>
  56. <text class="lf-iconfont lf-icon-xiangyou lf-text-vertical"></text>
  57. </view>
  58. </view>
  59. <view class="lf-row-between list-item" hover-class="lf-opacity">
  60. <view class="lf-row-center">
  61. <image class="icon-img" src="../../static/center/service.png"></image>
  62. <text class="lf-text-vertical lf-m-l-16 lf-font-28 lf-color-black">联系客服</text>
  63. </view>
  64. <view>
  65. <text class="lf-iconfont lf-icon-xiangyou lf-text-vertical"></text>
  66. </view>
  67. <button class="feedback-btn" open-type="contact"></button>
  68. </view>
  69. </view>
  70. <view class="lf-p-t-35" style="background-color: #F6F6F6;">
  71. <!-- <view class="lf-p-t-40 lf-p-b-20 text-center details-title">
  72. <view class="lf-font-32 details-text flex justify-between align-center text-center" style="color: #222;position: relative;left: 270rpx;">
  73. <view class="rhombus lf-m-l-30"></view>
  74. <view>为你推荐</view>
  75. <view class="rhombus lf-m-r-30"></view>
  76. </view>
  77. </view> -->
  78. <lf-title-line title="为你推荐"></lf-title-line>
  79. <lf-waterfall :list="list"></lf-waterfall>
  80. <view class="loading-more">
  81. <text :class="{'loading-more-text': loading_class}" v-if="list.length">{{ loading_text }}</text>
  82. <lf-nocontent v-else></lf-nocontent>
  83. </view>
  84. </view>
  85. <!-- 回到顶部 -->
  86. <u-back-top :scroll-top="pageScrollTop" :custom-style="{background: 'rgba(51, 51 51, 0.3)'}"></u-back-top>
  87. </view>
  88. </template>
  89. <script>
  90. import lfTitleLine from '@/components/lf-title-line/lf-title-line.vue';
  91. export default {
  92. components: {
  93. lfTitleLine
  94. },
  95. data() {
  96. return {
  97. loading_class: false,
  98. loading_text: '已加载全部数据~',
  99. list: [
  100. {
  101. price: 35,
  102. title: '北国风光,千里冰封,万里雪飘',
  103. shop: '李白杜甫白居易旗舰店',
  104. image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg',
  105. },
  106. {
  107. price: 75,
  108. title: '望长城内外,惟余莽莽',
  109. shop: '李白杜甫白居易旗舰店',
  110. image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23325_s.jpg',
  111. },
  112. {
  113. price: 385,
  114. title: '大河上下,顿失滔滔',
  115. shop: '李白杜甫白居易旗舰店',
  116. image: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg',
  117. },
  118. {
  119. price: 784,
  120. title: '欲与天公试比高',
  121. shop: '李白杜甫白居易旗舰店',
  122. image: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/zzpic23369_s.jpg',
  123. },
  124. {
  125. price: 7891,
  126. title: '须晴日,看红装素裹,分外妖娆',
  127. shop: '李白杜甫白居易旗舰店',
  128. image: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2130_s.jpg',
  129. },
  130. {
  131. price: 2341,
  132. shop: '李白杜甫白居易旗舰店',
  133. title: '江山如此多娇,引无数英雄竞折腰',
  134. image: 'http://pic1.sc.chinaz.com/Files/pic/pic9/202002/zzpic23346_s.jpg',
  135. },
  136. {
  137. price: 661,
  138. shop: '李白杜甫白居易旗舰店',
  139. title: '惜秦皇汉武,略输文采',
  140. image: 'http://pic1.sc.chinaz.com/Files/pic/pic9/202002/zzpic23344_s.jpg',
  141. },
  142. {
  143. price: 1654,
  144. title: '唐宗宋祖,稍逊风骚',
  145. shop: '李白杜甫白居易旗舰店',
  146. image: 'http://pic1.sc.chinaz.com/Files/pic/pic9/202002/zzpic23343_s.jpg',
  147. },
  148. {
  149. price: 1678,
  150. title: '一代天骄,成吉思汗',
  151. shop: '李白杜甫白居易旗舰店',
  152. image: 'http://pic1.sc.chinaz.com/Files/pic/pic9/202002/zzpic23343_s.jpg',
  153. },
  154. {
  155. price: 924,
  156. title: '只识弯弓射大雕',
  157. shop: '李白杜甫白居易旗舰店',
  158. image: 'http://pic1.sc.chinaz.com/Files/pic/pic9/202002/zzpic23343_s.jpg',
  159. },
  160. {
  161. price: 8243,
  162. title: '俱往矣,数风流人物,还看今朝',
  163. shop: '李白杜甫白居易旗舰店',
  164. image: 'http://pic1.sc.chinaz.com/Files/pic/pic9/202002/zzpic23343_s.jpg',
  165. },
  166. ]
  167. }
  168. },
  169. methods: {
  170. // 预览图片
  171. lookImg(img){
  172. this.$u.throttle(() => {
  173. uni.previewImage({
  174. urls: [img]
  175. })
  176. }, 200);
  177. },
  178. addRandomData() {
  179. for(let i = 0; i < 10; i++) {
  180. let index = this.$u.random(0, this.list.length - 1);
  181. // 先转成字符串再转成对象,避免数组对象引用导致数据混乱
  182. let item = JSON.parse(JSON.stringify(this.list[index]))
  183. item.id = this.$u.guid();
  184. this.list.push(item);
  185. }
  186. },
  187. },
  188. onLoad() {
  189. this.addRandomData()
  190. }
  191. }
  192. </script>
  193. <style lang="scss">
  194. .rhombus{
  195. width: 16rpx;
  196. height: 16rpx;
  197. transform: rotateZ(45deg);
  198. background: #222;
  199. }
  200. .details-title {
  201. position: relative;
  202. &::after {
  203. position: absolute;
  204. left: 144rpx;
  205. top: 60rpx;
  206. content: '';
  207. width: 69%;
  208. height: 1rpx;
  209. border-bottom: 1rpx solid rgba(0, 0, 0, 0.08)
  210. }
  211. .details-text {
  212. position: relative;
  213. // display: inline-block;
  214. width: 264rpx;
  215. background-color: #f5f5f9;
  216. z-index: 9;
  217. }
  218. }
  219. .list{
  220. margin-top: 20rpx;
  221. padding: 0 32rpx;
  222. background-color: #FFFFFF;
  223. width: 100%;
  224. height: auto;
  225. }
  226. .list-item{
  227. border-bottom: 1rpx solid #EEEEEE;
  228. height: 110rpx;
  229. box-sizing: border-box;
  230. position: relative;
  231. .icon-img{
  232. width: 50rpx;
  233. height: 50rpx;
  234. }
  235. .feedback-btn{
  236. position: absolute;
  237. width: 100%;
  238. height: 100%;
  239. z-index: 1;
  240. background: transparent;
  241. }
  242. &:last-child{
  243. border-bottom: none;
  244. }
  245. }
  246. .bg-img{
  247. width: 100%;
  248. height: 100%;
  249. position: absolute;
  250. top: 0;
  251. left: 0;
  252. z-index: -1;
  253. }
  254. </style>