123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <template>
- <view class="exchange">
- <view class="bg">
- <!-- <image src="@/static/img/bargainBg.jpg" mode=""></image> -->
- </view>
- <view class="header">
- <view class="data">
- <view class="title">
- 我的金豆
- </view>
- <view class="quantity">
- 8
- </view>
- <view class="button">
- 查看明细
- </view>
- </view>
- </view>
- <view class="line">
- 热门兑换
- </view>
- <view class="dataList">
- <data-list :data='data'></data-list>
- </view>
-
- </view>
- </template>
- <script>
- import { loadIndexs } from '@/api/index.js';
- import dataList from '@/components/datalist.vue'
- export default {
- data() {
- return {
- data: {
- page: 1,
- limit: 10,
- sum: 0,
- loadingType: 'loadmore',
- data: []
- }
-
- }
- },
- components: {
- dataList
- },
- mounted() {
- this.init()
- },
- methods: {
- // 點擊搜索框
- clickSearch() {
- uni.navigateTo({
- url: '/pages/product/search'
- });
- },
- init() {
- this.getData()
- },
- getData() {
- loadIndexs().then(res => {
- this.data = res.data.info.bastList
- this.loadingType = 'nomore'
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- $grey: #95A0B1;
- $text: #333333;
- $red: #FF4C4C;
- .exchange {
- .bg {
- width: 100%;
- height: 400rpx;
- background-color: $red;
- image {
- width: 100%;
- }
- }
- .header {
- .data {
- padding-top: 120rpx;
- width: 100%;
- text-align: center;
- position: absolute;
- top: 0;
- color: #fff;
- height: 400rpx;
- .quantity,.title,.button {
- margin: 10rpx auto;
- }
- .title {
- font-size: 24rpx;
- }
- .quantity {
- font-size: 54rpx;
- font-weight: bold;
- }
- .button {
- padding: 10rpx;
- border: solid 1rpx #fff;
- border-radius: 40rpx;
- font-size: 24rpx;
- width: 160rpx;
- }
- }
- }
- .line {
- background-color: #fff;
- font-size: 28rpx;
- padding: 30rpx;
- color: $red;
- font-weight: bold;
- text-align: center;
- }
- .dataList {
- background-color: #fff;
- }
- }
- </style>
|