包含构建生成的静态资源文件、JavaScript模块及服务器端依赖项。新增了favicon.ico、多张PNG图标图片、Vue相关模块文件、axios库文件、错误处理中间件及样式文件等。这些文件是项目构建后的输出结果,用于生产环境部署。同时更新了构建配置和版本信息。
43 lines
1.0 KiB
JavaScript
43 lines
1.0 KiB
JavaScript
import utils from './../utils.js';
|
|
import platform from '../platform/index.js';
|
|
|
|
export default platform.hasStandardBrowserEnv ?
|
|
|
|
// Standard browser envs support document.cookie
|
|
{
|
|
write(name, value, expires, path, domain, secure) {
|
|
const cookie = [name + '=' + encodeURIComponent(value)];
|
|
|
|
utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
|
|
|
|
utils.isString(path) && cookie.push('path=' + path);
|
|
|
|
utils.isString(domain) && cookie.push('domain=' + domain);
|
|
|
|
secure === true && cookie.push('secure');
|
|
|
|
document.cookie = cookie.join('; ');
|
|
},
|
|
|
|
read(name) {
|
|
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
return (match ? decodeURIComponent(match[3]) : null);
|
|
},
|
|
|
|
remove(name) {
|
|
this.write(name, '', Date.now() - 86400000);
|
|
}
|
|
}
|
|
|
|
:
|
|
|
|
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
{
|
|
write() {},
|
|
read() {
|
|
return null;
|
|
},
|
|
remove() {}
|
|
};
|
|
|