|
@@ -9,7 +9,7 @@
|
|
|
<div class="navBar-left">
|
|
|
<a class="goback" @click="$router.go(-1)"><i class="el-icon-arrow-left"></i>主页</a>
|
|
|
<div class="border"></div>
|
|
|
- <p>{{info.name}}</p>
|
|
|
+ <p>{{bookType==='jingdu'?'二十一世纪英文报·精读课堂':'二十一世纪英文报'}}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="main-top" v-if="info">
|
|
@@ -18,28 +18,28 @@
|
|
|
<!-- <el-carousel-item v-for="(item1, index) in data.imgList" :key="index"> -->
|
|
|
<el-image
|
|
|
class="image"
|
|
|
- :src="info.cover_image_url?info.cover_image_url:bookType==='baozhi'?require('../../assets/baozhi'+(Math.floor(Math.random()*2)+1)+'.png'):require('../../assets/kecheng'+(Math.floor(Math.random()*3)+1)+'.png')"
|
|
|
- :fit="'cover'">
|
|
|
+ :src="bookType==='jingdu'?require('../../assets/cover-order-jingdu.png'):require('../../assets/cover-order-'+studyType+'.png')"
|
|
|
+ :fit="'contain'">
|
|
|
</el-image>
|
|
|
<!-- </el-carousel-item> -->
|
|
|
</el-carousel>
|
|
|
- <div class="book-info-right">
|
|
|
- <h1 class="title">{{info.name}}</h1>
|
|
|
+ <div class="book-info-right" v-loading="loading">
|
|
|
+ <h1 class="title">{{bookType==='jingdu'?'Teens 精读课堂('+studyTypeName+')':'《二十一世纪学生英文报》'}}</h1>
|
|
|
<!-- <b class="org">{{data.org}}</b><span class="date">2023.07.01-2023.07.21</span> -->
|
|
|
<div class="sales-box">
|
|
|
<div class="sales-left">
|
|
|
<span>订阅价格</span>
|
|
|
- <span class="OPPOSans">¥{{info.price_discount?info.price_discount:info.price|cutMoneyFiter}}</span>
|
|
|
- <span class="old-price" v-if="info.price_discount&&info.price_discount!==info.price">¥{{info.price|cutMoneyFiter}}</span>
|
|
|
+ <span class="OPPOSans">¥{{info.price_reservation|cutMoneyFiter}}</span>
|
|
|
+ <!-- <span class="old-price" v-if="info.price_discount&&info.price_discount!==info.price">¥{{info.price|cutMoneyFiter}}</span> -->
|
|
|
<b>元 / 期</b>
|
|
|
</div>
|
|
|
<span class="sales-right" v-if="sales>=1000">累计订阅 {{salesCn}}</span>
|
|
|
</div>
|
|
|
- <div class="label-box">
|
|
|
+ <!-- <div class="label-box">
|
|
|
<label v-for="(itemL,indexL) in info.label_name_list" :key="indexL" :style="{background:tagBg[indexL%3],color:tagColor[indexL%3]}">
|
|
|
{{ '# ' + itemL }}
|
|
|
</label>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<!-- <div class="book-describe">
|
|
|
<h2 class="title">{{data.describe.title}}</h2>
|
|
|
<span class="author">{{'BY '+data.describe.author}}</span>
|
|
@@ -48,27 +48,32 @@
|
|
|
<div class="info-box">
|
|
|
<div class="info-item">
|
|
|
<label>适合年龄</label>
|
|
|
- <span>{{info.org_name}}</span>
|
|
|
+ <span>{{info.issue_info.age_desc}}</span>
|
|
|
</div>
|
|
|
<div class="info-item">
|
|
|
<label>期刊页数</label>
|
|
|
- <span>78291</span>
|
|
|
- <el-tooltip placement="right">
|
|
|
+ <span>{{info.issue_info.page_count_desc}}</span>
|
|
|
+ <el-tooltip placement="right" v-if="bookType==='baozhi'">
|
|
|
<div slot="content">双刊、特辑、寒暑假合刊除外</div>
|
|
|
<el-button class="tooltip-btn"><svg-icon icon-class="icon-mark"></svg-icon></el-button>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
<div class="info-item">
|
|
|
<label>出版周期</label>
|
|
|
- <span>2023-05-15</span>
|
|
|
+ <span>{{info.issue_info.period_desc}}</span>
|
|
|
</div>
|
|
|
<div class="info-item">
|
|
|
<label>期刊定价</label>
|
|
|
- <span>中英双语</span>
|
|
|
+ <span v-if="bookType==='baozhi'">{{info.issue_info.price}}元/期</span>
|
|
|
+ <span v-else-if="bookType==='jingdu'">{{info.issue_info.price}}元/年</span>
|
|
|
+ <el-tooltip placement="right" v-if="bookType==='baozhi'">
|
|
|
+ <div slot="content">双刊、特辑、寒暑假合刊除外</div>
|
|
|
+ <el-button class="tooltip-btn"><svg-icon icon-class="icon-mark"></svg-icon></el-button>
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
- <div class="info-item">
|
|
|
+ <div class="info-item" style="width:100%;">
|
|
|
<label>主办单位</label>
|
|
|
- <span>815 期</span>
|
|
|
+ <span>{{info.issue_info.organizer}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="info-box order-box">
|
|
@@ -76,7 +81,7 @@
|
|
|
<label>订阅学段</label>
|
|
|
<div class="order-content">
|
|
|
<ul>
|
|
|
- <li v-for="item in $studyType" :key="item.study_phase" :class="[studyType===item.study_phase?'active':'']" @click="studyType=item.study_phase">
|
|
|
+ <li v-for="item in $studyType" :key="item.study_phase" :class="[studyType===item.study_phase?'active':'']" @click="changeStudy(item)">
|
|
|
{{item.study_phase_name}}
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -86,38 +91,34 @@
|
|
|
<label>订阅期数</label>
|
|
|
<div class="order-content">
|
|
|
<ul>
|
|
|
- <li v-for="item in orderList" :key="item.value" :class="[orderTotalNumber===item.value?'active':'']" @click="orderTotalNumber=item.value">
|
|
|
+ <li v-for="item in orderList" :key="item.value" :class="[orderTotalNumber===item.value?'active':'']" @click="changeOrderNumber(item)">
|
|
|
{{item.label}}
|
|
|
</li>
|
|
|
<el-tooltip placement="right" style="height:32px">
|
|
|
- <div slot="content">一次性订阅:<br/>
|
|
|
- 5 期 9 折 <br/>
|
|
|
- 10 期 8 折<br/>
|
|
|
- 20 期 6 折<br/>
|
|
|
- 40 期 5 折</div>
|
|
|
+ <div slot="content" v-html="rules"></div>
|
|
|
<el-button class="tooltip-btn"><svg-icon icon-class="icon-mark"></svg-icon></el-button>
|
|
|
</el-tooltip>
|
|
|
</ul>
|
|
|
- <div v-if="orderTotalNumber===-1" class="custom-box">
|
|
|
+ <div v-if="orderTotalNumber===-1&&info.issue_no_school_year_list.length>0" class="custom-box">
|
|
|
<div class="custom-box-top">
|
|
|
- <h5>{{custonList[customPage].title}}</h5>
|
|
|
+ <h5>{{info.issue_no_school_year_list[customPage].year_begin +'-'+info.issue_no_school_year_list[customPage].year_end +' 学年'}}</h5>
|
|
|
<div class="btn-box">
|
|
|
- <a><i class="el-icon-arrow-left"></i></a>
|
|
|
- <a><i class="el-icon-arrow-right"></i></a>
|
|
|
+ <a @click="changeCustomPage('-')"><i class="el-icon-arrow-left"></i></a>
|
|
|
+ <a @click="changeCustomPage('+')"><i class="el-icon-arrow-right"></i></a>
|
|
|
</div>
|
|
|
</div>
|
|
|
<ul class="custom-box-bottom">
|
|
|
- <li v-for="(itemc,indexc) in custonList[customPage].list" :key="indexc" :style="{width:itemc.width?itemc.width*52+'px':'',borderRight:itemc.farRight?'none !important':'',borderBottom:itemc.farBottom?'none !important':''}" :class="[customOrderNumberList.indexOf(itemc.value)>-1?'active':'']" @click="changeCustomOrder(itemc)">
|
|
|
+ <li v-for="(itemc,indexc) in info.issue_no_school_year_list[customPage].issue_no_list" :key="indexc" :style="{width:itemc.width?itemc.width*52+'px':'',borderRight:itemc.farRight?'none !important':'',borderBottom:itemc.farBottom?'none !important':''}" :class="[customOrderNumberList.indexOf(itemc.issue_no)>-1?'active':'']" @click="changeCustomOrder(itemc)">
|
|
|
<el-tooltip placement="bottom">
|
|
|
<div slot="content">
|
|
|
- 第 791 期<br/>
|
|
|
- 出版日期:2020-10-23</div>
|
|
|
- <el-button class="custom-btn">{{itemc.label}}</el-button>
|
|
|
+ 第 {{itemc.issue_no}} 期<br/>
|
|
|
+ 出版日期:{{itemc.shelve_date}}</div>
|
|
|
+ <el-button class="custom-btn">{{itemc.issue_no}}</el-button>
|
|
|
</el-tooltip>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
- <b v-if="orderTotalNumber!==-1">915 期 - 919 期</b>
|
|
|
+ <b v-if="orderTotalNumber!==-1">{{info.issue_no_begin}} - {{info.issue_no_end}}</b>
|
|
|
<b v-else>已选 {{customOrderNumberList.length}} 期</b>
|
|
|
<el-tooltip placement="bottom" style="height:32px">
|
|
|
<div slot="content">
|
|
@@ -132,12 +133,12 @@
|
|
|
width="30">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- property="name"
|
|
|
+ property="issue_no"
|
|
|
label="期"
|
|
|
width="112">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- property="date"
|
|
|
+ property="shelve_date"
|
|
|
label="发行日期"
|
|
|
width="100">
|
|
|
</el-table-column>
|
|
@@ -155,12 +156,12 @@
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="info-item order-item">
|
|
|
+ <div class="info-item order-item" v-if="bookType==='jingdu'">
|
|
|
<label>有效期</label>
|
|
|
<div class="order-content">
|
|
|
<b>365天</b>
|
|
|
<el-tooltip placement="right">
|
|
|
- <div slot="content">2023.08.14~2024.08.13</div>
|
|
|
+ <div slot="content">{{validityStr}}</div>
|
|
|
<el-button class="tooltip-btn"><svg-icon icon-class="icon-mark"></svg-icon></el-button>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
@@ -168,8 +169,8 @@
|
|
|
<div class="info-item order-item">
|
|
|
<label>结算价格</label>
|
|
|
<div class="order-content">
|
|
|
- <span class="OPPOSans">¥{{info.price_discount|cutMoneyFiter}}</span>
|
|
|
- <span class="old-price">¥{{info.price|cutMoneyFiter}}</span>
|
|
|
+ <span class="OPPOSans">¥{{info.price_reservation|cutMoneyFiter}}</span>
|
|
|
+ <span class="old-price" v-if="info.price&&info.price_reservation!==info.price">¥{{info.price|cutMoneyFiter}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -180,6 +181,15 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="paymentShow"
|
|
|
+ :show-close="false"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ width="712px"
|
|
|
+ class="bookItem-dialog"
|
|
|
+ v-if="paymentShow">
|
|
|
+ <Payment :data="info" :payWay="payWay" @handleClose="handleClose" :orderId="orderId" :qr_code_url="qr_code_url" :order_amount="order_amount" />
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -190,10 +200,13 @@ import Header from "../../components/Header.vue";
|
|
|
import { cutMoneyFiter } from '@/utils/defined';
|
|
|
import { getLogin } from "@/api/ajax";
|
|
|
import { mapState } from 'vuex';
|
|
|
+import Payment from "../bookShelf/components/Payment.vue"
|
|
|
+import { getToken } from '@/utils/auth'
|
|
|
+
|
|
|
|
|
|
export default {
|
|
|
//import引入的组件需要注入到对象中才能使用
|
|
|
- components: { Header},
|
|
|
+ components: { Header, Payment},
|
|
|
props: [],
|
|
|
filters:{
|
|
|
cutMoneyFiter
|
|
@@ -227,8 +240,8 @@ export default {
|
|
|
tagBg:['#C9EBFF','#FFFAC9','#D7C9FF'], // 标签背景色
|
|
|
tagColor:['#006DAA','#AA8500','#7849C4'], // 标签字体颜色
|
|
|
paymentShow: false, // 支付弹窗
|
|
|
- payWay:'dui',
|
|
|
- bookType: this.$route.query.cardType?this.$route.query.cardType:'baozhi', // 书籍类型
|
|
|
+ payWay:this.$route.query.paywei?this.$route.query.paywei:'dui',
|
|
|
+ bookType: this.$route.query.type?this.$route.query.type:'baozhi', // 书籍类型
|
|
|
bannerFlag: true, // 是否展示广告
|
|
|
id: this.$route.query.id?this.$route.query.id:'',
|
|
|
info: null, // 信息
|
|
@@ -237,6 +250,7 @@ export default {
|
|
|
salesCn: '',
|
|
|
isBuy: 'false',
|
|
|
studyType: 11,
|
|
|
+ studyTypeName: '小学版',
|
|
|
orderTotalNumber: 5,
|
|
|
orderList:[
|
|
|
{
|
|
@@ -399,7 +413,14 @@ export default {
|
|
|
]
|
|
|
}
|
|
|
],
|
|
|
- customOrderNumberList: []
|
|
|
+ customOrderNumberList: [],
|
|
|
+ validityStr: '', // 有效期
|
|
|
+ rules: '', // 折扣规则
|
|
|
+ loading: false,
|
|
|
+ orderId: '',
|
|
|
+ qr_code_url: '',
|
|
|
+ order_amount: null,
|
|
|
+ userMessage: getToken()?JSON.parse(getToken()):null,
|
|
|
}
|
|
|
},
|
|
|
//计算属性 类似于data概念
|
|
@@ -419,8 +440,12 @@ export default {
|
|
|
|
|
|
},
|
|
|
handleChangeWay(type){
|
|
|
+ if(!this.userMessage){
|
|
|
+ this.$refs.header.handleLogin('/bookItem?headerConfig='+this.$route.query.headerConfig+'&cardType='+this.bookType+'&id='+this.id+'&paywei='+type,'url')
|
|
|
+ return false
|
|
|
+ }
|
|
|
this.payWay = type;
|
|
|
- this.paymentShow = true;
|
|
|
+ this.handleOrder()
|
|
|
},
|
|
|
// 关闭弹窗
|
|
|
handleClose(){
|
|
@@ -428,16 +453,43 @@ export default {
|
|
|
},
|
|
|
// 详情
|
|
|
getInfo(){
|
|
|
+ this.loading = true
|
|
|
let MethodName = "/ShopServer/Client/ReservationQuery/GetReservationInfo_Issue";
|
|
|
+ // let customStr = 'false'
|
|
|
+ // if(this.orderTotalNumber===-1){
|
|
|
+ // if(this.customOrderNumberList.length>0){
|
|
|
+ // customStr = ''
|
|
|
+ // this.customOrderNumberList.forEach(item => {
|
|
|
+ // customStr += item.issue_no + ','
|
|
|
+ // });
|
|
|
+ // customStr = customStr.substring(0,customStr.length-1)
|
|
|
+ // }else{
|
|
|
+ // // return
|
|
|
+ // }
|
|
|
+ // }
|
|
|
let data = {
|
|
|
study_phase: this.studyType,
|
|
|
- period_count: this.orderTotalNumber,
|
|
|
- is_custom_select_issue_no: "false"
|
|
|
+ period_count: this.orderTotalNumber!==-1?this.orderTotalNumber:this.customOrderNumberList.length,
|
|
|
+ is_custom_select_issue_no: this.orderTotalNumber!==-1?'false':'true'
|
|
|
}
|
|
|
getLogin(MethodName, data)
|
|
|
.then((res) => {
|
|
|
+ this.loading = false
|
|
|
if(res.status===1){
|
|
|
-
|
|
|
+ this.info = res
|
|
|
+ this.orderTable = res.issue_no_list
|
|
|
+ res.issue_no_school_year_list.forEach(item=>{
|
|
|
+ item.issue_no_list.forEach((items,indexs)=>{
|
|
|
+ const regex = /[\u4e00-\u9fa5]/g;
|
|
|
+ if(regex.test(items.issue_no)){
|
|
|
+ items.width = Math.ceil(items.issue_no.length/3)
|
|
|
+ items.number = item.issue_no_list[indexs-1]?item.issue_no_list[indexs-1].number + Math.ceil(items.issue_no.length/3) : Math.ceil(items.issue_no.length/3)
|
|
|
+ }else{
|
|
|
+ items.width = 1
|
|
|
+ items.number = item.issue_no_list[indexs-1]?item.issue_no_list[indexs-1].number + 1 : 1
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
this.sales = res.buy_info.total_buy_count
|
|
|
if(this.sales<1000){
|
|
|
this.salesCn = ''
|
|
@@ -457,16 +509,76 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
.catch(() => {
|
|
|
-
|
|
|
+ this.loading = false
|
|
|
});
|
|
|
},
|
|
|
changeCustomOrder(item){
|
|
|
- if(this.customOrderNumberList.indexOf(item.value)>-1){
|
|
|
- this.customOrderNumberList.splice(this.customOrderNumberList.indexOf(item.value),1)
|
|
|
+ if(this.customOrderNumberList.indexOf(item.issue_no)>-1){
|
|
|
+ this.customOrderNumberList.splice(this.customOrderNumberList.indexOf(item.issue_no),1)
|
|
|
+ this.orderTable.splice(this.customOrderNumberList.indexOf(item.issue_no),1)
|
|
|
}else{
|
|
|
- this.customOrderNumberList.push(item.value)
|
|
|
+ this.customOrderNumberList.push(item.issue_no)
|
|
|
+ this.orderTable.push(item)
|
|
|
}
|
|
|
- }
|
|
|
+ // this.getInfo()
|
|
|
+ },
|
|
|
+ changeStudy(item){
|
|
|
+ this.studyType = item.study_phase
|
|
|
+ this.studyTypeName = item.study_phase_name
|
|
|
+ this.customOrderNumberList = []
|
|
|
+ this.getInfo()
|
|
|
+ },
|
|
|
+ changeOrderNumber(item){
|
|
|
+ this.orderTotalNumber = item.value
|
|
|
+ this.getInfo()
|
|
|
+ },
|
|
|
+ getDiscountRule(){
|
|
|
+ let MethodName = "/OrgServer/Manager/SysConfigManager/GetSysConfig_DiscountRule";
|
|
|
+ getLogin(MethodName, {})
|
|
|
+ .then((res) => {
|
|
|
+ if(res.status===1){
|
|
|
+ let str = '一次性订阅:<br/>'
|
|
|
+ res.rule_list.forEach(item=>{
|
|
|
+ str += item.buy_count + ' 期 ' + item.discount.toFixed(1) + ' 折<br/>'
|
|
|
+ })
|
|
|
+ this.rules = str
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ changeCustomPage(type){
|
|
|
+ if(type==='-'){
|
|
|
+ if(this.customPage!==0){
|
|
|
+ this.customPage--
|
|
|
+ }else{
|
|
|
+ this.$message.warning('已经是最新学年')
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(this.customPage!==this.info.issue_no_school_year_list.length-1){
|
|
|
+ this.customPage++
|
|
|
+ }else{
|
|
|
+ this.$message.warning('后面没有数据啦')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 生成订单
|
|
|
+ handleOrder(){
|
|
|
+ let MethodName = "/ShopServer/Client/OrderManager/CreateOrder";
|
|
|
+ let data = {
|
|
|
+ goods_type: this.bookType==='LB'?0:this.bookType==='baozhi'?2:null,
|
|
|
+ goods_id_list: [this.id],
|
|
|
+ pay_type: this.payWay==='wei'?3:this.payWay==='zhi'?4:null
|
|
|
+ }
|
|
|
+ getLogin(MethodName, data)
|
|
|
+ .then((res) => {
|
|
|
+ if(res.status === 1){
|
|
|
+ this.orderId = res.id
|
|
|
+ this.qr_code_url = res.qr_code_url
|
|
|
+ this.paymentShow = true;
|
|
|
+ this.order_amount = res.order_amount
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // this.paymentShow = true;
|
|
|
+ },
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
@@ -479,6 +591,14 @@ export default {
|
|
|
this.previousPage = arr[4] ? arr[4] : '商城'
|
|
|
}
|
|
|
this.getInfo()
|
|
|
+ this.getDiscountRule()
|
|
|
+ let date1 = new Date().getFullYear()+'.'+(new Date().getMonth()+1<10?'0'+(new Date().getMonth()+1):(new Date().getMonth()+1))+'.'+new Date().getDate()
|
|
|
+ let data2 = new Date(new Date((new Date().getFullYear()+1)+'.'+(new Date().getMonth()+1<10?'0'+(new Date().getMonth()+1):(new Date().getMonth()+1))+'.'+new Date().getDate()).getTime() - 24 * 60 * 60 * 1000)
|
|
|
+ data2 = data2.getFullYear()+'.'+(data2.getMonth()+1<10?'0'+(data2.getMonth()+1):(data2.getMonth()+1))+'.'+data2.getDate()
|
|
|
+ this.validityStr = date1 + ' ~ ' + data2
|
|
|
+ if(this.$route.query.paywei){
|
|
|
+ this.handleOrder()
|
|
|
+ }
|
|
|
},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
@@ -519,7 +639,7 @@ export default {
|
|
|
height: 440px;
|
|
|
text-align: center;
|
|
|
.el-image{
|
|
|
- width: 297px;
|
|
|
+ width: 414px;
|
|
|
height: 414px;
|
|
|
border: 1px solid #F3F3F3;
|
|
|
}
|
|
@@ -608,6 +728,7 @@ export default {
|
|
|
flex-flow: wrap;
|
|
|
border-bottom: 1px solid #EBEBEB;
|
|
|
width: 592px;
|
|
|
+ margin-top: 48px;
|
|
|
.info-item{
|
|
|
width: 50%;
|
|
|
margin-bottom: 15px;
|
|
@@ -620,6 +741,7 @@ export default {
|
|
|
font-weight: 400;
|
|
|
margin-right: 16px;
|
|
|
width: 58px;
|
|
|
+ flex-shrink: 0;
|
|
|
display: block;
|
|
|
text-align:justify;
|
|
|
text-justify:distribute-all-lines;
|
|
@@ -631,6 +753,7 @@ export default {
|
|
|
.order-box{
|
|
|
margin-bottom: 24px;
|
|
|
padding: 24px 0 0;
|
|
|
+ margin-top: 0;
|
|
|
.order-item{
|
|
|
margin-bottom: 24px;
|
|
|
width: 100%;
|