|
@@ -75,13 +75,14 @@
|
|
|
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
+
|
|
<script>
|
|
<script>
|
|
import prompt from '@system.prompt';
|
|
import prompt from '@system.prompt';
|
|
import router from "@system.router";
|
|
import router from "@system.router";
|
|
import storage from '@system.storage';
|
|
import storage from '@system.storage';
|
|
import pkg from '@system.package'
|
|
import pkg from '@system.package'
|
|
import it from "../../helper/interface.js";
|
|
import it from "../../helper/interface.js";
|
|
-import { getChapters, getIsonshelf, postUserShelfBooks, chapterOrders, userAddDsktop } from "../../api";
|
|
|
|
|
|
+import { getChapters, getIsonshelf, postUserShelfBooks, chapterOrders, userAddDsktop,noAdvBookInfo, recommendBooks,advReplaceBookInfo} from "../../api";
|
|
import { getAppConfig } from '../../api/utils.js';
|
|
import { getAppConfig } from '../../api/utils.js';
|
|
let getConfig;
|
|
let getConfig;
|
|
export default {
|
|
export default {
|
|
@@ -92,6 +93,7 @@ export default {
|
|
public: {
|
|
public: {
|
|
bid: '',
|
|
bid: '',
|
|
tx_bid:"",
|
|
tx_bid:"",
|
|
|
|
+ ad_bid:"",
|
|
chapter_id: '',
|
|
chapter_id: '',
|
|
send_order_id: "",
|
|
send_order_id: "",
|
|
push_id: "",
|
|
push_id: "",
|
|
@@ -194,6 +196,21 @@ export default {
|
|
if (this.push_id) {
|
|
if (this.push_id) {
|
|
await storage.set({ key: "push_id", value: this.push_id });
|
|
await storage.set({ key: "push_id", value: this.push_id });
|
|
}
|
|
}
|
|
|
|
+ if (this.send_order_id) {
|
|
|
|
+ this.ad_bid = this.bid;
|
|
|
|
+ await storage.set({ key: "currue_ad_bid", value: this.bid });
|
|
|
|
+ await storage.set({ key: "send_order_id", value: this.send_order_id });
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ let send_order_id = (await storage.get({ key: "send_order_id" })).data;
|
|
|
|
+ if (send_order_id) this.send_order_id = send_order_id;
|
|
|
|
+ let ad_bid = (await storage.get({ key: "currue_ad_bid" })).data;
|
|
|
|
+ if(ad_bid){
|
|
|
|
+ this.ad_bid = ad_bid;
|
|
|
|
+ }else{
|
|
|
|
+ this.ad_bid = "";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.back_name = decodeURI(this.back_name)
|
|
this.back_name = decodeURI(this.back_name)
|
|
if (this.platform && (this.platform == 'tx_adq' || this.platform == 'tx_adq_new')) {
|
|
if (this.platform && (this.platform == 'tx_adq' || this.platform == 'tx_adq_new')) {
|
|
if (this.back_url) {
|
|
if (this.back_url) {
|
|
@@ -225,7 +242,18 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ }else{
|
|
|
|
+ // 如果书籍id为派单书籍id则检测是否需要替换书籍
|
|
|
|
+ if(this.send_order_id > 0 && this.ad_bid == this.bid){
|
|
|
|
+ let realBook = await advReplaceBookInfo(this.send_order_id);
|
|
|
|
+ // let realBook = {};
|
|
|
|
+ if(realBook && realBook.bid && realBook.bid && realBook.cid){
|
|
|
|
+ this.bid = realBook.bid;
|
|
|
|
+ this.chapter_id = realBook.cid;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
/* let s = (await storage.get({ key: "send_order_id" })).data;
|
|
/* let s = (await storage.get({ key: "send_order_id" })).data;
|
|
console.log("save send_order_id in storage");
|
|
console.log("save send_order_id in storage");
|
|
console.log("send_order_id", this.send_order_id);
|
|
console.log("send_order_id", this.send_order_id);
|
|
@@ -246,12 +274,12 @@ export default {
|
|
this.reader_banner = reader_banner;
|
|
this.reader_banner = reader_banner;
|
|
let { sign_out_reader_show } = await getConfig('add_desk_alert');
|
|
let { sign_out_reader_show } = await getConfig('add_desk_alert');
|
|
this.back_reader = sign_out_reader_show;
|
|
this.back_reader = sign_out_reader_show;
|
|
|
|
+ this.getRecomList();
|
|
userAddDsktop(this.$app.$def.data.backClickCount).then(res => {
|
|
userAddDsktop(this.$app.$def.data.backClickCount).then(res => {
|
|
//TODO 加桌后统计上报
|
|
//TODO 加桌后统计上报
|
|
}).catch(r => {
|
|
}).catch(r => {
|
|
//TODO 失败后统计上报
|
|
//TODO 失败后统计上报
|
|
});
|
|
});
|
|
- this.getRecomList();
|
|
|
|
},
|
|
},
|
|
goActivity(item) {
|
|
goActivity(item) {
|
|
router.push({
|
|
router.push({
|
|
@@ -266,7 +294,6 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
backRouter() {
|
|
backRouter() {
|
|
- this.back_reader = 1;
|
|
|
|
if (this.back_reader == 1) {
|
|
if (this.back_reader == 1) {
|
|
it.backCreateShortCut(res => {
|
|
it.backCreateShortCut(res => {
|
|
if (res == 'back') {
|
|
if (res == 'back') {
|
|
@@ -462,7 +489,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
goNext() {
|
|
goNext() {
|
|
- let self = this;
|
|
|
|
|
|
+ let self =this;
|
|
if (this.bookinfo.next_cid == 0) {
|
|
if (this.bookinfo.next_cid == 0) {
|
|
router.push({
|
|
router.push({
|
|
uri: "/views/Raderover",
|
|
uri: "/views/Raderover",
|
|
@@ -589,8 +616,9 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
<style lang="less">
|
|
@import '../../assets/less/reader.less';
|
|
@import '../../assets/less/reader.less';
|
|
-</style>
|
|
|
|
|
|
+</style>
|