浏览代码

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

wangshan 3 年之前
父节点
当前提交
57b2034516

+ 6 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/unit_portrayal.js

@@ -399,7 +399,12 @@ var vNode = {
                       that.chartLoading = false;
                       that.initChartData('', res.data)
                   } else {
-                    that.getSectionChartData('a')
+                    // that.getSectionChartData('a')
+                    if (that.reqCount < 5) {
+                      that.getChartData()
+                    } else {
+                      that.chartLoading = false;
+                    }
                   }
                 }
             },

+ 1 - 1
src/jfw/modules/app/src/web/templates/commonPay/paySuccess.html

@@ -95,7 +95,7 @@
                     继续浏览
                 </button>
             </div>
-        {{else if or .T.doType "dataPack" .T.doType "areaPack"}}
+        {{else if or (eq .T.doType "dataPack") (eq .T.doType "areaPack")}}
             <div class="bottom_button j-button-group">
                 <button id ="order" class="j-button-confirm" onclick="window.location.href = '/jyapp/common/{{.T.doType}}/orderDetail?order_code={{.T.orderCode}}'">
                     查看订单

+ 3 - 3
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_index_new.html

@@ -297,11 +297,11 @@
             <div class="provincePay">
               <div class="provincePay-text">订阅周期:${subscribeTime}</div>
               <div class="provincePay-text provincePay-numText">
-                省份数量:<span class="provincePay-num">&nbsp;<span v-html="userAreaAllNum"></span>&nbsp;</span><span v-show="userAreaAllNum !== '全国'">个</span>
+                省份数量:<span class="provincePay-num">&nbsp;<span v-html="userAreaAllNum"></span>&nbsp;</span>${userAreaAllNum !== '全国' ? '个' : ''}
               </div>
               <div class="provincePay-btnWrap">
-                <div class="privincePay-btn"  @click="renewBtn">续费</div>
-                <div class="privincePay-btn updateColor" @click="updateBtn">升级</div>
+                <div class="privincePay-btn" @click="renewBtn">续费</div>
+                <div class="privincePay-btn updateColor" v-if="userAreaAllNum !== '全国'" @click="updateBtn">升级</div>
               </div>
             </div>
           </div>

+ 3 - 1
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase.html

