XiaBx 3 vuotta sitten
vanhempi
commit
64cd925eb4

+ 5 - 0
index.html

@@ -3,6 +3,11 @@
   <head>
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" >
+    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
+    <meta name="x5-fullscreen" content="true">
+    <meta name="x5-page-mode" content="app">
+    <meta name="full-screen" content="yes">
+    <meta name="apple-mobile-web-app-capable" content="yes">
     <title>aaa</title>
   </head>
   <body>

+ 10 - 1
index.prod.html

@@ -4,6 +4,15 @@
 <head>
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
+  <meta name="application-name" content="追书云">
+  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
+  <meta name="x5-fullscreen" content="true">
+  <meta name="x5-page-mode" content="app">
+  <meta name="full-screen" content="yes">
+  <meta name="apple-mobile-web-app-capable" content="yes">
+ <!-- iPhone 678p startup image @3x-->
+ <link rel="apple-touch-icon-precomposed" sizes="152x152" href="//cdn-novel.iycdm.com/zsy_ios_app/static/152-152.png">
+
   <link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=">
   <script>window.errOptions || document.write('<script src="https://cdn-novel.iycdm.com/static/errOptions.js"><\/script>')</script>
   <script>window.Vue || document.write('<script src="https://cdn-novel.iycdm.com/static/vue.min.js"><\/script>')</script>
@@ -23,7 +32,7 @@
       mta.src = "https://pingjs.qq.com/h5/stats.js?v2.0.2";
       mta.setAttribute("name", "MTAH5");
       mta.setAttribute("sid", "500633040");
-      var s = document.getElementsByTagName("script")[0];
+      var s = document.getElementsByTagName("script")[0];  
       s.parentNode.insertBefore(mta, s);
     })();
   </script>

+ 10 - 6
src/App.vue

@@ -13,7 +13,7 @@
       <img @click.stop="closeWrap" :src="imgs" alt="" />
     </div>
     <div class="package-wrap" @touchmove.prevent v-if="showAd">
-      <div class="close-btn" @click="showAd = false">关闭</div>
+      <!-- <div class="close-btn" @click="showAd = false">关闭</div> -->
       <img
         src="https://cdn-novel.iycdm.com/zsy_ios_app/user_privacy/20220221155858.png"
         width="100%"
