Compare commits
10 Commits
0e83c4b46b
...
65266fe485
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65266fe485 | ||
|
|
af71bf7929 | ||
|
|
b43b279dac | ||
|
|
608b6c524a | ||
|
|
223f3fc93c | ||
|
|
f76026a922 | ||
|
|
1e6418dd6c | ||
|
|
f12372cbb2 | ||
|
|
ea4ae6d7ff | ||
|
|
130bd124e1 |
@ -7,3 +7,12 @@ export function selectOrderByNursePersonCount(nurseStationPersonId) {
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//护理新闻
|
||||
export function selectNurseNews(pageNum, pageSize) {
|
||||
return request({
|
||||
url: `/nurseApplet/nearbyNursingStation/getHeathHousingList?pageNum=${pageNum}&pageSize=${pageSize}&informationCategoryType=${'NURSING_NEWS'}`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
13
pages.json
13
pages.json
@ -34,12 +34,21 @@
|
||||
"navigationBarTitleText": "我的学习",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}, {
|
||||
"path": "pages/Healthknowledge/Healthknowledge",
|
||||
},
|
||||
{
|
||||
"path": "pages/Healthitem/Healthitem",
|
||||
"style": {
|
||||
"navigationBarTitleText": "护理新闻",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/Healthknowledge/Healthknowledge",
|
||||
"style": {
|
||||
"navigationBarTitleText": "护理新闻",
|
||||
"onReachBottomDistance": 50, //距离底部多远时触发 单位为px
|
||||
"enablePullDownRefresh": true //设置参数为true
|
||||
}
|
||||
}, {
|
||||
"path": "pages/confirmCompletion/confirmCompletion",
|
||||
"style": {
|
||||
|
||||
101
pages/Healthitem/Healthitem.vue
Normal file
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>
|
||||
<view class="app">
|
||||
<!-- <u-tabs :list="tabList" :current="tabcurrent" @change="change"></u-tabs>
|
||||
<view class="Healthknowledge" v-if="informationCategoryVOList">
|
||||
<u-tabs :list="tabList" :current="tabcurrent" @change="change"></u-tabs>
|
||||
<view class="Healthknowledge" v-if="NurseNewslist">
|
||||
<view class="list">
|
||||
<view class="item" v-for="(item,index) in informationCategoryVOList" :key="index"
|
||||
@tap='gohealthitem(item)'>
|
||||
<view class="item" v-for="(item,index) in NurseNewslist" :key="index" @tap='gohealthitem(item)'>
|
||||
<view class="text">
|
||||
{{item.informationTitle}}
|
||||
</view>
|
||||
@ -12,26 +11,18 @@
|
||||
<image :src="item.leadThumbnailUrl" mode=""></image>
|
||||
</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 class="noorder" v-else>
|
||||
<view class="noorder" v-else>
|
||||
<u-empty mode="data" icon-size='220' text='暂无内容'></u-empty>
|
||||
</view> -->
|
||||
</view>
|
||||
<u-back-top :scroll-top="scrollTop"></u-back-top>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
selectNurseNews
|
||||
} from '@/api/homepage/index.js'
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
export default {
|
||||
data() {
|
||||
@ -42,15 +33,13 @@
|
||||
}],
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
informationCategoryVOList: null,
|
||||
total: 0,
|
||||
scrollTop: 0,
|
||||
NurseNewslist: null,
|
||||
};
|
||||
},
|
||||
onShow() {},
|
||||
onLoad() {
|
||||
// this.pageNum = 1
|
||||
// this.getHeathHousing();
|
||||
this.selectNurseNewsinfo();
|
||||
},
|
||||
methods: {
|
||||
//跳转item
|
||||
@ -59,13 +48,13 @@
|
||||
url: `/pages/Healthitem/Healthitem?item=${encodeURIComponent(JSON.stringify(item))}`
|
||||
})
|
||||
},
|
||||
getHeathHousing() {
|
||||
getHeathHousingList(this.pageNum, this.pageSize).then(res => {
|
||||
selectNurseNewsinfo() {
|
||||
selectNurseNews(this.pageNum, this.pageSize).then(res => {
|
||||
if (res.rows.length > 0) {
|
||||
res.rows.forEach(e => {
|
||||
e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
|
||||
})
|
||||
this.informationCategoryVOList = res.rows
|
||||
this.NurseNewslist = res.rows
|
||||
}
|
||||
this.total = res.total
|
||||
})
|
||||
@ -76,13 +65,13 @@
|
||||
this.scrollTop = e.scrollTop;
|
||||
},
|
||||
onReachBottom() { //下滑加载
|
||||
if (this.informationCategoryVOList.length >= this.total) {} else {
|
||||
if (this.NurseNewslist.length >= this.total) {} else {
|
||||
this.pageNum++
|
||||
getHeathHousingList(this.pageNum, this.pageSize).then(res => {
|
||||
selectNurseNews(this.pageNum, this.pageSize).then(res => {
|
||||
if (res.rows) {
|
||||
res.rows.forEach(e => {
|
||||
e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
|
||||
this.informationCategoryVOList.push(e)
|
||||
this.NurseNewslist.push(e)
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -90,7 +79,7 @@
|
||||
},
|
||||
onPullDownRefresh() { //下拉刷新
|
||||
this.pageNum = 1;
|
||||
this.getHeathHousing();
|
||||
this.selectNurseNewsinfo();
|
||||
setTimeout(function() {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 1000);
|
||||
|
||||
@ -23,10 +23,12 @@
|
||||
info() {
|
||||
selectNurseAppletPersonTrainingItemDetailsList(this.trainingItemId, this.nurseStationPersonId).then(
|
||||
res => {
|
||||
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'")
|
||||
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
|
||||
})
|
||||
},
|
||||
|
||||
@ -4,16 +4,13 @@
|
||||
<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?item.trainingItemTitle:''}}
|
||||
</view>
|
||||
<view class="text">
|
||||
{{item.trainingItemDetails}}
|
||||
{{item.trainingItemDetails?item.trainingItemDetails:''}}
|
||||
</view>
|
||||
<view class="price" v-if="item.trainingItemPrice">
|
||||
¥{{item.trainingItemPrice}}
|
||||
</view>
|
||||
<view class="price" v-else>
|
||||
¥0
|
||||
<view class="price">
|
||||
¥{{item.trainingItemPrice?item.trainingItemPrice:0}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -66,9 +63,15 @@
|
||||
},
|
||||
//跳转图文或者视频学习
|
||||
gographicvideo(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/learning/learning?trainingParentId=${item.id}`
|
||||
})
|
||||
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() { //下滑加载
|
||||
|
||||
@ -66,9 +66,15 @@
|
||||
},
|
||||
//我的学习
|
||||
goOrderlearning(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/Orderlearning/Orderlearning?trainingOrderStatus=${item.trainingOrderStatus}&trainingParentId=${item.trainingItemId}&trainingOrderNo=${item.trainingOrderNo}`
|
||||
})
|
||||
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() {
|
||||
|
||||
@ -4,7 +4,90 @@
|
||||
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;
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<view class="Introduce">
|
||||
{{item.itemDirectoryIntroduce?item.itemDirectoryIntroduce:''}}
|
||||
</view>
|
||||
<view class="" v-if="trainingOrderStatus=='PAY'">
|
||||
<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">
|
||||
@ -74,6 +74,26 @@
|
||||
@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>
|
||||
@ -86,6 +106,10 @@
|
||||
insertTrainingItemWatchRecord,
|
||||
getTrainingItemWatchRecord
|
||||
} from '@/api/Ordervideolearning/index.js'
|
||||
import {
|
||||
trainingItemOrder,
|
||||
appletTrainingOrderPay
|
||||
} from '@/api/learning/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -104,18 +128,22 @@
|
||||
videoitem: {
|
||||
watchTime: 0,
|
||||
}, //视频对象
|
||||
trainingOrderStatus: undefined,
|
||||
// trainingOrderStatus: undefined,
|
||||
trainingOrderDetailsId: undefined,
|
||||
videoerroshow: true,
|
||||
videoContext: undefined,
|
||||
bottombuyshow: false, //下面的购买divcss
|
||||
buyshow: false, //购买弹框
|
||||
};
|
||||
},
|
||||
onUnload() {
|
||||
if (this.videoerroshow) {
|
||||
if (this.videoitem.watchTime) {
|
||||
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
|
||||
if (this.videoitem.itemDirectoryCode) {
|
||||
if (this.videoerroshow) {
|
||||
if (this.videoitem.watchTime) {
|
||||
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
|
||||
}
|
||||
insertTrainingItemWatchRecord(this.videoitem).then(res => {})
|
||||
}
|
||||
insertTrainingItemWatchRecord(this.videoitem).then(res => {})
|
||||
}
|
||||
},
|
||||
onLaunch() {
|
||||
@ -139,6 +167,100 @@
|
||||
// });
|
||||
// },
|
||||
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) {
|
||||
uni.requestPayment({
|
||||
timeStamp: response.data.timeStamp,
|
||||
nonceStr: response.data.nonceStr,
|
||||
package: response.data.prepayId,
|
||||
signType: response.data.signType,
|
||||
paySign: response.data.paySign,
|
||||
success: function(res) {
|
||||
that.buyshow = false
|
||||
that.bottombuyshow = false
|
||||
that.info();
|
||||
that.$refs.uToast.show({
|
||||
title: '支付成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
that.$refs.uToast.show({
|
||||
title: '取消支付',
|
||||
type: 'error',
|
||||
duration: 1500,
|
||||
url: `/pages/Orderdetails/Orderdetails?trainingOrderNo=${res.data.trainingOrderNo}`
|
||||
})
|
||||
that.buyshow = false
|
||||
}
|
||||
});
|
||||
} 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()
|
||||
@ -325,7 +447,7 @@
|
||||
watchTime: 0
|
||||
}
|
||||
this.baseurl = baseurl
|
||||
this.trainingOrderStatus = options.trainingOrderStatus
|
||||
// this.trainingOrderStatus = options.trainingOrderStatus
|
||||
this.trainingItemId = options.trainingItemId
|
||||
this.trainingOrderNo = options.trainingOrderNo
|
||||
this.trainingOrderDetailsId = options.trainingOrderDetailsId
|
||||
@ -334,6 +456,9 @@
|
||||
if (value) {
|
||||
that.nurseStationPersonId = value
|
||||
} else {}
|
||||
if (options.trainingItemType) {
|
||||
this.bottombuyshow = true
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -4,7 +4,90 @@
|
||||
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;
|
||||
|
||||
|
||||
@ -71,6 +71,26 @@
|
||||
<!-- <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>
|
||||
@ -83,6 +103,10 @@
|
||||
insertTrainingItemWatchRecord,
|
||||
getTrainingItemWatchRecord
|
||||
} from '@/api/Videolearning/index.js'
|
||||
import {
|
||||
trainingItemOrder,
|
||||
appletTrainingOrderPay
|
||||
} from '@/api/learning/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -102,14 +126,18 @@
|
||||
}, //视频对象
|
||||
videoContext: null,
|
||||
videoerroshow: true,
|
||||
bottombuyshow: false, //下面的购买divcss
|
||||
buyshow: false, //购买弹框
|
||||
};
|
||||
},
|
||||
onUnload() {
|
||||
if (this.videoerroshow) {
|
||||
if (this.videoitem.watchTime) {
|
||||
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
|
||||
if (this.videoitem.itemDirectoryCode) {
|
||||
if (this.videoerroshow) {
|
||||
if (this.videoitem.watchTime) {
|
||||
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
|
||||
}
|
||||
insertTrainingItemWatchRecord(this.videoitem).then(res => {})
|
||||
}
|
||||
insertTrainingItemWatchRecord(this.videoitem).then(res => {})
|
||||
}
|
||||
},
|
||||
// onHide() {
|
||||
@ -133,6 +161,100 @@
|
||||
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) {
|
||||
uni.requestPayment({
|
||||
timeStamp: response.data.timeStamp,
|
||||
nonceStr: response.data.nonceStr,
|
||||
package: response.data.prepayId,
|
||||
signType: response.data.signType,
|
||||
paySign: response.data.paySign,
|
||||
success: function(res) {
|
||||
that.buyshow = false
|
||||
that.bottombuyshow = false
|
||||
that.info();
|
||||
that.$refs.uToast.show({
|
||||
title: '支付成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
that.$refs.uToast.show({
|
||||
title: '取消支付',
|
||||
type: 'error',
|
||||
duration: 1500,
|
||||
url: `/pages/Orderdetails/Orderdetails?trainingOrderNo=${res.data.trainingOrderNo}`
|
||||
})
|
||||
that.buyshow = false
|
||||
}
|
||||
});
|
||||
} 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()
|
||||
@ -322,6 +444,9 @@
|
||||
that.nurseStationPersonId = value
|
||||
that.info();
|
||||
} else {}
|
||||
if (options.trainingItemType) {
|
||||
this.bottombuyshow = true
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -53,14 +53,11 @@
|
||||
查看更多
|
||||
<u-icon name="arrow-right" color='#969494'></u-icon>
|
||||
</view>
|
||||
<view class="items" @tap='goHealthknowledge'>
|
||||
<view class="item">
|
||||
<image src="../../static/hlxw.png" mode=""></image>
|
||||
<view class="items">
|
||||
<view class="item" v-for='(item,index) in NurseNewslist' @tap='goHealthitem(item)'>
|
||||
<image :src="item.leadThumbnailUrl" mode=""></image>
|
||||
<view class="toptext">
|
||||
护理 I 致力于打造专业护理人才
|
||||
</view>
|
||||
<view class="centertext">
|
||||
生活小窍门,是指人们在日常生活中总结出来的知识和经验,和生活小常识非常相似
|
||||
{{item.informationTitle}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -70,7 +67,8 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
selectOrderByNursePersonCount
|
||||
selectOrderByNursePersonCount,
|
||||
selectNurseNews
|
||||
} from '@/api/homepage/index.js'
|
||||
import {
|
||||
mapActions
|
||||
@ -83,9 +81,11 @@
|
||||
nurserStationPersonId: null, //护理员id
|
||||
selectOrderByNursePersonCountlist: {}, //项目数量对象
|
||||
personRoleLoginFlag: 'notRoleName', //身份认证
|
||||
NurseNewslist: [],
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.selectNurseNewsinfo();
|
||||
this.personRoleLoginFlag = "notRoleName"
|
||||
this.selectOrderByNursePersonCountlist = {}
|
||||
this.beijingurl = baseurl + '/profile/nursePersonAppletPicture/person_center.png'
|
||||
@ -139,6 +139,23 @@
|
||||
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>
|
||||
@ -169,42 +186,36 @@
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
height: 150rpx;
|
||||
height: 170rpx;
|
||||
width: 100%;
|
||||
color: #666666;
|
||||
padding: 0 0 20rpx;
|
||||
margin: 20rpx 0;
|
||||
border-bottom: 1rpx solid #cdc9c9;
|
||||
|
||||
image {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 130rpx;
|
||||
height: 130rpx;
|
||||
}
|
||||
|
||||
.centertext {
|
||||
font-size: 22rpx;
|
||||
position: absolute;
|
||||
top: 60rpx;
|
||||
left: 150rpx;
|
||||
overflow: hidden; //超出的文本隐藏
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2; // 超出多少行
|
||||
-webkit-box-orient: vertical;
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
}
|
||||
|
||||
.toptext {
|
||||
font-size: 30rpx;
|
||||
line-height: 30rpx;
|
||||
font-size: 26rpx;
|
||||
position: absolute;
|
||||
top: 5rpx;
|
||||
left: 150rpx;
|
||||
width: 75%;
|
||||
overflow: hidden; //超出的文本隐藏
|
||||
left: 170rpx;
|
||||
width: 70%;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1; // 超出多少行
|
||||
-webkit-line-clamp: 5; //行数需设置
|
||||
line-clamp: 5;
|
||||
-webkit-box-orient: vertical;
|
||||
// overflow: hidden; //超出的文本隐藏
|
||||
// text-overflow: ellipsis; //溢出用省略号显示
|
||||
// white-space: nowrap; // 默认不换行;
|
||||
text-align: justify;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -192,6 +192,10 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
that.buyshow = false
|
||||
that.infos();
|
||||
that.info();
|
||||
}
|
||||
} else {
|
||||
this.buyshow = false
|
||||
@ -253,10 +257,12 @@
|
||||
//主信息
|
||||
infos() {
|
||||
selectNurseAppletPersonTrainingParent(this.trainingParentId, this.nurseStationPersonId).then(res => {
|
||||
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'")
|
||||
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]
|
||||
})
|
||||
},
|
||||
|
||||
@ -42,8 +42,8 @@
|
||||
<span v-if="list.patientName">{{list.patientName}}</span>
|
||||
</view>
|
||||
<view class="item">
|
||||
年龄:{{list.age}}
|
||||
<span v-if="list.age>=0">{{list.age}}</span>
|
||||
年龄:
|
||||
<span v-if="list.age&&list.age>=0">{{list.age}}</span>
|
||||
</view>
|
||||
<view class="item">
|
||||
电话:
|
||||
@ -188,4 +188,4 @@
|
||||
|
||||
<style lang="scss">
|
||||
@import './taskDetails.scss';
|
||||
</style>
|
||||
</style>
|
||||
BIN
static/hlxw.png
BIN
static/hlxw.png
Binary file not shown.
|
Before Width: | Height: | Size: 134 KiB |
Loading…
Reference in New Issue
Block a user