|
@@ -476,6 +476,7 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.popup()
|
|
|
+ console.log('接受的参数',this.$route.query)
|
|
|
},
|
|
|
methods: {
|
|
|
changeCoupon() {
|
|
@@ -513,7 +514,7 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
popup() {
|
|
|
- const from_detail_catalog = this.$route.query.from_detail_catalog; //判断是否是从详情页BookDetail or 目录BookCatalog 跳转到页面 1详情页 2目录
|
|
|
+ const from_detail_catalog = this.$route.query.from_detail_catalog; //判断是否是从详情页BookDetail or 目录BookCatalog 跳转到页面 1详情页 2目录 3阅读页
|
|
|
const last_bid = this.$route.query.last_bid; //如果是从上一页跳转,获取上一页bid和cid,跳转到上一页
|
|
|
const last_cid = this.$route.query.last_cid;
|
|
|
const bid = this.$route.query.bid;
|
|
@@ -534,24 +535,23 @@ export default {
|
|
|
}).then(action => {
|
|
|
if (action === "confirm") {
|
|
|
if (bid && cid){
|
|
|
- from_detail_catalog === '2' ? console.log('11') : console.log('nono')
|
|
|
- from_detail_catalog === '1' ?
|
|
|
- this.$router.replace({ // 跳回书籍详情页
|
|
|
- name: BookDetail.name,
|
|
|
- query: {
|
|
|
- id: bid
|
|
|
- }
|
|
|
- }) : ( from_detail_catalog === '2' ?
|
|
|
+ if(from_detail_catalog === '1'){
|
|
|
+ this.$router.replace({ // 跳回书籍详情页
|
|
|
+ name: BookDetail.name,
|
|
|
+ query: {
|
|
|
+ id: bid
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else if (from_detail_catalog === '2') {
|
|
|
this.$router.replace({ // 跳回目录
|
|
|
- name: BookCatalog.name,
|
|
|
- query: {
|
|
|
- id: bid,
|
|
|
- sequence,
|
|
|
- yun
|
|
|
- }
|
|
|
- })
|
|
|
- :
|
|
|
- // console.log('跳回上一章',Reader.name)
|
|
|
+ name: BookCatalog.name,
|
|
|
+ query: {
|
|
|
+ id: bid,
|
|
|
+ sequence,
|
|
|
+ yun
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else {
|
|
|
this.$router.replace({ // 跳回上一章
|
|
|
name: Reader.name,
|
|
|
query: {
|
|
@@ -561,7 +561,7 @@ export default {
|
|
|
yun,
|
|
|
}
|
|
|
})
|
|
|
- )
|
|
|
+ }
|
|
|
}else {
|
|
|
this.$router.replace({ // 跳回个人中心
|
|
|
name: Person.name,
|