zhaojs
2023-07-25 b4e86325675725c34dc6c43ab8dd2b3533eb6887
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
<template>
    <view class="specialOffer-wrapper colCen wrapperLayer">
        <view class="topbarbox"></view>
        <view class="fixed-content colCen">
            <view class="barbac"></view>
            <view class="topbarbox"></view>
            <view class="headerBar-container colCen">
                <view class="borderBox rowCenBet headerbox">
                    <view class="leftbackicon defIcon" @tap="goback()">
                        <image src="@/static/images/home/return.png" mode=""></image>
                    </view>
                    <view class="titleBox rowCen">
                        <view class="titleText">
                            单页推广中心
                        </view>
                    </view>
                    <view class="rightEmpty">
                    </view>
                </view>
            </view>
        </view>
        <view class="shoplist-container colCen">
            <view class="tips-box">
                <view class="title">使用步骤</view>
                <view class="contnet">
                    <view>可以直接点击复制链接分享到朋友圈、社群等</view>
                    <view>专属链接中已经包含您的信息</view>
                    <!-- <view>其他人通过您分享的单页下单,订单佣金会自动计入到您的账户中</view> -->
                    <view>如遇域名被封风险,联系平台管理员,会尽快修复,或等 待24小时后重新生成</view>
                </view>
                <view class="tips-text">
                    tips:复制链接之前请先进行淘宝授权/拼多多授权,否则无法跟踪到订单哦
                </view>
            </view>
            <block v-for="(items,index) in  singlePageList" :key='index'>
                <view class="prod-card">
                    <view class="card-top">
                        <view class="img-box">
                            <image class="card-img" :src="items.image" mode=""></image>
                        </view>
                        <view class="top-right">
                            <view class="card-title">{{items.title}}</view>
                            <view class="card-introduction">{{items.content}}</view>
                            <view class="card-time">{{items.daterange}}</view>
                        </view>
                    </view>
                    <view class="card-botton">
                        <view>
                            <view class="promotion-quantity">{{items.tg_people}}人已推广</view>
                        </view>
                        <view class="botton-right">
                            <view class="preview" v-on:click="previewHtml(items)">预览</view>
                            <view class="copy-url" v-on:click="copyContent(items)">复制链接</view>
                        </view>
                    </view>
                </view>
            </block>
            
            
        </view>
    </view>
</template>
 
<script>
    
    export default {
    
        data() {
            return {
                pageTop: 0,
                nowCurrent: 0,
                scrollTop: 0,
                navList: [],
 
                fiexdHeight: '',
                fiexdtop: '',
                singlePageList: [],
                pageCurrent: 0,
                canloadmore: false,
                loadstatus: 'loading'
            }
        },
        onLoad() {
            this.getData()
        },
        onPageScroll(e) {
            this.scrollTop = e.scrollTop
        },
        onReachBottom() {
            if (this.canloadmore) {
                this.getData()
            }
        },
        mounted() {
 
        },
        methods: {
            getData() {
                var that = this;
                this.$u.api.activitySingle({
                    page: this.pageCurrent,
                    pageSize: 10,
                    type: 1
                }).then(e => {
                    if(e.code != 0) return that.$alert(e.msg)
                    uni.stopPullDownRefresh();
                    console.log("返回参数"+JSON.stringify(res));
                    var res = e.data.list;
                    if (res.length < 10) {
                        that.pageCurrent += 10
                        that.canloadmore = false
                        that.loadstatus = 'nomarl'
                    } else {
                        that.canloadmore = true
                        that.loadstatus = 'loading'
                        that.pageCurrent += 10
                    }
                    that.singlePageList = that.singlePageList.concat(res)
                }).catch(function (err) {
                })
            },
 
 
            previewHtml(items) {
                var that = this;
                this.$u.api.singlePageLink({template_id: items.template_id}).then(e => {
                    if(e.code == 1)return that.$alert(e.msg);
                    uni.navigateTo({
                        url: '../webView/webView?url=' + e.data.url
                    })
                    
                }).catch(function (err) {
                })                
            },
 
            copyContent(items){
                var that = this;
                this.$u.api.singlePageLink({template_id: items.template_id}).then(e => {
                    if(e.code == 1)return that.$alert(e.msg);
                    uni.setClipboardData({
                        data: items.content+ e.data.url,
                        success: (r => {
                            return that.$alert('复制成功');
                        }),
                    })
                    
                }).catch(function (err) {
                })
            },
            
            
            goback() {
                uni.navigateBack({
                    delta: 1
                })
            }
 
        },
        onPullDownRefresh() {
            this.pageCurrent = 0;
            this.canloadmore = false;
            this.singlePageList = [];
            this.loadstatus = 'loading';
            this.getData()
        }
    }
</script>
 
