李双庆 2 years ago
parent
commit
d33582186e
  1. 7
      pages/student/login/login.vue

7
pages/student/login/login.vue

@ -42,8 +42,8 @@ import medicationApi from '@/api/medication.js';
data() { data() {
return { return {
password: true, password: true,
user: '',//账户 user: '18888888888', //账户
password1: ''//密码 password1: '123456' //密码
} }
}, },
onLoad() { onLoad() {
@ -70,11 +70,8 @@ import medicationApi from '@/api/medication.js';
//登陆 //登陆
medicationApi.login(item).then(res => { medicationApi.login(item).then(res => {
if (res.code == 1) { if (res.code == 1) {
res.data.userType = 2
uni.setStorageSync('token', res.data.token); uni.setStorageSync('token', res.data.token);
uni.setStorageSync('userType', res.data.userType); uni.setStorageSync('userType', res.data.userType);
let url_path = '' let url_path = ''
switch (String(res.data.userType)) { switch (String(res.data.userType)) {
case '1': //教练 case '1': //教练

Loading…
Cancel
Save