|
@@ -115,15 +115,15 @@ var purchase = {
|
|
|
this.nowBuyset = getBuySet(purchase.areaSelect, purchase.industrySelect, this.price);
|
|
|
var old = this.oldBuySet
|
|
|
//初始化 非试用用户 已经购买了 1个省份 两个省份【1个城市、两个城市】 3个行业 非升级版超级订阅
|
|
|
- // 选择完区域回显后 需判断选择省份结果与原购买的省份结果进行对比,取最多的值
|
|
|
- if (purchase.nowBuyset.areacount == -1) {
|
|
|
- old.areacount = -1
|
|
|
- } else {
|
|
|
- if (purchase.nowBuyset.areacount > old.areacount) {
|
|
|
- old.areacount = purchase.nowBuyset.areacount
|
|
|
- }
|
|
|
- }
|
|
|
- Calculation.Init(this.isTrial,new Buyset(old.areacount, old.newcitys, old.buyerclasscount,old.upgrade),this.renewList, undefined, this.endTime)
|
|
|
+ // 选择完区域回显后 需判断选择省份结果与原购买的省份结果进行对比,取最多的值
|
|
|
+ // if (purchase.nowBuyset.areacount == -1) {
|
|
|
+ // old.areacount = -1
|
|
|
+ // } else {
|
|
|
+ // if (purchase.nowBuyset.areacount > old.areacount) {
|
|
|
+ // old.areacount = purchase.nowBuyset.areacount
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ Calculation.Init(this.isTrial,new Buyset(old.areacount, old.newcitys, old.buyerclasscount,old.upgrade),this.renewList, purchase.price, this.endTime)
|
|
|
},
|
|
|
showArea: function () {
|
|
|
if (!$.isEmptyObject(this.areaSelect) && !this.areaSelect["一个省"]) { //有选择
|
|
@@ -209,16 +209,18 @@ var purchase = {
|
|
|
3.当前选择的省份数量小于原省份数量 则按原省份数量
|
|
|
总:按照选择最多省份数量的计算
|
|
|
*/
|
|
|
+ console.log(obj, 'obj')
|
|
|
if (this.oldBuySet.areacount == -1) {
|
|
|
$('[data-upgrade-to-area]').attr('href', 'javascript:;')
|
|
|
// $('[data-upgrade-to-area] .iconfont').hide()
|
|
|
obj.areacount = -1
|
|
|
} else {
|
|
|
// 如果原购买的省份数量大于当前选择的 则按最大的数量走
|
|
|
- if (this.oldBuySet.areacount > obj.areacount) {
|
|
|
+ if (obj.areacount != -1 && this.oldBuySet.areacount > obj.areacount) {
|
|
|
obj.areacount = this.oldBuySet.areacount
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
var price = Calculation.GetUpgradeDetail(new Buyset(obj.areacount,[],obj.buyerclasscount,1), time)
|
|
|
var givePrice = Calculation.GetUpgradeDetail(new Buyset(obj.areacount,[],obj.buyerclasscount,1), [time[1] === 1 ? 1 : time[0], time[1]])
|
|
|
console.log(typeof price,price, 'price')
|