This commit is contained in:
parent
2f4c95d8a2
commit
fffccbb7be
13
commont.js
13
commont.js
|
@ -186,7 +186,7 @@ function getCookie(e) {
|
|||
// 如果你只对某个特定的cookie感兴趣,可以添加条件判断
|
||||
if (cookieName === e) {
|
||||
find=true;
|
||||
r(cookieValue);
|
||||
r(JSON.parse(cookieValue));
|
||||
}
|
||||
if(i==cookieArray.length-1){
|
||||
if(!find){
|
||||
|
@ -200,14 +200,17 @@ function getCookie(e) {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
function setCookie(name, value, days) {
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); // 有效期为days天
|
||||
var expires = "; expires=" + date.toUTCString();
|
||||
document.cookie = name + "=" + (value || "") + expires + "; path=/"; // 默认情况下,path为'/'
|
||||
document.cookie = name + "=" + (JSON.stringify(value) || "") + expires + "; path=/"; // 默认情况下,path为'/'
|
||||
}
|
||||
|
||||
|
||||
function delCookie(key) {
|
||||
document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/;';
|
||||
}
|
||||
|
||||
//获取url上的参数值 e为参数名称
|
||||
function getQueryString(e) {
|
||||
|
@ -539,7 +542,7 @@ function promiseAllWithErrors(promises) {
|
|||
});
|
||||
}
|
||||
|
||||
const commont=[{pagedata:pagedata},{maskData:maskData},{getDay:getDay},{uuid:uuid},{addStorage:addStorage},{addStorage:addStorage},{getStorage:getStorage},{deloneStorage:deloneStorage},{delAllStorage:delAllStorage},{formatDate:formatDate},{jsonurldata:jsonurldata},{isWeiXin:isWeiXin},
|
||||
const commont=[{pagedata:pagedata},{maskData:maskData},{getDay:getDay},{uuid:uuid},{addStorage:addStorage},{getStorage:getStorage},{deloneStorage:deloneStorage},{delAllStorage:delAllStorage},{formatDate:formatDate},{jsonurldata:jsonurldata},{isWeiXin:isWeiXin},
|
||||
{getQueryString},{getMonthLast},{getMonthFirst},{compression},{isObject},{isArray},{addSessionStorage},{getSessionStorage},{delSessionStorage},{initOss},{setCookie},
|
||||
{getCookie},{debunce},{promiseAllWithErrors}];
|
||||
{getCookie},{delCookie:delCookie},{debunce},{promiseAllWithErrors}];
|
||||
export default commont;
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "erp-element-ui",
|
||||
"version": "1.0.30",
|
||||
"version": "1.0.32",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
Loading…
Reference in New Issue