diff --git a/config/api.js b/config/api.js index 5dc1f6d..a9919e4 100644 --- a/config/api.js +++ b/config/api.js @@ -21,6 +21,29 @@ export const logOut = (data={}) => http.post('member/auth/logout', data, {custom export const submitAnswerResultApi = (data) => http.post('questionBank/submitAnswerResult.do', data,) // 上一题-下一题-直接跳到几题 export const getQuestionApi = (data) => http.post('questionBank/getQuestion', data,) + // 添加反馈 + export const questionCommentAdd = (data) => http.post('questionComment/add', data,) + // 添加|取消 收藏 错题 + export const questionWrongColle = (data) => http.post('questionWrong/dealCollection', data,) +// 通知 + export const indexNoticeApi = (subject) => http.get('idex/notice-'+subject, ) + // 轮播图 + export const indexAdApi = (subject) => http.get('idex/ad-'+subject, ) + // 获取顺序、精选练习已学题目,总题目数 + export const indexAdCount = (data) => http.get(`idex/count-${data.subject}-${data.carType}`, ) + // 考试流程 + export const examProcessInfo = (subject) => http.get(`idex/examProcessInfo-${subject}`, ) + // 分类学习了级 + export const columnPid = (pid) => http.get(`idex/column-${pid}`, ) + // 分类学习父级id + export const columnFid = (data) => http.get(`idex/column-${data.type}-${data.stepType}-${data.carType}`, ) + + + + + + + diff --git a/config/request.js b/config/request.js index acb3e16..75fb3dd 100644 --- a/config/request.js +++ b/config/request.js @@ -48,30 +48,20 @@ let secretKey = '22d90e09d1374f0f9e4accd07d333e55' data.code = data.errorcode // console.log('请求结果') // console.log(data) - if(data.code==406&&response.config.url!='member/auth/refresh-token'&&response.config.url!=='member/auth/logout') { - // await refreshToken() - let obj = response.config - let method = obj.method.toLowerCase() - if(method=='get') { - return uni.$u.http[method](obj.url, {params: obj.params}) - }else{ - return uni.$u.http[method](obj.url, obj.data ) - } - } if(data.code==401) { console.log('报401的接口') console.log(response.config.url) - return uni.$u.debounce(vm.$store.commit('goLogin'), 1500) + return uni.$u.toast('登录异常请退出重进') } // 自定义参数 const custom = response.config?.custom - if (data.code !== 0&&data.code!=406&&data.code!='200240213') { + if (data.code !== 0) { console.log('不正常的code') console.log(data) // 如果没有显式定义custom的toast参数为false的话,默认对报错进行toast弹出提示 if (custom.toast !== false) { - uni.$u.toast(data.msg) + uni.$u.toast(data.message) } // 如果需要catch返回,则进行reject diff --git a/main.js b/main.js index a249d0f..285aa1f 100644 --- a/main.js +++ b/main.js @@ -1,7 +1,7 @@ import App from './App' import uviewPlus from '@/uni_modules/uview-plus' import request from './config/request.js' -import { goPage } from '@/utils/utils.js' +import { goPage, noDoFn } from '@/utils/utils.js' import {setupStore} from '@/store'; // // #ifndef VUE3 @@ -21,6 +21,8 @@ import { createSSRApp } from 'vue' export function createApp() { const app = createSSRApp(App) app.config.globalProperties.$goPage = goPage + app.config.globalProperties.$noDoFn = noDoFn + app.use(uviewPlus) request(app) setupStore(app); diff --git a/manifest.json b/manifest.json index 0a287fb..2f44783 100644 --- a/manifest.json +++ b/manifest.json @@ -75,7 +75,7 @@ "disableHostCheck" : true, "proxy" : { "/api" : { - "target" : "http://192.168.1.214:8081/", + "target" : "http://192.168.1.237:8081/", // "target" : "http://192.168.1.40:8099/", "changeOrigin" : true, "secure" : true, diff --git a/pages.json b/pages.json index dcc7ee2..9974d0e 100644 --- a/pages.json +++ b/pages.json @@ -43,6 +43,14 @@ } }, { + "path": "webView/webView", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false, + "backgroundTextStyle": "dark" + } + }, + { "path": "brushQuestions/brushQuestions", "style": { "navigationBarTitleText": "刷题", diff --git a/pages/exercises/brushQuestions/brushQuestions.vue b/pages/exercises/brushQuestions/brushQuestions.vue index 51013df..b742d82 100644 --- a/pages/exercises/brushQuestions/brushQuestions.vue +++ b/pages/exercises/brushQuestions/brushQuestions.vue @@ -12,9 +12,12 @@ - {{types[questionBank.types-1]}} + {{types[questionBank.types-1]}} {{ questionBank.title}} + + + @@ -28,7 +31,7 @@ - {{item.key}} {{item.text}} + {{item.key}} {{item.text}} @@ -36,17 +39,17 @@ 正确答案是 {{ questionBank.answer=='false'?'错误':'正确' }} - {{ questionBank.answer }} + {{ questionBank.answer }} - 您的答案是 - {{ curOption.answer=='false'?'错误':'正确' }} + 您的答案是 + {{ curOption.answer=='false'?'错误':'正确' }} {{ curOption.answer }} - - + + 题目解析 @@ -69,7 +72,7 @@ {{currentIndex}}/{{quesIdList.length}} 题目 - + @@ -81,7 +84,7 @@ 答题卡 - + @@ -116,11 +119,20 @@ + + + + + + + + \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index 345f22c..c9049f3 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -24,9 +24,7 @@