Commit 813a4aa6 by qinjianhui

fix: 问题修改

parent 484fbabc
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
<div class="header-image"> <div class="header-image">
<img src="../assets/logo.png" height="40px"/> <img src="../assets/logo.png" height="40px"/>
</div> </div>
<!-- <div class="user-info"> <div class="user-info">
<div class="user-msg"> <!-- <div class="user-msg">
<span class="user-name">{{ '小溪' }}</span> <span class="user-name">{{ '小溪' }}</span>
<span>欢迎您</span> <span>欢迎您</span>
</div> </div> -->
<div class="logout" title="退出登录" @click="logout"> <div class="logout" title="退出登录" @click="logout">
<img src="../assets/images/logout.png" /> <img src="../assets/images/logout.png" />
</div> </div>
</div> --> </div>
</div> </div>
<div class="login_content"> <div class="login_content">
<div class="no-authority"> <div class="no-authority">
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
font-size: 50px; font-size: 50px;
line-height: 100px; line-height: 100px;
font-family: '微软雅黑'; font-family: '微软雅黑';
" v-if="userInfo.erpKey"> " v-if="userInfo && userInfo.erpKey">
<a :href="'https://'+userInfo.erpKey+'.jomalls.com'" target="_blank" style="text-decoration: none"> <a :href="'https://'+ userInfo && userInfo.erpKey+'.jomalls.com'" target="_blank" style="text-decoration: none">
{{ userInfo.erpKey + '.jomalls.com' }}</a> {{ userInfo && userInfo.erpKey + '.jomalls.com' }}</a>
</div> </div>
<h1 <h1
style=" style="
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
line-height: 100px; line-height: 100px;
font-family: '微软雅黑'; font-family: '微软雅黑';
"> ">
联系电话:15399065167 联系电话:18710915638
</h2> </h2>
<h2 <h2
style=" style="
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
line-height: 50px; line-height: 50px;
font-family: '微软雅黑'; font-family: '微软雅黑';
"> ">
邮箱:nikki@jomalls.com 邮箱:nina@jomalls.com
</h2> </h2>
<el-button <el-button
style=" style="
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
</template> </template>
<script> <script>
import {mapState} from 'vuex' import {mapMutations, mapState} from 'vuex'
import {post} from '../utils/axios' import {post} from '../utils/axios'
export default { export default {
...@@ -87,7 +87,6 @@ export default { ...@@ -87,7 +87,6 @@ export default {
data() { data() {
return { return {
userInfo: JSON.parse(localStorage.getItem('userInfo')), userInfo: JSON.parse(localStorage.getItem('userInfo')),
shopifyObj:JSON.parse(localStorage.getItem('shopifyObj'))
} }
}, },
computed: { computed: {
...@@ -95,12 +94,14 @@ export default { ...@@ -95,12 +94,14 @@ export default {
}, },
mounted() { mounted() {
if (this.userInfo&&this.shopifyObj) { if (this.userInfo&&this.shopifyObj) {
this.getShopifyInfo() // this.getShopifyInfo()
} }
}, },
methods: { methods: {
...mapMutations(['setUserInfo']),
goBack() { goBack() {
this.$router.push('/home') console.log('111')
this.$router.push('/')
}, },
getShopifyInfo() { getShopifyInfo() {
post('business/shop/bind', { post('business/shop/bind', {
...@@ -112,6 +113,9 @@ export default { ...@@ -112,6 +113,9 @@ export default {
}) })
}, },
logout() { logout() {
localStorage.removeItem('userInfo')
this.setUserInfo(undefined)
this.$router.push('/login')
}, },
}, },
} }
......
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