detail.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <view class="detail">
  3. <img src="../../static/img/back.png" alt="" class="back" @click="goBack()">
  4. <img src="../../static/img/top.png" alt="" class="top">
  5. <view class="bottom">
  6. <view class='title_box'>
  7. <img src="../../static/img/title.png" alt="" class="title_img">
  8. </view>
  9. <view class="content">
  10. <img src="https://image.chuliu.cc/jingzhuangdetail.jpg" alt="" v-if="idx==0">
  11. <img src="https://image.chuliu.cc/gaoyaodetail.jpg" alt="" v-if="idx==1">
  12. <img src="https://image.chuliu.cc/qingchundetail.jpg" alt="" v-if="idx==2">
  13. </view>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. export default {
  19. data() {
  20. return {
  21. idx: ''
  22. }
  23. },
  24. methods: {
  25. goBack() {
  26. uni.navigateBack()
  27. }
  28. },
  29. onLoad(ops) {
  30. this.idx = ops.idx
  31. }
  32. }
  33. </script>
  34. <style lang="scss">
  35. .detail {
  36. width: 100%;
  37. height: 100%;
  38. text-align: center;
  39. position: relative;
  40. .back {
  41. position: fixed;
  42. top: 42rpx;
  43. left: 12rpx;
  44. }
  45. .top {
  46. width: 100%;
  47. }
  48. .bottom {
  49. width: 100%;
  50. background: #cc120d;
  51. padding: 50rpx 0;
  52. margin-top: -50rpx;
  53. .title_box {
  54. width: 100%;
  55. text-align: center;
  56. .title_img {
  57. width: 520rpx;
  58. }
  59. }
  60. .content {
  61. width: 100%;
  62. margin: -40rpx auto 0;
  63. img {
  64. width: 690rpx;
  65. border: 2rpx solid #F9FFC6;
  66. border-radius: 35rpx;
  67. padding: 10rpx;
  68. background: #EB563E;
  69. box-shadow: 10rpx 10rpx 5rpx #cc120d;
  70. }
  71. }
  72. }
  73. }
  74. </style>