Browse Source

feat:移动端附加历史

wangshan 3 years ago
parent
commit
92cc7e3cbb

+ 1 - 1
src/jfw/modules/app/src/web/templates/frontRouter/fileRecord/sess/index.html

@@ -74,7 +74,7 @@
         <div class="j-main">
           <div class="t-bg flex" style="min-height:3.28rem;">
             <div class="nums">
-              <span v-if="points.total">{points.total - points.usage}</span>个
+              <span v-if="points.total">{points.total}</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">

+ 3 - 1
src/jfw/modules/subscribepay/src/entity/basePack.go

@@ -209,9 +209,11 @@ func (this *FindRecordStruct) FindJyConsumePackAllRecord() ([]map[string]interfa
 	query := map[string]interface{}{
 		"s_userId":  this.UserId,
 		"s_product": this.Name,
-		"s_month":   this.QueryTime,
 	}
+	//全部
 	total := util.MQFW.Count(jyCC, query)
+	//当月
+	query["s_month"] = this.QueryTime
 	list, ok := util.MQFW.Find(jyCC, query, `{"l_date":-1}`, `{"s_id":1,"s_fileName":1,"s_downUrl":1,"l_date":1,"s_title":1}`, false, (this.Page-1)*this.PageSize, this.PageSize)
 	if ok && list != nil {
 		if len(*list) >= 1 {

+ 2 - 1
src/web/staticres/common-module/file-pack/js/index-wx.js

@@ -147,6 +147,7 @@ var vm = new Vue({
     },
     doFormatList (r) {
       if (r && r.error_msg == '' && r.data) {
+    	this.points.usage = r.data.total
         this.working = false
         this.empty = true
         this.listInfo.pageNum++
@@ -176,7 +177,7 @@ var vm = new Vue({
     },
     getDatas() {
       return {
-        queryTime: new Date(this.years, this.months, 1).pattern('yyyy-MM'),
+        queryTime: new Date(this.years, this.months-1, 1).pattern('yyyy-MM'),
         platform: navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1 ? 'WX' : 'APP',
         productName: '附件下载包',
         pageSize: this.listInfo.pageSize,

+ 2 - 1
src/web/staticres/common-module/file-pack/js/index.js

@@ -147,6 +147,7 @@ var vm = new Vue({
     },
     doFormatList (r) {
       if (r && r.error_msg == '' && r.data) {
+    	this.points.usage = r.data.total
         this.working = false
         this.empty = true
         this.listInfo.pageNum++
@@ -176,7 +177,7 @@ var vm = new Vue({
     },
     getDatas () {
       return {
-        queryTime: new Date(this.years, this.months, 1).pattern('yyyy-MM'),
+        queryTime: new Date(this.years, this.months-1, 1).pattern('yyyy-MM'),
         platform: navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1 ? 'WX' : 'APP',
         productName: '附件下载包',
         pageSize: this.listInfo.pageSize,

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

@@ -101,7 +101,7 @@
         <div class="j-main">
           <div class="t-bg flex">
             <div class="nums">
-              <span v-if="points.total">{points.total - points.usage}</span>个
+              <span v-if="points.total">{points.total}</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">