修复:复读报错
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
<wd-tab :title="`${item.name}`" :name="item.id">
|
||||
<view v-if="item.id === 0">
|
||||
<wd-search v-model="title" placeholder-right placeholder="请输入课程名称" cancel-txt="搜索" @search="search"
|
||||
@cancel="search" @clear="search" light style="margin-top: 10rpx;"/>
|
||||
@cancel="search" @clear="search" light style="margin-top: 10rpx;" />
|
||||
<view class="courses-row">
|
||||
<view class="courses-category">{{ !tagData ? '已显示全部课程' : `已选择分类:${tagName}`}}
|
||||
<wd-button size="small" type="warning" style="margin-left: 20rpx;" v-if="tagData"
|
||||
@@ -89,13 +89,15 @@
|
||||
import { courseApi } from '@/api/modules/course'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import GoodsSelector from '@/components/order/GoodsSelector.vue'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import {
|
||||
getUserCourseBuyList,
|
||||
getUserCourseStudyingList,
|
||||
getCourseExpireList,
|
||||
addUserCourseStudyingList,
|
||||
delUserCourseStudyingList,
|
||||
getCourseMedicalTreeList
|
||||
getCourseMedicalTreeList,
|
||||
getRelearnShopProductList
|
||||
} from '@/api/modules/user'
|
||||
|
||||
const { t } = useI18n()
|
||||
@@ -195,7 +197,7 @@
|
||||
* 续费课程
|
||||
*/
|
||||
const renewal = async (id : any) => {
|
||||
const res = await courseApi.getProductListForCourse(id)
|
||||
const res = await getRelearnShopProductList(id)
|
||||
if (res.code === 0 && res.productList.length > 0) {
|
||||
goodsList.value = res.productList
|
||||
showGoodsSelector.value = true
|
||||
@@ -215,7 +217,12 @@
|
||||
const handleGoodsConfirm = () => {
|
||||
showGoodsSelector.value = false
|
||||
uni.navigateTo({
|
||||
url: `/pages/order/goodsConfirm?goods=${selectedGoods.value.productId}`
|
||||
url: `/pages/order/goodsConfirm?isRelearn=1`,
|
||||
success: () => {
|
||||
setTimeout(() => {
|
||||
uni.$emit('selectedGoods', selectedGoods.value)
|
||||
}, 100)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -239,7 +246,6 @@
|
||||
try {
|
||||
const data = await getCourseMedicalTreeList()
|
||||
labelTree.value = data.labels
|
||||
console.log(data, '分类标签数');
|
||||
} catch (error) {
|
||||
console.error('分类标签数', error)
|
||||
}
|
||||
@@ -284,7 +290,10 @@
|
||||
url: `${url}?id=${id}`
|
||||
})
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
bookList.value = []
|
||||
getDataList()
|
||||
})
|
||||
onMounted(() => {
|
||||
getTreeList()
|
||||
})
|
||||
@@ -305,6 +314,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
|
||||
text {
|
||||
color: #2979ff;
|
||||
margin-left: 4rpx;
|
||||
|
||||
Reference in New Issue
Block a user