Compare commits

...

10 Commits

Author SHA1 Message Date
65266fe485 xg 2023-11-28 09:50:07 +08:00
曹辉
af71bf7929 修改 2023-05-08 09:28:19 +08:00
root
b43b279dac 护理新闻更换接口 2023-05-06 17:24:13 +08:00
曹辉
608b6c524a 修改 2023-05-06 10:22:44 +08:00
曹辉
223f3fc93c 修改 2023-05-05 16:21:01 +08:00
曹辉
f76026a922 修改 2023-05-05 16:20:55 +08:00
曹辉
1e6418dd6c 修改 2023-05-05 15:46:11 +08:00
曹辉
f12372cbb2 修改 2023-05-05 14:47:47 +08:00
曹辉
ea4ae6d7ff 修改 2023-05-05 08:29:03 +08:00
曹辉
130bd124e1 修改 2023-05-04 17:21:16 +08:00
15 changed files with 647 additions and 95 deletions

View File

@ -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'
})
}

View File

@ -34,12 +34,21 @@
"navigationBarTitleText": "我的学习", "navigationBarTitleText": "我的学习",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { },
"path": "pages/Healthknowledge/Healthknowledge", {
"path": "pages/Healthitem/Healthitem",
"style": { "style": {
"navigationBarTitleText": "护理新闻", "navigationBarTitleText": "护理新闻",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},
{
"path": "pages/Healthknowledge/Healthknowledge",
"style": {
"navigationBarTitleText": "护理新闻",
"onReachBottomDistance": 50, // px
"enablePullDownRefresh": true //true
}
}, { }, {
"path": "pages/confirmCompletion/confirmCompletion", "path": "pages/confirmCompletion/confirmCompletion",
"style": { "style": {

View 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>

View File

@ -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>
<view class="author"> 生活小窍门,是指人们在日常生活中总结出来的知识和经验,和生活小常识非常相似</view> <view class="noorder" v-else>
<image src="../../static/hlxw.png" mode=""></image>
</view>
</view>
</view>
<!-- <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);

View File

@ -23,10 +23,12 @@
info() { info() {
selectNurseAppletPersonTrainingItemDetailsList(this.trainingItemId, this.nurseStationPersonId).then( selectNurseAppletPersonTrainingItemDetailsList(this.trainingItemId, this.nurseStationPersonId).then(
res => { res => {
if (res.data.trainingItemContent) {
res.data.trainingItemContent = res.data.trainingItemContent.replace(/\<img/gi, res.data.trainingItemContent = res.data.trainingItemContent.replace(/\<img/gi,
"<br/> <img class='richPic'") "<br/> <img class='richPic'")
res.data.trainingItemContent = res.data.trainingItemContent.replace(/\<p/gi, res.data.trainingItemContent = res.data.trainingItemContent.replace(/\<p/gi,
"<p class='ptext'") "<p class='ptext'")
}
this.list = res.data this.list = res.data
}) })
}, },

View File

@ -4,16 +4,13 @@
<view class="item" v-for='(item,index) in list' :key="index" @click.stop='gographicvideo(item)'> <view class="item" v-for='(item,index) in list' :key="index" @click.stop='gographicvideo(item)'>
<image :src="baseurl + item.trainingItemCoverUrl" mode=""></image> <image :src="baseurl + item.trainingItemCoverUrl" mode=""></image>
<view class="title"> <view class="title">
{{item.trainingItemTitle}} {{item.trainingItemTitle?item.trainingItemTitle:''}}
</view> </view>
<view class="text"> <view class="text">
{{item.trainingItemDetails}} {{item.trainingItemDetails?item.trainingItemDetails:''}}
</view> </view>
<view class="price" v-if="item.trainingItemPrice"> <view class="price">
{{item.trainingItemPrice}} {{item.trainingItemPrice?item.trainingItemPrice:0}}
</view>
<view class="price" v-else>
0
</view> </view>
</view> </view>
</view> </view>
@ -66,9 +63,15 @@
}, },
// //
gographicvideo(item) { gographicvideo(item) {
if (item.trainingItemType == 'VIDEO_LEARNING') {
uni.navigateTo({
url: `/pages/Videolearning/Videolearning?trainingItemId=${item.id}&&trainingItemType=${item.trainingItemType}`
})
} else {
uni.navigateTo({ uni.navigateTo({
url: `/pages/learning/learning?trainingParentId=${item.id}` url: `/pages/learning/learning?trainingParentId=${item.id}`
}) })
}
}, },
}, },
onReachBottom() { // onReachBottom() { //

View File

@ -66,9 +66,15 @@
}, },
// //
goOrderlearning(item) { 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({ uni.navigateTo({
url: `/pages/Orderlearning/Orderlearning?trainingOrderStatus=${item.trainingOrderStatus}&trainingParentId=${item.trainingItemId}&trainingOrderNo=${item.trainingOrderNo}` url: `/pages/Orderlearning/Orderlearning?trainingOrderStatus=${item.trainingOrderStatus}&trainingParentId=${item.trainingItemId}&trainingOrderNo=${item.trainingOrderNo}`
}) })
}
}, },
// //
info() { info() {

View File

@ -4,7 +4,90 @@
margin: 15rpx auto; margin: 15rpx auto;
color: #666666; color: #666666;
background-color: #fff; 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 { .directory {
padding-bottom: 420rpx; padding-bottom: 420rpx;

View File

@ -22,7 +22,7 @@
<view class="Introduce"> <view class="Introduce">
{{item.itemDirectoryIntroduce?item.itemDirectoryIntroduce:''}} {{item.itemDirectoryIntroduce?item.itemDirectoryIntroduce:''}}
</view> </view>
<view class="" v-if="trainingOrderStatus=='PAY'"> <view class="" v-if="list.trainingOrderStatus=='PAY'">
<view class="play" @tap='videoplay(item)' <view class="play" @tap='videoplay(item)'
:style="item.itemDirectoryWatchStatus=='NOT_WATCHED'?'background-color: #3D7DCA;color:#fff':''" :style="item.itemDirectoryWatchStatus=='NOT_WATCHED'?'background-color: #3D7DCA;color:#fff':''"
v-if="item.itemDirectoryWatchStatus=='NOT_WATCHED'&&!item.videoshow"> v-if="item.itemDirectoryWatchStatus=='NOT_WATCHED'&&!item.videoshow">
@ -74,6 +74,26 @@
@play='videoplays'></video> @play='videoplays'></video>
</u-popup> --> </u-popup> -->
<u-toast ref="uToast" /> <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>
<view class="" v-else style="padding-top: 100rpx;"> <view class="" v-else style="padding-top: 100rpx;">
<u-empty text="暂无内容" mode="list" icon-size='240' font-size='32'></u-empty> <u-empty text="暂无内容" mode="list" icon-size='240' font-size='32'></u-empty>
@ -86,6 +106,10 @@
insertTrainingItemWatchRecord, insertTrainingItemWatchRecord,
getTrainingItemWatchRecord getTrainingItemWatchRecord
} from '@/api/Ordervideolearning/index.js' } from '@/api/Ordervideolearning/index.js'
import {
trainingItemOrder,
appletTrainingOrderPay
} from '@/api/learning/index.js'
export default { export default {
data() { data() {
return { return {
@ -104,19 +128,23 @@
videoitem: { videoitem: {
watchTime: 0, watchTime: 0,
}, // }, //
trainingOrderStatus: undefined, // trainingOrderStatus: undefined,
trainingOrderDetailsId: undefined, trainingOrderDetailsId: undefined,
videoerroshow: true, videoerroshow: true,
videoContext: undefined, videoContext: undefined,
bottombuyshow: false, //divcss
buyshow: false, //
}; };
}, },
onUnload() { onUnload() {
if (this.videoitem.itemDirectoryCode) {
if (this.videoerroshow) { if (this.videoerroshow) {
if (this.videoitem.watchTime) { if (this.videoitem.watchTime) {
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime) this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
} }
insertTrainingItemWatchRecord(this.videoitem).then(res => {}) insertTrainingItemWatchRecord(this.videoitem).then(res => {})
} }
}
}, },
onLaunch() { onLaunch() {
// //
@ -139,6 +167,100 @@
// }); // });
// }, // },
methods: { 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) { videoended(e) {
this.videoContext.stop() this.videoContext.stop()
@ -325,7 +447,7 @@
watchTime: 0 watchTime: 0
} }
this.baseurl = baseurl this.baseurl = baseurl
this.trainingOrderStatus = options.trainingOrderStatus // this.trainingOrderStatus = options.trainingOrderStatus
this.trainingItemId = options.trainingItemId this.trainingItemId = options.trainingItemId
this.trainingOrderNo = options.trainingOrderNo this.trainingOrderNo = options.trainingOrderNo
this.trainingOrderDetailsId = options.trainingOrderDetailsId this.trainingOrderDetailsId = options.trainingOrderDetailsId
@ -334,6 +456,9 @@
if (value) { if (value) {
that.nurseStationPersonId = value that.nurseStationPersonId = value
} else {} } else {}
if (options.trainingItemType) {
this.bottombuyshow = true
}
}, },
} }
</script> </script>

View File

@ -4,7 +4,90 @@
margin: 15rpx auto; margin: 15rpx auto;
color: #666666; color: #666666;
background-color: #fff; 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 { .directory {
padding-bottom: 420rpx; padding-bottom: 420rpx;

View File

@ -71,6 +71,26 @@
<!-- <u-popup v-model="videoshow" mode="center" closeable @close='videoshowfalse'> <!-- <u-popup v-model="videoshow" mode="center" closeable @close='videoshowfalse'>
</u-popup> --> </u-popup> -->
<u-toast ref="uToast" /> <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>
<view class="" v-else style="padding-top: 100rpx;"> <view class="" v-else style="padding-top: 100rpx;">
<u-empty text="暂无内容" mode="list" icon-size='240' font-size='32'></u-empty> <u-empty text="暂无内容" mode="list" icon-size='240' font-size='32'></u-empty>
@ -83,6 +103,10 @@
insertTrainingItemWatchRecord, insertTrainingItemWatchRecord,
getTrainingItemWatchRecord getTrainingItemWatchRecord
} from '@/api/Videolearning/index.js' } from '@/api/Videolearning/index.js'
import {
trainingItemOrder,
appletTrainingOrderPay
} from '@/api/learning/index.js'
export default { export default {
data() { data() {
return { return {
@ -102,15 +126,19 @@
}, // }, //
videoContext: null, videoContext: null,
videoerroshow: true, videoerroshow: true,
bottombuyshow: false, //divcss
buyshow: false, //
}; };
}, },
onUnload() { onUnload() {
if (this.videoitem.itemDirectoryCode) {
if (this.videoerroshow) { if (this.videoerroshow) {
if (this.videoitem.watchTime) { if (this.videoitem.watchTime) {
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime) this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
} }
insertTrainingItemWatchRecord(this.videoitem).then(res => {}) insertTrainingItemWatchRecord(this.videoitem).then(res => {})
} }
}
}, },
// onHide() { // onHide() {
// var that = this // var that = this
@ -133,6 +161,100 @@
plus.screen.lockOrientation("portrait-primary"); plus.screen.lockOrientation("portrait-primary");
}, },
methods: { 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) { videoended(e) {
this.videoContext.stop() this.videoContext.stop()
@ -322,6 +444,9 @@
that.nurseStationPersonId = value that.nurseStationPersonId = value
that.info(); that.info();
} else {} } else {}
if (options.trainingItemType) {
this.bottombuyshow = true
}
}, },
} }
</script> </script>

