Przeglądaj źródła

更新香港店的一些需求修改

tremble 3 lat temu
rodzic
commit
591995c33e

+ 14 - 4
src/app.vue

@@ -49,6 +49,7 @@ import { useMusicPlayer } from '@/utils/sound';
 // import UiTags from "@/components/Tags";
 import GoodsList from '@/components/Tags/goods-list.vue';
 import Treasure from '@/components/Tags/treasure.vue';
+//waterfall和exhibits公用
 import Waterfall from '@/components/Tags/waterfall.vue';
 
 import Information from '@/components/Information';
@@ -337,7 +338,7 @@ onMounted(async () => {
   app
     .use('TagView', {
       render(data) {
-        if (data.type == 'waterfall') {
+        if (data.type == 'waterfall' || data.type == 'exhibits') {
           return `<span class="tag-icon waterfall animate" style="background-image:url({{icon}})"></span>`;
         } else if (data.type == 'coupon') {
           return `<span class="tag-icon coupon animate" style="background-image:url({{icon}})"></span>`;
@@ -387,12 +388,17 @@ onMounted(async () => {
               }
               document.querySelector(`[data-tag-id="${tag.sid}"] .tag-icon`).style.display = 'none';
               document.querySelector(`[data-tag-id="${tag.sid}"]`).style.pointerEvents = 'none';
+
               let hotcontent = typeof tag.hotContent == 'string' ? JSON.parse(tag.hotContent) : tag.hotContent;
-              browser.openLink(hotcontent.couponLink)
+              browser.openLink(
+                '/subPackage/pages/activity/activity?pageId=' + hotcontent.couponLink,
+                `https://${metadata.value?.cdfProductSource?.cdfHost}/shop/${metadata.value?.cdfProductSource?.cdfMchId}/showactivity?pageId=${hotcontent.couponLink}`,
+                `/pages/showactivity/showactivity?pageId=${hotcontent.couponLink}`
+              );
 
               apis.burying_point({ type: 2 });
             } catch (error) {}
-          } else if (tag.type == 'waterfall') {
+          } else if (tag.type == 'waterfall' || tag.type == 'exhibits') {
             store.commit('tag/setTagClickType', {
               type: 'waterfall',
               data: tag,
@@ -404,7 +410,11 @@ onMounted(async () => {
                 return;
               }
               let hotcontent = typeof tag.hotContent == 'string' ? JSON.parse(tag.hotContent) : tag.hotContent;
-              browser.openLink(hotcontent.liveLink)
+              browser.openLink(
+                '/subPackage/pages/home/home?pageType=2&pageId=' + hotcontent.liveLink,
+                `https://${metadata.value?.cdfProductSource?.cdfHost}/shop/${metadata.value?.cdfProductSource?.cdfMchId}/showactivity?pageId=${hotcontent.liveLink}`,
+                `/pages/showactivity/showactivity?pageId=${hotcontent.liveLink}`
+              );
             } catch (error) {}
           } else if (tag.type == 'link_scene') {
             guideclicktag(tag);

BIN
src/assets/images/guide/novice_guide_button@2x.png


BIN
src/assets/images/guide/novice_guide_button_en@2x.png


BIN
src/assets/images/guide/novice_guide_text@2x.png


BIN
src/assets/images/guide/novice_guide_text_en@2x.png


BIN
src/assets/images/icon/exhibits.png


+ 113 - 71
src/components/Controls/Panel/Main.vue

@@ -4,13 +4,13 @@
       <div @click="toggleOpen" class="menu color">
         <div class="logo">
           <img :src="require('@/assets/images/icon/logo.png')" alt="" />
-          <p>{{$t('common.title') }}</p>
+          <p>{{ $t('common.title') }}</p>
         </div>
         <div class="vline"></div>
         <ul :class="player.lang" @touchmove.stop>
           <li v-if="tours.length > 0">
             <ui-icon type="preview" @click.stop="playTour"></ui-icon>
-            <div>{{$t('common.tour')}}</div>
+            <div>{{ $t('common.tour') }}</div>
           </li>
           <li @click.stop="onClickMenu(item)" v-for="(item, i) in menulist" :key="i">
             <ui-icon :type="item.icon"></ui-icon>
@@ -18,32 +18,26 @@
           </li>
 
           <li v-if="showdaogou">
-            <ui-icon
-              type="guided_shopping"
-              @click.stop="
-                onClickMenu({
-                  icon: 'guided_shopping',
-                  id: 'guided_shopping',
-                  name: $t('common.mode'),
-                })
-              "
-            ></ui-icon>
+            <ui-icon type="guided_shopping" @click.stop="
+              onClickMenu({
+                icon: 'guided_shopping',
+                id: 'guided_shopping',
+                name: $t('common.mode'),
+              })
+            "></ui-icon>
             <div>{{ $t('common.mode') }}</div>
           </li>
 
-          <!-- <li>
-            <ui-icon
-              type="shopping"
-              @click.stop="
-                onClickMenu({
-                  icon: 'shopping',
-                  id: 'shopping',
-                  name: $t('common.shopping'),
-                })
-              "
-            ></ui-icon>
+          <li v-if="metadata?.cdfProductSource?.mchType == 0">
+            <ui-icon type="shopping" @click.stop="
+              onClickMenu({
+                icon: 'shopping',
+                id: 'shopping',
+                name: $t('common.shopping'),
+              })
+            "></ui-icon>
             <div>{{ $t('common.shopping') }}</div>
-          </li> -->
+          </li>
         </ul>
       </div>
 
@@ -58,13 +52,9 @@
           </div>
           <div class="swiper-container" id="sw-navigation">
             <ul class="swiper-wrapper">
-              <li
-                class="swiper-slide"
+              <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"
-              >
+                @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 }">
@@ -79,19 +69,16 @@
         <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: $t('common.all'),
-                  })
-                "
-              >
+              <li class="swiper-slide" :class="{ categoryactive: '' == currentCategory.id }" @click.stop="
+                onClickCategory({
+                  id: '',
+                  categoryName: $t('common.all'),
+                })
+              ">
                 <div>{{ $t('common.all') }}</div>
               </li>
-              <li @click.stop="onClickCategory(item)" :class="{ categoryactive: item.id == currentCategory.id }" class="swiper-slide" v-for="(item, i) in categorylist" :key="i">
+              <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>
@@ -160,6 +147,7 @@ const currentM = computed(() => browser.getURLParam('m'));
 const currentPose = computed(() => browser.getURLParam('pose'));
 const showdaogou = computed(() => store.getters['rtc/showdaogou']);
 
+
 const isPlay = computed(() => {
   let status = store.getters['tour/isPlay'];
   let map = document.querySelector('.kankan-app div[xui_min_map]');
@@ -193,19 +181,23 @@ const player = computed(() => store.getters['player']);
 const tours = computed(() => store.getters['tour/tours']);
 
 const menulist = computed(() => {
+  console.log('result:',);
   let fff = [
     {
       icon: 'help',
       id: 'help',
       name: t('common.help'),
-    },
-    // {
-    //   icon: 'customer_service',
-    //   id: 'kefu',
-    //   name: t('common.kefu'),
-    // },
+    }
   ];
 
+  if (metadata.value?.cdfProductSource?.mchType == 0) {
+    fff.push({
+      icon: 'customer_service',
+      id: 'kefu',
+      name: t('common.kefu')
+    },)
+  }
+
   if (!browser.isMobile()) {
     fff.shift();
   }
@@ -230,7 +222,7 @@ const brandScroll = () => {
         grid: {
           rows: 2,
         },
-        observer:true,
+        observer: true,
         on: {
           touchMove(swiper, e) {
             e.stopPropagation();
@@ -238,7 +230,7 @@ const brandScroll = () => {
           },
           observerUpdate(swiper, e) {
             swiper.slideTo(0)
-          }, 
+          },
         },
       });
 
@@ -259,11 +251,29 @@ const brandScroll = () => {
 
 const onClickMenu = (item) => {
   if (item.id == 'kefu') {
+    let envtype = 1
+    if (browser.detectWeixin()) {
+      wx.miniProgram.getEnv((res) => {
+        if (res.miniprogram) {
+          //在小程序里
+          envtype = 2
+        } else {
+          envtype = 1
+        }
+      })
+    } else if (browser.isMobile()) {
+      envtype = 1
+    } else if (browser.getURLParam("isMiniApp") === "1") {
+      envtype = 3
+    } else {
+      envtype = 4
+    }
+
     let mglink =
-      'https://webpage.qidian.qq.com/2/chat/h5/index.html?linkType=1&env=ol&kfuin=3009110132&fid=3655&key=9b4334768c39150ead3f23e11e5dc2e4&cate=7&source=0&isLBS=0&isCustomEntry=0&type=10&ftype=1&_type=wpa&qidian=true&_pid=kvrmvu.74cg11.l43qvbcu&translateSwitch=0&isSsc=0&roleValue=4&roleData=922223821';
+      `https://${metadata.value?.cdfProductSource?.cdfHost}/shop/${metadata.value?.cdfProductSource?.cdfMchId}/qidian?terminalType=${envtype}`;
     window.open(mglink, '_blank');
   } else if (item.id == 'shopping') {
-    browser.openLink('/subPackage/pages/shoppingcart/shoppingcart', 'https://m.cdfmembers.com/shop/600667208/shoppingcart', '/subPackage/pages/shoppingcart/shoppingcart');
+    browser.openLink('/subPackage/pages/shoppingcart/shoppingcart', `https://${metadata.value?.cdfProductSource?.cdfHost}/shop/${metadata.value?.cdfProductSource?.cdfMchId}/shoppingcart`, '/subPackage/pages/shoppingcart/shoppingcart');
   } else if (item.id == 'help') {
     store.commit('showUserGuide', true);
   } else if (item.id == 'guided_shopping') {
@@ -350,44 +360,52 @@ onMounted(() => {
   height: 48px;
   padding: 0 12px;
   text-align: center;
+
   .logo {
-    width: 120px;
+    width: 100px;
     transform: translateY(-24%);
-    min-width: 120px;
+    min-width: 100px;
     flex-shrink: 0;
-    > img {
+
+    >img {
       width: 100%;
       border-radius: 4px;
     }
-    > p {
+
+    >p {
       margin: 2px 0;
       font-size: 10px;
     }
   }
+
   .vline {
     width: 1px;
     height: 14px;
     background: #fff;
   }
-  > ul {
+
+  >ul {
     display: flex;
     align-items: center;
     font-size: 0;
     justify-content: flex-end;
     overflow-x: auto;
-    > li {
+
+    >li {
       margin-left: 0.4rem;
+
       &:first-of-type {
         margin-left: 0;
       }
-      > div {
+
+      >div {
         margin-top: 4px;
         font-size: 10px;
       }
     }
   }
 
-  .en{
+  .en {
     // justify-content: flex-start;
     // width: calc(100% - 160px);
   }
@@ -400,6 +418,7 @@ onMounted(() => {
   margin-top: 8px;
   margin-bottom: 30px;
   background: rgba(0, 0, 0, 0.2);
+
   .navigation {
     padding: 8px 0;
 
@@ -409,7 +428,8 @@ onMounted(() => {
       display: flex;
       justify-content: space-between;
       align-items: center;
-      > div {
+
+      >div {
         width: 96px;
         height: 24px;
         background: rgba(0, 0, 0, 0.5);
@@ -419,11 +439,13 @@ onMounted(() => {
         justify-content: center;
         align-items: center;
       }
+
       img {
         width: 12px;
         margin-right: 6px;
       }
     }
+
     .swiper-container {
       width: 100%;
       height: 130px;
@@ -446,9 +468,11 @@ onMounted(() => {
         opacity: 0.4;
         pointer-events: none;
       }
-      > ul {
+
+      >ul {
         margin: 0 !important;
-        > li {
+
+        >li {
           width: 60px;
           height: 60px;
           border-radius: 4px;
@@ -457,15 +481,18 @@ onMounted(() => {
           overflow: hidden;
           border: 1px transparent solid;
           box-sizing: border-box;
+
           &.liactive {
             color: var(--editor-main-color);
             border: 1px var(--editor-main-color) solid;
           }
+
           .img {
             width: 100%;
             height: 100%;
             background-size: contain;
           }
+
           .name {
             width: 100%;
             position: absolute;
@@ -480,10 +507,12 @@ onMounted(() => {
             padding: 2px 4px;
             box-sizing: border-box;
             word-break: break-all;
-            > span {
+
+            >span {
               display: inline-block;
               white-space: nowrap;
             }
+
             .active {
               animation: 5s wordsLoop linear infinite normal;
             }
@@ -492,6 +521,7 @@ onMounted(() => {
       }
     }
   }
+
   .category {
     padding: 8px 14px;
     border-top: 1px solid rgba(255, 255, 255, 0.2);
@@ -499,16 +529,19 @@ onMounted(() => {
     .swiper-container {
       width: 100%;
       overflow: hidden;
-      > ul {
-        > li {
+
+      >ul {
+        >li {
           width: auto;
           color: rgba(255, 255, 255, 0.5);
-          > div {
+
+          >div {
             width: 100%;
             font-size: 14px;
             padding: 2px 4px;
           }
         }
+
         .categoryactive {
           color: #fff;
         }
@@ -529,6 +562,7 @@ onMounted(() => {
   background: rgba(0, 0, 0, 0.8);
   border-radius: 10px 10px 0px 0px;
   padding: 12px 15px;
+
   .l-title {
     font-size: 16px;
     font-weight: bold;
@@ -554,27 +588,31 @@ onMounted(() => {
     align-items: center;
     padding: 0 8px;
     margin-top: 20px;
-    > img {
+
+    >img {
       width: 16px;
       opacity: 0.8;
     }
-    > input {
+
+    >input {
       text-align: left;
       font-size: 16px;
       width: 100%;
       color: #fff;
       margin-left: 10px;
     }
+
     .close {
       color: #7d7e80;
     }
   }
 
-  > ul {
+  >ul {
     width: 100%;
     height: calc(100% - 80px);
     overflow-y: auto;
-    > li {
+
+    >li {
       width: 100%;
       height: 60px;
       position: relative;
@@ -585,6 +623,7 @@ onMounted(() => {
       justify-content: center;
       align-items: center;
       margin: 18px 0;
+
       .img {
         width: 60px;
         height: 60px;
@@ -593,6 +632,7 @@ onMounted(() => {
         border-radius: 4px;
         margin-right: 10px;
       }
+
       .name {
         width: 100%;
         font-size: 12px;
@@ -604,11 +644,13 @@ onMounted(() => {
         padding: 2px 4px;
         box-sizing: border-box;
         word-break: break-all;
-        > span {
+
+        >span {
           display: inline-block;
           white-space: nowrap;
         }
       }
+
       .right {
         font-size: 14px;
       }

+ 5 - 3
src/components/Tags/waterfall.vue

@@ -3,13 +3,15 @@
     <div class="waterfall" v-if="tagclick.type == 'waterfall'">
       <div class="waterfallcon">
         <div class="wfheader">
-          <img :src="require('@/assets/images/icon/top5.png')" alt="" />
+          <img :src="require(`@/assets/images/icon/${tagclick.data.type==='exhibits'?'exhibits':'top5'}.png`)" alt="" />
           <ui-icon @click="emit('close')" type="close"></ui-icon>
         </div>
         <ul class="wfcon">
           <li @click.stop="gotoGoods(item)" v-for="(item, i) in tagclick.data.products" :key="i">
-            <img v-if="i <= 2" :src="require(`@/assets/images/icon/${i + 1}.svg`)" alt="" />
-            <span v-else>{{ i + 1 }}</span>
+            <template v-if="tagclick.data.type!=='exhibits'">
+              <img v-if="i <= 2" :src="require(`@/assets/images/icon/${i + 1}.svg`)" alt="" />
+              <span v-else>{{ i + 1 }}</span>
+            </template>
             <div class="wfavatar" :style="{ backgroundImage: `url(${item.pic})` }"></div>
             <div class="wfinfo">
               <p>{{ item.name }}</p>

+ 3 - 3
src/components/shared/Guide.vue

@@ -160,14 +160,14 @@ useApp().then((app) => {
   .en {
     background-image: url(~@/assets/images/guide/novice_guide_text_en@2x.png);
     .btn {
-      background-image: url(~@/assets/images/guide/novice_guide_button@2x.png);
+      background-image: url(~@/assets/images/guide/novice_guide_button_en@2x.png);
     }
   }
 
   .fan {
     background-image: url(~@/assets/images/guide/novice_guide_text@2x.png);
     .btn {
-      background-image: url(~@/assets/images/guide/novice_guide_button@2x.png);
+      background-image: url(~@/assets/images/guide/novice_guide_button_zh@2x.png);
     }
   }
 
@@ -177,7 +177,7 @@ useApp().then((app) => {
     left: 50%;
     width: 3.5rem;
     height: 1.31579rem;
-    background-image: url(~@/assets/images/guide/novice_guide_button@2x.png);
+    background-image: url(~@/assets/images/guide/novice_guide_button_zh@2x.png);
     background-size: contain;
     background-position: center top;
     background-repeat: no-repeat;

+ 2 - 2
src/locales/en.json

@@ -19,14 +19,14 @@
     "all": "All",
     "model": "Dollhouse",
     "title":"Duty Zero by cdf",
-    "mode":"Livestream",
+    "mode":"Live",
     "shopping":"Cart",
     "guide":"Guide",
     "guidelist":"List",
     "noResult":"No results found",
     "searchguide":"Search",
     "help":"Help",
-    "kefu":"Agent",
+    "kefu":"CS",
     "viewnum":"View",
     "saysomething":"Comment...",
     "cantsay":"Muted",