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.

815 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.exhibition.ExhibitionName,
  164. meta: [
  165. {
  166. name: this.exhibition.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. exhibitionID: "",
  199. tab: "0",
  200. saved: false,
  201. Favorite: {},
  202. favoriteSet: new Set(),
  203. exhibition: {
  204. id: null,
  205. name: "",
  206. enname: "",
  207. subtitle: null,
  208. region: {},
  209. country: {},
  210. city: {},
  211. logo: "",
  212. banner: null,
  213. startdate: "",
  214. enddate: "",
  215. status: "",
  216. website: "",
  217. isRecommend: null,
  218. isLiked: null,
  219. rating: 0,
  220. reviewCount: null,
  221. exhibitors: "",
  222. visitors: "",
  223. internalexhibitors: null,
  224. intVisitors: 0,
  225. area: null,
  226. showstatusid: 100,
  227. about: "",
  228. profile: "",
  229. description: "",
  230. shortName: null,
  231. frequency: {},
  232. online: {},
  233. organizers: [],
  234. videos: [],
  235. gallery: {},
  236. venues: [],
  237. categories: [],
  238. subcategories: [],
  239. },
  240. relatedserviceShow: false,
  241. relatedservicelist: [],
  242. getservicecategory: [],
  243. seemore: false,
  244. getCategory: [],
  245. getcategoryid: "",
  246. testcategory: "",
  247. currStep: null,
  248. fixBar: false,
  249. fixBarList: [],
  250. };
  251. },
  252. async created() {
  253. this.getExhibitionCard();
  254. this.getAdList();
  255. this.getFavorite();
  256. // await this.getExhibition();
  257. // await this.getServiceCategory();
  258. // await this.getCategorySwiperList();
  259. // await this.getRelatedServiceList();
  260. // await this.checkRelatedService();
  261. },
  262. async beforeCreate() {
  263. },
  264. mounted() {
  265. let vm = this;
  266. vm.$nextTick(function () {
  267. vm.list = [
  268. /* {
  269. url: "#ExhibitionHighlightReview",
  270. name: "Highlight Review",
  271. isShow:false,
  272. },
  273. {
  274. url: "#ExhibitionRelatedServices",
  275. name: "Related Services",
  276. isShow:false,
  277. },*/
  278. {
  279. url: "#ExhibitionPhotoVideoGallery",
  280. name: "Photo & Video Gallery",
  281. isShow:
  282. this.exhibition.gallery.length > 0 ||
  283. this.exhibition.videos.length > 0
  284. ? true
  285. : false,
  286. },
  287. {
  288. url: "#ExhibitionVenue",
  289. name: "Venue",
  290. isShow:
  291. this.exhibition.venues && this.exhibition.venues.length > 0
  292. ? true
  293. : false,
  294. },
  295. {
  296. url: "#ExhibitionExhibitProfile",
  297. name: "Exhibit Profile",
  298. isShow: this.exhibition.profile ? true : false,
  299. },
  300. {
  301. url: "#ExhibitionDetailDescription",
  302. name: "Detailed Description",
  303. isShow: this.exhibition.description ? true : false,
  304. },
  305. /*{
  306. url: "#ExhibitionReviews",
  307. name: "Reviews",
  308. isShow:false,
  309. },*/
  310. ];
  311. // instantiate the scrollama
  312. const scrollama = require("scrollama");
  313. const scroller = scrollama();
  314. // setup the instance, pass callback functions
  315. scroller
  316. .setup({
  317. step: ".exhibition-content .step",
  318. offset: 0.6,
  319. })
  320. .onStepEnter((response) => {
  321. // { element, index, direction }
  322. vm.currStep = response.element.id;
  323. if (response.index > 3) {
  324. vm.$refs.stickySwiper.slideTo(4);
  325. } else {
  326. vm.$refs.stickySwiper.slideTo(0);
  327. }
  328. if (response.index >= 1) {
  329. vm.fixBar = true;
  330. } else {
  331. vm.fixBar = false;
  332. }
  333. })
  334. .onStepExit((response) => {
  335. // { element, index, direction }
  336. vm.currStep = response.element.id;
  337. if (response.index >= 1) {
  338. vm.fixBar = true;
  339. } else {
  340. vm.fixBar = false;
  341. }
  342. });
  343. });
  344. },
  345. watch: {
  346. relatedservicelist: {
  347. handler: function () {
  348. if (this.relatedservicelist) {
  349. this.relatedservicelist.forEach((item) => {
  350. this.serviceListCategory = item.category;
  351. if (this.getservicecategory) {
  352. this.getservicecategory.forEach((category) => {
  353. if (item.category == category.ids[0]) {
  354. item.category = category.lang_text;
  355. }
  356. });
  357. }
  358. });
  359. }
  360. },
  361. },
  362. },
  363. methods: {
  364. getExhibitionCard() {
  365. this.exhibitionID = this.$route.params.id;
  366. this.$axios
  367. .get(
  368. `/trending/api/Exhibition/Exhibition?Lang=${this.$i18n.localeProperties["langQuery"]}` +
  369. `&ExhibitionID=${this.exhibitionID}`
  370. )
  371. .then((result) => {
  372. if (result.data.DATA.rel) {
  373. let exhib = result.data.DATA.rel;
  374. this.exhibition.id = exhib.ExhibitionID;
  375. this.exhibition.name = exhib.ExhibitionName;
  376. this.exhibition.enname = exhib.ExhibitionENName;
  377. this.exhibition.subtitle = "";
  378. this.exhibition.region.name = exhib.Region.RegionName;
  379. this.exhibition.country.name = exhib.Country.CountryName;
  380. this.exhibition.city.name = exhib.City.CityName;
  381. this.exhibition.logo = exhib.Logo;
  382. this.exhibition.banner = "";
  383. this.exhibition.startdate = exhib.StartDate;
  384. this.exhibition.enddate = exhib.EndDate;
  385. this.exhibition.status = exhib.Status;
  386. this.exhibition.website = exhib.Website;
  387. this.exhibition.isRecommend = exhib.IsRecommend;
  388. this.exhibition.isLiked = "";
  389. this.exhibition.rating = "";
  390. this.exhibition.reviewCount = "";
  391. this.exhibition.exhibitors = exhib.ExhibitorCount;
  392. this.exhibition.visitors = exhib.VisitorCount;
  393. this.exhibition.internalexhibitors = exhib.IntVisitorCount;
  394. this.exhibition.intVisitors = exhib.IntVisitorCount;
  395. this.exhibition.area = exhib.ExhibSize;
  396. this.exhibition.showstatusid = "";
  397. this.exhibition.about = exhib.Intro;
  398. this.exhibition.profile = exhib.Profile;
  399. this.exhibition.description = exhib.Detail;
  400. this.exhibition.shortName = exhib.AbbreviatedName;
  401. this.exhibition.frequency = exhib.Frequency;
  402. this.exhibition.online = exhib.IsVirtualEvent;
  403. this.exhibition.organizers = exhib.Organizers;
  404. this.exhibition.videos = exhib.Videos;
  405. this.exhibition.gallery = exhib.Images;
  406. this.exhibition.venues = exhib.Venues;
  407. this.exhibition.categories = exhib.MainCategories;
  408. this.exhibition.subcategories = exhib.SubCategories;
  409. this.setSideBarList();
  410. this.setFavorite();
  411. }
  412. })
  413. .catch((err) => {
  414. console.log(err);
  415. });
  416. },
  417. getAdList() {
  418. this.ads = [{
  419. image: require('/assets/img/thems/Frame33.png')
  420. }, {
  421. image: require('/assets/img/thems/Frame33.png')
  422. }, {
  423. image: require('/assets/img/thems/Frame33.png')
  424. }]
  425. },
  426. setSideBarList() {
  427. if (this.relatedservicelist.length > 0) {
  428. this.fixBarList.push({ id: "relatedServices", title: "Related Services", show: true });
  429. }
  430. if (this.exhibition.videos.length > 0 || this.exhibition.gallery.length > 0) {
  431. this.fixBarList.push({ id: "photoGallery", title: "Photo & Video Gallery", show: true });
  432. }
  433. if (this.exhibition.venues.length > 0) {
  434. this.fixBarList.push({ id: "venue", title: "Venue", show: true });
  435. }
  436. if (this.exhibition.profile) {
  437. this.fixBarList.push({ id: "exhibitProfile", title: "Exhibit Profile", show: true });
  438. }
  439. if (this.exhibition.description) {
  440. this.fixBarList.push({ id: "detailedDescription", title: "Detailed Description", show: true });
  441. }
  442. },
  443. introCheck(entries, observer, isIntersecting) {
  444. this.navControl.mobnav = !isIntersecting;
  445. },
  446. checkNavBlock(entries, observer, isIntersecting) {
  447. this.navControl.ad = isIntersecting;
  448. },
  449. navfix(entries, observer, isIntersecting) {
  450. this.navControl.nav = isIntersecting;
  451. },
  452. getFavorite() {
  453. this.favoriteSet.clear();
  454. if (this.$auth.loggedIn) {
  455. this.$axios.get(`/trending/api/Favorite/Favorites?Type=Exhibition`)
  456. .then((result) => {
  457. if(result && result.data && result.data.DATA && result.data.DATA.rel){
  458. let favoriteList = [];
  459. favoriteList = result.data.DATA.rel;
  460. favoriteList.forEach(item => {
  461. this.favoriteSet.add(item.ParentID);
  462. })
  463. }
  464. })
  465. .catch((err) => {
  466. console.log("getFavorite"+err);
  467. });
  468. }
  469. },
  470. setFavorite() {
  471. if (this.favoriteSet.size > 0 && this.$auth.loggedIn) {
  472. if (this.favoriteSet.has(this.exhibition.id)) {
  473. this.saved = true;
  474. }
  475. }
  476. },
  477. toggleFavorite() {
  478. if (this.saved) {
  479. this.saved = false;
  480. this.Favorite.IsFavorite = 'N';
  481. } else {
  482. this.saved = true;
  483. this.Favorite.IsFavorite = 'Y';
  484. }
  485. this.Favorite.Type = 'Exhibition';
  486. this.Favorite.ParentID = this.exhibition.id;
  487. if (this.$auth.loggedIn) {
  488. this.$axios
  489. .post(
  490. `/trending/api/Favorite/Favorite`, this.Favorite
  491. )
  492. .then((result) => {
  493. })
  494. .catch((err) => {
  495. console.log(err);
  496. });
  497. } else {
  498. this.$router.push(this.localePath("/user"));
  499. }
  500. },
  501. // toggleFavorite() {
  502. // if (this.$auth.loggedIn) {
  503. // this.$axios
  504. // .put(
  505. // `/member/exhibitions?jwt=${this.$auth.$storage.getUniversal("jwt")
  506. // ? this.$auth.$storage.getUniversal("jwt").token
  507. // : ""
  508. // }&exhibition_id=${this.$route.params.id}&delete=${this.saved}`
  509. // )
  510. // .then((result) => {
  511. // this.saved = !this.saved;
  512. // })
  513. // .catch((err) => {
  514. // console.log(err);
  515. // });
  516. // } else {
  517. // this.$router.push(this.localePath("/user"));
  518. // }
  519. // },
  520. async getExhibition() {
  521. if (this.$route.query.preview) {
  522. await this.$axios
  523. .get(
  524. "/admin/events/previewShows/" +
  525. this.$route.params.id +
  526. this.$i18n.localeProperties["langQuery"]
  527. )
  528. .then((res) => {
  529. this.exhibition.id = res.data.exhibition.id;
  530. this.exhibition.name = res.data.exhibition.name;
  531. this.exhibition.subtitle = res.data.exhibition.subtitle;
  532. this.exhibition.region = res.data.exhibition.region;
  533. this.exhibition.country = res.data.exhibition.country;
  534. this.exhibition.city = res.data.exhibition.city;
  535. this.exhibition.logo = res.data.exhibition.logo;
  536. this.exhibition.banner = res.data.exhibition.banner;
  537. this.exhibition.startdate = res.data.exhibition.startdate;
  538. this.exhibition.enddate = res.data.exhibition.enddate;
  539. this.exhibition.status = res.data.exhibition.status;
  540. this.exhibition.website = res.data.exhibition.website;
  541. this.exhibition.isRecommend = res.data.exhibition.isRecommend;
  542. this.exhibition.isLiked = res.data.exhibition.isLiked;
  543. this.exhibition.rating = res.data.exhibition.rating;
  544. this.exhibition.reviewCount = res.data.exhibition.reviewCount;
  545. this.exhibition.exhibitors = res.data.exhibition.exhibitors;
  546. this.exhibition.visitors = res.data.exhibition.visitors;
  547. this.exhibition.internalexhibitors =
  548. res.data.exhibition.internalexhibitors;
  549. this.exhibition.area = res.data.exhibition.area;
  550. this.exhibition.showstatusid = res.data.exhibition.showstatusid;
  551. this.exhibition.about = res.data.exhibition.about;
  552. this.exhibition.profile = res.data.exhibition.profile;
  553. this.exhibition.description = res.data.exhibition.description;
  554. this.exhibition.shortName = res.data.exhibition.shortName;
  555. this.exhibition.frequency = res.data.exhibition.frequency;
  556. this.exhibition.online = res.data.exhibition.online;
  557. this.exhibition.organizers = res.data.exhibition.organizers;
  558. this.exhibition.videos = res.data.exhibition.videos;
  559. this.exhibition.gallery = res.data.exhibition.gallery;
  560. this.exhibition.venues = res.data.exhibition.venues;
  561. this.exhibition.categories = res.data.exhibition.categories;
  562. this.exhibition.subcategories = res.data.exhibition.subcategories;
  563. })
  564. .catch((err) => {
  565. console.log(err);
  566. });
  567. } else {
  568. await this.$axios
  569. .get(
  570. `/exhibitions/${this.$route.params.id}?lang=${this.$i18n.localeProperties["langQuery"]}`
  571. )
  572. .then((res) => {
  573. this.exhibition.id = res.data.exhibition.id;
  574. this.exhibition.name = res.data.exhibition.name;
  575. this.exhibition.subtitle = res.data.exhibition.subtitle;
  576. this.exhibition.region = res.data.exhibition.region;
  577. this.exhibition.country = res.data.exhibition.country;
  578. this.exhibition.city = res.data.exhibition.city;
  579. this.exhibition.logo = res.data.exhibition.logo;
  580. this.exhibition.banner = res.data.exhibition.banner;
  581. this.exhibition.startdate = res.data.exhibition.startdate;
  582. this.exhibition.enddate = res.data.exhibition.enddate;
  583. this.exhibition.status = res.data.exhibition.status;
  584. this.exhibition.website = res.data.exhibition.website;
  585. this.exhibition.isRecommend = res.data.exhibition.isRecommend;
  586. this.exhibition.isLiked = res.data.exhibition.isLiked;
  587. this.exhibition.rating = res.data.exhibition.rating;
  588. this.exhibition.reviewCount = res.data.exhibition.reviewCount;
  589. this.exhibition.exhibitors = res.data.exhibition.exhibitors;
  590. this.exhibition.visitors = res.data.exhibition.visitors;
  591. this.exhibition.internalexhibitors =
  592. res.data.exhibition.internalexhibitors;
  593. this.exhibition.area = res.data.exhibition.area;
  594. this.exhibition.showstatusid = res.data.exhibition.showstatusid;
  595. this.exhibition.about = res.data.exhibition.about;
  596. this.exhibition.profile = res.data.exhibition.profile;
  597. this.exhibition.description = res.data.exhibition.description;
  598. this.exhibition.shortName = res.data.exhibition.shortName;
  599. this.exhibition.frequency = res.data.exhibition.frequency;
  600. this.exhibition.online = res.data.exhibition.online;
  601. this.exhibition.organizers = res.data.exhibition.organizers;
  602. this.exhibition.videos = res.data.exhibition.videos;
  603. this.exhibition.gallery = res.data.exhibition.gallery;
  604. this.exhibition.venues = res.data.exhibition.venues;
  605. this.exhibition.categories = res.data.exhibition.categories;
  606. this.exhibition.subcategories = res.data.exhibition.subcategories;
  607. })
  608. .catch((err) => {
  609. console.log(err);
  610. });
  611. }
  612. },
  613. async getCategorySwiperList() {
  614. let langCode = this.$i18n.localeProperties["langQuery"];
  615. await this.$axios
  616. .get(
  617. `/service/category?lang_code=${langCode}`
  618. )
  619. .then((res) => {
  620. let categoryArray = [];
  621. let result = res.data;
  622. for (let i in result) {
  623. let obj = {
  624. ids: [result[i].id, result[i].service_category_id],
  625. lang_text: result[i].language_text[0].text
  626. }
  627. categoryArray.push(obj);
  628. }
  629. this.getCategory = categoryArray;
  630. })
  631. .catch((error) => console.log(error));
  632. },
  633. async getRelatedServiceList() {
  634. // &expo_id={this.$route.params.id}
  635. let vm = this;
  636. await this.$axios
  637. .get(
  638. `${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}`
  639. )
  640. .then((res) => {
  641. this.relatedservicelist = res.data;
  642. })
  643. .catch((error) => console.log(error));
  644. },
  645. async getServiceCategory() {
  646. let langCode = this.$i18n.localeProperties["langQuery"];
  647. await this.$axios
  648. .get(
  649. `/service/category?lang_code=${langCode}`
  650. )
  651. .then((res) => {
  652. let categoryArray = [];
  653. let result = res.data;
  654. for (let i in result) {
  655. let obj = {
  656. ids: [result[i].id, result[i].service_category_id],
  657. lang_text: result[i].language_text[0].text
  658. }
  659. categoryArray.push(obj);
  660. }
  661. this.getservicecategory = categoryArray;
  662. })
  663. .catch((error) => console.log(error));
  664. },
  665. getAllService() {
  666. let vm = this;
  667. this.$axios
  668. .get(
  669. `${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}`
  670. )
  671. .then((res) => {
  672. this.relatedservicelist = res.data;
  673. })
  674. .catch((error) => console.log(error));
  675. },
  676. getCategoryId(data) {
  677. this.getcategoryid = data;
  678. },
  679. testtest(data) {
  680. this.testcategory = data;
  681. this.serviceList();
  682. },
  683. serviceList() {
  684. this.$axios
  685. .get(
  686. `${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}`
  687. )
  688. .then((res) => {
  689. this.relatedservicelist = res.data;
  690. })
  691. .catch((error) => console.log(error));
  692. },
  693. checkRelatedService() {
  694. this.fixBarList = [
  695. { id: "highlightReview", title: "Highlight Review", show: false },
  696. { id: "relatedServices", title: "Related Services", show: false },
  697. {
  698. id: "photoGallery",
  699. title: "Photo & Video Gallery",
  700. show:
  701. this.exhibition.gallery.length > 0 ||
  702. this.exhibition.videos.length > 0
  703. ? true
  704. : false,
  705. },
  706. {
  707. id: "venue",
  708. title: "Venue",
  709. show: this.exhibition.venues.length > 0 ? true : false,
  710. },
  711. {
  712. id: "exhibitProfile",
  713. title: "Exhibit Profile",
  714. show: this.exhibition.profile ? true : false,
  715. },
  716. {
  717. id: "detailedDescription",
  718. title: "Detailed Description",
  719. show: this.exhibition.description ? true : false,
  720. },
  721. { id: "reviews", title: "Reviews", show: false },
  722. ];
  723. if (this.relatedservicelist.length > 0) {
  724. this.relatedserviceShow = true;
  725. this.fixBarList = [
  726. { id: "highlightReview", title: "Highlight Review", show: false },
  727. { id: "relatedServices", title: "Related Services", show: true },
  728. {
  729. id: "photoGallery",
  730. title: "Photo & Video Gallery",
  731. show:
  732. this.exhibition.gallery.length > 0 ||
  733. this.exhibition.videos.length > 0
  734. ? true
  735. : false,
  736. },
  737. {
  738. id: "venue",
  739. title: "Venue",
  740. show: this.exhibition.venues.length > 0 ? true : false,
  741. },
  742. {
  743. id: "exhibitProfile",
  744. title: "Exhibit Profile",
  745. show: this.exhibition.profile ? true : false,
  746. },
  747. {
  748. id: "detailedDescription",
  749. title: "Detailed Description",
  750. show: this.exhibition.description ? true : false,
  751. },
  752. { id: "reviews", title: "Reviews", show: false },
  753. ];
  754. }
  755. }
  756. },
  757. };
  758. </script>
  759. <style lang="scss" scoped>
  760. </style>