coursewareLearning.vue 967 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <!-- 课件学习 -->
  2. <template>
  3. <view id="coursewareLearning-web-view">
  4. <!-- <web-view v-if="webViewType" :src="baseUrl + dataText"></web-view> -->
  5. <web-view v-if="webViewType" :src="dataText"></web-view>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. name: "coursewareLearning-web-view",
  11. data() {
  12. return {
  13. webViewType: false,
  14. dataText:'',
  15. }
  16. },
  17. onLoad(option) {
  18. if(uni.getStorageSync('weChatProgramVersion')){
  19. this.$set(this,'dataText',
  20. uni.getStorageSync('cameraExtranetAgent')+
  21. // 'http://192.168.1.8/stream/#/'+
  22. '?pageType=learningMaterials&touken='+uni.getStorageSync('token')+
  23. '&coursewareId='+option.coursewareId
  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. #coursewareLearning-web-view {
  39. overflow:scroll;
  40. }
  41. </style>