浏览代码

Merge branch 'dev4.5' of http://192.168.3.207:8080/qmx/jy into dev4.5

zhangyuhan 4 年之前
父节点
当前提交
f1896e7206

+ 16 - 12
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_order_detail.js

@@ -271,10 +271,12 @@ $(function () {
             }
 
             //升级续费
+            var effectiveBool = true; 
             var fnewBuyset = filterObj.newBuyset;
             if (!$.isEmptyObject(fnewBuyset)) {
                 //续费升级逻辑修改后判断是否不延期
                 if (filterObj.cycleunit == 0 && filterObj.cyclecount == 0) {
+                	effectiveBool = false;
                     $(".cyclecount").text("不延期");
                 }
             }
@@ -350,23 +352,25 @@ $(function () {
                     $(".line_paytime").css("display", "none");
                 }
 
-                //有效周期
-                $(".line_cycle").css("display", "");
-                //有效日期
-                if (r.data.time.vip_starttime && r.data.time.vip_endtime) {
-                    var vip_starttime = r.data.time.vip_starttime + "";
-                    var vip_endtime = r.data.time.vip_endtime + "";
-                    vip_starttime = vip_starttime.split(" ")[0].replace(/-/g, ".");
-                    vip_endtime = vip_endtime.split(" ")[0].replace(/-/g, ".");
-                    var serviceTime = vip_starttime + " - " + vip_endtime;
-                    $(".serviceTime").text(serviceTime)
+				if (effectiveBool){
+	                //有效周期
+	                $(".line_cycle").css("display", "");
+	                //有效日期
+	                if (r.data.time.vip_starttime && r.data.time.vip_endtime) {
+	                    var vip_starttime = r.data.time.vip_starttime + "";
+	                    var vip_endtime = r.data.time.vip_endtime + "";
+	                    vip_starttime = vip_starttime.split(" ")[0].replace(/-/g, ".");
+	                    vip_endtime = vip_endtime.split(" ")[0].replace(/-/g, ".");
+	                    var serviceTime = vip_starttime + " - " + vip_endtime;
+	                    $(".serviceTime").text(serviceTime)
+	                }
                 }
                 //支付方式
-                if (r.data.order.pay_way.indexOf("wx") > -1) {
+                if (r.data.order.pay_way&&r.data.order.pay_way.indexOf("wx") > -1) {
                     $(".line_payway").css("display", "");
                     $(".payWay").text("微信支付");
                     pay_way = "wx_app"
-                } else if (r.data.order.pay_way.indexOf("ali") > -1) {
+                } else if (r.data.order.pay_way&&r.data.order.pay_way.indexOf("ali") > -1) {
                     $(".payWay").text("支付宝支付");
                     $(".line_payway").css("display", "");
                     pay_way = "ali_app"

+ 5 - 2
src/jfw/modules/app/src/web/templates/commonPay/myOrder.html

@@ -1702,8 +1702,11 @@
                         + '<p class="item-ifo ellipsis">订阅周期:' + effectiveduration_vip
                         + (can1111 ? ('&nbsp;+&nbsp;' + '<span style="color: #2ABED1;">赠送' + (giveCycle < 12 ? (giveCycle + '个月') : '1年') + '</span>') : '')
                         + '</p>'
-                        + '<p class="item-ifo ellipsis">有效日期:' + effectivetime_vip + '</p>'
-                        + '</div>'
+                        
+                      if (effectiveduration_vip != "不延期"){
+                        listhtml += '<p class="item-ifo ellipsis">有效日期:' + effectivetime_vip + '</p>';
+                      }
+                      listhtml += '</div>'
                         + '</a>'
                     listhtml += '<div class="price">'
                     if (can1111 || isLiveActive) {

+ 1 - 1
src/jfw/modules/subscribepay/src/entity/subscribeVip.go

@@ -351,7 +351,7 @@ func (this *vipSubscribeStruct) UpgradeSubVip(userId string, vmsg VipSimpleMsg,
 	}
 	updata := map[string]interface{}{
 		"o_vipjy.o_buyset": vmsg.NewBuyset,
-		"l_vip_endtime":    endTime.Unix(),
+		// "l_vip_endtime":    endTime.Unix(),//升级不再续费
 		"i_vip_expire_tip": 0,
 		"i_vip_status":     2,
 	}

+ 1 - 2
src/jfw/modules/subscribepay/src/service/vipSubscribeChange.go

@@ -179,7 +179,7 @@ func (this *SubscribeChange) Upgrade() {
 			filter.Area = area
 		}
 
-		var startTime, endTime time.Time
+		var startTime, endTime time.Time = now, now
 		if needRenew {
 			startTime = now
 			if needRenew {
@@ -198,7 +198,6 @@ func (this *SubscribeChange) Upgrade() {
 		//老用户 0元升级
 		if req_price == 0 && 0 == final_price {
 			if oldBuyset.Upgrade == 0 {
-				order_status = 1
 			} else {
 				return &entity.FuncResult{false, errors.New("超级订阅升级异常"), nil}
 			}

+ 2 - 2
src/jfw/modules/subscribepay/src/util/vrew.go

@@ -260,14 +260,14 @@ func MergeKws(userId string) {
 	}
 }
 
-//m 月 超过一年传12+n月 如14; endtime 当前周期结束时间戳 int64 ;val -   1:年 2:月 3:季度
+//m 月 超过一年传12+n月 如14; endtime 当前周期结束时间戳 int64 ;val -   1:年 2:月 4:季度
 func GetDATE(val int, m int, endtime int64) (_endtime time.Time) {
 	//一年12个月
 	if val == 1 {
 		m = m * 12
 	}
 	//一个季度3个月
-	if val == 3 {
+	if val == 4 {
 		m = m * 3
 	}
 	endFormat := qutil.FormatDateByInt64(&endtime, qutil.Date_Short_Layout)

+ 1 - 1
src/web/templates/pc/entsearchindex.html

@@ -187,7 +187,7 @@
                             @click="toDetail(item.id)"
                             :key="item.id">
                             <div class="ei-i-left">
-                                <div class="ei-i-l-container" :class="randomBgc()">${ item.company_shortname.slice(0,4) }</div>
+                                <div class="ei-i-l-container" :class="randomBgc()">${ item.company_shortname ? item.company_shortname.slice(0,4) : item.company_name.slice(0,4) }</div>
                             </div>
                             <div class="ei-i-right">
                                 <div class="ei-r-title-container flex">

+ 3 - 1
src/web/templates/weixin/commonPay/myOrder.html

@@ -1239,7 +1239,9 @@
                         + '<p class="item-ifo ellipsis">订阅周期:' + effectiveduration_vip
                         + (can1111 ? ('&nbsp;+&nbsp;' + '<span style="color: #2ABED1;">赠送' + (giveCycle < 12 ? (giveCycle + '个月') : '1年') + '</span>') : '')
                         + '</p>'
-                        + '<p class="item-ifo ellipsis">有效日期:' + effectivetime_vip + '</p>';
+                      if (effectiveduration_vip != "不延期"){
+                        listhtml += '<p class="item-ifo ellipsis">有效日期:' + effectivetime_vip + '</p>';
+                      }
                     //}
                     listhtml += '</div></a>'
                     listhtml += '<div class="price">'

+ 20 - 16
src/web/templates/weixin/vipsubscribe/vip_order_detail.html

@@ -460,6 +460,12 @@
 
                 }
 
+                var effectiveBool = true; 
+                //续费升级逻辑修改后判断是否不延期
+                if (filterObj.cycleunit == 0 && filterObj.cyclecount == 0) {
+                  effectiveBool=false;
+                  $(".cyclecount").text("不延期");
+                }
                 //周期
                 if ((r.data.order.vip_starttime != undefined) && (r.data.order.vip_endtime != undefined)) {
                     var start_time_vip = r.data.order.vip_starttime;
@@ -535,10 +541,6 @@
                     } else if (filterObj.cycleunit == -1) {
                         $(".cyclecount").text("不延期");
                     }
-                    //续费升级逻辑修改后判断是否不延期
-                    if (filterObj.cycleunit == 0 && filterObj.cyclecount == 0) {
-                        $(".cyclecount").text("不延期");
-                    }
                     $(".dyqy").text("升级区域:");
                     $(".dyhy").text("升级采购单位行业:");
                     $(".dyzq").text("延长周期:");
@@ -630,23 +632,25 @@
                         $(".line_paytime").css("display", "none");
                     }
 
-                    //有效周期
-                    $(".line_cycle").css("display", "");
-                    //有效日期
-                    if (r.data.time.vip_starttime && r.data.time.vip_endtime) {
-                        var vip_starttime = r.data.time.vip_starttime + "";
-                        var vip_endtime = r.data.time.vip_endtime + "";
-                        vip_starttime = vip_starttime.split(" ")[0].replace(/-/g, ".");
-                        vip_endtime = vip_endtime.split(" ")[0].replace(/-/g, ".");
-                        var serviceTime = vip_starttime + " - " + vip_endtime;
-                        $(".serviceTime").text(serviceTime)
+                    if (effectiveBool){
+                      //有效周期
+                      $(".line_cycle").css("display", "");
+                      //有效日期
+                      if (r.data.time.vip_starttime && r.data.time.vip_endtime) {
+                          var vip_starttime = r.data.time.vip_starttime + "";
+                          var vip_endtime = r.data.time.vip_endtime + "";
+                          vip_starttime = vip_starttime.split(" ")[0].replace(/-/g, ".");
+                          vip_endtime = vip_endtime.split(" ")[0].replace(/-/g, ".");
+                          var serviceTime = vip_starttime + " - " + vip_endtime;
+                          $(".serviceTime").text(serviceTime)
+                      }
                     }
 
                     //支付方式
-                    if (r.data.order.pay_way.indexOf("wx") > -1) {
+                    if (r.data.order.pay_way&&r.data.order.pay_way.indexOf("wx") > -1) {
                         $(".line_payway").css("display", "");
                         $(".payWay").text("微信支付");
-                    } else if (r.data.order.pay_way.indexOf("ali") > -1) {
+                    } else if (r.data.order.pay_way&&r.data.order.pay_way.indexOf("ali") > -1) {
                         $(".payWay").text("支付宝支付");
                         $(".line_payway").css("display", "");
                     } else {//试用用户