|
@@ -1,17 +1,19 @@
|
|
<template>
|
|
<template>
|
|
<div class="vip-subscribe-info">
|
|
<div class="vip-subscribe-info">
|
|
- <section class="module-area-count-selector" v-show="moduleShow.selectArea">
|
|
|
|
|
|
+ <section v-show="moduleShow.selectArea" class="module-area-count-selector">
|
|
<!-- 购买 -->
|
|
<!-- 购买 -->
|
|
<SelectorCard
|
|
<SelectorCard
|
|
- class="vip-sub-list-item buy-area-count-section"
|
|
|
|
v-if="buyType === 'buy'"
|
|
v-if="buyType === 'buy'"
|
|
- cardType="line"
|
|
|
|
|
|
+ class="vip-sub-list-item buy-area-count-section"
|
|
|
|
+ card-type="line"
|
|
>
|
|
>
|
|
- <div slot="header" class="vip-sub-item-title">购买区域</div>
|
|
|
|
|
|
+ <div slot="header" class="vip-sub-item-title">
|
|
|
|
+ 购买区域
|
|
|
|
+ </div>
|
|
<div class="vip-sub-item-content choice-area-content">
|
|
<div class="vip-sub-item-content choice-area-content">
|
|
<el-radio-group
|
|
<el-radio-group
|
|
- class="radio-selector-group"
|
|
|
|
v-model="selectedInfo.radio"
|
|
v-model="selectedInfo.radio"
|
|
|
|
+ class="radio-selector-group"
|
|
@change="onAreaCountRadioChange"
|
|
@change="onAreaCountRadioChange"
|
|
>
|
|
>
|
|
<el-radio class="radio-selector" label="num">
|
|
<el-radio class="radio-selector" label="num">
|
|
@@ -21,73 +23,92 @@
|
|
v-model="selectedInfo.areaCount"
|
|
v-model="selectedInfo.areaCount"
|
|
:min="radioMin"
|
|
:min="radioMin"
|
|
:max="radioMax"
|
|
:max="radioMax"
|
|
- @change="onAreaCountChange($event, 'buy')"
|
|
|
|
integer
|
|
integer
|
|
|
|
+ @change="onAreaCountChange($event, 'buy')"
|
|
>
|
|
>
|
|
- <template #content-suffix-text>个省</template>
|
|
|
|
|
|
+ <template #content-suffix-text>
|
|
|
|
+ 个省
|
|
|
|
+ </template>
|
|
</JStepper>
|
|
</JStepper>
|
|
</div>
|
|
</div>
|
|
</el-radio>
|
|
</el-radio>
|
|
<el-radio class="radio-selector" label="" style="margin-left:30px;">
|
|
<el-radio class="radio-selector" label="" style="margin-left:30px;">
|
|
<div class="radio-content radio-content-text">
|
|
<div class="radio-content radio-content-text">
|
|
<span>全国</span>
|
|
<span>全国</span>
|
|
- <span class="radio-content-sub-text"
|
|
|
|
- >(购买{{ conf.maxAreaCount + 1 }}个省及以上)</span
|
|
|
|
- >
|
|
|
|
|
|
+ <span class="radio-content-sub-text">(购买{{ conf.maxAreaCount + 1 }}个省及以上)</span>
|
|
</div>
|
|
</div>
|
|
</el-radio>
|
|
</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
- <div class="tip-text">支付成功后,可点击“立即订阅”前往设置订阅区域</div>
|
|
|
|
|
|
+ <div class="tip-text">
|
|
|
|
+ 支付成功后,可点击“立即订阅”前往设置订阅区域
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</SelectorCard>
|
|
</SelectorCard>
|
|
<!-- 续费 -->
|
|
<!-- 续费 -->
|
|
<SelectorCard
|
|
<SelectorCard
|
|
- class="vip-sub-list-item renew-area-count-section"
|
|
|
|
v-if="buyType === 'renew'"
|
|
v-if="buyType === 'renew'"
|
|
- cardType="line"
|
|
|
|
|
|
+ class="vip-sub-list-item renew-area-count-section"
|
|
|
|
+ card-type="line"
|
|
>
|
|
>
|
|
- <div slot="header" class="vip-sub-item-title">续费区域</div>
|
|
|
|
- <div class="vip-sub-item-content">{{ selectedAreaText }}</div>
|
|
|
|
|
|
+ <div slot="header" class="vip-sub-item-title">
|
|
|
|
+ 续费区域
|
|
|
|
+ </div>
|
|
|
|
+ <div class="vip-sub-item-content">
|
|
|
|
+ {{ selectedAreaText }}
|
|
|
|
+ </div>
|
|
</SelectorCard>
|
|
</SelectorCard>
|
|
<!-- 升级 -->
|
|
<!-- 升级 -->
|
|
- <div class="upgrade-area-count-section" v-if="buyType === 'upgrade'">
|
|
|
|
- <SelectorCard class="vip-sub-list-item" cardType="line">
|
|
|
|
- <div slot="header" class="vip-sub-item-title">已购区域</div>
|
|
|
|
- <div class="vip-sub-item-content">{{ alreadyBuyAreaText }}</div>
|
|
|
|
|
|
+ <div v-if="buyType === 'upgrade'" class="upgrade-area-count-section">
|
|
|
|
+ <SelectorCard class="vip-sub-list-item" card-type="line">
|
|
|
|
+ <div slot="header" class="vip-sub-item-title">
|
|
|
|
+ 已购区域
|
|
|
|
+ </div>
|
|
|
|
+ <div class="vip-sub-item-content">
|
|
|
|
+ {{ alreadyBuyAreaText }}
|
|
|
|
+ </div>
|
|
</SelectorCard>
|
|
</SelectorCard>
|
|
<SelectorCard
|
|
<SelectorCard
|
|
- class="vip-sub-list-item"
|
|
|
|
v-show="showAfterUpgradeAreaText"
|
|
v-show="showAfterUpgradeAreaText"
|
|
- cardType="line"
|
|
|
|
|
|
+ class="vip-sub-list-item"
|
|
|
|
+ card-type="line"
|
|
>
|
|
>
|
|
- <div slot="header" class="vip-sub-item-title">升级区域</div>
|
|
|
|
|
|
+ <div slot="header" class="vip-sub-item-title">
|
|
|
|
+ 升级区域
|
|
|
|
+ </div>
|
|
<div class="vip-sub-item-content">
|
|
<div class="vip-sub-item-content">
|
|
<JStepper
|
|
<JStepper
|
|
v-model="selectedInfo.areaCount"
|
|
v-model="selectedInfo.areaCount"
|
|
:min="radioMin"
|
|
:min="radioMin"
|
|
:max="radioMax"
|
|
:max="radioMax"
|
|
- @change="onAreaCountChange($event, 'upgrade')"
|
|
|
|
integer
|
|
integer
|
|
|
|
+ @change="onAreaCountChange($event, 'upgrade')"
|
|
>
|
|
>
|
|
- <template #content-suffix-text>个省</template>
|
|
|
|
|
|
+ <template #content-suffix-text>
|
|
|
|
+ 个省
|
|
|
|
+ </template>
|
|
</JStepper>
|
|
</JStepper>
|
|
<span
|
|
<span
|
|
class="highlight-text i-want-to-upgrade-global"
|
|
class="highlight-text i-want-to-upgrade-global"
|
|
@click="iWantGlobal"
|
|
@click="iWantGlobal"
|
|
- >我要升级至全国</span
|
|
|
|
- >
|
|
|
|
|
|
+ >我要升级至全国</span>
|
|
</div>
|
|
</div>
|
|
</SelectorCard>
|
|
</SelectorCard>
|
|
<SelectorCard
|
|
<SelectorCard
|
|
- class="vip-sub-list-item"
|
|
|
|
v-show="showAfterUpgradeAreaText"
|
|
v-show="showAfterUpgradeAreaText"
|
|
- cardType="line"
|
|
|
|
|
|
+ class="vip-sub-list-item"
|
|
|
|
+ card-type="line"
|
|
>
|
|
>
|
|
- <div slot="header" class="vip-sub-item-title">升级后区域</div>
|
|
|
|
- <div class="vip-sub-item-content">{{ selectedAreaText }}</div>
|
|
|
|
|
|
+ <div slot="header" class="vip-sub-item-title">
|
|
|
|
+ 升级后区域
|
|
|
|
+ </div>
|
|
|
|
+ <div class="vip-sub-item-content">
|
|
|
|
+ {{ selectedAreaText }}
|
|
|
|
+ </div>
|
|
</SelectorCard>
|
|
</SelectorCard>
|
|
- <SelectorCard class="vip-sub-list-item" cardType="line">
|
|
|
|
- <div slot="header" class="vip-sub-item-title">有效日期</div>
|
|
|
|
|
|
+ <SelectorCard class="vip-sub-list-item" card-type="line">
|
|
|
|
+ <div slot="header" class="vip-sub-item-title">
|
|
|
|
+ 有效日期
|
|
|
|
+ </div>
|
|
<div class="vip-sub-item-content font-orange">
|
|
<div class="vip-sub-item-content font-orange">
|
|
{{ effectTimeText }}
|
|
{{ effectTimeText }}
|
|
</div>
|
|
</div>
|
|
@@ -95,38 +116,39 @@
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
<SelectorCard
|
|
<SelectorCard
|
|
- class="vip-sub-list-item spec-list-line"
|
|
|
|
v-if="moduleShow.selectSpec"
|
|
v-if="moduleShow.selectSpec"
|
|
- cardType="line"
|
|
|
|
|
|
+ class="vip-sub-list-item spec-list-line"
|
|
|
|
+ card-type="line"
|
|
>
|
|
>
|
|
- <div slot="header" class="vip-sub-item-title">选择购买周期</div>
|
|
|
|
|
|
+ <div slot="header" class="vip-sub-item-title">
|
|
|
|
+ 选择购买周期
|
|
|
|
+ </div>
|
|
<div class="vip-sub-item-content">
|
|
<div class="vip-sub-item-content">
|
|
<OrderSpecList
|
|
<OrderSpecList
|
|
:list="specList"
|
|
:list="specList"
|
|
:active="productSpec.id"
|
|
:active="productSpec.id"
|
|
@activeChange="specCardChange"
|
|
@activeChange="specCardChange"
|
|
- ></OrderSpecList>
|
|
|
|
|
|
+ />
|
|
<div class="spec-list-bottom-tips">
|
|
<div class="spec-list-bottom-tips">
|
|
- <div class="spec-tips-item" v-show="tip.buyGiveMedicalTip">
|
|
|
|
|
|
+ <div v-show="tip.buyGiveMedicalTip" class="spec-tips-item">
|
|
<div class="spec-tips-item-content">
|
|
<div class="spec-tips-item-content">
|
|
<span class="text">免费赠送 [医械通] </span>
|
|
<span class="text">免费赠送 [医械通] </span>
|
|
<a
|
|
<a
|
|
class="link-button"
|
|
class="link-button"
|
|
href="/page_workDesktop/work-bench/app/big/medical/Credentials"
|
|
href="/page_workDesktop/work-bench/app/big/medical/Credentials"
|
|
target="_blank"
|
|
target="_blank"
|
|
- >了解更多</a
|
|
|
|
- >
|
|
|
|
|
|
+ >了解更多</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</SelectorCard>
|
|
</SelectorCard>
|
|
<SelectorCard
|
|
<SelectorCard
|
|
- class="vip-sub-tip"
|
|
|
|
- cardType="line"
|
|
|
|
v-show="effectTimeTipTextShow"
|
|
v-show="effectTimeTipTextShow"
|
|
|
|
+ class="vip-sub-tip"
|
|
|
|
+ card-type="line"
|
|
>
|
|
>
|
|
- <div slot="header" class="vip-sub-item-title"></div>
|
|
|
|
|
|
+ <div slot="header" class="vip-sub-item-title" />
|
|
<div class="tip-content font-orange">
|
|
<div class="tip-content font-orange">
|
|
<span>有效日期:</span>
|
|
<span>有效日期:</span>
|
|
<span>{{ effectTimeText }}</span>
|
|
<span>{{ effectTimeText }}</span>
|
|
@@ -139,13 +161,17 @@
|
|
center
|
|
center
|
|
width="400px"
|
|
width="400px"
|
|
>
|
|
>
|
|
- <div class="dialog-title" slot="title">超级订阅更新提醒</div>
|
|
|
|
|
|
+ <div slot="title" class="dialog-title">
|
|
|
|
+ 超级订阅更新提醒
|
|
|
|
+ </div>
|
|
<div class="dialog-content">
|
|
<div class="dialog-content">
|
|
<p class="c-main">
|
|
<p class="c-main">
|
|
为满足用户精准获取商机的需求,剑鱼标讯推出超前项目推荐服务。原超级订阅用户中断续费后,将不再支持采购意向、拟建项目查看。超前项目推荐服务整合更多前期项目机会,提供更强服务。
|
|
为满足用户精准获取商机的需求,剑鱼标讯推出超前项目推荐服务。原超级订阅用户中断续费后,将不再支持采购意向、拟建项目查看。超前项目推荐服务整合更多前期项目机会,提供更强服务。
|
|
</p>
|
|
</p>
|
|
- <div class="c-img"></div>
|
|
|
|
- <p class="c-footer">扫一扫,立即联系客户经理了解超前项目推荐服务</p>
|
|
|
|
|
|
+ <div class="c-img" />
|
|
|
|
+ <p class="c-footer">
|
|
|
|
+ 扫一扫,立即联系客户经理了解超前项目推荐服务
|
|
|
|
+ </p>
|
|
</div>
|
|
</div>
|
|
<div slot="footer">
|
|
<div slot="footer">
|
|
<span class="know-btn" @click="dialog.vipUpdate = false">我知道了</span>
|
|
<span class="know-btn" @click="dialog.vipUpdate = false">我知道了</span>
|
|
@@ -155,23 +181,23 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { mapState, mapMutations, mapActions, mapGetters } from 'vuex'
|
|
|
|
|
|
+import { mapActions, mapGetters, mapMutations, mapState } from 'vuex'
|
|
|
|
+import { Dialog, Radio, RadioGroup } from 'element-ui'
|
|
|
|
+import { debounce } from 'lodash'
|
|
|
|
+import dayjs from 'dayjs'
|
|
import SelectorCard from '@/components/selector/SelectorCard.vue'
|
|
import SelectorCard from '@/components/selector/SelectorCard.vue'
|
|
import OrderSpecList from '@/views/order/ui/spec/list.vue'
|
|
import OrderSpecList from '@/views/order/ui/spec/list.vue'
|
|
import JStepper from '@/views/order/ui/spec/stepper.vue'
|
|
import JStepper from '@/views/order/ui/spec/stepper.vue'
|
|
-import { Dialog, Radio, RadioGroup } from 'element-ui'
|
|
|
|
import { fen2Yuan } from '@/utils'
|
|
import { fen2Yuan } from '@/utils'
|
|
-import { debounce } from 'lodash'
|
|
|
|
-import dayjs from 'dayjs'
|
|
|
|
import {
|
|
import {
|
|
- getSVIPBuyInfo,
|
|
|
|
- getEffectiveTime,
|
|
|
|
createCommonOrder,
|
|
createCommonOrder,
|
|
- getMedicalIndustry
|
|
|
|
|
|
+ getEffectiveTime,
|
|
|
|
+ getMedicalIndustry,
|
|
|
|
+ getSVIPBuyInfo
|
|
} from '@/api/modules'
|
|
} from '@/api/modules'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- name: 'vip-subscribe-info',
|
|
|
|
|
|
+ name: 'VipSubscribeInfo',
|
|
components: {
|
|
components: {
|
|
[Dialog.name]: Dialog,
|
|
[Dialog.name]: Dialog,
|
|
[Radio.name]: Radio,
|
|
[Radio.name]: Radio,
|
|
@@ -231,12 +257,12 @@ export default {
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState('user', {
|
|
...mapState('user', {
|
|
- userInfo: (state) => state.userAccountInfo
|
|
|
|
|
|
+ userInfo: state => state.userAccountInfo
|
|
}),
|
|
}),
|
|
...mapState('order', {
|
|
...mapState('order', {
|
|
- productSpec: (state) => state.productSpec,
|
|
|
|
- productSpecId: (state) => state.productSpec.id,
|
|
|
|
- offersId: (state) => state.offers.id
|
|
|
|
|
|
+ productSpec: state => state.productSpec,
|
|
|
|
+ productSpecId: state => state.productSpec.id,
|
|
|
|
+ offersId: state => state.offers.id
|
|
}),
|
|
}),
|
|
...mapGetters('order', [
|
|
...mapGetters('order', [
|
|
'productInfo',
|
|
'productInfo',
|
|
@@ -256,11 +282,13 @@ export default {
|
|
cycleType = 1
|
|
cycleType = 1
|
|
effectTimeAddType = 2
|
|
effectTimeAddType = 2
|
|
value = '1个月'
|
|
value = '1个月'
|
|
- } else if (spec.info?.includes('季')) {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (spec.info?.includes('季')) {
|
|
cycleType = 2
|
|
cycleType = 2
|
|
effectTimeAddType = 3
|
|
effectTimeAddType = 3
|
|
value = '1季'
|
|
value = '1季'
|
|
- } else if (spec.info?.includes('年')) {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (spec.info?.includes('年')) {
|
|
cycleType = 3
|
|
cycleType = 3
|
|
effectTimeAddType = 4
|
|
effectTimeAddType = 4
|
|
value = '1年'
|
|
value = '1年'
|
|
@@ -295,7 +323,8 @@ export default {
|
|
upgradeTipShow() {
|
|
upgradeTipShow() {
|
|
if (this.buyType === 'upgrade') {
|
|
if (this.buyType === 'upgrade') {
|
|
return !this.canUpgrade
|
|
return !this.canUpgrade
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -308,22 +337,27 @@ export default {
|
|
// 购买了全国的老超级订阅用户,可以升级到新超级订阅
|
|
// 购买了全国的老超级订阅用户,可以升级到新超级订阅
|
|
if (this.oldVip) {
|
|
if (this.oldVip) {
|
|
return selectCount === -1
|
|
return selectCount === -1
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
if (selectCount === -1) {
|
|
if (selectCount === -1) {
|
|
return true
|
|
return true
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
if (this.oldVip) {
|
|
if (this.oldVip) {
|
|
// 老超级订阅升级新超级订阅,可能包含0元升级
|
|
// 老超级订阅升级新超级订阅,可能包含0元升级
|
|
return selectCount >= buyset.areacount
|
|
return selectCount >= buyset.areacount
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return selectCount > buyset.areacount
|
|
return selectCount > buyset.areacount
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -339,16 +373,19 @@ export default {
|
|
alreadyBuyAreaCount() {
|
|
alreadyBuyAreaCount() {
|
|
if (this.buyType === 'buy') {
|
|
if (this.buyType === 'buy') {
|
|
return 0
|
|
return 0
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
if (this.oldVip) {
|
|
if (this.oldVip) {
|
|
// 老超级订阅已购的市升级时候按省份算(但需要补差价)
|
|
// 老超级订阅已购的市升级时候按省份算(但需要补差价)
|
|
const { areacount, newcitys } = this.buyInfo?.buyset || {}
|
|
const { areacount, newcitys } = this.buyInfo?.buyset || {}
|
|
if (Array.isArray(newcitys)) {
|
|
if (Array.isArray(newcitys)) {
|
|
return Number(areacount) + newcitys.length
|
|
return Number(areacount) + newcitys.length
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return areacount ?? 0
|
|
return areacount ?? 0
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return this.buyInfo?.buyset?.areacount ?? 0
|
|
return this.buyInfo?.buyset?.areacount ?? 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -360,7 +397,8 @@ export default {
|
|
const { areacount, newcitys } = buyset
|
|
const { areacount, newcitys } = buyset
|
|
if (areacount === -1) {
|
|
if (areacount === -1) {
|
|
return '全国'
|
|
return '全国'
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
if (Array.isArray(newcitys) && newcitys.length) {
|
|
if (Array.isArray(newcitys) && newcitys.length) {
|
|
const arr = []
|
|
const arr = []
|
|
if (areacount && areacount > 0) {
|
|
if (areacount && areacount > 0) {
|
|
@@ -372,14 +410,17 @@ export default {
|
|
arr.push(`${cityCount}个市(分布在${newcitys.length}个省内)`)
|
|
arr.push(`${cityCount}个市(分布在${newcitys.length}个省内)`)
|
|
// 8个省、3个市(分布在2个省内)
|
|
// 8个省、3个市(分布在2个省内)
|
|
return arr.join('、')
|
|
return arr.join('、')
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return `${this.alreadyBuyAreaCount}个省`
|
|
return `${this.alreadyBuyAreaCount}个省`
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
if (this.alreadyBuyAreaCount === -1 || gtMax) {
|
|
if (this.alreadyBuyAreaCount === -1 || gtMax) {
|
|
return '全国'
|
|
return '全国'
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return `${this.alreadyBuyAreaCount}个省`
|
|
return `${this.alreadyBuyAreaCount}个省`
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -392,28 +433,35 @@ export default {
|
|
if (radio) {
|
|
if (radio) {
|
|
if (areaCount > this.conf.maxAreaCount) {
|
|
if (areaCount > this.conf.maxAreaCount) {
|
|
return -1
|
|
return -1
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return areaCount
|
|
return areaCount
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
// -1表示全国
|
|
// -1表示全国
|
|
return -1
|
|
return -1
|
|
}
|
|
}
|
|
- } else if (this.buyType === 'renew') {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (this.buyType === 'renew') {
|
|
return this.alreadyBuyAreaCount
|
|
return this.alreadyBuyAreaCount
|
|
- } else if (this.buyType === 'upgrade') {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (this.buyType === 'upgrade') {
|
|
const { areaCount, radio } = this.selectedInfo
|
|
const { areaCount, radio } = this.selectedInfo
|
|
if (radio) {
|
|
if (radio) {
|
|
if (areaCount + this.alreadyBuyAreaCount > this.conf.maxAreaCount) {
|
|
if (areaCount + this.alreadyBuyAreaCount > this.conf.maxAreaCount) {
|
|
return -1
|
|
return -1
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return areaCount + this.alreadyBuyAreaCount
|
|
return areaCount + this.alreadyBuyAreaCount
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
// -1表示全国
|
|
// -1表示全国
|
|
return -1
|
|
return -1
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return 1
|
|
return 1
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -421,7 +469,8 @@ export default {
|
|
const gtMax = this.selectedAreaCount > this.conf.maxAreaCount
|
|
const gtMax = this.selectedAreaCount > this.conf.maxAreaCount
|
|
if (this.selectedAreaCount === -1 || gtMax) {
|
|
if (this.selectedAreaCount === -1 || gtMax) {
|
|
return '全国'
|
|
return '全国'
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return `${this.selectedAreaCount}个省`
|
|
return `${this.selectedAreaCount}个省`
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -432,7 +481,8 @@ export default {
|
|
return `${dayjs(startTime * 1000).format(formatStr)} - ${dayjs(
|
|
return `${dayjs(startTime * 1000).format(formatStr)} - ${dayjs(
|
|
endTime * 1000
|
|
endTime * 1000
|
|
).format(formatStr)}`
|
|
).format(formatStr)}`
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return ' - '
|
|
return ' - '
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -442,7 +492,8 @@ export default {
|
|
radioMin() {
|
|
radioMin() {
|
|
if (this.buyType === 'upgrade' && this.oldVip) {
|
|
if (this.buyType === 'upgrade' && this.oldVip) {
|
|
return this.oldVip ? 0 : 1
|
|
return this.oldVip ? 0 : 1
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
// 新超级订阅最小值1
|
|
// 新超级订阅最小值1
|
|
return 1
|
|
return 1
|
|
}
|
|
}
|
|
@@ -450,7 +501,8 @@ export default {
|
|
radioMax() {
|
|
radioMax() {
|
|
if (this.buyType === 'upgrade') {
|
|
if (this.buyType === 'upgrade') {
|
|
return this.conf.maxAreaCount - this.alreadyBuyAreaCount + 1
|
|
return this.conf.maxAreaCount - this.alreadyBuyAreaCount + 1
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return this.conf.maxAreaCount
|
|
return this.conf.maxAreaCount
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -465,9 +517,11 @@ export default {
|
|
let p = true
|
|
let p = true
|
|
if (this.buyType === 'buy') {
|
|
if (this.buyType === 'buy') {
|
|
// do something
|
|
// do something
|
|
- } else if (this.buyType === 'upgrade') {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (this.buyType === 'upgrade') {
|
|
p = this.canUpgrade
|
|
p = this.canUpgrade
|
|
- } else if (this.buyType === 'renew') {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (this.buyType === 'renew') {
|
|
// do something
|
|
// do something
|
|
}
|
|
}
|
|
return p
|
|
return p
|
|
@@ -494,7 +548,8 @@ export default {
|
|
const vipBuy = this.buyType === 'buy'
|
|
const vipBuy = this.buyType === 'buy'
|
|
if (breakRenewTip > 0 && vipBuy) {
|
|
if (breakRenewTip > 0 && vipBuy) {
|
|
this.dialog.vipUpdate = true
|
|
this.dialog.vipUpdate = true
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.dialog.vipUpdate = false
|
|
this.dialog.vipUpdate = false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -535,7 +590,8 @@ export default {
|
|
.find('span[name=大会员]')
|
|
.find('span[name=大会员]')
|
|
.removeClass('active')
|
|
.removeClass('active')
|
|
window.trySelectNav('招标订阅')
|
|
window.trySelectNav('招标订阅')
|
|
- } catch (error) {}
|
|
|
|
|
|
+ }
|
|
|
|
+ catch (error) {}
|
|
this.checkMedicalTip()
|
|
this.checkMedicalTip()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -550,11 +606,12 @@ export default {
|
|
let target = {}
|
|
let target = {}
|
|
if (id) {
|
|
if (id) {
|
|
// 获取目标信息
|
|
// 获取目标信息
|
|
- target =
|
|
|
|
- this.specList.find((spec) => {
|
|
|
|
|
|
+ target
|
|
|
|
+ = this.specList.find((spec) => {
|
|
return spec.id === id
|
|
return spec.id === id
|
|
}) || {}
|
|
}) || {}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
// 当前选中信息
|
|
// 当前选中信息
|
|
target = this.activeSpec
|
|
target = this.activeSpec
|
|
}
|
|
}
|
|
@@ -601,7 +658,8 @@ export default {
|
|
})
|
|
})
|
|
}, 100),
|
|
}, 100),
|
|
async checkMedicalTip() {
|
|
async checkMedicalTip() {
|
|
- if (this.buyType !== 'buy') return
|
|
|
|
|
|
+ if (this.buyType !== 'buy')
|
|
|
|
+ return
|
|
const params = this.token ? { token: this.token } : null
|
|
const params = this.token ? { token: this.token } : null
|
|
const { data } = await getMedicalIndustry(params)
|
|
const { data } = await getMedicalIndustry(params)
|
|
if (data) {
|
|
if (data) {
|
|
@@ -637,12 +695,14 @@ export default {
|
|
time: this.activeSpec.value,
|
|
time: this.activeSpec.value,
|
|
orderType: 1
|
|
orderType: 1
|
|
})
|
|
})
|
|
- } else if (this.buyType === 'upgrade') {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (this.buyType === 'upgrade') {
|
|
Object.assign(params, {
|
|
Object.assign(params, {
|
|
type: 'upgrade',
|
|
type: 'upgrade',
|
|
areaCount: this.selectedAreaCount
|
|
areaCount: this.selectedAreaCount
|
|
})
|
|
})
|
|
- } else if (this.buyType === 'renew') {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (this.buyType === 'renew') {
|
|
Object.assign(params, {
|
|
Object.assign(params, {
|
|
type: 'renew',
|
|
type: 'renew',
|
|
time: this.activeSpec.value
|
|
time: this.activeSpec.value
|
|
@@ -686,13 +746,15 @@ export default {
|
|
// 异步window.open会被浏览器拦截,此处改为location.href
|
|
// 异步window.open会被浏览器拦截,此处改为location.href
|
|
// window.open(`/front/subvip/orderPay/${orderCode}`)
|
|
// window.open(`/front/subvip/orderPay/${orderCode}`)
|
|
location.href = `/front/subvip/orderPay/${orderCode}`
|
|
location.href = `/front/subvip/orderPay/${orderCode}`
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
// window.open(`/front/subvip/paySuccess/${orderCode}?payTime=${parseInt(Date.now() / 1000)}&from=vipUPgrade`)
|
|
// window.open(`/front/subvip/paySuccess/${orderCode}?payTime=${parseInt(Date.now() / 1000)}&from=vipUPgrade`)
|
|
- location.href = `/front/subvip/paySuccess/${orderCode}?payTime=${parseInt(
|
|
|
|
|
|
+ location.href = `/front/subvip/paySuccess/${orderCode}?payTime=${Number.parseInt(
|
|
Date.now() / 1000
|
|
Date.now() / 1000
|
|
)}&from=vipUPgrade`
|
|
)}&from=vipUPgrade`
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.$toast(msg)
|
|
this.$toast(msg)
|
|
}
|
|
}
|
|
return res
|
|
return res
|
|
@@ -708,7 +770,8 @@ export default {
|
|
onAreaCountChange: debounce(function (e, type) {
|
|
onAreaCountChange: debounce(function (e, type) {
|
|
if (type === 'buy') {
|
|
if (type === 'buy') {
|
|
this.overLimit(e)
|
|
this.overLimit(e)
|
|
- } else if (type === 'upgrade') {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (type === 'upgrade') {
|
|
const max = this.radioMax
|
|
const max = this.radioMax
|
|
this.overLimit(e, max)
|
|
this.overLimit(e, max)
|
|
}
|
|
}
|
|
@@ -722,11 +785,13 @@ export default {
|
|
if (this.buyType === 'buy') {
|
|
if (this.buyType === 'buy') {
|
|
this.switchRadio()
|
|
this.switchRadio()
|
|
this.$toast('已自动为您切换至全国')
|
|
this.$toast('已自动为您切换至全国')
|
|
- } else if (this.buyType === 'upgrade') {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (this.buyType === 'upgrade') {
|
|
this.$toast(`最大值为${max}`)
|
|
this.$toast(`最大值为${max}`)
|
|
this.setRadioNum(max)
|
|
this.setRadioNum(max)
|
|
}
|
|
}
|
|
- } else if (limitedMin) {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (limitedMin) {
|
|
this.$toast(`最小值为${this.radioMin}`)
|
|
this.$toast(`最小值为${this.radioMin}`)
|
|
this.setRadioNum(this.radioMin)
|
|
this.setRadioNum(this.radioMin)
|
|
}
|
|
}
|
|
@@ -744,7 +809,8 @@ export default {
|
|
const types = ['buy', 'upgrade', 'renew']
|
|
const types = ['buy', 'upgrade', 'renew']
|
|
if (types.includes(type)) {
|
|
if (types.includes(type)) {
|
|
this.buyType = type || types[0]
|
|
this.buyType = type || types[0]
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.buyType = types[0]
|
|
this.buyType = types[0]
|
|
}
|
|
}
|
|
if (token) {
|
|
if (token) {
|
|
@@ -754,7 +820,8 @@ export default {
|
|
if (this.buyType === 'upgrade') {
|
|
if (this.buyType === 'upgrade') {
|
|
this.moduleShow.selectArea = true
|
|
this.moduleShow.selectArea = true
|
|
this.moduleShow.selectSpec = false
|
|
this.moduleShow.selectSpec = false
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.moduleShow.selectSpec = true
|
|
this.moduleShow.selectSpec = true
|
|
this.moduleShow.selectArea = true
|
|
this.moduleShow.selectArea = true
|
|
}
|
|
}
|
|
@@ -804,7 +871,8 @@ export default {
|
|
const { data, success, errMsg } = await getEffectiveTime(payload)
|
|
const { data, success, errMsg } = await getEffectiveTime(payload)
|
|
if (success) {
|
|
if (success) {
|
|
Object.assign(this.effectTimeInfo, data)
|
|
Object.assign(this.effectTimeInfo, data)
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
if (errMsg) {
|
|
if (errMsg) {
|
|
this.$toast(errMsg)
|
|
this.$toast(errMsg)
|
|
}
|
|
}
|
|
@@ -824,7 +892,8 @@ export default {
|
|
if (areaLength === 0 || areaLength > this.conf.maxAreaCount) {
|
|
if (areaLength === 0 || areaLength > this.conf.maxAreaCount) {
|
|
this.selectedInfo.radio = ''
|
|
this.selectedInfo.radio = ''
|
|
this.setRadioNum(this.conf.maxAreaCount + 1)
|
|
this.setRadioNum(this.conf.maxAreaCount + 1)
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.selectedInfo.radio = 'num'
|
|
this.selectedInfo.radio = 'num'
|
|
this.setRadioNum(areaLength)
|
|
this.setRadioNum(areaLength)
|
|
}
|
|
}
|
|
@@ -843,10 +912,10 @@ export default {
|
|
const { buyset } = this.buyInfo
|
|
const { buyset } = this.buyInfo
|
|
// 购买了全国的新超级订阅用户,升级不能再选择省份了
|
|
// 购买了全国的新超级订阅用户,升级不能再选择省份了
|
|
if (
|
|
if (
|
|
- this.buyType === 'upgrade' &&
|
|
|
|
- buyset &&
|
|
|
|
- buyset.areacount === -1 &&
|
|
|
|
- !this.oldVip
|
|
|
|
|
|
+ this.buyType === 'upgrade'
|
|
|
|
+ && buyset
|
|
|
|
+ && buyset.areacount === -1
|
|
|
|
+ && !this.oldVip
|
|
) {
|
|
) {
|
|
this.moduleShow.selectArea = false
|
|
this.moduleShow.selectArea = false
|
|
}
|
|
}
|
|
@@ -854,7 +923,8 @@ export default {
|
|
this.setRadioNum(this.radioMin)
|
|
this.setRadioNum(this.radioMin)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- } catch (error) {
|
|
|
|
|
|
+ }
|
|
|
|
+ catch (error) {
|
|
// loading.clear()
|
|
// loading.clear()
|
|
console.log(error)
|
|
console.log(error)
|
|
}
|
|
}
|
|
@@ -864,7 +934,8 @@ export default {
|
|
const { buyset, isvip, startTime: start, endTime: end } = info
|
|
const { buyset, isvip, startTime: start, endTime: end } = info
|
|
const { path } = this.$route
|
|
const { path } = this.$route
|
|
const { redirected } = this.$route.query
|
|
const { redirected } = this.$route.query
|
|
- if (redirected) return
|
|
|
|
|
|
+ if (redirected)
|
|
|
|
+ return
|
|
|
|
|
|
const redirect = {
|
|
const redirect = {
|
|
enable: false,
|
|
enable: false,
|
|
@@ -886,13 +957,15 @@ export default {
|
|
redirect.type = 'upgrade'
|
|
redirect.type = 'upgrade'
|
|
await this.showOldVipTip()
|
|
await this.showOldVipTip()
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
// 开通了,过期了
|
|
// 开通了,过期了
|
|
if (this.buyType !== 'buy') {
|
|
if (this.buyType !== 'buy') {
|
|
redirect.enable = true
|
|
redirect.enable = true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
// 未开通
|
|
// 未开通
|
|
if (this.buyType !== 'buy') {
|
|
if (this.buyType !== 'buy') {
|
|
redirect.enable = true
|
|
redirect.enable = true
|
|
@@ -925,8 +998,8 @@ export default {
|
|
},
|
|
},
|
|
calcSpecPerDayPrice(spec, cycleType) {
|
|
calcSpecPerDayPrice(spec, cycleType) {
|
|
// 只根据当前省份下原价计算单价,有优惠按优惠价计算
|
|
// 只根据当前省份下原价计算单价,有优惠按优惠价计算
|
|
- const price =
|
|
|
|
- spec.originalPrice > spec.discountPrice
|
|
|
|
|
|
+ const price
|
|
|
|
+ = spec.originalPrice > spec.discountPrice
|
|
? spec.discountPrice
|
|
? spec.discountPrice
|
|
: spec.originalPrice
|
|
: spec.originalPrice
|
|
let perDayPrice = 0
|
|
let perDayPrice = 0
|
|
@@ -958,20 +1031,20 @@ export default {
|
|
return perDayPrice
|
|
return perDayPrice
|
|
},
|
|
},
|
|
// 计算赠送天数
|
|
// 计算赠送天数
|
|
- calcGiveDay (time, timeType) {
|
|
|
|
|
|
+ calcGiveDay(time, timeType) {
|
|
// 只根据当前省份下原价计算单价
|
|
// 只根据当前省份下原价计算单价
|
|
let giveDay = 0
|
|
let giveDay = 0
|
|
// timeType 时间类型:1/天、2/月,3/年
|
|
// timeType 时间类型:1/天、2/月,3/年
|
|
- if(timeType){
|
|
|
|
|
|
+ if (timeType) {
|
|
switch (timeType) {
|
|
switch (timeType) {
|
|
case 1:
|
|
case 1:
|
|
- giveDay = time
|
|
|
|
|
|
+ giveDay = time
|
|
break
|
|
break
|
|
case 2:
|
|
case 2:
|
|
- giveDay = time * 30
|
|
|
|
|
|
+ giveDay = time * 30
|
|
break
|
|
break
|
|
case 3:
|
|
case 3:
|
|
- giveDay = time * 365
|
|
|
|
|
|
+ giveDay = time * 365
|
|
break
|
|
break
|
|
}
|
|
}
|
|
}
|
|
}
|