1、获取cookie
首先登录的时候就把用户的cookies存入本地存储中,
2、请求带上cookie
当我们需要保存cookie,在request.js文件中写上请求头:
完整request.js文件
//发送ajax请求
import config from './config.js'
export default (url,data={},method='GET')=>{
return new Promise((resolve,reject)=>{
wx.
1、获取cookie
首先登录的时候就把用户的cookies存入本地存储中,
2、请求带上cookie
当我们需要保存cookie,在request.js文件中写上请求头:
完整request.js文件
//发送ajax请求
import config from './config.js'
export default (url,data={},method='GET')=>{
return new Promise((resolve,reject)=>{
wx.