Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1

This commit is contained in:
2018-04-17 17:22:20 +08:00
20 changed files with 5748 additions and 73 deletions
File diff suppressed because one or more lines are too long
+12 -3
View File
@@ -1,6 +1,6 @@
axios.defaults.baseURL = BASE_PATH;
axios.defaults.headers.post['Content-Type'] = 'application/json';
axios.defaults.timeout = 10000;
axios.defaults.timeout = 15000;
// 添加请求拦截器
axios.interceptors.request.use(function (config) {
@@ -11,18 +11,27 @@ axios.interceptors.request.use(function (config) {
return Promise.reject(error);
});
var showTimeOutTime = 0;
// 添加响应拦截器
axios.interceptors.response.use(function (response) {
plus.nativeUI.closeWaiting();
return response;
}, function (error) {
if(error=="Error: Network Error"){
if (error.toString().indexOf('timeout') > -1) {
var curTime = new Date();
if (curTime - showTimeOutTime > 5000) {
plus.nativeUI.alert("请求超时");
showTimeOutTime = new Date();
}
plus.nativeUI.closeWaiting();
}else if(error=="Error: Network Error"){
if(plus.webview.getWebviewById('error.html')==null){
clicked('error.html',true,false,{},{},function(){
window.location.reload();
})
}else{
$(".loadingBg").hide();
plus.nativeUI.closeWaiting();
plus.nativeUI.closeWaiting();
plus.webview.getWebviewById("error.html").show();
}
}
+3 -4
View File
@@ -29,11 +29,11 @@ function shareAction(sb,bh) {
if(sharehrefTitle&&sharehrefTitle!=""){
msg.title=sharehrefTitle;
}
if(sharehrefDes&&sharehrefDes!=""){
if(sharehrefTitle&&sharehrefTitle!=""){
if(sb.title=="新浪微博"){
msg.content=shareUrl+sharehrefDes;
msg.content=shareUrl+"\t"+sharehrefTitle;
}else{
msg.content=sharehrefDes;
msg.content=sharehrefTitle;
}
}
msg.thumbs=[picUrl];
@@ -47,7 +47,6 @@ function shareAction(sb,bh) {
if ( sb.s.authenticated ) {
shareMessage(msg,sb.s);
} else {
plus.nativeUI.alert("---未授权---");
sb.s.authorize( function(){
shareMessage(msg,sb.s);
},function(e){