diff --git a/04.系统编码/App/App.csproj b/04.系统编码/App/App.csproj
index 6d28926..ea29307 100644
--- a/04.系统编码/App/App.csproj
+++ b/04.系统编码/App/App.csproj
@@ -329,7 +329,6 @@
-
@@ -338,6 +337,8 @@
+
+
diff --git a/04.系统编码/App/App.csproj.user b/04.系统编码/App/App.csproj.user
index ee02a05..fc4fb1d 100644
--- a/04.系统编码/App/App.csproj.user
+++ b/04.系统编码/App/App.csproj.user
@@ -2,7 +2,7 @@
Debug|Any CPU
- ProjectFiles
+ ShowAllFiles
true
44332
diff --git a/04.系统编码/App/Content/scripts/beijing/realtime-panel.js b/04.系统编码/App/Content/scripts/beijing/realtime-panel.js
index dd129c6..a678292 100644
--- a/04.系统编码/App/Content/scripts/beijing/realtime-panel.js
+++ b/04.系统编码/App/Content/scripts/beijing/realtime-panel.js
@@ -217,7 +217,7 @@
return "http://{0}/bj/getresult/{1}.json".format(Config.ApiRoot, taskId);
else
return '/Content/json/beijing/{0}.json'.format(taskId);
- }
+ };
this.LoadData = function (result) {
$.getJSON(this.getJsonUrl(result.num), function (data) {
diff --git a/04.系统编码/App/Content/scripts/menggu/realtime-panel.js b/04.系统编码/App/Content/scripts/menggu/realtime-panel.js
index 196d5a2..d92ec44 100644
--- a/04.系统编码/App/Content/scripts/menggu/realtime-panel.js
+++ b/04.系统编码/App/Content/scripts/menggu/realtime-panel.js
@@ -34,7 +34,12 @@
Result: null,
CreateTime: new Date()
};
- this.SubmitTask(this.TaskInfo.Id);
+
+ // Submit task
+ if (Config.InProductionMode)
+ this.SubmitTask(this.TaskInfo.Id);
+ else
+ this.SubmitTest(this.TaskInfo.Id, 36.538, 64.850);
};
this.OnResetButtonClick = function () {
@@ -70,7 +75,7 @@
$.ajax({
type: "GET",
dataType: 'json',
- url: 'http://{0}/mg/check?num={1}'.format(Config.ApiRoot, this.TaskInfo.Id),
+ url: this.getCheckUrl(this.TaskInfo.Id),
success: function (result) {
this.TaskInfo.Result = result;
@@ -87,8 +92,22 @@
});
};
+ this.getCheckUrl = function (taskId) {
+ if (Config.InProductionMode)
+ return 'http://{0}/mg/check?num={1}'.format(Config.ApiRoot, taskId);
+ else
+ return '/Content/json/menggu/check.json'.format(taskId);
+ };
+
+ this.getJsonUrl = function (taskId) {
+ if (Config.InProductionMode)
+ return "http://{0}/mg/getresult/{1}.json".format(Config.ApiRoot, taskId);
+ else
+ return '/Content/json/menggu/{0}.json'.format(taskId);
+ };
+
this.LoadData = function (result) {
- $.getJSON("http://{0}/mg/getresult/{1}.json".format(Config.ApiRoot, result.num), function (data) {
+ $.getJSON(this.getJsonUrl(result.num), function (data) {
var param = this.GetTaskParams(this.TaskInfo.Id);
this.Parent.Map.LoadAverageData('realtime-layer', {
ReleaseTime: param.releaseTime,
@@ -191,6 +210,22 @@
});
};
+ this.SubmitTest = function (taskId, lat, lon) {
+ $.ajax({
+ type: "GET",
+ dataType: 'json',
+ url: this.getCheckUrl(taskId),
+ success: function (result) {
+ this.TaskInfo.Id = taskId;
+ this.TaskInfo.Result = result;
+
+ this.Parent.Map.CenterMap(lat, lon);
+ this.AddTask(this.TaskInfo.Id);
+ this.LoadData(result);
+ }.bind(this)
+ });
+ };
+
this.AddTask = function (taskId) {
$.ajax({
type: "POST",