ソースを参照

去除无用日志

zqwang 2 年 前
コミット
822570f66e

+ 0 - 1
src/app.ux

@@ -24,7 +24,6 @@ export default {
     it.shortcut.systemPromptEnabled = false;
     await it.shortcut.hasInstalled({
       success: (ret) => {
-        console.log("is installed:", ret);
         if (!ret) this.$def.data.backClickCount = 0;
         else this.$def.data.backClickCount = 1;
       }

+ 2 - 2
src/components/book/read_recom.ux

@@ -56,10 +56,10 @@ export default {
       }
     })
   }, getInfo(book) {
-    // return book.book_author + (book.book_end_satstu == 1 ? "·完结·" : "·连载·") + (book.book_word_count > 10000 ? (book.book_word_count / 10000).toFixed(2) + "万" : book.book_word_count) + "字";
+   
     return (book.book_end_satstu == 1 ? "完结·" : "连载·") + (book.book_word_count > 10000 ? (book.book_word_count / 10000).toFixed(2) + "万" : book.book_word_count) + "字";
   },changeBook(){
-    // console.log('点击自组件');
+
     this.$emit("addshort",{op:"change_book",is_close:false});
    
   },async clickRecommendBooks(bid){

+ 1 - 1
src/components/short/index.ux

@@ -45,7 +45,7 @@ export default {
 							});
 						},
 						fail: (code) => {
-							console.log(code);
+							
 							this.$emit("addshort", { installed: false, msg: code });
 						}
 					})

+ 3 - 3
src/views/Activity/index.ux

@@ -193,7 +193,7 @@ export default {
           })
         },
         cancel: function() {
-          console.log('取消绑定')
+         
         }
       })
     } else {
@@ -206,11 +206,11 @@ 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) {

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

@@ -74,20 +74,20 @@ export default {
         }
       ],
       success: function(data) {
-        console.log(data)
+        
         if (data.index == 0) {
-          console.log('开始注销---------')
+         
           logOff().then(res => {
             storage.delete({
               key: 'hasLogin',
               success: function(data) {
-                console.log('handling success')
+               
               }
             })
             storage.delete({
               key: 'loginPhone',
               success: function(data) {
-                console.log('handling success')
+                
               }
             })
 
@@ -100,7 +100,7 @@ export default {
         }
       },
       cancel: () => {
-        console.log('cancel')
+        
       }
     })
   }

+ 3 - 29
src/views/Catalog/index.ux

@@ -80,24 +80,6 @@ export default {
     if (clilck_work_wechat) {
       this.hasClickWorkWechat = true;
     }
-  
-
-    // let page = 1
-    // var chapter_sequence_index = 0
-    // if (this.chapter_sequence) {
-    //   var chapter_sequence = this.chapter_sequence
-    //   chapter_sequence_index = chapter_sequence % PER_PAGE_NUM - 1
-    //   this.chapter_sequence_index = chapter_sequence_index
-    //   page = Math.ceil(chapter_sequence / PER_PAGE_NUM)
-    // }
-    // this.startpage = page;
-    // getCatalog({ bid: this.bid, page: page, page_size: PER_PAGE_NUM }).then(r => {
-    //   this.list = r.list
-    //   this.meta = r.meta
-    //   setTimeout(() => {
-    //     this.$element('catalog').scrollTo({ index: chapter_sequence_index })
-    //   }, 500)
-    // })
   },
   onShow() {
     let page = 1
@@ -164,7 +146,7 @@ export default {
           }
         },
         cancel: function () {
-          console.log('取消前往')
+        
         }
       })
     } else {
@@ -189,11 +171,7 @@ export default {
       page_size: PER_PAGE_NUM
     }
     this.initCatalog(params)
-    // getCatalog({ bid: '5pNo6A7wqQmB1WgQygDjkOM9VZn2vXeY', page: this.meta.current_page + 1, page_size: PER_PAGE_NUM }).then(r => {
-    //   console.log(...r.list)
-    //   this.list.push(...r.list)
-    //   this.meta = r.meta
-    // })
+ 
   },
   loadPrev() {
     console.log('get prev catalog')
@@ -205,11 +183,7 @@ export default {
       page_size: PER_PAGE_NUM
     }
     this.initCatalog(params, true)
-    // getCatalog({ bid: '5pNo6A7wqQmB1WgQygDjkOM9VZn2vXeY', page: this.startpage - 1, page_size: PER_PAGE_NUM }).then(r => {
-    //   console.log(...r.list)
-    //   this.list.unshift(...r.list)
-    //   this.startpage = r.meta.current_page
-    // })
+    
   },
   initCatalog(params, isLoadPrev = false) {
     this.end = false

+ 0 - 2
src/views/Category/index.ux

@@ -116,7 +116,6 @@ export default {
   },
   async bookCategory() {
     this.category = this.initCategory(await bookCategory())
-    console.log("this.category:", this.category);
     await this.initChannel(this.category)
     this.getBooksList()
   },
@@ -130,7 +129,6 @@ export default {
         key: i
       }
     });
