mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-17 16:35:53 +08:00
Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui
This commit is contained in:
@@ -5,17 +5,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {v4 as uuidv4} from 'uuid';
|
||||
import storage from '@/plugins/storage';
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
mounted () {
|
||||
let uuid = storage.getItem('uuid');
|
||||
if (!uuid) {
|
||||
uuid = uuidv4();
|
||||
storage.setItem('uuid', uuid);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -5,6 +5,8 @@ import Storage from './storage';
|
||||
import router from '../router/index.js';
|
||||
import store from '../vuex/store';
|
||||
import { handleRefreshToken } from '@/api/index';
|
||||
import {v4 as uuidv4} from 'uuid';
|
||||
|
||||
const qs = require('qs');
|
||||
// api地址
|
||||
export const buyerUrl =
|
||||
@@ -59,7 +61,11 @@ service.interceptors.request.use(
|
||||
config.loading = Spin.show();
|
||||
}
|
||||
|
||||
const uuid = Storage.getItem('uuid');
|
||||
let uuid = Storage.getItem('uuid');
|
||||
if (!uuid) {
|
||||
uuid = uuidv4();
|
||||
Storage.setItem('uuid', uuid);
|
||||
}
|
||||
config.headers['uuid'] = uuid;
|
||||
|
||||
// 获取访问Token
|
||||
|
||||
Reference in New Issue
Block a user