xuxy
2024-06-25 d1bb68d9f9054bbf87cd84956d3240c71d8e370c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<template>
    <!-- 挖宝商品 -->
    <view class="main-container" style="min-height: 400rpx;">
        <loading v-if="loading"></loading>
        <view v-if="!loading">
            <view class='productList'>
                <view class='list acea-row row-between-wrapper'>
                    <no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
                    
                    <view class='item' v-for="(item,index) in list" :key="index" @click="navToDetailPage(item.id)">
                        <view class='pictrue'>
                            <image :src='item.cover'></image>
                        </view>
                        <view class='text'>
                            <view class='name line1'>{{item.name}}</view>
                            <view class='money font-color flex'>
                                <view>¥<text class='num'>{{item.defaultWabaoPrice}}</text></view>
                                <view class="info">
                                    <text class="oldprice">¥{{item.defaultNormalPrice}}</text>
                                    <text class="desc">{{item.phaseStr || ''}}</text>
 
                                </view>
                            </view>
                        </view>
                    </view>
                </view>
            </view>
            <!-- <view style="color:#999;font-size:14px;text-align:center;padding:3%;background-color:#f5f5f5;" v-if="nodata">
                暂无数据~
            </view> -->
        </view>
    </view>
</template>
 
<script>
    // import util from '@/utils/util.js'
    // import gzmzApi from '@/api/gzmzApi.js'
    // import myCache from '@/utils/myCache.js'
    export default {
        data() {
            return {
                loading: false,
                nodata: false,
                category_id: '',
                appshow: 1
            }
        },
        onLoad(options) {
            // this.category_id = options.category_id
            // this.initData(this.page, this.category_id);
            // uni.setNavigationBarTitle({
            // title: options.category_name
            // })
        
 
        },
        onReachBottom() {
            // if (!this.nodata) {
            //     this.page++;
            //     this.initData(this.page, this.category_id);
            // }
        },
        methods: {
            updateGoods() {
                console.log('updateGoods')
                this.listApi = '/api/wabao/customer/list'
                this.page.size = 4
                this.getList()
            },
            navToDetailPage(toid) {
                uni.navigateTo({
                    url: '/pages/good/good-detail?id=' + toid
                })
            }
        }
    }
</script>
<style scoped lang="scss">
    @import "../../good/good.scss";
    
</style>