This commit is contained in:
2018-05-21 17:55:32 +08:00
parent 970302a1bb
commit ba2a967b7e
5 changed files with 28 additions and 10 deletions
+18 -1
View File
@@ -38,12 +38,29 @@
<div class="content-block"> <div class="content-block">
<p> <p>
<a onclick="plus.runtime.restart()" class="button button-big button-round theme">重启应用</a> <a onclick="plus.runtime.restart()" class="button button-big button-round theme">重启应用</a>
<a onclick="back(),plus.nativeUI.closeWaiting();" class="button button-big button-round theme">返回刷新</a> <a onclick="again()" class="button button-big button-round theme">返回刷新</a>
</p> </p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript" src="js/common.js" ></script> <script type="text/javascript" src="js/common.js" ></script>
<script>
var flag;
document.addEventListener('plusready', onPlusReady, false);
function onPlusReady() {
var self = plus.webview.currentWebview();
flag = self.flag;
plus.nativeUI.closeWaiting();
}
function again(){
if(flag){
back();
plus.nativeUI.closeWaiting();
}
//window.location.reload();
}
</script>
</body> </body>
</html> </html>
+2 -1
View File
@@ -22,9 +22,10 @@ axios.interceptors.response.use(function (response) {
return response; return response;
}, function (error) { }, function (error) {
try { try {
if(error=="Error: Network Error" || error.toString().indexOf('timeout') > -1){ if(error=="Error: Network Error" || error.toString().indexOf('timeout') > -1){
if(plus.webview.getWebviewById('error.html')==null){ if(plus.webview.getWebviewById('error.html')==null){
clicked('error.html',true,false,{},{},function(){ clicked('error.html',true,false,{},{flag:1},function(){
window.location.reload(); window.location.reload();
}) })
}else{ }else{
+1 -1
View File
@@ -141,7 +141,7 @@ $.config = {router: false}
//loadRegionInfo("上海"); //loadRegionInfo("上海");
function loadRegionRank(city){ function loadRegionRank(city){
axios.get("/rest/quotations/regionInfos",{ axios.get("/rest/quotations/regionPriceInfos",{
params:{ params:{
city : city city : city
} }
+1 -1
View File
@@ -129,7 +129,7 @@ $.config = {router: false}
//loadRegionInfo("上海"); //loadRegionInfo("上海");
function loadRegionInfo(city){ function loadRegionInfo(city){
axios.get("/rest/quotations/regionInfos",{ axios.get("/rest/quotations/regionMarkupInfos",{
params:{ params:{
city : city city : city
} }
+6 -6
View File
@@ -175,11 +175,11 @@ var vm = new Vue({
}) })
//function onPlusReady() { function onPlusReady() {
// var self = plus.webview.currentWebview(); var self = plus.webview.currentWebview();
// id = self.newsId; id = self.newsId;
// shareId = id shareId = id
// shareUrl = shareUrl+id shareUrl = shareUrl+id
axios.get("/rest/news/detail",{params:{newsId:id}}).then(function(response){ axios.get("/rest/news/detail",{params:{newsId:id}}).then(function(response){
if(response.data.code==200){ if(response.data.code==200){
@@ -211,7 +211,7 @@ var vm = new Vue({
}); });
getPosition(); getPosition();
updateSerivces(); updateSerivces();
//} }
//数量进行转换 //数量进行转换
function numberConver(thumbsUpCount){ function numberConver(thumbsUpCount){