diff --git a/api/Videolearning/index.js b/api/Videolearning/index.js index 8365ddb..58cdc38 100644 --- a/api/Videolearning/index.js +++ b/api/Videolearning/index.js @@ -1,8 +1,8 @@ import request from "../request.js" -export function personTrainingItem(pageNum, pageSize, trainingCategoryId) { +export function personTrainingItem(pageNum, pageSize, trainingCategoryId, nurseStationPersonId) { return request({ - url: `/nurseApplet/personLearn/personTrainingItem?pageNum=${pageNum}&pageSize=${pageSize}&trainingCategoryId=${trainingCategoryId}`, + url: `/nurseApplet/personLearn/personTrainingItem?pageNum=${pageNum}&pageSize=${pageSize}&trainingCategoryId=${trainingCategoryId}&nurseStationPersonId=${nurseStationPersonId}`, method: 'GET' }) } diff --git a/api/Videolearningdetails/index.js b/api/Videolearningdetails/index.js new file mode 100644 index 0000000..c416a7a --- /dev/null +++ b/api/Videolearningdetails/index.js @@ -0,0 +1,18 @@ +import request from "../request.js" + +//新增修改学习培训项目观看时间点记录信息(退出视频用) +export function insertTrainingItemWatchRecord(data) { + return request({ + url: `/nurseApplet/personLearn/insertTrainingItemWatchRecord`, + method: 'post', + data + }) +} + +// 查询学习培训项目观看时间点记录信息(观看视频用) +export function getTrainingItemWatchRecord(trainingOrderId, trainingItemId, trainingItemDirectoryId, nurseStationPersonId) { + return request({ + url: `/nurseApplet/personLearn/getTrainingItemWatchRecord?trainingOrderId=${trainingOrderId}&trainingItemId=${trainingItemId}&trainingItemDirectoryId=${trainingItemDirectoryId}&nurseStationPersonId=${nurseStationPersonId}`, + method: 'GET', + }) +} diff --git a/pages.json b/pages.json index 75e85f1..ae08ec0 100644 --- a/pages.json +++ b/pages.json @@ -10,19 +10,19 @@ "onReachBottomDistance": 50, //距离底部多远时触发 单位为px "enablePullDownRefresh": true //设置参数为true } - }, { - "path": "pages/MyLearning/MyLearning", - "style": { - "navigationBarTitleText": "我的学习", - "enablePullDownRefresh": false - } }, { "path": "pages/startup/startup", "style": { "navigationBarTitleText": "", "navigationStyle": "custom" } - }, { + },{ + "path": "pages/MyLearning/MyLearning", + "style": { + "navigationBarTitleText": "我的学习", + "enablePullDownRefresh": false + } + }, { "path": "pages/Graphiclearning/Graphiclearning", "style": { "navigationBarTitleText": "图文学习", diff --git a/pages/Mymission/Mymission.vue b/pages/Mymission/Mymission.vue index 7c7f22f..bd9e1e7 100644 --- a/pages/Mymission/Mymission.vue +++ b/pages/Mymission/Mymission.vue @@ -105,7 +105,7 @@ //点击toptabr tapmymission(item) { var that = this - const value = uni.getStorageSync('nursePersonId'); + const value = uni.getStorageSync('personRoleLoginFlag'); if (value) { that.orderStatus = item that.selectMissioninfo(); @@ -196,8 +196,9 @@ onShow() { //加载的时候执行(没有次数限制) this.baseurl = baseurl var that = this - const value = uni.getStorageSync('nursePersonId'); - if (value) { + const personRoleLoginFlag = uni.getStorageSync("personRoleLoginFlag") + if (personRoleLoginFlag) { + const value = uni.getStorageSync('nursePersonId'); that.nursePersonId = value that.selectMissioninfo(); } else { diff --git a/pages/Videolearning/Videolearning.vue b/pages/Videolearning/Videolearning.vue index 6c50539..4e40a96 100644 --- a/pages/Videolearning/Videolearning.vue +++ b/pages/Videolearning/Videolearning.vue @@ -6,12 +6,12 @@ {{item.trainingItemTitle}} - - + ¥{{item.trainingItemPrice}} + + ¥0 + 购买 @@ -48,15 +48,23 @@ pageNum: 1, pageSize: 10, trainingCategoryId: undefined, + nurseStationPersonId: undefined, list: [], total: 0, buylist: {}, }; }, onLoad(options) { + const that = this + // this.trainingCategoryId = options.trainingCategoryId + this.trainingCategoryId = 2 this.baseurl = baseurl - this.trainingCategoryId = options.trainingCategoryId - this.info(); + const value = uni.getStorageSync('nursePersonId'); + if (value) { + // that.nurseStationPersonId = value + that.nurseStationPersonId = 61 + that.info(); + } else {} }, methods: { //购买 @@ -71,20 +79,22 @@ }) }, info() { - personTrainingItem(this.pageNum, this.pageSize, 2).then(res => { - this.list = res.rows - this.total = res.total - }) + personTrainingItem(this.pageNum, this.pageSize, this.trainingCategoryId, this.nurseStationPersonId).then( + res => { + this.list = res.rows + this.total = res.total + }) }, }, onReachBottom() { //下滑加载 if (this.list.length >= this.total) {} else { this.pageNum++ - personTrainingItem(this.pageNum, this.pageSize, this.trainingCategoryId).then(res => { - res.rows.forEach(e => { - this.list.push(e) + personTrainingItem(this.pageNum, this.pageSize, this.trainingCategoryId, this.nurseStationPersonId).then( + res => { + res.rows.forEach(e => { + this.list.push(e) + }) }) - }) } }, onPullDownRefresh() { //下拉刷新 diff --git a/pages/Videolearningdetails/Videolearningdetails.vue b/pages/Videolearningdetails/Videolearningdetails.vue index 635bab6..fad8141 100644 --- a/pages/Videolearningdetails/Videolearningdetails.vue +++ b/pages/Videolearningdetails/Videolearningdetails.vue @@ -14,7 +14,7 @@ {{list.trainingItemDetails}} - + {{item.itemDirectoryName}} {{item.itemDirectoryTitle}} @@ -22,9 +22,27 @@ {{item.itemDirectoryIntroduce}} - + 开始播放 + + + 开始播放 + + + 继续播放 + + + 已看完 + + @@ -35,25 +53,71 @@ 购买 + + + + +