提交 24348ba2 编写于 作者: 张磊's avatar 张磊

update guide app

上级 cd6cdabf
import $http from 'mn-template/plugins/http'; import $http from 'mn-template/plugins/http';
// import { Toast } from 'vant'; import { Toast } from 'vant';
// 设置axios默认属性 // 设置axios默认属性
$http.setDefaults({ $http.setDefaults({
headers: {} headers: {}
...@@ -19,7 +19,7 @@ $http.addBeforeHook(config => console.log('我是新增的前置钩子', config) ...@@ -19,7 +19,7 @@ $http.addBeforeHook(config => console.log('我是新增的前置钩子', config)
$http.addAfterHook(response => { $http.addAfterHook(response => {
if (response.code !== '000000' ) { if (response.code !== '000000' ) {
// Toast(response.data.message); Toast(response.data.message);
} }
console.log('我是新增的后置钩子', response); console.log('我是新增的后置钩子', response);
}, 0); }, 0);
...@@ -399,6 +399,7 @@ export default { ...@@ -399,6 +399,7 @@ export default {
this.dectionForm.beneficiaryPhone = res.data.beneficiaryPhone; this.dectionForm.beneficiaryPhone = res.data.beneficiaryPhone;
this.dectionForm.beneficiaryIdNum = res.data.beneficiaryIdNum; this.dectionForm.beneficiaryIdNum = res.data.beneficiaryIdNum;
this.$store.dispatch('home/setOrderInfo', res.data); this.$store.dispatch('home/setOrderInfo', res.data);
}); });
}, },
selectTimes(times) { selectTimes(times) {
...@@ -446,7 +447,14 @@ export default { ...@@ -446,7 +447,14 @@ export default {
yunOrderNo:this.yunOrderNo, yunOrderNo:this.yunOrderNo,
}; };
appointment(data).then(res => { appointment(data).then(res => {
console.log('confirm', res); if (res.code === '000000') {
this.$router.push({
path: '/appoint-details',
query: {
yunOrderNo:this.yunOrderNo
}
});
}
}); });
}, },
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<script> <script>
import { getJumpPageStatus} from '@/api/question'; import { getJumpPageStatus} from '@/api/question';
import {getOrderInfo} from '@/api/appoint';
export default { export default {
data() { data() {
return { return {
...@@ -27,7 +26,6 @@ export default { ...@@ -27,7 +26,6 @@ export default {
if (res.code == '000000') { if (res.code == '000000') {
this.yunOrderNo = res.data.yunOrderNo; this.yunOrderNo = res.data.yunOrderNo;
this.query.yunOrderNo = res.data.yunOrderNo; this.query.yunOrderNo = res.data.yunOrderNo;
this.getOrderInfo(res.data.yunOrderNo);
this.status = res.data.status; this.status = res.data.status;
switch (res.data.status) { switch (res.data.status) {
case '0001': case '0001':
...@@ -65,14 +63,7 @@ export default { ...@@ -65,14 +63,7 @@ export default {
this.$router.push({ this.$router.push({
path, query path, query
}); });
}, }
getOrderInfo(yunOrderNo) {
getOrderInfo(yunOrderNo).then(res => {
if (res.code == '000000') {
this.$store.dispatch('home/setOrderInfo', res.data);
}
});
},
} }
}; };
</script> </script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册