推广小程序前端代码
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.

328 lines
8.1 KiB

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
  1. <template>
  2. <view class="page">
  3. <view class="head-box"></view>
  4. <uv-navbar title=" " leftIcon=" " bgColor="transparent" height="100rpx"></uv-navbar>
  5. <view class="content">
  6. <view class="search-box">
  7. <view class="search-box-l">
  8. <image class="address-img" src="@/static/image/home/address-icon.png" mode="widthFix"></image>
  9. <view>成都</view>
  10. <image class="sjx-img" src="@/static/image/home/sjx-icon.png" mode="widthFix"></image>
  11. </view>
  12. <view class="search-box-r">
  13. <uv-search placeholder="搜索相关内容" v-model="keyword" shape="square" :showAction="false" color="#fff" placeholderColor="#BDABAC" :clearabled="false" searchIconColor="#fff" searchIconSize="50rpx" bgColor="#4A2A2B" height="63rpx"></uv-search>
  14. </view>
  15. </view>
  16. <view class="swipe-box">
  17. <uv-swiper :list="list" height="336rpx" radius="30rpx" bgColor="transparent" indicator indicatorMode="dot"></uv-swiper>
  18. </view>
  19. <view class="ydsk-box">
  20. <view class="ydsk-box-title">悦动时刻</view>
  21. <view class="ydsk-box-gird">
  22. <view class="gird-l">
  23. <view class="left-box">
  24. <view class="title-box">
  25. <view>活动签到</view>
  26. <view>签到有好礼</view>
  27. </view>
  28. <view class="btn-box">立即查看</view>
  29. </view>
  30. <image class="hdqd-img" src="@/static/image/home/hdqd-img.png" mode="widthFix"></image>
  31. </view>
  32. <view class="gird-r">
  33. <view class="hd-box">
  34. <view class="left-box">
  35. <view class="title-box">
  36. 活动
  37. </view>
  38. <view class="btn-box">立即查看</view>
  39. </view>
  40. <image class="hdqd-img" src="@/static/image/home/hd-img.png" mode="widthFix"></image>
  41. </view>
  42. <view class="hd-box lx-box">
  43. <view class="left-box">
  44. <view class="title-box">
  45. 旅行
  46. </view>
  47. <view class="btn-box">立即查看</view>
  48. </view>
  49. <image class="hdqd-img" src="@/static/image/home/lx-img.png" mode="widthFix"></image>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. <view class="hd-list">
  55. <uv-tabs
  56. @click= "tabs"
  57. :list="hdList"
  58. lineWidth="50rpx"
  59. :lineColor="`url(${lineBg}) 100% 100%`"
  60. :activeStyle="{
  61. color: '#fff',
  62. fontWeight: 'bold',
  63. transform: 'scale(1.05)'
  64. }"
  65. :inactiveStyle="{
  66. color: '#999',
  67. transform: 'scale(1)'
  68. }"
  69. itemStyle="padding-left: 15px; padding-right: 15px; height: 44px;"
  70. ></uv-tabs>
  71. <active-item :cardListData="cardListData"/>
  72. </view>
  73. </view>
  74. <tabber select="home" />
  75. </view>
  76. </template>
  77. <script>
  78. import tabber from '@/components/base/tabbar.vue'
  79. import activeItem from '@/components/active/active-item.vue'
  80. export default {
  81. components:{
  82. tabber,
  83. activeItem
  84. },
  85. data() {
  86. return {
  87. keyword:'',
  88. list: [
  89. 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
  90. 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
  91. 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
  92. ],
  93. hdList: [
  94. { id: 0, name: '近期活动' },
  95. { id: 1, name: '往期活动' },
  96. ],
  97. lineBg: require('@/static/image/cart/tabIcon.png'),
  98. cardListData: [
  99. {
  100. imgUrl: 'https://up.zhuoku.org/22/a4/60/50/fc3bd0b4e656911fccdde4383637c1cd.jpg',
  101. orderTime: '2024.08.23 12:00',
  102. state: 'U',
  103. stateText: '待参加',
  104. title: '夏日去撒野旅游计划~',
  105. time: '2024.10.28 10:00',
  106. address: '成都市东丽湖露营地32号',
  107. },
  108. {
  109. imgUrl: 'https://up.zhuoku.org/22/a4/60/50/fc3bd0b4e656911fccdde4383637c1cd.jpg',
  110. orderTime: '2024.08.23 12:00',
  111. state: 'S',
  112. stateText: '已完成',
  113. title: '夏日去撒野旅游计划~',
  114. time: '2024.10.28 10:00',
  115. address: '成都市东丽湖露营地32号',
  116. },
  117. ]
  118. }
  119. },
  120. methods:{
  121. tabs(val) {
  122. console.log(val);
  123. }
  124. }
  125. }
  126. </script>
  127. <style lang="scss">
  128. page {
  129. background-color: #060504;
  130. }
  131. </style>
  132. <style scoped lang="scss">
  133. .page {
  134. .head-box {
  135. background: url('@/static/image/nav-bg.png') no-repeat;
  136. background-size: 100% 100%;
  137. width: 100%;
  138. height: 534rpx;
  139. position: absolute;
  140. }
  141. .content {
  142. color: #fff;
  143. padding: 0 30rpx;
  144. padding-top: calc(var(--status-bar-height) + 100rpx);
  145. .search-box {
  146. display: flex;
  147. align-items: center;
  148. margin-bottom: 32rpx;
  149. &-l {
  150. display: flex;
  151. align-items: center;
  152. margin-right: 30rpx;
  153. view {
  154. font-weight: 400;
  155. font-size: 27rpx;
  156. color: #FFFFFF;
  157. margin: 0 18rpx 0 15rpx;
  158. }
  159. .address-img {
  160. width: 26rpx;
  161. }
  162. .sjx-img {
  163. width: 13rpx;
  164. }
  165. }
  166. &-r {
  167. flex:1;
  168. }
  169. }
  170. .swipe-box {
  171. margin-bottom: 41rpx;
  172. }
  173. .ydsk-box {
  174. margin-bottom: 10rpx;
  175. &-title {
  176. width: 250rpx;
  177. background: url('@/static/image/home/title-bg.png') no-repeat;
  178. background-size: 100% 100%;
  179. text-align: center;
  180. height: 31rpx;
  181. line-height: 31rpx;
  182. font-weight: bold;
  183. font-size: 35rpx;
  184. color: #FFFFFF;
  185. margin: 0 auto 33rpx;
  186. }
  187. &-gird {
  188. display: flex;
  189. justify-content: space-between;
  190. .gird-l {
  191. box-sizing: border-box;
  192. width: 378rpx;
  193. height: 278rpx;
  194. padding: 36rpx 0 24rpx 26rpx;
  195. background: url('@/static/image/home/hdqd-bg.png') no-repeat;
  196. background-size: 100% 100%;
  197. position: relative;
  198. .hdqd-img {
  199. position: absolute;
  200. right: 34rpx;
  201. top: 48rpx;
  202. width: 200rpx;
  203. }
  204. .left-box {
  205. height: 100%;
  206. display: flex;
  207. flex-direction: column;
  208. justify-content: space-between;
  209. .title-box {
  210. view {
  211. font-weight: bold;
  212. font-size: 29rpx;
  213. color: #060504;
  214. &:nth-child(2) {
  215. font-weight: 400;
  216. font-size: 21rpx;
  217. color: #4C4C4C;
  218. margin-top: 20rpx;
  219. }
  220. }
  221. }
  222. .btn-box {
  223. width: 108rpx;
  224. height: 41rpx;
  225. background: url('@/static/image/home/hdqd-btn.png') no-repeat;
  226. background-size: 100% 100%;
  227. font-weight: 500;
  228. font-size: 17rpx;
  229. color: #FFFFFF;
  230. text-align: center;
  231. line-height: 41rpx;
  232. }
  233. }
  234. }
  235. .gird-r {
  236. .hd-box {
  237. width: 288rpx;
  238. height: 130rpx;
  239. padding: 25rpx 0 24rpx 26rpx;
  240. box-sizing: border-box;
  241. background: url('@/static/image/home/hd-bg.png') no-repeat;
  242. background-size: 100% 100%;
  243. position: relative;
  244. .left-box {
  245. height: 100%;
  246. display: flex;
  247. flex-direction: column;
  248. justify-content: space-between;
  249. .title-box {
  250. font-weight: bold;
  251. font-size: 28rpx;
  252. color: #57270F;
  253. }
  254. .btn-box {
  255. width: 98rpx;
  256. height: 35rpx;
  257. background: url('@/static/image/home/hd-btn.png') no-repeat;
  258. background-size: 100% 100%;
  259. font-weight: 500;
  260. font-size: 16rpx;
  261. color: #FFFFFF;
  262. text-align: center;
  263. line-height: 35rpx;
  264. }
  265. }
  266. .hdqd-img {
  267. position: absolute;
  268. right: 22rpx;
  269. top: 25rpx;
  270. width: 123rpx;
  271. }
  272. }
  273. .lx-box {
  274. width: 288rpx;
  275. height: 130rpx;
  276. padding: 25rpx 0 24rpx 26rpx;
  277. box-sizing: border-box;
  278. background: url('@/static/image/home/lx-bg.png') no-repeat;
  279. background-size: 100% 100%;
  280. position: relative;
  281. margin-top: 18rpx;
  282. .left-box {
  283. height: 100%;
  284. display: flex;
  285. flex-direction: column;
  286. justify-content: space-between;
  287. .title-box {
  288. font-weight: bold;
  289. font-size: 28rpx;
  290. color: #57270F;
  291. }
  292. .btn-box {
  293. width: 98rpx;
  294. height: 35rpx;
  295. background: url('@/static/image/home/lx-btn.png') no-repeat;
  296. background-size: 100% 100%;
  297. font-weight: 500;
  298. font-size: 16rpx;
  299. color: #FFFFFF;
  300. text-align: center;
  301. line-height: 35rpx;
  302. }
  303. }
  304. .hdqd-img {
  305. position: absolute;
  306. right: 22rpx;
  307. top: 25rpx;
  308. width: 123rpx;
  309. }
  310. }
  311. }
  312. }
  313. }
  314. }
  315. }
  316. </style>