XiaBx 3 tahun lalu
induk
melakukan
91eb0b7c23

+ 1 - 0
src/assets/less/reader.less

@@ -2,6 +2,7 @@
   flex-direction: column;
   background-color: #e6e6e6;
   width: 100%;
+  padding-bottom: 180px;
   .banner-list {
     height: 300px;
     image {

+ 87 - 0
src/components/yinsi/policy.ux

@@ -0,0 +1,87 @@
+<template>
+  <div class="label">
+      <div class="container">
+        <text
+          style="font-weight: 400;margin-top: 40px;text-indent:60px;margin-left: 20px;margin-right: 20px"
+          >欢迎使用海天阅读~你需要阅读并同意<a
+            style="color: #3AACFF;"
+            @click="gotoPrivacy"
+            >《隐私政策》</a
+          >和<a style="color: #3AACFF;" @click="gotoRouter">《用户协议》</a
+          >方可使用海天阅读提供的阅读服务,是否同意?</text
+        >
+
+        <div style="margin-top:50px">
+          <text class="cancel" @click="cancel">取消</text>
+          <text class="agree" @click="agree">同意</text>
+        </div>
+      </div>
+  </div>
+</template>
+
+<script>
+import router from '@system.router'
+import webview from '@system.webview'
+export default {
+  data() {
+    return {
+      display: false
+    }
+  },
+  props: ['display', 'isagree'],
+  onInit() {},
+  onShow(options) {},
+  agree() {
+    this.$emit('change', {
+      display: false
+    })
+  },
+  cancel() {
+    this.$app.exit()
+  },
+  gotoRouter() {
+    router.push({
+      uri: `/views/Agreement`
+    })
+  },
+  gotoPrivacy() {
+    webview.loadUrl({
+      url:
+        'https://zhuishuyun.oss-cn-hangzhou.aliyuncs.com/qapp/privacy/hait_privacy.htm',
+      showloadingdialog: true
+    })
+  }
+}
+</script>
+<style>
+.label {
+  justify-content: center;
+  align-items: center;
+  width: 750px;
+  height: 100%;
+  background-color: rgba(0,0,0,.5);
+}
+.container {
+  width: 510px;
+  border-radius: 30px;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  background-color: white;
+}
+.agree {
+  width: 50%;
+  height: 80px;
+  text-align: center;
+  border-bottom-right-radius: 30px;
+  background-color: #3AACFF;
+  color: white;
+}
+.cancel {
+  width: 50%;
+  height: 80px;
+  text-align: center;
+  border-bottom-left-radius: 30px;
+  background-color: #f5f5f5;
+}
+</style>

+ 2 - 2
src/manifest.json

@@ -1,8 +1,8 @@
 {
   "package": "com.beidao.kuaiying.haitian",
   "name": "海天阅读",
-  "versionName": "1.0.8",
-  "versionCode": 8,
+  "versionName": "1.0.9",
+  "versionCode": 9,
   "minPlatformVersion": 1070,
   "icon": "/assets/imgs/logo.png",
   "features": [

+ 25 - 3
src/views/Index/index.ux

@@ -5,6 +5,7 @@
 <import name="leader-board" src="../Leaderboard/index.ux"></import>
 <import name="sign-page" src="../../components/sign/index.ux"></import>
 <import name="short-page" src="../../components/short/index.ux"></import>
+<import name="policy-page" src="../../components/yinsi/policy.ux"></import>
 <template>
   <stack class="stack-wrap">
     <div class="index-wrap">
@@ -79,6 +80,9 @@
         ></image>
       </div>
     </stack>
+    <block if="display">
+      <policy-page @change="dispatchEvent"></policy-page>
+    </block>
   </stack>
 </template>
 
@@ -153,7 +157,8 @@ export default {
     home_show: 0,
     home_alert: null,
     back_alert: 0,
-    isInit: false
+    isInit: false,
+    display: false,
   },
   async onInit() {
     let isFromPush = false
@@ -163,8 +168,15 @@ export default {
       await storage.set({ key: 'push_id', value: this.push_id })
     }
     if (this.send_order_id) {
-      await storage.set({ key: 'send_order_id', value: this.send_order_id })
+      await storage.set({ key: "send_order_id", value: this.send_order_id });
+    } else {
+      let send_order_id = (await storage.get({ key: "send_order_id" })).data;
+      if (send_order_id) this.send_order_id = send_order_id;
     }
+    //获取当前是否隐私弹窗
+    let showPolicy = (await storage.get({ key: "agreeFlag" })).data;
+    if (!this.send_order_id && !showPolicy) this.display = true;
+
     //今日已签到过不在弹框签到
 
     if (this.curPage && this.curPage > 0) {
@@ -195,6 +207,16 @@ export default {
   closeAcitivity() {
     this.showActivitys = false
   },
+  dispatchEvent(evt) {
+    this.display = evt.detail.display
+    this.save()
+  },
+  save() {
+    storage.set({
+      key: 'agreeFlag',
+      value: 'agree',
+    })
+  },
   toMyRead(evt) {
     console.log(evt.detail.count)
   },
@@ -294,7 +316,7 @@ export default {
   duplication() {
     clipboard.set({
       text: this.cutomerName,
-      success: function(data) {
+      success: function (data) {
         prompt.showToast({
           message: '复制成功!'
         })

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

@@ -3,7 +3,7 @@
 <template>
   <div id="reader-content">
     <stack>
-      <div class="reader-wrap" id='list' style="background-color:{{currentColor.color}}">
+      <div class="reader-wrap" id='list' style="background-color:{{currentColor.color}};padding-bottom: 180px">
         <div class="reader-title">
           <text class="title" style="color:{{isNight=='night'?'#666':'#333'}}">{{bookinfo.chapter_name}}</text>
           <!-- <text class="add-shelf" @click="addShelf">加入书架1</text> -->