提交 0be24b43 authored 作者: GOD_ZYX's avatar GOD_ZYX

update

上级 1b35140f
......@@ -114,16 +114,20 @@ Page({
this.cid = options.id
this.sid = options.sid
CourseApi.getCourseDetail(this.cid, this.sid, (json) => {
this.setData({ 'headerInfo': json.headerInfo })
this.setData({ 'tabs[0].content': json.tabs0Content })
this.setData({ 'tabs[1].chapterList': json.tabs1ChapterList })
json.tabs3richTest && this.setData({ 'tabs[3].richText': json.tabs3richTest.replace(/<img.*?(src=["|'].*?["|']).*?>/gi, '<img width="100%" $1>') })
CourseApi.getCourseAssess(this.cid, this.sid, (json1) => {
this.setData({ 'tabs[3].assess': json1 })
wx.hideLoading()
if (this.cid != '' && this.sid != '') {
CourseApi.getCourseDetail(this.cid, this.sid, (json) => {
this.setData({ 'headerInfo': json.headerInfo })
this.setData({ 'tabs[0].content': json.tabs0Content })
this.setData({ 'tabs[1].chapterList': json.tabs1ChapterList })
json.tabs3richTest && this.setData({ 'tabs[3].richText': json.tabs3richTest.replace(/<img.*?(src=["|'].*?["|']).*?>/gi, '<img width="100%" $1>') })
CourseApi.getCourseAssess(this.cid, this.sid, (json1) => {
this.setData({ 'tabs[3].assess': json1 })
wx.hideLoading()
})
})
})
} else {
wx.showLoading({ title: '页面数据异常,请联系管理员!', mask: true })
}
},
/**
* 生命周期函数--监听页面初次渲染完成
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论