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.

819 lines
29 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div
  3. class="exhibition-content tw-grid tw-grid-cols-1 tw-gap-[30px] tw-mt-[20px] tw-mb-[60px] md:tw-px-[30px] md:tw-mt-[30px] md:tw-gap-[60px] xl:tw-px-[60px] xl:tw-max-w-screen-xl xl:tw-mx-auto xl:tw-grid-cols-[auto_364px]">
  4. {{ relatedservicelist.category }}
  5. <mobileFixTopBar ref="stickySwiper" :fixBar="fixBar" :currStep="currStep" :list="fixBarList"></mobileFixTopBar>
  6. <section class="section1 tw-px-[30px] md:tw-px-0 xl:tw-w-full xl:tw-col-span-2">
  7. <ExhibitionBannerArea :exhibition="exhibition"></ExhibitionBannerArea>
  8. </section>
  9. <section class="section2 tw-px-[30px] md:tw-px-0 xl:tw-pr-[30px] xl:tw-col-start-1 xl:tw-row-start-2">
  10. <Breadcrumbs class="tw-px-0 md:tw-mb-[40px]"></Breadcrumbs>
  11. <div class="tw-hidden md:tw-block">
  12. <div class="md:tw-h-[48px] md:tw-grid md:tw-grid-cols-3 md:tw-gap-[12px] md:tw-mb-[30px]">
  13. <a :href="exhibition.website" :target="exhibition.website == '#' ? '_self' : '_blank'">
  14. <div
  15. class="tw-bg-[#F6F6F6] tw-w-full tw-text-neutrals-800 elevation-0 tw-px-[34px] tw-py-[12px] tw-float-left tw-text-[16px]">
  16. <unicon name="globe" class="float-left mr-3" />
  17. <span>{{ $t("Official Website") }}</span>
  18. </div>
  19. </a>
  20. <a :href="
  21. 'https://www.facebook.com/share.php?u=' +
  22. this.currentDomain +
  23. this.$route.fullPath
  24. " target="_blank">
  25. <div
  26. class="tw-bg-[#F6F6F6] tw-w-full tw-text-neutrals-800 elevation-0 tw-px-[34px] tw-py-[12px] tw-float-left tw-text-[16px]">
  27. <unicon name="facebook-f" class="float-left mr-3" />
  28. <span class="mt-n2">{{ $t("Share with friends") }}</span>
  29. </div>
  30. </a>
  31. <div @click="toggleFavorite"
  32. class="tw-bg-[#F6F6F6] tw-w-full tw-text-neutrals-800 elevation-0 tw-px-[34px] tw-py-[12px] tw-float-left tw-text-[16px]">
  33. <v-icon class="mr-2" color="neutrals darken-5">{{ saved? "mdi-heart": "mdi-heart-outline" }}
  34. </v-icon>
  35. <span>{{ $t("Follow Event") }}</span>
  36. </div>
  37. </div>
  38. </div>
  39. </section>
  40. <section class="step section3 tw-px-[30px] md:tw-px-0 xl:tw-pr-[30px] xl:tw-col-start-1 xl:tw-row-start-3">
  41. <ExhibitionIntro class="d-block" :exhibition="exhibition"></ExhibitionIntro>
  42. </section>
  43. <section class="section4 tw-ml-[12px] md:tw-ml-0 md:tw-px-0 xl:tw-col-start-1 xl:tw-row-start-4">
  44. <ExhibitionAD v-if="ads" :items="ads"></ExhibitionAD>
  45. </section>
  46. <section class="section5 tw-px-[30px] md:tw-px-0 xl:tw-col-start-1 xl:tw-row-start-5">
  47. <div v-if="relatedserviceShow">
  48. <h3 ref="relatedServices" id="relatedServices" data-step="relatedServices" class="step md:tw-text-[20px]">
  49. <two-dots class="tw-mr-7" />{{ $t("Related Services") }}
  50. </h3>
  51. <RelatedServicesSwiper :getCategory="getCategory" class="tw-mb-[30px] xl:tw-max-w-[822px]"
  52. @categoryid="getCategoryId" @getAllServiceList="getAllService" @test="testtest"></RelatedServicesSwiper>
  53. <template v-for="(item, index) in relatedservicelist">
  54. <RelatedServices v-if="index <= 2" :key="index" :relatedservice="item"
  55. :relatedservicelist="relatedservicelist" class="tw-mb-[20px] md:tw-mb-[30px]">
  56. </RelatedServices>
  57. </template>
  58. <button
  59. class="tw-body-3 tw-text-primary-1 tw-w-full tw-py-[10px] tw-justify-center tw-flex tw-flex-row tw-items-center">
  60. <nuxt-link v-if="getcategoryid" :to="localePath(getcategoryid)" target="_blank"
  61. class="tw-mr-[16px] hover:tw-text-primary-1">
  62. {{ $t('See more') }}
  63. </nuxt-link>
  64. <nuxt-link v-else :to="localePath('/service')" target="_blank" class="tw-mr-[16px] hover:tw-text-primary-1">
  65. {{ $t('See more') }}
  66. </nuxt-link>
  67. <img src="~/assets/svg/seeMore.svg" alt="" />
  68. </button>
  69. </div>
  70. <div ref="photoGallery" id="photoGallery" data-step="photoGallery"
  71. v-show="exhibition.gallery.length > 0 || exhibition.videos.length > 0" :class="['tw-mb-10 step']">
  72. <h3 class="md:tw-text-[20px]">
  73. <two-dots class="mr-7" />{{ $t("Photo & Video Gallery") }}
  74. </h3>
  75. <ExhibitionPhotoVideoGallery class="mt-lg-13 px-n7 mt-7"
  76. v-if="exhibition.gallery.length > 0 || exhibition.videos.length > 0" :exhibition="exhibition" />
  77. </div>
  78. <div ref="venue" id="venue" data-step="venue" v-show="exhibition.venues && exhibition.venues.length > 0"
  79. :class="['tw-mb-10 step']">
  80. <h3 class="md:tw-text-[20px]">
  81. <two-dots class="mr-7" />{{ $t("Venue") }}
  82. </h3>
  83. <ExhibitionVenue class="mt-lg-13 mt-7" v-if="exhibition.venues && exhibition.venues.length > 0"
  84. :exhibition="exhibition" />
  85. </div>
  86. <div ref="exhibitProfile" id="exhibitProfile" data-step="exhibitProfile" v-show="exhibition.profile != ''"
  87. :class="['tw-mb-10 step']">
  88. <h3 class="md:tw-text-[20px]">
  89. <two-dots class="mr-7" />{{ $t("Exhibit Profile") }}
  90. </h3>
  91. <ExhibitionExhibitProfile class="mt-lg-13 mt-7" :exhibition="exhibition" />
  92. </div>
  93. <div ref="detailedDescription" id="detailedDescription" data-step="detailedDescription" :class="['step']"
  94. v-show="exhibition.description != ''">
  95. <h3 class="md:tw-text-[20px]">
  96. <two-dots class="mr-7" />{{ $t("Detailed Description") }}
  97. </h3>
  98. <ExhibitionDetailDescription class="mt-lg-13 mt-7" :exhibition="exhibition" />
  99. </div>
  100. </section>
  101. <!-- <section class="section6 tw-px-[30px] md:tw-px-0 xl:tw-col-span-2 xl:tw-row-start-6">
  102. <h3>
  103. <two-dots class="step tw-mr-7" />{{ $t("You might like ...") }}
  104. </h3>
  105. <v-slide-group>
  106. <template v-for="(item, i) in exhibition.recommended">
  107. <v-slide-item v-if="exhibition.recommended" :key="i">
  108. <nuxt-link :to="localePath('/exhibition/' + item.id)">
  109. <ExhibitionYouMightLike class="float-left" :item="item" />
  110. </nuxt-link>
  111. </v-slide-item>
  112. </template>
  113. </v-slide-group>
  114. </section> -->
  115. <section class="section7 tw-hidden xl:tw-block xl:tw-row-start-2 xl:tw-row-end-6">
  116. <sideBarMenu :fixBarList="fixBarList" :currStep="currStep"></sideBarMenu>
  117. </section>
  118. </div>
  119. </template>
  120. <script>
  121. import ExhibitionBannerArea from "@/components/exhibition/ExhibitionBannerArea";
  122. import ExhibitionIntro from "@/components/exhibition/ExhibitionIntro";
  123. import ExhibitionReviews from "@/components/exhibition/ExhibitionReviews";
  124. import ExhibitionPhotoVideoGallery from "@/components/exhibition/ExhibitionPhotoVideoGallery";
  125. import Breadcrumbs from "@/components/Breadcrumbs";
  126. import TwoDots from "@/components/TwoDots";
  127. import ExhibitionAD from "@/components/exhibition/ExhibitionAD";
  128. import ExhibitionYouMightLike from "@/components/exhibition/ExhibitionYouMightLike";
  129. import { Swiper, SwiperSlide } from "vue-awesome-swiper";
  130. import { scrollama } from "scrollama";
  131. import SeeMoreDetailDescription from "@/components/exhibition/SeeMoreDetailDescription.vue";
  132. import RelatedServices from "@/components/service/RelatedServicesCard.vue";
  133. import RelatedServicesSwiper from "@/components/swiper/relatedService.vue";
  134. import mobileFixTopBar from "@/components/swiper/mobileFixTopBar.vue";
  135. import sideBarMenu from "@/components/service/content/sideBarMenu.vue";
  136. import { CornerDownLeftIcon } from "vue-feather-icons";
  137. export default {
  138. auth: false,
  139. name: "ExhibitionContent",
  140. components: {
  141. Breadcrumbs,
  142. ExhibitionAD,
  143. ExhibitionBannerArea,
  144. ExhibitionIntro,
  145. ExhibitionReviews,
  146. ExhibitionPhotoVideoGallery,
  147. ExhibitionYouMightLike,
  148. Swiper,
  149. SwiperSlide,
  150. scrollama,
  151. TwoDots,
  152. SeeMoreDetailDescription,
  153. RelatedServices,
  154. RelatedServicesSwiper,
  155. mobileFixTopBar,
  156. sideBarMenu,
  157. },
  158. meta: {
  159. pageName: "Exhibition content",
  160. },
  161. head() {
  162. return {
  163. title: this.rsexhibition.ExhibitionName,
  164. meta: [
  165. {
  166. name: this.rsexhibition.ExhibitionName,
  167. content: this.exhibition.description,
  168. },
  169. { hid: "og:title", name: "og:title", content: this.exhibition.name },
  170. { hid: "og:image", name: "og:image", content: this.exhibition.logo },
  171. {
  172. hid: "og:url",
  173. name: "og:url",
  174. content: this.currentDomain + this.$route.fullPath,
  175. },
  176. {
  177. hid: "og:description",
  178. name: "og:description",
  179. content: this.exhibition.description,
  180. },
  181. { hid: "og:type", name: "og:type", content: "website" },
  182. // other meta
  183. ],
  184. };
  185. },
  186. data() {
  187. return {
  188. windowHeight: 0,
  189. currentDomain: "https://www.showeasy.com",
  190. apiUrl: process.env.SERVICE_CONSOLE,
  191. list: [],
  192. navControl: {
  193. ad: true,
  194. nav: false,
  195. mobnav: false,
  196. },
  197. ads: [],
  198. rsexhibition: {},
  199. exhibitionID: "",
  200. tab: "0",
  201. saved: false,
  202. Favorite: {},
  203. favoriteSet: new Set(),
  204. exhibition: {
  205. id: null,
  206. name: "",
  207. enname: "",
  208. subtitle: null,
  209. region: {},
  210. country: {},
  211. city: {},
  212. logo: "",
  213. banner: null,
  214. startdate: "",
  215. enddate: "",
  216. status: "",
  217. website: "",
  218. isRecommend: null,
  219. isLiked: null,
  220. rating: 0,
  221. reviewCount: null,
  222. exhibitors: "",
  223. visitors: "",
  224. internalexhibitors: null,
  225. intVisitors: 0,
  226. area: null,
  227. showstatusid: 100,
  228. about: "",
  229. profile: "",
  230. description: "",
  231. shortName: null,
  232. frequency: {},
  233. online: {},
  234. organizers: [],
  235. videos: [],
  236. gallery: {},
  237. venues: [],
  238. categories: [],
  239. subcategories: [],
  240. },
  241. relatedserviceShow: false,
  242. relatedservicelist: [],
  243. getservicecategory: [],
  244. seemore: false,
  245. getCategory: [],
  246. getcategoryid: "",
  247. testcategory: "",
  248. currStep: null,
  249. fixBar: false,
  250. fixBarList: [],
  251. };
  252. },
  253. async created() {
  254. this.getExhibitionCard();
  255. this.getAdList();
  256. this.getFavorite();
  257. // await this.getExhibition();
  258. // await this.getServiceCategory();
  259. // await this.getCategorySwiperList();
  260. // await this.getRelatedServiceList();
  261. // await this.checkRelatedService();
  262. },
  263. async beforeCreate() {
  264. },
  265. mounted() {
  266. let vm = this;
  267. vm.$nextTick(function () {
  268. vm.list = [
  269. /* {
  270. url: "#ExhibitionHighlightReview",
  271. name: "Highlight Review",
  272. isShow:false,
  273. },
  274. {
  275. url: "#ExhibitionRelatedServices",
  276. name: "Related Services",
  277. isShow:false,
  278. },*/
  279. {
  280. url: "#ExhibitionPhotoVideoGallery",
  281. name: "Photo & Video Gallery",
  282. isShow:
  283. this.exhibition.gallery.length > 0 ||
  284. this.exhibition.videos.length > 0
  285. ? true
  286. : false,
  287. },
  288. {
  289. url: "#ExhibitionVenue",
  290. name: "Venue",
  291. isShow:
  292. this.exhibition.venues && this.exhibition.venues.length > 0
  293. ? true
  294. : false,
  295. },
  296. {
  297. url: "#ExhibitionExhibitProfile",
  298. name: "Exhibit Profile",
  299. isShow: this.exhibition.profile ? true : false,
  300. },
  301. {
  302. url: "#ExhibitionDetailDescription",
  303. name: "Detailed Description",
  304. isShow: this.exhibition.description ? true : false,
  305. },
  306. /*{
  307. url: "#ExhibitionReviews",
  308. name: "Reviews",
  309. isShow:false,
  310. },*/
  311. ];
  312. // instantiate the scrollama
  313. const scrollama = require("scrollama");
  314. const scroller = scrollama();
  315. // setup the instance, pass callback functions
  316. scroller
  317. .setup({
  318. step: ".exhibition-content .step",
  319. offset: 0.6,
  320. })
  321. .onStepEnter((response) => {
  322. // { element, index, direction }
  323. vm.currStep = response.element.id;
  324. if (response.index > 3) {
  325. vm.$refs.stickySwiper.slideTo(4);
  326. } else {
  327. vm.$refs.stickySwiper.slideTo(0);
  328. }
  329. if (response.index >= 1) {
  330. vm.fixBar = true;
  331. } else {
  332. vm.fixBar = false;
  333. }
  334. })
  335. .onStepExit((response) => {
  336. // { element, index, direction }
  337. vm.currStep = response.element.id;
  338. if (response.index >= 1) {
  339. vm.fixBar = true;
  340. } else {
  341. vm.fixBar = false;
  342. }
  343. });
  344. });
  345. },
  346. watch: {
  347. relatedservicelist: {
  348. handler: function () {
  349. if (this.relatedservicelist) {
  350. this.relatedservicelist.forEach((item) => {
  351. this.serviceListCategory = item.category;
  352. if (this.getservicecategory) {
  353. this.getservicecategory.forEach((category) => {
  354. if (item.category == category.ids[0]) {
  355. item.category = category.lang_text;
  356. }
  357. });
  358. }
  359. });
  360. }
  361. },
  362. },
  363. },
  364. methods: {
  365. getExhibitionCard() {
  366. this.exhibitionID = this.$route.params.id;
  367. this.$axios
  368. .get(
  369. `/trending/api/Exhibition/Exhibition?Lang=${this.$i18n.localeProperties["langQuery"]}` +
  370. `&ExhibitionID=${this.exhibitionID}`
  371. )
  372. .then((result) => {
  373. if (result.data.DATA.rel) {
  374. let exhib = result.data.DATA.rel;
  375. this.rsexhibition = exhib;
  376. // console.log(exhib.ExhibitionName);
  377. this.exhibition.id = exhib.ExhibitionID;
  378. this.exhibition.name = exhib.ExhibitionName;
  379. this.exhibition.enname = exhib.ExhibitionENName;
  380. this.exhibition.subtitle = "";
  381. this.exhibition.region.name = exhib.Region.RegionName;
  382. this.exhibition.country.name = exhib.Country.CountryName;
  383. this.exhibition.city.name = exhib.City.CityName;
  384. this.exhibition.logo = exhib.Logo;
  385. this.exhibition.banner = "";
  386. this.exhibition.startdate = exhib.StartDate;
  387. this.exhibition.enddate = exhib.EndDate;
  388. this.exhibition.status = exhib.Status;
  389. this.exhibition.website = exhib.Website;
  390. this.exhibition.isRecommend = exhib.IsRecommend;
  391. this.exhibition.isLiked = "";
  392. this.exhibition.rating = "";
  393. this.exhibition.reviewCount = "";
  394. this.exhibition.exhibitors = exhib.ExhibitorCount;
  395. this.exhibition.visitors = exhib.VisitorCount;
  396. this.exhibition.internalexhibitors = exhib.IntVisitorCount;
  397. this.exhibition.intVisitors = exhib.IntVisitorCount;
  398. this.exhibition.area = exhib.ExhibSize;
  399. this.exhibition.showstatusid = "";
  400. this.exhibition.about = exhib.Intro;
  401. this.exhibition.profile = exhib.Profile;
  402. this.exhibition.description = exhib.Detail;
  403. this.exhibition.shortName = exhib.AbbreviatedName;
  404. this.exhibition.frequency = exhib.Frequency;
  405. this.exhibition.online = exhib.IsVirtualEvent;
  406. this.exhibition.organizers = exhib.Organizers;
  407. this.exhibition.videos = exhib.Videos;
  408. this.exhibition.gallery = exhib.Images;
  409. this.exhibition.venues = exhib.Venues;
  410. this.exhibition.categories = exhib.MainCategories;
  411. this.exhibition.subcategories = exhib.SubCategories;
  412. this.setSideBarList();
  413. this.setFavorite();
  414. }
  415. })
  416. .catch((err) => {
  417. console.log(err);
  418. });
  419. },
  420. getAdList() {
  421. this.ads = [{
  422. image: require('/assets/img/thems/Frame33.png')
  423. }, {
  424. image: require('/assets/img/thems/Frame33.png')
  425. }, {
  426. image: require('/assets/img/thems/Frame33.png')
  427. }]
  428. },
  429. setSideBarList() {
  430. if (this.relatedservicelist.length > 0) {
  431. this.fixBarList.push({ id: "relatedServices", title: "Related Services", show: true });
  432. }
  433. if (this.exhibition.videos.length > 0 || this.exhibition.gallery.length > 0) {
  434. this.fixBarList.push({ id: "photoGallery", title: "Photo & Video Gallery", show: true });
  435. }
  436. if (this.exhibition.venues.length > 0) {
  437. this.fixBarList.push({ id: "venue", title: "Venue", show: true });
  438. }
  439. if (this.exhibition.profile) {
  440. this.fixBarList.push({ id: "exhibitProfile", title: "Exhibit Profile", show: true });
  441. }
  442. if (this.exhibition.description) {
  443. this.fixBarList.push({ id: "detailedDescription", title: "Detailed Description", show: true });
  444. }
  445. },
  446. introCheck(entries, observer, isIntersecting) {
  447. this.navControl.mobnav = !isIntersecting;
  448. },
  449. checkNavBlock(entries, observer, isIntersecting) {
  450. this.navControl.ad = isIntersecting;
  451. },
  452. navfix(entries, observer, isIntersecting) {
  453. this.navControl.nav = isIntersecting;
  454. },
  455. getFavorite() {
  456. this.favoriteSet.clear();
  457. if (this.$auth.loggedIn) {
  458. this.$axios.get(`/trending/api/Favorite/Favorites?Type=Exhibition`)
  459. .then((result) => {
  460. if(result && result.data && result.data.DATA && result.data.DATA.rel){
  461. let favoriteList = [];
  462. favoriteList = result.data.DATA.rel;
  463. favoriteList.forEach(item => {
  464. this.favoriteSet.add(item.ParentID);
  465. })
  466. }
  467. })
  468. .catch((err) => {
  469. console.log("getFavorite"+err);
  470. });
  471. }
  472. },
  473. setFavorite() {
  474. if (this.favoriteSet.size > 0 && this.$auth.loggedIn) {
  475. if (this.favoriteSet.has(this.exhibition.id)) {
  476. this.saved = true;
  477. }
  478. }
  479. },
  480. toggleFavorite() {
  481. if (this.saved) {
  482. this.saved = false;
  483. this.Favorite.IsFavorite = 'N';
  484. } else {
  485. this.saved = true;
  486. this.Favorite.IsFavorite = 'Y';
  487. }
  488. this.Favorite.Type = 'Exhibition';
  489. this.Favorite.ParentID = this.exhibition.id;
  490. if (this.$auth.loggedIn) {
  491. this.$axios
  492. .post(
  493. `/trending/api/Favorite/Favorite`, this.Favorite
  494. )
  495. .then((result) => {
  496. })
  497. .catch((err) => {
  498. console.log(err);
  499. });
  500. } else {
  501. this.$router.push(this.localePath("/user"));
  502. }
  503. },
  504. // toggleFavorite() {
  505. // if (this.$auth.loggedIn) {
  506. // this.$axios
  507. // .put(
  508. // `/member/exhibitions?jwt=${this.$auth.$storage.getUniversal("jwt")
  509. // ? this.$auth.$storage.getUniversal("jwt").token
  510. // : ""
  511. // }&exhibition_id=${this.$route.params.id}&delete=${this.saved}`
  512. // )
  513. // .then((result) => {
  514. // this.saved = !this.saved;
  515. // })
  516. // .catch((err) => {
  517. // console.log(err);
  518. // });
  519. // } else {
  520. // this.$router.push(this.localePath("/user"));
  521. // }
  522. // },
  523. async getExhibition() {
  524. if (this.$route.query.preview) {
  525. await this.$axios
  526. .get(
  527. "/admin/events/previewShows/" +
  528. this.$route.params.id +
  529. this.$i18n.localeProperties["langQuery"]
  530. )
  531. .then((res) => {
  532. this.exhibition.id = res.data.exhibition.id;
  533. this.exhibition.name = res.data.exhibition.name;
  534. this.exhibition.subtitle = res.data.exhibition.subtitle;
  535. this.exhibition.region = res.data.exhibition.region;
  536. this.exhibition.country = res.data.exhibition.country;
  537. this.exhibition.city = res.data.exhibition.city;
  538. this.exhibition.logo = res.data.exhibition.logo;
  539. this.exhibition.banner = res.data.exhibition.banner;
  540. this.exhibition.startdate = res.data.exhibition.startdate;
  541. this.exhibition.enddate = res.data.exhibition.enddate;
  542. this.exhibition.status = res.data.exhibition.status;
  543. this.exhibition.website = res.data.exhibition.website;
  544. this.exhibition.isRecommend = res.data.exhibition.isRecommend;
  545. this.exhibition.isLiked = res.data.exhibition.isLiked;
  546. this.exhibition.rating = res.data.exhibition.rating;
  547. this.exhibition.reviewCount = res.data.exhibition.reviewCount;
  548. this.exhibition.exhibitors = res.data.exhibition.exhibitors;
  549. this.exhibition.visitors = res.data.exhibition.visitors;
  550. this.exhibition.internalexhibitors =
  551. res.data.exhibition.internalexhibitors;
  552. this.exhibition.area = res.data.exhibition.area;
  553. this.exhibition.showstatusid = res.data.exhibition.showstatusid;
  554. this.exhibition.about = res.data.exhibition.about;
  555. this.exhibition.profile = res.data.exhibition.profile;
  556. this.exhibition.description = res.data.exhibition.description;
  557. this.exhibition.shortName = res.data.exhibition.shortName;
  558. this.exhibition.frequency = res.data.exhibition.frequency;
  559. this.exhibition.online = res.data.exhibition.online;
  560. this.exhibition.organizers = res.data.exhibition.organizers;
  561. this.exhibition.videos = res.data.exhibition.videos;
  562. this.exhibition.gallery = res.data.exhibition.gallery;
  563. this.exhibition.venues = res.data.exhibition.venues;
  564. this.exhibition.categories = res.data.exhibition.categories;
  565. this.exhibition.subcategories = res.data.exhibition.subcategories;
  566. })
  567. .catch((err) => {
  568. console.log(err);
  569. });
  570. } else {
  571. await this.$axios
  572. .get(
  573. `/exhibitions/${this.$route.params.id}?lang=${this.$i18n.localeProperties["langQuery"]}`
  574. )
  575. .then((res) => {
  576. this.exhibition.id = res.data.exhibition.id;
  577. this.exhibition.name = res.data.exhibition.name;
  578. this.exhibition.subtitle = res.data.exhibition.subtitle;
  579. this.exhibition.region = res.data.exhibition.region;
  580. this.exhibition.country = res.data.exhibition.country;
  581. this.exhibition.city = res.data.exhibition.city;
  582. this.exhibition.logo = res.data.exhibition.logo;
  583. this.exhibition.banner = res.data.exhibition.banner;
  584. this.exhibition.startdate = res.data.exhibition.startdate;
  585. this.exhibition.enddate = res.data.exhibition.enddate;
  586. this.exhibition.status = res.data.exhibition.status;
  587. this.exhibition.website = res.data.exhibition.website;
  588. this.exhibition.isRecommend = res.data.exhibition.isRecommend;
  589. this.exhibition.isLiked = res.data.exhibition.isLiked;
  590. this.exhibition.rating = res.data.exhibition.rating;
  591. this.exhibition.reviewCount = res.data.exhibition.reviewCount;
  592. this.exhibition.exhibitors = res.data.exhibition.exhibitors;
  593. this.exhibition.visitors = res.data.exhibition.visitors;
  594. this.exhibition.internalexhibitors =
  595. res.data.exhibition.internalexhibitors;
  596. this.exhibition.area = res.data.exhibition.area;
  597. this.exhibition.showstatusid = res.data.exhibition.showstatusid;
  598. this.exhibition.about = res.data.exhibition.about;
  599. this.exhibition.profile = res.data.exhibition.profile;
  600. this.exhibition.description = res.data.exhibition.description;
  601. this.exhibition.shortName = res.data.exhibition.shortName;
  602. this.exhibition.frequency = res.data.exhibition.frequency;
  603. this.exhibition.online = res.data.exhibition.online;
  604. this.exhibition.organizers = res.data.exhibition.organizers;
  605. this.exhibition.videos = res.data.exhibition.videos;
  606. this.exhibition.gallery = res.data.exhibition.gallery;
  607. this.exhibition.venues = res.data.exhibition.venues;
  608. this.exhibition.categories = res.data.exhibition.categories;
  609. this.exhibition.subcategories = res.data.exhibition.subcategories;
  610. })
  611. .catch((err) => {
  612. console.log(err);
  613. });
  614. }
  615. },
  616. async getCategorySwiperList() {
  617. let langCode = this.$i18n.localeProperties["langQuery"];
  618. await this.$axios
  619. .get(
  620. `/service/category?lang_code=${langCode}`
  621. )
  622. .then((res) => {
  623. let categoryArray = [];
  624. let result = res.data;
  625. for (let i in result) {
  626. let obj = {
  627. ids: [result[i].id, result[i].service_category_id],
  628. lang_text: result[i].language_text[0].text
  629. }
  630. categoryArray.push(obj);
  631. }
  632. this.getCategory = categoryArray;
  633. })
  634. .catch((error) => console.log(error));
  635. },
  636. async getRelatedServiceList() {
  637. // &expo_id={this.$route.params.id}
  638. let vm = this;
  639. await this.$axios
  640. .get(
  641. `${this.apiUrl}/user-services/relative-services?counts=3&country=${this.exhibition.country.id}&city=${this.exhibition.city.id}&lang_code=${this.$i18n.localeProperties["langQuery"]}&expo_id=${this.$route.params.id}`
  642. )
  643. .then((res) => {
  644. this.relatedservicelist = res.data;
  645. })
  646. .catch((error) => console.log(error));
  647. },
  648. async getServiceCategory() {
  649. let langCode = this.$i18n.localeProperties["langQuery"];
  650. await this.$axios
  651. .get(
  652. `/service/category?lang_code=${langCode}`
  653. )
  654. .then((res) => {
  655. let categoryArray = [];
  656. let result = res.data;
  657. for (let i in result) {
  658. let obj = {
  659. ids: [result[i].id, result[i].service_category_id],
  660. lang_text: result[i].language_text[0].text
  661. }
  662. categoryArray.push(obj);
  663. }
  664. this.getservicecategory = categoryArray;
  665. })
  666. .catch((error) => console.log(error));
  667. },
  668. getAllService() {
  669. let vm = this;
  670. this.$axios
  671. .get(
  672. `${this.apiUrl}/user-services/relative-services?counts=3&country=${this.exhibition.country.id}&city=${this.exhibition.city.id}&lang_code=${this.$i18n.localeProperties["langQuery"]}&expo_id=${this.$route.params.id}`
  673. )
  674. .then((res) => {
  675. this.relatedservicelist = res.data;
  676. })
  677. .catch((error) => console.log(error));
  678. },
  679. getCategoryId(data) {
  680. this.getcategoryid = data;
  681. },
  682. testtest(data) {
  683. this.testcategory = data;
  684. this.serviceList();
  685. },
  686. serviceList() {
  687. this.$axios
  688. .get(
  689. `${this.apiUrl}/user-services/relative-services?counts=3&country=${this.exhibition.country.id}&city=${this.exhibition.city.id}&lang_code=${this.$i18n.localeProperties["langQuery"]}&service_category=${this.testcategory}&expo_id=${this.$route.params.id}`
  690. )
  691. .then((res) => {
  692. this.relatedservicelist = res.data;
  693. })
  694. .catch((error) => console.log(error));
  695. },
  696. checkRelatedService() {
  697. this.fixBarList = [
  698. { id: "highlightReview", title: "Highlight Review", show: false },
  699. { id: "relatedServices", title: "Related Services", show: false },
  700. {
  701. id: "photoGallery",
  702. title: "Photo & Video Gallery",
  703. show:
  704. this.exhibition.gallery.length > 0 ||
  705. this.exhibition.videos.length > 0
  706. ? true
  707. : false,
  708. },
  709. {
  710. id: "venue",
  711. title: "Venue",
  712. show: this.exhibition.venues.length > 0 ? true : false,
  713. },
  714. {
  715. id: "exhibitProfile",
  716. title: "Exhibit Profile",
  717. show: this.exhibition.profile ? true : false,
  718. },
  719. {
  720. id: "detailedDescription",
  721. title: "Detailed Description",
  722. show: this.exhibition.description ? true : false,
  723. },
  724. { id: "reviews", title: "Reviews", show: false },
  725. ];
  726. if (this.relatedservicelist.length > 0) {
  727. this.relatedserviceShow = true;
  728. this.fixBarList = [
  729. { id: "highlightReview", title: "Highlight Review", show: false },
  730. { id: "relatedServices", title: "Related Services", show: true },
  731. {
  732. id: "photoGallery",
  733. title: "Photo & Video Gallery",
  734. show:
  735. this.exhibition.gallery.length > 0 ||
  736. this.exhibition.videos.length > 0
  737. ? true
  738. : false,
  739. },
  740. {
  741. id: "venue",
  742. title: "Venue",
  743. show: this.exhibition.venues.length > 0 ? true : false,
  744. },
  745. {
  746. id: "exhibitProfile",
  747. title: "Exhibit Profile",
  748. show: this.exhibition.profile ? true : false,
  749. },
  750. {
  751. id: "detailedDescription",
  752. title: "Detailed Description",
  753. show: this.exhibition.description ? true : false,
  754. },
  755. { id: "reviews", title: "Reviews", show: false },
  756. ];
  757. }
  758. }
  759. },
  760. };
  761. </script>
  762. <style lang="scss" scoped>
  763. </style>