poster.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <view class="pageCon">
  3. <image class="bg" :src="newsInfo.share_img" mode=""></image>
  4. <view class="imgbox">
  5. <image class="shareimg" :src="newsInfo.poster" mode="widthFix"></image>
  6. </view>
  7. <!-- <view class="fixBox">
  8. <u-button @click="clickHandle" throttleTime="2000" class="custom-style" text="提交"></u-button>
  9. </view> -->
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. data() {
  15. return {
  16. newsInfo:{},
  17. }
  18. },
  19. onLoad(options) {
  20. this.loadData();
  21. },
  22. methods: {
  23. loadData() {
  24. this.$api.request('user/getPoster').then(data => {
  25. if (data.code == 200) {
  26. this.newsInfo = data.data;
  27. } else {
  28. this.$api.toast(data.msg);
  29. }
  30. });
  31. },
  32. }
  33. }
  34. </script>
  35. <style lang="scss" scoped>
  36. .pageCon{
  37. padding-bottom: 120rpx;
  38. image{
  39. width: 100%;
  40. }
  41. .bg{
  42. position: fixed;
  43. top: 0;
  44. left: 0;
  45. width: 100vw;
  46. height: 100vh;
  47. }
  48. .custom-style {
  49. background : #0BB291;
  50. color: #fff;
  51. width: 690rpx;
  52. margin-top: 20rpx;
  53. border-radius: 45rpx;
  54. }
  55. .imgbox{
  56. position: fixed;
  57. width: 300rpx;
  58. bottom: 5%;
  59. left: 10%;
  60. .shareimg{
  61. width: 100%;
  62. }
  63. }
  64. }
  65. </style>