courseLearning.vue 897 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <!-- 课程学习 -->
  2. <template>
  3. <view id="courseLearning-web-view">
  4. <web-view v-if="webViewType" :src="dataText"></web-view>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. name: "courseLearning-web-view",
  10. data() {
  11. return {
  12. webViewType: false,
  13. dataText:'',
  14. }
  15. },
  16. onLoad(option) {
  17. if(uni.getStorageSync('weChatProgramVersion')){
  18. this.$set(this,'dataText',
  19. uni.getStorageSync('cameraExtranetAgent')+
  20. // 'http://192.168.1.8/stream/#/'+
  21. '?pageType=learningCourse&touken='+uni.getStorageSync('token')+
  22. '&courseId='+option.courseId+
  23. '&examId='+option.examId
  24. );
  25. this.$set(this,'webViewType',true);
  26. }else{
  27. this.$set(this,'dataText','');
  28. this.$set(this,'webViewType',false);
  29. }
  30. },
  31. mounted() {
  32. },
  33. methods: {
  34. },
  35. }
  36. </script>
  37. <style lang="stylus" scoped>
  38. #courseLearning-web-view {
  39. overflow:scroll;
  40. }
  41. </style>