提交 811b951f authored 作者: matian's avatar matian

chore:新增未登录点击立即购买判断

上级 5b0695f1
...@@ -57,36 +57,11 @@ export default { ...@@ -57,36 +57,11 @@ export default {
formInfo: { formInfo: {
name: '', name: '',
phone: '', phone: '',
projectId: '' projectId: '5007'
} }
} }
}, },
watch: {
$route: {
handler: function (val, oldVal) {
if (val.path === '/studyAbroad') {
this.formInfo.projectId = '1018'
} else {
this.formInfo.projectId = '1012'
}
},
// 深度观察监听
deep: true,
immediate: true
}
},
computed: {
projectList() {
if (this.$route.path === '/internationalDegree') {
return this.projectListMap.slice(0, 7)
} else if (this.$route.path === '/studyAbroad') {
return this.projectListMap.slice(-4)
} else {
return this.projectListMap
}
}
},
methods: { methods: {
handleMsOver(type) { handleMsOver(type) {
this.tabBtnActive = true this.tabBtnActive = true
...@@ -129,7 +104,7 @@ export default { ...@@ -129,7 +104,7 @@ export default {
enrollQuery() { enrollQuery() {
const params = { const params = {
channel: localStorage.getItem('channel_num') || 19962, channel: localStorage.getItem('channel_num') || 19962,
project_id: this.formInfo.projectId === '9999' ? '1016' : this.formInfo.projectId, project_id: this.formInfo.projectId,
name: this.formInfo.name, name: this.formInfo.name,
phone: this.formInfo.phone phone: this.formInfo.phone
} }
......
...@@ -27,11 +27,15 @@ const handlePay = () => { ...@@ -27,11 +27,15 @@ const handlePay = () => {
if (isAgree.value === false) { if (isAgree.value === false) {
ElMessage.warning('请先勾选紫荆金保服务协议') ElMessage.warning('请先勾选紫荆金保服务协议')
} else { } else {
const params = { if (user.isLogin) {
payMode: payMode.value, const params = {
status: 'order' payMode: payMode.value,
status: 'order'
}
emit('success', params)
} else {
window.location.href = `${import.meta.env.VITE_LOGIN_URL}?rd=${encodeURIComponent(location.href)}`
} }
emit('success', params)
} }
} }
</script> </script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论