<style lang="scss">
    
    .specialOffer-wrapper {
        width: 100%;
        min-height: 380rpx;
        position: relative;
 
        .topbac-content {
            width: 100%;
            height: 380rpx;
            position: absolute;
 
            .colorContent {
                width: 100%;
                height: 380rpx;
            }
        }
 
        .fixed-content {
            width: 100%;
            overflow: hidden;
            position: fixed;
            z-index: 100;
 
            .barbac {
                width: 100%;
                height: 380rpx;
                background-color: #fff;
                color: #333333;
                // background: linear-gradient(266deg, #7D0DFC, #D116FD);
                background-size: 100% 100%;
                position: absolute;
                pointer-events: none;
                top: 0;
                left: 0;
            }
 
            .headerBar-container {
                width: 100%;
                height: 90rpx;
                z-index: 100;
 
                .headerbox {
                    width: 100%;
                    height: 90rpx;
                    padding: 0 32rpx;
 
                    .leftbackicon {
                        width: 32rpx;
                        height: 32rpx;
                        display: flex;
                        align-items: center;
                        justify-content: flex-start;
                        image {
                            width: 17rpx;
                            height: 32rpx;
                        }
                    }
 
                    .titleBox {
                        .titleIcon {
                            width: 46rpx;
                            height: 37rpx;
                        }
 
                        .titleText {
                            font-size: 32rpx;
                            font-weight: 500;
                            // color: #FFFFFF;
                            color: #333333;
                            margin-left: 15rpx;
                            z-index: 101;
                        }
                    }
 
                    .rightEmpty {
                        width: 32rpx;
                        height: 32rpx;
                    }
                }
            }
 
            .rangeList-container {
                width: 100%;
                height: 90rpx;
                padding: 0 32rpx;
                z-index: 101;
 
                .scrollview-content {
                    width: 100%;
                    height: 100%;
                    white-space: nowrap;
                    vertical-align: center;
 
                    .rangeItem {
                        display: inline-flex;
                        margin-right: 45rpx;
                        margin-top: 15rpx;
 
                        .nameBox {
                            font-size: 30rpx;
                            font-weight: 500;
                            color: #FFFFFF;
                        }
 
                        .border {
                            width: 60%;
                            height: 1rpx;
                            background: transparent;
                        }
                    }
 
                    .rangeItem-active {
                        .nameBox {
                            font-size: 32rpx;
                        }
 
                        .border {
                            background: #FFFFFF;
                            margin-top: 8rpx;
                        }
                    }
                }
            }
        }
 
        .shoplist-container {
            z-index: 1;
            width: 100%;
            margin-top: 120rpx;
            padding: 0 32rpx;
            .tips-box{
                width: 100%;
                height: 420rpx;
                background: #FFFFFF;
                border-radius: 20rpx;
                padding: 0 20rpx;
                margin-bottom: 20rpx;
                .title{
                    font-size: 32rpx;
                    font-family: PingFang SC;
                    font-weight: 500;
                    color: #333333;
                    padding-top: 28rpx;
                    text-overflow:ellipsis;
                    overflow:hidden;
                    white-space:nowrap;
                }
                .contnet{
                    width: 655rpx;
                    font-size: 26rpx;
                    font-family: PingFang SC;
                    font-weight: 500;
                    color: #666666;
                    padding-top: 35rpx;
                }
                .tips-text{
                    font-size: 26rpx;
                    font-family: PingFang SC;
                    font-weight: 500;
                    color: #FF3824;
                    line-height: 34rpx;
                    padding-top: 30rpx;
                }
            }
            .prod-card{
                display: flex;
                flex-direction: column;
                width: 710rpx;
                height: 369rpx;
                background: #FFFFFF;
                border-radius: 20rpx;
                padding: 20rpx;
                margin-bottom: 20rpx;
                .card-top{
                    display: flex;
                    .img-box{
                        width: 240rpx;
                        height: 240rpx;
                        background: #E5E5E5;
                        border-radius: 10rpx;
                        .card-img{
                            width: 100%;
                            height: 100%;
                            border-radius: 10rpx;
                        }
                    }
                    .top-right{
                        padding-left: 20rpx;
                    }
                    .card-title{
                        width: 400rpx;
                        font-size: 30rpx;
                        font-family: PingFang SC;
                        font-weight: 500;
                        color: #333333;
                        line-height: 34rpx;
                        text-overflow:ellipsis;
                        overflow:hidden;
                        white-space:nowrap;
                    }
                    .card-introduction{
                        width: 377rpx;
                        font-size: 26rpx;
                        font-family: PingFang SC;
                        font-weight: 500;
                        color: #FE7804;
                        line-height: 34rpx;
                        padding-top: 34rpx;
                        overflow: hidden;
                        text-overflow: ellipsis; 
                        display: -webkit-box;
                        -webkit-line-clamp: 2; // 设置两行文字溢出
                        -webkit-box-orient: vertical;
                        overflow:hidden;
                        text-overflow:ellipsis;
                    }
                    .card-time{
                        width: 262rpx;
                        font-size: 24rpx;
                        font-family: PingFang SC;
                        font-weight: 500;
                        color: #666666;
                        line-height: 34rpx;
                        padding-top: 30rpx;
                        
                    }
                }
                .card-botton{
                    display: flex;
                    padding-top: 34rpx;
                    align-items: center;
                    justify-content: space-between;
                    .promotion-quantity{
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        min-width: 176rpx;
                        height: 44rpx;
                        padding: 12rpx;
                        font-size: 24rpx;
                        background: #FEEFE8;
                        color: #FE7804;
                        border-radius: 6rpx;
                    }
                    .botton-right{
                        display:flex;
                        .preview{
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            width: 140rpx;
                            height: 60rpx;
                            background-color: #FEEFE8;
                            border: 1rpx solid #FE7804;
                            border-radius: 30px;
                            font-weight: 500;
                            color: #FE7804;
                            
                        }
                        .copy-url{
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            width: 178rpx;
                            height: 60rpx;
                            background: linear-gradient(-90deg, #FD5703, #FE7F04);
                            border-radius: 30rpx;
                            font-weight: 500;
                            color: #FFFFFF;
                            margin-left: 30rpx;
                            
                        }
                    }
                    
                }
            }
        }
    }
</style>