Răsfoiți Sursa

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

yangfeng 3 ani în urmă
părinte
comite
ac0b5d4438

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyWord.js

@@ -188,7 +188,7 @@ var vm = new Vue({
               _this.conf.keywordMax = 10
               _this.userData = res.data
               // 关键词赋值
-              if (res.data && res.data.keys) {
+              if (res.data) {
                 try {
                   var a_key = res.data.keys || []
                   kList = [

+ 3 - 2
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_index_new.js

@@ -12,7 +12,8 @@ var subNode = new Vue({
                 keyword: '/jyapp/vipsubscribe/toSetKeyWordPage',
                 infotype: '/jyapp/vipsubscribe/toSetInfoTypePage',
                 resultview: '/jyapp/vipsubscribe/toVIPViewPage',
-                pushsetting: '/jyapp/big/page/push_setting_detail?header=订阅&type=free_subscribe'
+                pushsetting: '/jyapp/big/page/push_setting_detail?header=超级订阅推送设置&type=super_subscribe',
+                freepush: '/jyapp/big/page/push_setting_detail?header=订阅&type=free_subscribe',
             },
             initData: {},
             memberStatus: 0,
@@ -61,6 +62,7 @@ var subNode = new Vue({
                     _this.userAreaAllNum = res.data.provincenum === -1 ? '全国' : res.data.provincenum
                     _this.subscribeTime = new Date(res.data.ppstart * 1000).pattern('yyyy年MM月dd日') + "-" + new Date(res.data.ppend * 1000).pattern('yyyy年MM月dd日')
                     _this.initdata = res.data
+                    _this.linkObj.pushsetting = _this.linkObj.freepush
                 }
             })
         },
@@ -85,7 +87,6 @@ var subNode = new Vue({
                         }
                         this.linkObj = {
                             area: '/jyapp/big/page/set_area?callback=setting_save',
-                            // area: '/jyapp/areaPack/set_area',
                             industry: '/jyapp/big/page/set_cate?header=采购单位类型&callback=setting_save',
                             keyword: '/jyapp/vipsubscribe/toSetKeyWordPage',
                             infotype: '/jyapp/big/page/set_infotype?callback=setting_save',

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

@@ -138,35 +138,7 @@
                 }
                 $('.info-box .info-item').text('数据流量包:+' + allTotal)
             } else if (productType === 'areaPack') {
-                // https://showdoc.jydev.jianyu360.com/web/#/67?page_id=891
-                // {
-                //     num: 0, // 购买的数量 -1全国
-                //     ordertype: 1, // 1正常购买 2升级 3续费
-                //     cycleunit: 0, // 日期单位 1月 2季 3年
-                //     OldNum: 0, // 升级前购买的省份数量
-                // }
-                var titleMap = {
-                    1: '购买',
-                    2: '升级',
-                    3: '续费'
-                }
-                setHeaderTitle(titleMap[orderFilter.ordertype] + $('.header-title').text())
-                var cycleType = ' 个月'
-                if (orderFilter.cycleunit == 2) {
-                    cycleType = ' 季'
-                } else if (orderFilter.cycleunit == 3) {
-                    cycleType = ' 年'
-                }
-
-                var html = `${titleMap[orderFilter.ordertype]}省份数量:<span class="highlight-text">${orderFilter.num === -1 ? '全国' : orderFilter.num}</span>${orderFilter.num === -1 ? '' : ' 个省'}`
-                html += `&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;`
-                html += `订阅周期:`
-                if (orderFilter.ordertype == 2) {
-                    html += `不延期`
-                } else {
-                    html += `<span class="highlight-text">1</span>${ cycleType }`
-                }
-                $('.info-box .info-item').html(html)
+                setAreaPackInfo(orderFilter)
             }
         }
 
@@ -198,6 +170,39 @@
         }
     })
 
+    function setAreaPackInfo (orderFilter) {
+        // https://showdoc.jydev.jianyu360.com/web/#/67?page_id=891
+        // {
+        //     num: 0, // 购买的数量 -1全国
+        //     ordertype: 1, // 1正常购买 2升级 3续费
+        //     cycleunit: 0, // 日期单位 1月 2季 3年
+        //     OldNum: 0, // 升级前购买的省份数量
+        // }
+        var titleMap = {
+            1: '购买',
+            2: '升级',
+            3: '续费'
+        }
+        setHeaderTitle(titleMap[orderFilter.ordertype] + $('.header-title').text())
+        var cycleType = ' 个月'
+        if (orderFilter.cycleunit == 2) {
+            cycleType = ' 季'
+        } else if (orderFilter.cycleunit == 3) {
+            cycleType = ' 年'
+        }
+
+        var buyText = orderFilter.num === -1 ? '全国' : (orderFilter.num - (orderFilter.OldNum || 0))
+        var html = `${titleMap[orderFilter.ordertype]}省份数量:<span class="highlight-text">${buyText}</span>${orderFilter.num === -1 ? '' : ' 个省'}`
+        html += `&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;`
+        html += `订阅周期:`
+        if (orderFilter.ordertype == 2) {
+            html += `不延期`
+        } else {
+            html += `<span class="highlight-text">1</span>${ cycleType }`
+        }
+        $('.info-box .info-item').html(html)
+    }
+
     function setHeaderTitle (title) {
         if (!title) return
         document.title = title

+ 1 - 1
src/jfw/modules/bigmember/src/util/jylog.go

@@ -30,7 +30,7 @@ var LogPath = "./jylog"
 func init() {
 	os.Mkdir(LogPath, os.ModePerm)
 	//默认保留15天内的日志,-1为永久保留
-	initLog(15)
+	// initLog(15)
 }
 
 func initLog(saveDay int) {

+ 4 - 2
src/jfw/modules/common/src/qfw/util/jy/switchService.go

@@ -1,6 +1,7 @@
 package jy
 
 import (
+	"log"
 	. "mongodb"
 	"qfw/util"
 
@@ -30,15 +31,16 @@ type switchService struct {
 func (s *switchService) Get(session *httpsession.Session, m MongodbSim) string {
 	userId, _ := session.Get("userId").(string)
 	v, _ := session.Get(s.SessionKey).(string)
+	log.Println(s.SessionKey, "---v:", v)
 	u, ok := m.FindById("user", userId, `{"i_member_status":1,"i_vip_status":1}`)
 	if ok && u != nil {
 		if i_vip_status := util.IntAll((*u)["i_vip_status"]); v == s.Vip && i_vip_status > 0 {
 			return s.Vip
+		} else if i_member_status := util.IntAll((*u)["i_member_status"]); v == s.Member && i_member_status > 0 {
+			return s.Member
 		} else if i_vip_status > 0 {
 			session.Set(s.SessionKey, s.Vip)
 			return s.Vip
-		} else if i_member_status := util.IntAll((*u)["i_member_status"]); v == s.Member && i_member_status > 0 {
-			return s.Member
 		} else if i_member_status > 0 {
 			session.Set(s.SessionKey, s.Member)
 			return s.Member

+ 2 - 0
src/jfw/modules/publicapply/src/subscribePush/service/pushList.go

@@ -38,6 +38,7 @@ func (sp *SubscribePush) VipSwitch() {
 		}
 		switchOk := false
 		vt := sp.GetString("vt")
+		log.Println("-----------------", vt)
 		if vt == "" {
 			jy.SwitchService.Get(sp.Session(), db.Mgo)
 		} else if vt == jy.SubVipFlag {
@@ -57,6 +58,7 @@ func (sp *SubscribePush) VipSwitch() {
 		} else {
 			return nil, fmt.Errorf("未知请求")
 		}
+		log.Println(switchOk, "---", sp.GetSession(jy.SwitchService.SessionKey), "-----", jy.SwitchService.SessionKey)
 		return map[string]interface{}{
 			"vt":   util.ObjToString(sp.GetSession(jy.SwitchService.SessionKey)),
 			"flag": switchOk,

+ 9 - 18
src/web/staticres/common-module/vipsubscribe/js/vip-subscribe-set-template.js

@@ -20,7 +20,7 @@ var subScribeTemplate = `
     </div>
     </li>
     <li class="body-item industry">
-    <a class="item-container" :href="linkobj.industry" @click="userNoIndustry">
+    <a class="item-container" :href="linkobj.industry" @click="userNoIndustry($event)">
       <div class="item">
         <span class="item-l">
           <span class="leading jy-icon-industry"></span>
@@ -63,7 +63,7 @@ var subScribeTemplate = `
     </a>
     </li>
     <li class="body-item info-type">
-    <a class="item-container" href="javascript:;" :thisHref="linkobj.infotype" @click="openInfoType">
+    <a class="item-container" :href="linkobj.infotype" @click="openInfoType($event)">
       <div class="item">
         <span class="item-l">
           <span class="leading jy-icon-info-type"></span>
@@ -113,7 +113,7 @@ var subScribeTemplate = `
       </a>
     </li>
     <li class="body-item push-set" v-if="pushsetShow">
-      <a class="item-container" :href="linkobj.pushLink || linkobj.pushsetting">
+      <a class="item-container" :href="linkobj.pushsetting">
         <div class="item">
           <span class="item-l">
             <span class="leading_ jy-icon-push-set"></span>
@@ -637,23 +637,21 @@ var subComponent = {
           }]
       });
     },
-    // 用户未购买修改采购单位类型功能
     userNoIndustry: function () {
-      if (this.vSwitch !== 'f') {
-        var href = '/jyapp/vipsubscribe/toChangeIndustry?header=save'
-      } else {
+      if (this.vSwitch === 'f') {
         if (location.href.indexOf('front') !== -1) {
           var href = '/front/vipsubscribe/introducePage'
         } else {
           var href = '/jyapp/vipsubscribe/introducePage'
         }
+        this.linkobj.industry = href
       }
-      this.linkobj.industry = href
     },
     // 修改地区无次数点击事件
     userNumOver: function () {
       var _this = this
       if (this.vSwitch === 'f' && this.userAreaNum === 0) {
+        // 免费用户修改href跳转
         this.linkobj.area = 'javascript:;'
         if (this.userAreaAllNum > 0) {
           var str = `对不起,您当月修改区域的机会(${this.userAreaAllNum}次)已消耗完毕,无法再次修改~可前往升级省份订阅包增加订阅省份和修改次数`
@@ -686,8 +684,7 @@ var subComponent = {
               }
             }]
         });
-      }
-      else {
+      } else {
         // this.linkobj.area = '/jyapp/big/page/set_area?callback=setting_save'
         if (this.vSwitch === 'f') {
           if (location.href.indexOf('front') !== -1) {
@@ -714,16 +711,10 @@ var subComponent = {
       });
     },
     // 打开信息类型
-    openInfoType: function () {
+    openInfoType: function (e) {
       if (this.vSwitch === 'f') {
+        e.preventDefault()
         this.infoTypeMenu = true
-      } else {
-        if (location.href.indexOf('front') !== -1) {
-          location.href = '/front/vipsubscribe/toSetInfoTypePage'
-        } else {
-          location.href = '/jyapp/vipsubscribe/toSetInfoTypePage'
-        }
-
       }
     },
     // 重置信息类型

+ 1 - 1
src/web/staticres/vipsubscribe/js/keyWord.js

@@ -170,7 +170,7 @@ var vm = new Vue({
               _this.conf.keywordMax = 10
               _this.userData = res.data
               // 关键词赋值
-              if (res.data && res.data.keys) {
+              if (res.data) {
                 try {
                   var a_key = res.data.keys || []
                   kList = [

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

@@ -14,7 +14,6 @@ var subNode = new Vue({
                 resultview: '/front/vipsubscribe/toVIPViewPage',
                 pushsetting: '/front/setting/push_detail?header=超级订阅推送设置&type=super_subscribe',
                 freepush: '/front/setting/push_detail?header=订阅&type=free_subscribe',
-                pushLink: ''
             },
             initData: {},
             userAreaNum: 1, // 用户修改地区剩余次数
@@ -35,12 +34,6 @@ 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')
         },
@@ -86,14 +79,13 @@ var subNode = new Vue({
                 success: function(res) {
                     if (res.data.vt !== 'v' ) {
                         _this.vSwitch = 'f'
-                        _this.linkObj.pushLink = _this.getPushLink()
+                        _this.linkObj.pushsetting = _this.linkObj.freepush
                         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();

+ 34 - 29
src/web/templates/weixin/commonPay/paySuccess.html

@@ -111,35 +111,7 @@
                 }
                 $('.info-box .info-item').text('数据流量包:+' + allTotal)
             } else if (productType === 'areaPack') {
-                // https://showdoc.jydev.jianyu360.com/web/#/67?page_id=891
-                // {
-                //     num: 0, // 购买的数量 -1全国
-                //     ordertype: 1, // 1正常购买 2升级 3续费
-                //     cycleunit: 0, // 日期单位 1月 2季 3年
-                //     OldNum: 0, // 升级前购买的省份数量
-                // }
-                var titleMap = {
-                    1: '购买',
-                    2: '升级',
-                    3: '续费'
-                }
-                setHeaderTitle(titleMap[orderFilter.ordertype] + $('.header-title').text())
-                var cycleType = ' 个月'
-                if (orderFilter.cycleunit == 2) {
-                    cycleType = ' 季'
-                } else if (orderFilter.cycleunit == 3) {
-                    cycleType = ' 年'
-                }
-
-                var html = `${titleMap[orderFilter.ordertype]}省份数量:<span class="highlight-text">${orderFilter.num === -1 ? '全国' : orderFilter.num}</span>${orderFilter.num === -1 ? '' : ' 个省'}`
-                html += `&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;`
-                html += `订阅周期:`
-                if (orderFilter.ordertype == 2) {
-                    html += `不延期`
-                } else {
-                    html += `<span class="highlight-text">1</span>${ cycleType }`
-                }
-                $('.info-box .info-item').html(html)
+                setAreaPackInfo(orderFilter)
             }
         }
 
@@ -165,6 +137,39 @@
         }
     })
 
+    function setAreaPackInfo (orderFilter) {
+        // https://showdoc.jydev.jianyu360.com/web/#/67?page_id=891
+        // {
+        //     num: 0, // 购买的数量 -1全国
+        //     ordertype: 1, // 1正常购买 2升级 3续费
+        //     cycleunit: 0, // 日期单位 1月 2季 3年
+        //     OldNum: 0, // 升级前购买的省份数量
+        // }
+        var titleMap = {
+            1: '购买',
+            2: '升级',
+            3: '续费'
+        }
+        setHeaderTitle(titleMap[orderFilter.ordertype] + $('.header-title').text())
+        var cycleType = ' 个月'
+        if (orderFilter.cycleunit == 2) {
+            cycleType = ' 季'
+        } else if (orderFilter.cycleunit == 3) {
+            cycleType = ' 年'
+        }
+
+        var buyText = orderFilter.num === -1 ? '全国' : (orderFilter.num - (orderFilter.OldNum || 0))
+        var html = `${titleMap[orderFilter.ordertype]}省份数量:<span class="highlight-text">${buyText}</span>${orderFilter.num === -1 ? '' : ' 个省'}`
+        html += `&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;`
+        html += `订阅周期:`
+        if (orderFilter.ordertype == 2) {
+            html += `不延期`
+        } else {
+            html += `<span class="highlight-text">1</span>${ cycleType }`
+        }
+        $('.info-box .info-item').html(html)
+    }
+
     function setHeaderTitle (title) {
         if (!title) return
         document.title = title