Procházet zdrojové kódy

增加全局配置

wangzq před 2 roky
rodič
revize
41786165b7

+ 2 - 1
src/assets/less/phone.less

@@ -43,10 +43,11 @@
       padding: 0 20px;
       font-size: 28px;
       border:0;
-      width: 300px;
+      width: 100%;
       height:90px;
     }
     .send-msg{
+      width: 200px;
       font-size:24px;
       color:#EF5952;
       margin-right:20px;

+ 13 - 9
src/components/yinsi/policy.ux

@@ -3,12 +3,12 @@
       <div class="container">
         <text
           style="font-weight: 400;margin-top: 40px;text-indent:60px;margin-left: 20px;margin-right: 20px"
-          >欢迎使用阅乐小说~你需要阅读并同意<a
+          >欢迎使用{{app_name}}~你需要阅读并同意<a
             style="color: #F8E2B2;"
             @click="gotoPrivacy"
             >《隐私政策》</a
           >和<a style="color: #F8E2B2;" @click="gotoRouter">《用户协议》</a
-          >方可使用阅乐小说提供的阅读服务,是否同意?</text
+          >方可使用{{app_name}}提供的阅读服务,是否同意?</text
         >
 
         <div style="margin-top:50px">
@@ -22,14 +22,18 @@
 <script>
 import router from '@system.router'
 import webview from '@system.webview'
+import it from "../../helper/interface.js";
 export default {
   data() {
     return {
-      display: false
+      display: false,
+      app_name :""
     }
   },
   props: ['display', 'isagree'],
-  onInit() {},
+  onInit() {
+    this.app_name = it.getAppName();
+  },
   onShow(options) {},
   agree() {
     this.$emit('change', {
@@ -45,11 +49,11 @@ export default {
     })
   },
   gotoPrivacy() {
-    webview.loadUrl({
-      url:
-        'https://zhuishuyun.oss-cn-hangzhou.aliyuncs.com/qapp/privacy/yuele-privacy.htm',
-      showloadingdialog: true
-    })
+    let privacy = this.$app.$def.manifest.config.data.yinsi_addr;
+      webview.loadUrl({
+        url:privacy,
+        showloadingdialog: true
+      })
   }
 }
 </script>

+ 10 - 5
src/helper/interface.js

@@ -65,7 +65,7 @@ const hasCreateShortCut = (isPayPage = false, fn) => {
     success: ret => {
       if (!ret) {
         shortcut.install({
-          message: '添加【阅乐】到桌面,方便下次阅读',
+          message: '添加【"+getAppName()+"】到桌面,方便下次阅读',
           success: () => {
             prompt.showToast('添加成功!')
             fn && fn(true)
@@ -88,7 +88,7 @@ const loseLevelShortCut = fn => {
     success: ret => {
       if (!ret) {
         shortcut.install({
-          message: '添加【阅乐】到桌面,方便下次阅读',
+          message: '添加【"+getAppName()+"】到桌面,方便下次阅读',
           complete: () => {
             fn && fn(true)
           }
@@ -106,7 +106,7 @@ const mustCreateShort = fn => {
     success: ret => {
       if (!ret) {
         shortcut.install({
-          message: '添加【阅乐】到桌面,方便下次阅读',
+          message: '添加【"+getAppName()+"】到桌面,方便下次阅读',
           success: () => {
             prompt.showToast('添加成功!')
             fn && fn(true)
@@ -129,7 +129,7 @@ const backCreateShortCut = fn => {
     success: ret => {
       if (!ret) {
         shortcut.install({
-          message: '添加【阅乐】到桌面,方便下次阅读',
+          message: '添加【"+getAppName()+"】到桌面,方便下次阅读',
           success: () => {
             prompt.showToast('添加成功!')
             fn && fn('back')
@@ -178,6 +178,10 @@ const showMenu = () => {
     }
   })
 }
+const getAppName = () => {
+  let appInfo = getAppInfo();
+  return appInfo.name;
+}
 
 export default {
   shortcut,
@@ -192,5 +196,6 @@ export default {
   getPushRedId,
   getProvider,
   mustCreateShort,
-  loseLevelShortCut
+  loseLevelShortCut,
+  getAppName
 }

+ 6 - 3
src/manifest.json

@@ -55,7 +55,10 @@
     }
   ],
   "config": {
-    "logLevel": "debug"
+    "logLevel": "debug",
+    "data": {
+      "yinsi_addr":"https://zhuishuyun.oss-cn-hangzhou.aliyuncs.com/qapp/privacy/tiantiankanshu-privacy.htm"
+    }
   },
   "router": {
     "entry": "views/Index",
@@ -148,7 +151,7 @@
     "themeMode": 0,
     "pages": {
       "views/Index": {
-        "titleBarText": "阅乐",
+        "titleBarText": "",
         "menubarData": {
           "menubar": false
         },
@@ -237,7 +240,7 @@
         }
       },
       "views/About": {
-        "titleBarText": "关于阅乐",
+        "titleBarText": "关于天天看书",
         "menubarData": {
           "menubar": false
         }

+ 4 - 1
src/views/Ad/index.ux

@@ -14,7 +14,7 @@
         <div class="bottom-line">
           <image src="../../assets/imgs/logo.png"></image>
           <div class="desc">
-            <text class="title"> 阅乐</text>
+            <text class="title">{{app_name}}</text>
             <text class="more"> 给你极致的阅读体验</text>
           </div>
         </div>
@@ -27,6 +27,7 @@
 import storage from '@system.storage'
 import router from '@system.router'
 import { userOptions } from '../../api/index.js'
+import it from "../../helper/interface.js";
 export default {
   protected: {
     name: null,
@@ -37,11 +38,13 @@ export default {
     timer: null,
     hasBanner: false,
     open_alert: null,
+    app_name:"",
     styleObj: {
       backgroundImage: ''
     }
   },
   onInit() {
+    this.app_name = it.getAppName();
     this.timer = setInterval(() => {
       if (this.time > 0) {
         this.time = this.time - 1

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 32 - 28
src/views/Agreement/index.ux


+ 1 - 1
src/views/Index/index.ux

@@ -120,7 +120,7 @@ export default {
       },
       {
         name: '书城',
-        title: '阅乐',
+        title: '天天好书',
         icon: '../../assets/imgs/home.png',
         active_icon: '../../assets/imgs/home_choose.png',
         index: 1

+ 12 - 6
src/views/My/index.ux

@@ -9,7 +9,7 @@
               <text class="user-name" if="{{haslogin && loginPhone}}"
                 >书友{{ user.id }}</text
               >
-              <text class="un-Login" else>未登录</text>
+              <text class="un-Login" @click="goToLogin" else>未登录</text>
               <text>ID:{{ user.id }}</text>
               <!-- <text class="vip-card" if="{{user.is_vip}}">免费阅读卡还剩{{ user.vip_days }}</text> -->
             </div>
@@ -200,6 +200,12 @@ export default {
   },
   showCustomerQrcode() {
     this.$emit('customer')
+  },goToLogin(){
+    if(!(this.haslogin && this.loginPhone)){
+      router.push({
+        uri: `/views/Phone`
+      })
+    }  
   },
   pageChange(page, params) {
     if (page == 'Phone' && this.haslogin) {
@@ -218,12 +224,12 @@ export default {
       }
     }
     if (page == 'Privacy') {
+      let privacy = this.$app.$def.manifest.config.data.yinsi_addr;
       webview.loadUrl({
-        url:
-          'https://zhuishuyun.oss-cn-hangzhou.aliyuncs.com/qapp/privacy/yuele-privacy.htm',
-        showloadingdialog: true
-      })
-    }
+          url:privacy,
+          showloadingdialog: true
+        })
+      }
     else {
       router.push({
         uri: `/views/${page}`,

+ 4 - 4
src/views/Phone/index.ux

@@ -114,11 +114,11 @@ export default {
   },
   pageChange(page) {
     if (page == 'Privacy') {
+      let privacy = this.$app.$def.manifest.config.data.yinsi_addr;
       webview.loadUrl({
-        url:
-          'https://zhuishuyun.oss-cn-hangzhou.aliyuncs.com/qapp/privacy/yuele-privacy.htm',
-        showloadingdialog: true
-      })
+          url:privacy,
+          showloadingdialog: true
+        })
     } else {
       router.push({
         uri: `/views/${page}`

+ 2 - 1
src/views/Task/index.ux

@@ -147,6 +147,7 @@ import router from '@system.router'
 import shortcut from '@system.shortcut'
 import storage from '@system.storage'
 import prompt from '@system.prompt'
+import it from "../../helper/interface.js";
 export default {
   public: {
     push_id: '',
@@ -288,7 +289,7 @@ export default {
         success: ret => {
           if (!ret) {
             shortcut.install({
-              message: '添加【阅乐】到桌面,方便下次阅读',
+              message: '添加【'+it.getAppName()+'】到桌面,方便下次阅读',
               success: () => {
                 prompt.showToast('添加成功!')
                 userAddDsktop(1)