Browse Source

支持多商家

master
xh-pan1 2 years ago
parent
commit
2ffda282e6
  1. 2
      config/index.js
  2. 6
      src/components/base/topNav.vue
  3. 4
      src/styles/variables.scss
  4. 17
      src/util/server.js
  5. 2
      src/views/login/login.vue

2
config/index.js

@ -39,7 +39,7 @@ module.exports = {
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: true,
useEslint: false,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,

6
src/components/base/topNav.vue

@ -434,7 +434,7 @@ $navSearchHeight: 39px;
span{
cursor: pointer;
b{
color: $mainColor;
color: $mainGlod;
padding: 0 2px;
}
}
@ -629,8 +629,8 @@ $navSearchHeight: 39px;
text-align: center;
font-size: 14px;
font-family: Microsoft YaHei;
color: $mainColor;
background: #333333;
color: $fontColor;
background: $mainColor;
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.16);
border-radius: 3px;
cursor: pointer;

4
src/styles/variables.scss

@ -1,6 +1,6 @@
// 网站主题色调
$fontColor: #333; // 字体色
$mainColor: #FF7800; // 主色
$fontColor: #FFFFFF; // 字体色
// $mainColor: #FF7800; // 主色
$bgColor: #F5F5F5; // 背景色
$mainGlod: #C5AA7B; // 主题金

17
src/util/server.js

@ -3,6 +3,7 @@ import Vue from 'vue'
import promise from 'es6-promise'
import axios from 'axios'
import store from '@/store/index'
import router from '../router'
// import localStorage from '../storage/localStorage'
import Cookie from 'js-cookie'
promise.polyfill()
@ -31,6 +32,22 @@ service.interceptors.request.use(config => {
if (Cookie.get('token')) {
config.headers['Authorization'] = Cookie.get('token')
}
var fullUrl = window.location.search;
if (fullUrl.indexOf("?") != -1) {
fullUrl = fullUrl.substring(1);
var paramStrs = fullUrl.split("&");
for(let i=0;i<paramStrs.length;i++){
const newStrs = paramStrs[i].split("=");
if(newStrs[0] === 'project'){
config.headers['project'] = newStrs[1]
return config
}
}
config.headers['project'] = ''
}else{
config.headers['project'] = ''
}
return config
}, error => {
return Promise.reject(error)

2
src/views/login/login.vue

@ -35,8 +35,6 @@
<span v-show="!codeShow" class="codeBtn codeCount">重新获取({{ codeCountNum }}s)</span>
</div>
</div>
<div class="noLogin" :class="{ registered: isRegistered === '1' }">
<el-checkbox v-show="isRegistered === '2'" v-model="isNoLogin">七天免登录</el-checkbox>
<span></span>

Loading…
Cancel
Save