huaisianhuang %!s(int64=3) %!d(string=hai) anos
pai
achega
2e2c0241c8
Modificáronse 3 ficheiros con 10 adicións e 21 borrados
  1. 3 0
      html/pricing.html
  2. 1 1
      html/script_profiles.js
  3. 6 20
      html/static/script_util.js

+ 3 - 0
html/pricing.html

@@ -158,6 +158,9 @@
         const btnLoginPage = document.querySelector('.btn-login');
         const btnUserProfile = document.querySelector('.btn-userProfile');
         const btnLogout = document.querySelector('.btn-logout');
+        btnLoginPage.style.display = 'none';
+        btnLogout.style.display = 'none';
+        btnUserProfile.style.display = 'none';
         function get_jwt_token(){
             if(!document.cookie) {
                 return

+ 1 - 1
html/script_profiles.js

@@ -41,7 +41,7 @@ function renderView() {
             let title = "剩餘秒數不足";
             let text = '您的影片額度即將不足,加值以持續使用';
             let confirmButtonText = '加值';
-                    if (lan == 'en') { // 英文版訊息
+                    if (lan == 'en') { 
                         title = "Insufficient seconds left!";
                         text = 'Your seconds left is less than 20 seconds, refill to continue making videos.';
                         confirmButtonText = 'Refill';

+ 6 - 20
html/static/script_util.js

@@ -124,7 +124,7 @@ $(".next").click(function () {
   button.setAttribute('disabled', '');
   setTimeout(function () {
     button.removeAttribute('disabled')
-  }, 6000);
+  }, 10000);
   avatar = $('.avatar').val();
   name_title = $('.title_new').val();
   txtARR = [];
@@ -156,35 +156,21 @@ $(".next").click(function () {
   xhr.onreadystatechange = function () {
     if (xhr.readyState === 4) {
       responseOBJ = JSON.parse(xhr.responseText)
-      if (responseOBJ.msg=='ok') {
-        let title = "資料已送出";
-        let text = '資料已傳送,請耐心等候';
-        if (lang == 'en') { // 英文版訊息
-          title = "Submitted Successfully!";
-          text = 'We are working on your video. You will get notfication in line group when your video is done.';
-        }
-        Swal.fire({
-          title: title,
-          icon: 'success',
-          text: text,
-          confirmButtonColor: '#3085d6',
-        });
-      } else{
-        let title = '發生錯誤';
+      console.log(responseOBJ.msg);
+        //let title = "資料已送出";
         let text;
         if(lang == 'en') {
-          title = 'Error';
+          //title = 'Submitted Successfully!';
           text = responseOBJ.msg.eng;
         } else {
           text = responseOBJ.msg.zh;
         }
         Swal.fire({
-          title: title,
-          icon: 'error',
+         // title: title,
+          icon: 'info',
           text: text,
           confirmButtonColor: '#3085d6',
         });
-      }
       
     }
   };