赞
踩
- const getCookie = (cname) => {
- let name = cname + "=";
- let cookieArr = document.cookie.split(";");
- for (let i = 0; i < cookieArr.length; i++) {
- let cookieStr = cookieArr[i];
- if (cookieStr.indexOf(name) != -1) return cookieStr.substring(name.length + 1, cookieStr.length);
- }
- return "";
- }
-
- export default getCookie;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。