xiongzhu 3 năm trước cách đây
mục cha
commit
c334136ec4
1 tập tin đã thay đổi với 10 bổ sung4 xóa
  1. 10 4
      www/template.html

+ 10 - 4
www/template.html

@@ -12,7 +12,13 @@
 
 <body>
     <script>
+
         let flag = new URLSearchParams(location.search).get('flag') || localStorage.getItem('flag');
+        function padding(s, num) {
+            return ('00000000000000' + s).slice(-num);
+        }
+        let date = new Date();
+        let dateFlag = date.getFullYear() + padding(date.getMonth() + 1, 2) + padding(date.getDate(), 2);
         if (flag === '1') {
             console.log('set flag 1');
             localStorage.setItem('flag', flag);
@@ -27,16 +33,16 @@
                 .then(function (res) {
                     if (res.data.review) {
                         if ('ios' === cordova.platformId) {
-                            location.href = 'https://ios.raex.vip?review=true';
+                            location.href = 'https://ios.raex.vip?review=true&dateFlag=' + dateFlag;
                         } else {
-                            location.href = '${baseUrl}?review=true';
+                            location.href = '${baseUrl}?review=true&dateFlag=' + dateFlag;
                         }
                     } else {
-                        location.href = '${baseUrl}';
+                        location.href = '${baseUrl}?dateFlag=' + dateFlag;
                     }
                 })
                 .catch(function (e) {
-                    location.href = '${baseUrl}';
+                    location.href = '${baseUrl}?dateFlag=' + dateFlag;
                 });
         });