store.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  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. <image class="jump-img" @click="jump('./shop')" src="http://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/BwbkTmLONI0K245c64d32574af7de6e0d328048b9f7c.png/1.png" mode=""></image>
  16. </view>
  17. <view class="title">
  18. <image class="icon" src="../static/diamon.png" mode=""></image>
  19. 积分明细
  20. </view>
  21. <!-- <view class="tab-group">
  22. <view class="tab" @click="jump('./shop')">
  23. <image class="icon" src="../static/store.png" mode=""></image>
  24. <view class="tab-name">
  25. 积分商城
  26. </view>
  27. </view>
  28. <view class="tab" @click="jump('./logs')">
  29. <image class="icon" src="../static/diamon.png" mode=""></image>
  30. <view class="tab-name">
  31. 积分明细
  32. </view>
  33. </view>
  34. </view> -->
  35. <zs-list mt="0" @load="loadMore" :status="status">
  36. <view class="item" v-for="(item,index) in list" :key="index">
  37. <view class="top">
  38. <view class="item-title">
  39. {{item.title}}
  40. </view>
  41. <view class="score">
  42. {{item.score}}
  43. </view>
  44. </view>
  45. <view class="bottom">
  46. <view class="time">
  47. {{item.time}}
  48. </view>
  49. <view class="num">
  50. 剩余{{item.num}}
  51. </view>
  52. </view>
  53. </view>
  54. </zs-list>
  55. <!-- <view class="goods-box">
  56. <view class="store-title">
  57. 人气兑换
  58. <u-icon name="arrow-right" color="#000000" size="38"></u-icon>
  59. </view>
  60. <view class="box">
  61. <view class="item" v-for="(item,index) in list" :key="index">
  62. <image :src="item.src" mode="aspectFill" class="icon"></image>
  63. <view class="item-title">
  64. {{item.title}}
  65. </view>
  66. <view class="handle-box">
  67. <view class="price">
  68. {{item.score}}分
  69. </view>
  70. <view class="exchange-btn">
  71. 兑换
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. <view class="store-title">
  77. 生活出行
  78. <u-icon name="arrow-right" color="#000000" size="38"></u-icon>
  79. </view>
  80. <view class="box">
  81. <view class="item" v-for="(item,index) in list" :key="index">
  82. <image :src="item.src" mode="aspectFill" class="icon"></image>
  83. <view class="item-title">
  84. {{item.title}}
  85. </view>
  86. <view class="handle-box">
  87. <view class="price">
  88. {{item.score}}分
  89. </view>
  90. <view class="exchange-btn">
  91. 兑换
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. </view> -->
  97. <zs-skeleton :loading="loading" type="integral"></zs-skeleton>
  98. </view>
  99. </template>
  100. <script>
  101. export default {
  102. data() {
  103. return {
  104. loading: false,
  105. status:'more',
  106. list:[
  107. {
  108. title:'天天签到积分',
  109. time:'2022-10-01',
  110. score:'+5',
  111. num:1233
  112. },
  113. {
  114. title:'天天签到积分',
  115. time:'2022-10-01',
  116. score:'+5',
  117. num:1233
  118. },
  119. {
  120. title:'天天签到积分',
  121. time:'2022-10-01',
  122. score:'+5',
  123. num:233
  124. },
  125. {
  126. title:'天天签到积分',
  127. time:'2022-10-01',
  128. score:'+5',
  129. num:1233
  130. }],
  131. }
  132. },
  133. methods: {
  134. jump(url) {
  135. uni.navigateTo({
  136. url
  137. })
  138. },
  139. loadMore(){
  140. this.status = 'loading'
  141. setTimeout(()=>{
  142. this.status = 'more'
  143. this.list.push({
  144. title:'天天签到积分',
  145. time:'2022-10-01',
  146. score:'+15',
  147. num:1233
  148. })
  149. },1000)
  150. }
  151. },
  152. onLoad() {
  153. this.loading = true
  154. setTimeout(()=>{
  155. this.loading = false
  156. },1000)
  157. }
  158. }
  159. </script>
  160. <style lang="scss">
  161. .store{
  162. padding-bottom: 80rpx;
  163. background: #F9F9F9;
  164. .bg{
  165. background: linear-gradient(180deg, #3988FF 0%, #F9F9F9 100%);
  166. height: 430rpx;
  167. background-size: 100% 430rpx;
  168. display: flex;
  169. justify-content: center;
  170. align-items: center;
  171. color: #fff;
  172. position: relative;
  173. .jump-img{
  174. position: absolute;
  175. bottom: 20rpx;
  176. left: 50%;
  177. transform: translateX(-50%);
  178. width: 660rpx;
  179. height: 134rpx;
  180. }
  181. .info{
  182. text-align: center;
  183. color: #222222;
  184. .num{
  185. font-size: 56rpx;
  186. font-weight: bold;
  187. }
  188. .label{
  189. font-size: 24rpx;
  190. }
  191. }
  192. .rule{
  193. position: absolute;
  194. top: 50%;
  195. right: 0%;
  196. transform: translateY(-50%);
  197. background: #fff;
  198. color: $uni-text-primary;
  199. font-size: 28rpx;
  200. padding:10rpx 18rpx;
  201. border-radius: 12rpx;
  202. }
  203. }
  204. .title{
  205. font-size: 28rpx;
  206. font-weight: bold;
  207. color: #0F0F0F;
  208. display: flex;
  209. align-items: center;
  210. margin: 30rpx;
  211. .icon{
  212. width: 40rpx;
  213. height: 40rpx;
  214. margin-right: 10rpx;
  215. }
  216. }
  217. .item{
  218. display: flex;
  219. flex-direction: column;
  220. justify-content: space-between;
  221. padding: 25rpx;
  222. margin:0 30rpx 20rpx;
  223. border-radius: 16rpx;
  224. background: #fff;
  225. .top{
  226. display: flex;
  227. align-items: center;
  228. justify-content: space-between;
  229. .item-title{
  230. font-size: 28rpx;
  231. }
  232. .score{
  233. font-size: 38rpx;
  234. color: rgb(57, 81, 251);
  235. color: #0F0F0F;
  236. font-weight: bold;
  237. }
  238. }
  239. .bottom{
  240. display: flex;
  241. align-items: center;
  242. justify-content: space-between;
  243. color: #999999;
  244. margin-top: 15rpx;
  245. font-size: 24rpx;
  246. .time{
  247. }
  248. .num{
  249. }
  250. }
  251. }
  252. .goods-box{
  253. padding: 20rpx 50rpx;
  254. .store-title{
  255. font-size: 34rpx;
  256. display: flex;
  257. align-items: center;
  258. position: relative;
  259. padding-left: 18rpx;
  260. font-weight: bold;
  261. margin: 20rpx 0 30rpx;
  262. }
  263. .store-title::before{
  264. width: 7rpx;
  265. height: 100%;
  266. background: rgb(57, 81, 251);
  267. content: '';
  268. display: flex;
  269. position: absolute;
  270. top: 0%;
  271. left: 0;
  272. }
  273. .box{
  274. display: flex;
  275. justify-content: space-between;
  276. border-bottom: 1rpx solid #cacaca;
  277. padding-bottom: 30rpx;
  278. .item{
  279. width: 200rpx;
  280. display: flex;
  281. flex-direction: column;
  282. justify-content: space-between;
  283. .icon{
  284. width: 100%;
  285. height: 210rpx!important;
  286. border-radius: 12rpx;
  287. object-fit: cover;
  288. }
  289. .item-title{
  290. font-size: 26rpx;
  291. display: -webkit-box;
  292. -webkit-box-orient: vertical;
  293. overflow: hidden;
  294. -webkit-line-clamp: 2;
  295. text-overflow: ellipsis;
  296. margin-top: 10rpx;
  297. }
  298. .handle-box{
  299. display: flex;
  300. justify-content: space-between;
  301. align-items: center;
  302. margin-top: 15rpx;
  303. .price{
  304. font-size: 26rpx;
  305. color: #FE5B47;
  306. }
  307. .exchange-btn{
  308. width: 96rpx;
  309. height: 40rpx;
  310. line-height: 40rpx;
  311. background: $uni-color-primary;
  312. border-radius: 20rpx;
  313. text-align: center;
  314. color: #fff;
  315. font-size: 22rpx;
  316. }
  317. }
  318. }
  319. }
  320. }
  321. }
  322. </style>