index.vue 862 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <div>
  3. <!-- <block v-if="url"><web-view :src="url" @message="onMessage"></web-view></block> -->
  4. <div class="img-box" v-if="imgName"><img mode="widthFix" lazy-load :src="imgUrl + imgName + queryTime" /></div>
  5. </div>
  6. </template>
  7. <script>
  8. import methods from './methods.js';
  9. export default {
  10. data() {
  11. return {
  12. imgUrl: '',
  13. imgName: ''
  14. };
  15. },
  16. computed: {
  17. queryTime() {
  18. return `?t=${new Date().getTime()}`;
  19. }
  20. },
  21. onLoad(options) {
  22. let app = getApp();
  23. this.imgUrl = app.globalData.imgUrl;
  24. this.imgName = options.img
  25. if (this.imgName == 'screening_check_1.jpg') {
  26. wx.setNavigationBarTitle({
  27. title: '感谢查阅'
  28. })
  29. } else {
  30. wx.setNavigationBarTitle({
  31. title: '视光筛查'
  32. })
  33. }
  34. },
  35. onShow() {},
  36. methods: {
  37. ...methods
  38. }
  39. };
  40. </script>
  41. <style lang="scss" scoped>
  42. @import './style.scss';
  43. </style>