Commit abb53a01 authored by mengcuiguang's avatar mengcuiguang

修改投放小说

parent 8fd218ca
...@@ -10,6 +10,14 @@ function getCategorys(callback) { ...@@ -10,6 +10,14 @@ function getCategorys(callback) {
}) })
} }
function getFirstShow(callback) {
apiPOST({
url: "/book/firstArticle",
callback
})
}
module.exports = { module.exports = {
getCategorys getCategorys,
getFirstShow
} }
\ No newline at end of file
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
gotoBookContentPage gotoBookContentPage
} from '../../common/services/page-route' } from '../../common/services/page-route'
import { import {
getCategorys getCategorys,
getFirstShow
} from "./services/index.js" } from "./services/index.js"
import { import {
isEmpty isEmpty
...@@ -92,17 +93,8 @@ ...@@ -92,17 +93,8 @@
}, },
methods: { methods: {
show() { show() {
setTimeout(() => {
// 匹配用户直接跳转小说 this.getFirstShowData();
var bookId = uni.getStorageSync('firstBookId')
if (bookId != '') {
gotoBookContentPage(bookId);
uni.setStorage({
key: 'firstBookId',
data: ''
});
}
}, 800);
this.getCategoryData(); this.getCategoryData();
if (wx.setVisualEffectOnCapture) { if (wx.setVisualEffectOnCapture) {
...@@ -122,6 +114,19 @@ ...@@ -122,6 +114,19 @@
this.initHeight() this.initHeight()
}, 300) }, 300)
}, },
getFirstShowData(){
getFirstShow((success, data) => {
if (success) {
setTimeout(() => {
// 匹配用户直接跳转小说
if (data.articleMsg != null) {
gotoBookContentPage(data.articleMsg.id);
}
}, 800);
}
})
},
getCategoryData() { getCategoryData() {
getCategorys((success, data) => { getCategorys((success, data) => {
if (success) { if (success) {
......
...@@ -69,16 +69,6 @@ ...@@ -69,16 +69,6 @@
}); });
} }
// app.globalData.userId = data.idcode;
// uni.setStorage({
// key: 'token',
// data: 'D6E76AC8E89ABE548B56568B8814D578D6980EAB68926EB1E7C07BF9E96A316F5F433703067DF5142735505C42F58997'
// });
// setTimeout(() => {
// redirectTo('home');
// }, 1000);
// return
tt.login({ tt.login({
force: true, force: true,
success(res) { success(res) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment