unWinPrize.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view class="intro-page common">
  3. <view class="top-class"></view>
  4. <view class="title">
  5. 梅山古镇
  6. </view>
  7. <view class="head">
  8. <u-row class="row-class">
  9. <u-col span="4">
  10. <image class="logo-img" src="/static/images/common/logo.png" mode="aspectFit" />
  11. </u-col>
  12. <u-col span="4">
  13. <image class="commodity-img" src="/static/images/common/commodity.png" mode="aspectFit" />
  14. </u-col>
  15. <u-col span="4">
  16. </u-col>
  17. </u-row>
  18. </view>
  19. <view class="theme-text">
  20. <image src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/text.png"
  21. class="textImage"></image>
  22. </view>
  23. <!-- 公司简介内容卡片 -->
  24. <view class="intro-card">
  25. <view class="intro-view">
  26. <view class="intro-content">
  27. <view>
  28. <image src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/prize/unWinPrize_1.png" mode="heightFix"
  29. class="prize_image_1"></image>
  30. </view>
  31. <view style="margin: 40rpx;">
  32. <image src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/prize/unWinPrize_2.png" mode="heightFix"
  33. class="prize_image_2"></image>
  34. </view>
  35. <view>{{ randomText }}</view>
  36. </view>
  37. </view>
  38. </view>
  39. <!-- 返回按钮 -->
  40. <view class="footer-btn">
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. import { randomTexts } from '../../../utils/randomTexts.js';
  46. export default {
  47. data() {
  48. return {
  49. randomText: ""
  50. }
  51. },
  52. mounted() {
  53. this.setRandomText();
  54. },
  55. methods: {
  56. goBack() {
  57. uni.navigateBack();
  58. },
  59. setRandomText() {
  60. const randomIndex = Math.floor(Math.random() * randomTexts.length);
  61. this.randomText = randomTexts[randomIndex];
  62. }
  63. }
  64. }
  65. </script>
  66. <style lang="scss" scoped>
  67. @import url('../../../static/scss/common.css');
  68. .row-class {
  69. height: 80rpx;
  70. }
  71. .logo-img {
  72. background-size: cover;
  73. /* 确保背景图片自适应填充整个容器 */
  74. background-position: center;
  75. /* 背景图片居中显示 */
  76. background-repeat: no-repeat;
  77. /* 防止背景图重复 */
  78. height: 42rpx;
  79. width: 62%;
  80. }
  81. .commodity-img {
  82. background-size: cover;
  83. /* 确保背景图片自适应填充整个容器 */
  84. background-position: center;
  85. /* 背景图片居中显示 */
  86. background-repeat: no-repeat;
  87. /* 防止背景图重复 */
  88. height: 35rpx;
  89. width: 100%;
  90. }
  91. .theme-text {
  92. height: 10vh;
  93. text-align: center;
  94. line-height: 11vh;
  95. .textImage {
  96. height: 80rpx;
  97. width: 400rpx;
  98. }
  99. }
  100. .prize_image_1{
  101. height: 140rpx;
  102. }
  103. .prize_image_2{
  104. height: 280rpx
  105. }
  106. .intro-card {
  107. margin: 0 32rpx;
  108. padding: 32rpx 24rpx 24rpx 24rpx;
  109. background: rgba(131, 100, 71, 0.5);
  110. border-radius: 10rpx;
  111. .intro-view {
  112. border: 1px solid #341B10;
  113. padding: 10px;
  114. margin: 10px;
  115. position: relative;
  116. height: 56vh;
  117. .intro-content {
  118. font-size: 40rpx;
  119. color: #5c4322;
  120. line-height: 1.8;
  121. margin: 20rpx 0px;
  122. text-align: center;
  123. font-weight: 600;
  124. color: #9B0000;
  125. }
  126. .company-img {
  127. width: 100%;
  128. height: 260rpx;
  129. border-radius: 12rpx;
  130. object-fit: cover;
  131. margin-top: 10rpx;
  132. background: #eee;
  133. }
  134. }
  135. }
  136. </style>