|
@@ -264,12 +264,10 @@ var vm = new Vue({
|
|
|
var productType = order.product_type
|
|
|
var platform = this.platform
|
|
|
var headerImgUrl = ''
|
|
|
- if (productType === '省份订阅包') {
|
|
|
- headerImgUrl = assetsConf.areaPackLink.imgMap.headerImg[platform]
|
|
|
- }else if (productType === '数据流量包') {
|
|
|
- headerImgUrl = assetsConf.dataPackLink.imgMap.headerImg[platform]
|
|
|
+ var productKey = assetsConf.productionTypeMap[productType]
|
|
|
+ if (productKey) {
|
|
|
+ headerImgUrl = assetsConf[productKey].imgMap.headerImg[platform]
|
|
|
}
|
|
|
-
|
|
|
return headerImgUrl
|
|
|
},
|
|
|
getSurplusTimeTime: function (order) {
|
|
@@ -422,80 +420,37 @@ var vm = new Vue({
|
|
|
})
|
|
|
},
|
|
|
onConfirmPay: function () {
|
|
|
- var order = this.reqOrder
|
|
|
- var productType = order.product_type
|
|
|
- var orderCode = order.order_code
|
|
|
- var platform = this.platform
|
|
|
- switch (productType) {
|
|
|
- case '数据流量包': {
|
|
|
- var href = assetsConf.dataPackLink.pay[platform]
|
|
|
- if (href) {
|
|
|
- this.goToLink(`${href}?orderCode=${orderCode}`)
|
|
|
- }
|
|
|
- break
|
|
|
- }
|
|
|
- case '省份订阅包': {
|
|
|
- var href = assetsConf.areaPackLink.pay[platform]
|
|
|
- if (href) {
|
|
|
- this.goToLink(`${href}?orderCode=${orderCode}`)
|
|
|
- }
|
|
|
- break
|
|
|
- }
|
|
|
- default: {
|
|
|
- break
|
|
|
- }
|
|
|
+ var link = this.getPublicLinkOfKey(this.reqOrder.product_type, 'pay')
|
|
|
+ if (link) {
|
|
|
+ this.goToLink(`${link}?orderCode=${orderCode}`)
|
|
|
}
|
|
|
},
|
|
|
- renew: function () {
|
|
|
+ getPublicLinkOfKey (productKey, key) {
|
|
|
var order = this.reqOrder
|
|
|
var orderCode = order.order_code
|
|
|
var productType = order.product_type
|
|
|
var platform = this.platform
|
|
|
- switch (productType) {
|
|
|
- case '数据流量包': {
|
|
|
- var href = assetsConf.dataPackLink.renew[platform]
|
|
|
- if (href) {
|
|
|
- this.goToLink(`${href}?orderCode=${orderCode}`)
|
|
|
- }
|
|
|
- break
|
|
|
- }
|
|
|
- case '省份订阅包': {
|
|
|
- var href = assetsConf.areaPackLink.renew[platform]
|
|
|
- if (href) {
|
|
|
- this.goToLink(`${href}&orderCode=${orderCode}`)
|
|
|
- }
|
|
|
- break
|
|
|
- }
|
|
|
- default: {
|
|
|
- break
|
|
|
+ var productKey = assetsConf.productionTypeMap[productType]
|
|
|
+ var tempValue = ''
|
|
|
+ if (productKey) {
|
|
|
+ try {
|
|
|
+ tempValue = assetsConf[productKey][key][platform]
|
|
|
+ } catch (e) {
|
|
|
+ console.warn(e)
|
|
|
}
|
|
|
}
|
|
|
+ return tempValue
|
|
|
+ },
|
|
|
+ renew: function () {
|
|
|
+ var link = this.getPublicLinkOfKey(this.reqOrder.product_type, 'renew')
|
|
|
+ if (link) {
|
|
|
+ this.goToLink(`${link}?orderCode=${orderCode}`)
|
|
|
+ }
|
|
|
},
|
|
|
buyAgain: function () {
|
|
|
- var _this = this
|
|
|
- var order = this.reqOrder
|
|
|
- var productType = order.product_type
|
|
|
- var orderCode = order.order_code
|
|
|
- var platform = this.platform
|
|
|
-
|
|
|
- switch (productType) {
|
|
|
- case '数据流量包': {
|
|
|
- var href = assetsConf.dataPackLink.buyAgain[platform]
|
|
|
- if (href) {
|
|
|
- this.goToLink(`${href}?orderCode=${orderCode}`)
|
|
|
- }
|
|
|
- break
|
|
|
- }
|
|
|
- case '省份订阅包': {
|
|
|
- var href = assetsConf.areaPackLink.buyAgain[platform]
|
|
|
- if (href) {
|
|
|
- this.goToLink(`${href}&orderCode=${orderCode}`)
|
|
|
- }
|
|
|
- break
|
|
|
- }
|
|
|
- default: {
|
|
|
- break
|
|
|
- }
|
|
|
+ var link = this.getPublicLinkOfKey(this.reqOrder.product_type, 'buyAgain')
|
|
|
+ if (link) {
|
|
|
+ this.goToLink(`${link}?orderCode=${orderCode}`)
|
|
|
}
|
|
|
},
|
|
|
getProductInfoList: function (info) {
|