index.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. <template>
  2. <view class="content">
  3. <!-- 顶部区域 -->
  4. <view class="header">
  5. <view class="logo-container">
  6. <image class="logo" src="/static/logo.png"></image>
  7. <view class="logo-text">
  8. <text class="logo-text-top">Have A</text>
  9. <text class="logo-text-bottom">Nice Trip</text>
  10. </view>
  11. </view>
  12. <image class="header-mascot" src="/static/mascot.png"></image>
  13. </view>
  14. <!-- 会员广告条 -->
  15. <view class="vip-banner">
  16. <view class="vip-info">
  17. <image class="vip-icon" src="/static/vip-icon.png"></image>
  18. <view class="vip-text">
  19. <text class="vip-title">Gooh Pro永久权益</text>
  20. <text class="vip-price">仅需0.003元/日</text>
  21. </view>
  22. </view>
  23. <view class="vip-button">去了解</view>
  24. </view>
  25. <!-- 热门行程 -->
  26. <view class="section">
  27. <view class="section-header">
  28. <text class="section-title">热门行程</text>
  29. <view class="section-more">
  30. <text>更多</text>
  31. <text class="more-icon">></text>
  32. </view>
  33. </view>
  34. <scroll-view class="trip-scroll" scroll-x="true" show-scrollbar="false">
  35. <view class="trip-cards">
  36. <!-- 美食之旅卡片 -->
  37. <view class="trip-card">
  38. <image class="trip-image" src="/static/food-trip.jpg"></image>
  39. <view class="trip-tag">美食之旅</view>
  40. <view class="trip-info">
  41. <text class="trip-title">舌尖漫游,味蕾绽放的盛宴之旅</text>
  42. <text class="trip-count">32个行程计划</text>
  43. </view>
  44. </view>
  45. <!-- 潮汕三日卡片 -->
  46. <view class="trip-card">
  47. <image class="trip-image" src="/static/coastal-trip.jpg"></image>
  48. <view class="trip-info">
  49. <text class="trip-title">潮汕三日餐叙:从古城到海岛鲜🌊</text>
  50. <view class="trip-data">
  51. <text class="trip-days">3天8个行程</text>
  52. <text class="trip-people">663人来纳</text>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </scroll-view>
  58. </view>
  59. <!-- 热门目的地 -->
  60. <view class="hot-spots-section">
  61. <view class="section-title">热门目的地</view>
  62. <!-- 景点卡片区域 -->
  63. <view class="spots-grid">
  64. <!-- 北京故宫 -->
  65. <view class="spot-card">
  66. <view class="spot-tag">5A</view>
  67. <image class="spot-image" src="/static/beijing.jpg" mode="aspectFill"></image>
  68. <view class="spot-name">故宫博物院</view>
  69. <view class="spot-location">
  70. <text class="location-dot">●</text>
  71. <text>北京东城区</text>
  72. </view>
  73. </view>
  74. <!-- 上海外滩 -->
  75. <view class="spot-card">
  76. <view class="spot-tag">5A</view>
  77. <image class="spot-image" src="/static/shanghai.jpg" mode="aspectFill"></image>
  78. <view class="spot-name">上海外滩</view>
  79. <view class="spot-location">
  80. <text class="location-dot">●</text>
  81. <text>上海黄浦区</text>
  82. </view>
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. </template>
  88. <script>
  89. export default {
  90. data() {
  91. return {
  92. title: 'Have A Nice Trip',
  93. hotSpots: [
  94. {
  95. id: 48,
  96. name: "故宫博物院",
  97. city: "北京",
  98. district: "东城区",
  99. level: "5A",
  100. coverImage: "/static/beijing.jpg"
  101. },
  102. {
  103. id: 100,
  104. name: "上海外滩",
  105. city: "上海",
  106. district: "黄浦区",
  107. level: "5A",
  108. coverImage: "/static/shanghai.jpg"
  109. }
  110. ]
  111. }
  112. },
  113. onLoad() {
  114. console.log('首页加载完成');
  115. },
  116. methods: {
  117. }
  118. }
  119. </script>
  120. <style>
  121. .content {
  122. display: flex;
  123. flex-direction: column;
  124. background-color: #e3f4ff;
  125. min-height: 100vh;
  126. }
  127. /* 顶部区域 */
  128. .header {
  129. padding: 80rpx 30rpx 20rpx;
  130. display: flex;
  131. justify-content: space-between;
  132. align-items: center;
  133. }
  134. .logo-container {
  135. display: flex;
  136. align-items: center;
  137. }
  138. .logo {
  139. width: 80rpx;
  140. height: 80rpx;
  141. margin-right: 20rpx;
  142. }
  143. .logo-text {
  144. display: flex;
  145. flex-direction: column;
  146. }
  147. .logo-text-top {
  148. font-size: 36rpx;
  149. font-weight: bold;
  150. color: #333;
  151. }
  152. .logo-text-bottom {
  153. font-size: 36rpx;
  154. font-weight: bold;
  155. color: #333;
  156. background-color: #ffeb3b;
  157. padding: 0 10rpx;
  158. }
  159. .header-mascot {
  160. width: 120rpx;
  161. height: 120rpx;
  162. }
  163. /* 会员广告条 */
  164. .vip-banner {
  165. margin: 20rpx 30rpx;
  166. background-color: #3a9eeb;
  167. border-radius: 20rpx;
  168. padding: 20rpx 30rpx;
  169. display: flex;
  170. justify-content: space-between;
  171. align-items: center;
  172. color: white;
  173. }
  174. .vip-info {
  175. display: flex;
  176. align-items: center;
  177. }
  178. .vip-icon {
  179. width: 80rpx;
  180. height: 80rpx;
  181. margin-right: 20rpx;
  182. }
  183. .vip-text {
  184. display: flex;
  185. flex-direction: column;
  186. }
  187. .vip-title {
  188. font-size: 32rpx;
  189. font-weight: bold;
  190. margin-bottom: 5rpx;
  191. }
  192. .vip-price {
  193. font-size: 26rpx;
  194. }
  195. .vip-button {
  196. background-color: white;
  197. color: #3a9eeb;
  198. padding: 10rpx 30rpx;
  199. border-radius: 50rpx;
  200. font-size: 28rpx;
  201. }
  202. /* 热门行程 */
  203. .section {
  204. margin: 20rpx 0;
  205. }
  206. .section-header {
  207. padding: 0 30rpx;
  208. display: flex;
  209. justify-content: space-between;
  210. align-items: center;
  211. margin-bottom: 20rpx;
  212. }
  213. .section-title {
  214. font-size: 36rpx;
  215. font-weight: bold;
  216. color: #333;
  217. }
  218. .section-more {
  219. display: flex;
  220. align-items: center;
  221. color: #3a9eeb;
  222. font-size: 28rpx;
  223. }
  224. .more-icon {
  225. margin-left: 5rpx;
  226. }
  227. .trip-scroll {
  228. width: 100%;
  229. }
  230. .trip-cards {
  231. display: flex;
  232. padding: 0 30rpx;
  233. }
  234. .trip-card {
  235. width: 620rpx;
  236. background-color: white;
  237. border-radius: 20rpx;
  238. margin-right: 20rpx;
  239. overflow: hidden;
  240. position: relative;
  241. }
  242. .trip-image {
  243. width: 100%;
  244. height: 300rpx;
  245. }
  246. .trip-tag {
  247. position: absolute;
  248. top: 20rpx;
  249. left: 20rpx;
  250. background-color: rgba(58, 158, 235, 0.8);
  251. color: white;
  252. padding: 5rpx 20rpx;
  253. border-radius: 50rpx;
  254. font-size: 24rpx;
  255. }
  256. .trip-info {
  257. padding: 20rpx;
  258. }
  259. .trip-title {
  260. font-size: 30rpx;
  261. font-weight: bold;
  262. color: #333;
  263. margin-bottom: 10rpx;
  264. display: block;
  265. }
  266. .trip-count, .trip-days {
  267. font-size: 26rpx;
  268. color: #666;
  269. background-color: #f0f0f0;
  270. padding: 5rpx 15rpx;
  271. border-radius: 10rpx;
  272. }
  273. .trip-data {
  274. display: flex;
  275. justify-content: space-between;
  276. }
  277. .trip-people {
  278. font-size: 26rpx;
  279. color: #999;
  280. }
  281. /* 热门目的地样式 */
  282. .hot-spots-section {
  283. margin: 20rpx 0 30rpx;
  284. padding: 30rpx 0;
  285. background-color: #ffffff;
  286. }
  287. .section-title {
  288. font-size: 36rpx;
  289. font-weight: bold;
  290. padding: 0 30rpx;
  291. margin-bottom: 20rpx;
  292. color: #333;
  293. display: flex;
  294. align-items: center;
  295. }
  296. .section-title::before {
  297. content: "";
  298. width: 8rpx;
  299. height: 36rpx;
  300. background: linear-gradient(to bottom, #4facfe, #00f2fe);
  301. margin-right: 16rpx;
  302. border-radius: 4rpx;
  303. }
  304. .spots-grid {
  305. display: flex;
  306. justify-content: space-between;
  307. padding: 0 30rpx;
  308. }
  309. .spot-card {
  310. width: 330rpx;
  311. height: 280rpx;
  312. background-color: #fff;
  313. border-radius: 20rpx;
  314. overflow: hidden;
  315. position: relative;
  316. box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.1);
  317. }
  318. .spot-image {
  319. width: 100%;
  320. height: 180rpx;
  321. border-radius: 20rpx 20rpx 0 0;
  322. }
  323. .spot-tag {
  324. position: absolute;
  325. top: 16rpx;
  326. left: 16rpx;
  327. background-color: #ff6b35;
  328. color: white;
  329. font-size: 24rpx;
  330. padding: 4rpx 12rpx;
  331. border-radius: 8rpx;
  332. font-weight: bold;
  333. z-index: 1;
  334. }
  335. .spot-name {
  336. font-size: 30rpx;
  337. font-weight: bold;
  338. color: #333;
  339. padding: 16rpx 16rpx 8rpx;
  340. }
  341. .spot-location {
  342. display: flex;
  343. align-items: center;
  344. font-size: 24rpx;
  345. color: #999;
  346. padding: 0 16rpx;
  347. }
  348. .location-dot {
  349. color: #ff4f81;
  350. font-size: 24rpx;
  351. margin-right: 6rpx;
  352. }
  353. </style>