xuxueyang
2024-09-09 03d26aca1b656c03dc4280f85acb1132bd87639d
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<template>
    <view class="travel-detail">
        <view v-if="dto.id">
            <!-- 标题、价格、时间、地点 -->
            <view class="infos">
                <view class="name">{{dto.name||dto.title||'暂无标题'}}</view>
                <view class="flex score-info">
                    <view><span class="score">{{dto.point||'-'}}</span>积分</view>
                    <view class="m-l-a m-r-0">库存:{{dto.stock||'0'}}</view>
                </view>
            </view>
            <view style="background: #F5F5F5;height: 24rpx;">
 
            </view>
            
            <view class="bg-white p10">
                <image :src="dto.cover" v-if="dto.cover" mode="aspectFit" class="m-t-8"
                    style="display: block;margin: 0 auto;" @click="previewImg(dto.cover)"></image>
 
            </view>
            <uni-swiper-dot class="uni-swiper-dot-box" :mode="'dot'" field="content"
                v-if="dto.pictureList&&dto.pictureList.length>0">
                <swiper class="swiper-box" :interval="10000" :circular="true" :current="0" :autoplay="true">
                    <swiper-item v-for="(url, index) in dto.pictureList" :key="index">
                        <view class="swiper-item" :class="'swiper-item' + index">
                            <image class="home-banner-image" mode="scaleToFill" @click="previewImg(url)" :src="url">
                            </image>
                        </view>
                    </swiper-item>
                </swiper>
            </uni-swiper-dot>
 
            <view style="background: #F5F5F5;height: 24rpx;">
 
            </view>
 
            <view class="info-desc">
                <view class="title">商品描述</view>
                <view v-html="dto.description||'暂无'" class="rich" style="overflow: scroll;">
 
                </view>
            </view>
 
        </view>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                dto: {
 
                },
                id: ''
            };
        },
        async onLoad(options) {
            this.id = options.id || ''
            await this.init()
 
        },
        async onPullDownRefresh() {
            await this.init()
            uni.stopPullDownRefresh()
        },
        methods: {
            async init() {
                this.$message.showLoading()
                const {
                    data
                } = await this.$http.request('get', '/api/customer/point/goods/list/view?id=' + this.id, {
 
                })
                this.$message.hideLoading()
                this.dto = {
                    ...data
                }
            },
        }
    }
</script>
 
<style lang="scss" scoped>
    .travel-detail {
 
        .info-desc {
            padding: 24rpx 30rpx;
            background: #fff;
 
            .title {
                margin-bottom: 20rpx;
                font-weight: 600;
                font-size: 32rpx;
                color: #000000;
            }
 
            /deep/ img {
                max-width: 600rpx;
 
            }
        }
 
 
 
        .infos {
            padding: 24rpx 30rpx;
            background: #fff;
 
            .score-info {
 
                line-height: 50rpx;
                font-weight: 400;
                font-size: 24rpx;
                color: #44775A;
                padding-bottom: 28rpx;
 
                .score {
                    font-weight: 600;
                    font-size: 36rpx;
                    color: #44775A;
                }
            }
 
 
            .name {
                font-weight: 600;
                font-size: 40rpx;
                color: #000000;
            }
 
 
            .price {
                font-weight: 600;
                line-height: 72rpx;
                font-size: 50rpx;
                color: #000000;
 
                .dot {
                    font-size: 40rpx;
                    line-height: 56rpx;
                }
            }
 
            .status {
                width: 132rpx;
                height: 50rpx;
                border-radius: 26rpx;
                border: 2rpx solid #999999;
                color: #999999;
                line-height: 50rpx;
                font-size: 24rpx;
 
                text-align: center;
                margin-left: 16rpx;
            }
 
            .status.A,
            .status.J {
                border: 2rpx solid #04BA97;
                color: #04BA97;
            }
 
            .icon-loc {
                width: 24rpx;
                height: 30rpx;
                background-size: 100% 100%;
 
            }
 
            .icon-clock {
                width: 24rpx;
                height: 26rpx;
                background-size: 100% 100%;
 
            }
        }
    }
</style>