|
@@ -35,7 +35,8 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import {
|
|
import {
|
|
- userZhangFirstInfo,
|
|
|
|
|
|
+ userZhangFirstInfo,
|
|
|
|
+ getCommonZhangFirstInfo,
|
|
userZhangInfo,
|
|
userZhangInfo,
|
|
userLocate,
|
|
userLocate,
|
|
getCommonZhangInfo
|
|
getCommonZhangInfo
|
|
@@ -58,6 +59,7 @@
|
|
useTabBarHistory
|
|
useTabBarHistory
|
|
} from '@/utils/emitEvents.js';
|
|
} from '@/utils/emitEvents.js';
|
|
import eggDialog from './eggDialog.vue'
|
|
import eggDialog from './eggDialog.vue'
|
|
|
|
+import { toast } from "../../utils/common";
|
|
|
|
|
|
const eggDialogRef = ref(null);
|
|
const eggDialogRef = ref(null);
|
|
|
|
|
|
@@ -98,7 +100,7 @@
|
|
// 获取路由参数
|
|
// 获取路由参数
|
|
routeParams.value = options;
|
|
routeParams.value = options;
|
|
|
|
|
|
- if (JSON.parse(getAuth())) {
|
|
|
|
|
|
+ if (getAuth()) {
|
|
// 已登录
|
|
// 已登录
|
|
// 选择年级进入调用此接口
|
|
// 选择年级进入调用此接口
|
|
if (options.flag == 'selectGrades') {
|
|
if (options.flag == 'selectGrades') {
|
|
@@ -111,9 +113,14 @@
|
|
// 蛋
|
|
// 蛋
|
|
// eggDialogRef.value.eggShow();
|
|
// eggDialogRef.value.eggShow();
|
|
|
|
|
|
- } else {
|
|
|
|
|
|
+ } else {
|
|
|
|
+ if (options.flag == 'selectGrades') {
|
|
|
|
+ getCommonZhangFirst()
|
|
|
|
+ } else {
|
|
|
|
+ getCommonZhang();
|
|
|
|
+ }
|
|
// 未登录
|
|
// 未登录
|
|
- getCommonZhang();
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
})
|
|
})
|
|
function getCommonZhang(data) {
|
|
function getCommonZhang(data) {
|
|
@@ -154,6 +161,25 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function getCommonZhangFirst() {
|
|
|
|
+ let req = {
|
|
|
|
+ nianji: routeParams.value.nianji,
|
|
|
|
+ xueqi: routeParams.value.xueqi,
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ getCommonZhangFirstInfo(req).then(res => {
|
|
|
|
+ infoData.jieList = res.data.jieList
|
|
|
|
+ infoData.haveFlag = res.data.haveFlag
|
|
|
|
+ infoData.nianji = res.data.nianji
|
|
|
|
+ infoData.number = res.data.number
|
|
|
|
+ infoData.numberStr = res.data.numberStr
|
|
|
|
+ infoData.xueqi = res.data.xueqi
|
|
|
|
+ infoData.zhangId = res.data.zhangId
|
|
|
|
+ infoData.zhangName = res.data.zhangName
|
|
|
|
+ gradeTerm.value = translateData(res.data);
|
|
|
|
+ useTabBarHistory().setTabBarStorage({nianji:res.data.nianji,zhangId:res.data.zhangId,xueqi:res.data.xueqi})
|
|
|
|
+ })
|
|
|
|
+ }
|
|
function getZhangFirst() {
|
|
function getZhangFirst() {
|
|
let req = {
|
|
let req = {
|
|
nianji: routeParams.value.nianji,
|
|
nianji: routeParams.value.nianji,
|
|
@@ -295,8 +321,8 @@
|
|
|
|
|
|
|
|
|
|
function listClick(data,index) {
|
|
function listClick(data,index) {
|
|
-
|
|
|
|
- if (!JSON.parse(getAuth())) {
|
|
|
|
|
|
+ if (!getAuth()) {
|
|
|
|
+ toast("当前为游客模式请登录!")
|
|
uni.redirectTo({
|
|
uni.redirectTo({
|
|
url: '/pages/login/index'
|
|
url: '/pages/login/index'
|
|
})
|
|
})
|