uni中cookie存取

存入cookie

mounted(){ document.cookie = "name=test2"; },
页面开始时,就将name=test2存入cookie

取出cookie

mounted(){ document.cookie = "name=test2;ex=yes"; console.log(22) },

getMyCookie(){
			console.log(getSingleCookie("name"))
			
		},
posted @ 2021-05-18 09:38  黑蛋的博客  阅读(3837)  评论(0编辑  收藏  举报