Mr.Shi
2023-08-28 bb086627477351918c63d0daae2f8ee7b6a1315d
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
<template>
    <view class="index">
        <!-- <web-view v-if="show" @onPostMessage="onMessage" :src="'https://dmtest.ahapp.net/doumeeplant_h5/#/appletLogin?code=' + code"></web-view> -->
        <!-- {{$store.state.statusbarHeight}} -->
        <u-sticky>
            <view class="plr50 pb30 nav-style">
                <view
                    :style="{paddingTop: `${statusbarHeight}px`, height: `${navHeight}px`, lineHeight:`${navHeight}px`, textAlign: 'center'}">
                    待办</view>
                <view class="cY">
                    <u-search placeholder="搜索关键字" bgColor="#f7f7f7" :showAction="false" @search="scrolltoupper"
                        shape="square" v-model="searchForm.name"></u-search>
                    <image src="../../static/filter@2x.png" class="img48 ml20" @click="filterAction" mode=""></image>
                </view>
                <view class="cY mt30">
                    <view class="sbtn rd8" :class="searchForm.type==0?'sbtn_green':'sbtn_black_rim'"
                        @click="selectType(0)">待办</view>
                    <view class="sbtn rd8 ml20" :class="searchForm.type==1?'sbtn_green':'sbtn_black_rim'"
                        @click="selectType(1)">已办</view>
                </view>
            </view>
        </u-sticky>
 
        <u-list :showScrollbar="false" @scrolltolower="scrolltolower" @scrolltoupper="scrolltoupper"
            :height="windowHeight - (statusbarHeight + navHeight + 120) + 'px'">
            <u-list-item v-for="(item, index) in projectList" :key="index">
                <view class="box_list">
                    <view class="box_list_item" @click="jump(item)">
                        <view class="box_list_item_icon">
                            <image src="../../static/daiban_ic_daiban@2x.png" mode=""></image>
                        </view>
                        <view class="box_list_item_nr">
                            <view class="box_list_item_nr_top">
                                <span>{{item.title}}</span>
                                <span>{{item.createTime}}</span>
                            </view>
                            <view class="box_list_item_nr_bottom">
                                {{item.content}}
                            </view>
                        </view>
                    </view>
                </view>
            </u-list-item>
        </u-list>
 
        <myTabbar :index="0" />
    </view>
</template>
 
<script>
    import myTabbar from "@/components/myTabber.vue"
    import {
        mapState
    } from 'vuex'
    export default {
        components: {
            myTabbar
        },
        data() {
            return {
                code: '',
                windowHeight: '',
                show: false,
                searchForm: {
                    name: '',
                    type: 0
                },
                projectList: [
                    {title: '212132', createTime: '2023-08-28', content: 'asdsadsax手打大萨达的啊实打as'},
                    {title: '212132', createTime: '2023-08-28', content: 'asdsadsax手打大萨达的啊实打as'},
                    {title: '212132', createTime: '2023-08-28', content: 'asdsadsax手打大萨达的啊实打as'},
                    {title: '212132', createTime: '2023-08-28', content: 'asdsadsax手打大萨达的啊实打as'},
                ]
            }
        },
        computed: {
            ...mapState(['statusbarHeight', 'navHeight']),
        },
        onLoad() {
            uni.getSystemInfo({
                success: res => {
                    this.windowHeight = res.windowHeight
                }
            })
 
            var that = this
            uni.login({
                provider: 'weixin',
                success: function(loginRes) {
                    // console.log(loginRes);
                    that.code = loginRes.code
                    that.show = true
                }
            });
        },
        methods: {
            onMessage(e) {
                console.log('12345654321')
            },
            scrolltolower() {},
            scrolltoupper() {},
            selectType(type) {
                if (this.searchForm.type == type) return
                this.searchForm.type = type
                this.scrolltoupper()
            },
            selectProject(item) {},
            filterAction() {
                
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .index {
        width: 100vw;
        height: 100vh;
    }
 
    .nav-style {
        border-bottom: 20rpx #f7f7f7 solid;
    }
 
    .box_list {
        width: 100%;
        padding: 0 30rpx;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
 
        .box_list_item {
            padding: 30rpx 0;
            display: flex;
            border-bottom: 1rpx solid #E5E5E5;
 
            &:last-child {
                border: none;
            }
 
            .box_list_item_icon {
                flex-shrink: 0;
                width: 64rpx;
                height: 64rpx;
                margin-right: 24rpx;
                position: relative;
 
                .box_list_item_icon_active {
                    position: absolute;
                    right: 0;
                    top: 0;
                    width: 18rpx;
                    height: 18rpx;
                    border-radius: 50%;
                    background: #DE5243;
                    border: 2rpx solid #FFFFFF;
                }
 
                image {
                    width: 100%;
                    height: 100%;
                }
            }
 
            .box_list_item_nr {
                flex: 1;
                display: flex;
                flex-direction: column;
 
                .box_list_item_nr_top {
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
 
                    span {
                        &:first-child {
                            font-size: 30rpx;
                            font-weight: 500;
                            max-width: 450rpx;
                            color: #222222;
                            overflow: hidden;
                            white-space: nowrap;
                            text-overflow: ellipsis;
                            -o-text-overflow: ellipsis;
                        }
 
                        &:last-child {
                            flex-shrink: 0;
                            font-size: 24rpx;
                            font-weight: 400;
                            color: #999999;
                            margin-left: 10rpx;
                            overflow: hidden;
                            white-space: nowrap;
                            text-overflow: ellipsis;
                            -o-text-overflow: ellipsis;
                        }
                    }
                }
 
                .box_list_item_nr_bottom {
                    font-size: 28rpx;
                    font-weight: 400;
                    color: #666666;
                    margin-top: 16rpx;
                    word-break: break-all;
                }
            }
        }
    }
</style>