海南旅游项目 前端仓库
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.

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