Procházet zdrojové kódy

优化账户页面升级成功后的数据刷新逻辑,新增页面自动刷新功能;调整视频播放器按钮样式,确保按钮文本不被截断,提升用户体验。

wuyi před 3 měsíci
rodič
revize
1b4999b400
2 změnil soubory, kde provedl 10 přidání a 7 odebrání
  1. 3 0
      src/views/Account.vue
  2. 7 7
      src/views/VideoPlayer.vue

+ 3 - 0
src/views/Account.vue

@@ -153,6 +153,9 @@ const handleUpgrade = async () => {
     };
     };
 
 
     alert("升级成功!");
     alert("升级成功!");
+
+    // 刷新页面以更新数据
+    window.location.reload();
   } catch (error) {
   } catch (error) {
     console.error("升级失败", error);
     console.error("升级失败", error);
     alert("升级失败,请重试");
     alert("升级失败,请重试");

+ 7 - 7
src/views/VideoPlayer.vue

@@ -74,13 +74,13 @@
         <button
         <button
           v-if="!isGuest"
           v-if="!isGuest"
           @click="showMembershipPurchaseModal = true"
           @click="showMembershipPurchaseModal = true"
-          class="px-2 py-1 rounded-md bg-brand text-slate-900 text-xs font-medium hover:bg-brand/90 transition"
+          class="px-2 py-1 rounded-md bg-brand text-slate-900 text-xs font-medium hover:bg-brand/90 transition whitespace-nowrap min-w-fit"
         >
         >
           开通会员
           开通会员
         </button>
         </button>
         <button
         <button
           @click="showSinglePurchaseModal = true"
           @click="showSinglePurchaseModal = true"
-          class="px-4 py-2 rounded-lg bg-blue-500 text-white text-sm font-semibold hover:bg-blue-600 transition shadow-lg hover:shadow-xl flash-animation glow-animation hover:animate-none"
+          class="px-3 py-2 rounded-lg bg-blue-500 text-white text-sm font-semibold hover:bg-blue-600 transition shadow-lg hover:shadow-xl flash-animation glow-animation hover:animate-none whitespace-nowrap min-w-fit"
         >
         >
           单片购买
           单片购买
         </button>
         </button>
@@ -137,13 +137,13 @@
               <button
               <button
                 v-if="!isGuest"
                 v-if="!isGuest"
                 @click="purchaseMembership"
                 @click="purchaseMembership"
-                class="w-full bg-brand hover:bg-brand/90 text-slate-900 py-3 px-4 rounded-lg font-medium transition"
+                class="w-full bg-brand hover:bg-brand/90 text-slate-900 py-3 px-4 rounded-lg font-medium transition whitespace-nowrap"
               >
               >
                 开通会员
                 开通会员
               </button>
               </button>
               <button
               <button
                 @click="purchaseVideo"
                 @click="purchaseVideo"
-                class="w-full bg-blue-500 hover:bg-blue-600 text-white py-3 px-4 rounded-lg font-semibold transition shadow-lg hover:shadow-xl flash-animation glow-animation hover:animate-none"
+                class="w-full bg-blue-500 hover:bg-blue-600 text-white py-3 px-4 rounded-lg font-semibold transition shadow-lg hover:shadow-xl flash-animation glow-animation hover:animate-none whitespace-nowrap"
               >
               >
                 单独购买本片
                 单独购买本片
               </button>
               </button>
@@ -180,7 +180,7 @@
         <div class="space-y-3">
         <div class="space-y-3">
           <button
           <button
             @click="purchaseVideo"
             @click="purchaseVideo"
-            class="w-full bg-blue-500 hover:bg-blue-600 text-white py-3 px-4 rounded-lg font-semibold transition shadow-lg hover:shadow-xl flash-animation glow-animation hover:animate-none"
+            class="w-full bg-blue-500 hover:bg-blue-600 text-white py-3 px-4 rounded-lg font-semibold transition shadow-lg hover:shadow-xl flash-animation glow-animation hover:animate-none whitespace-nowrap"
           >
           >
             确认购买
             确认购买
           </button>
           </button>
@@ -533,7 +533,7 @@
       </div>
       </div>
 
 
       <!-- 标签信息 -->
       <!-- 标签信息 -->
-      <div
+      <!-- <div
         v-if="videoInfo.taginfo && videoInfo.taginfo.length > 0"
         v-if="videoInfo.taginfo && videoInfo.taginfo.length > 0"
         class="space-y-3"
         class="space-y-3"
       >
       >
@@ -547,7 +547,7 @@
             {{ tag.name }}
             {{ tag.name }}
           </span>
           </span>
         </div>
         </div>
-      </div>
+      </div> -->
 
 
       <!-- 相关推荐 -->
       <!-- 相关推荐 -->
       <div v-if="relatedVideos.length > 0" class="space-y-4">
       <div v-if="relatedVideos.length > 0" class="space-y-4">