diff --git a/.env.development b/.env.development index 2228066c..a7b52e29 100644 --- a/.env.development +++ b/.env.development @@ -9,7 +9,7 @@ ENV = 'development' # VITE_APP_BASE_API_Url = 'http://25.18.122.78:9786' # DEV -VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' +VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # app入口 #VITE_APP_BASE_API_Url = 'http://25.16.122.65:7001' @@ -17,4 +17,4 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' #VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786' # h5专用地址 -VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002' \ No newline at end of file +VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001' \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index c1d7d7ef..39a9f809 100644 --- a/src/App.vue +++ b/src/App.vue @@ -7,7 +7,6 @@ export default { animationType: 'slide-in-bottom' }); }) - console.log('App Launch') }, onShow: function () { // console.log('App Show') diff --git a/src/common/mascot.js b/src/common/mascot.js index 0f7d0c3e..ac78daa5 100644 --- a/src/common/mascot.js +++ b/src/common/mascot.js @@ -2,22 +2,29 @@ import {getUserInfo} from "@/common/common.js" import common from "@/common/common.js" export const setMascot = () => { - const mascotState = common.getValue('mascotState') || false - console.log('设置科技鹿', mascotState); + // const mascotState = common.getValue('mascotState') || false + const mascotState = false + // console.log('设置科技鹿', mascotState); if (!mascotState) { - const userInfo = getUserInfo() - const mascotInfo = userInfo['mascotInfo'] - uni.setTabBarStyle({ - midButton: { - iconPath: "/static/images/icon/fawn-" + (mascotInfo?.mascotNo || '1') + ".png", - width: "86px", - height: "86px", - iconWidth: "90px" - }, - success: () => { - common.setValue('mascotState', true) - } - }) + + try{ + const userInfo = getUserInfo() + const mascotInfo = userInfo?.mascotInfo + console.log('设置科技鹿', mascotInfo); + uni.setTabBarStyle({ + midButton: { + iconPath: "/static/images/icon/fawn-" + (mascotInfo?.mascotNo || '1') + ".png", + width: "86px", + height: "86px", + iconWidth: "90px" + }, + success: () => { + common.setValue('mascotState', true) + } + }) + } catch(e){ + + } } return mascotState } \ No newline at end of file diff --git a/src/pages/courseDetail/index.vue b/src/pages/courseDetail/index.vue index 711ea9b2..f235a184 100644 --- a/src/pages/courseDetail/index.vue +++ b/src/pages/courseDetail/index.vue @@ -194,6 +194,7 @@ top: 256rpx; border-radius: 23rpx 23rpx 0rpx 0rpx; width: 100%; + height: 100%; display: flex; flex-direction: column; diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index d7395538..f5ff929b 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -378,7 +378,11 @@ } onShow(() => { setMascot() - mascotInfo.value = getUserInfo('mascotInfo') + const userInfo = getUserInfo() + if(userInfo) { + mascotInfo.value = userInfo?.mascotInfo + console.log('是', mascotInfo.value); + } if (!common.isLogin()) { common.navigateTo('/pages/login/login') return diff --git a/src/pages/login/login.vue b/src/pages/login/login.vue index 19e25ca3..38a882ed 100644 --- a/src/pages/login/login.vue +++ b/src/pages/login/login.vue @@ -105,7 +105,7 @@ const login_fun = (): void => { account: account.value, password: password.value }); - + // res['mascotState'] if (res['mascotState']) { // 判断是否跳转到选科技鹿页面 common.redirectTo('/pages/mascot/mascot_select_list'); } else { diff --git a/src/pages/mascot/mascot_select_list.vue b/src/pages/mascot/mascot_select_list.vue index 021abd2e..8dcb0a55 100644 --- a/src/pages/mascot/mascot_select_list.vue +++ b/src/pages/mascot/mascot_select_list.vue @@ -75,14 +75,16 @@ getUserInfo } from "@/common/common"; import { - onLoad + onLoad, + onBackPress } from '@dcloudio/uni-app'; + const back_state = ref(true); const mascotList = reactive([]) const windowsInfo = uni.getWindowInfo() const nowWidth = ref(0); - + const pages = getCurrentPages(); const swiperCount = 4; // 总轮播项数量 - + let swiperIndex = ref(0); // 当前显示第1个(索引0) const isAnimating = ref(false); // 标记动画是否进行中 @@ -114,12 +116,13 @@ common.msg('设置成功') common.setValue('mascotState', false) setTimeout(() => { - const pages = getCurrentPages(); + if (pages.length >= 2) { // 页面栈只有一页,没有返回页,那就返回首页 + back_state.value = false; common.navigateBack(); // 返回登录的上一页 } else { - common.switchTab('/pages/index/index'); + common.reLaunch('/pages/index/dialog',{ animationType: 'slide-in-bottom'}); } }, 400) }).catch(() => { @@ -139,12 +142,14 @@ }) }) onMounted(() => { - + back_state.value = pages.length <= 2; }) onUnmounted(() => { }) + console.log('pages', pages.length); + onBackPress(() => back_state.value);