Commit abb53a01 authored by mengcuiguang's avatar mengcuiguang

修改投放小说

parent 8fd218ca
......@@ -10,6 +10,14 @@ function getCategorys(callback) {
})
}
function getFirstShow(callback) {
apiPOST({
url: "/book/firstArticle",
callback
})
}
module.exports = {
getCategorys
getCategorys,
getFirstShow
}
\ No newline at end of file
......@@ -29,7 +29,8 @@
gotoBookContentPage
} from '../../common/services/page-route'
import {
getCategorys
getCategorys,
getFirstShow
} from "./services/index.js"
import {
isEmpty
......@@ -92,17 +93,8 @@
},
methods: {
show() {
setTimeout(() => {
// 匹配用户直接跳转小说
var bookId = uni.getStorageSync('firstBookId')
if (bookId != '') {
gotoBookContentPage(bookId);
uni.setStorage({
key: 'firstBookId',
data: ''
});
}
}, 800);
this.getFirstShowData();
this.getCategoryData();
if (wx.setVisualEffectOnCapture) {
......@@ -121,6 +113,19 @@
setTimeout(() => {
this.initHeight()
}, 300)
},
getFirstShowData(){
getFirstShow((success, data) => {
if (success) {
setTimeout(() => {
// 匹配用户直接跳转小说
if (data.articleMsg != null) {
gotoBookContentPage(data.articleMsg.id);
}
}, 800);
}
})
},
getCategoryData() {
getCategorys((success, data) => {
......
......@@ -67,17 +67,7 @@
key: 'firstBookId',
data: bookId
});
}
// app.globalData.userId = data.idcode;
// uni.setStorage({
// key: 'token',
// data: 'D6E76AC8E89ABE548B56568B8814D578D6980EAB68926EB1E7C07BF9E96A316F5F433703067DF5142735505C42F58997'
// });
// setTimeout(() => {
// redirectTo('home');
// }, 1000);
// return
}
tt.login({
force: true,
......
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