fixbug
This commit is contained in:
+18
-1
@@ -38,12 +38,29 @@
|
||||
<div class="content-block">
|
||||
<p>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
</html>
|
||||
@@ -22,9 +22,10 @@ axios.interceptors.response.use(function (response) {
|
||||
return response;
|
||||
}, function (error) {
|
||||
try {
|
||||
|
||||
if(error=="Error: Network Error" || error.toString().indexOf('timeout') > -1){
|
||||
if(plus.webview.getWebviewById('error.html')==null){
|
||||
clicked('error.html',true,false,{},{},function(){
|
||||
clicked('error.html',true,false,{},{flag:1},function(){
|
||||
window.location.reload();
|
||||
})
|
||||
}else{
|
||||
|
||||
@@ -141,7 +141,7 @@ $.config = {router: false}
|
||||
|
||||
//loadRegionInfo("上海");
|
||||
function loadRegionRank(city){
|
||||
axios.get("/rest/quotations/regionInfos",{
|
||||
axios.get("/rest/quotations/regionPriceInfos",{
|
||||
params:{
|
||||
city : city
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ $.config = {router: false}
|
||||
|
||||
//loadRegionInfo("上海");
|
||||
function loadRegionInfo(city){
|
||||
axios.get("/rest/quotations/regionInfos",{
|
||||
axios.get("/rest/quotations/regionMarkupInfos",{
|
||||
params:{
|
||||
city : city
|
||||
}
|
||||
|
||||
@@ -175,11 +175,11 @@ var vm = new Vue({
|
||||
})
|
||||
|
||||
|
||||
//function onPlusReady() {
|
||||
// var self = plus.webview.currentWebview();
|
||||
// id = self.newsId;
|
||||
// shareId = id
|
||||
// shareUrl = shareUrl+id
|
||||
function onPlusReady() {
|
||||
var self = plus.webview.currentWebview();
|
||||
id = self.newsId;
|
||||
shareId = id
|
||||
shareUrl = shareUrl+id
|
||||
|
||||
axios.get("/rest/news/detail",{params:{newsId:id}}).then(function(response){
|
||||
if(response.data.code==200){
|
||||
@@ -211,7 +211,7 @@ var vm = new Vue({
|
||||
});
|
||||
getPosition();
|
||||
updateSerivces();
|
||||
//}
|
||||
}
|
||||
|
||||
//数量进行转换
|
||||
function numberConver(thumbsUpCount){
|
||||
|
||||
Reference in New Issue
Block a user