$Django 路飞之课程下的分类,用户登陆成功前端存cookie,
一 课程分类显示 宗旨:总的再次过滤 二 Cookie # export default new Vuex.Store({ state: { name:'', token:'', }, mutations: {}, actions: {} }) #全局数据 #赋值 methods:{ upup:function () { let _this=this this.$http.request({ url:'http://127.0.0.1:8000/login/', method:'post', data:{ name:_this.name, pwd:_this.pwd } }).then(function (response) { _this.$store.state.name=response.data.name _this.$store.state.token=response.data.token }) }, } #取值 < span class ="pull-right" v-if ="!this.$store.state.token" > Vuex状态管理器stoer介绍 vue-cookies -安装:npm install vue-cookies -使用: -store.js中导入import Cookie from 'vue-cookies' -取值:Cookie