download.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view class="content">
  3. <view class="bg">
  4. <image src="../../static/img/xiazai.png" mode=""></image>
  5. </view>
  6. <view class="download" @click="navTo()">
  7. Android下载
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. data() {
  14. return {
  15. };
  16. },
  17. methods:{
  18. navTo(){
  19. uni.downloadFile(
  20. {
  21. url:'http://gp.liuniu946.com/public/wap',
  22. success: (res) => {
  23. if (res.statusCode === 200) {
  24. console.log('下载成功');
  25. }
  26. }
  27. }
  28. )
  29. }
  30. }
  31. }
  32. </script>
  33. <style lang="scss">
  34. page, .content{
  35. width: 100%;
  36. height: 100%;
  37. padding: 0;
  38. margin: 0;
  39. .bg{
  40. width: 750rpx;
  41. height: 100%;
  42. image{
  43. width: 100%;
  44. height: 100%;
  45. }
  46. }
  47. .download{
  48. width: 500rpx;
  49. height: 80rpx;
  50. font-size: 34rpx;
  51. font-weight: 500;
  52. color: #19BE6B;
  53. line-height: 80rpx;
  54. position: absolute;
  55. bottom: 0;
  56. display: flex;
  57. justify-content: center;
  58. text-align: center;
  59. border: 2rpx solid #19BE6B;
  60. border-radius: 40rpx;
  61. margin-bottom: 200rpx;
  62. left: 125rpx;
  63. }
  64. }
  65. </style>