|
@@ -19,14 +19,30 @@ export class tools {
|
|
public static getCurPlatform(){
|
|
public static getCurPlatform(){
|
|
return tools.platform
|
|
return tools.platform
|
|
}
|
|
}
|
|
-
|
|
|
|
- public static setNavigationBar() {
|
|
|
|
- if(tools.getCurPlatform()==config.Platform.TOUTIAO) {
|
|
|
|
- uni.setNavigationBarTitle({
|
|
|
|
- title:'卿卿小屋'
|
|
|
|
|
|
+
|
|
|
|
+ // 进入书详情
|
|
|
|
+ public static gotoBookdetails(book_id:number, cb:Function=null) {
|
|
|
|
+ if(book_id) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url:'/pages/bookdetails/bookdetails?book_id='+book_id,
|
|
|
|
+ success: () => {
|
|
|
|
+ cb && cb()
|
|
|
|
+ }
|
|
})
|
|
})
|
|
|
|
+ } else {
|
|
|
|
+ log.Error('书详情id错误')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // 添加书架
|
|
|
|
+ public static addBookshelf(book_id:number) {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 删除书架
|
|
|
|
+ public static deleteBookshelf(book_list:number[]) {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
public static getChapterList(chapter_path:string,cb:Function){
|
|
public static getChapterList(chapter_path:string,cb:Function){
|
|
http.StaticRequest(chapter_path,(err,data)=>{
|
|
http.StaticRequest(chapter_path,(err,data)=>{
|