Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
|||||||
axios.defaults.baseURL = BASE_PATH;
|
axios.defaults.baseURL = BASE_PATH;
|
||||||
axios.defaults.headers.post['Content-Type'] = 'application/json';
|
axios.defaults.headers.post['Content-Type'] = 'application/json';
|
||||||
axios.defaults.timeout = 10000;
|
axios.defaults.timeout = 15000;
|
||||||
|
|
||||||
// 添加请求拦截器
|
// 添加请求拦截器
|
||||||
axios.interceptors.request.use(function (config) {
|
axios.interceptors.request.use(function (config) {
|
||||||
@@ -15,14 +15,17 @@ axios.interceptors.request.use(function (config) {
|
|||||||
axios.interceptors.response.use(function (response) {
|
axios.interceptors.response.use(function (response) {
|
||||||
return response;
|
return response;
|
||||||
}, function (error) {
|
}, function (error) {
|
||||||
if(error=="Error: Network Error"){
|
if (error.toString().indexOf('timeout') > -1) {
|
||||||
|
plus.nativeUI.alert("请求超时");
|
||||||
|
plus.nativeUI.closeWaiting();
|
||||||
|
}else if(error=="Error: Network Error"){
|
||||||
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,{},{},function(){
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
$(".loadingBg").hide();
|
$(".loadingBg").hide();
|
||||||
plus.nativeUI.closeWaiting();
|
plus.nativeUI.closeWaiting();
|
||||||
plus.webview.getWebviewById("error.html").show();
|
plus.webview.getWebviewById("error.html").show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1267,7 +1267,23 @@ function onPlusReady(){
|
|||||||
$("#input_city").val("上海");
|
$("#input_city").val("上海");
|
||||||
$(".nowCity").text("上海");
|
$(".nowCity").text("上海");
|
||||||
}
|
}
|
||||||
|
getRequestId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 生成请求ID,防止重复提交
|
||||||
|
var requestId = "";
|
||||||
|
function getRequestId() {
|
||||||
|
axios.get("/rest/index/id")
|
||||||
|
.then(function (response) {
|
||||||
|
if(response.data.status){
|
||||||
|
requestId = response.data.data;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/* 弹出城市选择页面 */
|
/* 弹出城市选择页面 */
|
||||||
$(document).on("click",".open-about01", function () {
|
$(document).on("click",".open-about01", function () {
|
||||||
$.popup(".popup-about01");
|
$.popup(".popup-about01");
|
||||||
@@ -1828,7 +1844,7 @@ function checkIsLogin(){
|
|||||||
function addEvaluation(){
|
function addEvaluation(){
|
||||||
var data={};
|
var data={};
|
||||||
if(type==0){
|
if(type==0){
|
||||||
data={cityDisplay: $("#input_city").val(),
|
data={id:requestId,cityDisplay: $("#input_city").val(),
|
||||||
region:$("input[name=region]").val(),
|
region:$("input[name=region]").val(),
|
||||||
district:$("#input_address").val(),
|
district:$("#input_address").val(),
|
||||||
address:$("input[name=address]").val(),
|
address:$("input[name=address]").val(),
|
||||||
@@ -1844,7 +1860,7 @@ function addEvaluation(){
|
|||||||
lastRentDate:$("#input_time03").val(),
|
lastRentDate:$("#input_time03").val(),
|
||||||
houseStatus:0}
|
houseStatus:0}
|
||||||
}else{
|
}else{
|
||||||
data={cityDisplay: $("#input_city").val(),
|
data={id:requestId,cityDisplay: $("#input_city").val(),
|
||||||
region:$("input[name=region]").val(),
|
region:$("input[name=region]").val(),
|
||||||
district:$("#input_address").val(),
|
district:$("#input_address").val(),
|
||||||
address:$("input[name=address]").val(),
|
address:$("input[name=address]").val(),
|
||||||
@@ -1863,7 +1879,9 @@ function addEvaluation(){
|
|||||||
var id = response.data.data.id;
|
var id = response.data.data.id;
|
||||||
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
|
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
|
||||||
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||||
clicked('/views/evaluate/evaluateReport.html',true,false,{},{hid:id})
|
clicked('/views/evaluate/evaluateReport.html',true,false,{},{hid:id},function(){
|
||||||
|
getRequestId();
|
||||||
|
})
|
||||||
}else{
|
}else{
|
||||||
$("#evaluation_btn").removeAttr("disabled");
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast(response.data.message);
|
$.toast(response.data.message);
|
||||||
@@ -1874,6 +1892,7 @@ function addEvaluation(){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* 信息输入弹窗 */
|
/* 信息输入弹窗 */
|
||||||
$(document).on('click','.open-modal', function () {
|
$(document).on('click','.open-modal', function () {
|
||||||
$.modal({
|
$.modal({
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
|
|
||||||
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
<link rel="stylesheet" href="../../css/sm.css">
|
||||||
<link rel="stylesheet" href="../../css/main.css">
|
<link rel="stylesheet" href="../../css/main.css">
|
||||||
<link rel="stylesheet" href="../../css/city.css">
|
<link rel="stylesheet" href="../../css/city.css">
|
||||||
<link rel="stylesheet" href="../../css/theme-orange.css">
|
<link rel="stylesheet" href="../../css/theme-orange.css">
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
|
|
||||||
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
<link rel="stylesheet" href="../../css/sm.css">
|
||||||
<link rel="stylesheet" href="../../css/main.css">
|
<link rel="stylesheet" href="../../css/main.css">
|
||||||
<link rel="stylesheet" href="../../css/theme-orange.css">
|
<link rel="stylesheet" href="../../css/theme-orange.css">
|
||||||
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=0a7eM0lkIvpKGPiq1bMCfeH7"></script>
|
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=0a7eM0lkIvpKGPiq1bMCfeH7"></script>
|
||||||
@@ -153,8 +153,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript" src="http://g.alicdn.com/sj/lib/zepto/zepto.js" charset="utf-8"></script>
|
<script type="text/javascript" src="../../js/zepto.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript" src="http://api.map.baidu.com/library/RichMarker/1.2/src/RichMarker_min.js "></script>
|
<script type="text/javascript" src="../../js/RichMarker_min.js "></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
|
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
|
|
||||||
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
<link rel="stylesheet" href="../../css/sm.css">
|
||||||
<link rel="stylesheet" href="../../css/main.css">
|
<link rel="stylesheet" href="../../css/main.css">
|
||||||
<link rel="stylesheet" href="../../css/city.css">
|
<link rel="stylesheet" href="../../css/city.css">
|
||||||
<link rel="stylesheet" href="../../css/theme-orange.css">
|
<link rel="stylesheet" href="../../css/theme-orange.css">
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript" src="http://g.alicdn.com/sj/lib/zepto/zepto.js" charset="utf-8"></script>
|
<script type="text/javascript" src="../../js/zepto.js" charset="utf-8"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user