lessonDetail.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. <template>
  2. <view class="content">
  3. <view class="detail-cont">
  4. <view class="title">全球肾脏新药研究生态驱动创新突破降蛋白瓶颈</view>
  5. <view class="info">
  6. <view class="time">
  7. <u-icon name="clock" color="#fff" size="14"></u-icon>2025-12-30</view>
  8. <view class="reads ">
  9. <u-icon name="eye" color="#fff" size="14"></u-icon>10</view>
  10. </view>
  11. <view class="video">
  12. <video class="myVideo" id="myVideo" src="http://bjzmkytcpv.ylrzcloud.com/course/20251117/1763364883777.m3u8"
  13. @error="videoErrorCallback" controls ></video>
  14. </view>
  15. <!-- 正文 -->
  16. <!-- <view class="full-text" >
  17. <view v-html="item.content"></view>
  18. </view> -->
  19. <view class="tips">
  20. <image class="w48 h48" src="@/static/image/icon_warning.png" mode=""></image>
  21. <view class="text-box">本内容仅代表嘉宾观点,不代表本站立场。仅供医学药学专业人士查看,不构成实际治疗建议。</view>
  22. </view>
  23. <view class="actor x-f">
  24. <image class="w88 h88" src="@/static/image/my_heads_icon64.png" mode=""></image>
  25. <view class="infor y-start">
  26. <view class="name">王小明 主任医师</view>
  27. <view class="position">江南大学附属医院·肾内科</view>
  28. </view>
  29. </view>
  30. <view class="full-text">
  31. <view>
  32. 全球肾脏新药研究生态驱动创新突破降蛋白瓶颈,这里展示摘要。
  33. </view>
  34. </view>
  35. <view class="tag">#转载#肾病</view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. // import {getAdvList} from '@/api/adv.js'
  41. import {getDoctorArticleById} from '@/api/doctorArticle.js'
  42. export default {
  43. data() {
  44. return {
  45. advs:[],
  46. advImgs:[],
  47. src: '',
  48. articleId:null,
  49. item:{},
  50. };
  51. },
  52. onLoad(option) {
  53. this.articleId=option.articleId;
  54. },
  55. onShow() {
  56. //this.getAdvList()
  57. //this.getDoctorArticleById();
  58. },
  59. //发送给朋友
  60. onShareAppMessage(res) {
  61. return {
  62. title: this.item.title,
  63. path: '/pages_index/index/doctorArticleDetails?articleId='+this.articleId,
  64. }
  65. },
  66. //分享到朋友圈
  67. onShareTimeline(res) {
  68. return {
  69. title: this.item.title,
  70. query:'articleId='+this.articleId,//页面参数
  71. }
  72. },
  73. methods:{
  74. handleAdvClick(index){
  75. var ad=this.advs[index];
  76. console.log(ad.advUrl);
  77. if(ad.showType==1){
  78. uni.setStorageSync('url',ad.advUrl);
  79. uni.navigateTo({
  80. url:"h5"
  81. })
  82. }
  83. else if(ad.showType==2){
  84. uni.navigateTo({
  85. url:ad.advUrl
  86. })
  87. }
  88. else if(ad.showType==3){
  89. uni.setStorageSync('content',ad.content);
  90. uni.navigateTo({
  91. url:"content"
  92. })
  93. }
  94. },
  95. getAdvList() {
  96. //联网加载数据
  97. var that = this;
  98. var data = {
  99. advType:10
  100. };
  101. getAdvList(data).then(res => {
  102. if(res.code==200){
  103. that.advImgs=[];
  104. that.advs=[];
  105. res.data.forEach(function(element) {
  106. if(element.imageUrl!=null&&element.imageUrl!=""){
  107. that.advs.push(element);
  108. that.advImgs.push(element.imageUrl);
  109. }
  110. });
  111. }else{
  112. uni.showToast({
  113. icon:'none',
  114. title: "请求失败",
  115. });
  116. }
  117. });
  118. },
  119. videoErrorCallback: function(e) {
  120. uni.showModal({
  121. content: e.target.errMsg,
  122. showCancel: false
  123. })
  124. },
  125. navTo(url){
  126. uni.navigateTo({
  127. url: url
  128. })
  129. },
  130. getDoctorArticleById(){
  131. let data = {articleId:this.articleId};
  132. getDoctorArticleById(data).then(
  133. res => {
  134. if(res.code==200){
  135. this.item=res.data;
  136. }else{
  137. uni.showToast({
  138. icon:'none',
  139. title: "请求失败",
  140. });
  141. }
  142. },
  143. rej => {}
  144. );
  145. },
  146. }
  147. }
  148. </script>
  149. <style lang="scss">
  150. page{
  151. height: 100%;
  152. }
  153. .content{
  154. height: 100%;
  155. display: flex;
  156. flex-direction: column;
  157. background: #000;
  158. }
  159. .detail-cont{
  160. width:100%;
  161. flex: 1;
  162. overflow-y: auto;
  163. // background: #fff;
  164. .title{
  165. padding:0 30upx;
  166. font-family: PingFang SC, PingFang SC;
  167. font-weight: 500;
  168. font-size: 40rpx;
  169. color: #FFFFFF;
  170. line-height: 60rpx;
  171. }
  172. .info{
  173. padding:0 30upx;
  174. display: flex;
  175. align-items: center;
  176. margin-top: 16rpx;
  177. margin-bottom: 32rpx;
  178. .time{
  179. display: flex;
  180. align-items: center;
  181. font-family: PingFang SC, PingFang SC;
  182. font-weight: 400;
  183. font-size: 24rpx;
  184. color: #FFFFFF;
  185. line-height: 44rpx;
  186. .u-icon{
  187. margin-right: 10rpx;
  188. }
  189. }
  190. .reads{
  191. margin-left: 32rpx;
  192. display: flex;
  193. align-items: center;
  194. font-family: PingFang SC, PingFang SC;
  195. font-weight: 400;
  196. font-size: 24rpx;
  197. color: #FFFFFF;
  198. line-height: 44rpx;
  199. .u-icon{
  200. margin-right: 10rpx;
  201. }
  202. }
  203. }
  204. .full-text{
  205. padding:0 30upx;
  206. width: calc(100% - 60rpx);
  207. font-family: PingFang SC, PingFang SC;
  208. font-weight: 400;
  209. font-size: 28rpx;
  210. color: #FFFFFF;
  211. line-height: 44rpx;
  212. }
  213. .tips{
  214. width: calc(100% - 60rpx);
  215. margin-bottom:184rpx;
  216. display: flex;
  217. align-items: center;
  218. padding: 16rpx 24rpx;
  219. margin-top: 40rpx;
  220. background: rgba(255, 255, 255, 0.1);
  221. border-radius: 18rpx 18rpx 18rpx 18rpx;
  222. .text-box{
  223. flex:1;
  224. margin-left: 16rpx;
  225. font-family: PingFang SC, PingFang SC;
  226. font-weight: 400;
  227. font-size: 24rpx;
  228. color: #FFFFFF;
  229. line-height: 40rpx;
  230. }
  231. }
  232. .actor{
  233. padding:0 30upx;
  234. margin-bottom: 32rpx;
  235. .infor{
  236. margin-left: 24rpx;
  237. height: 88rpx;
  238. justify-content: space-around;
  239. .name{
  240. font-family: PingFang SC, PingFang SC;
  241. font-weight: 600;
  242. font-size: 28rpx;
  243. color: #FFFFFF;
  244. line-height: 36rpx;
  245. }
  246. .position{
  247. font-family: PingFang SC, PingFang SC;
  248. font-weight: 400;
  249. font-size: 24rpx;
  250. color: #FFFFFF;
  251. line-height: 32rpx;
  252. }
  253. }
  254. }
  255. .tag{
  256. padding:0 30upx;
  257. font-family: PingFang SC, PingFang SC;
  258. font-weight: 400;
  259. font-size: 24rpx;
  260. color: #FFFFFF;
  261. line-height: 44rpx;
  262. }
  263. .video{
  264. width: 100%;
  265. display: flex;
  266. align-items: center;
  267. justify-content: center;
  268. video{
  269. width: 100%;
  270. }
  271. }
  272. }
  273. .ad{
  274. margin-bottom: 50rpx;
  275. width: 100%;
  276. padding: 15rpx;
  277. background: #FFFFFF;
  278. border-radius: 18rpx 18rpx 18rpx 18rpx;
  279. }
  280. .inquiry{
  281. position: fixed;
  282. right: 22upx;
  283. bottom: 193upx;
  284. z-index: 99;
  285. .content{
  286. display: flex;
  287. align-items: center;
  288. justify-content: center;
  289. flex-direction: column;
  290. image{
  291. box-sizing: border-box;
  292. width: 100upx;
  293. height: 100upx;
  294. border-radius: 50%;
  295. z-index: 9;
  296. border: 2rpx solid #0bb3f2;
  297. }
  298. .text{
  299. margin-top: 15upx;
  300. font-size: 30upx;
  301. font-family: PingFang SC;
  302. font-weight: bold;
  303. color: #0bb3f2;
  304. }
  305. }
  306. }
  307. </style>