|
@@ -10,7 +10,8 @@
|
|
|
<div class="navBar" v-if="info">
|
|
|
<div class="navBar-left">
|
|
|
<a class="goback" @click="$router.go(-1)"
|
|
|
- ><i class="el-icon-arrow-left"></i>{{ info.study_phase_name }}版</a
|
|
|
+ ><i class="el-icon-arrow-left"></i
|
|
|
+ >{{ info.study_phase_name ? info.study_phase_name + "版" : "" }}</a
|
|
|
>
|
|
|
<div class="border"></div>
|
|
|
<p>{{ info.name || info.iss_name }}</p>
|
|
@@ -61,8 +62,10 @@
|
|
|
<span>优惠价</span>
|
|
|
<span class="OPPOSans"
|
|
|
>¥{{
|
|
|
- info.hasOwnProperty("price_discount") ||
|
|
|
- info.hasOwnProperty("iss_price_sell")
|
|
|
+ info.price_discount_content_item_total
|
|
|
+ ? info.price_discount_content_item_total
|
|
|
+ : info.hasOwnProperty("price_discount") ||
|
|
|
+ info.hasOwnProperty("iss_price_sell")
|
|
|
? info.price_discount || info.iss_price_sell
|
|
|
: info.price || info.iss_price_org | cutMoneyFiter
|
|
|
}}</span
|
|
@@ -73,9 +76,15 @@
|
|
|
(info.hasOwnProperty('price_discount') &&
|
|
|
info.price_discount !== info.price) ||
|
|
|
(info.hasOwnProperty('iss_price_sell') &&
|
|
|
- info.iss_price_sell !== info.iss_price_org)
|
|
|
+ info.iss_price_sell !== info.iss_price_org) ||
|
|
|
+ info.price_discount_content_item_total !==
|
|
|
+ info.price_content_item_total
|
|
|
"
|
|
|
- >¥{{ info.price || info.iss_price_org | cutMoneyFiter }}</span
|
|
|
+ >¥{{
|
|
|
+ info.price_content_item_total ||
|
|
|
+ info.price ||
|
|
|
+ info.iss_price_org | cutMoneyFiter
|
|
|
+ }}</span
|
|
|
>
|
|
|
</div>
|
|
|
<span class="sales-right" v-if="sales >= 1000"
|
|
@@ -162,17 +171,60 @@
|
|
|
<span>{{ info.study_phase_name }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="info-box" v-if="bookType === 'zhuanji'">
|
|
|
+ <div class="info-item">
|
|
|
+ <label>出版社</label>
|
|
|
+ <span>{{
|
|
|
+ info.vendor_name ? info.vendor_name : "中国日报社"
|
|
|
+ }}</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="info-item">
|
|
|
+ <label>学段</label>
|
|
|
+ <span>{{ info.study_phase_name }}</span>
|
|
|
+ </div>
|
|
|
+ <!-- <div class="info-item">
|
|
|
+ <label>字数</label>
|
|
|
+ <span>78291</span>
|
|
|
+ </div> -->
|
|
|
+ <div class="info-item">
|
|
|
+ <label>发行时间</label>
|
|
|
+ <span>{{ info.release_date }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="info-item">
|
|
|
+ <label>语种</label>
|
|
|
+ <span>中英双语</span>
|
|
|
+ </div>
|
|
|
+ <div class="info-item" style="width: 100%">
|
|
|
+ <label>期数</label>
|
|
|
+ <span>{{ itemContentStr }} </span>
|
|
|
+ </div>
|
|
|
+ <!-- <div class="info-item">
|
|
|
+ <label>版本</label>
|
|
|
+ <span>基础版</span>
|
|
|
+ </div> -->
|
|
|
+ </div>
|
|
|
<div class="btn-box">
|
|
|
- <a class="continue" v-if="isBuy === 'true'" @click="handleLink"
|
|
|
- >继续学习</a
|
|
|
- >
|
|
|
- <template v-else>
|
|
|
+ <template v-if="bookType === 'zhuanji' && isBuy === 'false'">
|
|
|
<a
|
|
|
class="el-button"
|
|
|
@click="handleChangeWay('wei')"
|
|
|
:loading="createOrderLoading"
|
|
|
>立即购买</a
|
|
|
>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <a class="continue" v-if="isBuy === 'true'" @click="handleLink"
|
|
|
+ >继续学习</a
|
|
|
+ >
|
|
|
+ <template v-else>
|
|
|
+ <a
|
|
|
+ class="el-button"
|
|
|
+ @click="handleChangeWay('wei')"
|
|
|
+ :loading="createOrderLoading"
|
|
|
+ >立即购买</a
|
|
|
+ >
|
|
|
+ </template>
|
|
|
<!-- <a class="upgrade" @click="handleChangeWay('dui')">使用兑换码</a> -->
|
|
|
<a
|
|
|
class="upgrade"
|
|
@@ -234,6 +286,14 @@
|
|
|
>
|
|
|
</course-list>
|
|
|
</el-tab-pane>
|
|
|
+ <el-tab-pane label="内容" v-if="bookType === 'zhuanji'">
|
|
|
+ <BookCard
|
|
|
+ :item="item"
|
|
|
+ class="item"
|
|
|
+ v-for="(item, index) in itemList"
|
|
|
+ :key="index + 'todayNew'"
|
|
|
+ />
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<div class="banner-box-close" v-if="bannerFlag">
|
|
|
<a v-if="1 == 2" href="#" target="_blank">
|
|
@@ -632,12 +692,33 @@ export default {
|
|
|
issueChnList: [],
|
|
|
order_amount: null,
|
|
|
createOrderLoading: false,
|
|
|
+ studyObj: {
|
|
|
+ 1: "学前",
|
|
|
+ 11: "小学",
|
|
|
+ 20: "初中",
|
|
|
+ 21: "初一",
|
|
|
+ 22: "初二",
|
|
|
+ 23: "初三",
|
|
|
+ 30: "高中",
|
|
|
+ 31: "高一",
|
|
|
+ 32: "高二",
|
|
|
+ 33: "高三",
|
|
|
+ 100: "全学段",
|
|
|
+ },
|
|
|
+ itemList: [],
|
|
|
+ itemContentStr: "",
|
|
|
};
|
|
|
},
|
|
|
//计算属性 类似于data概念
|
|
|
computed: {},
|
|
|
//监控data中数据变化
|
|
|
- watch: {},
|
|
|
+ watch: {
|
|
|
+ $route(to, from) {
|
|
|
+ if (to.query.id) {
|
|
|
+ window.location.reload();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
// 分享
|
|
@@ -691,6 +772,11 @@ export default {
|
|
|
data = {
|
|
|
id: this.id,
|
|
|
};
|
|
|
+ } else if (this.bookType === "zhuanji") {
|
|
|
+ MethodName = "/ShopServer/Client/AlbumQuery/GetAlbumInfo";
|
|
|
+ data = {
|
|
|
+ id: this.id,
|
|
|
+ };
|
|
|
}
|
|
|
getLogin(MethodName, data)
|
|
|
.then((res) => {
|
|
@@ -708,6 +794,9 @@ export default {
|
|
|
) {
|
|
|
this.info = res.data;
|
|
|
this.issueChnList = res.data.chn_art_data;
|
|
|
+ } else if (this.bookType === "zhuanji") {
|
|
|
+ this.info = res.album;
|
|
|
+ this.info.study_phase_name = this.studyObj[res.album.study_phase];
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -721,6 +810,8 @@ export default {
|
|
|
? 2
|
|
|
: this.bookType === "huakan"
|
|
|
? 4
|
|
|
+ : this.bookType === "zhuanji"
|
|
|
+ ? 20
|
|
|
: null,
|
|
|
goods_id: this.id,
|
|
|
})
|
|
@@ -836,6 +927,8 @@ export default {
|
|
|
? 2
|
|
|
: this.bookType === "huakan"
|
|
|
? 4
|
|
|
+ : this.bookType === "zhuanji"
|
|
|
+ ? 20
|
|
|
: null,
|
|
|
goods_id_list: [this.id],
|
|
|
pay_type:
|
|
@@ -876,7 +969,7 @@ export default {
|
|
|
this.headerBorder +
|
|
|
"&&&" +
|
|
|
this.headerBg;
|
|
|
- if (this.bookType === "baozhi") {
|
|
|
+ if (this.bookType === "baozhi" || this.info.goods_type === 2) {
|
|
|
let articleId = "";
|
|
|
if (this.info.last_read_art_id) {
|
|
|
articleId = this.info.last_read_art_id;
|
|
@@ -912,7 +1005,24 @@ export default {
|
|
|
iss_id: this.$route.query.id,
|
|
|
},
|
|
|
});
|
|
|
- } else if (this.bookType === "huakan") {
|
|
|
+ } else if (this.bookType === "huakan" || this.info.goods_type === 4) {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/magazineDetail",
|
|
|
+ query: {
|
|
|
+ headerConfig: encodeURIComponent(url),
|
|
|
+ iss_id: this.$route.query.id,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ } else if (this.info.goods_type === 3) {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/bookPeruseItem",
|
|
|
+ query: {
|
|
|
+ headerConfig: encodeURIComponent(url),
|
|
|
+ cardType: "jingdu",
|
|
|
+ id: this.$route.query.id,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ } else if (this.bookType === "huakan" || this.info.goods_type === 4) {
|
|
|
this.$router.push({
|
|
|
path: "/magazineDetail",
|
|
|
query: {
|
|
@@ -943,6 +1053,29 @@ export default {
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
+ // 专辑列表
|
|
|
+ getIssList() {
|
|
|
+ let MethodName =
|
|
|
+ "/ShopServer/Client/AlbumQuery/PageQueryAlbumContentItemList";
|
|
|
+ let data = {
|
|
|
+ album_id: this.id,
|
|
|
+ page_capacity: 50,
|
|
|
+ cur_page: 1,
|
|
|
+ };
|
|
|
+ getLogin(MethodName, data)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.status === 1) {
|
|
|
+ res.content_item_list.forEach((item) => {
|
|
|
+ item.type = item.goods_type;
|
|
|
+ });
|
|
|
+ this.itemList = res.content_item_list;
|
|
|
+ this.itemContentStr = res.content_item_list
|
|
|
+ .map((item) => item.name)
|
|
|
+ .join(", ");
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
@@ -958,6 +1091,9 @@ export default {
|
|
|
if (this.$route.query.paywei) {
|
|
|
this.handleOrder();
|
|
|
}
|
|
|
+ if (this.bookType === "zhuanji") {
|
|
|
+ this.getIssList();
|
|
|
+ }
|
|
|
},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {},
|
|
@@ -1231,6 +1367,21 @@ export default {
|
|
|
text-decoration: line-through;
|
|
|
}
|
|
|
}
|
|
|
+.item {
|
|
|
+ width: 200px;
|
|
|
+ flex-shrink: 0;
|
|
|
+ border-radius: 8px;
|
|
|
+ overflow: hidden;
|
|
|
+ background: #ffffff;
|
|
|
+ &:hover {
|
|
|
+ box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.1);
|
|
|
+ }
|
|
|
+}
|
|
|
+:deep .el-tab-pane {
|
|
|
+ display: flex;
|
|
|
+ gap: 24px 36px;
|
|
|
+ flex-flow: wrap;
|
|
|
+}
|
|
|
</style>
|
|
|
<style lang="scss">
|
|
|
.bookItem {
|