xiabx пре 5 година
родитељ
комит
459ef51ccc

+ 2 - 1
src/api/config.js

@@ -6,7 +6,8 @@
  * @Description: api配置文件
  */
 const apiConfig = {
-  baseURL: "https://quickapp.leyuee.com/api"
+  baseURL: "https://quickapp.leyuee.com/api",
+  //baseURL: "https://kyy.aizhuishu.com/api",
 };
 
 export default apiConfig;

+ 5 - 2
src/assets/less/detail.less

@@ -65,9 +65,12 @@
 
   .book-intro {
     margin-top: 24px;
-    justify-content: flex-end;
+    justify-content: flex-start;
     // flex-direction: column;
-
+    .intro-div{
+      width: 100%;
+      justify-content: flex-end;
+    }
     text {
       font-size: 26px;
       color: #666;

+ 0 - 1
src/helper/index.js

@@ -17,7 +17,6 @@ export const pageLoad = (meta, fn, params) => {
     }
   })
 }
-
 // 支付配置
 export const configWxPay = async (params) => {
   let payType = wxpay.getType();

+ 16 - 2
src/manifest.json

@@ -1,8 +1,8 @@
 {
   "package": "com.beidao.kuaiying.zsy",
   "name": "追书云",
-  "versionName": "1.0.11",
-  "versionCode": "12",
+  "versionName": "1.0.12",
+  "versionCode": "13",
   "minPlatformVersion": "1040",
   "icon": "/assets/imgs/logo.png",
   "features": [
@@ -103,6 +103,12 @@
       },
       "views/Raderover": {
         "component": "index"
+      },
+      "views/Agreement": {
+        "component": "index"
+      },
+      "views/Privacy": {
+        "component": "index"
       }
     },
     "widgets": {}
@@ -120,6 +126,10 @@
         "titleBarText": "书城",
         "menu": false
       },
+      "views/Agreement": {
+        "titleBarText": "用户协议",
+        "menu": false
+      },
       "views/Category": {
         "titleBarText": "分类",
         "menu": false
@@ -162,6 +172,10 @@
         "fullScreen": true,
         "titleBar": false
       },
+      "views/Privacy": {
+        "titleBarText": "隐私协议",
+        "menu": false
+      },
       "views/Catalog": {
         "titleBarText": "目录",
         "menu": false

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

@@ -32,7 +32,7 @@
     <input class="btn" type="button" onclick="createShortcut" value="创建快捷方式" />
 
     <!-- 版权信息 -->
-    <text id="footer">{{copyright}}</text>
+    <text id="footer"><a href="/views/Agreement">用户协议</a> |<a href="/views/Privacy"> 隐私政策</a></text>
   </div>
 </template>
 

Разлика између датотеке није приказан због своје велике величине
+ 146 - 0
src/views/Agreement/index.ux


+ 2 - 2
src/views/Detail/index.ux

@@ -20,7 +20,7 @@
       </x-book>
       <stack class="book-intro">
         <text class="short-info__text">{{substrInfoText()}}</text>
-        <text class="toggle" @click="toggleTextStatus">{{showLongText ? '收起' : '展开'}}</text>
+        <div class="intro-div"><text class="toggle" @click="toggleTextStatus">{{showLongText ? '收起' : '展开'}}</text></div>
       </stack>
     </div>
     <text class="lastest-chapter" @click="toRead(book.last_cid,book.is_need_charge)">最新章节:{{book.last_chapter}}</text>
@@ -103,7 +103,7 @@ export default {
       uri: "/views/Reader",
       params: {
         bid: this.book.book_id,
-        chapter_id: chapter_id
+        chapter_id: chapter_id, 
       }
     })
   },

+ 28 - 16
src/views/Pay/index.ux

@@ -100,6 +100,7 @@ export default {
     showLoading: false,
     checked: false,
     phone: '',
+    last: null,
     payType: [
       {
         name: "支付宝",
@@ -114,6 +115,17 @@ export default {
     ],
     rechargeList: []
   },
+  //函数节流
+  throttle(fun, delay) {
+    let last = this.last;
+    const now = + new Date();
+    if (now - last > delay) {
+      fun();
+      this.last = now;
+    } else {
+      console.log('间隔太短了')
+    }
+  },
   changePayType(type) {
     this.curPayType = type.value;
   },
@@ -137,7 +149,7 @@ export default {
       }
     })
   },
-  async toPay() {
+  toPay() {
     if (this.checked && !this.phone) {
       prompt.showDialog({
         title: '友情提示',
@@ -156,25 +168,25 @@ export default {
         cancel: function () {
           console.log('取消绑定')
         },
-
       })
-
     } else {
-      let cur_pay_type = this.curPayType;
-      let product_id = this.rechargeList[this.curSelect].product_id;
-      let ret = null;
-      if (cur_pay_type === 1) {
-        ret = await configAliPay({ product_id: product_id, bid: this.bid, send_order_id: this.send_order_id });
-      }
-      else {
-        ret = await configWxPay({ product_id: product_id, bid: this.bid, send_order_id: this.send_order_id });
-      }
-      // 成功支付后的回调操作
-      if (ret.code === "9000") this.showWaitingWrap(ret);
-      else this.showToastByCode(ret.code);
+      this.throttle(() => { this.payFunc() }, 1000)
     }
+  },
+  async payFunc() {
 
-
+    let cur_pay_type = this.curPayType;
+    let product_id = this.rechargeList[this.curSelect].product_id;
+    let ret = null;
+    if (cur_pay_type === 1) {
+      ret = await configAliPay({ product_id: product_id, bid: this.bid, send_order_id: this.send_order_id });
+    }
+    else {
+      ret = await configWxPay({ product_id: product_id, bid: this.bid, send_order_id: this.send_order_id });
+    }
+    // 成功支付后的回调操作
+    if (ret.code === "9000") this.showWaitingWrap(ret);
+    else this.showToastByCode(ret.code);
   },
   checkOrder(order_info) {
     this.showLoading = true;

Разлика између датотеке није приказан због своје велике величине
+ 275 - 0
src/views/Privacy/index.ux


+ 5 - 3
src/views/Reader/index.ux

@@ -52,11 +52,13 @@ export default {
     showShortPop: false
   },
   async onInit() {
-    await storage.set({ key: "send_order_id", value: this.send_order_id });
-    let s = (await storage.get({ key: "send_order_id" })).data;
+    if(this.send_order_id){
+      await storage.set({ key: "send_order_id", value: this.send_order_id });
+    }
+    /* let s = (await storage.get({ key: "send_order_id" })).data;
     console.log("save send_order_id in storage");
     console.log("send_order_id", this.send_order_id);
-    console.log("storage send_order_id", s);
+    console.log("storage send_order_id", s); */
     await this.getChapters(this.bid, this.chapter_id);
     // await this.addShelf();
   },