View File

@ -53,14 +53,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>
@ -70,7 +67,8 @@
<script> <script>
import { import {
selectOrderByNursePersonCount selectOrderByNursePersonCount,
selectNurseNews
} from '@/api/homepage/index.js' } from '@/api/homepage/index.js'
import { import {
mapActions mapActions
@ -83,9 +81,11 @@
nurserStationPersonId: null, //id nurserStationPersonId: null, //id
selectOrderByNursePersonCountlist: {}, // selectOrderByNursePersonCountlist: {}, //
personRoleLoginFlag: 'notRoleName', // personRoleLoginFlag: 'notRoleName', //
NurseNewslist: [],
}; };
}, },
onShow() { onShow() {
this.selectNurseNewsinfo();
this.personRoleLoginFlag = "notRoleName" this.personRoleLoginFlag = "notRoleName"
this.selectOrderByNursePersonCountlist = {} this.selectOrderByNursePersonCountlist = {}
this.beijingurl = baseurl + '/profile/nursePersonAppletPicture/person_center.png' this.beijingurl = baseurl + '/profile/nursePersonAppletPicture/person_center.png'
@ -139,6 +139,23 @@
url: '/pages/Learningtraining/Learningtraining' 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>
@ -169,42 +186,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; //
} }
} }
} }

View File

@ -192,6 +192,10 @@
}) })
} }
}) })
} else {
that.buyshow = false
that.infos();
that.info();
} }
} else { } else {
this.buyshow = false this.buyshow = false
@ -253,10 +257,12 @@
// //
infos() { infos() {
selectNurseAppletPersonTrainingParent(this.trainingParentId, this.nurseStationPersonId).then(res => { selectNurseAppletPersonTrainingParent(this.trainingParentId, this.nurseStationPersonId).then(res => {
if (res.rows[0].trainingItemContent) {
res.rows[0].trainingItemContent = res.rows[0].trainingItemContent.replace(/\<img/gi, res.rows[0].trainingItemContent = res.rows[0].trainingItemContent.replace(/\<img/gi,
"<br/> <img class='richPic'") "<br/> <img class='richPic'")
res.rows[0].trainingItemContent = res.rows[0].trainingItemContent.replace(/\<p/gi, res.rows[0].trainingItemContent = res.rows[0].trainingItemContent.replace(/\<p/gi,
"<p class='ptext'") "<p class='ptext'")
}
this.infoslist = res.rows[0] this.infoslist = res.rows[0]
}) })
}, },

View File

@ -42,8 +42,8 @@
<span v-if="list.patientName">{{list.patientName}}</span> <span v-if="list.patientName">{{list.patientName}}</span>
</view> </view>
<view class="item"> <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>
<view class="item"> <view class="item">
电话 电话

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB