feat(train): 新增专项训练列表页面并调整练习流程
- 新增 startPracticingList.vue 页面用于展示专项训练列表 - 修改首页按钮跳转链接从 startPracticing 改为 startPracticingList - 在 pages.json 中注册新的专项训练列表页面路由 - 更新 startPracticing.vue 页面接收分类参数并传递给接口 - 实现专项训练列表的分页加载和搜索功能 - 添加专项训练项目的分类显示和难度标识
This commit is contained in:
@@ -125,6 +125,7 @@ import useUserStore from '@/stores/useUserStore';
|
||||
import useDictStore from '@/stores/useDictStore';
|
||||
const userInfo = ref({});
|
||||
const Authorization = ref('');
|
||||
const cataType = ref('');
|
||||
const radio = ref('');
|
||||
const radio2 = ref('');
|
||||
const checkList = ref([]);
|
||||
@@ -161,6 +162,7 @@ watch(questionIndex, (newVal, oldVal) => {
|
||||
// });
|
||||
|
||||
onLoad((options) => {
|
||||
cataType.value = options.cataType;
|
||||
Authorization.value=uni.getStorageSync('Padmin-Token')||''
|
||||
getHeart();
|
||||
});
|
||||
@@ -202,7 +204,8 @@ function queryData(){
|
||||
'Content-Type':"application/x-www-form-urlencoded"
|
||||
}
|
||||
$api.myRequest('/train/public/trainPractice/getQuestions', {
|
||||
userId: userInfo.value.userId
|
||||
userId: userInfo.value.userId,
|
||||
category: cataType.value
|
||||
},'post',9100,header).then((resData) => {
|
||||
if(resData&&resData.code==200){
|
||||
resData.data.forEach((item,i)=>{
|
||||
|
||||
Reference in New Issue
Block a user