skip.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <view class="">
  3. <view class="notice" v-if="type==2">
  4. <u-notice-bar :text="text1" color="#fff" bgColor="#A5CF49" fontSize='16'></u-notice-bar>
  5. </view>
  6. <web-view :src="url" v-if="type==1"></web-view>
  7. <view class="content" v-if="type==2">
  8. <u-parse :content="url"></u-parse>
  9. </view>
  10. </view>
  11. </template>
  12. <script setup>
  13. import {onLoad,onShow,onPullDownRefresh} from "@dcloudio/uni-app";
  14. import {ref} from "vue"
  15. import {getplatformmeun} from '@/utils/api.js'
  16. let text1=ref('')
  17. let type=ref()
  18. onLoad(() => {
  19. getplatformmeun().then(res=>{
  20. uni.setNavigationBarTitle({
  21. title: res.data.name
  22. });
  23. let menu=res.data
  24. if(menu.jtype==1){
  25. type.value=1
  26. url.value=menu.jump_url
  27. }else{
  28. type.value=2
  29. url.value=menu.jump_text
  30. text1.value=menu.jump_notice
  31. }
  32. })
  33. })
  34. let url=ref('')
  35. onShow(()=>{
  36. })
  37. onPullDownRefresh(() => {
  38. setTimeout(function() {
  39. uni.stopPullDownRefresh();
  40. }, 1000);
  41. })
  42. </script>
  43. <style lang="scss">
  44. page{
  45. }
  46. .content{
  47. padding: 0 20rpx;
  48. }
  49. </style>