applet
parent
edf7d20e6b
commit
01d69a9de3
@ -1,43 +0,0 @@ |
|||||||
import request from '../request/index.js'; |
|
||||||
|
|
||||||
export function getExamQuestion(data) { |
|
||||||
return request({ |
|
||||||
url: 'wrj-api/wrjQuestionTest/test', |
|
||||||
method: 'GET', |
|
||||||
data |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
export function getCurrentTest(data) { |
|
||||||
return request({ |
|
||||||
url: 'wrj-api/wrjQuestionTest/getCurrentTest', |
|
||||||
method: 'GET', |
|
||||||
data |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
export function getExamInfo(data) { |
|
||||||
return request({ |
|
||||||
url: 'wrj-api/wrjQuestionTest/getQuestionTestMessageById', |
|
||||||
method: 'GET', |
|
||||||
data |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
// 交卷
|
|
||||||
export function submitExam(data) { |
|
||||||
return request({ |
|
||||||
url: 'wrj-api/wrjQuestionTest/testSubmit', |
|
||||||
method: 'POST', |
|
||||||
data |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
// 获取考试记录
|
|
||||||
export function getExamRecord(data) { |
|
||||||
return request({ |
|
||||||
url: 'wrj-api/wrjQuestionTest/getTestScore', |
|
||||||
method: 'POST', |
|
||||||
data |
|
||||||
}); |
|
||||||
} |
|
@ -1,93 +0,0 @@ |
|||||||
import request from '../request/index.js'; |
|
||||||
|
|
||||||
export function queryQuestion(data) { |
|
||||||
return request({ |
|
||||||
url: 'wrj-api/wrjQuestion/queryQuestionWithUser', |
|
||||||
method: 'POST', |
|
||||||
data |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
export function queryQuestionEmpty(data) { |
|
||||||
return request({ |
|
||||||
url: 'wrj-api/wrjQuestion/queryQuestion', |
|
||||||
method: 'POST', |
|
||||||
data |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
export function doExercise(data) { |
|
||||||
return request({ |
|
||||||
url: 'wrj-api/wrjQuestionPractice/insert', |
|
||||||
method: 'POST', |
|
||||||
data |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
export function clearPractice(params) { |
|
||||||
return request({ |
|
||||||
url: `wrj-api/wrjQuestionPractice/clear?practiceType=${params.practiceType}&businessCode=${params.businessCode}`, |
|
||||||
method: 'POST' |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
// 收藏
|
|
||||||
export function collectQuestion(questionId) { |
|
||||||
return request({ |
|
||||||
url: `wrj-api/wrjUserCollectQuestion/update?questionId=${questionId}`, |
|
||||||
method: 'POST' |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
// 获取收藏题目
|
|
||||||
export function queryLikeQuestion(data) { |
|
||||||
return request({ |
|
||||||
url: `wrj-api/wrjUserCollectQuestion/getUserCollectQuestion`, |
|
||||||
method: 'GET', |
|
||||||
data |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
// 获取错题
|
|
||||||
export function queryErrorQuestion(data) { |
|
||||||
return request({ |
|
||||||
url: `wrj-api/wrjUserErrorQuestion/getUserErrorQuestion`, |
|
||||||
method: 'GET', |
|
||||||
data |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
// 获取收藏的列表
|
|
||||||
export function queryCollectList(driverTypeId) { |
|
||||||
return request({ |
|
||||||
url: `wrj-api/wrjUserCollectQuestion/getUserCollectQuestionId?driverTypeId=${driverTypeId}`, |
|
||||||
method: 'GET' |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
// 移除错题
|
|
||||||
export function removeErrorQuestion(questionId) { |
|
||||||
return request({ |
|
||||||
url: `wrj-api/wrjUserErrorQuestion/remove?questionId=${questionId}`, |
|
||||||
method: 'POST' |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
// 获取首页信息
|
|
||||||
export function queryIndexInfo(data) { |
|
||||||
return request({ |
|
||||||
url: 'wrj-api/wrjQuestion/getIndexData', |
|
||||||
method: 'GET', |
|
||||||
data, |
|
||||||
publicApi: true |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
// 获取考试信息
|
|
||||||
export function queryIndexDetail(data) { |
|
||||||
return request({ |
|
||||||
url: 'wrj-api/wrjDriverType/detail', |
|
||||||
method: 'GET', |
|
||||||
data |
|
||||||
}); |
|
||||||
} |
|
@ -1,51 +0,0 @@ |
|||||||
import request from '../request/index.js'; |
|
||||||
|
|
||||||
export function getStationList(data) { |
|
||||||
return request({ |
|
||||||
url: 'wrj-api/wrjSchool/pageList', |
|
||||||
method: 'POST', |
|
||||||
data, |
|
||||||
noToken: true |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
// 培训机构注册
|
|
||||||
export function registerStation(data) { |
|
||||||
return request({ |
|
||||||
url: 'wrj-api/wrjSchool/insert', |
|
||||||
method: 'POST', |
|
||||||
data, |
|
||||||
noToken: true |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
export function getStationDetail(schoolId) { |
|
||||||
return request({ |
|
||||||
url: 'wrj-api/wrjSchool/detail?schoolId=' + schoolId, |
|
||||||
method: 'GET', |
|
||||||
publicApi: true |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
// 收藏
|
|
||||||
export function collectStation(schoolId) { |
|
||||||
return request({ |
|
||||||
url: 'wrj-api/wrjUserCollectSchool/update?schoolId=' + schoolId, |
|
||||||
method: 'POST', |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
// 获取驾培机型
|
|
||||||
export function getCarTypeList() { |
|
||||||
return request({ |
|
||||||
url: 'wrj-api/wrjSchoolDriverType/list', |
|
||||||
method: 'GET', |
|
||||||
}); |
|
||||||
} |
|
||||||
// 查询收藏的机构
|
|
||||||
export function queryCollectList() { |
|
||||||
return request({ |
|
||||||
url: 'wrj-api/wrjUserCollectSchool/myList', |
|
||||||
method: 'POST', |
|
||||||
}); |
|
||||||
} |
|
@ -1,45 +1,33 @@ |
|||||||
import request from '../request/index.js'; |
import request from '../request/index.js'; |
||||||
|
|
||||||
export function chooseType(data) { |
export function userGood(data) { |
||||||
return request({ |
return request({ |
||||||
url: 'wrj-api/sysUser/driverTypeChoose', |
url: 'sinology-api/sinologyUserGood/click', |
||||||
method: 'POST', |
method: 'POST', |
||||||
data |
data |
||||||
}); |
}); |
||||||
} |
} |
||||||
|
|
||||||
// 修改用户资料
|
export function getUserGoodList(data) { |
||||||
export function updateUserInfo(data) { |
|
||||||
return request({ |
return request({ |
||||||
url: 'wrj-api/sysUser/update', |
url: 'sinology-api/sinologyUserGood/query', |
||||||
method: 'POST', |
method: 'POST', |
||||||
data |
data |
||||||
}); |
}); |
||||||
} |
} |
||||||
|
|
||||||
// 教员入驻
|
export function userLike(data) { |
||||||
export function teacherRegister(data) { |
|
||||||
return request({ |
return request({ |
||||||
url: 'wrj-api/wrjTeacher/apply', |
url: 'sinology-api/sinologyUserCollect/click', |
||||||
method: 'POST', |
method: 'POST', |
||||||
data |
data |
||||||
}); |
}); |
||||||
} |
} |
||||||
|
|
||||||
// 报名咨询
|
export function getUserLikeList(data) { |
||||||
export function applyConsult(data) { |
|
||||||
return request({ |
return request({ |
||||||
url: 'wrj-api/wrjClue/consult', |
url: 'sinology-api/sinologyUserCollect/query', |
||||||
method: 'POST', |
method: 'POST', |
||||||
data |
data |
||||||
}); |
}); |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
// 获取收藏的考点
|
|
||||||
export function getCollecRoomList() { |
|
||||||
return request({ |
|
||||||
url: 'wrj-api/wrjUserCollectPlace/myList', |
|
||||||
method: 'POST', |
|
||||||
}); |
|
||||||
} |
|
File diff suppressed because one or more lines are too long
@ -1,13 +1,82 @@ |
|||||||
<template> |
<template> |
||||||
<view>我的点赞</view> |
<view> |
||||||
|
<u-list v-if="pageList.length > 0" @scrolltolower="scrolltolower" class="course-list"> |
||||||
|
<u-list-item v-for="(item, index) in pageList" :key="index"> |
||||||
|
<view class="flex ai-c jc-sb p10lr p5tb bc-fff" @click="handleClick(item)"> |
||||||
|
<view class="flex ai-c"> |
||||||
|
<image :src="item.image" mode="aspectFill" style="width: 150px;height: 100px;border-radius: 6px;" /> |
||||||
|
</view> |
||||||
|
<view class="fl1 ml10"> |
||||||
|
<view class="fs14">{{ item.lessonName }}</view> |
||||||
|
<view class="fs13 mt8 cor-999"> |
||||||
|
<text class="j-tag" style="background: #DDEEFF;color: #1A8CFE">{{ item.chapterIndex }}</text> |
||||||
|
<text>{{ item.chapterName }}</text> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</u-list-item> |
||||||
|
</u-list> |
||||||
|
<u-empty v-else mode="list" text="暂无数据"></u-empty> |
||||||
|
</view> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script> |
<script> |
||||||
export default { |
import { getUserGoodList } from '@/jtools/api/user' |
||||||
|
import { mapState } from 'pinia'; //引入映射函数 |
||||||
|
import useUserStore from '@/jtools/store/user'; //引入store |
||||||
|
|
||||||
|
export default { |
||||||
|
computed: { |
||||||
|
...mapState(useUserStore, ['userInfo']) |
||||||
|
}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
pageList: [], |
||||||
|
total: 0, |
||||||
|
queryParams: { |
||||||
|
pageNo: 1, |
||||||
|
pageSize: 20 |
||||||
|
} |
||||||
|
} |
||||||
|
}, |
||||||
|
mounted() { |
||||||
|
this.handleSearch() |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
scrolltolower() { |
||||||
|
if (this.pageList.length < this.total) { |
||||||
|
this.queryParams.pageNo++ |
||||||
|
this.getPageList() |
||||||
|
} |
||||||
|
}, |
||||||
|
handleSearch() { |
||||||
|
this.pageList = [] |
||||||
|
this.queryParams.pageNo = 1 |
||||||
|
this.getPageList() |
||||||
|
}, |
||||||
|
getPageList() { |
||||||
|
const _this = this |
||||||
|
const params = { ...this.queryParams, userId: this.userInfo.userId } |
||||||
|
getUserGoodList(params).then(res => { |
||||||
|
_this.pageList = [..._this.pageList, ...res.data.records] |
||||||
|
_this.total = res.data.total |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleClick(item) { |
||||||
|
uni.navigateTo({ |
||||||
|
url: `/pages/course/detail?id=${chapter.chapterId}` |
||||||
|
}); |
||||||
|
} |
||||||
|
} |
||||||
} |
} |
||||||
</script> |
</script> |
||||||
|
|
||||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||||
|
.j-tag { |
||||||
|
padding: 1px 3px; |
||||||
|
border-radius: 3px; |
||||||
|
font-size: 12px; |
||||||
|
line-height: 14px; |
||||||
|
color: #fff; |
||||||
|
} |
||||||
</style> |
</style> |
@ -1,13 +1,86 @@ |
|||||||
<template> |
<template> |
||||||
<view>我的收藏</view> |
<view> |
||||||
|
<u-list v-if="pageList.length > 0" @scrolltolower="scrolltolower" class="course-list"> |
||||||
|
<u-list-item v-for="(item, index) in pageList" :key="index"> |
||||||
|
<view class="flex ai-c jc-sb p10lr p5tb bc-fff" @click="handleClick(item)"> |
||||||
|
<view class="flex ai-c"> |
||||||
|
<image :src="item.image" mode="aspectFill" style="width: 150px;height: 100px;border-radius: 6px;" /> |
||||||
|
</view> |
||||||
|
<view class="fl1 ml10"> |
||||||
|
<view class="fs14">{{ item.lessonName }}</view> |
||||||
|
<view class="fs13 mt8 cor-999"> |
||||||
|
<text class="j-tag" style="background: #DDEEFF;color: #1A8CFE">{{ item.chapterIndex }}</text> |
||||||
|
<text>{{ item.chapterName }}</text> |
||||||
|
</view> |
||||||
|
<view class="mt5 flex ai-c jc-sb fs13 cor-999"> |
||||||
|
<text>{{ item.author }}</text> |
||||||
|
<text>{{ item.publicTime }}</text> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</u-list-item> |
||||||
|
</u-list> |
||||||
|
<u-empty v-else mode="list" text="暂无数据"></u-empty> |
||||||
|
</view> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script> |
<script> |
||||||
export default { |
import { getUserLikeList } from '@/jtools/api/user' |
||||||
|
import { mapState } from 'pinia'; //引入映射函数 |
||||||
|
import useUserStore from '@/jtools/store/user'; //引入store |
||||||
|
|
||||||
|
export default { |
||||||
|
computed: { |
||||||
|
...mapState(useUserStore, ['userInfo']) |
||||||
|
}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
pageList: [], |
||||||
|
total: 0, |
||||||
|
queryParams: { |
||||||
|
pageNo: 1, |
||||||
|
pageSize: 20 |
||||||
|
} |
||||||
|
} |
||||||
|
}, |
||||||
|
mounted() { |
||||||
|
this.handleSearch() |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
scrolltolower() { |
||||||
|
if (this.pageList.length < this.total) { |
||||||
|
this.queryParams.pageNo++ |
||||||
|
this.getPageList() |
||||||
|
} |
||||||
|
}, |
||||||
|
handleSearch() { |
||||||
|
this.pageList = [] |
||||||
|
this.queryParams.pageNo = 1 |
||||||
|
this.getPageList() |
||||||
|
}, |
||||||
|
getPageList() { |
||||||
|
const _this = this |
||||||
|
const params = { ...this.queryParams, userId: this.userInfo.userId } |
||||||
|
getUserLikeList(params).then(res => { |
||||||
|
_this.pageList = [..._this.pageList, ...res.data.records] |
||||||
|
_this.total = res.data.total |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleClick(chapter) { |
||||||
|
uni.navigateTo({ |
||||||
|
url: `/pages/course/detail?id=${chapter.chapterId}` |
||||||
|
}); |
||||||
|
} |
||||||
|
} |
||||||
} |
} |
||||||
</script> |
</script> |
||||||
|
|
||||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||||
|
.j-tag { |
||||||
|
padding: 1px 3px; |
||||||
|
border-radius: 3px; |
||||||
|
font-size: 12px; |
||||||
|
line-height: 14px; |
||||||
|
color: #fff; |
||||||
|
} |
||||||
</style> |
</style> |
Loading…
Reference in new issue