webView.vue 507 B

12345678910111213141516171819202122232425262728
  1. <!-- 第三方页面webview -->
  2. <template>
  3. <web-view :src="url" :progress="false"></web-view>
  4. </template>
  5. <script>
  6. import getUrlParams from '@/utils/getUrlParams.js'
  7. export default {
  8. data() {
  9. return {
  10. url: '',
  11. title: '视频聊天'
  12. }
  13. },
  14. onLoad(res) {
  15. this.url = decodeURIComponent(res.url);
  16. const title = getUrlParams(this.url, 'title');
  17. if (title) {
  18. this.title = title
  19. }
  20. },
  21. onReady() {
  22. uni.setNavigationBarTitle({
  23. title: this.title
  24. })
  25. }
  26. }
  27. </script>