home.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. <template>
  2. <view class="content">
  3. <nav-bar :show-title="false">
  4. <view class="top-container">
  5. <image class="logo" src="/static/img/logo.png" />
  6. <view class="countdown">
  7. 距开幕 <view class="days"> 168 </view> 天
  8. </view>
  9. </view>
  10. </nav-bar>
  11. <u-swiper :items="images" indicato-dots-style="morphing" :height="387" />
  12. <view class="main-container">
  13. <u-search v-model="searchKeyword" placeholder="搜索展商 / 展品名称 / 会议" @search="onClickSearch"/>
  14. <view class="nav-icons">
  15. <template v-for="(item, index) in navIcons">
  16. <view class="nav-icon-wrapper" :key="index">
  17. <view class="nav-icon" @click="onClickNavIcon(item)">
  18. <view v-if="item.icon.indexOf('.svg') !== -1" :style="'background-image:url(' + item.icon + ')'"></view>
  19. <view v-else-if="item.icon.indexOf('icon-') !== -1" :class="'iconfont ' + item.icon"></view>
  20. </view>
  21. <view class="nav-text">
  22. {{ item.name }}
  23. </view>
  24. </view>
  25. </template>
  26. </view>
  27. <view class="panel-group panel-group-1">
  28. <u-panel title="精彩视频" link="https://www.productronicachina.com.cn/for-journalists-impression-videos">
  29. <u-swiper :items="videos" :height="360" :autoplay="false" :border-radius="10" :image-width="508" :image-height="286"
  30. next-margin="100rpx" />
  31. </u-panel>
  32. <u-panel title="精彩图集" link="https://www.productronicachina.com.cn/for-journalists-impression-videos">
  33. <view class="album">
  34. <template v-for="(item, index) in albumPics">
  35. <view class="album-pic" :key="index" @click="onClickAlbum(index)">
  36. <image :src="item.src" mode="aspectFill" />
  37. </view>
  38. </template>
  39. </view>
  40. </u-panel>
  41. </view>
  42. <view class="panel-group">
  43. <u-panel title="新闻" link="/pages/news/index">
  44. <news-recommend />
  45. </u-panel>
  46. </view>
  47. <view class="panel-group">
  48. <u-panel title="战略合作方" link="https://www.productronicachina.com.cn/partners">
  49. <u-swiper :items="partners" :height="250">
  50. <template v-slot="{ scope }">
  51. <view class="partners">
  52. <template v-for="(item, index) in scope.children">
  53. <view class="partner" :key="index">
  54. <image :src="item.icon" />
  55. </view>
  56. </template>
  57. </view>
  58. </template>
  59. </u-swiper>
  60. </u-panel>
  61. <u-panel title="推荐展商" link="https://www.productronicachina.com.cn/partners">
  62. <u-swiper :items="partners" :height="250">
  63. <template v-slot="{ scope }">
  64. <view class="partners">
  65. <template v-for="(item, index) in scope.children">
  66. <view class="partner" :key="index">
  67. <image :src="item.icon" />
  68. </view>
  69. </template>
  70. </view>
  71. </template>
  72. </u-swiper>
  73. </u-panel>
  74. <u-panel title="合作媒体" link="https://www.productronicachina.com.cn/partners">
  75. <u-swiper :items="partners" :autoplay="false" :height="250">
  76. <template v-slot="{ scope }">
  77. <view class="partners">
  78. <template v-for="(item, index) in scope.children">
  79. <view class="partner" :key="index">
  80. <image :src="item.icon" />
  81. </view>
  82. </template>
  83. </view>
  84. </template>
  85. </u-swiper>
  86. </u-panel>
  87. </view>
  88. </view>
  89. <contact-us :show.sync="showContactUs" />
  90. <popup-ad :show.sync="showPopupAd" />
  91. <view class="floating-buttons">
  92. <view hover-class="hover" @click="showPopupAd = true">
  93. <view class="iconfont icon-xiaochengxu-canguandengjiicon"></view>
  94. <view class="floating-button-label">参观登记</view>
  95. </view>
  96. <view hover-class="hover" @click="showContactUs = true">
  97. <view class="iconfont icon-xiaochengxu-lianxiwomenicon"></view>
  98. <view class="floating-button-label">联系我们</view>
  99. </view>
  100. </view>
  101. </view>
  102. </template>
  103. <script>
  104. import NavBar from '@/components/layout/nav-bar'
  105. import UScrollView from '@/components/common/u-scroll-view'
  106. import USwiper from '@/components/common/u-swiper'
  107. import USearch from '@/components/common/u-search'
  108. import UPanel from '@/components/common/u-panel'
  109. import NewsRecommend from '@/pages/news/components/news-recommend.vue'
  110. import ContactUs from '@/pages/index/components/contact-us.vue'
  111. import PopupAd from '@/pages/index/components/popup-ad.vue'
  112. export default {
  113. options: {
  114. styleIsolation: 'shared'
  115. },
  116. components: {
  117. NavBar,
  118. UScrollView,
  119. USwiper,
  120. USearch,
  121. UPanel,
  122. NewsRecommend,
  123. ContactUs,
  124. PopupAd
  125. },
  126. data() {
  127. return {
  128. searchKeyword: '',
  129. showContactUs: false,
  130. showPopupAd: false,
  131. navIcons: [{
  132. icon: 'icon-xiaochengxu-guanyuzhanhuiicon',
  133. name: '关于展会',
  134. link: 'https://www.productronicachina.com.cn/zh-cn/productronica-china-2025'
  135. }, {
  136. icon: 'icon-xiaochengxu-zhanshangmingluicon',
  137. name: '展商名录',
  138. link: '/pages/exhibitor/index'
  139. }, {
  140. icon: 'icon-zhanpinziliaoicon',
  141. name: '展商产品',
  142. link: '/pages/exhibitor/exhibit'
  143. }, {
  144. icon: 'icon-zhantaihuodongicon',
  145. name: '同期活动',
  146. link: '/pages/activity/index'
  147. }, {
  148. icon: 'icon-zhanshangxinwenicon',
  149. name: '展商新闻',
  150. link: '/pages/news/index?type=exhibitor'
  151. }, {
  152. icon: 'icon-xiaochengxu-zhanguanpingmiantuicon',
  153. name: '展馆平面图',
  154. link: 'https://www.productronicachina.com.cn/for-visitors-fairgrounds-map'
  155. }, {
  156. icon: 'icon-xiaochengxu-guanzhongzhinanicon',
  157. name: '观众指南',
  158. link: ''
  159. }, {
  160. icon: 'icon-xiaochengxu-jiaotongzhinanicon',
  161. name: '交通指南',
  162. link: 'https://www.productronicachina.com.cn/travel-stay-getting-there'
  163. }],
  164. images: [{
  165. src: 'https://oss.starify.cn/prod/starify/up/0001018678/20241108/672da5a7dd374.png?x-oss-process=image/resize,w_750',
  166. url: 'https://www.productronicachina.com.cn/'
  167. }, {
  168. src: 'https://oss.starify.cn/prod/starify/up/0001018678/20241108/672da5a7dd374.png?x-oss-process=image/resize,w_750',
  169. url: 'https://www.productronicachina.com.cn/'
  170. }, {
  171. src: 'https://oss.starify.cn/prod/starify/up/0001018678/20241108/672da5a7dd374.png?x-oss-process=image/resize,w_750',
  172. url: 'https://www.productronicachina.com.cn/'
  173. }],
  174. videos: [{
  175. src: 'https://oss.starify.cn/prod/starify/up/0001018678/20241108/672da5a8add02.jpeg?x-oss-process=image/resize,w_500',
  176. url: 'https://matchexpo.obs.cn-north-1.myhuaweicloud.com/common/2023/1113/655190052f376.mp4'
  177. }, {
  178. src: 'https://oss.starify.cn/prod/starify/up/0001018678/20241108/672da5a8add02.jpeg?x-oss-process=image/resize,w_500',
  179. url: 'https://matchexpo.obs.cn-north-1.myhuaweicloud.com/common/2023/1113/655190052f376.mp4'
  180. }],
  181. albumPics: [{
  182. src: 'https://oss.starify.cn/prod/starify/up/0001018678/20241108/672da4d0387b5.jpeg?x-oss-process=image/resize,w_200'
  183. }, {
  184. src: 'https://oss.starify.cn/prod/starify/up/0001018678/20241108/672da4d081488.jpeg?x-oss-process=image/resize,w_200'
  185. }, {
  186. src: 'https://oss.starify.cn/prod/starify/up/0001018678/20241108/672da4d0dd2a1.jpeg?x-oss-process=image/resize,w_200'
  187. }, {
  188. src: 'https://oss.starify.cn/prod/starify/up/0001018678/20241108/672da4d13e734.jpeg?x-oss-process=image/resize,w_200'
  189. }, {
  190. src: 'https://oss.starify.cn/prod/starify/up/0001018678/20241108/672da4d1a47e6.jpeg?x-oss-process=image/resize,w_200'
  191. }, {
  192. src: 'https://oss.starify.cn/prod/starify/up/0001018678/20241108/672da4d214927.jpeg?x-oss-process=image/resize,w_200'
  193. }],
  194. // 合作方列表
  195. partners: [{
  196. name: '第一页',
  197. children: [{
  198. icon: 'https://www.productronicachina.com.cn/resources/files/0626/667b7a454718d/1 中国工控网.png'
  199. }, {
  200. icon: 'https://www.productronicachina.com.cn/resources/files/0626/667b806511810/2 智汇工业.png'
  201. }, {
  202. icon: 'https://www.productronicachina.com.cn/resources/files/0626/667b7a4536d7e/4 SMT China&化合物半导体.png'
  203. }, {
  204. icon: 'https://www.productronicachina.com.cn/resources/files/0626/667b7a451f071/3 中国电子制造&亚洲控制.png'
  205. }, {
  206. icon: 'https://www.productronicachina.com.cn/resources/files/0626/667b7a454718d/1 中国工控网.png'
  207. }, {
  208. icon: 'https://www.productronicachina.com.cn/resources/files/0626/667b806511810/2 智汇工业.png'
  209. }, {
  210. icon: 'https://www.productronicachina.com.cn/resources/files/0626/667b7a4536d7e/4 SMT China&化合物半导体.png'
  211. }, {
  212. icon: 'https://www.productronicachina.com.cn/resources/files/0626/667b7a451f071/3 中国电子制造&亚洲控制.png'
  213. }]
  214. }, {
  215. name: '第二页',
  216. children: [{
  217. icon: 'https://www.productronicachina.com.cn/resources/files/0626/667b7a454718d/1 中国工控网.png'
  218. }, {
  219. icon: 'https://www.productronicachina.com.cn/resources/files/0626/667b806511810/2 智汇工业.png'
  220. }, {
  221. icon: 'https://www.productronicachina.com.cn/resources/files/0626/667b7a4536d7e/4 SMT China&化合物半导体.png'
  222. }, {
  223. icon: 'https://www.productronicachina.com.cn/resources/files/0626/667b7a451f071/3 中国电子制造&亚洲控制.png'
  224. }, {
  225. icon: 'https://www.productronicachina.com.cn/resources/files/0626/667b7a454718d/1 中国工控网.png'
  226. }, {
  227. icon: 'https://www.productronicachina.com.cn/resources/files/0626/667b806511810/2 智汇工业.png'
  228. }, {
  229. icon: 'https://www.productronicachina.com.cn/resources/files/0626/667b7a4536d7e/4 SMT China&化合物半导体.png'
  230. }, {
  231. icon: 'https://www.productronicachina.com.cn/resources/files/0626/667b7a451f071/3 中国电子制造&亚洲控制.png'
  232. }]
  233. }],
  234. }
  235. },
  236. created() {},
  237. methods: {
  238. onClickNavIcon(item) {
  239. if (item.link === '/pages/exhibitor/index') {
  240. this.$emit('switch-tab', 'exhibitor')
  241. return
  242. }
  243. this.navigateTo(item.link)
  244. },
  245. onClickSearch() {
  246. this.navigateTo('/pages/index/search?query=' + this.searchKeyword)
  247. },
  248. onClickAlbum(index) {
  249. const pics = this.albumPics.map(v => {
  250. return v.src
  251. })
  252. uni.previewImage({
  253. current: index,
  254. urls: pics
  255. })
  256. }
  257. }
  258. }
  259. </script>
  260. <style lang="scss">
  261. .logo {
  262. width: 150rpx;
  263. height: 37rpx;
  264. }
  265. .panel-group{
  266. margin-top: 43rpx;
  267. background-color: #FFFFFF;
  268. &.panel-group-1{
  269. margin-top: 0;
  270. }
  271. }
  272. .top-container {
  273. display: flex;
  274. align-items: center;
  275. .countdown {
  276. display: flex;
  277. align-items: center;
  278. margin-left: 27rpx;
  279. font-size: $fontSize3;
  280. .days {
  281. color: #F97316;
  282. font-size: $fontSize6;
  283. font-weight: bold;
  284. padding: 0 4rpx;
  285. }
  286. }
  287. }
  288. .search-container {
  289. .search-input {
  290. height: 64rpx;
  291. border-radius: 50rpx;
  292. background-color: #FFFFFF;
  293. box-shadow: 0 4rpx 4rpx 0 rgba(0, 0, 0, 0.15);
  294. border: 2rpx solid #D9D9D9;
  295. padding: 4rpx;
  296. overflow: hidden;
  297. .van-field__placeholder{
  298. font-size: $fontSize2;
  299. }
  300. .van-cell__left-icon-wrap{
  301. height: 50rpx;
  302. }
  303. .van-field__control{
  304. font-size: $fontSize2;
  305. height: 50rpx;
  306. }
  307. }
  308. .van-search {
  309. --search-padding: 0rpx;
  310. --search-input-height: 34rpx;
  311. --search-background-color: #FFFFFF;
  312. padding-right: 24rpx;
  313. font-size: $fontSize2;
  314. }
  315. .search-text{
  316. font-size: $fontSize2;
  317. }
  318. .van-search__action {
  319. color: #333333;
  320. }
  321. .van-icon {
  322. color: #D4D4D6;
  323. }
  324. .van-cell {
  325. padding: 2rpx 0rpx 2rpx !important;
  326. }
  327. }
  328. .nav-icons {
  329. display: grid;
  330. grid-template-columns: 1fr 1fr 1fr 1fr;
  331. grid-row-gap: 53rpx;
  332. margin-top: 47rpx;
  333. margin-bottom: 41rpx;
  334. .nav-icon-wrapper {
  335. @include display-flex-center;
  336. flex-direction: column;
  337. cursor: pointer;
  338. }
  339. .nav-text {
  340. margin-top: 20rpx;
  341. font-size: $fontSize3;
  342. color: #555555;
  343. }
  344. .nav-icon {
  345. @include display-flex-center;
  346. width: 73rpx;
  347. height: 73rpx;
  348. border-radius: 50%;
  349. overflow: hidden;
  350. background-color: $buttonPrimaryColor;
  351. .iconfont{
  352. font-size: 46rpx;
  353. color: #FFFFFF;
  354. }
  355. &>view {
  356. width: 46rpx;
  357. height: 46rpx;
  358. background-size: 46rpx 46rpx;
  359. }
  360. }
  361. }
  362. .album {
  363. display: grid;
  364. grid-auto-flow: row;
  365. grid-gap: 15rpx;
  366. height: 500rpx;
  367. width: fit-content;
  368. grid-template-areas: "a b b" "c d f" "c e f";
  369. .album-pic {
  370. width: 196rpx;
  371. height: 155rpx;
  372. border-radius: 10rpx;
  373. overflow: hidden;
  374. &:nth-child(1) {
  375. grid-area: a;
  376. }
  377. &:nth-child(2) {
  378. width: 418rpx;
  379. height: 155rpx;
  380. grid-area: b;
  381. }
  382. &:nth-child(3) {
  383. grid-area: c;
  384. }
  385. &:nth-child(4) {
  386. grid-area: d;
  387. }
  388. &:nth-child(5) {
  389. grid-area: e;
  390. }
  391. &:nth-child(6) {
  392. grid-area: f;
  393. }
  394. &:nth-child(3),
  395. &:nth-child(6) {
  396. width: 196rpx;
  397. height: 324rpx;
  398. }
  399. }
  400. image {
  401. width: 100%;
  402. height: 100%;
  403. }
  404. }
  405. .partners {
  406. display: grid;
  407. grid-template-columns: repeat(4, 1fr);
  408. grid-column-gap: 9rpx;
  409. grid-row-gap: 13rpx;
  410. .partner{
  411. @include display-flex-center;
  412. width: 150rpx;
  413. height: 91rpx;
  414. }
  415. image {
  416. width: 127rpx;
  417. height: 25rpx;
  418. }
  419. }
  420. .floating-buttons{
  421. position: fixed;
  422. right: 30rpx;
  423. bottom: 200rpx;
  424. display: grid;
  425. grid-template-columns: 1fr;
  426. grid-row-gap: 19rpx;
  427. &>view{
  428. @include display-flex-center;
  429. flex-direction: column;
  430. width: 100rpx;
  431. height: 100rpx;
  432. background-color: #FFFFFF;
  433. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0,0,0,0.25);
  434. border-radius: 50%;
  435. cursor: pointer;
  436. }
  437. .floating-button-label{
  438. margin-top: 4rpx;
  439. font-size: $fontSize0;
  440. color: #94A3B8;
  441. white-space: nowrap;
  442. }
  443. .iconfont{
  444. font-size: 44rpx;
  445. color: $textActionColor;
  446. }
  447. }
  448. </style>