Преглед на файлове

no-ssr 更换 client-only

Darkhorsedamon преди 2 години
родител
ревизия
6069a6c9ba
променени са 5 файла, в които са добавени 14 реда и са изтрити 14 реда
  1. 4 4
      components/BuyTicket.vue
  2. 2 2
      components/BuyVip.vue
  3. 2 2
      layouts/components/navbar2.vue
  4. 4 4
      pages/index.vue
  5. 2 2
      pages/sdk.vue

+ 4 - 4
components/BuyTicket.vue

@@ -3,7 +3,7 @@
  * @Author: 欧阳承珺
  * @LastEditors: 欧阳承珺
  * @Date: 2022-11-01 14:10:22
- * @LastEditTime: 2022-11-08 16:57:28
+ * @LastEditTime: 2022-11-14 10:27:40
 -->
 <template>
   <div>
@@ -35,9 +35,9 @@
           </div>
         </div>
         <div v-else>
-          <no-ssr>
+          <client-only>
             <vue-qr :size="176" :text="qrcode"></vue-qr>
-          </no-ssr>
+          </client-only>
           <p class="text-[#666] text-18px leading-20px">扫一扫 即可支付</p>
         </div>
       </div>
@@ -92,7 +92,7 @@ export default {
       return item.productCode.split('.')[1]
     },
     getVipList() {
-      this.$axios.post('pricing/getPricingList',{client: 'web',language: 'zh'}).then((res)=> {
+      this.$axios.post('pricing/list',{client: 'web',language: 'zh'}).then((res)=> {
         if(res.code === 200) {
           this.list = res.result.pricingList.filter(item => item.mode !== 1)  // 加云的不展示
           this.choosedTicket = this.list[this.list.length - 1]

+ 2 - 2
components/BuyVip.vue

@@ -37,9 +37,9 @@
           </div>
         </div>
         <div v-else>
-          <no-ssr>
+          <client-only>
             <vue-qr :size="176" :text="qrcode"></vue-qr>
-          </no-ssr>
+          </client-only>
           <p class="text-[#666] text-18px leading-20px">扫一扫 即可支付</p>
         </div>
       </div>

+ 2 - 2
layouts/components/navbar2.vue

@@ -104,7 +104,7 @@
       class="top-menu-overlay fixed top-60px left-0 w-full h-full z-100 bg-[#00000033]"
     ></div>
 
-    <no-ssr>
+    <client-only>
       <el-dialog 
         :visible="dialogVisiable"
         :close-on-click-modal="false"
@@ -118,7 +118,7 @@
         <login v-show="interface === 'login'" ref="loginRef"  @register="showChange" @close="handlerCloseDialog"></login>
         <register v-show="interface === 'register'" ref="registerRef" @login="showChange" @close="handlerCloseDialog"></register>
       </el-dialog>
-    </no-ssr>
+    </client-only>
   </div>
 </template>
 

+ 4 - 4
pages/index.vue

@@ -25,7 +25,7 @@ export default {
 </script>
 <template>
   <div class="page-home">
-    <no-ssr>
+    <client-only>
       <el-carousel ref="carousel" indicator-position="none" loop  height="100vh" @change="handlerCarouselChange">
         <el-carousel-item>
           <div class="home-banner banner ">
@@ -72,7 +72,7 @@ export default {
           </div>
         </el-carousel-item>
       </el-carousel>
-    </no-ssr>
+    </client-only>
     <!-- 自定义轮播点 -->
     <ul class="indicators">
       <li v-for="index in 2" :key="index" :class="index === indexActive?'is-active':''" class="indicator">
@@ -169,7 +169,7 @@ export default {
     </div>
     <div class="home_user_say">
       <h3>5年口碑 · 品质之选</h3>
-      <no-ssr>
+      <client-only>
         <el-carousel class="user_say_carousel">
           <el-carousel-item class="item">
             <ul class="clear">
@@ -248,7 +248,7 @@ export default {
             </ul>
           </el-carousel-item>
         </el-carousel>
-      </no-ssr>
+      </client-only>
     </div>
     <div class="free_signup">
       <p>开启17PDF Reader高效办公学习旅程</p>

+ 2 - 2
pages/sdk.vue

@@ -191,7 +191,7 @@
     <ul v-show="active !== 0" class="index">
       <li v-for="idx in 6" :key="idx" :class="{active: active===idx}" @click="handlerToSection(idx)"></li>
     </ul>
-    <no-ssr>
+    <client-only>
       <el-dialog 
         :visible.sync="modalViable"
         :close-on-click-modal="false"
@@ -201,7 +201,7 @@
       >
         <sdk-form ref="sdkForm"></sdk-form>
       </el-dialog>
-    </no-ssr>
+    </client-only>
   </div>
 </template>