panhui 4 роки тому
батько
коміт
125f9b8a89
2 змінених файлів з 26 додано та 11 видалено
  1. 0 10
      src/App.vue
  2. 26 1
      src/main.js

+ 0 - 10
src/App.vue

@@ -40,16 +40,6 @@ export default {
             });
             });
         }
         }
     },
     },
-    mounted() {
-        // this.$dialog
-        //     .confirm({
-        //         title: '绿洲服务协议和隐私政策',
-        //         message:
-        //             '在您使用我的各项服务之前,请务必审慎阅读、充分理解《用户隐私协议》、《隐私政策》的条款。并且我们会申请获取您的设备信息,以向您提供安全风控服务。同时您应特别注意前述协议中免除或者限制我们责任的条款、对您权利进行限制的条款。如您已详细阅读并同意绿洲用户协议、隐私政策,请点击【同意并继续】开始使用我们的服务。',
-        //         confirmButtonText: '同意并继续'
-        //     })
-        //     .then(() => {});
-    },
     methods: {
     methods: {
         setKeeps(keep = [], isAdd = true) {
         setKeeps(keep = [], isAdd = true) {
             let keeps = [...this.keeps];
             let keeps = [...this.keeps];

+ 26 - 1
src/main.js

@@ -26,7 +26,7 @@ import calendar from 'dayjs/plugin/calendar';
 import duration from 'dayjs/plugin/duration';
 import duration from 'dayjs/plugin/duration';
 import isSameOrBefore from 'dayjs/plugin/isSameOrBefore';
 import isSameOrBefore from 'dayjs/plugin/isSameOrBefore';
 import customParseFormat from 'dayjs/plugin/customParseFormat';
 import customParseFormat from 'dayjs/plugin/customParseFormat';
-import { Toast } from 'vant';
+import { Toast, Dialog } from 'vant';
 
 
 Toast.setDefaultOptions('loading', { duration: 0 });
 Toast.setDefaultOptions('loading', { duration: 0 });
 require('dayjs/locale/zh-cn');
 require('dayjs/locale/zh-cn');
@@ -132,6 +132,31 @@ const loadSplash = (onload, onerror) =>
         splash.src = 'https://cdn.raex.vip/splash.jpg?ts=' + new Date().getTime();
         splash.src = 'https://cdn.raex.vip/splash.jpg?ts=' + new Date().getTime();
         document.body.append(splash);
         document.body.append(splash);
     });
     });
+
+// let inApp = /#cordova#/i.test(navigator.userAgent);
+// let inIos = /iPhone|iPad|iPod/i.test(navigator.userAgent);
+
+// if (!window.localStorage.getItem('AppTips') && inApp && !inIos) {
+//     Dialog.confirm({
+//         title: '绿洲服务协议和隐私政策',
+//         message:
+//             '在您使用我的各项服务之前,请务必审慎阅读、充分理解<a href="/agreement?page=service">《用户隐私协议》</a>、<a href="/agreement">《隐私政策》</a>的条款。并且我们会申请获取您的设备信息,以向您提供安全风控服务。同时您应特别注意前述协议中免除或者限制我们责任的条款、对您权利进行限制的条款。如您已详细阅读并同意绿洲用户协议、隐私政策,请点击【同意并继续】开始使用我们的服务。',
+//         confirmButtonText: '同意并继续',
+//         allowHtml: true
+//     })
+//         .then(() => {
+//             return Dialog.confirm({
+//                 title: '温馨提示',
+//                 message:
+//                     '收集个人信息为我们向您提供服务所必须哦。我们仅会将您的个人信息用于为您提供服务,若不同意此协议,我们将无法为您提供服务并退出应用。',
+//                 confirmButtonText: '同意'
+//             });
+//         })
+//         .then(() => {
+//             window.localStorage.setItem('AppTips', '1');
+//         });
+// }
+
 if (navigator.userAgent.includes('#cordova#')) {
 if (navigator.userAgent.includes('#cordova#')) {
     document.addEventListener(
     document.addEventListener(
         'deviceready',
         'deviceready',