|
@@ -6,69 +6,75 @@
|
|
:status="activity.status"
|
|
:status="activity.status"
|
|
@sub="onSubscribe"
|
|
@sub="onSubscribe"
|
|
@updateCallback="updateCallback"
|
|
@updateCallback="updateCallback"
|
|
- >
|
|
|
|
- </LimitedBanner>
|
|
|
|
- <Layout class="vip-subscribe-buy" contentWithState="full" :needAd="false">
|
|
|
|
- <div class="vip-subscribe-title">{{ buyTypeText }}超级订阅</div>
|
|
|
|
|
|
+ />
|
|
|
|
+ <Layout class="vip-subscribe-buy" content-with-state="full" :need-ad="false">
|
|
|
|
+ <div class="vip-subscribe-title">
|
|
|
|
+ {{ buyTypeText }}超级订阅
|
|
|
|
+ </div>
|
|
<div class="vip-subscribe-content">
|
|
<div class="vip-subscribe-content">
|
|
<div class="vip-sub-list">
|
|
<div class="vip-sub-list">
|
|
<AreaSelector
|
|
<AreaSelector
|
|
|
|
+ v-show="moduleShow.areaSelector"
|
|
ref="areaSelector"
|
|
ref="areaSelector"
|
|
class="vip-sub-list-item"
|
|
class="vip-sub-list-item"
|
|
:class="{ 'pd-b0': upgradeTipShow }"
|
|
:class="{ 'pd-b0': upgradeTipShow }"
|
|
- v-show="moduleShow.areaSelector"
|
|
|
|
- :showSearchInput="false"
|
|
|
|
- :onlyProvince="true"
|
|
|
|
- :showSelectResult="true"
|
|
|
|
- selectorType="line"
|
|
|
|
|
|
+ :show-search-input="false"
|
|
|
|
+ :only-province="true"
|
|
|
|
+ :show-select-result="true"
|
|
|
|
+ selector-type="line"
|
|
@onChange="onAreaChange"
|
|
@onChange="onAreaChange"
|
|
>
|
|
>
|
|
- <div slot="header" class="vip-sub-item-title">购买区域</div>
|
|
|
|
|
|
+ <div slot="header" class="vip-sub-item-title">
|
|
|
|
+ 购买区域
|
|
|
|
+ </div>
|
|
</AreaSelector>
|
|
</AreaSelector>
|
|
<SelectorCard
|
|
<SelectorCard
|
|
- class="vip-sub-tip"
|
|
|
|
v-if="moduleShow.areaSelector"
|
|
v-if="moduleShow.areaSelector"
|
|
- :cardType="conf.selectorType"
|
|
|
|
|
|
+ class="vip-sub-tip"
|
|
|
|
+ :card-type="conf.selectorType"
|
|
>
|
|
>
|
|
- <div slot="header" class="vip-sub-item-title"></div>
|
|
|
|
- <div class="tip-content font-red" v-show="upgradeTipShow">
|
|
|
|
|
|
+ <div slot="header" class="vip-sub-item-title" />
|
|
|
|
+ <div v-show="upgradeTipShow" class="tip-content font-red">
|
|
请增加购买区域进行升级,当前选择省份数量未高于原套餐数,无法升级
|
|
请增加购买区域进行升级,当前选择省份数量未高于原套餐数,无法升级
|
|
</div>
|
|
</div>
|
|
</SelectorCard>
|
|
</SelectorCard>
|
|
<SelectorCard
|
|
<SelectorCard
|
|
- class="vip-sub-list-item"
|
|
|
|
v-if="moduleShow.specList"
|
|
v-if="moduleShow.specList"
|
|
- :cardType="conf.selectorType"
|
|
|
|
|
|
+ class="vip-sub-list-item"
|
|
|
|
+ :card-type="conf.selectorType"
|
|
>
|
|
>
|
|
- <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">
|
|
<SpecList
|
|
<SpecList
|
|
- :list="specList"
|
|
|
|
v-model="specIdActive"
|
|
v-model="specIdActive"
|
|
|
|
+ :list="specList"
|
|
@onclick="specChange"
|
|
@onclick="specChange"
|
|
@updateCallback="updateCallback"
|
|
@updateCallback="updateCallback"
|
|
/>
|
|
/>
|
|
<div class="spec-list-bottom-tips">
|
|
<div class="spec-list-bottom-tips">
|
|
- <div class="spec-tips-item" v-show="medical.buyGiveTip">
|
|
|
|
|
|
+ <div v-show="medical.buyGiveTip" 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-list-item"
|
|
|
|
v-show="moduleShow.coupon"
|
|
v-show="moduleShow.coupon"
|
|
- :cardType="conf.selectorType"
|
|
|
|
|
|
+ class="vip-sub-list-item"
|
|
|
|
+ :card-type="conf.selectorType"
|
|
>
|
|
>
|
|
- <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">
|
|
<CouponCardList
|
|
<CouponCardList
|
|
ref="couponRef"
|
|
ref="couponRef"
|
|
@@ -90,8 +96,10 @@
|
|
@loaded="giftListLoaded" />
|
|
@loaded="giftListLoaded" />
|
|
</div>
|
|
</div>
|
|
</SelectorCard> -->
|
|
</SelectorCard> -->
|
|
- <SelectorCard class="vip-sub-list-item" :cardType="conf.selectorType">
|
|
|
|
- <div slot="header" class="vip-sub-item-title">手机号码</div>
|
|
|
|
|
|
+ <SelectorCard class="vip-sub-list-item" :card-type="conf.selectorType">
|
|
|
|
+ <div slot="header" class="vip-sub-item-title">
|
|
|
|
+ 手机号码
|
|
|
|
+ </div>
|
|
<div class="vip-sub-item-content">
|
|
<div class="vip-sub-item-content">
|
|
<CheckPhone v-model="userInfo.phone" :pass.sync="phoneRegPass" />
|
|
<CheckPhone v-model="userInfo.phone" :pass.sync="phoneRegPass" />
|
|
</div>
|
|
</div>
|
|
@@ -101,15 +109,14 @@
|
|
ref="buySubmitRef"
|
|
ref="buySubmitRef"
|
|
:pass="allPass"
|
|
:pass="allPass"
|
|
:submit-text="submitText"
|
|
:submit-text="submitText"
|
|
- :productionTotal="computedPrice.total / 100"
|
|
|
|
- :productionDiscount="computedPrice.discount / 100"
|
|
|
|
- :productionPay="computedPrice.pay / 100"
|
|
|
|
|
|
+ :production-total="computedPrice.total / 100"
|
|
|
|
+ :production-discount="computedPrice.discount / 100"
|
|
|
|
+ :production-pay="computedPrice.pay / 100"
|
|
@submit="submit"
|
|
@submit="submit"
|
|
- >
|
|
|
|
- </BuySubmit>
|
|
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
<div class="vip-subscribe-desc">
|
|
<div class="vip-subscribe-desc">
|
|
- <Contrast></Contrast>
|
|
|
|
|
|
+ <Contrast />
|
|
</div>
|
|
</div>
|
|
</Layout>
|
|
</Layout>
|
|
<el-dialog
|
|
<el-dialog
|
|
@@ -119,13 +126,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="buyDialog = false">我知道了</span>
|
|
<span class="know-btn" @click="buyDialog = false">我知道了</span>
|
|
@@ -135,6 +146,8 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import { Dialog } from 'element-ui'
|
|
|
|
+import qs from 'qs'
|
|
import Layout from '@/components/common/ContentLayout.vue'
|
|
import Layout from '@/components/common/ContentLayout.vue'
|
|
import SelectorCard from '@/components/selector/SelectorCard.vue'
|
|
import SelectorCard from '@/components/selector/SelectorCard.vue'
|
|
import AreaSelector from '@/components/selector/AreaSelector.vue'
|
|
import AreaSelector from '@/components/selector/AreaSelector.vue'
|
|
@@ -145,22 +158,20 @@ import CheckPhone from '@/components/coupon/CheckPhone.vue'
|
|
import BuySubmit from '@/components/coupon/BuySubmit.vue'
|
|
import BuySubmit from '@/components/coupon/BuySubmit.vue'
|
|
import Contrast from '@/views/vipsubscribe/components/Contrast.vue'
|
|
import Contrast from '@/views/vipsubscribe/components/Contrast.vue'
|
|
import LimitedBanner from '@/components/limited-banner/index.vue'
|
|
import LimitedBanner from '@/components/limited-banner/index.vue'
|
|
-import { Dialog } from 'element-ui'
|
|
|
|
-import qs from 'qs'
|
|
|
|
|
|
|
|
import {
|
|
import {
|
|
|
|
+ appointmentAdd,
|
|
commodityDetail,
|
|
commodityDetail,
|
|
commodityDiscounts,
|
|
commodityDiscounts,
|
|
commodityPrice,
|
|
commodityPrice,
|
|
- getSVIPBuyInfo,
|
|
|
|
- getUserAccountInfo,
|
|
|
|
createCommonOrder,
|
|
createCommonOrder,
|
|
- appointmentAdd,
|
|
|
|
- getMedicalIndustry
|
|
|
|
|
|
+ getMedicalIndustry,
|
|
|
|
+ getSVIPBuyInfo,
|
|
|
|
+ getUserAccountInfo
|
|
} from '@/api/modules/'
|
|
} from '@/api/modules/'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- name: 'vip-subscribe-buy',
|
|
|
|
|
|
+ name: 'VipSubscribeBuy',
|
|
components: {
|
|
components: {
|
|
Layout,
|
|
Layout,
|
|
SelectorCard,
|
|
SelectorCard,
|
|
@@ -174,6 +185,37 @@ export default {
|
|
[Dialog.name]: Dialog,
|
|
[Dialog.name]: Dialog,
|
|
LimitedBanner
|
|
LimitedBanner
|
|
},
|
|
},
|
|
|
|
+ beforeRouteEnter(to, from, next) {
|
|
|
|
+ console.log(to.query)
|
|
|
|
+ const map = {
|
|
|
|
+ buy: '开通',
|
|
|
|
+ renew: '续费',
|
|
|
|
+ upgrade: '升级'
|
|
|
|
+ }
|
|
|
|
+ const title = document.title
|
|
|
|
+ const { type } = to.query || {}
|
|
|
|
+ if (type && map[type]) {
|
|
|
|
+ // 修改头部高亮
|
|
|
|
+ document.title = `${map[type]}超级订阅`
|
|
|
|
+ }
|
|
|
|
+ next((vm) => {
|
|
|
|
+ vm.preTitle = title
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ beforeRouteUpdate(to, from, next) {
|
|
|
|
+ this.$nextTick(async () => {
|
|
|
|
+ this.getType()
|
|
|
|
+ await this.getUserBuyInfo()
|
|
|
|
+ await this.commodityDetail()
|
|
|
|
+ await this.updatePrice()
|
|
|
|
+ this.getUserAccountInfo()
|
|
|
|
+ })
|
|
|
|
+ next()
|
|
|
|
+ },
|
|
|
|
+ beforeRouteLeave(to, from, next) {
|
|
|
|
+ document.title = this.preTitle
|
|
|
|
+ next()
|
|
|
|
+ },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
// 是否可适用优惠金额
|
|
// 是否可适用优惠金额
|
|
@@ -275,7 +317,8 @@ export default {
|
|
upgradeTipShow() {
|
|
upgradeTipShow() {
|
|
if (this.buyType === 'buy' || this.buyType === 'renew') {
|
|
if (this.buyType === 'buy' || this.buyType === 'renew') {
|
|
return false
|
|
return false
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return !this.canUpgrade
|
|
return !this.canUpgrade
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -285,28 +328,34 @@ export default {
|
|
console.log(buyset, selectCount, this.oldVip)
|
|
console.log(buyset, selectCount, this.oldVip)
|
|
if (this.buyType === 'buy' || this.buyType === 'renew') {
|
|
if (this.buyType === 'buy' || this.buyType === 'renew') {
|
|
return false
|
|
return false
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
if (buyset.areacount === -1) {
|
|
if (buyset.areacount === -1) {
|
|
// 老版超级订阅全国全行业用户选择16个地区以上或者全国才能去支付
|
|
// 老版超级订阅全国全行业用户选择16个地区以上或者全国才能去支付
|
|
if (this.oldVip) {
|
|
if (this.oldVip) {
|
|
if (
|
|
if (
|
|
- this.computedPrice.pay >= 0 &&
|
|
|
|
- (selectCount >= 16 || selectCount === -1)
|
|
|
|
|
|
+ this.computedPrice.pay >= 0
|
|
|
|
+ && (selectCount >= 16 || selectCount === -1)
|
|
) {
|
|
) {
|
|
return true
|
|
return true
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
if (selectCount === -1) {
|
|
if (selectCount === -1) {
|
|
return true
|
|
return true
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
if (this.oldVip) {
|
|
if (this.oldVip) {
|
|
return selectCount >= buyset.areacount
|
|
return selectCount >= buyset.areacount
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return selectCount > buyset.areacount
|
|
return selectCount > buyset.areacount
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -351,7 +400,8 @@ export default {
|
|
selectedCount() {
|
|
selectedCount() {
|
|
if (this.buyType === 'renew') {
|
|
if (this.buyType === 'renew') {
|
|
return this.buyInfo.buyset.areacount || 0
|
|
return this.buyInfo.buyset.areacount || 0
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return this.selectedCountInfo.num
|
|
return this.selectedCountInfo.num
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -359,29 +409,33 @@ export default {
|
|
const basicReg = this.phoneRegPass && !this.noSelect && this.autoPass
|
|
const basicReg = this.phoneRegPass && !this.noSelect && this.autoPass
|
|
if (this.buyType === 'buy') {
|
|
if (this.buyType === 'buy') {
|
|
return basicReg
|
|
return basicReg
|
|
- } else if (this.buyType === 'upgrade') {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (this.buyType === 'upgrade') {
|
|
if (this.oldVip) {
|
|
if (this.oldVip) {
|
|
return basicReg && this.canUpgrade && this.oldVip
|
|
return basicReg && this.canUpgrade && this.oldVip
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return basicReg && (this.canUpgrade || this.oldVip)
|
|
return basicReg && (this.canUpgrade || this.oldVip)
|
|
}
|
|
}
|
|
- } else if (this.buyType === 'renew') {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (this.buyType === 'renew') {
|
|
return basicReg && this.computedPrice.pay > 0
|
|
return basicReg && this.computedPrice.pay > 0
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
availableCouponList() {
|
|
availableCouponList() {
|
|
const list = this.couponList
|
|
const list = this.couponList
|
|
return list
|
|
return list
|
|
- .filter((v) => v?.usable)
|
|
|
|
|
|
+ .filter(v => v?.usable)
|
|
.sort((a, b) => a.discount - b.discount)
|
|
.sort((a, b) => a.discount - b.discount)
|
|
},
|
|
},
|
|
unavailableCouponList() {
|
|
unavailableCouponList() {
|
|
const list = this.couponList
|
|
const list = this.couponList
|
|
const now = Date.now() / 1000
|
|
const now = Date.now() / 1000
|
|
// 不可用优惠优先展示进行中优惠,之后展示预热优惠。两类优惠按照优惠力度从从大到小展示
|
|
// 不可用优惠优先展示进行中优惠,之后展示预热优惠。两类优惠按照优惠力度从从大到小展示
|
|
- const unavailableList = list.filter((v) => !v?.usable)
|
|
|
|
|
|
+ const unavailableList = list.filter(v => !v?.usable)
|
|
// 预热优惠
|
|
// 预热优惠
|
|
const preArr = []
|
|
const preArr = []
|
|
// 进行中优惠
|
|
// 进行中优惠
|
|
@@ -391,9 +445,11 @@ export default {
|
|
unavailableList.forEach((item) => {
|
|
unavailableList.forEach((item) => {
|
|
if (item.starttime < now) {
|
|
if (item.starttime < now) {
|
|
preArr.push(item)
|
|
preArr.push(item)
|
|
- } else if (item.starttime > now && item.endtime < now) {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (item.starttime > now && item.endtime < now) {
|
|
penArr.push(item)
|
|
penArr.push(item)
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
otherArr.push(item)
|
|
otherArr.push(item)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -409,43 +465,12 @@ export default {
|
|
isDiscounts() {
|
|
isDiscounts() {
|
|
console.log(JSON.stringify(this.activity))
|
|
console.log(JSON.stringify(this.activity))
|
|
return (
|
|
return (
|
|
- this.activity &&
|
|
|
|
- this.activity.stockNumber &&
|
|
|
|
- this.activity.stockNumber > 0
|
|
|
|
|
|
+ this.activity
|
|
|
|
+ && this.activity.stockNumber
|
|
|
|
+ && this.activity.stockNumber > 0
|
|
)
|
|
)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- beforeRouteEnter(to, from, next) {
|
|
|
|
- console.log(to.query)
|
|
|
|
- const map = {
|
|
|
|
- buy: '开通',
|
|
|
|
- renew: '续费',
|
|
|
|
- upgrade: '升级'
|
|
|
|
- }
|
|
|
|
- const title = document.title
|
|
|
|
- const { type } = to.query || {}
|
|
|
|
- if (type && map[type]) {
|
|
|
|
- // 修改头部高亮
|
|
|
|
- document.title = `${map[type]}超级订阅`
|
|
|
|
- }
|
|
|
|
- next((vm) => {
|
|
|
|
- vm.preTitle = title
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- beforeRouteUpdate(to, from, next) {
|
|
|
|
- this.$nextTick(async () => {
|
|
|
|
- this.getType()
|
|
|
|
- await this.getUserBuyInfo()
|
|
|
|
- await this.commodityDetail()
|
|
|
|
- await this.updatePrice()
|
|
|
|
- this.getUserAccountInfo()
|
|
|
|
- })
|
|
|
|
- next()
|
|
|
|
- },
|
|
|
|
- beforeRouteLeave(to, from, next) {
|
|
|
|
- document.title = this.preTitle
|
|
|
|
- next()
|
|
|
|
- },
|
|
|
|
async created() {
|
|
async created() {
|
|
// this.initAdjustTime()
|
|
// this.initAdjustTime()
|
|
this.setIntervalFn()
|
|
this.setIntervalFn()
|
|
@@ -461,7 +486,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()
|
|
},
|
|
},
|
|
destroyed() {
|
|
destroyed() {
|
|
@@ -469,11 +495,12 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
getType() {
|
|
getType() {
|
|
- var { type, token, phone } = this.$route.query
|
|
|
|
- var types = ['buy', 'upgrade', 'renew']
|
|
|
|
|
|
+ const { type, token, phone } = this.$route.query
|
|
|
|
+ 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) {
|
|
@@ -485,9 +512,11 @@ export default {
|
|
if (this.buyType === 'upgrade') {
|
|
if (this.buyType === 'upgrade') {
|
|
this.moduleShow.areaSelector = true
|
|
this.moduleShow.areaSelector = true
|
|
this.moduleShow.specList = false
|
|
this.moduleShow.specList = false
|
|
- } else if (this.buyType === 'renew') {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (this.buyType === 'renew') {
|
|
this.moduleShow.areaSelector = false
|
|
this.moduleShow.areaSelector = false
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.moduleShow.areaSelector = true
|
|
this.moduleShow.areaSelector = true
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -505,7 +534,8 @@ export default {
|
|
if (count === '1') {
|
|
if (count === '1') {
|
|
this.selectInfo.area = { 安徽: [] }
|
|
this.selectInfo.area = { 安徽: [] }
|
|
this.$refs.areaSelector.content.setCitySelected(this.selectInfo.area)
|
|
this.$refs.areaSelector.content.setCitySelected(this.selectInfo.area)
|
|
- } else if (count === '-1') {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (count === '-1') {
|
|
this.selectInfo.area = {}
|
|
this.selectInfo.area = {}
|
|
this.$refs.areaSelector.content.setCitySelected(this.selectInfo.area)
|
|
this.$refs.areaSelector.content.setCitySelected(this.selectInfo.area)
|
|
}
|
|
}
|
|
@@ -515,9 +545,11 @@ export default {
|
|
if (this.buyType === 'upgrade') {
|
|
if (this.buyType === 'upgrade') {
|
|
this.getInitSpec()
|
|
this.getInitSpec()
|
|
// this.specChange({})
|
|
// this.specChange({})
|
|
- } else if (this.buyType === 'renew') {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (this.buyType === 'renew') {
|
|
this.getInitSpec()
|
|
this.getInitSpec()
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
// 设置城市选择器所有不选中
|
|
// 设置城市选择器所有不选中
|
|
if (!this.selectInfo.area) {
|
|
if (!this.selectInfo.area) {
|
|
this.$refs.areaSelector.content.setAllNoSelected()
|
|
this.$refs.areaSelector.content.setAllNoSelected()
|
|
@@ -536,7 +568,7 @@ export default {
|
|
productType: '超级订阅',
|
|
productType: '超级订阅',
|
|
spec: {
|
|
spec: {
|
|
area: this.selectInfo.area,
|
|
area: this.selectInfo.area,
|
|
- orderType: orderType
|
|
|
|
|
|
+ orderType
|
|
}
|
|
}
|
|
})
|
|
})
|
|
if (!goodsInfo.data) {
|
|
if (!goodsInfo.data) {
|
|
@@ -549,14 +581,16 @@ export default {
|
|
// 商品信息 start
|
|
// 商品信息 start
|
|
e.sku.forEach((ele) => {
|
|
e.sku.forEach((ele) => {
|
|
const item = {}
|
|
const item = {}
|
|
- if (e.title.indexOf('超级订阅') > -1) {
|
|
|
|
- if (ele.info.indexOf('月') > -1) {
|
|
|
|
|
|
+ if (e.title.includes('超级订阅')) {
|
|
|
|
+ if (ele.info.includes('月')) {
|
|
item.cycleType = 1
|
|
item.cycleType = 1
|
|
item.value = '1个月'
|
|
item.value = '1个月'
|
|
- } else if (ele.info.indexOf('季') > -1) {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (ele.info.includes('季')) {
|
|
item.cycleType = 2
|
|
item.cycleType = 2
|
|
item.value = '1季'
|
|
item.value = '1季'
|
|
- } else if (ele.info.indexOf('年') > -1) {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (ele.info.includes('年')) {
|
|
item.cycleType = 3
|
|
item.cycleType = 3
|
|
item.value = '1年'
|
|
item.value = '1年'
|
|
}
|
|
}
|
|
@@ -565,8 +599,8 @@ export default {
|
|
item.price = ele.originalPrice / 100
|
|
item.price = ele.originalPrice / 100
|
|
item.productionId = ele.productId
|
|
item.productionId = ele.productId
|
|
item._data = ele
|
|
item._data = ele
|
|
- const rules =
|
|
|
|
- type === 'updata'
|
|
|
|
|
|
+ const rules
|
|
|
|
+ = type === 'updata'
|
|
? this.specIdActive === ele.productId
|
|
? this.specIdActive === ele.productId
|
|
: ele.choosed
|
|
: ele.choosed
|
|
if (rules) {
|
|
if (rules) {
|
|
@@ -593,21 +627,23 @@ export default {
|
|
// this.isActivity = false
|
|
// this.isActivity = false
|
|
// }
|
|
// }
|
|
if (
|
|
if (
|
|
- Date.now() < this.activity.endTime &&
|
|
|
|
- (this.activity.activityType === 3 ||
|
|
|
|
- this.activity.activityType === 4 ||
|
|
|
|
- this.activity.activityType === 5)
|
|
|
|
|
|
+ Date.now() < this.activity.endTime
|
|
|
|
+ && (this.activity.activityType === 3
|
|
|
|
+ || this.activity.activityType === 4
|
|
|
|
+ || this.activity.activityType === 5)
|
|
) {
|
|
) {
|
|
this.isActivity = true
|
|
this.isActivity = true
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.isActivity = false
|
|
this.isActivity = false
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
- Date.now() > a.preStartTime * 1000 &&
|
|
|
|
- a.preStartTime
|
|
|
|
|
|
+ Date.now() > a.preStartTime * 1000
|
|
|
|
+ && a.preStartTime
|
|
) {
|
|
) {
|
|
this.preStart = true
|
|
this.preStart = true
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.preStart = false
|
|
this.preStart = false
|
|
}
|
|
}
|
|
if (d.tag) {
|
|
if (d.tag) {
|
|
@@ -620,11 +656,13 @@ export default {
|
|
couponList.push(d)
|
|
couponList.push(d)
|
|
})
|
|
})
|
|
})
|
|
})
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.couponActiveItem = {}
|
|
this.couponActiveItem = {}
|
|
this.isActivity = false
|
|
this.isActivity = false
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
if (ele.activity) {
|
|
if (ele.activity) {
|
|
ele.activity.forEach((a) => {
|
|
ele.activity.forEach((a) => {
|
|
a.discount.forEach((d) => {
|
|
a.discount.forEach((d) => {
|
|
@@ -648,7 +686,8 @@ export default {
|
|
})
|
|
})
|
|
if (this.specList.length === 0) {
|
|
if (this.specList.length === 0) {
|
|
this.moduleShow.specList = false
|
|
this.moduleShow.specList = false
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
if (this.buyType !== 'upgrade') {
|
|
if (this.buyType !== 'upgrade') {
|
|
this.moduleShow.specList = true
|
|
this.moduleShow.specList = true
|
|
}
|
|
}
|
|
@@ -659,15 +698,17 @@ export default {
|
|
this.calcSpecPrice() // 计算每日价格
|
|
this.calcSpecPrice() // 计算每日价格
|
|
try {
|
|
try {
|
|
callback()
|
|
callback()
|
|
- } catch (e) {}
|
|
|
|
|
|
+ }
|
|
|
|
+ catch (e) {}
|
|
},
|
|
},
|
|
async updataTips(item) {
|
|
async updataTips(item) {
|
|
const { _data } = item
|
|
const { _data } = item
|
|
// 获取默认优惠角标
|
|
// 获取默认优惠角标
|
|
const defaultCouponInfo = this.couponList.find(
|
|
const defaultCouponInfo = this.couponList.find(
|
|
- (coupon) => coupon.lotteryId === _data.lotteryId
|
|
|
|
|
|
+ coupon => coupon.lotteryId === _data.lotteryId
|
|
)
|
|
)
|
|
- if (!defaultCouponInfo) return
|
|
|
|
|
|
+ if (!defaultCouponInfo)
|
|
|
|
+ return
|
|
// 更新角标信息
|
|
// 更新角标信息
|
|
this.specList.forEach((s) => {
|
|
this.specList.forEach((s) => {
|
|
if (_data.productId === s.id) {
|
|
if (_data.productId === s.id) {
|
|
@@ -681,11 +722,11 @@ export default {
|
|
let tipText = ''
|
|
let tipText = ''
|
|
const couponListItem = []
|
|
const couponListItem = []
|
|
const chooseList = await commodityDiscounts({
|
|
const chooseList = await commodityDiscounts({
|
|
- id: id,
|
|
|
|
|
|
+ id,
|
|
productType: '超级订阅',
|
|
productType: '超级订阅',
|
|
spec: {
|
|
spec: {
|
|
area: this.selectInfo.area,
|
|
area: this.selectInfo.area,
|
|
- orderType: orderType
|
|
|
|
|
|
+ orderType
|
|
}
|
|
}
|
|
})
|
|
})
|
|
chooseList.data.forEach((e) => {
|
|
chooseList.data.forEach((e) => {
|
|
@@ -712,18 +753,20 @@ export default {
|
|
// this.isActivity = false
|
|
// this.isActivity = false
|
|
// }
|
|
// }
|
|
if (
|
|
if (
|
|
- Date.now() < this.activity.endTime &&
|
|
|
|
- (this.activity.activityType === 3 ||
|
|
|
|
- this.activity.activityType === 4 ||
|
|
|
|
- this.activity.activityType === 5)
|
|
|
|
|
|
+ Date.now() < this.activity.endTime
|
|
|
|
+ && (this.activity.activityType === 3
|
|
|
|
+ || this.activity.activityType === 4
|
|
|
|
+ || this.activity.activityType === 5)
|
|
) {
|
|
) {
|
|
this.isActivity = true
|
|
this.isActivity = true
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.isActivity = false
|
|
this.isActivity = false
|
|
}
|
|
}
|
|
if (Date.now() > a.preStartTime * 1000 && a.preStartTime) {
|
|
if (Date.now() > a.preStartTime * 1000 && a.preStartTime) {
|
|
this.preStart = true
|
|
this.preStart = true
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.preStart = false
|
|
this.preStart = false
|
|
}
|
|
}
|
|
if (d.tag) {
|
|
if (d.tag) {
|
|
@@ -731,7 +774,8 @@ export default {
|
|
}
|
|
}
|
|
this.couponActiveItem = d
|
|
this.couponActiveItem = d
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
d.choosed = false
|
|
d.choosed = false
|
|
if (d.lotteryId === this.couponActiveItem.lotteryId) {
|
|
if (d.lotteryId === this.couponActiveItem.lotteryId) {
|
|
// 商品选中的券确定当前选中活动
|
|
// 商品选中的券确定当前选中活动
|
|
@@ -744,18 +788,20 @@ export default {
|
|
this.activity.status = a.isAppointment
|
|
this.activity.status = a.isAppointment
|
|
this.activity.productId = ele.productId
|
|
this.activity.productId = ele.productId
|
|
if (
|
|
if (
|
|
- Date.now() < this.activity.endTime &&
|
|
|
|
- (this.activity.activityType === 3 ||
|
|
|
|
- this.activity.activityType === 4 ||
|
|
|
|
- this.activity.activityType === 5)
|
|
|
|
|
|
+ Date.now() < this.activity.endTime
|
|
|
|
+ && (this.activity.activityType === 3
|
|
|
|
+ || this.activity.activityType === 4
|
|
|
|
+ || this.activity.activityType === 5)
|
|
) {
|
|
) {
|
|
this.isActivity = true
|
|
this.isActivity = true
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.isActivity = false
|
|
this.isActivity = false
|
|
}
|
|
}
|
|
if (Date.now() > a.preStartTime * 1000 && a.preStartTime) {
|
|
if (Date.now() > a.preStartTime * 1000 && a.preStartTime) {
|
|
this.preStart = true
|
|
this.preStart = true
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.preStart = false
|
|
this.preStart = false
|
|
}
|
|
}
|
|
if (d.tag) {
|
|
if (d.tag) {
|
|
@@ -769,7 +815,8 @@ export default {
|
|
couponListItem.push(d)
|
|
couponListItem.push(d)
|
|
})
|
|
})
|
|
})
|
|
})
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.couponActiveItem = {}
|
|
this.couponActiveItem = {}
|
|
this.isActivity = false
|
|
this.isActivity = false
|
|
}
|
|
}
|
|
@@ -785,7 +832,8 @@ export default {
|
|
this.couponList = couponListItem
|
|
this.couponList = couponListItem
|
|
try {
|
|
try {
|
|
callback()
|
|
callback()
|
|
- } catch (e) {}
|
|
|
|
|
|
+ }
|
|
|
|
+ catch (e) {}
|
|
},
|
|
},
|
|
async updatePrice() {
|
|
async updatePrice() {
|
|
// 计算价格接口
|
|
// 计算价格接口
|
|
@@ -799,7 +847,7 @@ export default {
|
|
productId: this.specActiveItem.id,
|
|
productId: this.specActiveItem.id,
|
|
spec: {
|
|
spec: {
|
|
area: this.selectInfo.area,
|
|
area: this.selectInfo.area,
|
|
- orderType: orderType,
|
|
|
|
|
|
+ orderType,
|
|
time: this.specActiveItem.value
|
|
time: this.specActiveItem.value
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -808,14 +856,16 @@ export default {
|
|
this.computedPrice.total = data.originalPrice
|
|
this.computedPrice.total = data.originalPrice
|
|
this.computedPrice.pay = data.discountPrice
|
|
this.computedPrice.pay = data.discountPrice
|
|
this.computedPrice.discount = data.discountAmount
|
|
this.computedPrice.discount = data.discountAmount
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.computedPrice.total = 0
|
|
this.computedPrice.total = 0
|
|
this.computedPrice.pay = 0
|
|
this.computedPrice.pay = 0
|
|
this.computedPrice.discount = 0
|
|
this.computedPrice.discount = 0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
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) {
|
|
@@ -829,7 +879,8 @@ export default {
|
|
if (data) {
|
|
if (data) {
|
|
if (data.breakRenewTip > 0 && this.buyType === 'buy') {
|
|
if (data.breakRenewTip > 0 && this.buyType === 'buy') {
|
|
this.buyDialog = true
|
|
this.buyDialog = true
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.buyDialog = false
|
|
this.buyDialog = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -849,10 +900,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
|
|
}
|
|
}
|
|
@@ -876,7 +927,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,
|
|
@@ -898,13 +950,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
|
|
@@ -962,7 +1016,8 @@ export default {
|
|
this.$set(e, 'tipText', '')
|
|
this.$set(e, 'tipText', '')
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
await this.chooseGoods('updata', this.couponActiveItem.productId)
|
|
await this.chooseGoods('updata', this.couponActiveItem.productId)
|
|
}
|
|
}
|
|
this.loading = false
|
|
this.loading = false
|
|
@@ -971,26 +1026,26 @@ export default {
|
|
|
|
|
|
commonGetPrice(price, cycleType) {
|
|
commonGetPrice(price, cycleType) {
|
|
const priceInfo = {
|
|
const priceInfo = {
|
|
- price: price,
|
|
|
|
|
|
+ price,
|
|
perDayPrice: 0
|
|
perDayPrice: 0
|
|
}
|
|
}
|
|
switch (cycleType) {
|
|
switch (cycleType) {
|
|
// 1个月
|
|
// 1个月
|
|
case 1: {
|
|
case 1: {
|
|
- priceInfo.perDayPrice =
|
|
|
|
- price === 0 ? 0 : (priceInfo.price / 30).toFixed(2)
|
|
|
|
|
|
+ priceInfo.perDayPrice
|
|
|
|
+ = price === 0 ? 0 : (priceInfo.price / 30).toFixed(2)
|
|
break
|
|
break
|
|
}
|
|
}
|
|
// 1个季度
|
|
// 1个季度
|
|
case 2: {
|
|
case 2: {
|
|
- priceInfo.perDayPrice =
|
|
|
|
- price === 0 ? 0 : (priceInfo.price / (30 * 3)).toFixed(2)
|
|
|
|
|
|
+ priceInfo.perDayPrice
|
|
|
|
+ = price === 0 ? 0 : (priceInfo.price / (30 * 3)).toFixed(2)
|
|
break
|
|
break
|
|
}
|
|
}
|
|
// 1年
|
|
// 1年
|
|
case 3: {
|
|
case 3: {
|
|
- priceInfo.perDayPrice =
|
|
|
|
- price === 0 ? 0 : (priceInfo.price / 365).toFixed(2)
|
|
|
|
|
|
+ priceInfo.perDayPrice
|
|
|
|
+ = price === 0 ? 0 : (priceInfo.price / 365).toFixed(2)
|
|
break
|
|
break
|
|
}
|
|
}
|
|
default: {
|
|
default: {
|
|
@@ -1027,10 +1082,12 @@ export default {
|
|
time: this.specActiveItem.value,
|
|
time: this.specActiveItem.value,
|
|
orderType: 1
|
|
orderType: 1
|
|
}
|
|
}
|
|
- } else if (this.buyType === 'upgrade') {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (this.buyType === 'upgrade') {
|
|
if (buyInfo.buyset && buyInfo.buyset.upgrade === 1) {
|
|
if (buyInfo.buyset && buyInfo.buyset.upgrade === 1) {
|
|
// buyInfo.buyset.upgrade === 1新版本升级
|
|
// buyInfo.buyset.upgrade === 1新版本升级
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
// 旧版本超级订阅升级
|
|
// 旧版本超级订阅升级
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1039,13 +1096,15 @@ export default {
|
|
area: JSON.stringify(selectArea),
|
|
area: JSON.stringify(selectArea),
|
|
orderType: 3
|
|
orderType: 3
|
|
}
|
|
}
|
|
- } else if (this.buyType === 'renew') {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (this.buyType === 'renew') {
|
|
return {
|
|
return {
|
|
...param,
|
|
...param,
|
|
time: this.specActiveItem.value,
|
|
time: this.specActiveItem.value,
|
|
orderType: 2
|
|
orderType: 2
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
return {}
|
|
return {}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -1081,7 +1140,7 @@ export default {
|
|
activityType:
|
|
activityType:
|
|
this.couponActiveItem.type === null ? -1 : this.couponActiveItem.type,
|
|
this.couponActiveItem.type === null ? -1 : this.couponActiveItem.type,
|
|
data: {
|
|
data: {
|
|
- type: type,
|
|
|
|
|
|
+ type,
|
|
order_phone: this.userInfo.phone,
|
|
order_phone: this.userInfo.phone,
|
|
disWord: ''
|
|
disWord: ''
|
|
}
|
|
}
|
|
@@ -1095,7 +1154,6 @@ export default {
|
|
return createCommonOrder(t)
|
|
return createCommonOrder(t)
|
|
},
|
|
},
|
|
async submit() {
|
|
async submit() {
|
|
- // eslint-disable-next-line
|
|
|
|
const { data, error_msg } = await this.submitXHR()
|
|
const { data, error_msg } = await this.submitXHR()
|
|
if (data) {
|
|
if (data) {
|
|
if (this.token) {
|
|
if (this.token) {
|
|
@@ -1107,14 +1165,16 @@ export default {
|
|
this.autoPass = true
|
|
this.autoPass = true
|
|
if (data.needPay) {
|
|
if (data.needPay) {
|
|
window.open(`/front/subvip/orderPay/${orderCode}`)
|
|
window.open(`/front/subvip/orderPay/${orderCode}`)
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
window.open(
|
|
window.open(
|
|
- `/front/subvip/paySuccess/${orderCode}?payTime=${parseInt(
|
|
|
|
|
|
+ `/front/subvip/paySuccess/${orderCode}?payTime=${Number.parseInt(
|
|
Date.now() / 1000
|
|
Date.now() / 1000
|
|
)}&from=vipUPgrade`
|
|
)}&from=vipUPgrade`
|
|
)
|
|
)
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.$toast(error_msg)
|
|
this.$toast(error_msg)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -1128,7 +1188,8 @@ export default {
|
|
this.$toast(
|
|
this.$toast(
|
|
'预约成功,活动开始前10分钟,将通过站内信再次通知您,请注意查收'
|
|
'预约成功,活动开始前10分钟,将通过站内信再次通知您,请注意查收'
|
|
)
|
|
)
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.$toast(msg)
|
|
this.$toast(msg)
|
|
}
|
|
}
|
|
this.appointmentStatus = data.status
|
|
this.appointmentStatus = data.status
|
|
@@ -1174,11 +1235,13 @@ export default {
|
|
// console.log('活动未开始')
|
|
// console.log('活动未开始')
|
|
// this.updatePrice()
|
|
// this.updatePrice()
|
|
this.changeSubmitText(false)
|
|
this.changeSubmitText(false)
|
|
- } else if (this.serverInitTime === startTime) {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (this.serverInitTime === startTime) {
|
|
this.updatePrice()
|
|
this.updatePrice()
|
|
- } else if (
|
|
|
|
- this.serverInitTime >= startTime &&
|
|
|
|
- this.serverInitTime < endTime
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (
|
|
|
|
+ this.serverInitTime >= startTime
|
|
|
|
+ && this.serverInitTime < endTime
|
|
) {
|
|
) {
|
|
// 活动开始
|
|
// 活动开始
|
|
// console.log('活动开始')
|
|
// console.log('活动开始')
|
|
@@ -1189,11 +1252,13 @@ export default {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
if (stockNumber && stockNumber > 0) {
|
|
if (stockNumber && stockNumber > 0) {
|
|
this.changeSubmitText(true)
|
|
this.changeSubmitText(true)
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
this.changeSubmitText(false)
|
|
this.changeSubmitText(false)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- } else if (this.serverInitTime >= endTime) {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (this.serverInitTime >= endTime) {
|
|
// 活动结束
|
|
// 活动结束
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
this.isActivity = false
|
|
this.isActivity = false
|
|
@@ -1208,9 +1273,11 @@ export default {
|
|
getOrdertype(v) {
|
|
getOrdertype(v) {
|
|
if (v === 'buy') {
|
|
if (v === 'buy') {
|
|
return 1
|
|
return 1
|
|
- } else if (v === 'upgrade') {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (v === 'upgrade') {
|
|
return 3
|
|
return 3
|
|
- } else if (v === 'renew') {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if (v === 'renew') {
|
|
return 2
|
|
return 2
|
|
}
|
|
}
|
|
}
|
|
}
|