移动系统liao
2024-05-21 44e7987a5884ea2aa334bccca6983d9536c1e69b
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<template>
    <view>
        <u-navbar title="接龙" safeAreaInsetTop fixed placeholder>
            <view class="coreshop-navbar-left-slot" slot="left">
                <u-icon name="arrow-left" size="19" @click="goNavigateBack"></u-icon>
                <u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
                <u-icon name="home" size="22" @click="goHome"></u-icon>
            </view>
            <view slot="right">
            </view>
        </u-navbar>
 
        <view class="solitaire-details-bg"></view>
        <view class="solitaire-details-placeholder-body" />
 
        <!--商家及推荐-->
        <view class="coreshop-margin-20 coreshop-goods-shop-info-view-box">
            <view class="coreshop-shop-view">
                <view class="coreshop-position-absolute">
                    <u-avatar :src="shopLogo" shape="square"></u-avatar>
                </view>
                <view class="coreshop-margin-left-10 coreshop-padding-left-40 coreshop-padding-right-40">
                    <view class="coreshop-margin-bottom-5 coreshop-text-white">{{shopName || ' '}}</view>
                    <view class="coreshop-font-sm u-line-1 coreshop-text-white">{{shareTitle || ' '}}</view>
                </view>
                <u-button type="default" size="mini" :plain="true" @click="doPhoneCall" icon="phone" text="联系商家" color="#272d47"></u-button>
            </view>
        </view>
 
 
        <view class="page-box coreshop-margin-top-20" v-if="listData.length > 0">
            <view class="orderList" v-for="(item, itemIndex) in listData" :key="itemIndex">
                <view class="top" @click="goSolitaireDetail(item.id)">
                    <view class="store u-line-2">{{item.title}}</view>
                </view>
                <view class="item">
                    <view class="left">
                        <u--image :showLoading="true" :src="item.thumbnail" width="80px" height="80px" mode="aspectFill"></u--image>
                    </view>
                    <view class="content">
                        <view class="type u-line-2">{{item.description}}</view>
                        <view class="delivery-time">截止时间:{{ $u.timeFormat(item.endTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
                        <view class="coreshop-flex coreshop-align-center coreshop-padding-top-10  coreshop-padding-bottom-5">
                            <view class="coreshop-font-11 coreshop-bg-orange coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="item.minDeliveryPrice>0">{{item.minDeliveryPrice}}元起送</view>
                            <view class="coreshop-font-11 coreshop-bg-olive coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="item.startBuyPrice>0">{{item.startBuyPrice}}元起购</view>
                            <!--<view class="coreshop-font-11 coreshop-bg-olive coreshop-padding-2 coreshop-border-radius-4">{{item.ticketNumber}}张券</view>-->
                        </view>
                    </view>
                </view>
                <view class="bottom coreshop-margin-top-10">
                    <view class="more">正在接龙中</view>
                    <view class="coreshop-flex">
                        <view class='coreshop-solitaire-btn' @click="goSolitaireDetail(item.id)">立即接龙</view>
                    </view>
                </view>
            </view>
            <u-loadmore :status="loadStatus"></u-loadmore>
        </view>
 
        <!-- 无数据时默认显示 -->
        <view class="coreshop-emptybox" v-else>
            <u-empty :icon="$globalConstVars.apiFilesUrl+'/static/images/empty/order.png'" icon-size="150" text="暂无接龙信息" mode="list"></u-empty>
            <navigator class="coreshop-btn" url="/pages/category/index/index" open-type="switchTab">随便逛逛</navigator>
        </view>
    </view>
</template>
 
<script>
 
    export default {
 
        data() {
            return {
                page: 1,
                limit: 10,
                listData: [],
                loadStatus: 'loadmore',
                iconType: 'flower',
                loadText: {
                    loadmore: '轻轻上拉',
                    loading: '努力加载中',
                    nomore: '实在没有了'
                },
            }
        },
        onLoad() {
            this.getList();
        },
        computed: {
            shopName() {
                return this.$store.state.config.shopName;
            },
            shareTitle() {
                return this.$store.state.config.shareTitle;
            },
            shopLogo() {
                return this.$store.state.config.shopLogo;
            },
        },
        onReachBottom() {
            if (this.loadStatus === 'loadmore') {
                this.getList();
            }
        },
        methods: {
            //获取列表
            getList() {
                this.loadStatus = 'loading'
                let data = {
                    page: this.page,
                    limit: this.limit,
                }
                this.$u.api.getSolitairePageList(data).then(res => {
                    if (res.status) {
                        let newList = this.listData.concat(res.data);
                        this.listData = newList;
                        if (res.data.count > this.listData.length) {
                            this.page++
                            this.loadStatus = 'loadmore'
                        } else {
                            this.loadStatus = 'nomore'
                        }
                    } else {
                        this.$u.toast(res.msg);
                    }
                });
            }
        }
    }
</script>
 
<style lang="scss" scoped>
</style>