修改
10
api/Learningtraining/index.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import request from "../request.js"
|
||||||
|
|
||||||
|
|
||||||
|
export function selectNurseAppletPersonTrainingParent(pageNum, pageSize, nurseStationPersonId) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApplet/personLearn/getTrainingItemGroupInfo?pageNum=${pageNum}&pageSize=${pageSize}&nurseStationPersonId=${nurseStationPersonId}`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
@ -7,7 +7,6 @@ export function personRevenue(nurseStationPersonId, monthTime, monthStartTime, m
|
|||||||
method: 'GET'
|
method: 'GET'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 个人中心 我的收益 订单列表分页
|
// 个人中心 我的收益 订单列表分页
|
||||||
export function personRevenueDetails(pageNum, pageSize, nurseStationPersonId, monthTime, monthStartTime, monthEndTime) {
|
export function personRevenueDetails(pageNum, pageSize, nurseStationPersonId, monthTime, monthStartTime, monthEndTime) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
15
api/Orderdetails/index.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import request from "../request.js"
|
||||||
|
|
||||||
|
export function handCloseOrder() {
|
||||||
|
return request({
|
||||||
|
url: `/monitor/payTask/handCloseOrder`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getWaitPayTrainingOrderDetails(trainingOrderNo) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApplet/personLearn/getWaitPayTrainingOrderDetails?trainingOrderNo=${trainingOrderNo}`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
8
api/Orderlearning/index.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import request from "../request.js"
|
||||||
|
|
||||||
|
export function selectTrainingOrderItemList(trainingParentId, nurseStationPersonId, trainingOrderNo) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApplet/personLearn/selectTrainingOrderItemList?trainingParentId=${trainingParentId}&nurseStationPersonId=${nurseStationPersonId}&trainingOrderNo=${trainingOrderNo}`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
9
api/Orderlist/index.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import request from "../request.js"
|
||||||
|
|
||||||
|
//订单列表
|
||||||
|
export function selectTrainingOrderItemGroupList(pageNum, pageSize, nurseStationPersonId) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApplet/personLearn/selectTrainingOrderItemGroupList?pageNum=${pageNum}&pageSize=${pageSize}&nurseStationPersonId=${nurseStationPersonId}`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
26
api/Ordervideolearning/index.js
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import request from "../request.js"
|
||||||
|
|
||||||
|
|
||||||
|
export function selectTrainingOrderVideoDetails(trainingItemId, trainingOrderNo,trainingOrderDetailsId) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApplet/personLearn/selectTrainingOrderVideoDetails?trainingItemId=${trainingItemId}&trainingOrderNo=${trainingOrderNo}&trainingOrderDetailsId=${trainingOrderDetailsId}`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//推出视频
|
||||||
|
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',
|
||||||
|
})
|
||||||
|
}
|
||||||
27
api/Videolearning/index.js
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import request from "../request.js"
|
||||||
|
|
||||||
|
|
||||||
|
export function selectNurseAppletPersonTrainingItemDetailsList(trainingItemId, nurseStationPersonId) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApplet/personLearn/getTrainingItemDetailsInfo?trainingItemId=${trainingItemId}&nurseStationPersonId=${nurseStationPersonId}`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//推出视频
|
||||||
|
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',
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -7,3 +7,12 @@ export function selectOrderByNursePersonCount(nurseStationPersonId) {
|
|||||||
method: 'GET'
|
method: 'GET'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//护理新闻
|
||||||
|
export function selectNurseNews(pageNum, pageSize) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApplet/nearbyNursingStation/getHeathHousingList?pageNum=${pageNum}&pageSize=${pageSize}&informationCategoryType=${'NURSING_NEWS'}`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
31
api/learning/index.js
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import request from "../request.js"
|
||||||
|
|
||||||
|
export function selectNurseAppletPersonTrainingItemList(trainingParentId, nurseStationPersonId) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApplet/personLearn/getTrainingVideoAndContentList?trainingParentId=${trainingParentId}&nurseStationPersonId=${nurseStationPersonId}`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function selectNurseAppletPersonTrainingParent(id, nurseStationPersonId) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApplet/personLearn/getTrainingItemGroupInfo?pageNum=${1}&pageSize=${10}&id=${id}&nurseStationPersonId=${nurseStationPersonId}`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//生成订单
|
||||||
|
export function trainingItemOrder(data) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApplet/personLearn/buyTrainingItemOrder`,
|
||||||
|
method: 'POST',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function appletTrainingOrderPay(data) {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApp/weChatPayment/appletTrainingOrderPay`,
|
||||||
|
method: 'POST',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -18,7 +18,7 @@ var request = function(config) {
|
|||||||
uni.removeStorageSync('token');
|
uni.removeStorageSync('token');
|
||||||
uni.removeStorageSync('nursePersonId');
|
uni.removeStorageSync('nursePersonId');
|
||||||
uni.removeStorageSync('phone');
|
uni.removeStorageSync('phone');
|
||||||
uni.reLaunch({
|
uni.navigateTo({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
})
|
})
|
||||||
} else if (res.data.code == 500) {
|
} else if (res.data.code == 500) {
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
"name" : "泉医助手",
|
"name" : "泉医助手",
|
||||||
"appid" : "__UNI__EE607B0",
|
"appid" : "__UNI__EE607B0",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.6",
|
"versionName" : "1.0.7",
|
||||||
"versionCode" : 106,
|
"versionCode" : 107,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
@ -20,7 +20,8 @@
|
|||||||
"modules" : {
|
"modules" : {
|
||||||
"Geolocation" : {},
|
"Geolocation" : {},
|
||||||
"Maps" : {},
|
"Maps" : {},
|
||||||
"Camera" : {}
|
"Camera" : {},
|
||||||
|
"VideoPlayer" : {}
|
||||||
},
|
},
|
||||||
/* 应用发布信息 */
|
/* 应用发布信息 */
|
||||||
"distribute" : {
|
"distribute" : {
|
||||||
|
|||||||
43
package-lock.json
generated
@ -1,24 +1,27 @@
|
|||||||
{
|
{
|
||||||
"name": "NurseStationPersonApp",
|
"name": "签名组件-兼容H5、小程序、APP",
|
||||||
"lockfileVersion": 2,
|
"version": "1.0.0",
|
||||||
"requires": true,
|
"lockfileVersion": 2,
|
||||||
"packages": {
|
"requires": true,
|
||||||
"": {
|
"packages": {
|
||||||
"dependencies": {
|
"": {
|
||||||
"uview-ui": "^1.8.4"
|
"name": "签名组件-兼容H5、小程序、APP",
|
||||||
}
|
"version": "1.0.0",
|
||||||
|
"dependencies": {
|
||||||
|
"uview-ui": "^1.8.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/uview-ui": {
|
||||||
|
"version": "1.8.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.4.tgz",
|
||||||
|
"integrity": "sha512-Zr+D5dFdNy6CdHQLBEXeGq/w0LkjxzBtsgaaDwLl0P58g67H7fBBDvy6AzWK/k0c7dwPYMBiK7I4Tr9p92+0DA=="
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"node_modules/uview-ui": {
|
"dependencies": {
|
||||||
"version": "1.8.4",
|
"uview-ui": {
|
||||||
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.4.tgz",
|
"version": "1.8.4",
|
||||||
"integrity": "sha512-Zr+D5dFdNy6CdHQLBEXeGq/w0LkjxzBtsgaaDwLl0P58g67H7fBBDvy6AzWK/k0c7dwPYMBiK7I4Tr9p92+0DA=="
|
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.4.tgz",
|
||||||
|
"integrity": "sha512-Zr+D5dFdNy6CdHQLBEXeGq/w0LkjxzBtsgaaDwLl0P58g67H7fBBDvy6AzWK/k0c7dwPYMBiK7I4Tr9p92+0DA=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"uview-ui": {
|
|
||||||
"version": "1.8.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.4.tgz",
|
|
||||||
"integrity": "sha512-Zr+D5dFdNy6CdHQLBEXeGq/w0LkjxzBtsgaaDwLl0P58g67H7fBBDvy6AzWK/k0c7dwPYMBiK7I4Tr9p92+0DA=="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,5 +5,8 @@
|
|||||||
"description": "用于uni-app的签名组件,支持H5、小程序、APP,可导出svg矢量图片。",
|
"description": "用于uni-app的签名组件,支持H5、小程序、APP,可导出svg矢量图片。",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"签名,签字,svg,canvas"
|
"签名,签字,svg,canvas"
|
||||||
]
|
],
|
||||||
}
|
"dependencies": {
|
||||||
|
"uview-ui": "^1.8.4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
122
pages.json
@ -4,28 +4,79 @@
|
|||||||
},
|
},
|
||||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||||
{
|
{
|
||||||
"path": "pages/startup/startup",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
"path": "pages/login/login",
|
"path": "pages/login/login",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "登录",
|
"navigationBarTitleText": "登录",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
"path": "pages/forgotPassword/forgotPassword",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "忘记密码"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/register/register",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "注册"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/startup/startup",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/personal/personal",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "个人信息",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/Learningtraining/Learningtraining",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "学习培训",
|
||||||
|
"onReachBottomDistance": 50, //距离底部多远时触发 单位为px
|
||||||
|
"enablePullDownRefresh": true //设置参数为true
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/learning/learning",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "课程详情",
|
||||||
|
"enablePullDownRefresh": false //设置参数为true
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/Orderlearning/Orderlearning",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "我的学习",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/Healthitem/Healthitem",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "护理新闻",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"path": "pages/Healthknowledge/Healthknowledge",
|
"path": "pages/Healthknowledge/Healthknowledge",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "护理新闻",
|
"navigationBarTitleText": "护理新闻",
|
||||||
|
"onReachBottomDistance": 50, //距离底部多远时触发 单位为px
|
||||||
|
"enablePullDownRefresh": true //设置参数为true
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/confirmCompletion/confirmCompletion",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "当前工单",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/MyBenefits/MyBenefits",
|
"path": "pages/MyBenefits/MyBenefits",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的收益",
|
"navigationBarTitleText": "我的收益",
|
||||||
"enablePullDownRefresh": false
|
"onReachBottomDistance": 50, //距离底部多远时触发 单位为px
|
||||||
|
"enablePullDownRefresh": true //设置参数为true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/Modifyinformation/Modifyinformation",
|
"path": "pages/Modifyinformation/Modifyinformation",
|
||||||
@ -34,12 +85,6 @@
|
|||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
// "navigationBarTextStyle": "white"
|
// "navigationBarTextStyle": "white"
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
"path": "pages/personal/personal",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "个人信息",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/Mymission/Mymission",
|
"path": "pages/Mymission/Mymission",
|
||||||
"style": {
|
"style": {
|
||||||
@ -59,28 +104,12 @@
|
|||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
"path": "pages/confirmCompletion/confirmCompletion",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "当前工单",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
}
|
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/taskReturn/taskReturn",
|
"path": "pages/taskReturn/taskReturn",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "退回原因",
|
"navigationBarTitleText": "退回原因",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
"path": "pages/forgotPassword/forgotPassword",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "忘记密码"
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
"path": "pages/register/register",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "注册"
|
|
||||||
}
|
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/signature/signature",
|
"path": "pages/signature/signature",
|
||||||
"style": {
|
"style": {
|
||||||
@ -96,9 +125,42 @@
|
|||||||
}, {
|
}, {
|
||||||
"path": "pages/study/study",
|
"path": "pages/study/study",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "泉医助手",
|
"navigationBarTitleText": "",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/Orderlist/Orderlist",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "我的学习",
|
||||||
|
"onReachBottomDistance": 20, //距离底部多远时触发 单位为px
|
||||||
|
"enablePullDownRefresh": true //设置参数为true
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/Orderdetails/Orderdetails",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "我的学习",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/Videolearning/Videolearning",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "视频学习",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
|
||||||
|
}, {
|
||||||
|
"path": "pages/Ordervideolearning/Ordervideolearning",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "视频学习",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/Imglearning/Imglearning",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "图文学习",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|||||||
101
pages/Healthitem/Healthitem.vue
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app">
|
||||||
|
<view class="title">
|
||||||
|
{{item.informationTitle}}
|
||||||
|
</view>
|
||||||
|
<view class="u-content">
|
||||||
|
<u-parse :html="item.informationContent"></u-parse>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="text" v-html="item.informationContent">
|
||||||
|
</view>-->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
item: '',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(options) { //获取传值
|
||||||
|
this.item = JSON.parse(decodeURIComponent(options.item))
|
||||||
|
this.item.informationContent = this.item.informationContent.replace(/\<img/gi,
|
||||||
|
"<br/> <img class='richPic'")
|
||||||
|
this.item.informationContent = this.item.informationContent.replace(/\<p/gi,
|
||||||
|
"<p class='ptext'")
|
||||||
|
// this.item.informationContent = this.item.informationContent.replace(/\<span/,
|
||||||
|
// "<span class='ql-size-small'")
|
||||||
|
// atch = match.replace(/class="ql-size-large"/gi, 'max-width:100%;')
|
||||||
|
},
|
||||||
|
onReady() {}, //更改导航栏文字
|
||||||
|
//1.分享给朋友
|
||||||
|
onShareAppMessage(res) {
|
||||||
|
let pages = getCurrentPages();
|
||||||
|
let url = pages[pages.length - 1].$page.fullPath
|
||||||
|
return {
|
||||||
|
title: '泉医到家',
|
||||||
|
path: url,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//2.分享到朋友圈
|
||||||
|
onShareTimeline(res) {
|
||||||
|
let pages = getCurrentPages();
|
||||||
|
let url = pages[pages.length - 1].$page.fullPath
|
||||||
|
return {
|
||||||
|
title: '泉医到家',
|
||||||
|
path: url,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
/deep/ .ptext {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .ptext:nth-child(1) {
|
||||||
|
text-indent: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .ql-size-small {
|
||||||
|
font-size: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .ql-size-large {
|
||||||
|
font-size: 36rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .ql-size-huge {
|
||||||
|
font-size: 46rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
padding: 0 3%;
|
||||||
|
font-size: 38rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: normal;
|
||||||
|
word-break: break-all;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
text-align: justify;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
width: 96%;
|
||||||
|
margin: 0 auto;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .richPic {
|
||||||
|
width: 100% !important;
|
||||||
|
height: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.u-content {
|
||||||
|
margin: 15rpx auto;
|
||||||
|
width: 96%;
|
||||||
|
text-indent: 2em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -1,10 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="app">
|
<view class="app">
|
||||||
<!-- <u-tabs :list="tabList" :current="tabcurrent" @change="change"></u-tabs>
|
<u-tabs :list="tabList" :current="tabcurrent" @change="change"></u-tabs>
|
||||||
<view class="Healthknowledge" v-if="informationCategoryVOList">
|
<view class="Healthknowledge" v-if="NurseNewslist">
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="item" v-for="(item,index) in informationCategoryVOList" :key="index"
|
<view class="item" v-for="(item,index) in NurseNewslist" :key="index" @tap='gohealthitem(item)'>
|
||||||
@tap='gohealthitem(item)'>
|
|
||||||
<view class="text">
|
<view class="text">
|
||||||
{{item.informationTitle}}
|
{{item.informationTitle}}
|
||||||
</view>
|
</view>
|
||||||
@ -12,26 +11,18 @@
|
|||||||
<image :src="item.leadThumbnailUrl" mode=""></image>
|
<image :src="item.leadThumbnailUrl" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
|
||||||
<view class="Healthknowledge">
|
|
||||||
<view class="list">
|
|
||||||
<view class="item">
|
|
||||||
<view class="text">
|
|
||||||
护理 I 致力于打造专业护理人才
|
|
||||||
</view>
|
|
||||||
<view class="author"> 生活小窍门,是指人们在日常生活中总结出来的知识和经验,和生活小常识非常相似</view>
|
|
||||||
<image src="../../static/hlxw.png" mode=""></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="noorder" v-else>
|
<view class="noorder" v-else>
|
||||||
<u-empty mode="data" icon-size='220' text='暂无内容'></u-empty>
|
<u-empty mode="data" icon-size='220' text='暂无内容'></u-empty>
|
||||||
</view> -->
|
</view>
|
||||||
<u-back-top :scroll-top="scrollTop"></u-back-top>
|
<u-back-top :scroll-top="scrollTop"></u-back-top>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
selectNurseNews
|
||||||
|
} from '@/api/homepage/index.js'
|
||||||
import baseurl from '@/api/baseurl.js'
|
import baseurl from '@/api/baseurl.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -42,15 +33,13 @@
|
|||||||
}],
|
}],
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
informationCategoryVOList: null,
|
|
||||||
total: 0,
|
total: 0,
|
||||||
scrollTop: 0,
|
scrollTop: 0,
|
||||||
|
NurseNewslist: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {},
|
|
||||||
onLoad() {
|
onLoad() {
|
||||||
// this.pageNum = 1
|
this.selectNurseNewsinfo();
|
||||||
// this.getHeathHousing();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//跳转item
|
//跳转item
|
||||||
@ -59,13 +48,13 @@
|
|||||||
url: `/pages/Healthitem/Healthitem?item=${encodeURIComponent(JSON.stringify(item))}`
|
url: `/pages/Healthitem/Healthitem?item=${encodeURIComponent(JSON.stringify(item))}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getHeathHousing() {
|
selectNurseNewsinfo() {
|
||||||
getHeathHousingList(this.pageNum, this.pageSize).then(res => {
|
selectNurseNews(this.pageNum, this.pageSize).then(res => {
|
||||||
if (res.rows.length > 0) {
|
if (res.rows.length > 0) {
|
||||||
res.rows.forEach(e => {
|
res.rows.forEach(e => {
|
||||||
e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
|
e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
|
||||||
})
|
})
|
||||||
this.informationCategoryVOList = res.rows
|
this.NurseNewslist = res.rows
|
||||||
}
|
}
|
||||||
this.total = res.total
|
this.total = res.total
|
||||||
})
|
})
|
||||||
@ -76,13 +65,13 @@
|
|||||||
this.scrollTop = e.scrollTop;
|
this.scrollTop = e.scrollTop;
|
||||||
},
|
},
|
||||||
onReachBottom() { //下滑加载
|
onReachBottom() { //下滑加载
|
||||||
if (this.informationCategoryVOList.length >= this.total) {} else {
|
if (this.NurseNewslist.length >= this.total) {} else {
|
||||||
this.pageNum++
|
this.pageNum++
|
||||||
getHeathHousingList(this.pageNum, this.pageSize).then(res => {
|
selectNurseNews(this.pageNum, this.pageSize).then(res => {
|
||||||
if (res.rows) {
|
if (res.rows) {
|
||||||
res.rows.forEach(e => {
|
res.rows.forEach(e => {
|
||||||
e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
|
e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
|
||||||
this.informationCategoryVOList.push(e)
|
this.NurseNewslist.push(e)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -90,7 +79,7 @@
|
|||||||
},
|
},
|
||||||
onPullDownRefresh() { //下拉刷新
|
onPullDownRefresh() { //下拉刷新
|
||||||
this.pageNum = 1;
|
this.pageNum = 1;
|
||||||
this.getHeathHousing();
|
this.selectNurseNewsinfo();
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
84
pages/Imglearning/Imglearning.vue
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<view v-if="list">
|
||||||
|
<view class="u-content">
|
||||||
|
<u-parse :html="list.trainingItemContent"></u-parse>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
selectNurseAppletPersonTrainingItemDetailsList,
|
||||||
|
} from '@/api/Videolearning/index.js'
|
||||||
|
import baseurl from '@/api/baseurl.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
baseurl: undefined,
|
||||||
|
nurseStationPersonId: undefined,
|
||||||
|
list: undefined
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
info() {
|
||||||
|
selectNurseAppletPersonTrainingItemDetailsList(this.trainingItemId, this.nurseStationPersonId).then(
|
||||||
|
res => {
|
||||||
|
if (res.data.trainingItemContent) {
|
||||||
|
res.data.trainingItemContent = res.data.trainingItemContent.replace(/\<img/gi,
|
||||||
|
"<br/> <img class='richPic'")
|
||||||
|
res.data.trainingItemContent = res.data.trainingItemContent.replace(/\<p/gi,
|
||||||
|
"<p class='ptext'")
|
||||||
|
}
|
||||||
|
this.list = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
const that = this
|
||||||
|
this.baseurl = baseurl
|
||||||
|
this.trainingItemId = options.trainingItemId
|
||||||
|
const value = uni.getStorageSync('nursePersonId');
|
||||||
|
if (value) {
|
||||||
|
that.nurseStationPersonId = value
|
||||||
|
that.info();
|
||||||
|
} else {}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
page {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .ptext {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .ptext:nth-child(1) {
|
||||||
|
text-indent: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .ql-size-small {
|
||||||
|
font-size: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .ql-size-large {
|
||||||
|
font-size: 36rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .ql-size-huge {
|
||||||
|
font-size: 46rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .richPic {
|
||||||
|
width: 100% !important;
|
||||||
|
height: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.u-content {
|
||||||
|
margin: 15rpx auto;
|
||||||
|
width: 96%;
|
||||||
|
text-indent: 2em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
71
pages/Learningtraining/Learningtraining.scss
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
.app {
|
||||||
|
color: #333333;
|
||||||
|
padding: 0 0 100rpx;
|
||||||
|
|
||||||
|
.card {
|
||||||
|
width: 96%;
|
||||||
|
margin: 25rpx auto;
|
||||||
|
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||||
|
|
||||||
|
.item {
|
||||||
|
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||||
|
border-radius: 5rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 600rpx;
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 15rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
|
||||||
|
image {
|
||||||
|
position: absolute;
|
||||||
|
top: 20rpx;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
left: 50%;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
width: 94%;
|
||||||
|
height: 400rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
width: 70%;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #666666;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 30rpx;
|
||||||
|
left: 30rpx;
|
||||||
|
text-overflow: -o-ellipsis-lastline;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2; //行数需设置
|
||||||
|
line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 30rpx;
|
||||||
|
right: 40rpx;
|
||||||
|
color: #EA706A;
|
||||||
|
font-size: 31rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 38rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
position: absolute;
|
||||||
|
top: 440rpx;
|
||||||
|
left: 30rpx;
|
||||||
|
text-overflow: -o-ellipsis-lastline;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 1; //行数需设置
|
||||||
|
line-clamp: 1;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
100
pages/Learningtraining/Learningtraining.vue
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app">
|
||||||
|
<view class="card">
|
||||||
|
<view class="item" v-for='(item,index) in list' :key="index" @click.stop='gographicvideo(item)'>
|
||||||
|
<image :src="baseurl + item.trainingItemCoverUrl" mode=""></image>
|
||||||
|
<view class="title">
|
||||||
|
{{item.trainingItemTitle?item.trainingItemTitle:''}}
|
||||||
|
</view>
|
||||||
|
<view class="text">
|
||||||
|
{{item.trainingItemDetails?item.trainingItemDetails:''}}
|
||||||
|
</view>
|
||||||
|
<view class="price">
|
||||||
|
¥{{item.trainingItemPrice?item.trainingItemPrice:0}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if='list.length == 0' class="" style="padding-top: 100rpx;">
|
||||||
|
<u-empty text="暂无" mode="list" icon-size='240' font-size='32'></u-empty>
|
||||||
|
</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
selectNurseAppletPersonTrainingParent,
|
||||||
|
} from '@/api/Learningtraining/index.js'
|
||||||
|
import baseurl from '@/api/baseurl.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
nursePersonId: null, //护理员id
|
||||||
|
baseurl: undefined,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
list: [],
|
||||||
|
total: 0,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onShow() {},
|
||||||
|
onLoad() {
|
||||||
|
const that = this
|
||||||
|
this.baseurl = baseurl
|
||||||
|
this.pageNum = 1
|
||||||
|
const nursePersonId = uni.getStorageSync('nursePersonId');
|
||||||
|
if (nursePersonId) {
|
||||||
|
that.nursePersonId = nursePersonId
|
||||||
|
that.info();
|
||||||
|
} else {
|
||||||
|
that.$nextTick(e => {
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '您未登录',
|
||||||
|
type: 'error',
|
||||||
|
duration: '1000'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
info() {
|
||||||
|
selectNurseAppletPersonTrainingParent(this.pageNum, this.pageSize, this.nursePersonId).then(res => {
|
||||||
|
this.list = res.rows
|
||||||
|
this.total = res.total
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//跳转图文或者视频学习
|
||||||
|
gographicvideo(item) {
|
||||||
|
if (item.trainingItemType == 'VIDEO_LEARNING') {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/Videolearning/Videolearning?trainingItemId=${item.id}&&trainingItemType=${item.trainingItemType}`
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/learning/learning?trainingParentId=${item.id}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onReachBottom() { //下滑加载
|
||||||
|
if (this.list.length >= this.total) {} else {
|
||||||
|
this.pageNum++
|
||||||
|
selectNurseAppletPersonTrainingParent(this.pageNum, this.pageSize, this.nursePersonId).then(res => {
|
||||||
|
res.rows.forEach(e => {
|
||||||
|
this.list.push(e)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onPullDownRefresh() { //下拉刷新
|
||||||
|
this.pageNum = 1
|
||||||
|
this.info();
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
@import "./Learningtraining.scss";
|
||||||
|
</style>
|
||||||
148
pages/Orderdetails/Orderdetails.scss
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
.app {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.buy {
|
||||||
|
background: #FFFFFF;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
height: 100rpx;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.logistics {
|
||||||
|
width: 216rpx;
|
||||||
|
height: 68rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #ffffff;
|
||||||
|
border-radius: 26rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
line-height: 68rpx;
|
||||||
|
position: absolute;
|
||||||
|
right: 260rpx;
|
||||||
|
top: 50%;
|
||||||
|
background: #E1AE3C;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pay {
|
||||||
|
width: 216rpx;
|
||||||
|
height: 68rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #ffffff;
|
||||||
|
background: #4C7BC9;
|
||||||
|
border-radius: 26rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
line-height: 68rpx;
|
||||||
|
position: absolute;
|
||||||
|
right: 20rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
padding: 30rpx 0;
|
||||||
|
height: 40%;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
|
||||||
|
border-radius: 20rpx;
|
||||||
|
width: 95%;
|
||||||
|
margin: 0 auto;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #020000;
|
||||||
|
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
line-height: 65rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
|
||||||
|
text {
|
||||||
|
color: #BFBDBE;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width: 95%;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||||
|
border-radius: 20rpx;
|
||||||
|
margin: 30rpx auto;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.details {
|
||||||
|
height: 380rpx;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.detailslist {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 182rpx;
|
||||||
|
height: 182rpx;
|
||||||
|
margin: 20rpx 0 0 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.model {
|
||||||
|
width: 70%;
|
||||||
|
margin: 30rpx 0 0 20rpx;
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
span:nth-child(1) {
|
||||||
|
display: inline-block;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
width: 95%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.payinfo {
|
||||||
|
width: 95%;
|
||||||
|
position: absolute;
|
||||||
|
left: 2.5%;
|
||||||
|
bottom: 20rpx;
|
||||||
|
|
||||||
|
.pay {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #020000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
float: right;
|
||||||
|
font-size: 41rpx;
|
||||||
|
color: #D43953;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.trainingOrderStatus{
|
||||||
|
text-align: center;
|
||||||
|
width: 300rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
margin: 10rpx auto 0;
|
||||||
|
line-height: 70rpx;
|
||||||
|
background-color:#4C7BC9 ;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
// color: #4C7BC9;
|
||||||
|
color: #FFFFFF;
|
||||||
|
border: 1rpx solid #4C7BC9;
|
||||||
|
}
|
||||||
|
.time {
|
||||||
|
height: 80rpx;
|
||||||
|
width: 95%;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
margin: 30rpx auto 0;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
135
pages/Orderdetails/Orderdetails.vue
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app">
|
||||||
|
<view class="time" style="" v-if="list.trainingOrderStatus=='WAIT_PAY'">
|
||||||
|
剩余付款时间:
|
||||||
|
<u-count-down :timestamp="timestamp"></u-count-down>
|
||||||
|
</view>
|
||||||
|
<view class="trainingOrderStatus"
|
||||||
|
v-if="list.trainingOrderStatus=='REFUNDED'||list.trainingOrderStatus=='CANCEL'">
|
||||||
|
订单已关闭
|
||||||
|
</view>
|
||||||
|
<view class="content">
|
||||||
|
<view class="details">
|
||||||
|
<view class="detailslist">
|
||||||
|
<image :src="baseurl+list.trainingItemCoverUrl" mode=""></image>
|
||||||
|
<view class="model">
|
||||||
|
<span>{{list.trainingItemTitle}}</span>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="payinfo">
|
||||||
|
<text class="pay">实付款</text>
|
||||||
|
<text class="price">¥{{list.trainingOrderAmount?list.trainingOrderAmount:0}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="info">
|
||||||
|
<span>护理人员:<text>{{list.nursePersonName}}</text></span>
|
||||||
|
<!-- <span>联系电话:<text>{{list.phone}}</text></span> -->
|
||||||
|
<span>订单编号:<text>{{list.trainingOrderNo}}</text></span>
|
||||||
|
<!-- <span>下单时间:<text>{{list.orderTime}}</text></span> -->
|
||||||
|
</view>
|
||||||
|
<view class="buy" @tap='tobuy' v-if="list.trainingOrderStatus == 'WAIT_PAY'">
|
||||||
|
<view class="pay">
|
||||||
|
确认支付
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
trainingItemOrder,
|
||||||
|
appletTrainingOrderPay
|
||||||
|
} from '@/api/learning/index.js'
|
||||||
|
import {
|
||||||
|
handCloseOrder,
|
||||||
|
getWaitPayTrainingOrderDetails
|
||||||
|
} from '@/api/Orderdetails/index.js'
|
||||||
|
import baseurl from '@/api/baseurl.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
baseurl: undefined,
|
||||||
|
trainingOrderNo: undefined,
|
||||||
|
list: undefined,
|
||||||
|
timestamp: 0,
|
||||||
|
timecount: 0,
|
||||||
|
Timer: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onUnload() {
|
||||||
|
clearInterval(this.Timer); //清除该函数
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
timecount() {
|
||||||
|
if (this.timecount <= 0) {
|
||||||
|
handCloseOrder().then(res => {
|
||||||
|
clearInterval(this.Timer); //清除该函数
|
||||||
|
this.list.trainingOrderStatus = 'CANCEL'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
this.baseurl = baseurl
|
||||||
|
this.trainingOrderNo = options.trainingOrderNo
|
||||||
|
this.info();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
info() {
|
||||||
|
getWaitPayTrainingOrderDetails(this.trainingOrderNo).then(res => {
|
||||||
|
this.list = res.data
|
||||||
|
var ordertimes = this.list.trainingOrderTime.replaceAll(/\-/gi, "/")
|
||||||
|
var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 2)
|
||||||
|
var times = new Date().getTime() / 1000
|
||||||
|
this.timestamp = time - times
|
||||||
|
if (this.timestamp >= 0) {
|
||||||
|
this.timecount = this.timestamp
|
||||||
|
this.Timer = setInterval(() => {
|
||||||
|
this.timecount--;
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//购买
|
||||||
|
tobuy() {
|
||||||
|
var that = this
|
||||||
|
const nurseStationId = uni.getStorageSync('nurseStationId');
|
||||||
|
if (nurseStationId) {
|
||||||
|
if (this.list.trainingOrderAmount > 0) {
|
||||||
|
let objs = {
|
||||||
|
"openid": uni.getStorageSync('openid'),
|
||||||
|
"nurseStationPersonId": this.list.nurseStationPersonId,
|
||||||
|
"orderNo": this.list.trainingOrderNo,
|
||||||
|
"payType": "WECHAT_PAY",
|
||||||
|
"orderChannel": "WECHAT_APPLET",
|
||||||
|
"buySource": "TRAINING",
|
||||||
|
"paymentPrice": this.list.trainingOrderAmount,
|
||||||
|
}
|
||||||
|
appletTrainingOrderPay(objs).then(response => {
|
||||||
|
if (response.code == 200) {} else {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: response.msg,
|
||||||
|
type: 'error',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '请您重新登录',
|
||||||
|
type: 'error',
|
||||||
|
duration: 1500,
|
||||||
|
url: "/pages/login/login"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
@import "./Orderdetails.scss";
|
||||||
|
</style>
|
||||||
81
pages/Orderlearning/Orderlearning.scss
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
page {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app {
|
||||||
|
padding: 0;
|
||||||
|
color: #000000;
|
||||||
|
|
||||||
|
::v-deep .u-tabs {
|
||||||
|
width: 70% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.directory {
|
||||||
|
padding-bottom: 200rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
.video {}
|
||||||
|
|
||||||
|
.imagetext {}
|
||||||
|
|
||||||
|
.items {
|
||||||
|
width: 87%;
|
||||||
|
margin: 30rpx auto;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
height: 130rpx;
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 37rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 220rpx;
|
||||||
|
height: 130rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
position: absolute;
|
||||||
|
top: 10rpx;
|
||||||
|
left: 240rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #000000;
|
||||||
|
text-overflow: -o-ellipsis-lastline;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 1; //行数需设置
|
||||||
|
line-clamp: 1;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 10rpx;
|
||||||
|
left: 240rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #666666;
|
||||||
|
text-overflow: -o-ellipsis-lastline;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2; //行数需设置
|
||||||
|
line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.topheader {
|
||||||
|
height: 80rpx;
|
||||||
|
width: 92%;
|
||||||
|
margin: 0 auto;
|
||||||
|
border-bottom: 1rpx solid #e6e6e6;
|
||||||
|
padding-left: 10rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
130
pages/Orderlearning/Orderlearning.vue
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app">
|
||||||
|
<view class="" style="background-color: #F4F5F7;height: 17rpx;width:100%"></view>
|
||||||
|
<!-- <u-tabs :list="tablist" :is-scroll="false" :current="tabcurrent" @change="tabchange" font-size='34'
|
||||||
|
bar-height='7' bar-width='43' inactive-color='#A09F9F' active-color='#4271B9'>
|
||||||
|
</u-tabs> -->
|
||||||
|
<view class="content" v-if="tabcurrent==0">
|
||||||
|
</view>
|
||||||
|
<view class="directory" v-if="tabcurrent==1">
|
||||||
|
<view class="imagetext" v-if="imgtextlist.length>0">
|
||||||
|
<view class="topheader">
|
||||||
|
图文学习
|
||||||
|
</view>
|
||||||
|
<view class="items">
|
||||||
|
<view class="item" v-for="(item,index) in imgtextlist" :key='item.trainingItemId'
|
||||||
|
@tap='goImglearning(item)'>
|
||||||
|
<image :src="baseurl+item.trainingItemCoverUrl" mode=""></image>
|
||||||
|
<view class="title">
|
||||||
|
{{item.trainingItemTitle}}
|
||||||
|
</view>
|
||||||
|
<view class="text">
|
||||||
|
{{item.trainingItemDetails?item.trainingItemDetails:''}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="video" v-if="videolist.length>0">
|
||||||
|
<view class="topheader">
|
||||||
|
视频学习
|
||||||
|
</view>
|
||||||
|
<view class="items">
|
||||||
|
<view class="item" v-for="(item,index) in videolist" :key='item.trainingItemId'
|
||||||
|
@tap='goVideolearningdetails(item)'>
|
||||||
|
<image :src="baseurl+item.trainingItemCoverUrl" mode=""></image>
|
||||||
|
<view class="title">
|
||||||
|
{{item.trainingItemTitle}}
|
||||||
|
</view>
|
||||||
|
<view class="text">
|
||||||
|
{{item.trainingItemDetails?item.trainingItemDetails:''}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if='videolist.length==0&&imgtextlist.length==0' class="" style="padding-top: 100rpx;">
|
||||||
|
<u-empty text="暂无目录" mode="list" icon-size='240' font-size='32'></u-empty>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
selectTrainingOrderItemList,
|
||||||
|
} from '@/api/Orderlearning/index.js'
|
||||||
|
import baseurl from '@/api/baseurl.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
baseurl: undefined,
|
||||||
|
videolist: [], //视频信息
|
||||||
|
imgtextlist: [], //图文信息
|
||||||
|
tabcurrent: 1, //tabsindex
|
||||||
|
tablist: [{ //tabs的list
|
||||||
|
name: '基础课程'
|
||||||
|
}, {
|
||||||
|
name: '进阶课程'
|
||||||
|
}],
|
||||||
|
trainingParentId: undefined,
|
||||||
|
nurseStationPersonId: undefined,
|
||||||
|
trainingOrderStatus: undefined,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
const that = this
|
||||||
|
this.baseurl = baseurl
|
||||||
|
this.trainingOrderStatus = options.trainingOrderStatus
|
||||||
|
this.trainingParentId = options.trainingParentId
|
||||||
|
this.trainingOrderNo = options.trainingOrderNo
|
||||||
|
const value = uni.getStorageSync('nursePersonId');
|
||||||
|
if (value) {
|
||||||
|
that.nurseStationPersonId = value
|
||||||
|
that.info();
|
||||||
|
} else {}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//跳转图文学习
|
||||||
|
goImglearning(item) {
|
||||||
|
if (this.trainingOrderStatus == 'PAY') {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/Imglearning/Imglearning?trainingItemId=${item.trainingItemId}`
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '您未购买',
|
||||||
|
type: 'error',
|
||||||
|
duration: '2000'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//跳转视频学习详情
|
||||||
|
goVideolearningdetails(item) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/Ordervideolearning/Ordervideolearning?trainingOrderStatus=${this.trainingOrderStatus}&trainingItemId=${item.trainingItemId}&trainingOrderNo=${item.trainingOrderNo}&trainingOrderDetailsId=${item.trainingOrderDetailsId}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
info() {
|
||||||
|
this.videolist = []
|
||||||
|
this.imgtextlist = []
|
||||||
|
selectTrainingOrderItemList(this.trainingParentId, this.nurseStationPersonId, this.trainingOrderNo).then(
|
||||||
|
res => {
|
||||||
|
res.data.forEach(e => {
|
||||||
|
if (e.trainingItemType == 'VIDEO_LEARNING') {
|
||||||
|
this.videolist.push(e)
|
||||||
|
} else if (e.trainingItemType == 'GRAPHIC_LEARNING') {
|
||||||
|
this.imgtextlist.push(e)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//点击tabs
|
||||||
|
tabchange(index) {
|
||||||
|
this.tabcurrent = index;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
@import "./Orderlearning.scss";
|
||||||
|
</style>
|
||||||
83
pages/Orderlist/Orderlist.scss
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
.app {
|
||||||
|
padding: 10rpx 0 100rpx;
|
||||||
|
|
||||||
|
.noorder {
|
||||||
|
margin-top: 20%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 98%;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding: 0 0 100rpx 0;
|
||||||
|
margin: 0 auto 15rpx;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.name {
|
||||||
|
width: 95%;
|
||||||
|
height: 90rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #969394;
|
||||||
|
line-height: 90rpx;
|
||||||
|
border-bottom: 1rpx solid #D8D4D4;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: #4C7BC9;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 15rpx;
|
||||||
|
height: 23rpx;
|
||||||
|
padding-left: 25rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.detailslist {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 182rpx;
|
||||||
|
height: 182rpx;
|
||||||
|
margin: 20rpx 0 0 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.model {
|
||||||
|
width: 70%;
|
||||||
|
margin: 30rpx 0 0 20rpx;
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-size: 34rpx;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
span:nth-child(1) {
|
||||||
|
display: inline-block;
|
||||||
|
width: 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
span:nth-child(2) {
|
||||||
|
color: #969394;
|
||||||
|
float: right;
|
||||||
|
margin-right: 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.submit {
|
||||||
|
width: 25%;
|
||||||
|
height: 68rpx;
|
||||||
|
line-height: 68rpx;
|
||||||
|
background: #4C7BC9;
|
||||||
|
border-radius: 26rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
position: absolute;
|
||||||
|
right: 2%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
111
pages/Orderlist/Orderlist.vue
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app">
|
||||||
|
<view class="" v-if="total>0">
|
||||||
|
<view class="item" v-for="(item,index) in orderlist" :key="index">
|
||||||
|
<view class="name">
|
||||||
|
{{item.trainingOrderTime}}
|
||||||
|
<span>{{item.trainingOrderStatus=='WAIT_PAY'?'待付款':''}}
|
||||||
|
{{item.trainingOrderStatus=='PAY'?'已付款':''}}
|
||||||
|
{{item.trainingOrderStatus=='REFUNDED'?'已退款':''}}
|
||||||
|
{{item.trainingOrderStatus=='CANCEL'?'已取消':''}}
|
||||||
|
</span>
|
||||||
|
</view>
|
||||||
|
<view class="detailslist" @tap="goOrderlearning(item)">
|
||||||
|
<image :src="baseurl+item.trainingItemCoverUrl" mode=""></image>
|
||||||
|
<view class="model">
|
||||||
|
<span>{{item.trainingItemTitle}}</span>
|
||||||
|
<span v-if="item.trainingItemPrice">¥{{item.trainingItemPrice}}</span>
|
||||||
|
<span v-else>¥0</span>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="submit" @tap='goOrderdetails(item)' v-if="item.trainingOrderStatus=='WAIT_PAY'"
|
||||||
|
style="background-color: #4271B9;">
|
||||||
|
去支付
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="noorder" v-else>
|
||||||
|
<u-empty mode="list" icon-size='220' text='暂无'></u-empty>
|
||||||
|
</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import baseurl from '@/api/baseurl.js'
|
||||||
|
import {
|
||||||
|
selectTrainingOrderItemGroupList
|
||||||
|
} from '@/api/Orderlist/index.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
baseurl: undefined,
|
||||||
|
nurseStationPersonId: undefined,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
orderlist: [],
|
||||||
|
total: 0,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.baseurl = baseurl
|
||||||
|
const that = this
|
||||||
|
this.pageNum = 1
|
||||||
|
const nursePersonId = uni.getStorageSync('nursePersonId');
|
||||||
|
if (nursePersonId) {
|
||||||
|
that.nurseStationPersonId = nursePersonId
|
||||||
|
that.info();
|
||||||
|
} else {}
|
||||||
|
},
|
||||||
|
onLoad() {},
|
||||||
|
methods: {
|
||||||
|
//订单详情
|
||||||
|
goOrderdetails(item) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/Orderdetails/Orderdetails?trainingOrderNo=${item.trainingOrderNo}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//我的学习
|
||||||
|
goOrderlearning(item) {
|
||||||
|
if (item.trainingItemType == 'VIDEO_LEARNING') {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/Ordervideolearning/Ordervideolearning?trainingItemType=${item.trainingItemType}&trainingOrderStatus=${item.trainingOrderStatus}&trainingItemId=${item.trainingItemId}&trainingOrderNo=${item.trainingOrderNo}&trainingOrderDetailsId=${item.trainingOrderDetailsId}`
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/Orderlearning/Orderlearning?trainingOrderStatus=${item.trainingOrderStatus}&trainingParentId=${item.trainingItemId}&trainingOrderNo=${item.trainingOrderNo}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//列表信息
|
||||||
|
info() {
|
||||||
|
selectTrainingOrderItemGroupList(this.pageNum, this.pageSize, this.nurseStationPersonId)
|
||||||
|
.then(res => {
|
||||||
|
this.orderlist = res.rows
|
||||||
|
this.total = res.total
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onReachBottom() { //下滑加载
|
||||||
|
if (this.orderlist.length >= this.total) {} else {
|
||||||
|
this.pageNum++
|
||||||
|
selectTrainingOrderItemGroupList(this.pageNum, this.pageSize, this.nurseStationPersonId)
|
||||||
|
.then(res => {
|
||||||
|
res.rows.forEach(e => {
|
||||||
|
this.orderlist.push(e)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onPullDownRefresh() { //下拉刷新
|
||||||
|
this.pageNum = 1
|
||||||
|
this.info();
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
@import "./Orderlist.scss";
|
||||||
|
</style>
|
||||||
238
pages/Ordervideolearning/Ordervideolearning.scss
Normal file
@ -0,0 +1,238 @@
|
|||||||
|
.app {
|
||||||
|
width: 96%;
|
||||||
|
padding: 0;
|
||||||
|
margin: 15rpx auto;
|
||||||
|
color: #666666;
|
||||||
|
background-color: #fff;
|
||||||
|
.popup {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
|
.buyselect {
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
margin: 40rpx auto 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 100rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 48rpx;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
width: 70rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
position: absolute;
|
||||||
|
left: 150rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
line-height: 100rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.buybtn {
|
||||||
|
width: 70%;
|
||||||
|
height: 70rpx;
|
||||||
|
background: #4271B9;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 40rpx;
|
||||||
|
left: 15%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popuptitle {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 41rpx;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
top: 40rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bottomitem {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 150rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0rpx 1rpx 21rpx 0rpx rgba(204, 204, 204, 0.75);
|
||||||
|
|
||||||
|
.buy {
|
||||||
|
width: 150rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
background: #4271B9;
|
||||||
|
line-height: 70rpx;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
position: absolute;
|
||||||
|
right: 50rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
position: absolute;
|
||||||
|
left: 50rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
font-size: 42rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #EA706A;
|
||||||
|
line-height: 130rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.directory {
|
||||||
|
padding-bottom: 420rpx;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
position: relative;
|
||||||
|
width: 96%;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding-bottom: 35rpx;
|
||||||
|
border-bottom: 1rpx solid #E6E6E6;
|
||||||
|
color: #888787;
|
||||||
|
|
||||||
|
.play {
|
||||||
|
font-size: 24rpx;
|
||||||
|
width: 141rpx;
|
||||||
|
height: 52rpx;
|
||||||
|
background: #E6E6E6;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
line-height: 52rpx;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
right: 30rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
image{
|
||||||
|
width: 24rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
position: absolute;
|
||||||
|
top:50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
left:10%;
|
||||||
|
}
|
||||||
|
view{
|
||||||
|
position: absolute;
|
||||||
|
top:50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
right:10%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.Introduce {
|
||||||
|
width: 300rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
line-height: 36rpx;
|
||||||
|
margin: 18rpx 0 0 176rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
margin-top: 40rpx;
|
||||||
|
|
||||||
|
.DirectoryName {
|
||||||
|
display: inline-block;
|
||||||
|
width: 176rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.texttitle {
|
||||||
|
display: inline-block;
|
||||||
|
width: 300rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #666666;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom {
|
||||||
|
width: 100%;
|
||||||
|
height: 160rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0rpx 1rpx 21rpx 0rpx rgba(204, 204, 204, 0.75);
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
|
.buy {
|
||||||
|
width: 140rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background: #4271B9;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 60rpx;
|
||||||
|
position: absolute;
|
||||||
|
right: 60rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
font-size: 42rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #EA706A;
|
||||||
|
line-height: 120rpx;
|
||||||
|
position: absolute;
|
||||||
|
left: 44rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail {
|
||||||
|
width: 90%;
|
||||||
|
margin: 40rpx auto 0;
|
||||||
|
font-size: 32rpx;
|
||||||
|
padding-bottom: 420rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .u-tabs {
|
||||||
|
width: 50% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.border {
|
||||||
|
width: 94%;
|
||||||
|
margin: 40rpx auto;
|
||||||
|
border-bottom: 1rpx solid #E6E6E6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time {
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin: 21rpx 0 0 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 38rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #000000;
|
||||||
|
line-height: 36rpx;
|
||||||
|
margin: 36rpx 0 0 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topimage {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 407rpx;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
435
pages/Ordervideolearning/Ordervideolearning.vue
Normal file
@ -0,0 +1,435 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app" v-if="list">
|
||||||
|
<image class="topimage" v-if='!videoshow' :src="baseurl + list.trainingItemPosterUrl" mode=""></image>
|
||||||
|
<video class="topimage" id="video" v-if="videoshow" :src="baseurl+videoitem.itemDirectoryUrl"
|
||||||
|
@timeupdate='videotimeupdate' :initial-time='videoitem.watchTime' @error='videoerror' :custom-cache="false"
|
||||||
|
@play='videoplays' @pause='videopause' @ended='videoended'></video>
|
||||||
|
<view class="title">
|
||||||
|
{{list.trainingItemTitle}}
|
||||||
|
</view>
|
||||||
|
<view class="border"></view>
|
||||||
|
<u-tabs :list="tablist" :is-scroll="false" :current="tabcurrent" @change="change" font-size='34' bar-height='3'>
|
||||||
|
</u-tabs>
|
||||||
|
<view class="detail" v-if="tabcurrent==0">
|
||||||
|
{{list.trainingItemDetails}}
|
||||||
|
</view>
|
||||||
|
<view class="directory" v-if="tabcurrent==1">
|
||||||
|
<view class="item" v-for="(item,index) in list.trainingOrderItemDirectoryVOList" :key="index">
|
||||||
|
<view class="text">
|
||||||
|
<span class='DirectoryName'>{{item.itemDirectoryName?item.itemDirectoryName:''}}</span>
|
||||||
|
<span class='texttitle'>{{item.itemDirectoryTitle?item.itemDirectoryTitle:''}}</span>
|
||||||
|
</view>
|
||||||
|
<view class="Introduce">
|
||||||
|
{{item.itemDirectoryIntroduce?item.itemDirectoryIntroduce:''}}
|
||||||
|
</view>
|
||||||
|
<view class="" v-if="list.trainingOrderStatus=='PAY'">
|
||||||
|
<view class="play" @tap='videoplay(item)'
|
||||||
|
:style="item.itemDirectoryWatchStatus=='NOT_WATCHED'?'background-color: #3D7DCA;color:#fff':''"
|
||||||
|
v-if="item.itemDirectoryWatchStatus=='NOT_WATCHED'&&!item.videoshow">
|
||||||
|
开始播放
|
||||||
|
</view>
|
||||||
|
<view class="play"
|
||||||
|
:style="item.itemDirectoryWatchStatus=='NOT_WATCHED'?'background-color: #3D7DCA;color:#fff':''"
|
||||||
|
v-if="item.itemDirectoryWatchStatus=='NOT_WATCHED'&&item.videoshow">
|
||||||
|
<image src="../../static/bofang.png" mode=""></image>
|
||||||
|
<view class="">
|
||||||
|
播放中
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="play" @tap='videoplay(item)'
|
||||||
|
:style="item.itemDirectoryWatchStatus=='WATCHED'?'background-color: #E3EAF5;color:#3D7DCA':''"
|
||||||
|
v-if="item.itemDirectoryWatchStatus=='WATCHED'&&!item.videoshow">
|
||||||
|
继续播放
|
||||||
|
</view>
|
||||||
|
<view class="play"
|
||||||
|
:style="item.itemDirectoryWatchStatus=='WATCHED'?'background-color: #3D7DCA;color:#fff':''"
|
||||||
|
v-if="item.itemDirectoryWatchStatus=='WATCHED'&&item.videoshow">
|
||||||
|
<image src="../../static/bofang.png" mode=""></image>
|
||||||
|
<view class="">
|
||||||
|
播放中
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="play" @tap='videoplay(item)'
|
||||||
|
:style="item.itemDirectoryWatchStatus=='FINISHED_READING'?'background-color: #E6E6E6;color:#76777B':''"
|
||||||
|
v-if="item.itemDirectoryWatchStatus=='FINISHED_READING'&&!item.videoshow">
|
||||||
|
已看完
|
||||||
|
</view>
|
||||||
|
<view class="play"
|
||||||
|
:style="item.itemDirectoryWatchStatus=='FINISHED_READING'?'background-color: #3D7DCA;color:#fff':''"
|
||||||
|
v-if="item.itemDirectoryWatchStatus=='FINISHED_READING'&&item.videoshow">
|
||||||
|
<image src="../../static/bofang.png" mode=""></image>
|
||||||
|
<view class="">
|
||||||
|
播放中
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="play" v-else @tap='novideoplay'>
|
||||||
|
开始播放
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <u-popup v-model="videoshow" mode="center" closeable @close='videoshowfalse'>
|
||||||
|
<video id="video" v-if="videoshow" :src="baseurl+videoitem.itemDirectoryUrl" @timeupdate='videotimeupdate'
|
||||||
|
:initial-time='videoitem.watchTime' @error='videoerror' :custom-cache="false"
|
||||||
|
@play='videoplays'></video>
|
||||||
|
</u-popup> -->
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
<view class="bottomitem" v-if="bottombuyshow&&list.trainingOrderStatus=='WAIT_PAY'">
|
||||||
|
<view class="price">
|
||||||
|
¥{{list.trainingItemPrice?list.trainingItemPrice:0}}
|
||||||
|
</view>
|
||||||
|
<view class="buy" @tap='buy'>
|
||||||
|
购买
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-popup v-model="buyshow" mode='bottom' height='500' class='popup' safe-area-inset-bottom>
|
||||||
|
<view class="popuptitle">请选择支付方式</view>
|
||||||
|
<view class="buyselect">
|
||||||
|
<image src="../../static/wechat.png" mode=""></image>
|
||||||
|
<view class="text">
|
||||||
|
微信支付
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="buybtn" @tap='tobuy'>
|
||||||
|
确认支付{{list.trainingItemPrice?list.trainingItemPrice:0}}元
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
</view>
|
||||||
|
<view class="" v-else style="padding-top: 100rpx;">
|
||||||
|
<u-empty text="暂无内容" mode="list" icon-size='240' font-size='32'></u-empty>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import baseurl from '@/api/baseurl.js'
|
||||||
|
import {
|
||||||
|
selectTrainingOrderVideoDetails,
|
||||||
|
insertTrainingItemWatchRecord,
|
||||||
|
getTrainingItemWatchRecord
|
||||||
|
} from '@/api/Ordervideolearning/index.js'
|
||||||
|
import {
|
||||||
|
trainingItemOrder,
|
||||||
|
appletTrainingOrderPay
|
||||||
|
} from '@/api/learning/index.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: undefined,
|
||||||
|
baseurl: undefined,
|
||||||
|
nurseStationPersonId: undefined,
|
||||||
|
tabcurrent: 0, //tabsindex
|
||||||
|
tablist: [{ //tabs的list
|
||||||
|
name: '详情'
|
||||||
|
}, {
|
||||||
|
name: '目录'
|
||||||
|
}],
|
||||||
|
trainingItemId: undefined, //上个页面id
|
||||||
|
trainingOrderNo: undefined, //上个页面orderno
|
||||||
|
videoshow: false, //视频开关
|
||||||
|
videoitem: {
|
||||||
|
watchTime: 0,
|
||||||
|
}, //视频对象
|
||||||
|
// trainingOrderStatus: undefined,
|
||||||
|
trainingOrderDetailsId: undefined,
|
||||||
|
videoerroshow: true,
|
||||||
|
videoContext: undefined,
|
||||||
|
bottombuyshow: false, //下面的购买divcss
|
||||||
|
buyshow: false, //购买弹框
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onUnload() {
|
||||||
|
if (this.videoitem.itemDirectoryCode) {
|
||||||
|
if (this.videoerroshow) {
|
||||||
|
if (this.videoitem.watchTime) {
|
||||||
|
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
|
||||||
|
}
|
||||||
|
insertTrainingItemWatchRecord(this.videoitem).then(res => {})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLaunch() {
|
||||||
|
// 锁定横屏
|
||||||
|
// plus.screen.lockOrientation("landscape-primary");
|
||||||
|
// 锁定竖屏
|
||||||
|
plus.screen.lockOrientation("portrait-primary");
|
||||||
|
},
|
||||||
|
// onHide() {
|
||||||
|
// var that = this
|
||||||
|
// uni.getSystemInfo({
|
||||||
|
// success: function(res) {
|
||||||
|
// if (res.platform == 'ios') {
|
||||||
|
// that.videoitem = {
|
||||||
|
// watchTime: 0
|
||||||
|
// }
|
||||||
|
// that.info();
|
||||||
|
// that.videoshow = false
|
||||||
|
// } else {}
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
methods: {
|
||||||
|
//购买
|
||||||
|
tobuy() {
|
||||||
|
var that = this
|
||||||
|
const nurseStationId = uni.getStorageSync('nurseStationId');
|
||||||
|
if (nurseStationId) {
|
||||||
|
var obj = {
|
||||||
|
"trainingItemId": undefined,
|
||||||
|
"nurseStationId": undefined,
|
||||||
|
"nurseStationPersonId": undefined,
|
||||||
|
"trainingOrderAmount": undefined,
|
||||||
|
"nursePersonName": undefined,
|
||||||
|
}
|
||||||
|
obj.trainingItemId = this.list.trainingItemId
|
||||||
|
obj.nurseStationId = uni.getStorageSync('nurseStationId');
|
||||||
|
obj.nurseStationPersonId = this.nurseStationPersonId
|
||||||
|
obj.nursePersonName = uni.getStorageSync('nursePersonName');
|
||||||
|
obj.trainingOrderAmount = this.list.trainingItemPrice
|
||||||
|
trainingItemOrder(obj).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
if (res.data.trainingOrderAmount > 0) {
|
||||||
|
let objs = {
|
||||||
|
"openid": uni.getStorageSync('openid'),
|
||||||
|
"nurseStationPersonId": res.data.nurseStationPersonId,
|
||||||
|
"orderNo": res.data.trainingOrderNo,
|
||||||
|
"payType": "WECHAT_PAY",
|
||||||
|
"orderChannel": "WECHAT_APPLET",
|
||||||
|
"buySource": "TRAINING",
|
||||||
|
"paymentPrice": res.data.trainingOrderAmount,
|
||||||
|
}
|
||||||
|
appletTrainingOrderPay(objs).then(response => {
|
||||||
|
if (response.code == 200) {} else {
|
||||||
|
this.buyshow = false
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: response.msg,
|
||||||
|
type: 'error',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
that.buyshow = false
|
||||||
|
that.bottombuyshow = false
|
||||||
|
that.info();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.buyshow = false
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.msg,
|
||||||
|
type: 'error',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
that.buyshow = false
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '请您重新登录',
|
||||||
|
type: 'error',
|
||||||
|
duration: 1500,
|
||||||
|
url: "/pages/login/login"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//打开购买弹框
|
||||||
|
buy() {
|
||||||
|
this.buyshow = true
|
||||||
|
},
|
||||||
|
//播放到末尾
|
||||||
|
videoended(e) {
|
||||||
|
this.videoContext.stop()
|
||||||
|
if (this.videoerroshow) {
|
||||||
|
if (this.videoitem.watchTime) {
|
||||||
|
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
|
||||||
|
}
|
||||||
|
insertTrainingItemWatchRecord(this.videoitem).then(res => {
|
||||||
|
this.videoitem.watchTime = 0
|
||||||
|
this.videoContext = undefined
|
||||||
|
this.videoitem.videoshow = false
|
||||||
|
this.videoshow = false
|
||||||
|
this.videoitem = {
|
||||||
|
watchTime: 0
|
||||||
|
}
|
||||||
|
this.info();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//播放进度变化
|
||||||
|
videotimeupdate(e) {
|
||||||
|
//e.detail.currentTime是已经播放了多久,e.detail.duration是该视频多长
|
||||||
|
this.videoitem.watchTime = e.detail.currentTime
|
||||||
|
},
|
||||||
|
//关闭播放弹出框
|
||||||
|
videopause() {
|
||||||
|
// if (this.videoerroshow) {
|
||||||
|
// if (this.videoitem.watchTime) {
|
||||||
|
// this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
|
||||||
|
// }
|
||||||
|
// insertTrainingItemWatchRecord(this.videoitem).then(res => {
|
||||||
|
// this.videoitem.watchTime = 0
|
||||||
|
// this.info();
|
||||||
|
// this.videoshow = false
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
//视频播放出错
|
||||||
|
videoerror(e) {
|
||||||
|
this.videoitem = {
|
||||||
|
watchTime: 0
|
||||||
|
}
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '暂无视频',
|
||||||
|
type: 'error',
|
||||||
|
duration: '2000'
|
||||||
|
})
|
||||||
|
this.videoerroshow = false
|
||||||
|
this.videoshow = false
|
||||||
|
this.info();
|
||||||
|
},
|
||||||
|
//novideoplay未购买
|
||||||
|
novideoplay() {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '您未购买',
|
||||||
|
type: 'error',
|
||||||
|
duration: '2000'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//视频播放
|
||||||
|
videoplays() {
|
||||||
|
var that = this
|
||||||
|
if (that.videoitem.watchTime) {
|
||||||
|
that.videoContext.seek(that.videoitem.watchTime)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
videoplay(item) {
|
||||||
|
if (this.videoContext) {
|
||||||
|
this.videoshow = false
|
||||||
|
this.videoContext.stop()
|
||||||
|
if (this.videoerroshow) {
|
||||||
|
if (this.videoitem.watchTime == 0) {
|
||||||
|
this.videoitem.watchTime = '00:00:00'
|
||||||
|
} else {
|
||||||
|
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
|
||||||
|
}
|
||||||
|
insertTrainingItemWatchRecord(this.videoitem).then(res => {})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
uni.showLoading({
|
||||||
|
title: '获取视频中'
|
||||||
|
});
|
||||||
|
setTimeout(el => {
|
||||||
|
this.info();
|
||||||
|
this.videoerroshow = true
|
||||||
|
if (item.itemDirectoryUrl) {
|
||||||
|
if (!item.watchTime) {
|
||||||
|
item.watchTime = 0
|
||||||
|
}
|
||||||
|
this.list.trainingOrderItemDirectoryVOList.forEach(e => {
|
||||||
|
e.videoshow = false
|
||||||
|
})
|
||||||
|
item.trainingOrderId = this.list.trainingOrderId
|
||||||
|
item.trainingItemId = this.list.trainingItemId
|
||||||
|
item.nurseStationPersonId = this.nurseStationPersonId
|
||||||
|
item.nursePersonName = uni.getStorageSync('nursePersonName')
|
||||||
|
item.trainingItemTitle = this.list.trainingItemTitle
|
||||||
|
if (item.itemDirectoryWatchStatus == 'WATCHED') {
|
||||||
|
getTrainingItemWatchRecord(item.trainingOrderId, item.trainingItemId, item
|
||||||
|
.trainingItemDirectoryId, item.nurseStationPersonId).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
if (res.data.watchTime) {
|
||||||
|
item.watchTime = res.data.watchTime
|
||||||
|
item.watchTime = this.formatsecond(item.watchTime)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.videoitem = item
|
||||||
|
this.videoitem.videoshow = true
|
||||||
|
this.videoshow = true
|
||||||
|
this.videoContext = uni.createVideoContext('video', this)
|
||||||
|
uni.hideLoading();
|
||||||
|
} else {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '暂无视频',
|
||||||
|
type: 'error',
|
||||||
|
duration: '2000'
|
||||||
|
})
|
||||||
|
uni.hideLoading();
|
||||||
|
}
|
||||||
|
}, 500)
|
||||||
|
},
|
||||||
|
info() {
|
||||||
|
selectTrainingOrderVideoDetails(this.trainingItemId, this.trainingOrderNo, this.trainingOrderDetailsId)
|
||||||
|
.then(
|
||||||
|
res => {
|
||||||
|
this.list = res.data
|
||||||
|
if (this.videoitem.itemDirectoryCode) {
|
||||||
|
this.list.trainingOrderItemDirectoryVOList.forEach(e => {
|
||||||
|
if (e.itemDirectoryCode == this.videoitem.itemDirectoryCode) {
|
||||||
|
e.videoshow = true
|
||||||
|
} else {
|
||||||
|
e.videoshow = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//点击tabs
|
||||||
|
change(index) {
|
||||||
|
this.tabcurrent = index;
|
||||||
|
},
|
||||||
|
//时分秒转秒
|
||||||
|
formatsecond(value) {
|
||||||
|
value = value.split(':')
|
||||||
|
var number = 0
|
||||||
|
value.forEach(e => {
|
||||||
|
e = Number(e)
|
||||||
|
})
|
||||||
|
value[0] = value[0] * 24 * 60
|
||||||
|
value[1] = value[1] * 60
|
||||||
|
value.forEach(e => {
|
||||||
|
e = Number(e)
|
||||||
|
if (e > 0) {
|
||||||
|
number = number + e
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return number
|
||||||
|
},
|
||||||
|
//秒转时分秒
|
||||||
|
formatSeconds(value) {
|
||||||
|
let result = parseInt(value)
|
||||||
|
let h = Math.floor(result / 3600) < 10 ? '0' + Math.floor(result / 3600) : Math.floor(result / 3600);
|
||||||
|
let m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 % 60)) : Math.floor((result /
|
||||||
|
60 % 60));
|
||||||
|
let s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math.floor((result % 60));
|
||||||
|
let res = '';
|
||||||
|
res += `${h}:`;
|
||||||
|
res += `${m}:`;
|
||||||
|
res += `${s}`;
|
||||||
|
return res;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
const that = this
|
||||||
|
this.videoitem = {
|
||||||
|
watchTime: 0
|
||||||
|
}
|
||||||
|
this.baseurl = baseurl
|
||||||
|
// this.trainingOrderStatus = options.trainingOrderStatus
|
||||||
|
this.trainingItemId = options.trainingItemId
|
||||||
|
this.trainingOrderNo = options.trainingOrderNo
|
||||||
|
this.trainingOrderDetailsId = options.trainingOrderDetailsId
|
||||||
|
this.info();
|
||||||
|
const value = uni.getStorageSync('nursePersonId');
|
||||||
|
if (value) {
|
||||||
|
that.nurseStationPersonId = value
|
||||||
|
} else {}
|
||||||
|
if (options.trainingItemType) {
|
||||||
|
this.bottombuyshow = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
@import "./Ordervideolearning.scss";
|
||||||
|
</style>
|
||||||
238
pages/Videolearning/Videolearning.scss
Normal file
@ -0,0 +1,238 @@
|
|||||||
|
.app {
|
||||||
|
width: 96%;
|
||||||
|
padding: 0;
|
||||||
|
margin: 15rpx auto;
|
||||||
|
color: #666666;
|
||||||
|
background-color: #fff;
|
||||||
|
.popup {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
|
.buyselect {
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
margin: 40rpx auto 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 100rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 48rpx;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
width: 70rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
position: absolute;
|
||||||
|
left: 150rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
line-height: 100rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.buybtn {
|
||||||
|
width: 70%;
|
||||||
|
height: 70rpx;
|
||||||
|
background: #4271B9;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 40rpx;
|
||||||
|
left: 15%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popuptitle {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 41rpx;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
top: 40rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bottomitem {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 150rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0rpx 1rpx 21rpx 0rpx rgba(204, 204, 204, 0.75);
|
||||||
|
|
||||||
|
.buy {
|
||||||
|
width: 150rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
background: #4271B9;
|
||||||
|
line-height: 70rpx;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
position: absolute;
|
||||||
|
right: 50rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
position: absolute;
|
||||||
|
left: 50rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
font-size: 42rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #EA706A;
|
||||||
|
line-height: 130rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.directory {
|
||||||
|
padding-bottom: 420rpx;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
position: relative;
|
||||||
|
width: 96%;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding-bottom: 35rpx;
|
||||||
|
border-bottom: 1rpx solid #E6E6E6;
|
||||||
|
color: #888787;
|
||||||
|
|
||||||
|
.play {
|
||||||
|
font-size: 24rpx;
|
||||||
|
width: 141rpx;
|
||||||
|
height: 52rpx;
|
||||||
|
background: #E6E6E6;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
line-height: 52rpx;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
right: 30rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
image{
|
||||||
|
width: 24rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
position: absolute;
|
||||||
|
top:50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
left:10%;
|
||||||
|
}
|
||||||
|
view{
|
||||||
|
position: absolute;
|
||||||
|
top:50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
right:10%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.Introduce {
|
||||||
|
width: 300rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
line-height: 36rpx;
|
||||||
|
margin: 18rpx 0 0 176rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
margin-top: 40rpx;
|
||||||
|
|
||||||
|
.DirectoryName {
|
||||||
|
display: inline-block;
|
||||||
|
width: 176rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.texttitle {
|
||||||
|
display: inline-block;
|
||||||
|
width: 300rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #666666;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom {
|
||||||
|
width: 100%;
|
||||||
|
height: 160rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0rpx 1rpx 21rpx 0rpx rgba(204, 204, 204, 0.75);
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
|
.buy {
|
||||||
|
width: 140rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background: #4271B9;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 60rpx;
|
||||||
|
position: absolute;
|
||||||
|
right: 60rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
font-size: 42rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #EA706A;
|
||||||
|
line-height: 120rpx;
|
||||||
|
position: absolute;
|
||||||
|
left: 44rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail {
|
||||||
|
width: 90%;
|
||||||
|
margin: 40rpx auto 0;
|
||||||
|
font-size: 32rpx;
|
||||||
|
padding-bottom: 420rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .u-tabs {
|
||||||
|
width: 50% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.border {
|
||||||
|
width: 94%;
|
||||||
|
margin: 40rpx auto;
|
||||||
|
border-bottom: 1rpx solid #E6E6E6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time {
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin: 21rpx 0 0 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 38rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #000000;
|
||||||
|
line-height: 36rpx;
|
||||||
|
margin: 36rpx 0 0 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topimage {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 407rpx;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
424
pages/Videolearning/Videolearning.vue
Normal file
@ -0,0 +1,424 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app" v-if="list">
|
||||||
|
<image class="topimage" v-if='!videoshow' :src="baseurl + list.trainingItemPosterUrl" mode=""></image>
|
||||||
|
<video class="topimage" id="video" v-if="videoshow" :src="baseurl+videoitem.itemDirectoryUrl"
|
||||||
|
@timeupdate='videotimeupdate' :initial-time='videoitem.watchTime' @error='videoerror' :custom-cache="false"
|
||||||
|
@play='videoplays' @pause='videopause' @ended='videoended'></video>
|
||||||
|
<view class="title">
|
||||||
|
{{list.trainingItemTitle}}
|
||||||
|
</view>
|
||||||
|
<view class="border"></view>
|
||||||
|
<u-tabs :list="tablist" :is-scroll="false" :current="tabcurrent" @change="change" font-size='34' bar-height='3'>
|
||||||
|
</u-tabs>
|
||||||
|
<view class="detail" v-if="tabcurrent==0">
|
||||||
|
{{list.trainingItemDetails}}
|
||||||
|
</view>
|
||||||
|
<view class="directory" v-if="tabcurrent==1">
|
||||||
|
<view class="item" v-for="(item,index) in list.trainingItemDirectoryList" :key="index">
|
||||||
|
<view class="text">
|
||||||
|
<span class='DirectoryName'>{{item.itemDirectoryName?item.itemDirectoryName:''}}</span>
|
||||||
|
<span class='texttitle'>{{item.itemDirectoryTitle?item.itemDirectoryTitle:''}}</span>
|
||||||
|
</view>
|
||||||
|
<view class="Introduce">
|
||||||
|
{{item.itemDirectoryIntroduce?item.itemDirectoryIntroduce:''}}
|
||||||
|
</view>
|
||||||
|
<view class="play" v-if="!item.trainingOrderStatus" @tap='novideo'>
|
||||||
|
开始播放
|
||||||
|
</view>
|
||||||
|
<view class="" v-if="item.trainingOrderStatus=='PAY'">
|
||||||
|
<view class="play" @tap='videoplay(item)'
|
||||||
|
:style="item.itemDirectoryWatchStatus=='NOT_WATCHED'?'background-color: #3D7DCA;color:#fff':''"
|
||||||
|
v-if="item.itemDirectoryWatchStatus=='NOT_WATCHED'&&!item.videoshow">
|
||||||
|
开始播放
|
||||||
|
</view>
|
||||||
|
<view class="play"
|
||||||
|
:style="item.itemDirectoryWatchStatus=='NOT_WATCHED'?'background-color: #3D7DCA;color:#fff':''"
|
||||||
|
v-if="item.itemDirectoryWatchStatus=='NOT_WATCHED'&&item.videoshow">
|
||||||
|
<image src="../../static/bofang.png" mode=""></image>
|
||||||
|
<view class="">
|
||||||
|
播放中
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="play" @tap='videoplay(item)'
|
||||||
|
:style="item.itemDirectoryWatchStatus=='WATCHED'?'background-color: #E3EAF5;color:#3D7DCA':''"
|
||||||
|
v-if="item.itemDirectoryWatchStatus=='WATCHED'&&!item.videoshow">
|
||||||
|
继续播放
|
||||||
|
</view>
|
||||||
|
<view class="play"
|
||||||
|
:style="item.itemDirectoryWatchStatus=='WATCHED'?'background-color: #3D7DCA;color:#fff':''"
|
||||||
|
v-if="item.itemDirectoryWatchStatus=='WATCHED'&&item.videoshow">
|
||||||
|
<image src="../../static/bofang.png" mode=""></image>
|
||||||
|
<view class="">
|
||||||
|
播放中
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="play" @tap='videoplay(item)'
|
||||||
|
:style="item.itemDirectoryWatchStatus=='FINISHED_READING'?'background-color: #E6E6E6;color:#76777B':''"
|
||||||
|
v-if="item.itemDirectoryWatchStatus=='FINISHED_READING'&&!item.videoshow">
|
||||||
|
已看完
|
||||||
|
</view>
|
||||||
|
<view class="play"
|
||||||
|
:style="item.itemDirectoryWatchStatus=='FINISHED_READING'?'background-color: #3D7DCA;color:#fff':''"
|
||||||
|
v-if="item.itemDirectoryWatchStatus=='FINISHED_READING'&&item.videoshow">
|
||||||
|
<image src="../../static/bofang.png" mode=""></image>
|
||||||
|
<view class="">
|
||||||
|
播放中
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <u-popup v-model="videoshow" mode="center" closeable @close='videoshowfalse'>
|
||||||
|
</u-popup> -->
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
<view class="bottomitem" v-if="bottombuyshow&&list.trainingOrderDetailsBuy=='NOT_BUY'">
|
||||||
|
<view class="price">
|
||||||
|
¥{{list.trainingItemPrice?list.trainingItemPrice:0}}
|
||||||
|
</view>
|
||||||
|
<view class="buy" @tap='buy'>
|
||||||
|
购买
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-popup v-model="buyshow" mode='bottom' height='500' class='popup' safe-area-inset-bottom>
|
||||||
|
<view class="popuptitle">请选择支付方式</view>
|
||||||
|
<view class="buyselect">
|
||||||
|
<image src="../../static/wechat.png" mode=""></image>
|
||||||
|
<view class="text">
|
||||||
|
微信支付
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="buybtn" @tap='tobuy'>
|
||||||
|
确认支付{{list.trainingItemPrice?list.trainingItemPrice:0}}元
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
</view>
|
||||||
|
<view class="" v-else style="padding-top: 100rpx;">
|
||||||
|
<u-empty text="暂无内容" mode="list" icon-size='240' font-size='32'></u-empty>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import baseurl from '@/api/baseurl.js'
|
||||||
|
import {
|
||||||
|
selectNurseAppletPersonTrainingItemDetailsList,
|
||||||
|
insertTrainingItemWatchRecord,
|
||||||
|
getTrainingItemWatchRecord
|
||||||
|
} from '@/api/Videolearning/index.js'
|
||||||
|
import {
|
||||||
|
trainingItemOrder,
|
||||||
|
appletTrainingOrderPay
|
||||||
|
} from '@/api/learning/index.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: undefined,
|
||||||
|
baseurl: undefined,
|
||||||
|
nurseStationPersonId: undefined,
|
||||||
|
tabcurrent: 0, //tabsindex
|
||||||
|
tablist: [{ //tabs的list
|
||||||
|
name: '详情'
|
||||||
|
}, {
|
||||||
|
name: '目录'
|
||||||
|
}],
|
||||||
|
trainingItemId: {}, //上个页面id
|
||||||
|
videoshow: false, //视频开关
|
||||||
|
videoitem: {
|
||||||
|
watchTime: 0,
|
||||||
|
}, //视频对象
|
||||||
|
videoContext: null,
|
||||||
|
videoerroshow: true,
|
||||||
|
bottombuyshow: false, //下面的购买divcss
|
||||||
|
buyshow: false, //购买弹框
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onUnload() {
|
||||||
|
if (this.videoitem.itemDirectoryCode) {
|
||||||
|
if (this.videoerroshow) {
|
||||||
|
if (this.videoitem.watchTime) {
|
||||||
|
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
|
||||||
|
}
|
||||||
|
insertTrainingItemWatchRecord(this.videoitem).then(res => {})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// onHide() {
|
||||||
|
// var that = this
|
||||||
|
// uni.getSystemInfo({
|
||||||
|
// success: function(res) {
|
||||||
|
// if (res.platform == 'ios') {
|
||||||
|
// that.videoitem = {
|
||||||
|
// watchTime: 0
|
||||||
|
// }
|
||||||
|
// that.info();
|
||||||
|
// that.videoshow = false
|
||||||
|
// } else {}
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
onLaunch: function() {
|
||||||
|
// 锁定横屏
|
||||||
|
// plus.screen.lockOrientation("landscape-primary");
|
||||||
|
// 锁定竖屏
|
||||||
|
plus.screen.lockOrientation("portrait-primary");
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//购买
|
||||||
|
tobuy() {
|
||||||
|
var that = this
|
||||||
|
const nurseStationId = uni.getStorageSync('nurseStationId');
|
||||||
|
if (nurseStationId) {
|
||||||
|
var obj = {
|
||||||
|
"trainingItemId": undefined,
|
||||||
|
"nurseStationId": undefined,
|
||||||
|
"nurseStationPersonId": undefined,
|
||||||
|
"trainingOrderAmount": undefined,
|
||||||
|
"nursePersonName": undefined,
|
||||||
|
}
|
||||||
|
obj.trainingItemId = this.list.trainingItemId
|
||||||
|
obj.nurseStationId = uni.getStorageSync('nurseStationId');
|
||||||
|
obj.nurseStationPersonId = this.nurseStationPersonId
|
||||||
|
obj.nursePersonName = uni.getStorageSync('nursePersonName');
|
||||||
|
obj.trainingOrderAmount = this.list.trainingItemPrice
|
||||||
|
trainingItemOrder(obj).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
if (res.data.trainingOrderAmount > 0) {
|
||||||
|
let objs = {
|
||||||
|
"openid": uni.getStorageSync('openid'),
|
||||||
|
"nurseStationPersonId": res.data.nurseStationPersonId,
|
||||||
|
"orderNo": res.data.trainingOrderNo,
|
||||||
|
"payType": "WECHAT_PAY",
|
||||||
|
"orderChannel": "WECHAT_APPLET",
|
||||||
|
"buySource": "TRAINING",
|
||||||
|
"paymentPrice": res.data.trainingOrderAmount,
|
||||||
|
}
|
||||||
|
appletTrainingOrderPay(objs).then(response => {
|
||||||
|
if (response.code == 200) {} else {
|
||||||
|
this.buyshow = false
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: response.msg,
|
||||||
|
type: 'error',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
that.buyshow = false
|
||||||
|
that.bottombuyshow = false
|
||||||
|
that.info();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.buyshow = false
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.msg,
|
||||||
|
type: 'error',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
that.buyshow = false
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '请您重新登录',
|
||||||
|
type: 'error',
|
||||||
|
duration: 1500,
|
||||||
|
url: "/pages/login/login"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//打开购买弹框
|
||||||
|
buy() {
|
||||||
|
this.buyshow = true
|
||||||
|
},
|
||||||
|
//播放到末尾
|
||||||
|
videoended(e) {
|
||||||
|
this.videoContext.stop()
|
||||||
|
if (this.videoerroshow) {
|
||||||
|
if (this.videoitem.watchTime) {
|
||||||
|
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
|
||||||
|
}
|
||||||
|
insertTrainingItemWatchRecord(this.videoitem).then(res => {
|
||||||
|
this.videoitem.watchTime = 0
|
||||||
|
this.videoitem.videoshow = false
|
||||||
|
this.videoshow = false
|
||||||
|
this.videoContext = undefined
|
||||||
|
this.videoitem = {
|
||||||
|
watchTime: 0
|
||||||
|
}
|
||||||
|
this.info();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//播放进度变化
|
||||||
|
videotimeupdate(e) {
|
||||||
|
//e.detail.currentTime是已经播放了多久,e.detail.duration是该视频多长
|
||||||
|
this.videoitem.watchTime = e.detail.currentTime
|
||||||
|
},
|
||||||
|
//关闭播放弹出框
|
||||||
|
videopause() {
|
||||||
|
// if (this.videoerroshow) {
|
||||||
|
// if (this.videoitem.watchTime) {
|
||||||
|
// this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
|
||||||
|
// }
|
||||||
|
// insertTrainingItemWatchRecord(this.videoitem).then(res => {
|
||||||
|
// this.videoitem.watchTime = 0
|
||||||
|
// this.info();
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
//视频播放出错
|
||||||
|
videoerror(e) {
|
||||||
|
this.videoitem = {
|
||||||
|
watchTime: 0
|
||||||
|
}
|
||||||
|
this.videoerroshow = false
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '暂无视频',
|
||||||
|
type: 'error',
|
||||||
|
duration: '2000'
|
||||||
|
})
|
||||||
|
this.info();
|
||||||
|
this.videoshow = false
|
||||||
|
},
|
||||||
|
//视频播放
|
||||||
|
videoplays() {
|
||||||
|
var that = this
|
||||||
|
if (that.videoitem.watchTime) {
|
||||||
|
that.videoContext.seek(that.videoitem.watchTime)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//视频播放
|
||||||
|
videoplay(item) {
|
||||||
|
console.log(item)
|
||||||
|
if (this.videoContext) {
|
||||||
|
this.videoshow = false
|
||||||
|
this.videoContext.stop()
|
||||||
|
if (this.videoerroshow) {
|
||||||
|
if (this.videoitem.watchTime == 0) {
|
||||||
|
this.videoitem.watchTime = '00:00:00'
|
||||||
|
} else {
|
||||||
|
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
|
||||||
|
}
|
||||||
|
insertTrainingItemWatchRecord(this.videoitem).then(res => {})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
uni.showLoading({
|
||||||
|
title: '获取视频中'
|
||||||
|
});
|
||||||
|
setTimeout(el => {
|
||||||
|
this.info();
|
||||||
|
this.videoerroshow = true
|
||||||
|
if (item.itemDirectoryUrl) {
|
||||||
|
if (!item.watchTime) {
|
||||||
|
item.watchTime = 0
|
||||||
|
}
|
||||||
|
this.list.trainingItemDirectoryList.forEach(e => {
|
||||||
|
e.videoshow = false
|
||||||
|
})
|
||||||
|
item.trainingItemId = this.list.trainingItemId
|
||||||
|
item.nurseStationPersonId = this.nurseStationPersonId
|
||||||
|
item.nursePersonName = uni.getStorageSync('nursePersonName')
|
||||||
|
item.trainingItemTitle = this.list.trainingItemTitle
|
||||||
|
if (item.itemDirectoryWatchStatus == 'WATCHED') {
|
||||||
|
getTrainingItemWatchRecord(item.trainingOrderId, item.trainingItemId, item
|
||||||
|
.trainingItemDirectoryId, item.nurseStationPersonId).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
if (res.data.watchTime) {
|
||||||
|
item.watchTime = res.data.watchTime
|
||||||
|
item.watchTime = this.formatsecond(item.watchTime)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.videoitem = item
|
||||||
|
this.videoitem.videoshow = true
|
||||||
|
this.videoshow = true
|
||||||
|
this.videoContext = uni.createVideoContext('video', this)
|
||||||
|
uni.hideLoading();
|
||||||
|
} else {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '暂无视频',
|
||||||
|
type: 'error',
|
||||||
|
duration: '2000'
|
||||||
|
})
|
||||||
|
uni.hideLoading();
|
||||||
|
}
|
||||||
|
}, 500)
|
||||||
|
},
|
||||||
|
info() {
|
||||||
|
selectNurseAppletPersonTrainingItemDetailsList(this.trainingItemId, this.nurseStationPersonId).then(
|
||||||
|
res => {
|
||||||
|
this.list = res.data
|
||||||
|
if (this.videoitem.itemDirectoryCode) {
|
||||||
|
this.list.trainingItemDirectoryList.forEach(e => {
|
||||||
|
if (e.itemDirectoryCode == this.videoitem.itemDirectoryCode) {
|
||||||
|
e.videoshow = true
|
||||||
|
} else {
|
||||||
|
e.videoshow = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
novideo() {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '您未购买',
|
||||||
|
type: 'error',
|
||||||
|
duration: '2000'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//点击tabs
|
||||||
|
change(index) {
|
||||||
|
this.tabcurrent = index;
|
||||||
|
},
|
||||||
|
//时分秒转秒
|
||||||
|
formatsecond(value) {
|
||||||
|
value = value.split(':')
|
||||||
|
var number = 0
|
||||||
|
value.forEach(e => {
|
||||||
|
e = Number(e)
|
||||||
|
})
|
||||||
|
value[0] = value[0] * 24 * 60
|
||||||
|
value[1] = value[1] * 60
|
||||||
|
value.forEach(e => {
|
||||||
|
e = Number(e)
|
||||||
|
if (e > 0) {
|
||||||
|
number = number + e
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return number
|
||||||
|
},
|
||||||
|
//秒转时分秒
|
||||||
|
formatSeconds(value) {
|
||||||
|
let result = parseInt(value)
|
||||||
|
let h = Math.floor(result / 3600) < 10 ? '0' + Math.floor(result / 3600) : Math.floor(result / 3600);
|
||||||
|
let m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 % 60)) : Math.floor((result /
|
||||||
|
60 % 60));
|
||||||
|
let s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math.floor((result % 60));
|
||||||
|
let res = '';
|
||||||
|
res += `${h}:`;
|
||||||
|
res += `${m}:`;
|
||||||
|
res += `${s}`;
|
||||||
|
return res;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
const that = this
|
||||||
|
this.baseurl = baseurl
|
||||||
|
this.videoitem = {
|
||||||
|
watchTime: 0
|
||||||
|
}
|
||||||
|
this.trainingItemId = options.trainingItemId
|
||||||
|
const value = uni.getStorageSync('nursePersonId');
|
||||||
|
if (value) {
|
||||||
|
that.nurseStationPersonId = value
|
||||||
|
that.info();
|
||||||
|
} else {}
|
||||||
|
if (options.trainingItemType) {
|
||||||
|
this.bottombuyshow = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
@import "./Videolearning.scss";
|
||||||
|
</style>
|
||||||
@ -265,7 +265,7 @@
|
|||||||
onShow() {
|
onShow() {
|
||||||
var that = this
|
var that = this
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'gcj02',
|
type: 'wgs84',
|
||||||
geocode: true,
|
geocode: true,
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
that.list.serviceLocationName = res.address.poiName
|
that.list.serviceLocationName = res.address.poiName
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
在线学习
|
在线学习
|
||||||
</view>
|
</view>
|
||||||
<view class="cards">
|
<view class="cards">
|
||||||
<image src="../../static/xxpx.png" mode="" @tap='gostudy'></image>
|
<image src="../../static/xxpx.png" mode="" @tap='goLearningtraining'></image>
|
||||||
<image src="../../static/jnks.png" mode="" @tap='gostudy'></image>
|
<image src="../../static/jnks.png" mode="" @tap='gostudy'></image>
|
||||||
<image src="../../static/zxkf.png" mode="" @tap='gostudy'></image>
|
<image src="../../static/zxkf.png" mode="" @tap='gostudy'></image>
|
||||||
</view>
|
</view>
|
||||||
@ -50,14 +50,11 @@
|
|||||||
查看更多
|
查看更多
|
||||||
<u-icon name="arrow-right" color='#969494'></u-icon>
|
<u-icon name="arrow-right" color='#969494'></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="items" @tap='goHealthknowledge'>
|
<view class="items">
|
||||||
<view class="item">
|
<view class="item" v-for='(item,index) in NurseNewslist' @tap='goHealthitem(item)'>
|
||||||
<image src="../../static/hlxw.png" mode=""></image>
|
<image :src="item.leadThumbnailUrl" mode=""></image>
|
||||||
<view class="toptext">
|
<view class="toptext">
|
||||||
护理 I 致力于打造专业护理人才
|
{{item.informationTitle}}
|
||||||
</view>
|
|
||||||
<view class="centertext">
|
|
||||||
生活小窍门,是指人们在日常生活中总结出来的知识和经验,和生活小常识非常相似
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -67,8 +64,12 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
selectOrderByNursePersonCount
|
selectOrderByNursePersonCount,
|
||||||
|
selectNurseNews
|
||||||
} from '@/api/homepage/index.js'
|
} from '@/api/homepage/index.js'
|
||||||
|
import {
|
||||||
|
mapActions
|
||||||
|
} from "vuex";
|
||||||
import baseurl from '@/api/baseurl.js'
|
import baseurl from '@/api/baseurl.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -76,9 +77,11 @@
|
|||||||
beijingurl: null, //背景
|
beijingurl: null, //背景
|
||||||
nurserStationPersonId: null, //护理员id
|
nurserStationPersonId: null, //护理员id
|
||||||
selectOrderByNursePersonCountlist: {}, //项目数量对象
|
selectOrderByNursePersonCountlist: {}, //项目数量对象
|
||||||
|
NurseNewslist: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.selectNurseNewsinfo();
|
||||||
this.selectOrderByNursePersonCountlist = {}
|
this.selectOrderByNursePersonCountlist = {}
|
||||||
this.beijingurl = baseurl + '/profile/nursePersonAppletPicture/person_center.png'
|
this.beijingurl = baseurl + '/profile/nursePersonAppletPicture/person_center.png'
|
||||||
var that = this
|
var that = this
|
||||||
@ -89,6 +92,7 @@
|
|||||||
} else {}
|
} else {}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapActions(["personopenPopup"]),
|
||||||
//项目数量
|
//项目数量
|
||||||
OrderByNursePersonCount() {
|
OrderByNursePersonCount() {
|
||||||
selectOrderByNursePersonCount(this.nurserStationPersonId).then(res => {
|
selectOrderByNursePersonCount(this.nurserStationPersonId).then(res => {
|
||||||
@ -96,16 +100,8 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
goMymission(item) {
|
goMymission(item) {
|
||||||
setTimeout(e => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: `/pages/Mymission/Mymission?orderStatus=${item}`
|
|
||||||
})
|
|
||||||
}, 0)
|
|
||||||
},
|
|
||||||
//跳转到模板消息订阅界面
|
|
||||||
goTemplate() {
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/template/template"
|
url: `/pages/Mymission/Mymission?orderStatus=${item}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
gostudy() {
|
gostudy() {
|
||||||
@ -118,6 +114,29 @@
|
|||||||
url: '/pages/Healthknowledge/Healthknowledge',
|
url: '/pages/Healthknowledge/Healthknowledge',
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//跳转学习培训
|
||||||
|
goLearningtraining() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/Learningtraining/Learningtraining'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//护理新闻
|
||||||
|
selectNurseNewsinfo() {
|
||||||
|
selectNurseNews().then(res => {
|
||||||
|
if (res.rows) {
|
||||||
|
res.rows.forEach(e => {
|
||||||
|
e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.NurseNewslist = res.rows
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//跳转详情
|
||||||
|
goHealthitem(item) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/Healthitem/Healthitem?item=${encodeURIComponent(JSON.stringify(item))}`
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -148,42 +167,36 @@
|
|||||||
|
|
||||||
.item {
|
.item {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 150rpx;
|
height: 170rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
|
padding: 0 0 20rpx;
|
||||||
|
margin: 20rpx 0;
|
||||||
|
border-bottom: 1rpx solid #cdc9c9;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 130rpx;
|
width: 150rpx;
|
||||||
height: 130rpx;
|
height: 150rpx;
|
||||||
}
|
|
||||||
|
|
||||||
.centertext {
|
|
||||||
font-size: 22rpx;
|
|
||||||
position: absolute;
|
|
||||||
top: 60rpx;
|
|
||||||
left: 150rpx;
|
|
||||||
overflow: hidden; //超出的文本隐藏
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-line-clamp: 2; // 超出多少行
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.toptext {
|
.toptext {
|
||||||
font-size: 30rpx;
|
line-height: 30rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 5rpx;
|
top: 5rpx;
|
||||||
left: 150rpx;
|
left: 170rpx;
|
||||||
width: 75%;
|
width: 70%;
|
||||||
overflow: hidden; //超出的文本隐藏
|
text-overflow: -o-ellipsis-lastline;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-line-clamp: 1; // 超出多少行
|
-webkit-line-clamp: 5; //行数需设置
|
||||||
|
line-clamp: 5;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
// overflow: hidden; //超出的文本隐藏
|
text-align: justify;
|
||||||
// text-overflow: ellipsis; //溢出用省略号显示
|
|
||||||
// white-space: nowrap; // 默认不换行;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
226
pages/learning/learning.scss
Normal file
@ -0,0 +1,226 @@
|
|||||||
|
|
||||||
|
page {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app {
|
||||||
|
padding: 0;
|
||||||
|
color: #000000;
|
||||||
|
text-align: justify;
|
||||||
|
|
||||||
|
::v-deep .u-tabs {
|
||||||
|
width: 70% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width: 96%;
|
||||||
|
margin: 0 auto;
|
||||||
|
// padding: 30rpx 15rpx 200rpx;
|
||||||
|
// background-color: #fff;
|
||||||
|
// text-indent: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .ptext {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .ptext:nth-child(1) {
|
||||||
|
text-indent: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .ql-size-small {
|
||||||
|
font-size: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .ql-size-large {
|
||||||
|
font-size: 36rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .ql-size-huge {
|
||||||
|
font-size: 46rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .richPic {
|
||||||
|
width: 100% !important;
|
||||||
|
height: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.directory {
|
||||||
|
padding-bottom: 200rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
.video {}
|
||||||
|
|
||||||
|
.imagetext {}
|
||||||
|
|
||||||
|
.items {
|
||||||
|
width: 87%;
|
||||||
|
margin: 30rpx auto;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
height: 130rpx;
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 37rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 220rpx;
|
||||||
|
height: 130rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
position: absolute;
|
||||||
|
top: 10rpx;
|
||||||
|
left: 240rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #000000;
|
||||||
|
text-overflow: -o-ellipsis-lastline;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 1; //行数需设置
|
||||||
|
line-clamp: 1;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 10rpx;
|
||||||
|
left: 240rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #666666;
|
||||||
|
text-overflow: -o-ellipsis-lastline;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2; //行数需设置
|
||||||
|
line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.topheader {
|
||||||
|
height: 80rpx;
|
||||||
|
width: 92%;
|
||||||
|
margin: 0 auto;
|
||||||
|
border-bottom: 1rpx solid #e6e6e6;
|
||||||
|
padding-left: 10rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottomitem {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 150rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0rpx 1rpx 21rpx 0rpx rgba(204, 204, 204, 0.75);
|
||||||
|
|
||||||
|
.buy {
|
||||||
|
width: 150rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
background: #4271B9;
|
||||||
|
line-height: 70rpx;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
position: absolute;
|
||||||
|
right: 50rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
position: absolute;
|
||||||
|
left: 50rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
font-size: 42rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #EA706A;
|
||||||
|
line-height: 130rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.topitem {
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||||
|
border-radius: 5rpx;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #fff;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding-bottom: 40rpx;
|
||||||
|
|
||||||
|
.toptitle {
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 38rpx;
|
||||||
|
padding-top: 32rpx;
|
||||||
|
margin: 0 0 0 53rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toptext {
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #666666;
|
||||||
|
margin: 31rpx 56rpx 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
|
.buyselect {
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
margin: 40rpx auto 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 100rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 48rpx;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
width: 70rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
position: absolute;
|
||||||
|
left: 150rpx;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
line-height: 100rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.buybtn {
|
||||||
|
width: 70%;
|
||||||
|
height: 70rpx;
|
||||||
|
background: #4271B9;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 40rpx;
|
||||||
|
left: 15%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popuptitle {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 41rpx;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
top: 40rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
252
pages/learning/learning.vue
Normal file
@ -0,0 +1,252 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app" v-if="infoslist">
|
||||||
|
<view class="" style="background-color: #F4F5F7;height: 13rpx;width:100%"></view>
|
||||||
|
<view class="topitem">
|
||||||
|
<view class="toptitle">
|
||||||
|
{{infoslist.trainingItemTitle}}
|
||||||
|
</view>
|
||||||
|
<view class="toptext">
|
||||||
|
{{infoslist.trainingItemDetails?infoslist.trainingItemDetails:''}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="" style="background-color: #F4F5F7;height: 17rpx;width:100%"></view>
|
||||||
|
<u-tabs :list="tablist" :is-scroll="false" :current="tabcurrent" @change="tabchange" font-size='34'
|
||||||
|
bar-height='7' bar-width='43' inactive-color='#A09F9F' active-color='#4271B9'>
|
||||||
|
</u-tabs>
|
||||||
|
<view class="content" v-if="tabcurrent==0">
|
||||||
|
<!-- <view class="" v-html="infoslist.trainingItemContent"></view> -->
|
||||||
|
<u-parse :html="infoslist.trainingItemContent"></u-parse>
|
||||||
|
</view>
|
||||||
|
<view class="directory" v-if="tabcurrent==1">
|
||||||
|
<view class="imagetext" v-if="imgtextlist.length>0">
|
||||||
|
<view class="topheader">
|
||||||
|
图文学习
|
||||||
|
</view>
|
||||||
|
<view class="items">
|
||||||
|
<view class="item" v-for="(item,index) in imgtextlist" :key='item.id' @tap='goImglearning(item)'>
|
||||||
|
<image :src="baseurl+item.trainingItemCoverUrl" mode=""></image>
|
||||||
|
<view class="title">
|
||||||
|
{{item.trainingItemTitle}}
|
||||||
|
</view>
|
||||||
|
<view class="text">
|
||||||
|
{{item.trainingItemDetails?item.trainingItemDetails:''}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="video" v-if="videolist.length>0">
|
||||||
|
<view class="topheader">
|
||||||
|
视频学习
|
||||||
|
</view>
|
||||||
|
<view class="items">
|
||||||
|
<view class="item" v-for="(item,index) in videolist" :key='item.id' @tap='goVideolearning(item)'>
|
||||||
|
<image :src="baseurl+item.trainingItemCoverUrl" mode=""></image>
|
||||||
|
<view class="title">
|
||||||
|
{{item.trainingItemTitle}}
|
||||||
|
</view>
|
||||||
|
<view class="text">
|
||||||
|
{{item.trainingItemDetails?item.trainingItemDetails:''}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if='videolist.length==0&&imgtextlist.length==0' class="" style="padding-top: 100rpx;">
|
||||||
|
<u-empty text="暂无目录" mode="list" icon-size='240' font-size='32'></u-empty>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottomitem" v-if="infoslist.trainingOrderDetailsBuy=='NOT_BUY'">
|
||||||
|
<view class="price">
|
||||||
|
¥{{infoslist.trainingItemPrice?infoslist.trainingItemPrice:0}}
|
||||||
|
</view>
|
||||||
|
<view class="buy" @tap='buy'>
|
||||||
|
购买
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-popup v-model="buyshow" mode='bottom' height='500' class='popup' safe-area-inset-bottom>
|
||||||
|
<view class="popuptitle">请选择支付方式</view>
|
||||||
|
<view class="buyselect">
|
||||||
|
<image src="../../static/wechat.png" mode=""></image>
|
||||||
|
<view class="text">
|
||||||
|
微信支付
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="buybtn" @tap='tobuy'>
|
||||||
|
确认支付{{infoslist.trainingItemPrice?infoslist.trainingItemPrice:0}}元
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
selectNurseAppletPersonTrainingItemList,
|
||||||
|
selectNurseAppletPersonTrainingParent,
|
||||||
|
trainingItemOrder,
|
||||||
|
appletTrainingOrderPay
|
||||||
|
} from '@/api/learning/index.js'
|
||||||
|
import baseurl from '@/api/baseurl.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
baseurl: undefined,
|
||||||
|
videolist: [], //视频信息
|
||||||
|
imgtextlist: [], //图文信息
|
||||||
|
infoslist: undefined, //主信息
|
||||||
|
tabcurrent: 0, //tabsindex
|
||||||
|
tablist: [{ //tabs的list
|
||||||
|
name: '课程介绍'
|
||||||
|
}, {
|
||||||
|
name: '课程目录'
|
||||||
|
}],
|
||||||
|
trainingParentId: undefined,
|
||||||
|
nurseStationPersonId: undefined,
|
||||||
|
buyshow: false, //购买弹框
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
const that = this
|
||||||
|
const value = uni.getStorageSync('Refresh');
|
||||||
|
const nursePersonId = uni.getStorageSync('nursePersonId');
|
||||||
|
if (value) {
|
||||||
|
uni.removeStorageSync('Refresh');
|
||||||
|
that.nurseStationPersonId = nursePersonId
|
||||||
|
that.infos();
|
||||||
|
that.info();
|
||||||
|
} else {}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
const that = this
|
||||||
|
this.baseurl = baseurl
|
||||||
|
this.trainingParentId = options.trainingParentId
|
||||||
|
const value = uni.getStorageSync('nursePersonId');
|
||||||
|
if (value) {
|
||||||
|
that.nurseStationPersonId = value
|
||||||
|
that.infos();
|
||||||
|
that.info();
|
||||||
|
} else {}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//购买
|
||||||
|
tobuy() {
|
||||||
|
var that = this
|
||||||
|
const nurseStationId = uni.getStorageSync('nurseStationId');
|
||||||
|
if (nurseStationId) {
|
||||||
|
var obj = {
|
||||||
|
"trainingItemId": undefined,
|
||||||
|
"nurseStationId": undefined,
|
||||||
|
"nurseStationPersonId": undefined,
|
||||||
|
"trainingOrderAmount": undefined,
|
||||||
|
"nursePersonName": undefined,
|
||||||
|
}
|
||||||
|
obj.trainingItemId = this.infoslist.id
|
||||||
|
obj.nurseStationId = uni.getStorageSync('nurseStationId');
|
||||||
|
obj.nurseStationPersonId = this.nurseStationPersonId
|
||||||
|
obj.nursePersonName = uni.getStorageSync('nursePersonName');
|
||||||
|
obj.trainingOrderAmount = this.infoslist.trainingItemPrice
|
||||||
|
trainingItemOrder(obj).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
if (res.data.trainingOrderAmount > 0) {
|
||||||
|
let objs = {
|
||||||
|
"openid": uni.getStorageSync('openid'),
|
||||||
|
"nurseStationPersonId": res.data.nurseStationPersonId,
|
||||||
|
"orderNo": res.data.trainingOrderNo,
|
||||||
|
"payType": "WECHAT_PAY",
|
||||||
|
"orderChannel": "WECHAT_APPLET",
|
||||||
|
"buySource": "TRAINING",
|
||||||
|
"paymentPrice": res.data.trainingOrderAmount,
|
||||||
|
}
|
||||||
|
appletTrainingOrderPay(objs).then(response => {
|
||||||
|
if (response.code == 200) {} else {
|
||||||
|
this.buyshow = false
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: response.msg,
|
||||||
|
type: 'error',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
that.buyshow = false
|
||||||
|
that.infos();
|
||||||
|
that.info();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.buyshow = false
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.msg,
|
||||||
|
type: 'error',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '请您重新登录',
|
||||||
|
type: 'error',
|
||||||
|
duration: 1500,
|
||||||
|
url: "/pages/login/login"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//打开购买弹框
|
||||||
|
buy() {
|
||||||
|
this.buyshow = true
|
||||||
|
},
|
||||||
|
//跳转图文学习
|
||||||
|
goImglearning(item) {
|
||||||
|
if (item.trainingOrderDetailsBuy == 'BUY') {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/Imglearning/Imglearning?trainingItemId=${item.id}`
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '您未购买',
|
||||||
|
type: 'error',
|
||||||
|
duration: '2000'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//跳转视频学习详情
|
||||||
|
goVideolearning(item) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/Videolearning/Videolearning?trainingItemId=${item.id}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
info() {
|
||||||
|
this.videolist = []
|
||||||
|
this.imgtextlist = []
|
||||||
|
selectNurseAppletPersonTrainingItemList(this.trainingParentId, this
|
||||||
|
.nurseStationPersonId).then(
|
||||||
|
res => {
|
||||||
|
res.data.forEach(e => {
|
||||||
|
if (e.trainingItemType == 'VIDEO_LEARNING') {
|
||||||
|
this.videolist.push(e)
|
||||||
|
} else if (e.trainingItemType == 'GRAPHIC_LEARNING') {
|
||||||
|
this.imgtextlist.push(e)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//主信息
|
||||||
|
infos() {
|
||||||
|
selectNurseAppletPersonTrainingParent(this.trainingParentId, this.nurseStationPersonId).then(res => {
|
||||||
|
if (res.rows[0].trainingItemContent) {
|
||||||
|
res.rows[0].trainingItemContent = res.rows[0].trainingItemContent.replace(/\<img/gi,
|
||||||
|
"<br/> <img class='richPic'")
|
||||||
|
res.rows[0].trainingItemContent = res.rows[0].trainingItemContent.replace(/\<p/gi,
|
||||||
|
"<p class='ptext'")
|
||||||
|
}
|
||||||
|
this.infoslist = res.rows[0]
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//点击tabs
|
||||||
|
tabchange(index) {
|
||||||
|
this.tabcurrent = index;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
@import "./learning.scss";
|
||||||
|
</style>
|
||||||
@ -53,6 +53,8 @@
|
|||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.setStorageSync("nursePersonId", res.data.nursePersonId)
|
uni.setStorageSync("nursePersonId", res.data.nursePersonId)
|
||||||
uni.setStorageSync("phone", res.data.phone)
|
uni.setStorageSync("phone", res.data.phone)
|
||||||
|
uni.setStorageSync("nursePersonName", res.data.nursePersonName)
|
||||||
|
uni.setStorageSync("nurseStationId", res.data.nurseStationId)
|
||||||
that.$refs.uToast.show({
|
that.$refs.uToast.show({
|
||||||
title: '登录成功',
|
title: '登录成功',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
我的收益
|
我的收益
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottomitem" @tap='gostudy'>
|
<view class="bottomitem" @tap='goOrderlist'>
|
||||||
<image src="../../static/xuexi.png" mode=""></image>
|
<image src="../../static/xuexi.png" mode=""></image>
|
||||||
<view class="">
|
<view class="">
|
||||||
我的学习
|
我的学习
|
||||||
@ -149,6 +149,16 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
//我的学习
|
//我的学习
|
||||||
|
goOrderlist() {
|
||||||
|
const nursePersonId = uni.getStorageSync('nursePersonId');
|
||||||
|
if (nursePersonId) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/Orderlist/Orderlist'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.gologin();
|
||||||
|
}
|
||||||
|
},
|
||||||
gostudy() {
|
gostudy() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/study/study'
|
url: '/pages/study/study'
|
||||||
|
|||||||
BIN
static/bofang.png
Normal file
|
After Width: | Height: | Size: 417 B |
BIN
static/dingyuejieshou.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
static/dingyuejujue.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
static/hlxw.png
|
Before Width: | Height: | Size: 134 KiB |
BIN
static/hlydingyue.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
static/logo.png
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 19 KiB |
BIN
static/shipin.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
static/wechat.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |