fix:修改uuid报错

feature/uuid-0609-ch
ch 3 years ago
parent af06861fc9
commit 30cdc50558

@ -4,7 +4,7 @@
* @Author: ch
* @Date: 2022-05-03 23:04:45
* @LastEditors: ch
* @LastEditTime: 2022-06-10 11:01:12
* @LastEditTime: 2022-06-10 14:26:30
* @Description: file content
*/
let axios = null;
@ -14,7 +14,7 @@ export default function ({ app, $axios, store, req }) {
let uuid = store.state.uuid;
if (!uuid && req.headers.cookie) {
uuid = req.headers.cookie.split(';').find(i => i.includes(UUID_KEY));
uuid = uuid.replace(`${UUID_KEY}=`,'')
uuid = uuid && uuid.replace(`${UUID_KEY}=`,'')
}
if (!uuid) {
uuid = CreatUuid(16, 2);

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-04 17:11:07
* @LastEditors: ch
* @LastEditTime: 2022-06-10 11:01:21
* @LastEditTime: 2022-06-10 14:26:57
* @Description: file content
*/
import { CreatUuid } from "@/plugins/utils";
@ -13,7 +13,7 @@ export default function ({$axios, store, route, req}, inject) {
let uuid = store.state.uuid;
if (!uuid && req.headers.cookie) {
uuid = req.headers.cookie.split(';').find(i => i.includes(UUID_KEY));
uuid = uuid.replace(`${UUID_KEY}=`,'')
uuid = uuid && uuid.replace(`${UUID_KEY}=`,'')
}
if (!uuid) {
uuid = CreatUuid(16, 2);

Loading…
Cancel
Save