|
@@ -6,7 +6,7 @@
|
|
|
<!-- 蛋 -->
|
|
|
<egg-dialog ref="eggDialogRef" @eggBtn="eggBtn"></egg-dialog>
|
|
|
<catalogue ref="catalogueRef" @change-zhang="handleChangeZhang"></catalogue>
|
|
|
- <CustomTabBar></CustomTabBar>
|
|
|
+ <CustomTabBar :cardId="cardId" :nianji="nianji" :zhangId="zhangId"></CustomTabBar>
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
@@ -40,7 +40,10 @@
|
|
|
import cacheManager from "@/utils/cacheManager.js";
|
|
|
|
|
|
|
|
|
- const eggDialogRef = ref(null);
|
|
|
+ const eggDialogRef = ref(null);
|
|
|
+ const zhangId = ref(null);
|
|
|
+ const nianji = ref(null);
|
|
|
+ const cardId = ref(null);
|
|
|
const catalogueRef = ref(null);
|
|
|
const selectZhang = ref(null);
|
|
|
let infoData = reactive({
|
|
@@ -53,18 +56,22 @@
|
|
|
zhangName: '',
|
|
|
numberStr: '',
|
|
|
});
|
|
|
- onLoad(() => {
|
|
|
+ onLoad((options) => {
|
|
|
// 获取路由参数
|
|
|
-
|
|
|
- init()
|
|
|
+ if(options){
|
|
|
+ zhangId.value = options.zhangId
|
|
|
+ nianji.value = options.nianji
|
|
|
+ cardId.value = options.cardId
|
|
|
+ }
|
|
|
+
|
|
|
+ init(options)
|
|
|
|
|
|
})
|
|
|
|
|
|
- function init(){
|
|
|
+ function init(options){
|
|
|
if (cacheManager.get('auth')) {
|
|
|
//会员 取auth
|
|
|
selectZhang.value = cacheManager.get('auth');
|
|
|
-
|
|
|
console.log(selectZhang.value);
|
|
|
// 已登录
|
|
|
// 选择年级进入调用此接口
|
|
@@ -72,9 +79,10 @@
|
|
|
getZhangInfo()
|
|
|
// 蛋
|
|
|
// eggDialogRef.value.eggShow();
|
|
|
- } else {
|
|
|
+ } else {
|
|
|
+ console.log(options);
|
|
|
// 未登录 游客
|
|
|
- getCommonZhang()
|
|
|
+ getCommonZhang(options)
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -107,11 +115,11 @@
|
|
|
}
|
|
|
|
|
|
function getCommonZhang(data) {
|
|
|
- const auth = cacheManager.get('auth');
|
|
|
+
|
|
|
let req = {
|
|
|
- nianji: auth.nianji,
|
|
|
- cardId: auth.cardId,
|
|
|
- zhangId: selectZhang.value? selectZhang.value.zhangId :0,
|
|
|
+ nianji: data.nianji,
|
|
|
+ cardId: data.cardId,
|
|
|
+ zhangId:data.zhangId,
|
|
|
}
|
|
|
getCommonZhangInfo(req).then(res => {
|
|
|
infoData.jieList = res.data.jieList
|