claim.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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" textAlign="right">
  15. <text class="detail-btn" @click="openDetail()">活动规则</text>
  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. <view class="content">
  24. <view class="title-1">
  25. </view>
  26. <view class="winning-picture">
  27. <image class="center-image" src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/commodity/one.png" mode="heightFix"></image>
  28. </view>
  29. <view class="detail">
  30. <view class="text-detail">
  31. 您所查询的是湖南王爷山食品股份有限公司荣誉出品的豆干制品,是正牌产品,感谢您的购买!
  32. </view>
  33. <view class="text-one">
  34. 此二维码已参与过活动!
  35. </view>
  36. <view class="text-one">
  37. 首次扫码者: {{scanUserData.openid}}
  38. </view>
  39. <view class="text-one">
  40. 首次扫码时间: {{scanUserData.scan_time}}
  41. </view>
  42. <view class="text-one">
  43. 获得奖励: {{prizeJson.prize_type == 0 ? '谢谢惠顾' : prizeJson.prize_type == 1 ? prizeJson.money/100 + '元现金红包' : prizeJson.title }}
  44. </view>
  45. </view>
  46. </view>
  47. <CustomTabbar />
  48. </view>
  49. </template>
  50. <script>
  51. import CustomTabbar from '@/components/tabbar.vue';
  52. export default {
  53. components: {
  54. CustomTabbar
  55. },
  56. data() {
  57. return {
  58. scanUserData:{},
  59. prizeJson:{}
  60. }
  61. },
  62. onLoad() {
  63. let scanDetail = uni.getStorageSync('scanDetail');
  64. this.scanUserData = scanDetail.result.scanInfo;
  65. this.prizeJson = scanDetail.prizeJson;
  66. console.log(scanDetail);
  67. },
  68. methods: {
  69. goBack() {
  70. uni.navigateBack();
  71. },
  72. openDetail(){
  73. uni.navigateTo({
  74. url: '/pages/lgz/index/rules'
  75. });
  76. }
  77. }
  78. }
  79. </script>
  80. <style lang="scss" scoped>
  81. @import url('../../../static/scss/common.css');
  82. .row-class {
  83. height: 80rpx;
  84. }
  85. .logo-img {
  86. background-size: cover;
  87. /* 确保背景图片自适应填充整个容器 */
  88. background-position: center;
  89. /* 背景图片居中显示 */
  90. background-repeat: no-repeat;
  91. /* 防止背景图重复 */
  92. height: 42rpx;
  93. width: 62%;
  94. }
  95. .commodity-img {
  96. background-size: cover;
  97. /* 确保背景图片自适应填充整个容器 */
  98. background-position: center;
  99. /* 背景图片居中显示 */
  100. background-repeat: no-repeat;
  101. /* 防止背景图重复 */
  102. height: 35rpx;
  103. width: 100%;
  104. }
  105. .theme-text {
  106. height: 10vh;
  107. text-align: center;
  108. line-height: 11vh;
  109. .textImage {
  110. height: 80rpx;
  111. width: 400rpx;
  112. }
  113. }
  114. .title-1{
  115. text-align: center;
  116. color: #A7001C;
  117. font-size: 18px;
  118. letter-spacing: 4px;
  119. font-weight: 600;
  120. }
  121. .winning-picture{
  122. height: 460rpx;
  123. background-image: url(https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/bgiZj.png);
  124. background-size: contain;
  125. background-position: center;
  126. background-repeat: no-repeat;
  127. display: flex;
  128. justify-content: center; /* 水平居中 */
  129. // align-items: center; /* 垂直居中 */
  130. }
  131. .detail{
  132. margin: 20rpx 40rpx;
  133. background: #836447;
  134. border-radius: 10rpx;
  135. padding: 10rpx;
  136. }
  137. .text-detail{
  138. font-weight: 500;
  139. font-size: 28rpx;
  140. color: #F6F6F9;
  141. margin-bottom: 10rpx;
  142. }
  143. .text-one{
  144. font-weight: 400;
  145. font-size: 26rpx;
  146. color: #A7001C;
  147. margin-bottom: 10rpx;
  148. }
  149. .detail-btn{
  150. text-align: center;
  151. color: #F9D395;
  152. height: 60rpx;
  153. line-height: 60rpx;
  154. margin-right: 20rpx;
  155. font-size: 13px;
  156. background-color: #901710;
  157. padding: 3px;
  158. border-radius: 5px;
  159. }
  160. .center-image {
  161. height: 280rpx;
  162. object-fit: contain; /* 保持图片的宽高比,确保不会被拉伸或裁切 */
  163. }
  164. ::v-deep .detail-btn span {
  165. background-color: #8E1813;
  166. padding: 4rpx;
  167. border-radius: 8rpx;
  168. font-weight: 400;
  169. font-size: 26rpx;
  170. }
  171. </style>