瀏覽代碼

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

yangfeng 3 年之前
父節點
當前提交
2c2271eb23

+ 2 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/set_area.js

@@ -188,8 +188,9 @@ var vNode = {
         // 根据城市的选择情况判断省份的选择情况
         changeCityState(province, city) {
             if (city === '#') {
+                this.setCitySelected()
                 this.onChange()
-                return this.setCitySelected()
+                return
             }
             // 全国置为空
             this.provinceListMap['#'][0].selectedState = ''

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

@@ -35,6 +35,9 @@ var subNode = new Vue({
       this.switehAjax()
     },
     mounted () {
+        this.$nextTick(function () {
+            $(".app-layout-content-b").removeAttr('v-cloak')
+        })
         // this.userAreaNum = 0
         // this.userType = true
         // this.userAreaAllNum = 1

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

@@ -247,13 +247,13 @@
     <!-- <a href="/jyapp/vipsubscribe/vipsubscribe_renew" class="custom-header-right go_renew" style="display: none;">续费</a> -->
     <!-- <a href="/jyapp/vipsubscribe/vipsubscribe_new" class="custom-header-right go_buy" style="display: none;">去购买</a> -->
   </div>
-  <div class="app-layout-content-b">
+  <div class="app-layout-content-b"  v-cloak>
     {{if not .T.isLiveActive}}
     <div class="vip-upgrade">
       {{else}}
       <div class="vip-upgrade live-20200707">
         {{end}}
-        <ul class="vip-body" id="vip-body">
+        <ul class="vip-body" id="vip-body" v-cloak>
           <li class="sub-box">
             <a data-href="/jyapp/vipsubscribe/introducePage?type=renew" class="banner-ad-box update"
               style="display: none">
@@ -267,7 +267,7 @@
               </div>
             </a>
             <ul class="sub-info" :class="vSwitch !== 'm' && vSwitch !== 'v' ? 'go_to_levelup' : ''" @click="toPaySupSub" style="min-height: 1.48rem">
-              <li class="cycle" v-show="vSwitch !== 'f'">
+              <li class="cycle" v-show="vSwitch == 'm' || vSwitch == 'v'">
                 <a class="item-container" :href="vipLink">
                   <div class="item">
                     <span class="item-l">
@@ -332,7 +332,7 @@
           </li>
         </ul>
         <!-- 升级 -->
-        <div class="update_renew" v-if="thisvSwitch === 'v'">
+        <div class="update_renew" style="display: none">
           <div class="update-tips" data-update-tips>因系统升级,已购买用户可选择原套餐续费,或升级到新版本享受更多权益。</div>
           <div class="footer-button-group j-button-group">
             <button class="j-button-confirm" data-bind-renew>续费</button>
@@ -391,7 +391,7 @@
       sessionStorage.removeItem('vip-cur-select-size')
     </script>
     <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/UpgradePrice.js?v={{Msg "seo" "version"}}'></script>
-    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/vip_index_new.js?v={{Msg "seo" "version"}}'></script>
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/vip_index_new.js?v=11{{Msg "seo" "version"}}'></script>
 </body>
 {{include "/common/baiducc.html"}}
 

+ 2 - 1
src/jfw/modules/publicapply/src/subscribe/entity/entity.go

@@ -61,7 +61,8 @@ func (this *ParamInfo) SetAreaByOneProvince() (b bool) {
 		}
 		if len(areas) == 1 {
 			if db.Mgo.UpdateById("user", this.UserId, map[string]interface{}{"$set": map[string]interface{}{
-				"o_jy.o_area": areas, //设置地区
+				"o_jy.o_area":    areas, //设置地区
+				"o_jy.i_newfree": 1,     //老免费用户=>新订阅设置页面 20211122
 			}}) {
 				jy.ClearBigVipUserPower(this.UserId)
 			}

+ 3 - 4
src/jfw/modules/publicapply/src/subscribePush/entity/setting.go

@@ -38,9 +38,6 @@ func (this *SubscribeSet) SetAreaAndIndustry() *FuncResult {
 
 //
 func freeSet(area map[string]interface{}, industry []string, userId string) *FuncResult {
-	if len(area) == 0 {
-		return &FuncResult{false, errors.New("地区参数异常"), nil}
-	}
 	//isfirst:是否第一次设置地区;ppb:是否购买省级订阅包; areacount:省份订阅包购买的省份数量-1:全国 无限制调整
 	isfirst, ppb, areacount := IsCanSet(userId, area)
 	//购买省份订阅包 已调整地区次数
@@ -49,12 +46,14 @@ func freeSet(area map[string]interface{}, industry []string, userId string) *Fun
 	ym := fmt.Sprint(time.Now().Year()) + "-" + fmt.Sprint(time.Now().Month())
 	if ppb {
 		ppnum = redis.GetInt(jy.PowerCacheDb, fmt.Sprintf(jy.UserUpdateAreaKey, userId, ym))
+	} else if len(area) == 0 {
+		return &FuncResult{false, errors.New("地区参数异常"), nil}
 	}
 	//免费用户未购买省份订阅包 按年算
 	year := fmt.Sprint(time.Now().Year())
 	//免费用户 已调整地区次数
 	fpnum := redis.GetInt(jy.PowerCacheDb, fmt.Sprintf(jy.UserUpdateAreaKey, userId, year))
-	// log.Println(len(area), "pnum:", pnum)
+	// log.Println(len(area), "fpnum:", fpnum, "ppnum:", ppnum)
 	//第一次设置地区 || 购买全国  不扣次数
 	var issetredis = areacount > -1 && !isfirst
 	if issetredis {

+ 8 - 2
src/jfw/modules/subscribepay/src/entity/areaPack.go

@@ -3,6 +3,7 @@ package entity
 import (
 	"encoding/json"
 	"fmt"
+	"jfw/modules/common/src/qfw/util/jy"
 	"log"
 	qutil "qfw/util"
 	"time"
@@ -201,9 +202,14 @@ func (this *AreaPackFilter) Power(userid string, startime, endtime time.Time) bo
 		setMap["o_jy.l_areaStart_p"] = startime.Unix()
 		setMap["o_jy.o_area_p"] = this.Area
 	}
-	return util.MQFW.UpdateById("user", userid, map[string]interface{}{
+	if util.MQFW.UpdateById("user", userid, map[string]interface{}{
 		"$set": setMap,
-	})
+	}) {
+		//清除 用户权限缓存
+		jy.ClearBigVipUserPower(userid)
+		return true
+	}
+	return false
 }
 
 //获取产品id

+ 7 - 4
src/jfw/modules/weixin/src/config.json

@@ -16,11 +16,11 @@
     "weixinrpcport": "8083",
     "webrpcport": "127.0.0.1:8084",
     "jyop_webrpcport": "127.0.0.1:8012",
-    "webdomain": "https://web-ws.jydev.jianyu360.com",
-    "appid":"wx5b1c6e7cc4dac0e4",
-    "appsecret":"b026103ffebd2291b3edb7a269612112",
+    "webdomain": "https://web-zxl.jydev.jianyu360.com",
+    "appid":"wxdedd73f450993685",
+    "appsecret":"d55898fde0b7887e5fe4660bd2494700",
     "apptoken": "top2022top2022",
-    "proxysess": "https://web-ws.jydev.jianyu360.com/front/sess/%s",
+    "proxysess": "https://web-zxl.jydev.jianyu360.com/front/sess/%s",
     "followCompany": 10,
     "welcomemsg": "用剑鱼标讯,所有功能完全免费,\n和传统的会员制说再见!\n\n<a href='%s'>点击这里</a>设置关键词,或直接回复“订阅 关键词”,如“订阅 教学设备”,您将随时随地接收招标信息!\n\n剑鱼标讯,让投标无限可能!",
     "tpl_subscribe_push_id": "IY_RWWzMlwDK6hcd6RAzTec6qre8n5r8PNOOUM_hgk0",
@@ -140,5 +140,8 @@
         "EntUrl": ["企业全景分析","多维度帮你分析竞争对手","/big-member/image/wxreply/entportrait.png","https://mp.weixin.qq.com/s/0HguU-yu8eTf96Y8mNsD3A?wxreply=%s"],
         "BuyerUrl": ["采购单位全景分析","快速、全面地了解采购单位","/big-member/image/wxreply/buyportrait.png","https://mp.weixin.qq.com/s/gXpB25K6I8401115pBGV1g?wxreply=%s"],
         "ReportUrl": ["市场分析周报/月报","分析市场规模、增长趋势,评估市场体量","/big-member/image/wxreply/reportmm.png","https://mp.weixin.qq.com/s/rlJenKOvmHvqd9_4811otg?wxreply=%s"]
+    },
+    "pcQrCode":{
+    		"10":true,"11":true,"12":true,"13":true,"14":true,"17":true,"18":true,"19":true
     }
 }

+ 7 - 0
src/jfw/modules/weixin/src/wx/wx.go

@@ -527,6 +527,13 @@ func saveUser(u *UserInfo, source, pre, RSource, CSource string) (bool, string,
 				redis.Del("other", fromkey)
 			}
 		}
+		if pcQrCode := *util.ObjToMap(config.Sysconfig["pcQrCode"]); len(pcQrCode) > 0 {
+			if bl, ok := pcQrCode[pre].(bool); bl && ok {
+				newUser["s_platform"] = "pc"
+			} else {
+				newUser["s_platform"] = "wx"
+			}
+		}
 		_id := tools.MQFW.Save("user", newUser)
 		if fromid != "" && fromid != _id {
 			//被邀请新用户

+ 2 - 1
src/web/staticres/big-member/js/set_area.js

@@ -188,8 +188,9 @@ var vNode = {
         // 根据城市的选择情况判断省份的选择情况
         changeCityState(province, city) {
             if (city === '#') {
+                this.setCitySelected()
                 this.onChange()
-                return this.setCitySelected()
+                return
             }
             // 全国置为空
             this.provinceListMap['#'][0].selectedState = ''

+ 2 - 2
src/web/staticres/common-module/order-list/js/order-detail.js

@@ -227,7 +227,7 @@ var vm = new Vue({
       }
 
       // 如果是可再次购买的产品,则显示再次购买
-      if (this.prodConf.canBuyAgain.indexOf(this.orderInfo.productType) && order.pay_money > 0) {
+      if (this.prodConf.canBuyAgain.indexOf(this.orderInfo.productType) !== -1 && order.pay_money > 0) {
         this.orderStateMap[1].bottomButtonShow.buyAgain = true
       }
 
@@ -238,7 +238,7 @@ var vm = new Vue({
 
       this.orderInfo.productInfoList = this.getProductInfoList(info)
       this.orderInfo.orderInfoList = this.getOrderInfoListList(info)
-      this.getOrderBottomButton(info.order)
+      // this.getOrderBottomButton(info.order)
     },
     getOrderBottomButton (order) {
       switch (order.product_type) {

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

@@ -820,7 +820,7 @@ var subComponent = {
 
               let areaArr = []
               if (res.data) {
-                if (!res.data.area || res.data.provincenum === 0) {
+                if (!res.data.area) {
                   _this.noAreaFreeType = true
                 } else {
                   for (const key in res.data.area) {

+ 14 - 7
src/web/staticres/vipsubscribe/js/vip_index_new.js

@@ -20,13 +20,18 @@ var subNode = new Vue({
             userAreaAllNum: 1, // 用户可修改地区总次数
             subscribeTime: '', // 用户订阅的时间
             vSwitch:'', // 用户版本权限
-            freeUserArea: {}, // 购买省份订阅包的用户所选择的地区 
+            freeUserArea: {}, // 购买省份订阅包的用户所选择的地区
         }
     },
     created () {
         this.getUserSubscribe()
         this.getUserType()
     },
+    mounted () {
+        this.$nextTick(function () {
+            $(".app-layout-content-b").removeAttr('v-cloak')
+        })
+    },
     methods: {
         superOrderTemplateMounted () {
             $('#pushResultPreview').attr('data-cl-event', 'c_wx_preview_buttonclick')
@@ -37,7 +42,7 @@ var subNode = new Vue({
                 var href = '/front/vipsubscribe/introducePage'
                 location.href = href
             }
-            
+
         },
         // 得到用户是否购买省份包
         getUserSubscribe: function () {
@@ -56,11 +61,11 @@ var subNode = new Vue({
                 }
             })
         },
-        // 省份订阅包续费 
+        // 省份订阅包续费
         renewBtn: function () {
             location.href = '/areaPack/wx/page/buy?type=renew'
         },
-        // 省份订阅包升级 
+        // 省份订阅包升级
         updateBtn: function () {
             location.href = '/areaPack/wx/page/buy?type=upgrade&area=' +  encodeURIComponent(JSON.stringify(this.freeUserArea))
         },
@@ -73,11 +78,13 @@ var subNode = new Vue({
                 success: function(res) {
                     if (res.data.vt !== 'v' ) {
                         _this.vSwitch = 'f'
+                        document.title = '订阅管理-免费订阅'
                         $('.update_renew').hide()
                         $('.super-title').text('订阅管理-免费订阅');
                         $('.super-title').css('background', 'none')
                     } else {
                         _this.vSwitch = 'v'
+                        document.title = '订阅管理-超级订阅'
                         $('.update_renew').show()
                         $('.super-title').show();
                     }
@@ -149,7 +156,7 @@ function getNewYearMarketing () {
 
 $(function () {
     /* vue 代码 start 提交订单 */
-  // var coupon = new Vue({ 
+  // var coupon = new Vue({
   //   el: '#coupon-vue',
   //   data: function () {
   //     return {
@@ -173,7 +180,7 @@ $(function () {
   //   },
   //   mounted () {
   //     this.init()
-  //   }, 
+  //   },
   //   methods: {
   //     // 更新价格相关
   //     updatePrice: function (before) {
@@ -1009,7 +1016,7 @@ $(function () {
     //         // initBack(2);// 升级
     //     }
     // } else {
-        
+
     // }
     getDataWitXHR()
     //返回提示使用

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

@@ -6,7 +6,7 @@
     <meta name="viewport"
           content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
-    <title>超级订阅</title>
+    <title>订阅管理</title>
     <meta name="apple-mobile-web-app-capable" content="yes">
     <meta name="apple-mobile-web-app-status-bar-style" content="black">
     <script src="/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
@@ -80,7 +80,7 @@
     .j-button-confirm:nth-child(1){
       margin-right: .16rem;
     }
-    
+
     </style>
 </head>
 
@@ -105,7 +105,7 @@
         </div> -->
       </div>
     </div>
-    <ul class="vip-body" id="vip-body">
+    <ul class="vip-body" id="vip-body" v-cloak>
         <li class="sub-box">
             <a data-href="/front/vipsubscribe/introducePage?type=renew" class="banner-ad-box update" style="display: none">
                 <span>限时续费,3个月起,续多久送多久!</span>
@@ -360,7 +360,7 @@
     </div>
     <!-- 升级 -->
     <!-- 升级 -->
-    <div class="update_renew" v-show="vSwitch === 'v'">
+    <div class="update_renew" style="display: none">
       <div class="update-tips" data-update-tips>因系统升级,已购买用户可选择原套餐续费,或升级到新版本享受更多权益。</div>
       <div class="footer-button-group j-button-group">
         <button class="j-button-confirm" data-bind-renew data-cl-event="c_wx_buy_buttonclick">续费</button>