diff --git a/.env.development b/.env.development index b5885673..17ba804a 100644 --- a/.env.development +++ b/.env.development @@ -6,7 +6,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 = 'https://aitstest.jlbank.com.cn:7002' @@ -24,7 +24,7 @@ VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001' # dev -VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001' +#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001' # sit #VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786' diff --git a/README.en.md b/README.en.md index 53639d47..cb85303e 100644 --- a/README.en.md +++ b/README.en.md @@ -4,3 +4,6 @@ npm 淘宝源下载 :npm config set registry https://registry.npmmirror.com npm config set registry http://25.12.10.69:8081/repository/aliyun-npm/ + +npm install --registry=https://registry.npmmirror.com + diff --git a/src/components/examination/es-analysis.vue b/src/components/examination/es-analysis.vue index 84e5bea3..375e7be7 100644 --- a/src/components/examination/es-analysis.vue +++ b/src/components/examination/es-analysis.vue @@ -51,7 +51,7 @@ }); const keywords = computed(() => { if (!props.value.relKeyword) return []; - return props.value.relKeyword.split(',').map((key) => key.trim()); + return props.value.relKeyword.split(/[,、]/).map((key) => key.trim()); }); const highlightedText = computed(() => { diff --git a/src/composables/useZpaging.js b/src/composables/useZpaging.js index 75e54dae..faf92378 100644 --- a/src/composables/useZpaging.js +++ b/src/composables/useZpaging.js @@ -6,13 +6,13 @@ import { } from 'vue'; export default function useZpaging({ - pagingRef, // 必传:z-paging组件的ref fetchFunction, // 必传:接口请求函数 searchKey = '' // 可选:搜索参数名,默认'searchText' }) { const total = ref(-1); const data_list = ref([]); const searchText = ref(''); + const pagingRef = ref(null); const queryList = async (pageNo, pageSize) => { try { const requestParams = { @@ -52,6 +52,7 @@ export default function useZpaging({ } }; return { + pagingRef, queryList, reload, search, diff --git a/src/pages.json b/src/pages.json index 0f86c625..793326fb 100644 --- a/src/pages.json +++ b/src/pages.json @@ -195,6 +195,7 @@ "path": "pages/wrongQuestionRecord/correct", "style": { "navigationBarTitleText": "错题本做题页", + "disableSwipeBack": true, "app-plus": { "titleNView": false } diff --git a/src/pages/course/index.vue b/src/pages/course/index.vue index 1ad37b11..5e0ad9f4 100644 --- a/src/pages/course/index.vue +++ b/src/pages/course/index.vue @@ -113,6 +113,9 @@ + + + @@ -236,24 +239,22 @@ import { onShow } from "@dcloudio/uni-app" } const courseListBase = ref([]) const courseList = computed(()=>{ - if(activeTag.value.length > 0 && !!activeTag.value[0]){ - return courseListBase.value - // .filter(t=>{ - // let _tags = (t.tagCataList||[]).map(k=>k.tagId) - // let _pass = false - // activeTag.value.forEach(k => { - // if(_tags.includes(k)){ - // _pass = true - // } - // }) - // return _pass - // }) - }else{ - return courseListBase.value - } - // return activeTag.value.length > 0 - // ?courseListBase.value.filter(t=>(t.tagCataList||[]).map(k=>k.tagId).indexOf(activeTag.value)>=0) - // :courseListBase.value + return courseListBase.value + // if(activeTag.value.length > 0 && !!activeTag.value[0]){ + // return courseListBase.value + // .filter(t=>{ + // let _tags = (t.tagCataList||[]).map(k=>k.tagId) + // let _pass = false + // activeTag.value.forEach(k => { + // if(_tags.includes(k)){ + // _pass = true + // } + // }) + // return _pass + // }) + // }else{ + // return courseListBase.value + // } }) // 整理树形 const courseListTree = computed(()=>{ @@ -310,6 +311,7 @@ import { onShow } from "@dcloudio/uni-app" pageObj.value.page = 1 } pageObj.value.total = 0 + loading.value = true switch (activeTab.value){ case '全部': queryCrsInfoByCatalogApi({ @@ -319,6 +321,8 @@ import { onShow } from "@dcloudio/uni-app" }).then(res=>{ courseListBase.value = courseListBase.value.concat(res.body || []) pageObj.value.total = res.total + }).finally(()=>{ + loading.value = false }) break; case '热门': @@ -335,12 +339,16 @@ import { onShow } from "@dcloudio/uni-app" }).then(res=>{ courseListBase.value = courseListBase.value.concat(res.body || []) pageObj.value.total = res.total + }).finally(()=>{ + loading.value = false }) break; } } + const loading = ref(false) const changeTab = (item) => { if(!item) return + courseListBase.value = [] activeTab.value = item.name activeTag.value = [] pageObj.value.page = 1 @@ -348,32 +356,43 @@ import { onShow } from "@dcloudio/uni-app" // activeTag.value = '' activeCourseType.value = '' activePrdlineType.value = '' + loading.value = true switch (item.name){ case '全部': queryCrsInfoByCatalogApi(pageObj.value).then(res=>{ courseListBase.value = res.body || [] pageObj.value.total = res.total + }).finally(()=>{ + loading.value = false }) break; case '热门': queryCrsInfoByPopularApi(pageObj.value).then(res=>{ courseListBase.value = res.body || [] + }).finally(()=>{ + loading.value = false }) break; case '最新': queryCrsInfoByLastnewApi(pageObj.value).then(res=>{ courseListBase.value = res.body || [] + }).finally(()=>{ + loading.value = false }) break; case '推荐': queryCrsInfoByRecmdApi(pageObj.value).then(res=>{ courseListBase.value = res.body || [] + }).finally(()=>{ + loading.value = false }) break; case '生产线': queryCrsInfoByPrdLineApi(pageObj.value).then(res=>{ courseListBase.value = res.body || [] pageObj.value.total = res.total + }).finally(()=>{ + loading.value = false }) break; } @@ -719,6 +738,17 @@ import { onShow } from "@dcloudio/uni-app" } } } + .loading-box{ + width: 100%; + height: 100rpx; + position: relative; + .loading-val{ + position: absolute; + left:50%; + top:50%; + transform: translate(-50%, -50%); + } + } } } \ No newline at end of file diff --git a/src/pages/examination/index.vue b/src/pages/examination/index.vue index 8bdba1fe..fd4dde92 100644 --- a/src/pages/examination/index.vue +++ b/src/pages/examination/index.vue @@ -156,7 +156,7 @@ import Subject from '@/components/examination/subject.vue'; import TouchBtn from '@/components/examination/touchBtn.vue'; import { ref, reactive, computed, onMounted, nextTick } from 'vue'; - import { onLoad } from '@dcloudio/uni-app'; + import { onLoad, onBackPress } from '@dcloudio/uni-app'; import common from '@/common/common'; import { getPageCache, setupKeyboardHeightListener } from '@/common/common'; import { commonUploadVoiceFile } from '@/api/common.js'; @@ -663,6 +663,7 @@ } }); }; + onBackPress((res) => res.from === 'backbutton'); diff --git a/src/pages/wrongQuestionRecord/components/favorites-course.vue b/src/pages/wrongQuestionRecord/components/favorites-course.vue index 2ebc228e..f5b1a62c 100644 --- a/src/pages/wrongQuestionRecord/components/favorites-course.vue +++ b/src/pages/wrongQuestionRecord/components/favorites-course.vue @@ -1,77 +1,92 @@ diff --git a/src/pages/wrongQuestionRecord/correct.vue b/src/pages/wrongQuestionRecord/correct.vue index eb1f4efc..fbfea93b 100644 --- a/src/pages/wrongQuestionRecord/correct.vue +++ b/src/pages/wrongQuestionRecord/correct.vue @@ -80,7 +80,7 @@