diff --git a/pages/insight/pages/brandInsight/brandDataList/index.js b/pages/insight/pages/brandInsight/brandDataList/index.js index 31124ea..8a0534c 100644 --- a/pages/insight/pages/brandInsight/brandDataList/index.js +++ b/pages/insight/pages/brandInsight/brandDataList/index.js @@ -418,7 +418,7 @@ Page({ let levelBtn = wx.getStorageSync('authority'); for(let i=0;i { + app.globalData.request(obj, (res) => { if (res.Code == 1) { this.setData({ reportShow: false @@ -428,6 +428,7 @@ Page({ showCancel: false }) } + }).then(() => { }).catch(err => { wx.showModal({ title: '提示', diff --git a/pages/insight/pages/editTheme/index.js b/pages/insight/pages/editTheme/index.js index fe13c90..b9a61b3 100644 --- a/pages/insight/pages/editTheme/index.js +++ b/pages/insight/pages/editTheme/index.js @@ -454,8 +454,8 @@ Page({ }); let dtData = { "AnalyzeWord": this.data.totalMode == 1 ? this.data.highAnalizeWord.replace("+","%2B") : this.data.AnalyzeWord.replace("+","%2B"), - "HuoWord": this.data.HuoWord.replace("+","%2B"), - "PaiChu": this.data.PaiChu.replace("+","%2B"), + "HuoWord": this.data.HuoWord, + "PaiChu": this.data.PaiChu, "IsAdvancedQuery": this.data.totalMode == 0 && this.data.currWordType == '必选词和的关系' ? 0 : this.data.totalMode == 1 ? 1 : 2, "Source": this.data.Source, "UserAuthor": this.data.UserAuthor, diff --git a/pages/insight/pages/eventInsight/evDatalist/index.js b/pages/insight/pages/eventInsight/evDatalist/index.js index cedf09a..a5fd5d1 100644 --- a/pages/insight/pages/eventInsight/evDatalist/index.js +++ b/pages/insight/pages/eventInsight/evDatalist/index.js @@ -366,7 +366,7 @@ Component({ let levelBtn = wx.getStorageSync('authority'); for(let i=0;i { + app.globalData.request(obj, (res) => { if (res.Code == 1) { wx.showModal({ title: '数据生成中,请前往”我的“查看生成进度', @@ -376,6 +376,7 @@ Component({ reportShow: false }) } + }).then(() => { }).catch(err => { wx.showModal({ title: '提示', diff --git a/pages/insight/pages/modalInsight/modalDataList/index.js b/pages/insight/pages/modalInsight/modalDataList/index.js index 4b417d5..c4f3a4a 100644 --- a/pages/insight/pages/modalInsight/modalDataList/index.js +++ b/pages/insight/pages/modalInsight/modalDataList/index.js @@ -412,22 +412,23 @@ Page({ let levelBtn = wx.getStorageSync('authority'); for(let i=0;i { + app.globalData.request(obj, (res) => { if (res.Code == 1) { - this.setData({ - reportShow: false - }) - wx.showModal({ - title: '数据生成中,请前往”我的“查看生成进度', - showCancel: false - }) - } - }).catch(err => { + this.setData({ + reportShow: false + }) + wx.showModal({ + title: '数据生成中,请前往”我的“查看生成进度', + showCancel: false + }) + } + }).then(() => { + }).catch(err => { wx.showModal({ - title: '提示', - content: err.Msg, + title: '提示', + content: err.Msg, }) - }); + }); return true; } }; diff --git a/pages/insight/pages/themeList/index.js b/pages/insight/pages/themeList/index.js index 6fcc410..7f87f1b 100644 --- a/pages/insight/pages/themeList/index.js +++ b/pages/insight/pages/themeList/index.js @@ -552,7 +552,7 @@ Page({ iNum: this.data.result.length == 0 ? this.data.total : this.data.result.length, //导出条数 iTimeType: this.data.iTimeType, //0发布时间 1入库时间 } - app.globalData.request(obj).then((res) => { + app.globalData.request(obj,(res) => { if (res.Code == 1) { this.setData({ reportShow: false @@ -562,6 +562,7 @@ Page({ showCancel: false }) } + }).then(() => { }).catch(err => { wx.showModal({ title: '提示', diff --git a/pages/mine/pages/myReport/index.js b/pages/mine/pages/myReport/index.js index d91438b..7e5ef84 100644 --- a/pages/mine/pages/myReport/index.js +++ b/pages/mine/pages/myReport/index.js @@ -1,19 +1,14 @@ const app = getApp(); -import Toast from '@vant/weapp/toast/toast'; -let iPageIndex = 1; -let iPageSize = 20; -// pages/mine/pages/myReport/index.js Page({ - /** - * 页面的初始数据 - */ data: { imageUrl: getApp().globalData.imageUrl, list: [], loadMore: false, //"上拉加载"的变量,默认false,隐藏 loadAll: false, //“没有数据”的变量,默认false,隐藏 show: [], + iPageIndex: 1, + iPageSize: 20 }, /** @@ -47,7 +42,7 @@ Page({ this.getData(); }, getData() { - if (iPageIndex == 1) { + if (this.data.iPageIndex == 1) { this.setData({ loadMore: true, //把"上拉加载"的变量设为true,显示 loadAll: false //把“没有数据”设为false,隐藏 @@ -55,33 +50,18 @@ Page({ } app.globalData.request({ action: "getFileInfoExcel", - iPageIndex: iPageIndex, - iPageSize: iPageSize, + iPageIndex: this.data.iPageIndex, + iPageSize: this.data.iPageSize, sType: 'User', token: wx.getStorageSync('token') || 't%2BrswgjvzGM=' }).then(res => { - // console.log('ede',res) let arr = res.Table || [] let FilePath = [] for (let item of arr) { FilePath.push(item.FilePath) } - // console.log('fr', FilePath) - // let pattern = /\.{1}[A-Za-z]{1,}$/; - // let result = pattern.exec(FilePath); - // if(result[0]==='.xlsx'){ - // this.setData({ - // // show1:true, - // show:false, - // }) - // }else{ - // this.setData({ - // show:true, - // // show1:false - // }) - // } if (arr && arr.length > 0) { - iPageIndex++; + this.setData({iPageIndex: this.data.iPageIndex + 1}) let list = this.data.list.concat(arr); let show1 = [] list.forEach(element => { @@ -102,7 +82,7 @@ Page({ loadMore: false, //把"上拉加载"的变量设为false,显示 show:show1 }) - if (arr.length < iPageSize) { + if (arr.length < this.data.iPageSize) { this.setData({ loadMore: false, //隐藏加载中。。 loadAll: true //所有数据都加载完了