@@ -832,7 +832,9 @@
         toBuyAreaPack: function () {
           this.dialog.backTip = false
           this.saveState()
-          location.href = '/jyapp/areaPack/page/buy'
+          setTimeout(function () {
+            location.href = '/jyapp/areaPack/page/buy'
+          }, 20)
         },
         restoreState: function () {
           var k = sessionStorage.getItem(this.sessKey)

+ 1 - 1
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_viewPage.html

@@ -1,7 +1,7 @@
 <html>
 <head>
 	{{include "/common/meta.html"}}
-	<title>超级订阅结果预览</title>
+	<title>订阅结果预览</title>
 	{{include "/common/nnc.html"}}
 	<link href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/dropload.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 	<link href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/wxlist.css?v={{Msg "seo" "version"}}" rel="stylesheet">

+ 1 - 1
src/jfw/modules/bigmember/src/entity/portrait.go

@@ -238,7 +238,7 @@ func (this *Portrait) BuyerPortraitData(screen *PortraitScreen, flag string) (ma
 	}
 	buyerPortraitData := map[string]interface{}{}
 	if screen.IsEmptySearch() { //空查询读缓存
-		buyerPortraitData = TryFunc(GetPortraitCache, screen.Ent, "buyer", 2)
+		buyerPortraitData = TryFunc(GetPortraitCache, screen.Ent, "buyer", 5)
 	} else {
 		Screen_Thread <- true
 		res, err := GetBuyerPortraitData(screen)

+ 3 - 3
src/jfw/modules/bigmember/src/entity/portrait_screen.go

@@ -83,11 +83,11 @@ func (ps *PortraitScreen) PareMatchType(isBidding ...bool) (items []string) {
 	} else { //project表
 		for _, t := range strings.Split(ps.MatchRange, ",") {
 			if t == "buyer" {
-				items = append(items, "buyer")
+				items = append(items, "mbuyer")
 			} else if t == "winner" {
-				items = append(items, "winner")
+				items = append(items, "mwinner")
 			} else if t == "agency" {
-				items = append(items, "agency")
+				items = append(items, "magency")
 			} else if t == "purchasing" {
 				items = append(items, []string{"purchasing", "projectname.pname"}...)
 			}

+ 8 - 2
src/web/staticres/big-member/js/unit_portrayal.js

@@ -394,11 +394,17 @@ var vNode = {
             data:storageSet ? Object.assign(data, storageSet) : data,
             success:function(res) {
                 if(res.error_code == 0) {
+                  that.reqCount++;
                   if(res.data && Object.keys(res.data).length > 0) {
                       that.chartLoading = false;
                       that.initChartData('', res.data)
                   } else {
-                    that.getSectionChartData('a')
+                    // that.getSectionChartData('a')
+                    if (that.reqCount < 5) {
+                      that.getChartData()
+                    } else {
+                      that.chartLoading = false;
+                    }
                   }
                 }
             },
@@ -415,7 +421,7 @@ var vNode = {
             url:'/bigmember/portrait/buyer/getData',
             data:{
               buyer: decodeURIComponent(utils.getParam('entName')),
-              flag: type
+              flag: type //先a再b再c
             },
             success:function(res) {
                 if(res.error_code == 0) {

+ 6 - 4
src/web/staticres/common-module/collection/js/history-project.js

@@ -153,8 +153,9 @@ var hisproComponent = {
       if(!utils.isWeiXinBrowser) {
         e.preventDefault()
         try {
-          if(tel.indexOf('、') > -1) {
-            tel = tel.split('、')[0]
+          var f = /[^\s\、,,;;./。??]+(?=[\s\、,,;;./。??])/g
+          if(tel.match(f)) {
+            tel = tel.match(f)[0]
           }
           JyObj.callPhone(tel);
         } catch (error) {
@@ -172,8 +173,9 @@ var hisproComponent = {
     },
     // 联系方式取第一个
     formatTel: function (tel) {
-      if(tel.indexOf('、') > -1) {
-        tel = tel.split('、')[0]
+      var f = /[^\s\、,,;;./。??]+(?=[\s\、,,;;./。??])/g
+      if(tel.match(f)) {
+        tel = tel.match(f)[0]
       }
       return tel
     }

+ 4 - 1
src/web/staticres/common-module/vipsubscribe/js/vip-subscribe-set-template.js

@@ -113,7 +113,7 @@ var subScribeTemplate = `
       </a>
     </li>
     <li class="body-item push-set" v-if="pushsetShow">
-      <a class="item-container" :href="linkobj.pushsetting">
+      <a class="item-container" :href="linkobj.pushLink || linkobj.pushsetting">
         <div class="item">
           <span class="item-l">
             <span class="leading_ jy-icon-push-set"></span>
@@ -355,6 +355,9 @@ var subComponent = {
         }
         if(this.initdata.industry.length == 0) {
           this.info.industry = '已选:全部'
+          if (this.vSwitch === 'f') {
+            this.info.industry = '请选择采购单位类型'
+          }
         } else {
           this.info.industry = '已选:' + this.initdata.industry.join('、')
         }

+ 11 - 1
src/web/staticres/vipsubscribe/js/vip_index_new.js

@@ -12,7 +12,9 @@ var subNode = new Vue({
                 keyword: '/front/vipsubscribe/toSetKeyWordPage',
                 infotype: '/front/vipsubscribe/toSetInfoTypePage',
                 resultview: '/front/vipsubscribe/toVIPViewPage',
-                pushsetting: '/front/setting/push_detail?header=超级订阅推送设置&type=super_subscribe'
+                pushsetting: '/front/setting/push_detail?header=超级订阅推送设置&type=super_subscribe',
+                freepush: '/front/setting/push_detail?header=订阅&type=free_subscribe',
+                pushLink: ''
             },
             initData: {},
             userAreaNum: 1, // 用户修改地区剩余次数
@@ -33,6 +35,12 @@ var subNode = new Vue({
         })
     },
     methods: {
+        getPushLink: function () {
+            if (this.vSwitch === 'f') {
+                return this.linkObj.freepush
+            }
+            return this.linkObj.pushsetting
+        },
         superOrderTemplateMounted () {
             $('#pushResultPreview').attr('data-cl-event', 'c_wx_preview_buttonclick')
         },
@@ -78,12 +86,14 @@ var subNode = new Vue({
                 success: function(res) {
                     if (res.data.vt !== 'v' ) {
                         _this.vSwitch = 'f'
+                        _this.linkObj.pushLink = _this.getPushLink()
                         document.title = '订阅管理-免费订阅'
                         $('.update_renew').hide()
                         $('.super-title').text('订阅管理-免费订阅');
                         $('.super-title').css('background', 'none')
                     } else {
                         _this.vSwitch = 'v'
+                        _this.linkObj.pushLink = _this.getPushLink()
                         document.title = '订阅管理-超级订阅'
                         $('.update_renew').show()
                         $('.super-title').show();

+ 1 - 1
src/web/templates/areaPack/wx/page_set_area.html

@@ -302,7 +302,7 @@
                 toPay: function () {
                     this.popupTip = false
                     var area = this.selectedArea
-                    var urlBase = '/jyapp/areaPack/page/buy'
+                    var urlBase = '/areaPack/wx/page/buy'
                     var areaJSON = encodeURIComponent(JSON.stringify(area))
                     this.savePageState()
                     if (this.userType) {

+ 85 - 62
src/web/templates/weixin/tabbar.html

@@ -19,34 +19,11 @@
 
 <div id="tabMesg" v-cloak>
   <van-tabbar v-model="tabActive" active-color="#2ABED1" inactive-color="#171826">
-    <van-tabbar-item @click="routeHref('/jylab/mainSearch',0)">
-      <span>首页</span>
+    <van-tabbar-item @click="routeHref(index)" v-for="(item, index) in tabList" :key="index" :badge="index === 2 ? getMsgCount : ''">
+      <span>{item.label}</span>
       <template #icon="props">
-        <img :src="props.active ? home.active : home.inactive" />
-      </template>
-    </van-tabbar-item>
-    <van-tabbar-item @click="routeHref('/swordfish/newhistorypush',1)">
-      <span>订阅</span>
-      <template #icon="props">
-        <img :src="props.active ? book.active : book.inactive" />
-      </template>
-    </van-tabbar-item>
-    <van-tabbar-item @click="routeHref('/weixin/frontPage/messageCenter/sess/index',2)" :class="{'a-badge':counts==0}" :badge="counts">
-      <span>消息</span>
-      <template #icon="props">
-        <img :src="props.active ? mesg.active : mesg.inactive" />
-      </template>
-    </van-tabbar-item>
-    <van-tabbar-item @click="routeHref('/page_treasurebox/index.html',3)">
-      <span>百宝箱</span>
-      <template #icon="props">
-        <img :src="props.active ? box.active : box.inactive" />
-      </template>
-    </van-tabbar-item>
-    <van-tabbar-item @click="routeHref('/front/wxMyOrder/myMenu',4)">
-      <span>我的</span>
-      <template #icon="props">
-        <img :src="props.active ? my.active : my.inactive" />
+        <img v-show="!props.active" :src="'/images/tabbar/' + item.icon + '.png'" />
+        <img v-show="props.active" :src="'/images/tabbar/' + item.icon + '_active.png'" />
       </template>
     </van-tabbar-item>
   </van-tabbar>
@@ -63,49 +40,95 @@
     return {
 			tabActive: 0,
 			counts: 0,
-			home: {
-				active: '/images/tabbar/home_active.png',
-				inactive: '/images/tabbar/home.png',
-			},
-			book: {
-				active: '/images/tabbar/book_active.png',
-				inactive: '/images/tabbar/book.png',
-			},
-			mesg: {
-				active: '/images/tabbar/mesg_active.png',
-				inactive: '/images/tabbar/mesg.png',
-			},
-			box: {
-				active: '/images/tabbar/box_active.png',
-				inactive: '/images/tabbar/box.png',
-			},
-			my: {
-				active: '/images/tabbar/mine_active.png',
-				inactive: '/images/tabbar/mine.png',
-			}
+            tabList: [
+              {
+                label: '首页',
+                icon: 'home',
+                url: '/jylab/mainSearch',
+                index: 0
+              },
+              {
+                label: '订阅',
+                icon: 'book',
+                url: '/swordfish/newhistorypush',
+                index: 1
+              },
+              {
+                label: '消息',
+                icon: 'mesg',
+                url: '/weixin/frontPage/messageCenter/sess/index',
+                index: 2
+              },
+              {
+                label: '百宝箱',
+                icon: 'box',
+                url: '/page_treasurebox/index.html',
+                index: 3
+              },
+              {
+                label: '我的',
+                icon: 'mine',
+                url: '/front/wxMyOrder/myMenu',
+                index: 4
+              },
+            ]
 		}
 	},
 	created() {
 		this.tabsCount()
-    this.tabActive = Number(getQueryString('msg'))
+        var uMsg = Number(getQueryString('msg') || this.getURLIndex())
+        this.tabActive = uMsg
 	},
+    computed: {
+      getMsgCount: function () {
+        return this.counts ? (this.counts > 99 ? '99+' : this.counts) : ''
+      }
+    },
 	methods: {
+        getURLIndex: function () {
+          try {
+            var tempUrl = this.findMapsForUrl(this.tabList, location.pathname)
+            if (tempUrl.length) {
+              return tempUrl[0].index
+            } else {
+              return ''
+            }
+          } catch (e) {
+            return ''
+          }
+        },
+        findMapsForUrl: function (arr, url) {
+          var tempReuslt = []
+          arr.forEach(function (v) {
+            if (url.indexOf(v.url) !== -1) {
+              tempReuslt.push(v)
+            }
+          })
+          return tempReuslt.sort(function(a,b) {
+            return b.url.length - a.url.length
+          })
+        },
 		tabsCount() {
-      const _this = this
-      $.ajax({
-        type:'GET',
-        url:'/jymessageCenter/isMsgOpen',
-        data: {},
-        success:function (res) {
-          if (res && res.status == 1) {
-            _this.counts = res.data.count > 99 ? '99+' : res.data.count
+          const _this = this
+          $.ajax({
+            type:'GET',
+            url:'/jymessageCenter/isMsgOpen',
+            data: {},
+            success:function (res) {
+              if (res && res.status == 1 && res.data && res.data.count) {
+                _this.counts = res.data.count
+              }
+            }
+          })
+        },
+		routeHref(index) {
+          var goHref = this.tabList[index].url + '?msg=' + index
+          if (index === this.tabActive) {
+            location.replace(goHref)
+          } else {
+            location.href = goHref
           }
-        }
-      })
-    },
-		routeHref(url, status) {
-      location.href = url + '?msg=' + status
 		}
 	}
 })
-</script>
+</script>

+ 2 - 2
src/web/templates/weixin/vipsubscribe/vip_index_new.html

@@ -193,11 +193,11 @@
             <div class="provincePay">
               <div class="provincePay-text">订阅周期:${subscribeTime}</div>
               <div class="provincePay-text provincePay-numText">
-                省份数量:<span class="provincePay-num">&nbsp;<span v-html="userAreaAllNum"></span>&nbsp;</span><span v-show="userAreaAllNum !== '全国'">个</span>
+                省份数量:<span class="provincePay-num">&nbsp;<span v-html="userAreaAllNum"></span>&nbsp;</span>${userAreaAllNum !== '全国' ? '个' : ''}
               </div>
               <div class="provincePay-btnWrap">
                 <div class="privincePay-btn" @click="renewBtn">续费</div>
-                <div class="privincePay-btn updateColor" @click="updateBtn">升级</div>
+                <div class="privincePay-btn updateColor" v-if="userAreaAllNum !== '全国'" @click="updateBtn">升级</div>
               </div>
             </div>
         </div>

+ 3 - 1
src/web/templates/weixin/vipsubscribe/vip_purchase.html

@@ -810,7 +810,9 @@
                 toBuyAreaPack: function () {
                   this.dialog.backTip = false
                   this.saveState()
-                  location.href = '/areaPack/wx/page/buy'
+                  setTimeout(function () {
+                    location.href = '/areaPack/wx/page/buy'
+                  }, 20)
                 },
                 restoreState: function () {
                   var k = sessionStorage.getItem(this.sessKey)

+ 1 - 1
src/web/templates/weixin/vipsubscribe/vip_viewPage.html

@@ -1,7 +1,7 @@
 <html>
 <head>
 	<meta name="viewport" content="width=device-width,initial-scale=1.0">
-	<title>超级订阅结果预览</title>
+	<title>订阅结果预览</title>
 	{{include "/common/mnc.html"}}
 	<link href="{{Msg "seo" "cdn"}}/css/dropload.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 	<link href="{{Msg "seo" "cdn"}}/css/wxlist.css?v={{Msg "seo" "version"}}1" rel="stylesheet">