Authored by 陈峰

Merge branch 'feature/login'

<template>
<Row class="layout-header">
<Col :span="12" class="brand-title">
<i class="iconfont icon-alignjustify" aria-hidden="true" @click="$emit('menu-trigger')"></i>
{{userInfo.name}}
<Col :span="12" class="layout-header-left">
<div class="title">
<i class="iconfont icon-alignjustify" aria-hidden="true" @click="$emit('menu-trigger')"></i>
<span v-if="!showLoading" class="name">{{userInfo.currentShop.shopName}}</span>
</div>
<ul class="notice">
<li><span>|<a href="/rules.pdf" target="_blank">平台规则</a></span></li>
<li><span>|<a href="/user-guide.pdf" target="_blank">使用手册</a></span></li>
<li><span>|</span></li>
</ul>
</Col>
<Col :span="12" class="shop-info">
<span v-if="!showLoading" class="name">{{userInfo.currentShop.shopName}}</span>
<Col :span="12" class="layout-header-right">
<span>你好,{{userInfo.name}}</span>
<span v-if="showLoading" class="loading">切换中...</span>
<span>|</span>
<Dropdown @on-click="switchShop" trigger="click">
... ... @@ -92,7 +99,7 @@ export default {
cursor: pointer;
}
.shop-info {
.layout-header-right {
text-align: right;
padding-right: 20px;
... ... @@ -116,5 +123,31 @@ export default {
margin-left: 5px;
}
}
.layout-header-left {
.title {
float: left;
}
.notice {
float: left;
margin-left: 30px;
li {
float: left;
font-size: 15px;
}
span {
color: #ccc;
}
a {
color: #444;
margin-left: 10px;
margin-right: 10px;
}
}
}
}
</style>
... ...
... ... @@ -15,12 +15,6 @@
<Menu-item :name="subPurview.id" v-for="subPurview in purview.sub" :key="subPurview.id">{{subPurview.menu_name}}</Menu-item>
</Submenu>
</Menu>
<div class="layout-menu-foot">
<a href="/YOHO!BUY%E6%9C%89%E8%B4%A7%E5%B9%B3%E5%8F%B0%E8%BF%9D%E8%A7%84%E8%A1%8C%E4%B8%BA%E5%AE%9A%E4%B9%89%E5%8F%8A%E6%89%A3%E5%88%86%E8%AF%B4%E6%98%8E+VOL.02+.pdf" target="_blank">
<span>平台规则</span>
<i class="ivu-icon ivu-icon-help-circled"></i>
</a>
</div>
</div>
</template>
... ... @@ -196,14 +190,5 @@ $collapseLeftBorder: 2px;
overflow: hidden;
}
}
.layout-menu-foot {
padding-left: 0px;
text-align: center;
span {
display: none;
}
}
}
</style>
... ...
No preview for this file type
... ... @@ -9,6 +9,7 @@ const Context = require('../framework/context');
const rp = require('request-promise');
const Api = require('../common/api');
const config = global.yoho.config;
const logger = global.yoho.logger;
const regSession = '${0}=([^;]+);';
... ... @@ -24,6 +25,7 @@ class UserService extends Context {
platform: config.platform
}).then(userInfo => {
if (userInfo.code !== 200 || !userInfo.data.pid) {
logger.error('[apiDomain.erp.login]', userInfo);
return Promise.reject({code: 500, message: '用户名密码错误'});
}
return userInfo.data;
... ...