Merge branch 'feature/login'
Showing
5 changed files
with
41 additions
and
21 deletions
1 | <template> | 1 | <template> |
2 | <Row class="layout-header"> | 2 | <Row class="layout-header"> |
3 | - <Col :span="12" class="brand-title"> | ||
4 | - <i class="iconfont icon-alignjustify" aria-hidden="true" @click="$emit('menu-trigger')"></i> | ||
5 | - {{userInfo.name}} | 3 | + <Col :span="12" class="layout-header-left"> |
4 | + <div class="title"> | ||
5 | + <i class="iconfont icon-alignjustify" aria-hidden="true" @click="$emit('menu-trigger')"></i> | ||
6 | + <span v-if="!showLoading" class="name">{{userInfo.currentShop.shopName}}</span> | ||
7 | + </div> | ||
8 | + <ul class="notice"> | ||
9 | + <li><span>|<a href="/rules.pdf" target="_blank">平台规则</a></span></li> | ||
10 | + <li><span>|<a href="/user-guide.pdf" target="_blank">使用手册</a></span></li> | ||
11 | + <li><span>|</span></li> | ||
12 | + </ul> | ||
6 | </Col> | 13 | </Col> |
7 | - <Col :span="12" class="shop-info"> | ||
8 | - <span v-if="!showLoading" class="name">{{userInfo.currentShop.shopName}}</span> | 14 | + <Col :span="12" class="layout-header-right"> |
15 | + <span>你好,{{userInfo.name}}</span> | ||
9 | <span v-if="showLoading" class="loading">切换中...</span> | 16 | <span v-if="showLoading" class="loading">切换中...</span> |
10 | <span>|</span> | 17 | <span>|</span> |
11 | <Dropdown @on-click="switchShop" trigger="click"> | 18 | <Dropdown @on-click="switchShop" trigger="click"> |
@@ -92,7 +99,7 @@ export default { | @@ -92,7 +99,7 @@ export default { | ||
92 | cursor: pointer; | 99 | cursor: pointer; |
93 | } | 100 | } |
94 | 101 | ||
95 | - .shop-info { | 102 | + .layout-header-right { |
96 | text-align: right; | 103 | text-align: right; |
97 | padding-right: 20px; | 104 | padding-right: 20px; |
98 | 105 | ||
@@ -116,5 +123,31 @@ export default { | @@ -116,5 +123,31 @@ export default { | ||
116 | margin-left: 5px; | 123 | margin-left: 5px; |
117 | } | 124 | } |
118 | } | 125 | } |
126 | + | ||
127 | + .layout-header-left { | ||
128 | + .title { | ||
129 | + float: left; | ||
130 | + } | ||
131 | + | ||
132 | + .notice { | ||
133 | + float: left; | ||
134 | + margin-left: 30px; | ||
135 | + | ||
136 | + li { | ||
137 | + float: left; | ||
138 | + font-size: 15px; | ||
139 | + } | ||
140 | + | ||
141 | + span { | ||
142 | + color: #ccc; | ||
143 | + } | ||
144 | + | ||
145 | + a { | ||
146 | + color: #444; | ||
147 | + margin-left: 10px; | ||
148 | + margin-right: 10px; | ||
149 | + } | ||
150 | + } | ||
151 | + } | ||
119 | } | 152 | } |
120 | </style> | 153 | </style> |
@@ -15,12 +15,6 @@ | @@ -15,12 +15,6 @@ | ||
15 | <Menu-item :name="subPurview.id" v-for="subPurview in purview.sub" :key="subPurview.id">{{subPurview.menu_name}}</Menu-item> | 15 | <Menu-item :name="subPurview.id" v-for="subPurview in purview.sub" :key="subPurview.id">{{subPurview.menu_name}}</Menu-item> |
16 | </Submenu> | 16 | </Submenu> |
17 | </Menu> | 17 | </Menu> |
18 | - <div class="layout-menu-foot"> | ||
19 | - <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"> | ||
20 | - <span>平台规则</span> | ||
21 | - <i class="ivu-icon ivu-icon-help-circled"></i> | ||
22 | - </a> | ||
23 | - </div> | ||
24 | </div> | 18 | </div> |
25 | </template> | 19 | </template> |
26 | 20 | ||
@@ -196,14 +190,5 @@ $collapseLeftBorder: 2px; | @@ -196,14 +190,5 @@ $collapseLeftBorder: 2px; | ||
196 | overflow: hidden; | 190 | overflow: hidden; |
197 | } | 191 | } |
198 | } | 192 | } |
199 | - | ||
200 | - .layout-menu-foot { | ||
201 | - padding-left: 0px; | ||
202 | - text-align: center; | ||
203 | - | ||
204 | - span { | ||
205 | - display: none; | ||
206 | - } | ||
207 | - } | ||
208 | } | 193 | } |
209 | </style> | 194 | </style> |
No preview for this file type
server/public/user-guide.pdf
0 → 100644
No preview for this file type
@@ -9,6 +9,7 @@ const Context = require('../framework/context'); | @@ -9,6 +9,7 @@ const Context = require('../framework/context'); | ||
9 | const rp = require('request-promise'); | 9 | const rp = require('request-promise'); |
10 | const Api = require('../common/api'); | 10 | const Api = require('../common/api'); |
11 | const config = global.yoho.config; | 11 | const config = global.yoho.config; |
12 | +const logger = global.yoho.logger; | ||
12 | 13 | ||
13 | const regSession = '${0}=([^;]+);'; | 14 | const regSession = '${0}=([^;]+);'; |
14 | 15 | ||
@@ -24,6 +25,7 @@ class UserService extends Context { | @@ -24,6 +25,7 @@ class UserService extends Context { | ||
24 | platform: config.platform | 25 | platform: config.platform |
25 | }).then(userInfo => { | 26 | }).then(userInfo => { |
26 | if (userInfo.code !== 200 || !userInfo.data.pid) { | 27 | if (userInfo.code !== 200 || !userInfo.data.pid) { |
28 | + logger.error('[apiDomain.erp.login]', userInfo); | ||
27 | return Promise.reject({code: 500, message: '用户名密码错误'}); | 29 | return Promise.reject({code: 500, message: '用户名密码错误'}); |
28 | } | 30 | } |
29 | return userInfo.data; | 31 | return userInfo.data; |
-
Please register or login to post a comment