Merge branch 'feature/task1.0.0_xg' into 'feature/task1.0.0'

feat: 响应状态码为退出登录时,返回reject

See merge request yanxuan-frontend/shop-pc!78
merge-requests/78/merge
肖广 3 years ago
commit 4372719082

@ -10,7 +10,7 @@
<div <div
slot="reference" slot="reference"
class="header-cart-popover__refrence flex flex-middle" class="header-cart-popover__refrence flex flex-middle"
@click="onJumpCart" @click="onJumCartPage"
> >
<img src="~/assets/img/layout/icon-shop.png" /> <img src="~/assets/img/layout/icon-shop.png" />
<span>购物车</span> <span>购物车</span>
@ -144,16 +144,13 @@ export default {
}, },
}, },
methods: { methods: {
onJumpCart() {
if (!this.$isLoginValidate()) {
return;
}
this.$router.push("/cart");
},
onJumpGoodsDetail(id) { onJumpGoodsDetail(id) {
this.$router.push(`/goods/detail/${id}`); this.$router.push(`/goods/detail/${id}`);
}, },
onJumCartPage() { onJumCartPage() {
if (!this.$isLoginValidate()) {
return;
}
this.$router.push("/cart"); this.$router.push("/cart");
}, },
}, },

@ -61,14 +61,13 @@
<HeaderInfoBar /> <HeaderInfoBar />
<div class="default-bar-header"> <div class="default-bar-header">
<div class="bar-header-box"> <div class="bar-header-box">
<div <div class="bar-header-box__wrap flex flex-between flex-middle">
class="bar-header-box__wrap flex flex-between flex-middle" <div @click="onOpenHomePage">
@click="onOpenHomePage"
>
<img <img
class="header-box-wrap__logo" class="header-box-wrap__logo"
src="~/assets/img/layout/logo.png" src="~/assets/img/layout/logo.png"
/> />
</div>
<div class="header-box-wrap__right flex flex-middle"> <div class="header-box-wrap__right flex flex-middle">
<div class="box-wrap-right__search flex"> <div class="box-wrap-right__search flex">
<div class="search-input"> <div class="search-input">
@ -76,7 +75,7 @@
v-model="searchContent" v-model="searchContent"
clearable clearable
placeholder="请输入商品名称" placeholder="请输入商品名称"
@keyup.enter="onSearch" @keyup.enter.native="onSearch"
> >
</el-input> </el-input>
</div> </div>

@ -25,7 +25,6 @@ export default function ({$axios, store, route}, inject) {
if(result.code === 'TOKEN_FAIL'){ if(result.code === 'TOKEN_FAIL'){
store.commit('setLoginOut'); store.commit('setLoginOut');
store.commit('setLoginVisible'); store.commit('setLoginVisible');
return result;
} }
return Promise.reject(result); return Promise.reject(result);
} }

Loading…
Cancel
Save