|
@@ -1,103 +1,139 @@
|
|
<template>
|
|
<template>
|
|
- <Panel v-show="player.showWidgets" :isOpen="isOpen">
|
|
|
|
- <div @click="toggleOpen" class="menu color">
|
|
|
|
- <div class="logo">
|
|
|
|
- <img :src="require('@/assets/images/icon/logo.png')" alt="" />
|
|
|
|
- <p>cdf澳門上葡京店</p>
|
|
|
|
- </div>
|
|
|
|
- <div class="vline"></div>
|
|
|
|
- <ul>
|
|
|
|
- <li v-if="tours.length > 0">
|
|
|
|
- <ui-icon type="preview" @click.stop="playTour"></ui-icon>
|
|
|
|
- <div>導覽</div>
|
|
|
|
- </li>
|
|
|
|
- <li @click.stop="onClickMenu(item)" v-for="(item, i) in menulist" :key="i">
|
|
|
|
- <ui-icon :type="item.icon"></ui-icon>
|
|
|
|
- <div>{{ item.name }}</div>
|
|
|
|
- </li>
|
|
|
|
-
|
|
|
|
- <li v-if="showdaogou">
|
|
|
|
- <ui-icon
|
|
|
|
- type="guided_shopping"
|
|
|
|
- @click.stop="
|
|
|
|
- onClickMenu({
|
|
|
|
- icon: 'guided_shopping',
|
|
|
|
- id: 'guided_shopping',
|
|
|
|
- name: '導購',
|
|
|
|
- })
|
|
|
|
- "
|
|
|
|
- ></ui-icon>
|
|
|
|
- <div>導購</div>
|
|
|
|
- </li>
|
|
|
|
-
|
|
|
|
- <li>
|
|
|
|
- <ui-icon
|
|
|
|
- type="shopping"
|
|
|
|
- @click.stop="
|
|
|
|
- onClickMenu({
|
|
|
|
- icon: 'shopping',
|
|
|
|
- id: 'shopping',
|
|
|
|
- name: '購物',
|
|
|
|
- })
|
|
|
|
- "
|
|
|
|
- ></ui-icon>
|
|
|
|
- <div>購物</div>
|
|
|
|
- </li>
|
|
|
|
- </ul>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <div class="toolbar color">
|
|
|
|
- <div class="navigation">
|
|
|
|
- <div class="h3">專櫃導航</div>
|
|
|
|
- <div class="swiper-container" id="sw-navigation">
|
|
|
|
- <ul class="swiper-wrapper">
|
|
|
|
- <li
|
|
|
|
- class="swiper-slide"
|
|
|
|
- :class="{ liactive: item.sceneUrl === currentM && item.inPosition.indexOf(currentPose) > -1 }"
|
|
|
|
- @click.stop="onClickShop(item)"
|
|
|
|
- v-for="(item, i) in brandlist"
|
|
|
|
- :key="i"
|
|
|
|
- >
|
|
|
|
- <div v-if="item.shopLogo" class="img" :style="{ 'background-image': `url(${item.shopLogo})` }"></div>
|
|
|
|
- <div class="name" v-if="item.shopName">
|
|
|
|
- <span :class="{ active: item.shopName.length > 6 }">
|
|
|
|
- {{ item.shopName }}
|
|
|
|
- </span>
|
|
|
|
- </div>
|
|
|
|
- </li>
|
|
|
|
- </ul>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <Panel v-show="player.showWidgets" :isOpen="isOpen">
|
|
|
|
+ <div @click="toggleOpen" class="menu color">
|
|
|
|
+ <div class="logo">
|
|
|
|
+ <img :src="require('@/assets/images/icon/logo.png')" alt="" />
|
|
|
|
+ <p>cdf澳門上葡京店</p>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ <div class="vline"></div>
|
|
|
|
+ <ul>
|
|
|
|
+ <li v-if="tours.length > 0">
|
|
|
|
+ <ui-icon type="preview" @click.stop="playTour"></ui-icon>
|
|
|
|
+ <div>導覽</div>
|
|
|
|
+ </li>
|
|
|
|
+ <li @click.stop="onClickMenu(item)" v-for="(item, i) in menulist" :key="i">
|
|
|
|
+ <ui-icon :type="item.icon"></ui-icon>
|
|
|
|
+ <div>{{ item.name }}</div>
|
|
|
|
+ </li>
|
|
|
|
+
|
|
|
|
+ <li v-if="showdaogou">
|
|
|
|
+ <ui-icon
|
|
|
|
+ type="guided_shopping"
|
|
|
|
+ @click.stop="
|
|
|
|
+ onClickMenu({
|
|
|
|
+ icon: 'guided_shopping',
|
|
|
|
+ id: 'guided_shopping',
|
|
|
|
+ name: '導購',
|
|
|
|
+ })
|
|
|
|
+ "
|
|
|
|
+ ></ui-icon>
|
|
|
|
+ <div>導購</div>
|
|
|
|
+ </li>
|
|
|
|
|
|
- <div class="category">
|
|
|
|
- <div class="swiper-container" id="sw-category">
|
|
|
|
- <ul class="swiper-wrapper">
|
|
|
|
- <li
|
|
|
|
- class="swiper-slide"
|
|
|
|
- :class="{ categoryactive: '' == currentCategory.id }"
|
|
|
|
|
|
+ <li>
|
|
|
|
+ <ui-icon
|
|
|
|
+ type="shopping"
|
|
@click.stop="
|
|
@click.stop="
|
|
- onClickCategory({
|
|
|
|
- id: '',
|
|
|
|
- categoryName: '全部',
|
|
|
|
|
|
+ onClickMenu({
|
|
|
|
+ icon: 'shopping',
|
|
|
|
+ id: 'shopping',
|
|
|
|
+ name: '購物',
|
|
})
|
|
})
|
|
"
|
|
"
|
|
- >
|
|
|
|
- <div>全部</div>
|
|
|
|
- </li>
|
|
|
|
- <li
|
|
|
|
- @click.stop="onClickCategory(item)"
|
|
|
|
- :class="{ categoryactive: item.id == currentCategory.id }"
|
|
|
|
- class="swiper-slide"
|
|
|
|
- v-for="(item, i) in categorylist"
|
|
|
|
- :key="i"
|
|
|
|
- >
|
|
|
|
- <div>{{ item.categoryName }}</div>
|
|
|
|
- </li>
|
|
|
|
- </ul>
|
|
|
|
|
|
+ ></ui-icon>
|
|
|
|
+ <div>購物</div>
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="toolbar color">
|
|
|
|
+ <div class="navigation">
|
|
|
|
+ <div class="h3">
|
|
|
|
+ <span>專櫃導航</span>
|
|
|
|
+ <div @click="showShopList = true">
|
|
|
|
+ <img :src="require(`@/assets/images/icon/search.svg`)" alt="" />
|
|
|
|
+ 搜索專櫃
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="swiper-container" id="sw-navigation">
|
|
|
|
+ <ul class="swiper-wrapper">
|
|
|
|
+ <li
|
|
|
|
+ class="swiper-slide"
|
|
|
|
+ :class="{ liactive: item.sceneUrl === currentM && item.inPosition.indexOf(currentPose) > -1 }"
|
|
|
|
+ @click.stop="onClickShop(item)"
|
|
|
|
+ v-for="(item, i) in brandlist"
|
|
|
|
+ :key="i"
|
|
|
|
+ >
|
|
|
|
+ <div v-if="item.shopLogo" class="img" :style="{ 'background-image': `url(${item.shopLogo})` }"></div>
|
|
|
|
+ <div class="name" v-if="item.shopName">
|
|
|
|
+ <span :class="{ active: item.shopName.length > 6 }">
|
|
|
|
+ {{ item.shopName }}
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <div class="category">
|
|
|
|
+ <div class="swiper-container" id="sw-category">
|
|
|
|
+ <ul class="swiper-wrapper">
|
|
|
|
+ <li
|
|
|
|
+ class="swiper-slide"
|
|
|
|
+ :class="{ categoryactive: '' == currentCategory.id }"
|
|
|
|
+ @click.stop="
|
|
|
|
+ onClickCategory({
|
|
|
|
+ id: '',
|
|
|
|
+ categoryName: '全部',
|
|
|
|
+ })
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ <div>全部</div>
|
|
|
|
+ </li>
|
|
|
|
+ <li
|
|
|
|
+ @click.stop="onClickCategory(item)"
|
|
|
|
+ :class="{ categoryactive: item.id == currentCategory.id }"
|
|
|
|
+ class="swiper-slide"
|
|
|
|
+ v-for="(item, i) in categorylist"
|
|
|
|
+ :key="i"
|
|
|
|
+ >
|
|
|
|
+ <div>{{ item.categoryName }}</div>
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </Panel>
|
|
|
|
+ <teleport :to="`#app`">
|
|
|
|
+ <div v-show="showShopList" class="shoplist">
|
|
|
|
+ <div class="l-title">
|
|
|
|
+ 專櫃列表 ({{ searchList.length }})
|
|
|
|
+ <ui-icon type="close" @click="showShopList = false" />
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="search">
|
|
|
|
+ <img :src="require(`@/assets/images/icon/search.svg`)" alt="" />
|
|
|
|
+ <input v-model="searchKey" type="text" placeholder="專櫃搜索" />
|
|
|
|
+ <ui-icon class="close" v-if="searchKey.length > 0" @click.stop="searchKey = ''" type="state_f"></ui-icon>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <ul v-if="searchList.length > 0">
|
|
|
|
+ <li @click.stop="onClickShop(item)" v-for="(item, idx) in searchList" :key="idx">
|
|
|
|
+ <div class="img" :style="{ 'background-image': `url(${item.shopLogo})` }"></div>
|
|
|
|
+ <div class="name" v-if="item.shopName">
|
|
|
|
+ <span>
|
|
|
|
+ {{ item.shopName }}
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ <ui-icon class="right" type="right"></ui-icon>
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
|
|
+
|
|
|
|
+ <div class="noresult" v-else>暫無結果</div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- </Panel>
|
|
|
|
|
|
+ </teleport>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
@@ -111,7 +147,9 @@ import browser from "@/utils/browser";
|
|
const store = useStore();
|
|
const store = useStore();
|
|
|
|
|
|
const isOpen = ref(false);
|
|
const isOpen = ref(false);
|
|
|
|
+const searchKey = ref("");
|
|
|
|
|
|
|
|
+const showShopList = ref(false);
|
|
|
|
|
|
const toggleOpen = () => {
|
|
const toggleOpen = () => {
|
|
isOpen.value = !isOpen.value;
|
|
isOpen.value = !isOpen.value;
|
|
@@ -182,6 +220,8 @@ const categorylist = ref([]);
|
|
|
|
|
|
const brandlist = ref([]);
|
|
const brandlist = ref([]);
|
|
|
|
|
|
|
|
+const searchList = ref([]);
|
|
|
|
+
|
|
const brandScroll = () => {
|
|
const brandScroll = () => {
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
let t = setTimeout(() => {
|
|
let t = setTimeout(() => {
|
|
@@ -269,6 +309,14 @@ watch(
|
|
}
|
|
}
|
|
);
|
|
);
|
|
|
|
|
|
|
|
+watch(
|
|
|
|
+ () => searchKey.value,
|
|
|
|
+ (val, old) => {
|
|
|
|
+ console.log(searchKey.value);
|
|
|
|
+ getSearchList();
|
|
|
|
+ }
|
|
|
|
+);
|
|
|
|
+
|
|
const getShoplist = async () => {
|
|
const getShoplist = async () => {
|
|
let res = await apis.get_shop_list({
|
|
let res = await apis.get_shop_list({
|
|
categoryId: currentCategory.value.id,
|
|
categoryId: currentCategory.value.id,
|
|
@@ -277,6 +325,13 @@ const getShoplist = async () => {
|
|
brandScroll();
|
|
brandScroll();
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+const getSearchList = async () => {
|
|
|
|
+ let res = await apis.get_shop_list({
|
|
|
|
+ shopName: searchKey.value,
|
|
|
|
+ });
|
|
|
|
+ searchList.value = res.data;
|
|
|
|
+};
|
|
|
|
+
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
useApp().then((app) => {
|
|
useApp().then((app) => {
|
|
getCategorylist();
|
|
getCategorylist();
|
|
@@ -347,6 +402,23 @@ onMounted(() => {
|
|
.h3 {
|
|
.h3 {
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
padding: 0 14px;
|
|
padding: 0 14px;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ align-items: center;
|
|
|
|
+ > div {
|
|
|
|
+ width: 96px;
|
|
|
|
+ height: 24px;
|
|
|
|
+ background: rgba(0, 0, 0, 0.5);
|
|
|
|
+ border-radius: 24px;
|
|
|
|
+ display: flex;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ }
|
|
|
|
+ img {
|
|
|
|
+ width: 12px;
|
|
|
|
+ margin-right: 6px;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.swiper-container {
|
|
.swiper-container {
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -441,6 +513,110 @@ onMounted(() => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+.shoplist {
|
|
|
|
+ position: fixed;
|
|
|
|
+ z-index: 999;
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 30px;
|
|
|
|
+ left: 0;
|
|
|
|
+ right: 0;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ height: 80vh;
|
|
|
|
+ background: rgba(0, 0, 0, 0.8);
|
|
|
|
+ border-radius: 10px 10px 0px 0px;
|
|
|
|
+ padding: 12px 15px;
|
|
|
|
+ .l-title {
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ color: #ffffff;
|
|
|
|
+ text-align: center;
|
|
|
|
+ position: relative;
|
|
|
|
+ width: 100%;
|
|
|
|
+
|
|
|
|
+ i {
|
|
|
|
+ position: absolute;
|
|
|
|
+ right: 0;
|
|
|
|
+ top: 2px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .search {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 34px;
|
|
|
|
+ background: rgba(46, 46, 46, 0.9);
|
|
|
|
+ border-radius: 20px;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ align-items: center;
|
|
|
|
+ padding: 0 8px;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ > img {
|
|
|
|
+ width: 16px;
|
|
|
|
+ opacity: 0.8;
|
|
|
|
+ }
|
|
|
|
+ > input {
|
|
|
|
+ text-align: left;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ width: 100%;
|
|
|
|
+ color: #fff;
|
|
|
|
+ margin-left: 10px;
|
|
|
|
+ }
|
|
|
|
+ .close {
|
|
|
|
+ color: #7d7e80;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ > ul {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: calc(100% - 80px);
|
|
|
|
+ overflow-y: auto;
|
|
|
|
+ > li {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 60px;
|
|
|
|
+ position: relative;
|
|
|
|
+ font-size: 0;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ margin: 18px 0;
|
|
|
|
+ .img {
|
|
|
|
+ width: 60px;
|
|
|
|
+ height: 60px;
|
|
|
|
+ background-size: contain;
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ margin-right: 10px;
|
|
|
|
+ }
|
|
|
|
+ .name {
|
|
|
|
+ width: 100%;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ left: 0;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-align: left;
|
|
|
|
+ padding: 2px 4px;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ word-break: break-all;
|
|
|
|
+ > span {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .right {
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.noresult {
|
|
|
|
+ text-align: center;
|
|
|
|
+ margin-top: 20vh;
|
|
|
|
+}
|
|
|
|
+
|
|
@keyframes wordsLoop {
|
|
@keyframes wordsLoop {
|
|
0% {
|
|
0% {
|
|
transform: translateX(100%);
|
|
transform: translateX(100%);
|