Forráskód Böngészése

Merge remote-tracking branch 'origin/dev4.5' into dev4.5

wangkaiyue 4 éve
szülő
commit
f774a1626b

+ 1 - 0
src/jfw/modules/app/src/web/staticres/jyapp/js/searchindex.js

@@ -225,6 +225,7 @@ var SuperSearch = {
       if ($(this).text().trim() !== '筛选' || $("#search-header-input").val().trim() === '') {
         return
       }
+      $("#supersearchPage input[name=super_searchinput]").blur();
       if (vMainSearchComponent) {
         vMainSearchComponent.toggleEntShow(true)
       }

+ 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) {

+ 4 - 0
src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html

@@ -875,9 +875,13 @@
             window.event.returnValue = false;
             //超级搜索
             if(SuperSearch.isMyPage){
+              if ($("#search-header-input").val().trim() === '') {
+                return
+              }
               var isNowIndex = $(".tabs-box .tabs-nav .active").index()
                 if (!$(".tabs-box").hasClass('hidden') && isNowIndex !== 0) {
                     if (isNowIndex === 1) {
+                      $("#supersearchPage input[name=super_searchinput]").blur();
                       window.isKeyDownToEntSearch = true
                       if (vEntSearchComponent) {
                         vEntSearchComponent.toggleEntShow(true)

+ 2 - 1
src/jfw/modules/app/src/web/templates/weixin/search/tabSearch.html

@@ -651,7 +651,7 @@
                                 <industry-component v-show="activeTabIndex === 1" :key="'industry' + industryComponentKey" ref="industryComponent"></industry-component>
                                 <date-component v-show="activeTabIndex === 3" :key="'date' + dateComponentKey" ref="dateComponent"></date-component>
                                 <notice-component v-show="activeTabIndex === 5" :key="'notice' + noticeComponentKey" ref="noticeComponent"></notice-component>
-                                <cate-component v-show="activeTabIndex === 7" :key="'cate' + cateComponentKey" ref="cateComponent"></cate-component>
+                                <cate-component v-show="!isWaitBuy && activeTabIndex === 7" :key="'cate' + cateComponentKey" ref="cateComponent"></cate-component>
                             </div>
                             <area-component ref="areaComponent" @select="updateScrollTop" v-show="activeTabIndex === 4"></area-component>
                             <money-component extra="万元" :tags="moneyTags" ref="moneyComponent"  v-show="activeTabIndex === 2"></money-component>
@@ -1470,6 +1470,7 @@
             }
             $("#search-ent-list").html('')
             $("#search-buyer-list").html('')
+            window.isKeyDownToEntSearch = false
             createSearchResultList()
 
             // KB需求:#12441 (清空输入框显示历史记录)

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

@@ -346,12 +346,12 @@ func (this *vipSubscribeStruct) UpgradeSubVip(userId string, vmsg VipSimpleMsg,
 				"i_isvalid": 1,
 			},
 		}, false, true) {
-		log.Printf("%s vip_upgrade 更新失败\n", userId)
+		log.Printf("%s vip_upgrade 更新失败  时间:%d\n", userId, endTime.Unix())
 		return false
 	}
 	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)

+ 13 - 0
src/web/staticres/common-module/ent-search/ent-search-template.js

@@ -430,6 +430,7 @@ var vEntSearchComponent = new Vue({
       $("#v-ent-search-group .ent-search-pop").css({height: 'unset'})
     },
     fixedScroll () {
+      console.log('fix view Height for EntSearch')
       $(".app-layout-content-b").scrollTop(0)
       $(".app-layout-content-b").addClass('ent-stop-scroll')
       var isMaxHeight = $(".app-layout-content-b").height() - $(".tabs-nav").height() - $("#v-ent-search-group .van-tabs.van-tabs--line").height()
@@ -501,6 +502,9 @@ var vEntSearchComponent = new Vue({
         this.entSearchKey = new Date().getTime()
         $("#supersearchPage input[name=super_searchinput]").blur();
         this.doQueryList()
+        $(window).on('resize', this.fixedScroll.bind(this))
+      } else {
+        $(window).off('resize', this.fixedScroll.bind(this))
       }
       var _this = this
       this.$nextTick(function () {
@@ -510,6 +514,15 @@ var vEntSearchComponent = new Vue({
           _this.removeFixedScroll()
         }
       })
+      setTimeout(function () {
+        _this.$nextTick(function () {
+          if (type) {
+            _this.fixedScroll()
+          } else {
+            _this.removeFixedScroll()
+          }
+        })
+      }, 300)
     }
   }
 })

+ 2 - 2
src/web/staticres/common-module/keep-tags/keep-tags-template.js

@@ -114,8 +114,7 @@ var tempStyleComponent = `<style>
         line-height: 0.52rem;
         color: #F7F9FA;
         border-color: #2ABED1;
-        padding-top: 0.44rem;
-        padding-bottom: 0.44rem;
+        height: 0.92rem;
     }
     #v-keep-component .keep-component-bottom .van-button__loading {
         font-size: 0.32rem;
@@ -212,6 +211,7 @@ var tempStyleComponent = `<style>
         border-color: #2ABED1;
     }
     #v-keep-component .keep-component-input-group  input {
+        width: 100%;
         -webkit-transition: width 0.2s;
         transition: width 0.2s;
         -webkit-box-flex: 1;

+ 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">'

+ 4 - 0
src/web/templates/weixin/search/mainSearch.html

@@ -1005,9 +1005,13 @@
             window.event.returnValue = false;
 			//超级搜索
 			if(SuperSearch.isMyPage){
+			  if ($("#search-header-input").val().trim() === '') {
+			    return
+              }
               var isNowIndex = $(".tabs-box .tabs-nav .active").index()
                 if (!$(".tabs-box").hasClass('hidden') && isNowIndex !== 0) {
                     if (isNowIndex === 1) {
+                      $("#supersearchPage input[name=super_searchinput]").blur();
                       window.isKeyDownToEntSearch = true
                       if (vEntSearchComponent) {
                         vEntSearchComponent.toggleEntShow(true)

+ 2 - 1
src/web/templates/weixin/search/tabSearch.html

@@ -659,7 +659,7 @@
                                 <industry-component v-show="activeTabIndex === 1" :key="'industry' + industryComponentKey" ref="industryComponent"></industry-component>
                                 <date-component v-show="activeTabIndex === 3" :key="'date' + dateComponentKey" ref="dateComponent"></date-component>
                                 <notice-component v-show="activeTabIndex === 5" :key="'notice' + noticeComponentKey" ref="noticeComponent"></notice-component>
-                                <cate-component v-show="activeTabIndex === 7" :key="'cate' + cateComponentKey" ref="cateComponent"></cate-component>
+                                <cate-component v-show="!isWaitBuy && activeTabIndex === 7" :key="'cate' + cateComponentKey" ref="cateComponent"></cate-component>
                             </div>
                             <area-component ref="areaComponent" @select="updateScrollTop" v-show="activeTabIndex === 4"></area-component>
                             <money-component extra="万元" :tags="moneyTags" ref="moneyComponent"  v-show="activeTabIndex === 2"></money-component>
@@ -1479,6 +1479,7 @@
             }
             $("#search-ent-list").html('')
             $("#search-buyer-list").html('')
+            window.isKeyDownToEntSearch = false
             createSearchResultList()
 
             // KB需求:#12441 (清空输入框显示历史记录)

+ 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 {//试用用户