diff --git a/.env.development b/.env.development index 022bbc55..753b1cd7 100644 --- a/.env.development +++ b/.env.development @@ -29,6 +29,6 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' # VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786' #VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://192.168.247.200' # VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.32.154:9602' -#VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://192.168.247.200' +VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://192.168.247.200' # VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.32.154:9605' diff --git a/certificate/ios/苹果账号.txt b/certificate/ios/苹果账号.txt index 2b310888..2ca46d78 100644 --- a/certificate/ios/苹果账号.txt +++ b/certificate/ios/苹果账号.txt @@ -31,9 +31,10 @@ Hb修改流程: 3.在HBuilder-Hello-Info.plist添加dcloud_appkey项,值为caf112ffeb8174f764076b6b109aa329 4. -25.64.16.140 +25.64.32.152 255.255.255.0 -25.64.16.254 +25.64.32.254 + http://25.13.9.101:9000/ diff --git a/src/api/courseRecord.js b/src/api/courseRecord.js index 6fd1d4b6..b32117df 100644 --- a/src/api/courseRecord.js +++ b/src/api/courseRecord.js @@ -101,3 +101,24 @@ export const queryExamHisByExamId = (data) => { }; +/**竞赛*/ + +// 查询竞赛记录 +export const queryTraCompetitionRecordPaging = (data) => { + return request({ + url: base_url + '/traCompetitionInfo/queryTraCompetitionRecordPaging', + method: 'post', + toastErrors: true, + data + }); +}; +// 查询竞赛答题列表 +export const queryTraCompetitionRecordInfoPaging = (data) => { + return request({ + url: base_url + '/traCompetitionInfo/queryTraCompetitionRecordInfoPaging', + method: 'post', + toastErrors: true, + data + }); +}; + diff --git a/src/api/login.js b/src/api/login.js index 34490767..d2f0158a 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -28,8 +28,8 @@ export const useAccountLoginApp = (data) => request({ }) => { if (rtnCode === '0000') { setToken(body) - const res = await Promise.all([queryCurrentUser(), queryCurrentValidMascotInfo() - // queryCurrentStatus() + const res = await Promise.all([queryCurrentUser(), queryCurrentValidMascotInfo(), + queryCurrentStatus() ]) const userInfo = getUserInfo() const mascotInfo = res[1] @@ -44,7 +44,7 @@ export const useAccountLoginApp = (data) => request({ badgeNum: pointsStatus['badgeNum'] ?? 0, // 徽章数 currentPoints: pointsStatus['currentPoints'] ?? 0, // 当前积分 currentRankAddr: pointsStatus['ossAddr'] ?? '', // 当前段位图片 - currentRankName: pointsStatus['currentRankName']?? '未知', // 当前段位名称 + currentRankName: pointsStatus['currentRankName'] ?? '未知', // 当前段位名称 }) return { mascotState: !mascotInfo.mascotId diff --git a/src/components/points-and-badge/check-in.vue b/src/components/points-and-badge/check-in.vue index c3ff3108..486b2e06 100644 --- a/src/components/points-and-badge/check-in.vue +++ b/src/components/points-and-badge/check-in.vue @@ -21,13 +21,12 @@ - + - @@ -73,7 +75,8 @@ + + diff --git a/src/pages/competitionRecord/index.vue b/src/pages/competitionRecord/index.vue new file mode 100644 index 00000000..a9fcddbf --- /dev/null +++ b/src/pages/competitionRecord/index.vue @@ -0,0 +1,138 @@ + + + + + diff --git a/src/pages/me/index.vue b/src/pages/me/index.vue index c8e5a12e..195bc114 100644 --- a/src/pages/me/index.vue +++ b/src/pages/me/index.vue @@ -48,7 +48,8 @@ 工号:{{ user_info.loginName }} - + + @@ -96,13 +97,13 @@ - + AI陪练记录 - + 竞赛记录 @@ -145,9 +146,7 @@ > - - - + - + @@ -178,7 +177,7 @@ import { queryCurrentUser } from '@/api/login.js'; import { defaultAvatar } from '@/enum.js'; import useUpdateAvatar from '@/composables/useUpdateAvatar'; - import { queryCurrentStatus } from '@/api/pointsAndRank.js'; + import { queryCurrentStatus, queryCheckIn } from '@/api/pointsAndRank.js'; import checkIn from '@/components/points-and-badge/check-in'; const { avatarCropperUrl, click_update_avatar, avatarCropperStatus, avatarOnCancel, avatarOnConfirm } = useUpdateAvatar({ success: (userData) => { @@ -218,25 +217,32 @@ } ]; const currentIndex = ref(0); - const socketStore = useSocketStore(); - const badgeNumRef = ref(null); const checkInRef = ref(null); const currentPointsRef = ref(null); - + const user_info = reactive({ userName: '', userId: '', imageAddr: '', - loginName: '' + loginName: '', + checkInToday: '', // 今日是否签到 + checkInDays: 0 // 连续签到天数 }); const goTest = () => { console.log('goTest'); // common.navigateTo('/pages/test/index'); }; - const checkInFun = () => { - checkInRef.value.open(); + // 签到打开 + const checkInClick = () => { + checkInRef.value.open(user_info.checkInToday, user_info.checkInDays); + }; + // 签到成功回调 + const checkInFun = (status) => { + if(status) { + getCheckInInfo() + } }; const click_loginout = () => { common.show('确定退出登录?').then(async (res) => { @@ -257,7 +263,6 @@ currentPoints: 0, // 当前积分 currentRankAddr: '', // 当前段位名称 currentRankName: '', // 当前段位名称 - startBadgeNum: 0, // 起始 徽章数 startCurrentPoints: 0, // 起始 积分 request_time: 0, // 上次请求时间 @@ -315,6 +320,15 @@ } } }); + + // 获取今日是否签到消息 + const getCheckInInfo = () => { + // todo 后续加防止重复多次请求逻辑 + queryCheckIn().then(({ body }) => { + user_info.checkInToday = body.checkInToday; // 今日是否签到 + user_info.checkInDays = body.days; // 连续签到天数 + }); + }; onLoad(() => { statistics_data['init'](); // 初始化数据 }); @@ -322,6 +336,8 @@ setMascot(); Object.assign(user_info, getUserInfo()); statistics_data['get_statistics_data'](); // 获取统计数据 + // 获取今日是否签到消息 + getCheckInInfo(); }); onHide(() => { checkInRef.value && checkInRef.value.close(); @@ -498,6 +514,20 @@ background-repeat: no-repeat; /* 禁止重复平铺 */ background-position: center; /* 图片居中显示 */ } + .already-sign-in-div { + margin-top: 10rpx; + width: 102rpx; + height: 48rpx; + font-weight: 500; + font-size: 26rpx; + line-height: 46rpx; + text-align: center; + color: #ffffff; + background-image: url('@/static/images/me/sign-in-button-bg2.png'); + background-size: 100%; /* 图片自适应元素大小(避免拉伸变形) */ + background-repeat: no-repeat; /* 禁止重复平铺 */ + background-position: center; /* 图片居中显示 */ + } } .study_information { diff --git a/src/pagesA.json b/src/pagesA.json index a6daa78c..f672b4ea 100644 --- a/src/pagesA.json +++ b/src/pagesA.json @@ -319,6 +319,15 @@ "titleNView": false } } + }, + { + "path": "pages/competitionRecord/index", + "style": { + "navigationBarTitleText": "竞赛记录", + "app-plus": { + "titleNView": false + } + } } ] } \ No newline at end of file