浏览代码

Merge branch 'dev4.5.2' of http://172.16.10.252:8080/qmx/jy into dev4.5.2

TANGSHIZHE 4 年之前
父节点
当前提交
6cefb55146

+ 2 - 2
src/jfw/modules/app/src/web/templates/frontRouter/portraitRecord/sess/index.html

@@ -16,9 +16,9 @@
     <div class="j-main portraited" id="proRecord" v-cloak>
       <div class="j-container">
         <div class="j-main">
-          <div class="t-bg flex">
+          <div class="t-bg flex" style="min-height:3.28rem;">
             <div class="nums">
-              <span>{points.total}</span>个
+              <span>{points.total - points.usage}</span>个
               <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/portraitRecord/image/help-p.png?v={{Msg "seo" "version"}}' @click="helpTiped" alt="">
             </div>
             <div class="btns flex">

+ 8 - 3
src/jfw/modules/weixin/src/github.com/wizjin/weixin/weixin.go

@@ -792,13 +792,18 @@ func (wx *Weixin) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 			log.Println("Weixin parse message failed:", err)
 			http.Error(w, "", http.StatusBadRequest)
 		} else {
-			if msg.Event == EventTemplateSent || msg.Event == EventView {
+			//update by wcj on 2021-07-29
+			//update before
+			/*if msg.Event == EventTemplateSent || msg.Event == EventView {
 				http.Error(w, "", http.StatusNotFound)
 			} else {
 				wx.routeRequest(w, &msg)
-			}
+			}*/
+			//update after
+			wx.routeRequest(w, &msg)
 		}
 	}
+	w.Write([]byte("success")) //add by wcj on 2021-07-30
 	return
 }
 
@@ -819,7 +824,7 @@ func (wx *Weixin) routeRequest(w http.ResponseWriter, r *Request) {
 		route.handler(writer, r)
 		return
 	}
-	http.Error(w, "", http.StatusNotFound)
+	//http.Error(w, "", http.StatusNotFound)
 	return
 }
 

+ 13 - 3
src/jfw/modules/weixin/src/wx/wx.go

@@ -109,10 +109,20 @@ func MenuClickHandler(w ResponseWriter, r *Request) {
 	clickButtonKey := r.EventKey
 	if replyText, ok := menuClickReplyTextMap[clickButtonKey]; ok {
 		w.PostText(replyText)
-		//二维码
-		mediaId, err := w.UploadMediaFromFile("image", tools.BusinessCoop)
+		CBKey := fmt.Sprintf("%s_%d", clickButtonKey, time.Now().Day())
+		mediaId := redis.GetStr("other", CBKey)
+		if mediaId == "" {
+			//二维码
+			_mediaId, err := w.UploadMediaFromFile("image", tools.BusinessCoop)
+			if _mediaId != "" && err == nil {
+				mediaId = _mediaId
+			}
+		}
 		// log.Println(mediaId, "--", err, "--", tools.BusinessCoop)
-		if mediaId != "" && err == nil {
+		if mediaId != "" {
+			go func() {
+				redis.Put("other", CBKey, mediaId, 24*60*60)
+			}()
 			w.PostImage(mediaId)
 		}
 	}

文件差异内容过多而无法显示
+ 1 - 1
src/web/staticres/common-module/portraitRecord/css/index.css


+ 5 - 3
src/web/staticres/common-module/portraitRecord/js/index-wx.js

@@ -117,7 +117,7 @@ var vm = new Vue({
           }
         }
 
-        if (r.data.list) {
+        if (Array.isArray(r.data.list) && r.data.list.length !== 0) {
           var _this = this
           this.list = this.list.concat(r.data.list.map(function (v) {
             return {
@@ -132,6 +132,8 @@ var vm = new Vue({
               checked: false
             }
           }))
+        } else {
+          this.listInfo.finished = true
         }
 
         this.listInfo.loading = false
@@ -159,9 +161,9 @@ var vm = new Vue({
     },
     helpTiped() {
       let _this = this
-      if (_this.points.provin === -1) {
+      if (_this.points.provin === -1&&_this.points.usage !== _this.points.total) {
         this.$dialog.alert({
-          message: '每订购1个省,可查看50个企业画像/月。 您当前订阅了全国。',
+          message: '每订购1个省,可查看50个企业画像/月。',
           className: 'pro-log',
           messageAlign: 'left',
           confirmButtonColor: '#2ABED1',

+ 5 - 3
src/web/staticres/common-module/portraitRecord/js/index.js

@@ -117,7 +117,7 @@ var vm = new Vue({
           }
         }
 
-        if (r.data.list) {
+        if (Array.isArray(r.data.list) && r.data.list.length !== 0) {
           var _this = this
           this.list = this.list.concat(r.data.list.map(function (v) {
             return {
@@ -132,6 +132,8 @@ var vm = new Vue({
               checked: false
             }
           }))
+        } else {
+          this.listInfo.finished = true
         }
 
         this.listInfo.loading = false
@@ -159,9 +161,9 @@ var vm = new Vue({
     },
     helpTiped() {
       let _this = this
-      if (_this.points.provin === -1) {
+      if (_this.points.provin === -1&&_this.points.usage !== _this.points.total) {
         this.$dialog.alert({
-          message: '每订购1个省,可查看50个企业画像/月。 您当前订阅了全国。',
+          message: '每订购1个省,可查看50个企业画像/月。',
           className: 'pro-log',
           messageAlign: 'left',
           confirmButtonColor: '#2ABED1',

+ 2 - 2
src/web/staticres/frontRouter/pc/seeHistory/js/index-pc.js

@@ -88,8 +88,8 @@ var vm = new Vue({
             }).done(res => {
                 var _this = this
                 if (res.error_code == 0 && res.data.list) {
-                    if (res.data.count) {
-                        this.listState.total = res.data.count
+                    if (res.data.total) {
+                        this.listState.total = res.data.total
                     }
                     res.data.list.forEach(v => {
                         const arrs = {

+ 1 - 1
src/web/templates/frontRouter/wx/portraitRecord/sess/index.html

@@ -32,7 +32,7 @@
         <div class="j-main">
           <div class="t-bg flex">
             <div class="nums">
-              <span>{points.total}</span>个
+              <span>{points.total - points.usage}</span>个
               <img src='{{Msg "seo" "cdn"}}/common-module/portraitRecord/image/help-p.png?v={{Msg "seo" "version"}}' @click="helpTiped" alt="">
             </div>
             <div class="btns flex">

部分文件因为文件数量过多而无法显示