-    console.log("this.channel:", this.channel);
   },
   initCategory(category) {
     category.forEach(cate => {

+ 0 - 4
src/views/Detail/index.ux

@@ -113,7 +113,6 @@ export default {
     }
   },
   toRead(cid = "", needCharge = 0) {
-    console.log(cid)
     if (needCharge == 1) {
       this.chapter_sequence = needCharge
       router.push({
@@ -151,12 +150,9 @@ export default {
     this.similar = await getSimilarBooks(this.book.book_category_id, bid);
   },
   onShow() {
-    console.log("book bid", this.bid);
     this.booksInfo(this.bid);
   },
   async onInit() {
-    console.log("book bid", this.bid);
-    // this.booksInfo(this.bid);
     if (this.push_id) {
       await storage.set({ key: "push_id", value: this.push_id });
     }

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

@@ -73,7 +73,6 @@ export default {
         this.bid = info.bid;
         this.chapter_id = info.cid;
       }
-      // console.log(info);
     } catch (error) {
 
     }

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

@@ -35,7 +35,6 @@
       </div>
     </div>
     <stack>
-      <!-- <image src="../../assets/imgs/sign_show.png" class="sign-icon" @click="changeSignPop"> </image> -->
       <image
         src="../../assets/imgs/rukou.png"
         class="sign-icon"
@@ -229,18 +228,14 @@ export default {
     try {
       let { has_pend_task } = await hasPendingTask({ type: 'recharge' })
       this.isPendingTask = has_pend_task
-      console.log(this.isPendingTask, 'this.isPendingTask')
     } catch (err) {
-      console.lg(err)
     }
     if (hasInit) {
       this.$broadcast('refreshData', { current: this.current })
     }
     network.getType({
       success: data => {
-        // console.log(`handling success: ${data.type}`)
         this.networkStatus = data.type
-        // prompt.showToast({ message: `handling success: ${data.type}` })
       }
     })
     it.getShortCut(value => {

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

@@ -76,7 +76,6 @@ export default {
 		let sex = index ? "1" : "2";
 		let ret = await getRank(sex);
 		this.list = ret;
-		console.log(this.list)
 	}
 }
 </script>

+ 0 - 6
src/views/My/index.ux

@@ -233,24 +233,19 @@ export default {
           prompt.showToast({
             message: '退出成功'
           })
-          console.log(data)
           storage.delete({
             key: 'hasLogin',
             success: function(data) {
               self.getUser()
-              console.log('handling success')
             },
             fail: function(data, code) {
-              console.log(`handling fail, code = ${code}`)
             }
           })
           storage.delete({
             key: 'loginPhone',
             success: function(data) {
-              console.log('handling success')
             },
             fail: function(data, code) {
-              console.log(`handling fail, code = ${code}`)
             }
           })
         }
@@ -261,7 +256,6 @@ export default {
         })
       },
       fail: function(data, code) {
-        console.log(`handling fail, code = ${code}`)
       }
     })
   }

+ 0 - 20
src/views/Pay/index.ux

@@ -171,7 +171,6 @@ export default {
       fun()
       this.last = now
     } else {
-      console.log('间隔太短了')
     }
   },
   changePayType(type) {
@@ -230,7 +229,6 @@ export default {
           })
         },
         cancel: function() {
-          console.log('取消绑定')
         }
       })
     } else {
@@ -260,7 +258,6 @@ export default {
           })
         },
         cancel: function() {
-          console.log('取消绑定')
         }
       })
     } else {
@@ -335,7 +332,6 @@ export default {
         if (data.index === 0) this.checkOrder(order)
       },
       cancel: () => {
-        console.log('cancel')
       }
     })
 
