李双庆 1 year 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