unWinPrize.vue 3.2 KB

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