blob: bf86ec14fba303a1156f0a4e27f294cfbc367cf1 [file] [log] [blame]
guangchao.xu070005a2020-12-07 09:56:40 +08001<template>
2 <view class="chatIssue">
3 <!-- #ifdef APP-PLUS -->
4 <view class="bgColor"></view>
5 <!-- #endif -->
6 <u-sticky>
7 <view class="chatIssue-tabs">
8 <u-tabs :list="list" :current="current" @change="change" bar-width="250" item-width="250"></u-tabs>
9 </view>
10 <view class="chatIssue-con">
11 <view class="chatIssue-con-search">
12 <u-search placeholder="搜索关键词" v-model="val" action-text="+ 发布" :show-action="false" @search="search"></u-search>
13 </view>
guangchao.xu6cdd45e2021-04-16 17:44:30 +080014 <view class="chatIssue-con-add" @click="toPath('/pages/sub_index/issueQuestion')">
guangchao.xu070005a2020-12-07 09:56:40 +080015 <u-icon name="plus" color="#333333" size="32"></u-icon>
16 <text class="chatIssue-con-add-text">发布</text>
17 </view>
18 </view>
19 </u-sticky>
20 <view v-if="current===1">
21 <view class="chatIssue-item">
22 <view class="chatIssue-item-avatar">
23 <u-avatar :src="avatar" size="110"></u-avatar>
24 </view>
25 <view class="chatIssue-item-con">
guangchao.xu6cdd45e2021-04-16 17:44:30 +080026 <view class="chatIssue-item-con-title" @click="toPath('/pages/sub_index/chatDetails')">哇,好大的雪啊,你们那里雪大吗?</view>
guangchao.xu070005a2020-12-07 09:56:40 +080027 <view class="chatIssue-item-con-author">
28 <view class="chatIssue-item-con-author-left">
29 <text>张嚣</text>
30 <text>06:36</text>
31 </view>
32 <view class="chatIssue-item-con-author-km">
33 <u-icon name="map" color="#999999" size="24"></u-icon>
34 <text>3.6km</text>
35 </view>
36 </view>
37 <view class="chatIssue-item-con-desc">
38 早上一觉醒来,迷迷糊糊拉开窗帘,便见到如此景象忍不住想分享,太美了!!!
39 </view>
40 <view class="chatIssue-item-con-img">
41 <scroll-view :scroll-x="true" class="scrollView">
42 <view class="chatIssue-item-con-img-items">
43 <u-image width="100%" height="100%" mode="aspectFit" src="/static/images/index/bannar.png"></u-image>
44 </view>
45 <view class="chatIssue-item-con-img-items">
46 <u-image width="100%" height="100%" mode="aspectFit" src="/static/images/index/bannar.png"></u-image>
47 </view>
48 <view class="chatIssue-item-con-img-items">
49 <u-image width="100%" height="100%" mode="aspectFit" src="/static/images/index/bannar.png"></u-image>
50 </view>
51 <view class="chatIssue-item-con-img-items">
52 <u-image width="100%" height="100%" mode="aspectFit" src="/static/images/index/bannar.png"></u-image>
53 </view>
54 </scroll-view>
55 </view>
56 <view class="chatIssue-item-con-footer">
57 <view class="chatIssue-item-con-footer-watcher">
58 <u-icon name="eye" color="#999999" size="24"></u-icon>
59 <text>3456</text>
60 </view>
61 <view class="chatIssue-item-con-footer-chat">
62 <u-icon name="chat" color="#999999" size="24"></u-icon>
63 <text>34</text>
64 </view>
65 </view>
66 </view>
67 </view>
68 </view>
69 <view v-if="current === 0">
70 <u-empty text="暂无动态" mode="list" margin-top="300"></u-empty>
71 </view>
72 <view v-if="current === 2">
73 <u-empty text="暂无动态" mode="list" margin-top="300"></u-empty>
74 </view>
75 </view>
76</template>
77
78<script>
79 export default {
80 data() {
81 return {
82 list: [{
83 name: "人气热帖"
84 },
85 {
86 name: "附近邻居"
87 },
88 {
89 name: "最新发布"
90 }
91 ],
92 current: 1,
93 val: "",
94 avatar: ""
95 }
96 },
97 methods: {
98 change(index) {
99 this.current = index
100 },
101 search(e) {
102 uni.showToast({
103 icon: "none",
104 title: "搜索服务功能暂未开通",
105 duration: 1500
106 })
107 },
108
109 }
110 }
111</script>
112
113<style scoped lang="scss">
114 .scrollView {
115 white-space: nowrap;
116 height: 180rpx;
117 width: 100%;
118 }
119
120 /* #ifdef APP-PLUS */
121 .bgColor {
122 position: fixed;
123 top: 0;
124 left: 0;
125 right: 0;
126 bottom: 0;
127 background: #FFFFFF;
128 z-index: -1;
129 }
130
131 /* #endif */
132 page {
133 background-color: #FFFFFF;
134 }
135
136 .chatIssue {
137 font-family: "PingFang-SC-Medium";
138 background-color: #FFFFFF;
139
140 &-tabs {
141 box-shadow: 0 0 2rpx 6rpx rgba(222, 224, 228, 0.4);
142 }
143
144 &-con {
145 display: flex;
146 justify-content: space-between;
147 padding: 20rpx 30rpx 30rpx;
148 align-items: center;
149 background-color: #FFFFFF;
150
151 &-search {
152 width: 80%;
153 }
154
155 &-add {
156 width: 15%;
157 fontSize: '30rpx';
158 font-family: 'PingFang-SC-Medium';
159 color: '#333333';
160 display: flex;
161 align-items: center;
162
163 &-text {
164 margin-left: 10rpx;
165 }
166 }
167 }
168
169 &-item {
170 padding: 30rpx;
171 display: flex;
172 justify-content: space-between;
173
174 &-con {
175 width: 80%;
176 margin-left: 30rpx;
177 margin-top: 15rpx;
178
179 &-title {
180 color: #333333;
181 font-size: 30rpx;
182 }
183
184 &-author {
185 padding: 10rpx 0 30rpx;
186 display: flex;
187 justify-content: space-between;
188 align-items: center;
189 color: #999999;
190 font-size: 25rpx;
191
192 &-left {
193 text {
194 margin-right: 20rpx;
195 }
196 }
197 }
198
199 &-desc {
200 color: #666666;
201 font-size: 28rpx;
202 }
203
204 &-footer {
205 display: flex;
206 align-items: center;
207 font-size: 24rpx;
208 color: #999999;
209
210 &-watcher {
211 margin-right: 50rpx;
212
213 text {
214 margin-left: 10rpx;
215 }
216 }
217
218 &-chat {
219 text {
220 margin-left: 10rpx;
221 }
222 }
223 }
224
225 &-img {
226 width: 100%;
227 margin: 10rpx 0;
228
229 &-items {
230 margin-right: 30rpx;
231 border-radius: 20rpx;
232 display: inline-block;
233 width: 170rpx;
234 height: 170rpx;
235 background-color: #999999;
236 }
237 }
238 }
239 }
240 }
241</style>