store.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. <template>
  2. <view class="store">
  3. <view class="bg">
  4. <view class="info">
  5. <view class="num">
  6. 3399
  7. </view>
  8. <view class="label">
  9. 剩余积分
  10. </view>
  11. </view>
  12. <view class="rule">
  13. 积分规则
  14. </view>
  15. </view>
  16. <view class="tab-group">
  17. <view class="tab" @click="jump('./shop')">
  18. <image class="icon" src="../static/store.png" mode=""></image>
  19. <view class="tab-name">
  20. 积分商城
  21. </view>
  22. </view>
  23. <view class="tab" @click="jump('./logs')">
  24. <image class="icon" src="../static/diamon.png" mode=""></image>
  25. <view class="tab-name">
  26. 积分明细
  27. </view>
  28. </view>
  29. </view>
  30. <view class="title">
  31. 虚拟兑换
  32. </view>
  33. <view class="sub-title">
  34. 热门虚拟权益服务
  35. </view>
  36. <view class="goods-box">
  37. <view class="store-title">
  38. 人气兑换
  39. <u-icon name="arrow-right" color="#000000" size="38"></u-icon>
  40. </view>
  41. <view class="box">
  42. <view class="item" v-for="(item,index) in list" :key="index">
  43. <image :src="item.src" mode="aspectFill" class="icon"></image>
  44. <view class="item-title">
  45. {{item.title}}
  46. </view>
  47. <view class="handle-box">
  48. <view class="price">
  49. {{item.score}}分
  50. </view>
  51. <view class="exchange-btn">
  52. 兑换
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="store-title">
  58. 生活出行
  59. <u-icon name="arrow-right" color="#000000" size="38"></u-icon>
  60. </view>
  61. <view class="box">
  62. <view class="item" v-for="(item,index) in list" :key="index">
  63. <image :src="item.src" mode="aspectFill" class="icon"></image>
  64. <view class="item-title">
  65. {{item.title}}
  66. </view>
  67. <view class="handle-box">
  68. <view class="price">
  69. {{item.score}}分
  70. </view>
  71. <view class="exchange-btn">
  72. 兑换
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. <zs-skeleton :loading="loading" type="integral"></zs-skeleton>
  79. </view>
  80. </template>
  81. <script>
  82. export default {
  83. data() {
  84. return {
  85. loading: false,
  86. list:[
  87. {
  88. src:'http://t14.baidu.com/it/u=1060435979,471196002&fm=224&app=112&f=JPEG?w=500&h=500',
  89. title:'宅小鹿芒果干',
  90. score:6000,
  91. },
  92. {
  93. src:'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.alicdn.com%2Fbao%2Fuploaded%2Fi2%2F2207895997260%2FO1CN01Ogi5ab23V8BwbWSzn_%21%210-item_pic.jpg&refer=http%3A%2F%2Fimg.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1695440007&t=24ed88d94f8a1820a4411241c3bd5940',
  94. title:'麻辣王子地道辣条',
  95. score:6000,
  96. },
  97. {
  98. src:'https://img2.baidu.com/it/u=248724739,3924050991&fm=253&fmt=auto&app=138&f=JPEG?w=616&h=500',
  99. title:'良品铺子酥脆薄饼',
  100. score:6000,
  101. },
  102. ]
  103. }
  104. },
  105. methods: {
  106. jump(url) {
  107. uni.navigateTo({
  108. url
  109. })
  110. }
  111. },
  112. onLoad() {
  113. this.loading = true
  114. setTimeout(()=>{
  115. this.loading = false
  116. },1000)
  117. }
  118. }
  119. </script>
  120. <style lang="scss">
  121. .store{
  122. padding-bottom: 80rpx;
  123. .bg{
  124. // background: #3884ea;
  125. background: url('../static/top-bg.png') no-repeat #f9f9f9;
  126. height: 430rpx;
  127. background-size: 100% 430rpx;
  128. display: flex;
  129. justify-content: center;
  130. align-items: center;
  131. color: #fff;
  132. position: relative;
  133. .info{
  134. text-align: center;
  135. .num{
  136. font-size: 56rpx;
  137. font-weight: bold;
  138. }
  139. .label{
  140. font-size: 24rpx;
  141. }
  142. }
  143. .rule{
  144. position: absolute;
  145. top: 50%;
  146. right: 0%;
  147. transform: translateY(-50%);
  148. background: #fff;
  149. color: $uni-text-primary;
  150. font-size: 28rpx;
  151. padding:10rpx 18rpx;
  152. border-radius: 12rpx;
  153. }
  154. }
  155. .tab-group{
  156. display: flex;
  157. align-items: center;
  158. width: 680rpx;
  159. // padding: 20rpx 0;
  160. height: 184rpx;
  161. box-shadow: rgba(0, 0, 0, 0.4) 0px 0px 4px 0px;
  162. border-radius: 12rpx;
  163. position: relative;
  164. z-index: 2;
  165. margin-left: 35rpx;
  166. margin-top: -100rpx;
  167. margin-bottom: 40rpx;
  168. background: #fff;
  169. .tab{
  170. flex: 1;
  171. display: flex;
  172. flex-direction: column;
  173. align-items: center;
  174. .icon{
  175. width: 52rpx;
  176. height: 52rpx;
  177. }
  178. .tab-name{
  179. text-align: center;
  180. font-size: 28rpx;
  181. margin-top: 10rpx;
  182. }
  183. }
  184. }
  185. .title{
  186. font-size: 30rpx;
  187. text-align: center;
  188. font-weight: bold;
  189. }
  190. .sub-title{
  191. color: #cacaca;
  192. font-size: 26rpx;
  193. position: relative;
  194. text-align: center;
  195. margin-top: 16rpx;
  196. }
  197. .sub-title::before{
  198. width: 200rpx;
  199. height: 1rpx;
  200. background: #cacaca;
  201. position: absolute;
  202. display: block;
  203. content: '';
  204. top: 50%;
  205. left: 40rpx;
  206. }
  207. .sub-title::after{
  208. width: 200rpx;
  209. height: 1rpx;
  210. background: #cacaca;
  211. position: absolute;
  212. display: block;
  213. content: '';
  214. top: 50%;
  215. right: 40rpx;
  216. }
  217. .goods-box{
  218. padding: 20rpx 50rpx;
  219. .store-title{
  220. font-size: 34rpx;
  221. display: flex;
  222. align-items: center;
  223. position: relative;
  224. padding-left: 18rpx;
  225. font-weight: bold;
  226. margin: 20rpx 0 30rpx;
  227. }
  228. .store-title::before{
  229. width: 7rpx;
  230. height: 100%;
  231. background: rgb(57, 81, 251);
  232. content: '';
  233. display: flex;
  234. position: absolute;
  235. top: 0%;
  236. left: 0;
  237. }
  238. .box{
  239. display: flex;
  240. justify-content: space-between;
  241. border-bottom: 1rpx solid #cacaca;
  242. padding-bottom: 30rpx;
  243. .item{
  244. width: 200rpx;
  245. display: flex;
  246. flex-direction: column;
  247. justify-content: space-between;
  248. .icon{
  249. width: 100%;
  250. height: 210rpx!important;
  251. border-radius: 12rpx;
  252. object-fit: cover;
  253. }
  254. .item-title{
  255. font-size: 26rpx;
  256. display: -webkit-box;
  257. -webkit-box-orient: vertical;
  258. overflow: hidden;
  259. -webkit-line-clamp: 2;
  260. text-overflow: ellipsis;
  261. margin-top: 10rpx;
  262. }
  263. .handle-box{
  264. display: flex;
  265. justify-content: space-between;
  266. align-items: center;
  267. margin-top: 15rpx;
  268. .price{
  269. font-size: 26rpx;
  270. color: #FE5B47;
  271. }
  272. .exchange-btn{
  273. width: 96rpx;
  274. height: 40rpx;
  275. line-height: 40rpx;
  276. background: $uni-color-primary;
  277. border-radius: 20rpx;
  278. text-align: center;
  279. color: #fff;
  280. font-size: 22rpx;
  281. }
  282. }
  283. }
  284. }
  285. }
  286. }
  287. </style>