| | |
| | | { |
| | | title: '出书申请', |
| | | icon: '/static/images/personal/chushu.png', |
| | | url: '/packagePersonal/pages/publishBooks/index', |
| | | url: '', |
| | | type: 'publishBooks', |
| | | } |
| | | ]; |
| | |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | currAuthStep: 1, |
| | | currAuthStep: 3, |
| | | }); |
| | | this.getUserInfo() |
| | | } |
| | |
| | | this.setData({ |
| | | userTypeActive: JSON.parse(userTypeData.data).userType, |
| | | }); |
| | | type = userTypeList.find((item) => item.value === this.data.userTypeActive)?.lable; |
| | | type = this.data.userTypeList.find((item) => item.value === this.data.userTypeActive)?.lable; |
| | | } else { |
| | | type = '' |
| | | } |
| | |
| | | let teacherRole = res.roleLinks.find((item) => item.role.refCode == 'teacher') |
| | | let teacherInfos = res.infoList.find((item) => item.type == 'teacherInfo') |
| | | let WeChatInfo = res.infoList.find((item) => item.type === "WeChat"); |
| | | let secretData = res.secretList.find(i => i.type == 'LoginNameAndPassword') |
| | | if (teacherRole && teacherInfos) { |
| | | defaultUser = { |
| | | ...teacherInfos, |
| | |
| | | this.setData({ |
| | | currAuthStep: 3, |
| | | }); |
| | | } else if (secretData) { |
| | | defaultUser = { |
| | | nickName: nickNameData && JSON.parse(nickNameData.data).nickName ? JSON.parse(nickNameData.data).nickName : secretData.credential, |
| | | icon: nickNameData && JSON.parse(nickNameData.data).icon != "" ? JSON.parse(nickNameData.data).icon : "", |
| | | userId: res.userId, |
| | | role: "Student", |
| | | userType: type, |
| | | } |
| | | this.setData({ |
| | | currAuthStep: 3, |
| | | }); |
| | | } |
| | | this.setData({ |
| | | userInfo: defaultUser |