|
|
@@ -11,7 +11,7 @@ function getData(url, callback) {
|
|
11
|
11
|
//console.log("加密后的结果为===",url);
|
|
12
|
12
|
wx.request({
|
|
13
|
13
|
url: app.globalData.serverUrl + url,
|
|
14
|
|
- timeout:120000,
|
|
|
14
|
+ timeout:150000,
|
|
15
|
15
|
success: function (res) {
|
|
16
|
16
|
if (res.statusCode)
|
|
17
|
17
|
common.checkError(res.statusCode);
|
|
|
@@ -39,7 +39,7 @@ function postData(url, postData, callback) {
|
|
39
|
39
|
wx.request({
|
|
40
|
40
|
url: app.globalData.serverUrl + url,
|
|
41
|
41
|
method: "POST",
|
|
42
|
|
- timeout:120000,
|
|
|
42
|
+ timeout:150000,
|
|
43
|
43
|
data: postData,
|
|
44
|
44
|
success: function (res) {
|
|
45
|
45
|
if (res.statusCode)
|
|
|
@@ -155,7 +155,8 @@ function onSelect(obj,event,callback){
|
|
155
|
155
|
|
|
156
|
156
|
function checkGenerating(){
|
|
157
|
157
|
let that=this;
|
|
158
|
|
- if (app.globalData.Generating){
|
|
|
158
|
+ if (app.globalData.Generating && !app.globalData.GeneratingStart){
|
|
|
159
|
+ app.globalData.GeneratingStart=true;
|
|
159
|
160
|
let timeStart=new Date().getTime();
|
|
160
|
161
|
let intervalGenerate=setInterval(function(){
|
|
161
|
162
|
let time=(new Date().getTime()-timeStart)/1000;
|
|
|
@@ -166,6 +167,8 @@ function checkGenerating(){
|
|
166
|
167
|
if (!(page.NavigationDepth==3
|
|
167
|
168
|
&& page.CurrentRoute=="pages/main/article"
|
|
168
|
169
|
&& page.BackFromPage=="pages/main/article")){
|
|
|
170
|
+ app.globalData.Generating=false;
|
|
|
171
|
+ app.globalData.GeneratingStart=false;
|
|
169
|
172
|
wx.showModal({
|
|
170
|
173
|
title: '通知',
|
|
171
|
174
|
content: '文章生成好了。',
|