download.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <web-view :src="url" >打开文件</web-view>
  3. </template>
  4. <script>
  5. var app=getApp()
  6. export default{
  7. data(){return{
  8. url:""
  9. }
  10. },
  11. created() {
  12. this.getTips()
  13. },
  14. methods:{
  15. getTips: function() {
  16. let params = {
  17. key: uni.getStorageSync('steps').key,
  18. }
  19. app.request('/templates', params, 'get').then(res => {
  20. console.log(res.data.data.data[0].resource, "---------------------模板")
  21. this.url=res.data.data.data[0].resource
  22. })
  23. },
  24. }
  25. }
  26. </script>
  27. <style>
  28. .navbar {
  29. font-size: 32upx;
  30. height: 100upx;
  31. line-height: 100upx;
  32. color: #888888;
  33. position: relative;
  34. position: fixed;
  35. top: 0;
  36. z-index: 9999999;
  37. width: 100%;
  38. background-color: #FFFFFF;
  39. text-align: center;
  40. border-bottom: solid 2upx #EFF1F6;
  41. .back {
  42. height: 100upx;
  43. width: 100upx;
  44. text-align: center;
  45. // background-color: #007AFF;
  46. position: absolute;
  47. float: left;
  48. left: 0upx;
  49. font-size: 32upx;
  50. }
  51. }
  52. </style>