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

update guide app

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