lessonDetail.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <template>
  2. <view class="content">
  3. <view class="detail-cont">
  4. <view class="title">{{item.title||'-'}}</view>
  5. <view class="info">
  6. <view class="time">
  7. <u-icon name="clock" color="#fff" size="14"></u-icon>{{item.createTime}}</view>
  8. <view class="reads ">
  9. <u-icon name="eye" color="#fff" size="14"></u-icon>{{item.viewCount ||0}}</view>
  10. </view>
  11. <view class="video">
  12. <video class="myVideo" id="myVideo" :src="item.videoUrl"
  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="https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/images/my_heads_icon64.png" mode=""></image>
  25. <view class="infor y-start">
  26. <view class="name">{{item.doctorName+'-'+item.jobTitle}}</view>
  27. <view class="position">{{item.institution||'-'}}·{{item.department||'-'}}</view>
  28. </view>
  29. </view>
  30. <view class="full-text">
  31. <view>
  32. {{item.summary||'-'}}
  33. </view>
  34. </view>
  35. <!-- <view class="tag">#转载#肾病</view> -->
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. import {getClassroomDetail} from '@/api/index.js'
  41. export default {
  42. data() {
  43. return {
  44. advs:[],
  45. advImgs:[],
  46. src: '',
  47. groupId:null,
  48. item:{},
  49. type:''
  50. };
  51. },
  52. onLoad(option) {
  53. this.groupId=option.groupId;
  54. },
  55. onShow() {
  56. this.getClassroomDetail()
  57. //this.getDoctorArticleById();
  58. },
  59. //发送给朋友
  60. onShareAppMessage(res) {
  61. return {
  62. title: this.item.title,
  63. path: '/pages_live/lessonDetail?groupId='+this.groupId,
  64. }
  65. },
  66. methods:{
  67. handleAdvClick(index){
  68. var ad=this.advs[index];
  69. console.log(ad.advUrl);
  70. if(ad.showType==1){
  71. uni.setStorageSync('url',ad.advUrl);
  72. uni.navigateTo({
  73. url:"h5"
  74. })
  75. }
  76. else if(ad.showType==2){
  77. uni.navigateTo({
  78. url:ad.advUrl
  79. })
  80. }
  81. else if(ad.showType==3){
  82. uni.setStorageSync('content',ad.content);
  83. uni.navigateTo({
  84. url:"content"
  85. })
  86. }
  87. },
  88. videoErrorCallback: function(e) {
  89. uni.showModal({
  90. content: e.target.errMsg,
  91. showCancel: false
  92. })
  93. },
  94. navTo(url){
  95. uni.navigateTo({
  96. url: url
  97. })
  98. },
  99. getClassroomDetail(){
  100. getClassroomDetail(this.groupId).then(
  101. res => {
  102. if(res.code==200){
  103. this.item=res.data;
  104. }else{
  105. uni.showToast({
  106. icon:'none',
  107. title: "请求失败",
  108. });
  109. }
  110. },
  111. rej => {}
  112. );
  113. },
  114. }
  115. }
  116. </script>
  117. <style lang="scss">
  118. page{
  119. height: 100%;
  120. }
  121. .content{
  122. height: 100%;
  123. display: flex;
  124. flex-direction: column;
  125. background: #000;
  126. }
  127. .detail-cont{
  128. width:100%;
  129. flex: 1;
  130. overflow-y: auto;
  131. // background: #fff;
  132. .title{
  133. padding:0 30upx;
  134. font-family: PingFang SC, PingFang SC;
  135. font-weight: 500;
  136. font-size: 40rpx;
  137. color: #FFFFFF;
  138. line-height: 60rpx;
  139. }
  140. .info{
  141. padding:0 30upx;
  142. display: flex;
  143. align-items: center;
  144. margin-top: 16rpx;
  145. margin-bottom: 32rpx;
  146. .time{
  147. display: flex;
  148. align-items: center;
  149. font-family: PingFang SC, PingFang SC;
  150. font-weight: 400;
  151. font-size: 24rpx;
  152. color: #FFFFFF;
  153. line-height: 44rpx;
  154. .u-icon{
  155. margin-right: 10rpx;
  156. }
  157. }
  158. .reads{
  159. margin-left: 32rpx;
  160. display: flex;
  161. align-items: center;
  162. font-family: PingFang SC, PingFang SC;
  163. font-weight: 400;
  164. font-size: 24rpx;
  165. color: #FFFFFF;
  166. line-height: 44rpx;
  167. .u-icon{
  168. margin-right: 10rpx;
  169. }
  170. }
  171. }
  172. .full-text{
  173. padding:0 30upx;
  174. width: calc(100% - 60rpx);
  175. font-family: PingFang SC, PingFang SC;
  176. font-weight: 400;
  177. font-size: 28rpx;
  178. color: #FFFFFF;
  179. line-height: 44rpx;
  180. }
  181. .tips{
  182. // width: calc(100% - 60rpx);
  183. margin-bottom:184rpx;
  184. display: flex;
  185. align-items: center;
  186. padding: 16rpx 24rpx;
  187. margin-top: 40rpx;
  188. margin-left: 24rpx;
  189. margin-right: 24rpx;
  190. background: rgba(255, 255, 255, 0.1);
  191. border-radius: 18rpx 18rpx 18rpx 18rpx;
  192. .text-box{
  193. flex:1;
  194. margin-left: 16rpx;
  195. font-family: PingFang SC, PingFang SC;
  196. font-weight: 400;
  197. font-size: 24rpx;
  198. color: #FFFFFF;
  199. line-height: 40rpx;
  200. }
  201. }
  202. .actor{
  203. padding:0 30upx;
  204. margin-bottom: 32rpx;
  205. .infor{
  206. margin-left: 24rpx;
  207. height: 88rpx;
  208. justify-content: space-around;
  209. .name{
  210. font-family: PingFang SC, PingFang SC;
  211. font-weight: 600;
  212. font-size: 28rpx;
  213. color: #FFFFFF;
  214. line-height: 36rpx;
  215. }
  216. .position{
  217. font-family: PingFang SC, PingFang SC;
  218. font-weight: 400;
  219. font-size: 24rpx;
  220. color: #FFFFFF;
  221. line-height: 32rpx;
  222. }
  223. }
  224. }
  225. .tag{
  226. padding:0 30upx;
  227. font-family: PingFang SC, PingFang SC;
  228. font-weight: 400;
  229. font-size: 24rpx;
  230. color: #FFFFFF;
  231. line-height: 44rpx;
  232. }
  233. .video{
  234. width: 100%;
  235. display: flex;
  236. align-items: center;
  237. justify-content: center;
  238. video{
  239. width: 100%;
  240. }
  241. }
  242. }
  243. .ad{
  244. margin-bottom: 50rpx;
  245. width: 100%;
  246. padding: 15rpx;
  247. background: #FFFFFF;
  248. border-radius: 18rpx 18rpx 18rpx 18rpx;
  249. }
  250. .inquiry{
  251. position: fixed;
  252. right: 22upx;
  253. bottom: 193upx;
  254. z-index: 99;
  255. .content{
  256. display: flex;
  257. align-items: center;
  258. justify-content: center;
  259. flex-direction: column;
  260. image{
  261. box-sizing: border-box;
  262. width: 100upx;
  263. height: 100upx;
  264. border-radius: 50%;
  265. z-index: 9;
  266. border: 2rpx solid #0bb3f2;
  267. }
  268. .text{
  269. margin-top: 15upx;
  270. font-size: 30upx;
  271. font-family: PingFang SC;
  272. font-weight: bold;
  273. color: #0bb3f2;
  274. }
  275. }
  276. }
  277. </style>