金诚优选前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

279 lines
6.5 KiB

  1. <template>
  2. <view>
  3. <lf-nav title="积分商城" titleColor="#fff" bgColor="transparent" :showIcon="true" :spreadOut="false"></lf-nav>
  4. <view class="head">
  5. <view class="bg-view"></view>
  6. </view>
  7. <view class="menu">
  8. <view class="left">
  9. <view>
  10. <text class="lf-iconfont icon-jifen"></text>
  11. <text class="point-num">783</text>
  12. <text class="lf-iconfont icon-xiangyou lf-font-24"></text>
  13. </view>
  14. <view class="lf-font-24">当前积分</view>
  15. </view>
  16. <view class="lf-flex">
  17. <view class="item" @click="$url('/pages/point/exchangeRecord/exchangeRecord')">
  18. <text class="lf-iconfont icon-jilu2 lf-font-50"></text>
  19. <text>兑换记录</text>
  20. </view>
  21. <view class="item" @click="$url('/pages/store/cart/cart')">
  22. <text class="lf-iconfont icon-gouwulan lf-font-50"></text>
  23. <text>购物车</text>
  24. <view class="angle-mark">99+</view>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="lf-m-t-30" v-if="tab_list.length">
  29. <u-tabs :list="tab_list"
  30. active-color="#15716E"
  31. inactive-color='#777777'
  32. :is-scroll="true"
  33. :current="tab_current"
  34. @change="tabChange">
  35. </u-tabs>
  36. </view>
  37. <view class="page-item">
  38. <view class="filter">
  39. <view :class="{'filter-item': true, 'filter-active': index == filter_current}"
  40. v-for="(item, index) in filter_list" :key="index"
  41. @click="filter_current = index">{{ item }}
  42. </view>
  43. </view>
  44. <view class="goods">
  45. <lf-waterfall :list="goods_list" goodsType="point"></lf-waterfall>
  46. </view>
  47. </view>
  48. <u-back-top :scrollTop="pageScrollTop"></u-back-top>
  49. </view>
  50. </template>
  51. <script>
  52. import lfWaterfall from '@/components/lf-waterfall-pointgoods/lf-waterfall.vue';
  53. export default {
  54. components: {
  55. lfWaterfall
  56. },
  57. data(){
  58. let _public = {
  59. page: 1,
  60. isPage: true,
  61. loadingClass: true,
  62. loadingText: '正在加载中'
  63. }
  64. return {
  65. tab_current: 0,
  66. tab_list: [{
  67. name: '全部',
  68. list: [],
  69. ..._public
  70. },{
  71. name: '时尚尖货',
  72. list: [],
  73. ..._public
  74. },{
  75. name: '美容美妆',
  76. list: [],
  77. ..._public
  78. },{
  79. name: '家具用品',
  80. list: [],
  81. ..._public
  82. },{
  83. name: '儿童玩具',
  84. list: [],
  85. ..._public
  86. }],
  87. filter_list: ['1~100','100~1万','1万~2万','2万~5万','>5万'],
  88. filter_current: null,
  89. goods_list: [
  90. {
  91. id: 10,
  92. original_price: "4111.00",
  93. picture: "https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png",
  94. pictures: ["https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png"],
  95. price: "2412.00",
  96. product_id: 1008,
  97. sale: 0,
  98. title: "AIMER MEN爱慕先生爱慕先生"
  99. },
  100. {
  101. id: 10,
  102. original_price: "4111.00",
  103. picture: "https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png",
  104. pictures: ["https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png"],
  105. price: "2412.00",
  106. product_id: 1008,
  107. sale: 0,
  108. title: "AIMER MEN爱慕先生爱慕先生"
  109. },
  110. {
  111. id: 10,
  112. original_price: "4111.00",
  113. picture: "https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png",
  114. pictures: ["https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png"],
  115. price: "2412.00",
  116. product_id: 1008,
  117. sale: 0,
  118. title: "AIMER MEN爱慕先生爱慕先生"
  119. },
  120. {
  121. id: 10,
  122. original_price: "4111.00",
  123. picture: "https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png",
  124. pictures: ["https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png"],
  125. price: "2412.00",
  126. product_id: 1008,
  127. sale: 0,
  128. title: "AIMER MEN爱慕先生爱慕先生"
  129. }
  130. ]
  131. }
  132. },
  133. onLoad(){
  134. },
  135. methods: {
  136. tabChange(event){
  137. this.tab_current = event;
  138. }
  139. }
  140. }
  141. </script>
  142. <style>
  143. page{
  144. overflow-x: hidden;
  145. }
  146. </style>
  147. <style lang="scss" scoped="scoped">
  148. .head{
  149. width: 750rpx;
  150. height: 283rpx;
  151. background: linear-gradient(90deg, #22A2A0 0%, #187B7A 100%);
  152. position: relative;
  153. overflow: hidden;
  154. .bg-view{
  155. position: absolute;
  156. right: -100rpx;
  157. top: -200rpx;
  158. width: 400rpx;
  159. height: 400rpx;
  160. border-radius: 50%;
  161. background-color: rgba(255,255,255,0.04);
  162. }
  163. }
  164. .menu{
  165. width: 686rpx;
  166. height: 170rpx;
  167. background: #FFFFFF;
  168. box-shadow: 0rpx 2rpx 8rpx 1rpx rgba(0, 0, 0, 0.1);
  169. border-radius: 20rpx;
  170. box-sizing: border-box;
  171. padding: 30rpx;
  172. display: flex;
  173. justify-content: space-between;
  174. align-items: center;
  175. color: #15716E;
  176. margin: -80rpx auto 0;
  177. position: relative;
  178. z-index: 2;
  179. .left{
  180. width: 340rpx;
  181. .point-num{
  182. font-size: 48rpx;
  183. font-weight: bold;
  184. margin: 0 10rpx;
  185. }
  186. }
  187. .item{
  188. width: 100rpx;
  189. display: flex;
  190. justify-content: center;
  191. align-items: center;
  192. flex-direction: column;
  193. font-size: 24rpx;
  194. position: relative;
  195. &:nth-child(2n){
  196. margin-left: 40rpx;
  197. }
  198. .angle-mark{
  199. width: 30rpx;
  200. height: 30rpx;
  201. background-color: #FF9D9D;
  202. color: #FFFFFF;
  203. border-radius: 50%;
  204. position: absolute;
  205. right: 10rpx;
  206. top: 10rpx;
  207. font-size: 18rpx;
  208. text-align: center;
  209. line-height: 30rpx;
  210. }
  211. }
  212. }
  213. .page-item{
  214. width: 750rpx;
  215. height: max-content;
  216. .filter{
  217. width: 100%;
  218. height: 83rpx;
  219. border: 1rpx solid #e5e5e5;
  220. box-sizing: border-box;
  221. padding: 0 32rpx;
  222. display: flex;
  223. align-items: center;
  224. .filter-item{
  225. width: 123rpx;
  226. height: 43rpx;
  227. font-size: 24rpx;
  228. color: #777777;
  229. display: flex;
  230. justify-content: center;
  231. align-items: center;
  232. border-radius: 26rpx;
  233. &:nth-child(n+2){
  234. margin-left: 28rpx;
  235. }
  236. &.filter-active{
  237. background-color: #15716E;
  238. color: #FFFFFF;
  239. }
  240. }
  241. }
  242. .goods{
  243. padding: 30rpx 32rpx;
  244. }
  245. }
  246. // tabs 样式修改
  247. /deep/.u-scroll-box {
  248. display: flex;
  249. justify-content: center;
  250. align-items: center;
  251. border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
  252. width: max-content;
  253. }
  254. /deep/.u-scroll-box .u-tab-bar {
  255. background-color: #15716E!important;
  256. width: 80rpx!important;
  257. position: absolute;
  258. left: 0;
  259. bottom: -12rpx;
  260. }
  261. /deep/.special_tab .u-tabs .u-scroll-box .u-tab-bar {
  262. background-color: #15716E!important;
  263. width: 56rpx!important;
  264. position: absolute;
  265. height: 5rpx!important;
  266. left: 8rpx;
  267. bottom: -4rpx;
  268. }
  269. /deep/ .u-tab-item {
  270. font-size: 28rpx!important;
  271. }
  272. </style>