@@ -352,7 +348,6 @@ export default {
         try {
           advertOrders(this.trade_no)
         } catch (e) {
-          console.log(e)
         }
         ;(msg = '支付成功!'), router.back()
         break
@@ -383,9 +378,7 @@ export default {
     try {
       let { has_pend_task } = await hasPendingTask({ type: 'recharge' })
       this.isPendingTask = has_pend_task
-      console.log(this.isPendingTask, 'this.isPendingTask')
     } catch (err) {
-      console.lg(err)
     }
     this.getUserInfo()
     if (this.need_check_order && this.pay_order_id) {
@@ -394,7 +387,6 @@ export default {
   },
   async checkOrderNew(order) {
     let fb = await checkWxOrder(order)
-    console.log('查询结果:', fb)
     if (fb && typeof fb === 'object') {
       this.showToastByCode('9000')
     } else {
@@ -402,7 +394,6 @@ export default {
     }
   },
   onHide() {
-    //this.$app.$def.createShortcut(true);
   },
   onBackPress() {
     if (this.pay_back && !this.pay_success) {
@@ -441,7 +432,6 @@ export default {
             }
           },
           cancel: function() {
-            console.log('取消前往')
           }
         })
       } else {
@@ -459,15 +449,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') {
           backPage = allPage[k]
@@ -477,7 +458,6 @@ export default {
     } catch (e) {
       backPage = {}
     }
-    console.log(backPage, backPage.length, typeof backPage)
     if (JSON.stringify(backPage) === '{}') {
       router.replace({ uri: '/views/Index' })
     } else {

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

@@ -208,7 +208,6 @@ export default {
     this.back_name = decodeURI(this.back_name)
     if (this.platform && (this.platform == 'tx_adq' || this.platform == 'tx_adq_new')) {
       if (this.back_url) {
-        // console.log('book_info',book_info);
         pkg.hasInstalled({
           package: this.back_pkg,
           success: data => {
@@ -220,7 +219,6 @@ export default {
             }
           },
           fail: function (data, code) {
-            console.log(data)
           },
           complete: data => {
 
@@ -229,12 +227,6 @@ export default {
       } 
 
     } 
-
-
-    /* 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); */
     await this.getChapters(this.bid, this.chapter_id);
     let setting = (await storage.get({ key: "readSetting" })).data;
     if (setting) {
@@ -265,7 +257,6 @@ export default {
     })
   },
   backToPak() {
-    console.log(12)
     router.push({
       uri: this.back_url
     })
@@ -356,7 +347,6 @@ export default {
     }
   },
   addShelf() {
-    console.log("add shelf");
     getIsonshelf({ bid: this.bid }).then(r => {
       r.is_on ? '' : addToShelfBooks({ bid: this.bid })
     })
@@ -372,29 +362,21 @@ export default {
   },
   getChapters(bid, chapter_id) {
     this.showtoast = true
-    console.log("router length:", router.getLength());
     getChapters({ bid: bid, chapter_id: chapter_id }).then(r => {
       this.force_add_desk_type = r.force_add_desk_type;
       this.force_add_work_wechat_type = r.force_add_work_wechat_type;
       this.workWechatUrl = r.force_add_work_wechat_url
       this.content = r.chapter_content.trim().split(/\n/)
       this.bookinfo = r;
-      // this.$element('list').scrollTo({ index: 0 })
       this.addShelf();
       this.showtoast = false
     }).catch(e => {
-      console.log('e code')
-      console.log(e.data)
-      console.log(e.data.code == '10016' || e.data.code == '10019')
       if (e.data.code == '10016' || e.data.code == '10019' || e.data.code == '10017') {
         chapterOrders({ bid: bid, chapter_id: chapter_id }).then(r => {
           this.content = r.chapter_content.trim().split(/\n/)
           this.bookinfo = r
           this.showtoast = false
-          // this.$element('list').scrollTo({ index: 0 })
         }).catch(f => {
-          console.log('f code')
-          console.log(f.data)
           this.showtoast = false
           if (f.data.code == '10014' || f.data.code == '10015' || f.data.code == '10016') {
             this.getChapters(bid, this.canReadecid)
@@ -436,7 +418,6 @@ export default {
   },
   getPrevChapter(evt) {
     evt.stopPropagation();
-    console.log("get prev chapter");
     if (this.bookinfo.prev_cid == 0) {
       return prompt.showToast({ message: '已经是第一章啦' });
     }
@@ -532,7 +513,6 @@ export default {
 
         },
         cancel: function () {
-          console.log('取消前往')
         },
       })
     } else {
@@ -546,12 +526,10 @@ export default {
       })
     }
 
-    // this.getChapters(this.bookinfo.bid, this.bookinfo.next_cid)
 
   },
   onBackPress() {
     this.backRouter();
-    // that.getLastPage();
     return true;
   }, async changeRecomEnd(data) {
     if (data.detail.op == "change_book") {
@@ -575,10 +553,6 @@ export default {
       await storage.set({ key: "last_recom_bid", value: this.last_recom_bid });
     }
 
-    // console.log(this.recom_list.length);
-    // if(this.recom_list.length == 3){
-    //   return true;
-    // }
 
   }, getLastPage() {
     let page = router.getState();

+ 0 - 4
src/views/Search/index.ux

@@ -179,7 +179,6 @@ export default {
 
 			},
 			cancel: function () {
-				console.log('取消前往')
 			},
 		})
 	},
@@ -198,7 +197,6 @@ export default {
 		}
 		let params = this.filter;
 		params.uid = this.uid;
-		console.log(params);
 		pageLoad(this.meta, booksList, params).then(ret => {
 			let newList = isLoad ? this.list : [];
 			let dataList = ret.list;
@@ -217,13 +215,11 @@ export default {
 						key: 'history',
 						value: JSON.stringify(this.historyList),
 						success: function (data) {
-							console.log('handling success')
 						},
 					})
 				}
 			}
 		}).catch(e => {
-			console.log("e", e);
 		})
 	},
 	onReachBottom() {

+ 0 - 2
src/views/Share/index.ux

@@ -50,10 +50,8 @@ export default {
             targetUrl: this.callback_url,
             platforms: ['WEIXIN_CIRCLE'],
             success: function (data) {
-                console.log('handling success')
             },
             fail: function (data, code) {
-                console.log(`handling fail, failMess=${data},code=${code}`)
             }
         })
     },

+ 0 - 2
src/views/Shelf/index.ux

@@ -175,8 +175,6 @@ export default {
     this.$watch('isDelMode', 'listenMode')
     this.$watch('tabindex', 'watchPropsChange')
     this.$on('refreshData', this.broadevt);
-    console.log("this.isInit:",this.isInit);
-    console.log("this.mocKList:",this.mockList);
   },
   watchPropsChange(newV, oldV) {
     if (newV == 0) {

+ 0 - 2
src/views/Task/index.ux

@@ -193,7 +193,6 @@ export default {
   async getTaskList() {
     //每次展示刷新当前任务
     let list = await userTaskList().catch(err => {
-      console.log(err)
     })
     let dayList = list.date_tasks
     let newList = list.new_user_tasks
@@ -272,7 +271,6 @@ export default {
                   })
               },
               fail: code => {
-                console.log(code)
               }
             })
           } else {

+ 0 - 5
src/views/Web/index.ux

@@ -27,19 +27,15 @@
     },
     onPageStart (evt) {
       this.isSupportWebRTC()
-      console.info(`### pagestart ### url: ${evt.url} canBack: ${ evt.canBack } canForward: ${ evt.canForward }`)
     },
     onPageFinish (evt) {
-      console.info(`### pagestart ### url: ${evt.url} canBack: ${ evt.canBack } canForward: ${ evt.canForward }`)
     },
     onTitleReceive (evt) {
       this.titleBarParams.config.title = evt.title
     },
     onError (evt) {
-      console.info(`### pageError ###`, evt)
     },
     onProgress (evt) {
-      console.info('progressValue: ' + evt.progress)
     },
     arrowLeftIcon () {
       this.isCanBack()
@@ -70,7 +66,6 @@
     isSupportWebRTC () {
       this.$element('web').isSupportWebRTC({
         callback: function (data){
-          console.log(`是否支持webrtc功能:${ data }`)
         }
       })
     }