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QVLA1Xx36U6j
+VxCt6U1ap+LS8YDv86VAUszHF1EqZ7ULHcmQHCNB/BJURijXu+fWk4WWmXBRiaE2
+Qfn3m+4VC2WqBub9Q3oQt1X8DEDvu9+nlSWysi40O4On73OCu1KuCdGj4YJ78NoB
+HSKG9Rcz0pW0o3Q05kZWo8F2HA==
+-----END PRIVATE KEY-----

+ 6 - 1
src/api/index.js

@@ -96,10 +96,15 @@ export const deleteShelfBook = params => {
 };
 
 // 充值
-export const getPayQuery = params => {
+export const getConfigOfWxPay = (params) => {
   return fly.get("/goToPay", params);
 };
 
+// 支付宝充值
+export const getConfigOfAliPay = (params) => {
+  return fly.get("/goToAliPay", params)
+}
+
 //获取用户信息
 export const getUserInfo = () => {
   return fly.get(`/userinfo`);

+ 6 - 2
src/api/utils.js

@@ -64,7 +64,11 @@ const refreshToken = () => {
   return fly
     .get("/RefreshToken", {
       token: token.token
-    })
+    }, {
+        headers: {
+          a: 1
+        }
+      })
     .then(r => {
       return checkResult(r);
     })
@@ -153,7 +157,7 @@ export const downImg = photoPath => {
         }
       });
     },
-    fail: () => {}
+    fail: () => { }
   });
 };
 //校验手机号

+ 6 - 3
src/assets/less/consume.less

@@ -7,7 +7,7 @@
     align-items: center;
 
     text {
-      color: #333;
+      color: #999;
       font-size: 30px;
     }
 
@@ -25,12 +25,15 @@
         margin-top: 10px;
 
         &--active {
-          background-color: #3284ff;
+          background-color: #EF5952;
+          
         }
       }
       
       .active {
-        color: #3284ff;
+        color: #EF5952;
+        font-size:36px;
+          font-weight: bold;
       }
     }
   }

+ 7 - 0
src/assets/less/index.less

@@ -88,4 +88,11 @@
 
     }
   }
+}
+.sign-icon{
+  position: fixed;
+  width:150px;
+  height:150px;
+  right:20px;
+  bottom: 300px;
 }

+ 37 - 60
src/assets/less/recharge.less

