|
@@ -310,6 +310,26 @@ export default {
|
|
|
this.getUserBuyInfo()
|
|
|
}
|
|
|
},
|
|
|
+ getInitSpec () {
|
|
|
+ const { cycle, count } = this.$route.query
|
|
|
+ const passCycleArr = ['0', '1', '2']
|
|
|
+ const passCountArr = ['1', '-1']
|
|
|
+ // 设置周期
|
|
|
+ if (passCycleArr.includes(cycle)) {
|
|
|
+ this.specIdActive = this.specList[cycle].id
|
|
|
+ }
|
|
|
+ // 设置省份数量(仅支持1个或者全国)
|
|
|
+ if (passCountArr.includes(count)) {
|
|
|
+ if (count === '1') {
|
|
|
+ this.selectInfo.area = { 安徽: [] }
|
|
|
+ this.$refs.areaSelector.content.setCitySelected(this.selectInfo.area)
|
|
|
+ } else if (count === '-1') {
|
|
|
+ this.selectInfo.area = {}
|
|
|
+ this.$refs.areaSelector.content.setCitySelected(this.selectInfo.area)
|
|
|
+ }
|
|
|
+ this.calcSpecPrice(this.selectedCount)
|
|
|
+ }
|
|
|
+ },
|
|
|
init () {
|
|
|
if (this.buyType === 'upgrade') {
|
|
|
// this.specChange(this.specList[2])
|
|
@@ -321,6 +341,7 @@ export default {
|
|
|
this.specIdActive = this.specList[2].id
|
|
|
}
|
|
|
this.calcSpecPrice(1)
|
|
|
+ this.getInitSpec()
|
|
|
},
|
|
|
async getGoodsPrice () {
|
|
|
const priceInfo = await getGoodsPrice()
|