home.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  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. uni.navigateTo({
  247. url: '/pages/index/search?query=' + this.searchKeyword
  248. })
  249. },
  250. onClickAlbum(index) {
  251. const pics = this.albumPics.map(v => {
  252. return v.src
  253. })
  254. uni.previewImage({
  255. current: index,
  256. urls: pics
  257. })
  258. }
  259. }
  260. }
  261. </script>
  262. <style lang="scss">
  263. .logo {
  264. width: 150rpx;
  265. height: 37rpx;
  266. }
  267. .panel-group{
  268. margin-top: 43rpx;
  269. background-color: #FFFFFF;
  270. &.panel-group-1{
  271. margin-top: 0;
  272. }
  273. }
  274. .top-container {
  275. display: flex;
  276. align-items: center;
  277. .countdown {
  278. display: flex;
  279. align-items: center;
  280. margin-left: 27rpx;
  281. font-size: $fontSize3;
  282. .days {
  283. color: #F97316;
  284. font-size: $fontSize6;
  285. font-weight: bold;
  286. padding: 0 4rpx;
  287. }
  288. }
  289. }
  290. .search-container {
  291. .search-input {
  292. height: 64rpx;
  293. border-radius: 50rpx;
  294. background-color: #FFFFFF;
  295. box-shadow: 0 4rpx 4rpx 0 rgba(0, 0, 0, 0.15);
  296. border: 2rpx solid #D9D9D9;
  297. padding: 4rpx;
  298. overflow: hidden;
  299. .van-field__placeholder{
  300. font-size: $fontSize2;
  301. }
  302. .van-cell__left-icon-wrap{
  303. height: 50rpx;
  304. }
  305. .van-field__control{
  306. font-size: $fontSize2;
  307. height: 50rpx;
  308. }
  309. }
  310. .van-search {
  311. --search-padding: 0rpx;
  312. --search-input-height: 34rpx;
  313. --search-background-color: #FFFFFF;
  314. padding-right: 24rpx;
  315. font-size: $fontSize2;
  316. }
  317. .search-text{
  318. font-size: $fontSize2;
  319. }
  320. .van-search__action {
  321. color: #333333;
  322. }
  323. .van-icon {
  324. color: #D4D4D6;
  325. }
  326. .van-cell {
  327. padding: 2rpx 0rpx 2rpx !important;
  328. }
  329. }
  330. .nav-icons {
  331. display: grid;
  332. grid-template-columns: 1fr 1fr 1fr 1fr;
  333. grid-row-gap: 53rpx;
  334. margin-top: 47rpx;
  335. margin-bottom: 41rpx;
  336. .nav-icon-wrapper {
  337. @include display-flex-center;
  338. flex-direction: column;
  339. cursor: pointer;
  340. }
  341. .nav-text {
  342. margin-top: 20rpx;
  343. font-size: $fontSize3;
  344. color: #555555;
  345. }
  346. .nav-icon {
  347. @include display-flex-center;
  348. width: 73rpx;
  349. height: 73rpx;
  350. border-radius: 50%;
  351. overflow: hidden;
  352. background-color: $buttonPrimaryColor;
  353. .iconfont{
  354. font-size: 46rpx;
  355. color: #FFFFFF;
  356. }
  357. &>view {
  358. width: 46rpx;
  359. height: 46rpx;
  360. background-size: 46rpx 46rpx;
  361. }
  362. }
  363. }
  364. .album {
  365. display: grid;
  366. grid-auto-flow: row;
  367. grid-gap: 15rpx;
  368. height: 500rpx;
  369. width: fit-content;
  370. grid-template-areas: "a b b" "c d f" "c e f";
  371. .album-pic {
  372. width: 196rpx;
  373. height: 155rpx;
  374. border-radius: 10rpx;
  375. overflow: hidden;
  376. &:nth-child(1) {
  377. grid-area: a;
  378. }
  379. &:nth-child(2) {
  380. width: 418rpx;
  381. height: 155rpx;
  382. grid-area: b;
  383. }
  384. &:nth-child(3) {
  385. grid-area: c;
  386. }
  387. &:nth-child(4) {
  388. grid-area: d;
  389. }
  390. &:nth-child(5) {
  391. grid-area: e;
  392. }
  393. &:nth-child(6) {
  394. grid-area: f;
  395. }
  396. &:nth-child(3),
  397. &:nth-child(6) {
  398. width: 196rpx;
  399. height: 324rpx;
  400. }
  401. }
  402. image {
  403. width: 100%;
  404. height: 100%;
  405. }
  406. }
  407. .partners {
  408. display: grid;
  409. grid-template-columns: repeat(4, 1fr);
  410. grid-column-gap: 9rpx;
  411. grid-row-gap: 13rpx;
  412. .partner{
  413. @include display-flex-center;
  414. width: 150rpx;
  415. height: 91rpx;
  416. }
  417. image {
  418. width: 127rpx;
  419. height: 25rpx;
  420. }
  421. }
  422. .floating-buttons{
  423. position: fixed;
  424. right: 30rpx;
  425. bottom: 200rpx;
  426. display: grid;
  427. grid-template-columns: 1fr;
  428. grid-row-gap: 19rpx;
  429. &>view{
  430. @include display-flex-center;
  431. flex-direction: column;
  432. width: 100rpx;
  433. height: 100rpx;
  434. background-color: #FFFFFF;
  435. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0,0,0,0.25);
  436. border-radius: 50%;
  437. cursor: pointer;
  438. }
  439. .floating-button-label{
  440. margin-top: 4rpx;
  441. font-size: $fontSize0;
  442. color: #94A3B8;
  443. white-space: nowrap;
  444. }
  445. .iconfont{
  446. font-size: 44rpx;
  447. color: $textActionColor;
  448. }
  449. }
  450. </style>