@@ -2,61 +2,44 @@
   flex-direction: column;
 
   .user-account__wrap {
-    flex-direction: column;
-    border-bottom: 12px solid #f7f7f7;
-
-    .title-bar {
-      margin: 35px 0;
-      align-items: center;
-
-      .title {
-        font-size: 28px;
-        color: #3284ff;
+    width: 690px;
+    height: 180px;
+    background: linear-gradient(45deg, #fff2e2, #fff6e2);
+    border-radius: 12px;
+    margin: 20px auto 40px;
+    align-items: center;
+    padding: 0 30px 0 40px;
+    justify-content: space-between;
+    .account-blance {
+      flex-direction: column;
+      .blance-title {
+        font-size: 36px;
+        color: #3d2b15;
+        font-weight: bold;
       }
-
-      .border-bar {
-        width: 6px;
-        height: 100%;
-        background-color: #3284ff;
-        border-radius: 4px;
-        margin-right: 20px;
+      .blance-info {
+        font-size: 30px;
+        color: #ef5952;
       }
     }
-
-    .balance-bar {
-      justify-content: space-between;
-      align-items: center;
-      padding: 0 40px;
-      margin-bottom: 34px;
-
-      .balance {
-        text {
-          font-size: 24px;
-          color: #333;
-        }
-
-        .balance-number {
-          color: #ff6060;
-          font-weight: bold;
-          font-size: 32px;
-        }
-      }
-
-      .pay-btn {
-        background-color: #ff6060;
-        color: #fff;
-        font-size: 26px;
-        text-align: center;
-        width: 180px;
-        height: 60px;
-        line-height: 60px;
-        border-radius: 6px;
-      }
+    .account-pay {
+      border-radius: 26px;
+      background-color: #ef5952;
+      width: 150px;
+      height: 50px;
+      font-size: 24px;
+      color: #fff;
+      line-height: 50px;
+      text-align: center;
     }
   }
-
+  .title-bar {
+    margin: 10px 0 0 24px;
+    font-size: 32px;
+  }
   .recharge-list__wrap {
     border-bottom: 0;
+    flex-direction: column;
   }
 
   .recharge-list {
@@ -65,33 +48,29 @@
     .recharge-item {
       justify-content: space-between;
       align-items: center;
-      margin: 24px 24px 0;
-      border-bottom: 2px solid #f7f7f7;
 
+      padding: 24px 24px 0;
+      border-bottom: 2px solid #f7f7f7;
       .item-info {
         flex: 1;
         flex-direction: column;
         justify-content: flex-start;
         align-items: flex-start;
-
         .item-name,
         .item-number {
           font-size: 24px;
           color: #999;
         }
-
         .item-number {
           margin: 10px 0;
         }
 
         .item-pay {
           padding-bottom: 20px;
-
           text {
             font-size: 24px;
             color: #333;
           }
-
           .pay-number {
             font-size: 36px;
             font-weight: bold;
@@ -99,15 +78,13 @@
           }
         }
       }
-
+      .paid {
+        color: #999;
+      }
       .item-status {
         font-size: 24px;
         color: #ff6060;
       }
-
-      .paid {
-        color: greenyellow;
-      }
     }
   }
-}
+}

+ 48 - 0
src/components/short/index.ux

@@ -0,0 +1,48 @@
+<template>
+	<div class="short-wrap">
+		<div class="short-content" @click="createShortcut">
+			<text class="short-text">保存到手机方便下次阅读>></text>
+		</div>
+	</div>
+</template>
+<script>
+
+export default {
+	data: {
+		
+	},
+	onInit() {
+		
+	},
+	createShortcut(){
+		// 创建快捷方式
+    this.$app.$def.createShortcut()
+	}
+}
+</script>
+
+
+<style lang="less" scoped>
+	.short{
+		&-wrap{
+			position: fixed;
+			bottom: 140px;
+			height: 80px;
+			justify-content: center;
+			width: 100%;
+		}
+		&-content{
+			background-color: #EF5952;
+			border-radius: 40px;
+			width: 600px;
+			align-items: center;
+			justify-content: center;
+		}
+		&-text {
+			color:#fff;
+			font-size: 30px;
+			font-weight: bold;
+			text-align: center;
+		}
+	}
+</style>

+ 9 - 9
src/components/sign/index.ux

@@ -29,23 +29,22 @@ export default {
 			{ day: 6, iconType: 'coin', fee: 50 },
 			{ day: 7, iconType: 'gift', fee: 150 },
 		],
-		signData:{
-			days:0,
-			fee:0
+		signData: {
+			days: 0,
+			fee: 0
 		}
 	},
 	onInit() {
 		this.sign();
 	},
 	async sign() {
-		let res =	await userSign();
-		this.signData=res;
+		let res = await userSign();
+		this.signData = res;
 		this.signList.forEach(item => {
-			if(item.day<=res.days){
-				item.iconType='checked';
+			if (item.day <= res.days) {
+				item.iconType = 'checked';
 			}
 		});
-		setStore('SIGN_DATE',{isSign:true});
 	},
 	setSignPop() {
 		this.$dispatch('dispathEvt')
@@ -62,7 +61,8 @@ export default {
     right: 0;
     background-color: rgba(0, 0, 0, 0.56);
     flex-direction: column;
-    align-items: center;
+		align-items: center;
+		z-index: 2;
   }
   &-content {
     width: 650px;

+ 48 - 0
src/components/wechat/index.ux

@@ -0,0 +1,48 @@
+<template>
+	<div class="wechat-wrap">
+		<div class="wechat-content">
+			<text class="wechat-title">关注公众号方便您继续阅读</text>
+		</div>
+	</div>
+</template>
+<script>
+
+export default {
+	data: {
+
+	},
+	onInit() {
+
+	},
+
+}
+</script>
+<style lang="less" scoped>
+.wechat {
+  &-wrap {
+    position: fixed;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    background-color: rgba(0, 0, 0, 0.56);
+    flex-direction: column;
+    align-items: center;
+    z-index: 2;
+    justify-content: center;
+  }
+  &-content {
+    width: 600px;
+    height: 650px;
+    background-color: #fff;
+    flex-direction: column;
+    align-items: center;
+  }
+  &-title {
+    height: 120px;
+    line-height: 120px;
+    font-size: 32px;
+    font-weight: bold;
+  }
+}
+</style>

+ 17 - 2
src/helper/index.js

@@ -1,6 +1,7 @@
 
 import wxpay from '@service.wxpay';
-import { getPayQuery } from "../api";
+import alipay from '@service.alipay';
+import { getConfigOfWxPay, getConfigOfAliPay } from "../api";
 
 export const pageLoad = (meta, fn, params) => {
   return new Promise(async (resolve, reject) => {
@@ -19,7 +20,7 @@ export const pageLoad = (meta, fn, params) => {
 
 // 支付配置
 export const configWxPay = async (params) => {
-  let config = await getPayQuery(params);
+  let config = await getConfigOfWxPay(params);
   console.log("pay config", config);
   let prepayid = config.prepay_id;
   // app中的配置信息
@@ -72,3 +73,17 @@ let useWxPay = (prepayid, extra) => {
     })
   })
 }
+
+// 配置支付宝支付
+export const configAliPay = (params) => {
+  return new Promise(async (resolve) => {
+    let orderInfo = await getConfigOfAliPay(params);
+    alipay.pay({
+      orderInfo: orderInfo,
+      callback: (ret) => {
+        console.log("alipay cb", ret);
+        resolve({ code: ret.resultStatus, result: ret.result ? JSON.parse(ret.result) : "" })
+      }
+    })
+  })
+}

+ 10 - 4
src/manifest.json

@@ -1,5 +1,5 @@
 {
-  "package": "com.application.zhuishuyun",
+  "package": "com.beidao.kuaiying.zsy",
   "name": "追书云小说",
   "versionName": "1.0.0",
   "versionCode": "1",
@@ -37,10 +37,16 @@
       "name": "system.storage"
     },
     {
+      "name": "service.alipay"
+    },
+    {
+      "name": "system.webview"
+    },
+    {
       "name": "service.wxpay",
       "params": {
-        "package": "com.application.zhuishuyun",
-        "sign": "",
+        "package": "com.beidao.kuaiying.zsy",
+        "sign": "NEJEMkI2RjFFMzM2RDlEMTYyRjc4NTZCRTYwQjVEQjY=",
         "url": ""
       }
     }
@@ -54,7 +60,7 @@
     "logLevel": "debug"
   },
   "router": {
-    "entry": "views/Shelf",
+    "entry": "views/Reader",
     "pages": {
       "views/Index": {
         "component": "index"

+ 16 - 11
src/views/Index/index.ux

@@ -2,7 +2,8 @@
 <import name="category-page" src="../Category/index.ux"></import>
 <import name="shelf-page" src="../Shelf/index.ux"></import>
 <import name="my-page" src="../My/index.ux"></import>
- <import name="sign-page" src="../../components/sign/index.ux"></import>
+<import name="sign-page" src="../../components/sign/index.ux"></import>
+<import name="short-page" src="../../components/short/index.ux"></import>
 <template>
   <stack class="stack-wrap">
     <div class="index-wrap">
@@ -26,7 +27,9 @@
         </div>
       </div>
     </div>
-    <sign-page if="{{showSignPop}}" onemitEvt="emitEvt"></sign-page>
+    <image src="../../assets/imgs/sign_show.png" class="sign-icon" @click="changeSignPop"> </image>
+    <sign-page if="{{showSignPop}}" ></sign-page>
+    <short-page if="{{showShortPop}}"></short-page>
     <div class="stack-popup" @click="closeWrap" if="showPopup">
       <div class="customer-popup">
         <text class="title">联系客服</text>
@@ -43,8 +46,7 @@
 <script>
 import clipboard from '@system.clipboard';
 import prompt from '@system.prompt';
-import {downImg,getStore} from '../../api/utils.js';
-import storage from "@system.storage";
+import { downImg, getStore } from '../../api/utils.js';
 export default {
   private: {
     tabbar: [
@@ -79,14 +81,17 @@ export default {
     ],
     current: 1,
     showPopup: false,
-    showSignPop:true
+    showSignPop: false,
+    showShortPop:false
   },
-  async onInit(){
-    this.$on('dispathEvt',this.changeSignPop);
+   onInit() {
+    this.$on('dispathEvt', this.changeSignPop);
     //今日已签到过不在弹框签到
-    let signData = await getStore('SIGN_DATE',1);
-    if(signData && signData.isSign) this.showSignPop=false;
-    },
+    if(this.$app.$def.data.backClickCount === 0){
+      this.showShortPop=true;
+    }
+
+  },
   onBackPress() {
     // 退出逻辑
     if (this.$app.$def.data.backClickCount === 0) {
@@ -110,7 +115,7 @@ export default {
     this.current = 1;
   },
   changeSignPop() {
-    this.showSignPop = false;
+    this.showSignPop = !this.showSignPop;
   },
   closeWrap() {
     this.showPopup = false;

+ 5 - 5
src/views/My/index.ux

@@ -11,7 +11,7 @@
           <text>您还剩<span class="red">{{user.balance}}</span>书币</text>
         </div>
         <text class="operator-button" @click="pageChange('Pay')">
-         充值
+          充值
         </text>
       </div>
       <div class="operator-item" @click="toUrl('https://sitenlp5w4yepme7xrqz.zhuishuyun.com/sign')">
@@ -66,7 +66,7 @@
 
 <script>
 import router from "@system.router";
-import {  getUserInfo } from "../../api/index";
+import { getUserInfo } from "../../api/index";
 export default {
   props: {},
   data() {
@@ -77,9 +77,9 @@ export default {
   onInit() {
     this.getUser();
   },
-  async getUser(){
-  let user =await getUserInfo();
-    this.user=user;
+  async getUser() {
+    let user = await getUserInfo();
+    this.user = user;
   },
   showCustomerQrcode() {
     this.$emit('customer');

+ 24 - 3
src/views/Pay/index.ux

@@ -66,8 +66,9 @@
 </template>
 
 <script>
+import prompt from '@system.prompt';
 import { getChargeList } from "../../api";
-import { configWxPay } from "../../helper";
+import { configWxPay, configAliPay } from "../../helper";
 
 export default {
   private: {
@@ -103,9 +104,29 @@ export default {
       }
     })
   },
-  toPay() {
+  async toPay() {
+    let cur_pay_type = this.curPayType;
     let product_id = this.rechargeList[this.curSelect].product_id;
-    configWxPay({ product_id: product_id })
+    console.log(cur_pay_type);
+    if (cur_pay_type === 1) {
+      let ret = await configAliPay({ product_id: product_id });
+      this.showToastByCode(ret.code);
+    }
+    else configWxPay({ product_id: product_id });
+  },
+  showToastByCode(code) {
+    let msg = "支付成功!";
+    switch (code) {
+      case "9000": msg = "支付成功!"; break;
+      case "8000": msg = "订单已提交,请等待结果"; break;
+      case "4000": msg = "订单支付失败!"; break;
+      case "5000": msg = "订单重复!"; break;
+      case "6001": msg = "您已取消支付"; break;
+      case "6002": msg = "网络错误!"; break;
+      case "6004": msg = "请联系客服查询订单"; break;
+      default: msg = "请联系客服" + code;
+    }
+    prompt.showToast({ message: msg });
   },
   onInit() {
     this.initChargeList();

+ 26 - 15
src/views/Reader/index.ux

@@ -1,18 +1,25 @@
+<import name="short-page" src="../../components/short/index.ux"></import>
+ <import name="wechat-page" src="../../components/wechat/index.ux"></import> 
 <template>
-  <list class="reader-wrap" id='list'>
-    <list-item type='title' class="reader-title">
-      <text class="title">{{bookinfo.chapter_name}}</text>
-      <!-- <text class="add-shelf" @click="addShelf">加入书架</text> -->
-    </list-item>
-    <list-item type='content' class="reader-content">
-      <text class="chapter-text" for='content'>{{$item}}</text>
-    </list-item>
-    <list-item type='button' class="reader-operator">
-      <text class="operator prev" @click="getPrevChapter">上一章</text>
-      <text class="operator catalog" @click="toCatalog">目录</text>
-      <text class="operator next" @click="getNextChapter">下一章</text>
-    </list-item>
-  </list>
+  <div id="reader-content">
+    <list class="reader-wrap" id='list'>
+      <list-item type='title' class="reader-title">
+        <text class="title">{{bookinfo.chapter_name}}</text>
+        <!-- <text class="add-shelf" @click="addShelf">加入书架</text> -->
+      </list-item>
+      <list-item type='content' class="reader-content">
+        <text class="chapter-text" for='content'>{{$item}}</text>
+      </list-item>
+      <list-item type='button' class="reader-operator">
+        <text class="operator prev" @click="getPrevChapter">上一章</text>
+        <text class="operator catalog" @click="toCatalog">目录</text>
+        <text class="operator next" @click="getNextChapter">下一章</text>
+      </list-item>
+    </list>
+    <short-page if="{{showShortPop}}"></short-page>
+    <!-- <wechat-page></wechat-page> -->
+  </div>
+
 </template>
 
 <script>
@@ -26,11 +33,15 @@ export default {
   },
   private: {
     bookinfo: {},
-    content: []
+    content: [],
+    showShortPop: false
   },
   onInit() {
     this.getChapters(this.bid, this.chapter_id)
     this.addShelf()
+    if (this.$app.$def.data.backClickCount === 0) {
+      this.showShortPop = true;
+    }
   },
   addShelf() {
     console.log("add shelf");

+ 26 - 31
src/views/Recharge/index.ux

@@ -2,38 +2,32 @@
  
 <template>
   <div class="recharge-record__wrap">
-    <div class="user-account__wrap">
-      <div class="title-bar">
-        <text class="border-bar"></text>
-        <text class="title">账户信息</text>
-      </div>
-      <div class="balance-bar">
-        <div class="balance">
-          <text>余额:</text>
-          <text class="balance-number">{{user.balance}}</text>
-          <text>书币</text>
-        </div>
-        <text class="pay-btn" @click="toPay">立即充值</text>
+    <div class="user-account__wrap" if="{{user}}">
+      <div class="account-blance">
+        <text class="blance-title">余额</text>
+        <text class="blance-info">{{user.balance}}书币</text>
       </div>
+      <text class="account-pay" @click="toPay">
+        去充值
+      </text>
     </div>
-    <div class="user-account__wrap recharge-list__wrap">
+
+    <div class=" recharge-list__wrap">
       <div class="title-bar">
-        <text class="border-bar"></text>
         <text class="title">充值订单</text>
       </div>
       <div class="recharge-list">
         <block for="{{rechargeList}}">
           <div class="recharge-item">
             <div class="item-info">
-              <text class="item-name">订单号:</text>
-              <text class="item-number">{{$item.trade_no}}</text>
+              <text class="item-number">订单号:{{$item.trade_no}}</text>
               <div class="item-pay">
                 <text>充值</text>
                 <text class="pay-number">{{$item.price}}</text>
                 <text>元</text>
               </div>
             </div>
-            <text class="item-status">{{$item.status==='UNPAID'?'未支付':'已支付'}}</text>
+            <text class="item-status {{$item.status==='UNPAID'?'':'paid'}}">{{$item.status==='UNPAID'?'未支付':'已支付'}}</text>
           </div>
         </block>
       </div>
@@ -48,10 +42,10 @@ import { rechargeApi, getUserInfo } from "../../api/index";
 export default {
   private: {
     rechargeList: [],
-    user:{},
-    page:{
-      total:0,
-      current:1
+    user: {},
+    page: {
+      total: 0,
+      current: 1
     },
     user: {},
   },
@@ -59,17 +53,18 @@ export default {
     this.getOrder();
     this.getUserInfo();
   },
-  async getUserInfo(){
-    let user =await getUserInfo();
-    this.user=user;
+  async getUserInfo() {
+    let user = await getUserInfo();
+    this.user = user;
+    console.log(this.user, 'rrrrrrrrrrr')
   },
-  async getOrder(page=1,page_size=10) {
-    let res= await rechargeApi({page:page,page_size});
-    let {list,meta}=res;
-    this.rechargeList=list;
-    this.page={
-      total:meta.last_page,
-      current:meta.current_page
+  async getOrder(page = 1, page_size = 10) {
+    let res = await rechargeApi({ page: page, page_size });
+    let { list, meta } = res;
+    this.rechargeList = list;
+    this.page = {
+      total: meta.last_page,
+      current: meta.current_page
     }
   },
   toPay() {