index.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  1. <template>
  2. <view class="content">
  3. <view class="top_bg">
  4. <view class="hflex acenter jbetween top">
  5. <image src="/static/image/index1/logo2.png" class="logo"></image>
  6. <view class="vflex">
  7. <view class="top_title">線上課程,直播,活動,求職,補習,一應俱全</view>
  8. <view class="top_title2">「Day Day U」APP開啟更多功能</view>
  9. </view>
  10. <view class="top_btn hflex acenter jcenter" @click="detail">下載</view>
  11. </view>
  12. <view class="hflex acenter jcenter logo_box">
  13. <image src="/static/image/index1/logo.png" class="logo2"></image>
  14. </view>
  15. <view class="banner">
  16. <u-swiper :list="bannerList" keyName="logo" height="250" @change="changeBanner" @click="clickBanner">
  17. <view slot="indicator" class="indicator">
  18. <view class="indicator_dot" v-for="(item,index) in bannerList" :key="index" :class="index === current ? 'indicator_dot--active': ''"> </view>
  19. </view>
  20. </u-swiper>
  21. </view>
  22. </view>
  23. <view class="tabs hflex acenter jcenter">
  24. <block v-for="(item,index) in tabs" :key="index">
  25. <view class="tab_item vflex acenter jcenter" @click="toDetail(index)">
  26. <image :src="item.img" class="tab_img"></image>
  27. <view class="tab_text">{{item.name}}</view>
  28. </view>
  29. </block>
  30. </view>
  31. <view class="video">
  32. <video :src="video"></video>
  33. </view>
  34. <view class="btn_group hflex acenter jcenter">
  35. <view class="btn1 hflex acenter jcenter" @click="toLogin(1)">成為導師</view>
  36. <view class="btn2 hflex acenter jcenter" @click="toLogin(2)">用戶註冊</view>
  37. </view>
  38. <view class="box">
  39. <block v-for="(item,index) in pageList" :key="index">
  40. <view class="box_item vflex acenter jcenter" :id="'box' + index">
  41. <view class="title">{{item.name}}</view>
  42. <image class="box_img" :src="item.img" mode="heightFix"></image>
  43. <view class="box_list">
  44. <block v-for="(item2,index2) in item.list" :key="index2">
  45. <view class="vflex">
  46. <view class="item_title">{{item2.title}}</view>
  47. <view class="item_name">{{item2.name}}</view>
  48. </view>
  49. </block>
  50. </view>
  51. </view>
  52. </block>
  53. </view>
  54. <view class="bottom vflex acenter jcenter">
  55. <image :src="bottom.img1" class="bottom_img"></image>
  56. <view class="hflex acenter jcenter">
  57. <image :src="bottom.img2" class="bottom_left"></image>
  58. <image :src="bottom.img3" class="bottom_right"></image>
  59. </view>
  60. </view>
  61. <view class="footer">
  62. <view class="hflex acenter jcenter foot_btn1" @click="liaison">聯絡我們</view>
  63. <view class="hflex acenter jcenter foot_btn1" @click="open">進入桌面版</view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. import $api from '@/static/js/api.js'
  69. var that = ''
  70. export default {
  71. data() {
  72. return {
  73. bannerList: [
  74. ],
  75. current: 0,
  76. tabs: [
  77. {
  78. img: '/static/image/index1/tab1.png',
  79. name: '線上課程'
  80. },
  81. {
  82. img: '/static/image/index1/tab2.png',
  83. name: '直播/活動'
  84. },
  85. {
  86. img: '/static/image/index1/tab3.png',
  87. name: '上網問功課'
  88. },
  89. {
  90. img: '/static/image/index1/tab4.png',
  91. name: '招聘信息'
  92. },
  93. ],
  94. video: '',
  95. pageList: [
  96. {
  97. img: '/static/image/index1/img1.png',
  98. name: '線上課程',
  99. list: [
  100. {
  101. title: '多元化內容',
  102. name: '課程影片數量持續更新 開啟你的知識寶庫',
  103. },
  104. {
  105. title: '自主學習',
  106. name: '隨時隨地 按你節奏展開學習',
  107. }
  108. ]
  109. },
  110. {
  111. img: '/static/image/index1/img2.png',
  112. name: '直播課堂',
  113. list: [
  114. {
  115. title: '簡化學習',
  116. name: '將傳統教室移師線上 縮短學習距離',
  117. },
  118. {
  119. title: '無地域限制',
  120. name: '足不出戶都可跨地域跟大師對話',
  121. },
  122. ]
  123. },
  124. {
  125. img: '/static/image/index1/img3.png',
  126. name: '上網問功課',
  127. list: [
  128. {
  129. title: '直擊問題',
  130. name: '針對功課難題 逐一解決',
  131. },
  132. {
  133. title: '即時發問',
  134. name: '無需等待 步驟簡易 想問就問',
  135. }
  136. ]
  137. },
  138. {
  139. img: '/static/image/index1/img4.png',
  140. name: '招聘人材',
  141. list: [
  142. {
  143. title: '目標精準',
  144. name: '運用教育平台匯集進修人材優勢 容易找到理想僱員',
  145. },
  146. {
  147. title: '直接對話',
  148. name: '運用平台內設聊天工具 可直接與求職者交談',
  149. }
  150. ]
  151. },
  152. ],
  153. bottom: {
  154. img1: '/static/image/index1/bottom_img1.png',
  155. img2: '/static/image/index1/bottom_img2.png',
  156. img3: '/static/image/index1/bottom_img3.png',
  157. },
  158. video_id: ''
  159. }
  160. },
  161. onLoad() {
  162. that = this
  163. that.getBanner()
  164. that.getVideo()
  165. },
  166. methods: {
  167. getBanner() {
  168. $api.req({
  169. url: '/api/Index/banner_h5',
  170. }, function(res) {
  171. if(res.code == 1) {
  172. that.bannerList = res.data
  173. }
  174. })
  175. },
  176. getVideo() {
  177. $api.req({
  178. url: '/api/Index/video_h5',
  179. },function(res) {
  180. if(res.code == 1) {
  181. that.video = res.data
  182. }
  183. })
  184. },
  185. changeBanner(e) {
  186. that.current = e.current
  187. },
  188. clickBanner() {
  189. },
  190. toDetail(index) {
  191. const query = uni.createSelectorQuery().in(this);
  192. query.select('#box'+index).boundingClientRect(data => {
  193. var top = data.top
  194. uni.pageScrollTo({
  195. scrollTop: top,
  196. duration: 100
  197. });
  198. }).exec();
  199. },
  200. detail() {
  201. // $api.jump('/pages/detail/detail?id=' + that.video_id)
  202. },
  203. toLogin(index) {
  204. var href = ''
  205. if(index == 1) {
  206. href = 'https://www.daydayu.com/index.html#/shenqing'
  207. } else {
  208. href = 'https://www.daydayu.com/index.html#/login'
  209. }
  210. location.href = href
  211. },
  212. liaison() {
  213. location.href="https://api.whatsapp.com/send?phone=85255035623"
  214. },
  215. open() {
  216. location.href="https://www.daydayu.com/index.html#/"
  217. },
  218. },
  219. }
  220. </script>
  221. <style lang="scss" scoped>
  222. .content::v-deep {
  223. .top_bg {
  224. width: 100%;
  225. height: 722rpx;
  226. background: url('../../static/image/index1/top_bg.png') no-repeat;
  227. background-size: 100%;
  228. .logo_box {
  229. width: 100%;
  230. // padding: 50rpx 0;
  231. .logo2 {
  232. width: 182rpx;
  233. height: 89rpx;
  234. }
  235. }
  236. .top {
  237. width: 100%;
  238. height: 120rpx;
  239. background: #FFFFFF;
  240. box-shadow: 0px 6rpx 12rpx 0px rgba(0,0,0,0.16);
  241. box-sizing: border-box;
  242. padding: 20rpx;
  243. .logo {
  244. width: 68rpx;
  245. height: 68rpx;
  246. }
  247. .top_title {
  248. font-size: 26rpx;
  249. font-weight: 500;
  250. color: #333333;
  251. line-height: 30rpx;
  252. }
  253. .top_title2 {
  254. font-size: 26rpx;
  255. font-weight: 400;
  256. color: #999999;
  257. line-height: 30rpx;
  258. padding-top: 4rpx;
  259. }
  260. .top_btn {
  261. width: 114rpx;
  262. height: 46rpx;
  263. background: #231E7F;
  264. border-radius: 36rpx;
  265. font-size: 28rpx;
  266. font-weight: 400;
  267. color: #FFFFFF;
  268. }
  269. }
  270. .banner {
  271. position: relative;
  272. .u-swiper {
  273. overflow: unset !important;
  274. }
  275. .u-swiper__indicator {
  276. position: absolute;
  277. // left: 296rpx;
  278. bottom: -29rpx;
  279. }
  280. .indicator {
  281. width: 100%;
  282. @include flex(row);
  283. justify-content: center;
  284. &_dot {
  285. height: 16rpx;
  286. width: 16rpx;
  287. border-radius: 100px;
  288. background: linear-gradient(180deg, #4AC1FD 0%, #B259FA 100%);
  289. margin: 0 5px;
  290. transition: background-color 0.3s;
  291. opacity: 0.35;
  292. &--active {
  293. background: linear-gradient(180deg, #4AC1FD 0%, #B259FA 100%);
  294. opacity: 1;
  295. }
  296. }
  297. }
  298. .indicator-num {
  299. padding: 2px 0;
  300. background-color: rgba(0, 0, 0, 0.35);
  301. border-radius: 100px;
  302. width: 35px;
  303. @include flex;
  304. justify-content: center;
  305. &__text {
  306. color: #FFFFFF;
  307. font-size: 12px;
  308. }
  309. }
  310. }
  311. }
  312. .tabs {
  313. width: 100%;
  314. box-sizing: border-box;
  315. padding: 60rpx 0 48rpx;
  316. .tab_item {
  317. width: 25%;
  318. .tab_img {
  319. width: 68rpx;
  320. height: 68rpx;
  321. }
  322. .tab_text {
  323. padding-top: 5rpx;
  324. font-size: 24rpx;
  325. font-weight: 400;
  326. color: #666666;
  327. line-height: 33rpx;
  328. }
  329. }
  330. }
  331. .video {
  332. width: 100%;
  333. height: 422rpx;
  334. uni-video {
  335. width: 100%;
  336. height: 422rpx;
  337. }
  338. }
  339. .btn_group {
  340. width: 100%;
  341. padding: 36rpx 0 0;
  342. .btn1 {
  343. width: 246rpx;
  344. height: 68rpx;
  345. background: #231E7F;
  346. border-radius: 40rpx;
  347. margin-right: 64rpx;
  348. font-size: 28rpx;
  349. font-weight: 400;
  350. color: #FFFFFF;
  351. line-height: 28rpx;
  352. letter-spacing: 1rpx;
  353. }
  354. .btn2 {
  355. width: 246rpx;
  356. height: 68rpx;
  357. background: #5581FB;
  358. border-radius: 40rpx;
  359. font-size: 28rpx;
  360. font-weight: 400;
  361. color: #FFFFFF;
  362. line-height: 28rpx;
  363. letter-spacing: 1rpx;
  364. }
  365. }
  366. .box {
  367. width: 100%;
  368. box-sizing: border-box;
  369. padding: 0 52rpx;
  370. .box_item {
  371. width: 100%;
  372. padding: 48rpx 0 0;
  373. .title {
  374. font-size: 36rpx;
  375. font-weight: 600;
  376. color: #59CCC2;
  377. line-height: 36rpx;
  378. background: linear-gradient(180deg, #4AC1FD 0%, #B259FA 100%);
  379. -webkit-background-clip: text;
  380. -webkit-text-fill-color: transparent;
  381. }
  382. .box_img {
  383. // width: 646rpx;
  384. height: 330rpx;
  385. margin: 24rpx 0;
  386. }
  387. .box_list {
  388. width: 100%;
  389. .item_title {
  390. font-size: 28rpx;
  391. font-weight: 400;
  392. color: #666666;
  393. line-height: 28rpx;
  394. padding: 26rpx 0 0 24rpx;
  395. position: relative;
  396. }
  397. .item_title::before {
  398. content: "";
  399. width: 12rpx;
  400. height: 12rpx;
  401. border: 2rpx solid #9E6DFB;
  402. position: absolute;
  403. top: 32rpx;
  404. left: -12rpx;
  405. border-radius: 50%;
  406. }
  407. .item_name {
  408. font-size: 24rpx;
  409. font-weight: 400;
  410. color: #666666;
  411. line-height: 34rpx;
  412. padding: 20rpx 0 0 24rpx;
  413. }
  414. }
  415. }
  416. }
  417. .bottom {
  418. width: 100%;
  419. padding: 40rpx 0 20rpx;
  420. .bottom_img {
  421. width: 316rpx;
  422. height: 368rpx;
  423. margin-bottom: 48rpx;
  424. }
  425. .bottom_left {
  426. width: 216rpx;
  427. height: 64rpx;
  428. margin-right: 56rpx;
  429. }
  430. .bottom_right {
  431. width: 216rpx;
  432. height: 64rpx;
  433. }
  434. }
  435. .footer {
  436. width: 100%;
  437. height: 262rpx;
  438. background: url('@/static/image/index1/footer_bg.png') no-repeat;
  439. background-size: 100%;
  440. .foot_btn1 {
  441. width: 490rpx;
  442. height: 68rpx;
  443. background: linear-gradient(180deg, #4AC1FD 0%, #B259FA 100%);
  444. border-radius: 8rpx;
  445. font-size: 28rpx;
  446. font-weight: 400;
  447. color: #FFFFFF;
  448. line-height: 28rpx;
  449. margin: 8rpx auto 20rpx;
  450. }
  451. }
  452. }
  453. </style>