用戶登陸

一、在vuex存,寫在store中的index.js中, 其中payload是傳的參數,state是第一個參數,必需要傳的,userInfoLogin和user_name是登陸調用接口返回的數據複製給state中聲明的變量 退出token 在login.vue中 凡是結構中須要的數據都要在data中聲明如下, 引入vuex時:要先用import導入,而後用…引入,最後用this.須要的字段就可使用
相關文章
相關標籤/搜索