|
|
@ -79,6 +79,8 @@ import { setTimeout } from "timers"; |
|
|
import model from "../models/evaluation-model.js"; |
|
|
import model from "../models/evaluation-model.js"; |
|
|
import status from "./service-evaluation-status.vue"; |
|
|
import status from "./service-evaluation-status.vue"; |
|
|
import { Alert, Toast } from "vux"; |
|
|
import { Alert, Toast } from "vux"; |
|
|
|
|
|
import configs from '../configs'; |
|
|
|
|
|
var locationUrl = configs.locationUrl; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
@ -151,24 +153,19 @@ export default { |
|
|
this.code = 0; |
|
|
this.code = 0; |
|
|
this.statusShow = true; |
|
|
this.statusShow = true; |
|
|
} else if (code == 1) { |
|
|
} else if (code == 1) { |
|
|
//订单不存在 |
|
|
|
|
|
this.alertTip = res.msg; |
|
|
|
|
|
this.alertShow = true; |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
this.alertShow = false; |
|
|
|
|
|
}, 3000); |
|
|
|
|
|
} else if (code == 2) { |
|
|
|
|
|
//不可重复评价 |
|
|
|
|
|
this.code = 2; |
|
|
|
|
|
this.statusShow = true; |
|
|
|
|
|
} else if (code == 3) { |
|
|
|
|
|
//已过期 |
|
|
|
|
|
this.code = 3; |
|
|
|
|
|
this.statusShow = true; |
|
|
|
|
|
} else if (code == 4) { |
|
|
|
|
|
//账号不一致 |
|
|
|
|
|
this.code = 4; |
|
|
|
|
|
this.statusShow = true; |
|
|
|
|
|
|
|
|
if (res.msg == "已过期") { |
|
|
|
|
|
//已过期 |
|
|
|
|
|
this.code = 3; |
|
|
|
|
|
this.statusShow = true; |
|
|
|
|
|
} else if (res.msg == "不可重复评价") { |
|
|
|
|
|
//不可重复评价 |
|
|
|
|
|
this.code = 2; |
|
|
|
|
|
this.statusShow = true; |
|
|
|
|
|
} else if (res.msg == "账号不一致") { |
|
|
|
|
|
//账号不一致 |
|
|
|
|
|
this.code = 4; |
|
|
|
|
|
this.statusShow = true; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
@ -191,23 +188,26 @@ export default { |
|
|
model.getEvaluationNews({ bookNo: this.getParam("bookNo") }).then(res => { |
|
|
model.getEvaluationNews({ bookNo: this.getParam("bookNo") }).then(res => { |
|
|
let code = res.code; |
|
|
let code = res.code; |
|
|
if (code == 0) { |
|
|
if (code == 0) { |
|
|
|
|
|
|
|
|
|
|
|
this.cleanerName = res.response.cleanerName |
|
|
|
|
|
var times = '' |
|
|
|
|
|
if (res.response.timeType == 1) { |
|
|
|
|
|
times = '8:00~12:00' |
|
|
|
|
|
} else { |
|
|
|
|
|
times = '14:00~16:00' |
|
|
|
|
|
} |
|
|
|
|
|
this.serviceTime = res.response.bookTime +' '+ times |
|
|
|
|
|
|
|
|
//成功 |
|
|
//成功 |
|
|
if (!res.response.userId) { |
|
|
if (!res.response.userId) { |
|
|
this.alertTip = res.msg; |
|
|
|
|
|
|
|
|
this.alertTip = '请登录账号'; |
|
|
this.alertShow = true; |
|
|
this.alertShow = true; |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
this.alertShow = false; |
|
|
this.alertShow = false; |
|
|
}, 3000); |
|
|
|
|
|
|
|
|
window.location.href = locationUrl + '/mall/web/user/login?callback=' + encodeURIComponent(window.location.href); |
|
|
|
|
|
}, 3000); |
|
|
} else { |
|
|
} else { |
|
|
this.isCanEvaluation = true; |
|
|
|
|
|
this.cleanerName = res.response.cleanerName |
|
|
|
|
|
var times = '' |
|
|
|
|
|
if (res.response.timeType == 1) { |
|
|
|
|
|
times = '8:00~12:00' |
|
|
|
|
|
} else { |
|
|
|
|
|
times = '14:00~16:00' |
|
|
|
|
|
} |
|
|
|
|
|
this.serviceTime = res.response.bookTime +' '+ times |
|
|
|
|
|
|
|
|
this.isCanEvaluation = true; |
|
|
} |
|
|
} |
|
|
} else if (code == 1) { |
|
|
} else if (code == 1) { |
|
|
this.code = 4; |
|
|
this.code = 4; |
|
|
|