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