qiansailong 1 год назад
Родитель
Сommit
fa4e2eae4c
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      pages/index/index.js

+ 4 - 2
pages/index/index.js

@@ -1,7 +1,7 @@
 // index.js
 // index.js
 const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
 const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
 const testCover = '/assets/images/bg-book.png'
 const testCover = '/assets/images/bg-book.png'
-import { getBannerList, getCardNovels, getBrowsingHistory } from '../../api/api'
+import { getBannerList, getCardNovels, getBrowsingHistory, getNovelDetail } from '../../api/api'
 import { goToBookDetail } from '../../utils/util'
 import { goToBookDetail } from '../../utils/util'
 
 
 const app = getApp()
 const app = getApp()
@@ -59,7 +59,9 @@ Page({
 
 
     const bookId = parseInt(options.bookId);
     const bookId = parseInt(options.bookId);
     if (bookId) {
     if (bookId) {
-      goToBookDetail({ bookId })
+      getNovelDetail(bookId).then(res => {
+        goToBookDetail({ bookId, wxBookId: res.wxBookId })
+      })
     }
     }
   },
   },