关于vue-cookie:
https://www.npmjs.com/package/vue-cookie
main.js
import VueCookie from 'vue-cookie'
Vue.use(VueCookie);
// From some method in one of your Vue components
this.$cookie.set('test', 'Hello world!', 1);
// This will set a cookie with the name 'test' and the value 'Hello world!' that expires in one day
// To get the value of a cookie use
this.$cookie.get('test');
// To delete a cookie use
this.$cookie.delete('test');
要考虑json数据,post和get
是自己写死数据还是用bmob数据库。
捋一下逻辑
1、先判断状态,是否登录,若未登录则要跳到登录页面;
2、若已有账号则输入账号密码登录(需验证)
3、若没有账号,则调到注册页面,注册账号()
4、注册成功后,登录
未完,待续,,,