Преглед изворни кода

Merge branch 'shouyue' of iqiyoo:zhuishuyun_quickapp_front into shouyue

wangzq пре 2 година
родитељ
комит
3520314560

BIN
src/assets/imgs/logo.png


BIN
src/assets/imgs/user_login.png


BIN
src/assets/imgs/user_logo.png


BIN
src/assets/imgs/white_shelf.png


+ 18 - 0
src/assets/less/shelf.less

@@ -111,9 +111,27 @@
         height: 900px;
         align-items: center;
         justify-content: center;
+        flex-direction: column;
+        text{
+          font-size: 32px;
+          color: #333333;
+        }
         image {
           width: 500px;
         }
+        .add_book{
+          width: 400px;
+          height: 70px;
+          background-color: #FFA614;
+          border-radius: 30px;
+          align-items: center;
+          justify-content: center;
+          margin-top: 35px;
+          text {
+            font-size: 32px;
+            color: white;
+          }
+        }
       }
       .type-bar {
         background-color: #fff;

+ 3 - 3
src/components/yinsi/policy.ux

@@ -4,10 +4,10 @@
         <text
           style="font-weight: 400;margin-top: 40px;text-indent:60px;margin-left: 20px;margin-right: 20px"
           >欢迎使用{{app_name}}~你需要阅读并同意<a
-            style="color: #61A9C0;"
+            style="color: #79BA70;"
             @click="gotoPrivacy"
             >《隐私政策》</a
-          >和<a style="color: #61A9C0;" @click="gotoRouter">《用户协议》</a
+          >和<a style="color: #79BA70" @click="gotoRouter">《用户协议》</a
           >方可使用{{app_name}}提供的阅读服务,是否同意?</text
         >
 
@@ -78,7 +78,7 @@ export default {
   height: 80px;
   text-align: center;
   border-bottom-right-radius: 30px;
-  background-color: #61A9C0;;
+  background-color: #79BA70;
   color: white;
 }
 .cancel {

+ 1 - 14
src/views/Activity/index.ux

@@ -161,7 +161,6 @@ export default {
     this.currentProduct = this.activity.products[0]
   },
   wantCharge() {
-    // console.log("this.send_order_id",this.send_order_id,"this.haslogin",this.haslogin,'this,loginphone',this.loginPhone);
     if (!(this.send_order_id || (this.haslogin && this.loginPhone))) {
       prompt.showDialog({
         title: '友情提示',
@@ -178,7 +177,6 @@ export default {
           })
         },
         cancel: function() {
-          console.log('取消绑定')
         }
       })
     }else{
@@ -191,11 +189,9 @@ export default {
     this.haslogin = (await storage.get({ key: 'hasLogin' })).data
     let userinfo = await getUserInfo()
     if(userinfo){
-      console.log('userinfo',userinfo);
       this.send_order_id = userinfo.send_order_id;
     }
    }catch(e){
-    //  console.log('11111111111111',e);
    }
   },
   chooseItem(product, idx) {
@@ -259,16 +255,13 @@ export default {
       }
     }, 2000)
   },async onShow() {
-    // console.log('11111111111111111111111-onshow');
      await this.getUserInfo();
     if(this.need_check_order && this.pay_order_id){
         this.checkOrderNew(this.pay_order_id);
     }
   },async checkOrderNew(order){
-      console.log("需要查询订单",order);
       // this.showLoading = true;
       let fb = await checkWxOrder(order);
-      // console.log('查询结果:',fb);
       //  this.showToastByCode('9000')
       if (fb && typeof fb === 'object'){
         this.showToastByCode('9000')
@@ -286,7 +279,7 @@ export default {
          try{
             advertOrders(this.trade_no);
           }catch(e){
-            console.log(e);
+
           }
          msg = '支付成功!'
         break
@@ -332,11 +325,9 @@ export default {
         if (data.index === 0) this.checkOrder(order)
       },
       cancel: () => {
-        console.log('cancel')
       }
     })
   },onBackPress(){
-    // console.log(this.pay_success,this.pay_success);
     if (!this.pay_success) {
         let taht = this;
         prompt.showDialog({
@@ -362,7 +353,6 @@ export default {
             }
           },
           cancel: function() {
-            console.log('取消前往')
           }
         })
         return true;
@@ -375,7 +365,6 @@ export default {
       try{
         let page = router.getState();
         let allPage = router.getPages();
-        // console.log('page = ',page,'all pages',allPage,'length',allPage.length);
         for(var k = allPage.length -1; k >=  0;k--){
           if(allPage[k].name != page.name && allPage[k].name != "views/Phone" && allPage[k].name != "views/Pay"){
             backPage = allPage[k];
@@ -384,9 +373,7 @@ export default {
         }
       } catch(e){
         backPage = {};
-        // console.log('back err',e);
       }
-      // console.log(backPage,backPage.length,typeof backPage);
       if(JSON.stringify(backPage) === '{}'){
          router.replace({ uri: "/views/Index" });
       }else{

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

@@ -210,7 +210,6 @@ export default {
     })
   },
   toMyRead(evt) {
-    console.log(evt.detail.count)
   },
   async onShow() {
     const hasInit = this.$app.getAppData('hasInit')

+ 15 - 6
src/views/Shelf/index.ux

@@ -5,7 +5,7 @@
     <div class="shelf_title">
       <text>书架</text>
     </div>
-    <div if="{{Object.keys(firstBook).length > 0}}" @click="toReader(firstBook)" class="book_detail">
+    <div v-if="isNull" if="{{Object.keys(firstBook).length > 0}}" @click="toReader(firstBook)" class="book_detail">
       <div class="image-recommend">
         <image src="../../assets/imgs/recommend-book.png"></image>
       </div>
@@ -48,8 +48,12 @@
         </div>
         <div if="{{mockList.length<=0 && isinit}}" class="blank_img">
           <image
-            src="https://cdn-novel.iycdm.com/quickapp/activity/white_shelf.png"
+            src="../../assets/imgs/white_shelf.png"
           ></image>
+          <text>书架空空如也</text>
+          <div class="add_book" @click="toCategory">
+            <text>去添加</text>
+          </div>
         </div>
         <block if="current === 0">
           <div class="shelf-books__wrap">
@@ -162,15 +166,17 @@ export default {
           index: 1
         }
       ],
-      firstBook:{}
+      firstBook:{},
+      isNull: false
     }
   },
   onInit() {
-    console.log('tabindex:', this.tabindex)
     this.getUserShelfBooks();
     this.$watch('isDelMode', 'listenMode')
     this.$watch('tabindex', 'watchPropsChange')
-    this.$on('refreshData', this.broadevt)
+    this.$on('refreshData', this.broadevt);
+    console.log("this.isInit:",this.isInit);
+    console.log("this.mocKList:",this.mockList);
   },
   watchPropsChange(newV, oldV) {
     if (newV == 0) {
@@ -197,6 +203,8 @@ export default {
       if(this.booksize > 0){
         this.firstBook = r[0];
         this.firstBook.subtext = this.firstBook.author+"·"+(this.firstBook.status ==0 ? "连载·":"完结·")+(this.firstBook.size < 10000 ? this.firstBook.size : (this.firstBook.size/10000).toFixed(2)+"万");
+      }else{
+      this.firstBook = {};
       }
       this.mockList = r
       this.isinit = true
@@ -204,7 +212,8 @@ export default {
   },
   deleteBook(book) {
     deleteShelfBook({ bid: book.book_id }).then(r => {
-      this.getUserShelfBooks(true)
+      this.getUserShelfBooks(true);
+      Object.keys(this.firstBook) === 0 ? this.isNull = true : this.isNull = false;
     });
   },
   changeMode() {