修改
This commit is contained in:
parent
fe7b1cb158
commit
247c010c92
@ -1,8 +1,9 @@
|
||||
import request from "../request.js"
|
||||
|
||||
export function selectTrainingCategory(pageNum, pageSize) {
|
||||
|
||||
export function selectTrainingCategory(pageNum, pageSize, nurseStationPersonId) {
|
||||
return request({
|
||||
url: `/nurseApplet/personLearn/selectTrainingCategory?pageNum=${pageNum}&pageSize=${pageSize}`,
|
||||
url: `/nurseApplet/personLearn/personTrainingItem?pageNum=${pageNum}&pageSize=${pageSize}&trainingItemType=${'LEARNING_ITEM_GROUP'}&nurseStationPersonId=${nurseStationPersonId}`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
9
api/Orderlist/index.js
Normal file
9
api/Orderlist/index.js
Normal file
@ -0,0 +1,9 @@
|
||||
import request from "../request.js"
|
||||
|
||||
//订单列表
|
||||
export function selectTrainingOrderItemList(pageNum, pageSize, trainingItemType, nurseStationPersonId) {
|
||||
return request({
|
||||
url: `/nurseApplet/personLearn/selectTrainingOrderItemList?pageNum=${pageNum}&pageSize=${pageSize}&trainingItemType=${trainingItemType}&nurseStationPersonId=${nurseStationPersonId}`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
@ -1,8 +1,8 @@
|
||||
import request from "../request.js"
|
||||
|
||||
export function personTrainingItem(pageNum, pageSize, trainingCategoryId, nurseStationPersonId) {
|
||||
export function personTrainingItem(pageNum, pageSize, trainingItemId, nurseStationPersonId) {
|
||||
return request({
|
||||
url: `/nurseApplet/personLearn/personTrainingItem?pageNum=${pageNum}&pageSize=${pageSize}&trainingCategoryId=${trainingCategoryId}&nurseStationPersonId=${nurseStationPersonId}`,
|
||||
url: `/nurseApplet/personLearn/personTrainingItem?pageNum=${pageNum}&pageSize=${pageSize}&trainingItemId=${trainingItemId}&nurseStationPersonId=${nurseStationPersonId}`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
@ -5,9 +5,9 @@
|
||||
</view>
|
||||
<view class="items" v-for="(item,index) in list" :key="index" @tap='gographicvideo(item)'>
|
||||
<view class="item">
|
||||
<image :src="baseurl+item.trainingCategoryPictureUrl" mode=""></image>
|
||||
<image :src="baseurl+item.trainingItemCoverUrl" mode=""></image>
|
||||
<view class="title">
|
||||
{{item.trainingCategoryName}}
|
||||
{{item.trainingItemTitle}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -21,6 +21,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
nursePersonId: null, //护理员id
|
||||
baseurl: undefined,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@ -28,27 +29,34 @@
|
||||
total: 0,
|
||||
};
|
||||
},
|
||||
onShow() {},
|
||||
onLoad() {
|
||||
const that = this
|
||||
this.baseurl = baseurl
|
||||
this.pageNum = 1
|
||||
this.info();
|
||||
const nursePersonId = uni.getStorageSync('nursePersonId');
|
||||
if (nursePersonId) {
|
||||
// that.nursePersonId = nursePersonId
|
||||
that.nursePersonId = 61
|
||||
that.info();
|
||||
} else {}
|
||||
},
|
||||
methods: {
|
||||
info() {
|
||||
selectTrainingCategory(this.pageNum, this.pageSize).then(res => {
|
||||
selectTrainingCategory(this.pageNum, this.pageSize, this.nursePersonId).then(res => {
|
||||
this.list = res.rows
|
||||
this.total = res.total
|
||||
})
|
||||
},
|
||||
//跳转图文或者视频学习
|
||||
gographicvideo(item) {
|
||||
if (item.trainingCategoryName == '图文学习') {
|
||||
if (item.trainingItemTitle == '图文学习') {
|
||||
uni.navigateTo({
|
||||
url: `/pages/Graphiclearning/Graphiclearning?trainingCategoryId=${item.id}`
|
||||
url: `/pages/Graphiclearning/Graphiclearning?trainingItemId=${item.id}`
|
||||
})
|
||||
} else if (item.trainingCategoryName == '视频学习') {
|
||||
} else if (item.trainingItemTitle == '视频学习') {
|
||||
uni.navigateTo({
|
||||
url: `/pages/Videolearning/Videolearning?trainingCategoryId=${item.id}`
|
||||
url: `/pages/Videolearning/Videolearning?trainingItemId=${item.id}`
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -56,7 +64,7 @@
|
||||
onReachBottom() { //下滑加载
|
||||
if (this.list.length >= this.total) {} else {
|
||||
this.pageNum++
|
||||
selectTrainingCategory(this.pageNum, this.pageSize).then(res => {
|
||||
selectTrainingCategory(this.pageNum, this.pageSize, this.nursePersonId).then(res => {
|
||||
res.rows.forEach(e => {
|
||||
this.list.push(e)
|
||||
})
|
||||
|
||||
@ -5,11 +5,39 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
selectTrainingOrderItemList
|
||||
} from '@/api/Orderlist/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
trainingItemType: 'VIDEO_LEARNING',
|
||||
nurseStationPersonId: undefined,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
const that = this
|
||||
const value = uni.getStorageSync('nursePersonId');
|
||||
if (value) {
|
||||
// that.nurseStationPersonId = value
|
||||
that.nurseStationPersonId = 61
|
||||
that.info();
|
||||
} else {}
|
||||
},
|
||||
methods: {
|
||||
goMyLearning() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/MyLearning/MyLearning"
|
||||
})
|
||||
},
|
||||
info() {
|
||||
selectTrainingOrderItemList(this.pageNum, this.pageSize, this.trainingItemType, this.nurseStationPersonId)
|
||||
.then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
baseurl: undefined,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
trainingCategoryId: undefined,
|
||||
trainingItemId: undefined,
|
||||
nurseStationPersonId: undefined,
|
||||
list: [],
|
||||
total: 0,
|
||||
@ -58,8 +58,8 @@
|
||||
},
|
||||
onLoad(options) {
|
||||
const that = this
|
||||
// this.trainingCategoryId = options.trainingCategoryId
|
||||
this.trainingCategoryId = 2
|
||||
// this.trainingItemId = options.trainingItemId
|
||||
this.trainingItemId = 2
|
||||
this.baseurl = baseurl
|
||||
const value = uni.getStorageSync('nursePersonId');
|
||||
if (value) {
|
||||
@ -106,7 +106,7 @@
|
||||
})
|
||||
},
|
||||
info() {
|
||||
personTrainingItem(this.pageNum, this.pageSize, this.trainingCategoryId, this.nurseStationPersonId).then(
|
||||
personTrainingItem(this.pageNum, this.pageSize, this.trainingItemId, this.nurseStationPersonId).then(
|
||||
res => {
|
||||
this.list = res.rows
|
||||
this.total = res.total
|
||||
@ -116,7 +116,7 @@
|
||||
onReachBottom() { //下滑加载
|
||||
if (this.list.length >= this.total) {} else {
|
||||
this.pageNum++
|
||||
personTrainingItem(this.pageNum, this.pageSize, this.trainingCategoryId, this.nurseStationPersonId).then(
|
||||
personTrainingItem(this.pageNum, this.pageSize, this.trainingItemId, this.nurseStationPersonId).then(
|
||||
res => {
|
||||
res.rows.forEach(e => {
|
||||
this.list.push(e)
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
我的收益
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottomitem" @tap='goMyLearning'>
|
||||
<view class="bottomitem" @tap='goOrderlist'>
|
||||
<image src="../../static/xuexi.png" mode=""></image>
|
||||
<view class="">
|
||||
我的学习
|
||||
@ -159,9 +159,9 @@
|
||||
})
|
||||
},
|
||||
//我的学习
|
||||
goMyLearning() {
|
||||
goOrderlist() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/MyLearning/MyLearning"
|
||||
url: '/pages/Orderlist/Orderlist'
|
||||
})
|
||||
},
|
||||
//敬请期待
|
||||
|
||||
Loading…
Reference in New Issue
Block a user