@@ -40,7 +40,7 @@ export default {
       showRed: window.options.fission,
       redImage: require("./assets/red_package.png"),
       imgs: null,
-      showAd: true,
+      showAd: false,
       showWrap: false,
       // todayDate: new Date().toLocaleDateString(),
       isTargetChannel: window.options.is_show_ad_frame,
@@ -61,11 +61,15 @@ export default {
       this.theme = site_gender === "male" ? "boy" : "girl";
     } else this.theme = "girl";
     this.initWrap();
-    setTimeout(() => {
-      this.showAd = false;
-    }, 3000);
 
-    //goLogin().then(res=>{console.log('库哈哈哈')})
+    //sessionSotrage判断展示加桌提醒图
+    const showBanner = sessionStorage.getItem("showBanner");
+    //获取是否加桌过
+    const { is_add_desk } = window.options;
+    if (!showBanner && !is_add_desk && !window.navigator.standalone) {
+      this.showAd = true;
+      sessionStorage.setItem("showBanner", true);
+    }
   },
   methods: {
     closeWrap() {

+ 13 - 7
src/api/axios.js

@@ -2,7 +2,8 @@ import axios from "axios";
 import router from "../router/index.js";
 import { Undertheshelf } from "../view/namespace.js";
 import { undefinedCollect } from "./index.js";
-import { getToken,refreshToken } from "./config";
+import { getToken, refreshToken } from "./config";
+import { Toast } from "mint-ui";
 // var instance = axios.create(
 //   process.env.NODE_ENV === "development"
 //     ? {
@@ -23,9 +24,14 @@ instance.interceptors.response.use(async function(res) {
   if (res.data.code === 0) {
     return res.data.data;
   }
-  if (res.data.code === 10001 || res.data.code === 10023 || res.data.code === 10035) {
+  if (
+    res.data.code === 10001 ||
+    res.data.code === 10023 ||
+    res.data.code === 10035
+  ) {
+    Toast("重新登录中");
     await refreshToken();
-
+    return axios(res.config);
   }
   if (res.data.code === 10018) {
     router.replace(Undertheshelf.route);
@@ -34,12 +40,12 @@ instance.interceptors.response.use(async function(res) {
   }
 });
 instance.interceptors.request.use(async function(config) {
-  let  token;
+  let token = localStorage.getItem("token");
   if (!whiteList.includes(config.url) && !token) {
-    token = await getToken();
+    token = await getToken(config);
   }
-  if(token){
-    config.headers.Authorization = `bearer ${token}`
+  if (token) {
+    config.headers.Authorization = `bearer ${token}`;
   }
   if (
     config.method === "get" &&

+ 11 - 9
src/api/config.js

@@ -1,16 +1,12 @@
 import { userLogin } from "./index";
 
-export async function getToken() {
-
-  return localStorage.getItem("token") || (await login());
+export async function getToken(config) {
+  return  login();
 }
 
-export async function refreshToken() {
-  localStorage.removeItem("token");
-  await getToken();
-}
 
 export async function login() {
+  console.log("我还在登录中");
   const signKey = "a!A&AFRWT65Nb3NlklezUiqHyQAA@Z8M";
   const timestamp = parseInt(new Date().valueOf() / 1000);
   let data = {
@@ -19,8 +15,14 @@ export async function login() {
   let ret = await userLogin(data);
   if (ret) {
     localStorage.setItem("token", ret.token);
-    return ret.data;
+    return Promise.resolve(ret.token);
   } else {
-    return "";
+    return Promise.reject("false");
   }
 }
+
+
+export async function refreshToken() {
+  localStorage.removeItem("token");
+  await getToken();
+}

+ 11 - 7
src/api/index.js

@@ -251,7 +251,6 @@ let content = new cache({
 });
 
 export function getContent(bid, cid, adStatus = 0, from, code = "") {
-  console.log(from);
   let url = options.adTargetId
     ? `/books/${bid}/chapters/${cid}?ad_status=${adStatus}&page_from=${from}&code=${encodeURIComponent(
         code
@@ -578,12 +577,7 @@ export function getWxConfig(url) {
   return axios.post("/weixin/jsSdkConfig", { url });
 }
 
-// 获取要展示的banner数组
-export function getMergeBanner() {
-  let { crm_public } = window.options;
-  if (crm_public) return axios(crm_public.url);
-  else return Promise.reject("");
-}
+
 
 // 个人中心客服
 export function getCustomQRCode(distribution_channel_id, openid) {
@@ -620,3 +614,13 @@ export function userLogin(data) {
 export function bindUserPhone(data) {
   return axios.post("/bindphone/bind", data);
 }
+
+//获取中间页数据
+export function getYun(id){
+  return axios(`/yun/${id}`,);
+}
+
+//获取最近阅读记录
+export function getRecentReader(){
+  return axios(`readrecord/getLastRead`,);
+}

+ 3 - 3
src/components/reader/text.vue

@@ -29,7 +29,7 @@
            class="x-reader-text x-reader-text--vertical"
            ref="vertical"
            @tap="verticalTap"
-           @touchend.native.prevent
+           @touchend.native
            :style="[bgStyle,fontStyle]">
     <slot name="top"></slot>
     <div class="x-reader-text-name x-reader-text-name__new"
@@ -40,10 +40,10 @@
                  :style="shelfStyle"
                  v-if="!shelf"
                  @tap="emit('addShelf')">加入书架</v-touch>
-        <v-touch v-if="text.name"
+        <!-- <v-touch v-if="text.name"
                  tag="span"
                  class="complaints"
-                 @tap="toReport">投诉</v-touch>
+                 @tap="toReport">投诉</v-touch> -->
       </p>
     </div>
     <x-vertical-menu :gift="gift"

+ 4 - 4
src/components/reader/vertical-menu.vue

@@ -41,17 +41,17 @@
       </v-touch>
     </div>
     <div class="x-reader__operator--other">
-      <v-touch @tap="toXiYue">
+      <!-- <v-touch @tap="toXiYue">
         <img src="../../assets/xiyue_entry.png"
              alt=""
              class="x-reader-xiyue-entry"
              v-if="is_xiyue_enable">
-      </v-touch>
-      <v-touch @tap="emit('show-gift')">
+      </v-touch> -->
+     <!--  <v-touch @tap="emit('show-gift')">
         <img src="./imgs/send_gift.png"
              class="x-reader-send-gift"
              v-if="gift">
-      </v-touch>
+      </v-touch> -->
     </div>
   </div>
 </template>

+ 4 - 0
src/router/index.js

@@ -40,6 +40,7 @@ const Undertheshelf = () => import("../view/under-the-shelf.vue");
 const HelpPayQrcode = () => import("../view/help-pay-qrcode.vue");
 const HelpPay = () => import("../view/help-pay.vue");
 const BookShare = () => import("../view/book-share.vue");
+const PhoneBind = () => import("../view/phone-bind.vue");
 const HelpShareQrcode = () => import("../view/help-share-qrcode.vue");
 const Report = () => import("../view/report-page.vue");
 const PhoneBinding = () => import("../view/phone-binding.vue");
@@ -50,6 +51,7 @@ const BookLimitFree = () => import("../view/book-limit-free.vue");
 const Coupon = () => import("../view/my_coupon.vue");
 const Login = () => import("../view/Login.vue");
 const Useragreement = () => import("../view/Useragreement.vue");
+const Yun = ()=> import('../view/yun.vue')
 // import test from '../view/test.vue'
 
 Vue.use(Router);
@@ -108,6 +110,8 @@ const router = new Router({
     [namespace.RecordSend, RecordSend],
     [namespace.Undertheshelf, Undertheshelf],
     [namespace.Sign, Sign],
+    [namespace.Yun,Yun],
+    [namespace.PhoneBind,PhoneBind],
     [namespace.Coupon, Coupon],
     [namespace.Login, Login],
     [namespace.Useragreement, Useragreement],

+ 0 - 3
src/view/Privacypolicy.vue

@@ -9,9 +9,6 @@ export default {
   name: "XReaderText",
 
   mounted() {
-    console.log(this.$GoLogin);
-    console.log(this.$Indicator);
-    console.log(this.$Toast);
   },
   methods: {
     show() {

+ 3 - 28
src/view/book-detail.vue

@@ -42,7 +42,7 @@
     </x-book>
     <div class="book-detail-intro">
       <span @click="debug">{{
-        extended ? book.intro : book.intro.slice(0, 110)
+        extended ? book.book_summary : book.book_summary.slice(0, 110)
       }}</span>
       <v-touch
         class="book-detail-extend"
@@ -147,8 +147,8 @@ export default {
     },
     init() {
       this.book = book;
-      console.log(this.book.cover);
-      this.extended = book.intro.length < 110;
+      console.log(this.book.cover_url);
+      this.extended = book.book_summary.length < 110;
       this.test = true;
       getSimilar(book.book_id, book.book_category_id).then(r => {
         this.recommend = r;
@@ -181,31 +181,6 @@ export default {
   watch: {
     $route(to) {
       this.init(to.query.id);
-    },
-    book(b) {
-      // 和喜悦相关的分享
-      const xiyue_config = window.options.xiyue_info;
-      const is_leyue_site = !!~location.href.indexOf(".leyuee");
-      console.log("is leyuee site:", is_leyue_site);
-      if (xiyue_config && is_leyue_site) {
-        let book = this.book;
-        let redirect_url = `${location.origin}/reader?bid=${book.book_id}&cid=${book.first_cid}`;
-        let configuration = {
-          // config: newt.share_config,
-          book: {
-            cover_url: book.cover_url,
-            book_summary: book.book_summary,
-            book_name: book.book_name
-          },
-          link:
-            xiyue_config.register_url +
-            "?openid=" +
-            xiyue_config.openid +
-            "&redirect=" +
-            encodeURIComponent(redirect_url)
-        };
-        useWxConfig(wx, configuration);
-      }
     }
   },
   created() {

+ 19 - 0
src/view/namespace.js

@@ -280,3 +280,22 @@ export const BookLimitFree = {
   route: { name: "BookLimitFree" },
   path: "/book-limit-free"
 };
+
+
+export const PhoneBind = {
+  name: "PhoneBind",
+  meta: {
+    Chinese: "书籍详情"
+  },
+  route: { name: "PhoneBind" },
+  path: "/phonebind"
+};
+
+export const Yun = {
+  name: "Yun",
+  meta: {
+    Chinese: "中转路由"
+  },
+  route: { name: "Yun" },
+  path: "/yun/:id"
+};

+ 6 - 186
src/view/pay.vue

@@ -85,23 +85,7 @@
             </div>
           </div>
         </div>
-
-        <template v-if="show_month_order_entry">
-          <div
-            class="pay-product__item pay-product__month"
-            @click="chooseMonthOrder"
-          >
-            <img
-              :src="
-                isMonthOrder
-                  ? show_month_order_entry.focus_img
-                  : show_month_order_entry.unfocus_img
-              "
-              alt=""
-            />
-          </div>
-        </template>
-        <ul class="pay-product">
+        <ul class="pay-product" style="margin-bottom: 1.4rem">
           <!-- <v-touch :class="['pay-product__item',{'is-active': i === selectedProduct, 'is-recommend': i === defaultProduct }]"
                   v-for="(v,i) in product"
                   :key="v.product_id"
@@ -165,7 +149,6 @@
                     <span class="text" v-else><i class="is_year"></i></span>
                     <span>{{ v.save_text }}</span>
                   </p>
-                  <!-- <p class="pay-product__gift">赠送价值{{calcGiftPrice(v.gift)}}书币的礼物道具</p> -->
                 </v-touch>
               </template>
               <!-- <template v-else>
@@ -271,7 +254,6 @@
                   <p class="item-tag" v-if="v.angle_sign_text">
                     {{ v.angle_sign_text }}
                   </p>
-                  <!-- <p class="pay-product__gift">赠送价值{{calcGiftPrice(v.gift)}}书币的礼物道具</p> -->
                 </v-touch>
               </template>
             </template>
@@ -293,25 +275,7 @@
           选择充值金额
           <span class="red">(1元=100书币)</span>
         </div>
-        <!-- <i class="pay-for__gift--txt" v-if="giftPrice"><i @click="see">查看礼物道具详情&gt;</i></p> -->
-        <!-- <p class="pay-for__gift--txt"
-           v-if="giftPrice">充值赠送价值{{giftPrice}}书币的礼物道具 <i @click="see">点击查看&gt;</i></p> -->
-        <div class="gift-fixed__wrap" v-if="giftPrice">
-          <p class="gift-title__text">赠送价值{{ giftPrice }}书币的礼物道具</p>
-          <div class="gift-preview">
-            <span class="title">获赠道具详情</span>
-            <div class="preview-wrap">
-              <span
-                class="gift-preview__item"
-                v-for="(g, i) in giftList"
-                :key="i"
-              >
-                <img :src="g.icon" :alt="g.name_desc" />
-                <i>{{ g.name_desc }}x{{ g.num }}</i>
-              </span>
-            </div>
-          </div>
-        </div>
+
         <template v-if="showPayYearBanner || showSpecialPayTempalte">
           <div class="pay-btn-box">
             <div class="pay-btn" @click="pay">立即充值</div>
@@ -453,12 +417,9 @@ import {
   subscribeByRMB,
   recharge,
   getUserInfo,
-  isMonthOrderSuc,
   getOrderCoupon
 } from "../api";
 
-import { PayForGift } from "../components/prompt";
-
 export default {
   name: Pay.name,
   data() {
@@ -484,9 +445,7 @@ export default {
       year_item_bg_check: require("../assets/year_charge_check.jpg"),
       mi_wan_year_bg: require("../assets/mi_wan_year.jpg"),
       mi_wan_year_bg_check: require("../assets/mi_wan_year_check.jpg"),
-      month_order_bg: require("../assets/month_order_1.png"),
-      month_order_bg_check: require("../assets/month_order_check.png"),
-      show_month_order_entry: window.options.month_order_info,
+
       xiyue_pay_template: window.options.xiyue_info,
       isMonthOrder: false,
       isXYEntrySelect: false,
@@ -496,7 +455,7 @@ export default {
       availdCouponList: [],
       popupVisible: false,
       payType: [
-        { name: "微信", img: require("../assets/wechat.png"), nickName: "wx" },
+        { name: "微信", img: require("../assets/wechat.png"), nickName: "wx" }
         /* {
           name: "支付宝",
           img: require("../assets/alipay.png"),
@@ -511,23 +470,10 @@ export default {
     };
   },
   computed: {
-    giftList() {
-      const { product, selectedProduct } = this;
-      return selectedProduct && product.length
-        ? product[selectedProduct].gift
-        : [];
-    },
-    giftPrice() {
-      return this.giftList.reduce((a, b) => {
-        return a + b.cost * b.num;
-      }, 0);
-    },
     chargePrice() {
       let select_pro = this.product[this.selectedProduct];
       let normal_value = select_pro ? select_pro.price : "0";
-      let special_value = this.isMonthOrder
-        ? this.show_month_order_entry.price
-        : normal_value;
+      let special_value = normal_value;
       return Number(special_value.replace("元", ""));
     }
   },
@@ -560,7 +506,6 @@ export default {
     },
     selectProduct(i) {
       this.selectedProduct = i;
-      this.isMonthOrder = false;
       this.isXYEntrySelect = false;
       this.xiyue_pay_btn_text = "立即充值";
       this.getAvaildCoupon(
@@ -568,16 +513,13 @@ export default {
       );
     },
     pay() {
-      if (this.isMonthOrder) {
-        this.toMonthOrder();
-      } else {
         recharge({
           product_id: this.product[this.selectedProduct].product_id,
           bid: this.$route.query.book_id,
           cid: this.$route.query.chapter_id,
           use_coupon: this.currentCoupon.id
         });
-      }
+     
     },
     payForYear() {
       let product_id = this.product[this.product.length - 1].product_id;
@@ -597,31 +539,6 @@ export default {
       window.location.href = `${window.location.origin +
         window.options.appad_url}`;
     },
-    see() {
-      PayForGift({ list: this.giftList });
-    },
-    calcGiftPrice(list) {
-      return list.reduce((a, b) => {
-        return a + b.cost * b.num;
-      }, 0);
-    },
-    toMonthOrder() {
-      const origin = window.location.origin;
-      const href = window.location.href;
-      // const r = origin + "/monthpay/wait?r=" + encodeURIComponent(href);
-      location.href =
-        this.show_month_order_entry.link +
-        `&use_coupon=${this.currentCoupon.id}`;
-    },
-    chooseMonthOrder() {
-      this.selectedProduct = null;
-      this.isMonthOrder = true;
-      this.defaultProduct = null;
-      console.log("我被选中了");
-      this.getAvaildCoupon(
-        Number(window.options.month_order_info.price.replace("元", ""))
-      );
-    },
     //获取当前金额的可用优惠券
     getAvaildCoupon(price) {
       this.currentCoupon = { id: "", price: 0 };
@@ -630,28 +547,6 @@ export default {
         item => item.use_condition < price
       );
     },
-    findMonthOrder() {
-      this.$Indicator.open("查询订单中...请稍等");
-      let time = 0;
-      this.timer = setInterval(() => {
-        if (time === 10) {
-          this.$Indicator.close();
-          window.clearInterval(this.timer);
-          this.$Toast("订单可能延迟几分钟,稍后到个人中心查看或联系客服");
-          return;
-        }
-        isMonthOrderSuc()
-          .then(_ => {
-            this.$Indicator.close();
-            window.clearInterval(this.timer);
-            this.$Toast("包月订购成功!");
-          })
-          .catch(e => {
-            time++;
-            console.log(e, "continue");
-          });
-      }, 1000);
-    },
     chooseXiYueEntry() {
       this.selectedProduct = null;
       this.isXYEntrySelect = true;
@@ -693,9 +588,6 @@ export default {
           if (p.first_charge) {
             this.cheaperProduct = i;
           }
-          if (this.show_month_order_entry) {
-            this.chooseMonthOrder();
-          }
 
           if (this.xiyue_pay_template) {
             this.chooseXiYueEntry();
@@ -709,9 +601,6 @@ export default {
     });
     //用户优惠券
 
-    // 是否包月回调
-    const { from_wxpay } = this.$route.query;
-    if (from_wxpay) this.findMonthOrder();
   }
 };
 </script>
@@ -763,73 +652,4 @@ export default {
     box-shadow: none;
   }
 }
-
-.gift-fixed__wrap {
-  position: fixed;
-  bottom: 1.2rem;
-  max-height: 1.1rem;
-  left: 0;
-  right: 0;
-  background: #f7f7f7;
-  padding: 0.22rem 0.24rem;
-
-  .gift-title__text {
-    color: #ef5952;
-    font-size: 0.26rem;
-    font-weight: bold;
-
-    &.text-align {
-      text-align: center;
-    }
-  }
-
-  .gift-preview {
-    font-size: 0.24rem;
-    display: flex;
-    justify-content: flex-start;
-    align-items: center;
-    // overflow: auto;
-    // -webkit-overflow-scrolling: touch;
-
-    .title {
-      flex-basis: 2rem;
-      flex-shrink: 0;
-      white-space: nowrap;
-      color: #333;
-    }
-
-    .preview-wrap {
-      flex: 1;
-      display: flex;
-      overflow: auto;
-      -webkit-overflow-scrolling: touch;
-
-      &::-webkit-scrollbar {
-        display: none;
-      }
-    }
-
-    .gift-preview__item {
-      font-size: 0;
-      flex-shrink: 0;
-      white-space: nowrap;
-      display: flex;
-
-      i {
-        font-size: 0.22rem;
-        color: #666;
-        font-style: normal;
-      }
-
-      &:not(:last-child) {
-        margin-right: 0.18rem;
-      }
-    }
-
-    img {
-      width: 0.34rem;
-      height: 0.34rem;
-    }
-  }
-}
 </style>

+ 11 - 69
src/view/person.vue

@@ -8,9 +8,7 @@
         <img v-else src="../assets/个人中心-默认头像.png" />
       </div>
       <div class="person-info__username">
-        <span v-if="user.nickname"
-          >{{ user.nickname }}<span>手机号:11111</span>span></span
-        ><span v-else>书友</span>
+        <span>书友 <span v-if="user.bind_phone">{{user.bind_phone.replace(/^(\d{3})\d{4}(\d+)/,"$1****$2")}}</span> </span>
       </div>
       <div class="person-info__id">
         ID:{{ user.id }}
@@ -33,45 +31,12 @@
     </div>
     <hr />
     <div class="person-entry__wrap">
-      <img
-        src="https://cdn-novel.iycdm.com/h5/20191025_vip.jpg"
-        @click="toBuyVip"
-        class="person-entry__buyvip"
-        v-if="!user.is_vip && showBuyVip"
-      />
-      <template v-if="user.is_vip">
-        <div class="person-entry__vip">
-          <img class="person-entry__icon" src="../assets/我是包年图标.png" />
-          <!-- <span class="person-entry__text">包年有效期</span> -->
-          <span class="person-entry__text">免费阅读卡</span>
-          <span>还剩余{{ user.vip_days }}</span>
-        </div>
-        <hr />
-      </template>
-      <template v-if="user.is_all_life">
-        <div class="person-entry__vip">
-          <img class="person-entry__icon" src="../assets/我是包年图标.png" />
-          <span class="person-entry__text">包年有效期</span>
-          <span>终身免费</span>
-        </div>
-        <hr />
-      </template>
-      <template v-if="xiyue_pay_template">
-        <div class="person-entry__server">
-          <img
-            class="person-entry__icon"
-            src="../assets/xiyue-person__entry.png"
-          />
-          <span @click="toXiYue" class="person-entry__text">我的微书店</span>
-          <img class="person-entry__arrow" src="../assets/个人中心-进入.png" />
-        </div>
-        <hr />
-      </template>
+
       <router-link class="person-entry_login" :to="Login" tag="div">
         <img class="login-icon" src="../assets/login.png" />
         <div class="login-text">登录绑定</div>
-        <div class="login-notify" v-if="1">绑定手机号防止数据丢失</div>
-        <!-- <div class="login-notify">手机号13****11111</div> -->
+        <div class="login-notify" v-show="!user.bind_phone">绑定手机号防止数据丢失</div>
+       <div class="login-notify" v-show="user.bind_phone" @click.stop="changePhone">已绑定手机号,点击换绑</div>
         <div>
           <img class="person-login_arrow" src="../assets/个人中心-进入.png" />
         </div>
@@ -114,29 +79,6 @@
         <img class="person-entry__arrow" src="../assets/个人中心-进入.png" />
       </div>
       <hr />
-      <template v-if="!!user.is_paid">
-        <div class="person-entry__binding" @click="toBind">
-          <img src="../assets/binding.png" alt class="person-entry__icon" />
-          <span class="person-entry__text">绑定手机</span>
-          <template v-if="!!user.bind">
-            <span
-              :class="['binding-text', { 'binding-text__binded': !!user.bind }]"
-              >已绑定</span
-            >
-          </template>
-          <template v-else>
-            <span class="binding-text">
-              绑定即得
-              <i>100</i>书币
-            </span>
-            <img
-              class="person-entry__arrow"
-              src="../assets/个人中心-进入.png"
-            />
-          </template>
-        </div>
-        <hr />
-      </template>
       <div class="person-entry__server">
         <img class="person-entry__icon" src="../assets/个人中心-客服.png" />
         <span @click="Server" class="person-entry__text">联系客服</span>
@@ -144,7 +86,7 @@
       </div>
       <hr />
     </div>
-    <p class="clear-cache" @click="onClear">清除缓存</p>
+   <!--  <p class="clear-cache" @click="onClear">清除缓存</p> -->
   </div>
 </template>
 <script>
@@ -174,9 +116,7 @@ export default {
       RecordSign: RecordSign.route,
       Coupon: Coupon.route,
       Login: Login.route,
-      xiyue_pay_template: window.options.xiyue_info,
       user: {},
-      showBuyVip: window.options && window.options.hidden_personal_page_vip != 1
     };
   },
   methods: {
@@ -188,11 +128,10 @@ export default {
       this.$router.push('/login');
     },
     toSignPage() {
-      location.href = "/sign";
-    },
-    toXiYue() {
-      location.href = this.xiyue_pay_template.xiyue_index_page;
+      const token = localStorage.getItem('token')
+      location.href = `/sign?token=${token}`;
     },
+
     toBuyVip() {
       location.href = "/sale/customvip";
     },
@@ -208,6 +147,9 @@ export default {
     },
     onClear() {
       location.href = "/reLogin";
+    },
+    changePhone(){
+      this.$router.push(`/phonebind?phone=${this.user.bind_phone}`)
     }
   },
   created() {

+ 46 - 0
src/view/phone-bind.vue

@@ -0,0 +1,46 @@
+<template>
+  <div>
+    <x-header>更换绑定</x-header>
+    <div class="bind-tap">
+      <p class="tips">手机号已经绑定</p>
+      <p class="current-phone">当前手机号{{ phone }}</p>
+      <mt-button type="primary" class="btn" @click="changePhone">更换手机号</mt-button>
+    </div>
+  </div>
+</template>
+<script>
+import { PhoneBind } from "./namespace.js";
+export default {
+  name: PhoneBind.name,
+  data() {
+    return {
+      phone: ""
+    };
+  },
+  mounted() {
+    const { phone } = this.$route.query;
+    if (phone) this.phone = phone.replace(/^(\d{3})\d{4}(\d+)/,"$1****$2");
+  },
+  methods: {
+      changePhone(){
+          this.$router.replace('/login')
+      } 
+  }
+};
+</script>
+<style lang="scss" scoped>
+.bind-tap {
+  padding: 0.4rem 0.3rem;
+  .tips {
+    font-size: 0.4rem;
+    font-weight: bold;
+  }
+  .current-phone{
+      margin-top: .2rem;
+  }
+  .btn {
+      width: 100%;
+      margin-top: .4rem;
+  }
+}
+</style>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 63 - 948
src/view/reader.vue


+ 33 - 0
src/view/yun.vue

@@ -0,0 +1,33 @@
+<template>
+  <div class="record record--sign"></div>
+</template>
+
+<script>
+import { Yun } from "./namespace";
+import { getYun } from "../api";
+export default {
+  name: Yun.name,
+  data() {
+    return {};
+  },
+  created() {
+    if (this.$route.params.id) {
+      this.getYun();
+    } else {
+      this.$router.replace("/");
+    }
+  },
+  methods: {
+    getYun() {
+      getYun(this.$route.params.id).then(res => {
+        const { bid, cid } = res;
+        if (bid === 0) {
+          this.$router.replace("/");
+        } else {
+          this.$router.replace(`/reader?yun=1&bid=${bid}&cid=${cid}`);
+        }
+      });
+    }
+  }
+};
+</script>