w-life-detail.vue 895 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <view>
  3. <web-view :src="href"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. data() {
  9. return {
  10. href:""
  11. };
  12. },
  13. onLoad(option) {
  14. console.log(option.type)
  15. this.go_url(option.type)
  16. },
  17. methods:{
  18. go_url(type){
  19. if(type == 'gongjijin'){
  20. this.href = "http://gjj.yinchuan.gov.cn/list_gjjcx.jsp?urltype=tree.TreeTempUrl&wbtreeid=1044"
  21. uni.setNavigationBarTitle({
  22. title: '公积金查询'
  23. });
  24. }else if(type == 'xiecheng'){
  25. this.href = "http://m.ctrip.com/html5/?sid=155952&allianceid=4897&ouid=index"
  26. uni.setNavigationBarTitle({
  27. title: '飞机火车票'
  28. });
  29. }else if(type == 'meituan'){
  30. this.href = "https://h5.waimai.meituan.com"
  31. uni.setNavigationBarTitle({
  32. title: '美团外卖'
  33. });
  34. }
  35. }
  36. }
  37. }
  38. </script>
  39. <style lang="scss">
  40. </style>