Commit 8f1d8994 authored by 张俊's avatar 张俊

立即申请跳转登录

parent bb096006
Pipeline #75985 passed with stage
...@@ -254,6 +254,7 @@ export default { ...@@ -254,6 +254,7 @@ export default {
}, },
addToCart() { addToCart() {
// console.log("addToCart"); // console.log("addToCart");
if(this.$store.state.userInfo){
this.$http this.$http
.post("/apaas/serviceapp/v3/shopcart/add", { .post("/apaas/serviceapp/v3/shopcart/add", {
service_id: parseFloat(this.data.service_id), service_id: parseFloat(this.data.service_id),
...@@ -283,8 +284,12 @@ export default { ...@@ -283,8 +284,12 @@ export default {
type: "warning", type: "warning",
}); });
}); });
}else{
window.location.href = "/iam/login/#/login?ReturnUrl=" + encodeURIComponent(window.location.href);
}
}, },
applyImmediately() { applyImmediately() {
if(this.$store.state.userInfo){
this.$router.push({ this.$router.push({
path: "/shop/shop_car_apply", path: "/shop/shop_car_apply",
query: { query: {
...@@ -295,6 +300,9 @@ export default { ...@@ -295,6 +300,9 @@ export default {
duration_unit: this.type, duration_unit: this.type,
}, },
}); });
}else{
window.location.href = "/iam/login/#/login?ReturnUrl=" + encodeURIComponent(window.location.href);
}
}, },
}, },
created() { created() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment