瀏覽代碼

fit:附件下载包

wangshan 3 年之前
父節點
當前提交
362abc9f71

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

@@ -225,7 +225,7 @@ func (this *FindRecordStruct) FindJyConsumePackAllRecord() ([]map[string]interfa
 	total := util.MQFW.Count(jyCC, query)
 	//当月
 	query["s_month"] = this.QueryTime
-	list, ok := util.MQFW.Find(jyCC, query, `{"l_updateDate":-1,"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)
+	list, ok := util.MQFW.Find(jyCC, query, `{"l_updateDate":-1,"l_date":-1}`, `{"s_id":1,"s_fileName":1,"s_downUrl":1,"l_date":1,"s_title":1,"l_updateDate":1}`, false, (this.Page-1)*this.PageSize, this.PageSize)
 	if ok && list != nil {
 		if len(*list) >= 1 {
 			for _, item := range *list {

+ 8 - 13
src/web/staticres/common-module/file-pack/js/index-wx.js

@@ -52,7 +52,10 @@ var vm = new Vue({
       curDate: '',
       minDate: '',
       maxTime: '',
-      points: [],
+      points: {
+    	total: 0,
+		usage: 0
+      },
       years: '',
       months: '',
       contracted: false,
@@ -121,19 +124,9 @@ var vm = new Vue({
         dataType: 'json'
       }).done(res => {
           if (res.error_msg === '' && res.data && res.data.data) {
-            this.points = {
-              total: 0,
-              usage: 0
-            }
             try {
               var tempInfo = res.data.data[0]
-              this.points = {
-                total: tempInfo.number,
-                usage: tempInfo.number
-          }
-              if (this.points.usage > tempInfo.thirtyNum) {
-                this.points.usage = tempInfo.thirtyNum
-              }
+              this.points.total = tempInfo.number
             } catch (e) {
               console.warn(e)
             }
@@ -209,7 +202,9 @@ var vm = new Vue({
 	        success: function (r) {
 				if (r && r.m === '' && r.r) {
       				location.href = r.r.downUrl
-					//location.reload();
+					setTimeout(function(){
+						location.reload();
+					},2000)
                 }else{
                 	vant.Dialog.alert({
                         message: '附件下载异常,请联系管理员,谢谢!',

+ 9 - 13
src/web/staticres/common-module/file-pack/js/index.js

@@ -52,7 +52,10 @@ var vm = new Vue({
       curDate: '',
       minDate: '',
       maxTime: '',
-      points: [],
+      points: {
+    	total: 0,
+		usage: 0
+      },
       years: '',
       months: '',
       contracted: false,
@@ -121,19 +124,10 @@ var vm = new Vue({
         dataType: 'json'
       }).done(res => {
           if (res.error_msg === '' && res.data && res.data.data) {
-            this.points = {
-              total: 0,
-              usage: 0
-            }
             try {
               var tempInfo = res.data.data[0]
-              this.points = {
-                total: tempInfo.number,
-                usage: tempInfo.number
-              }
-              if (this.points.usage > tempInfo.thirtyNum) {
-                this.points.usage = tempInfo.thirtyNum
-              }
+              this.points.total = tempInfo.number
+             
             } catch (e) {
               console.warn(e)
             }
@@ -210,7 +204,9 @@ var vm = new Vue({
         success: function (r) {
 			if (r && r.m === '' && r.r) {
      				location.href = r.r.downUrl
-				//location.reload();
+					setTimeout(function(){
+						location.reload();
+					},2000)
                }else{
                	vant.Dialog.alert({
                        message: '附件下载异常,请联系管理员,谢谢!',

+ 3 - 1
src/web/staticres/frontRouter/pc/seeBuyerHistory/js/index-pc.js

@@ -110,7 +110,9 @@ var vm = new Vue({
 	        success: function (r) {
 				if (r && r.m === '' && r.r) {
 					downFileOfURL(r.r.downUrl, row.s_fileName);
-					//location.reload();
+					setTimeout(function(){
+						location.reload();
+					},1000)
                 }else{
                 	console.log("附件下载异常,请联系管理员,谢谢!")
                 }