正在显示
14 个修改的文件
包含
486 行增加
和
138 行删除
@@ -7,6 +7,8 @@ Page({ | @@ -7,6 +7,8 @@ Page({ | ||
7 | data: { | 7 | data: { |
8 | max: 100, | 8 | max: 100, |
9 | index:'', | 9 | index:'', |
10 | + url:'', | ||
11 | + content:'', | ||
10 | }, | 12 | }, |
11 | 13 | ||
12 | getText(e) { | 14 | getText(e) { |
@@ -23,7 +25,7 @@ Page({ | @@ -23,7 +25,7 @@ Page({ | ||
23 | 25 | ||
24 | goCheck(e){ | 26 | goCheck(e){ |
25 | wx.navigateTo({ | 27 | wx.navigateTo({ |
26 | - url: '/pages/index/release/release?index='+this.data.index, | 28 | + url: '/pages/index/release/release?index=' + this.data.index + '&content=' + this.data.content, |
27 | }) | 29 | }) |
28 | 30 | ||
29 | // wx.navigateTo({ | 31 | // wx.navigateTo({ |
@@ -36,7 +38,8 @@ Page({ | @@ -36,7 +38,8 @@ Page({ | ||
36 | */ | 38 | */ |
37 | onLoad: function(options) { | 39 | onLoad: function(options) { |
38 | this.setData({ | 40 | this.setData({ |
39 | - index:options.index | 41 | + index:options.index, |
42 | + url:options.url | ||
40 | }) | 43 | }) |
41 | }, | 44 | }, |
42 | 45 |
1 | <!--pages/my/draft/draft.wxml--> | 1 | <!--pages/my/draft/draft.wxml--> |
2 | <view class='content_box'> | 2 | <view class='content_box'> |
3 | <view class='item_list'> | 3 | <view class='item_list'> |
4 | - <image class='list_img' src='/images/img3.png'></image> | 4 | + <image class='list_img' src='{{url}}'></image> |
5 | <view class='list_content_box'> | 5 | <view class='list_content_box'> |
6 | <textarea class="areas" placeholder='请输入简要描述' minlength="{{min}}" maxlength="{{max}}" bindinput="getText"> | 6 | <textarea class="areas" placeholder='请输入简要描述' minlength="{{min}}" maxlength="{{max}}" bindinput="getText"> |
7 | <text class="currentWordNumber">{{currentWordNumber|0}}/{{max}}</text> | 7 | <text class="currentWordNumber">{{currentWordNumber|0}}/{{max}}</text> |
@@ -30,6 +30,9 @@ Page({ | @@ -30,6 +30,9 @@ Page({ | ||
30 | list: [], | 30 | list: [], |
31 | order: 1, | 31 | order: 1, |
32 | poster_list: [], | 32 | poster_list: [], |
33 | + img_state:false, | ||
34 | + imgUrl:'', | ||
35 | + img_text:'', | ||
33 | 36 | ||
34 | // https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1534766809331&di=012cc4ad15d457ffa55c6537503eb84a&imgtype=0&src=http%3A%2F%2Fpicture.5068.com%2Fallimg%2F121120%2F4-1211201G920.jpg | 37 | // https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1534766809331&di=012cc4ad15d457ffa55c6537503eb84a&imgtype=0&src=http%3A%2F%2Fpicture.5068.com%2Fallimg%2F121120%2F4-1211201G920.jpg |
35 | cardPath: '', | 38 | cardPath: '', |
@@ -47,9 +50,26 @@ Page({ | @@ -47,9 +50,26 @@ Page({ | ||
47 | var imgs = list[mindex].img | 50 | var imgs = list[mindex].img |
48 | var current = e.currentTarget.dataset.src | 51 | var current = e.currentTarget.dataset.src |
49 | console.log(imgs) | 52 | console.log(imgs) |
50 | - wx.previewImage({ | ||
51 | - current: current, | ||
52 | - urls: imgs, | 53 | + this.setData({ |
54 | + imgUrl:current, | ||
55 | + img_text:e.currentTarget.dataset.text, | ||
56 | + img_state:true | ||
57 | + }) | ||
58 | + wx.hideTabBar({ | ||
59 | + | ||
60 | + }) | ||
61 | + // wx.previewImage({ | ||
62 | + // current: current, | ||
63 | + // urls: imgs, | ||
64 | + // }) | ||
65 | + }, | ||
66 | + | ||
67 | + cancle_img(){ | ||
68 | + this.setData({ | ||
69 | + img_state:false | ||
70 | + }) | ||
71 | + wx.showTabBar({ | ||
72 | + | ||
53 | }) | 73 | }) |
54 | }, | 74 | }, |
55 | 75 |
@@ -33,7 +33,7 @@ | @@ -33,7 +33,7 @@ | ||
33 | <view class='list_content'>{{item.title}}</view> | 33 | <view class='list_content'>{{item.title}}</view> |
34 | <view class='list_img_box'> | 34 | <view class='list_img_box'> |
35 | <block wx:for='{{item.img}}' wx:for-item='items' wx:key='' wx:for-index='sindex'> | 35 | <block wx:for='{{item.img}}' wx:for-item='items' wx:key='' wx:for-index='sindex'> |
36 | - <image src='{{items.img}}' catchtap='viewImg' data-src='{{items.img}}' data-mindex="{{mindex}}" data-sindex='{{sindex}}'></image> | 36 | + <image src='{{items.img}}' catchtap='viewImg' data-src='{{items.img}}' data-text='{{items.text}}' data-mindex="{{mindex}}" data-sindex='{{sindex}}'></image> |
37 | </block> | 37 | </block> |
38 | </view> | 38 | </view> |
39 | <view class='list_content'>{{item.text}}</view> | 39 | <view class='list_content'>{{item.text}}</view> |
@@ -75,14 +75,12 @@ | @@ -75,14 +75,12 @@ | ||
75 | </view> | 75 | </view> |
76 | </view> | 76 | </view> |
77 | <view class='iconfont icon-jia' bindtap='releaseInfo'></view> | 77 | <view class='iconfont icon-jia' bindtap='releaseInfo'></view> |
78 | - | ||
79 | <view class='mask_box2' wx:if='{{poster_state}}'> | 78 | <view class='mask_box2' wx:if='{{poster_state}}'> |
80 | <view class="canvasBox"> | 79 | <view class="canvasBox"> |
81 | <canvas canvas-id='myCanvas' style=''></canvas> | 80 | <canvas canvas-id='myCanvas' style=''></canvas> |
82 | </view> | 81 | </view> |
83 | <view class="btn" bindtap="saveImage">保存图片</view> | 82 | <view class="btn" bindtap="saveImage">保存图片</view> |
84 | <view class='iconfont icon-quxiao quxiao2' bindtap='canclePopup'></view> | 83 | <view class='iconfont icon-quxiao quxiao2' bindtap='canclePopup'></view> |
85 | - | ||
86 | <!-- <view class='popup_box2'> | 84 | <!-- <view class='popup_box2'> |
87 | <view> | 85 | <view> |
88 | <view class='popup_content_box'> | 86 | <view class='popup_content_box'> |
@@ -145,4 +143,11 @@ | @@ -145,4 +143,11 @@ | ||
145 | <view class='classify_btn classify_active' bindtap='confirmData'>确认</view> | 143 | <view class='classify_btn classify_active' bindtap='confirmData'>确认</view> |
146 | </view> | 144 | </view> |
147 | </view> | 145 | </view> |
146 | +</view> | ||
147 | + | ||
148 | +<view class='mask_box mask' wx:if='{{img_state}}' catchtap='cancle_img'> | ||
149 | + <view class='img_box'> | ||
150 | + <image src='{{imgUrl}}'></image> | ||
151 | + <text>{{img_text}}</text> | ||
152 | + </view> | ||
148 | </view> | 153 | </view> |
@@ -2,10 +2,6 @@ page { | @@ -2,10 +2,6 @@ page { | ||
2 | background: #fafafa; | 2 | background: #fafafa; |
3 | } | 3 | } |
4 | 4 | ||
5 | -.canvasBox { | ||
6 | - | ||
7 | -} | ||
8 | - | ||
9 | .canvasBox canvas { | 5 | .canvasBox canvas { |
10 | width: 686rpx; | 6 | width: 686rpx; |
11 | height: 1026rpx; | 7 | height: 1026rpx; |
@@ -17,7 +13,28 @@ page { | @@ -17,7 +13,28 @@ page { | ||
17 | .mask_box2 { | 13 | .mask_box2 { |
18 | position: relative; | 14 | position: relative; |
19 | } | 15 | } |
20 | - | 16 | +.mask{ |
17 | + background: rgba(0, 0, 0, 0.8); | ||
18 | + font-size: 32rpx; | ||
19 | + color: #FFFFFF; | ||
20 | + flex-wrap: wrap; | ||
21 | +} | ||
22 | +.img_box{ | ||
23 | + width: 100%; | ||
24 | + display: flex; | ||
25 | + align-items: center; | ||
26 | + justify-content: center; | ||
27 | + flex-wrap: wrap; | ||
28 | +} | ||
29 | +.img_box image{ | ||
30 | + margin: 0 auto; | ||
31 | +} | ||
32 | +.mask text{ | ||
33 | + display: inline-block; | ||
34 | + width: 100%; | ||
35 | + margin-top: 30rpx; | ||
36 | + text-align: center; | ||
37 | +} | ||
21 | .btn { | 38 | .btn { |
22 | width: 400rpx; | 39 | width: 400rpx; |
23 | height: 80rpx; | 40 | height: 80rpx; |
1 | // pages/index/release/release.js | 1 | // pages/index/release/release.js |
2 | -const app=getApp() | 2 | +const app = getApp() |
3 | Page({ | 3 | Page({ |
4 | /** | 4 | /** |
5 | * 页面的初始数据 | 5 | * 页面的初始数据 |
6 | */ | 6 | */ |
7 | data: { | 7 | data: { |
8 | - classify: ['11', '22'], | 8 | + classify: [], |
9 | current: 0, | 9 | current: 0, |
10 | max: 20, | 10 | max: 20, |
11 | max2: 200, | 11 | max2: 200, |
12 | - release_time: ['今天(周三)', '今天(周三)', '今天(周三)'], | 12 | + max3: 100, |
13 | + release_time: [], | ||
13 | currentTime: 0, | 14 | currentTime: 0, |
14 | relsese_state: false, | 15 | relsese_state: false, |
15 | - release_time2: [{ | ||
16 | - time: '今天(周三)', | ||
17 | - relsese_state: false | ||
18 | - }, { | ||
19 | - time: '今天(周三)', | ||
20 | - relsese_state: false | ||
21 | - }, , { | ||
22 | - time: '今天(周三)', | ||
23 | - relsese_state: false | ||
24 | - }, ], | ||
25 | - more_state:false, | ||
26 | - images:[], | ||
27 | - styles:[], | ||
28 | - title:'', | ||
29 | - text:'', | 16 | + relsese_state1: -1, |
17 | + release_time2: ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '012:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00', ], | ||
18 | + more_state: false, | ||
19 | + images: [], | ||
20 | + styles: [], | ||
21 | + title: '', | ||
22 | + text: '', | ||
23 | + imgInfo: '', | ||
24 | + img_state: false, | ||
25 | + tempUrl: [], | ||
26 | + time_info: '定时发送', | ||
27 | + open_time: '', | ||
28 | + temp_time2: '', | ||
29 | + temp_time: '', | ||
30 | + list_id:0, | ||
31 | + | ||
30 | }, | 32 | }, |
31 | 33 | ||
32 | setTitle(e) { | 34 | setTitle(e) { |
@@ -47,18 +49,56 @@ Page({ | @@ -47,18 +49,56 @@ Page({ | ||
47 | if (len > this.data.max2) return; | 49 | if (len > this.data.max2) return; |
48 | this.setData({ | 50 | this.setData({ |
49 | number: len, | 51 | number: len, |
50 | - text:content | 52 | + text: content |
53 | + }) | ||
54 | + }, | ||
55 | + | ||
56 | + setImgText(e) { | ||
57 | + var content = e.detail.value; | ||
58 | + this.setData({ | ||
59 | + imgInfo: content | ||
60 | + }) | ||
61 | + var len = parseInt(content.length); | ||
62 | + if (len > this.data.max) return; | ||
63 | + this.setData({ | ||
64 | + imgInfoNum: len //当前字数 | ||
65 | + }); | ||
66 | + }, | ||
67 | + | ||
68 | + goCheck() { | ||
69 | + var index = wx.getStorageSync('index') | ||
70 | + var images = this.data.images | ||
71 | + var tempUrl = this.data.tempUrl | ||
72 | + var imgInfo = this.data.imgInfo | ||
73 | + images[index].text = imgInfo | ||
74 | + console.log(images) | ||
75 | + this.setData({ | ||
76 | + img_state: false, | ||
77 | + images: images | ||
51 | }) | 78 | }) |
52 | }, | 79 | }, |
53 | 80 | ||
54 | //分类 | 81 | //分类 |
55 | setClassify(e) { | 82 | setClassify(e) { |
56 | - var index=e.currentTarget.dataset.index | ||
57 | - var classify=this.data.classify | ||
58 | - classify[index].state=!(classify[index].state) | ||
59 | - this.setData({ | ||
60 | - classify:classify | ||
61 | - }) | 83 | + var index = e.currentTarget.dataset.index |
84 | + var classify = this.data.classify | ||
85 | + classify[index].state = !(classify[index].state) | ||
86 | + this.setData({ | ||
87 | + classify: classify | ||
88 | + }) | ||
89 | + }, | ||
90 | + | ||
91 | + getStyleId(){ | ||
92 | + var styles = this.data.styles | ||
93 | + var classify = this.data.classify | ||
94 | + for(var i=0;i<classify;i++){ | ||
95 | + if(classify[i].state){ | ||
96 | + styles.push(classify[i].id) | ||
97 | + } | ||
98 | + } | ||
99 | + this.setData({ | ||
100 | + styles: styles | ||
101 | + }) | ||
62 | }, | 102 | }, |
63 | 103 | ||
64 | getStyle() { | 104 | getStyle() { |
@@ -68,10 +108,10 @@ Page({ | @@ -68,10 +108,10 @@ Page({ | ||
68 | app.post(url, param).then((res) => { | 108 | app.post(url, param).then((res) => { |
69 | if (res.data.code == 20000) { | 109 | if (res.data.code == 20000) { |
70 | var classify = res.data.data.list | 110 | var classify = res.data.data.list |
71 | - for(var i=0;i<classify.length;i++){ | ||
72 | - classify[i].state=false | 111 | + for (var i = 0; i < classify.length; i++) { |
112 | + classify[i].state = false | ||
73 | } | 113 | } |
74 | - that.setData({ | 114 | + that.setData({ |
75 | classify: classify, | 115 | classify: classify, |
76 | }) | 116 | }) |
77 | } | 117 | } |
@@ -80,10 +120,12 @@ Page({ | @@ -80,10 +120,12 @@ Page({ | ||
80 | 120 | ||
81 | //选择发布时间 | 121 | //选择发布时间 |
82 | selectTime(e) { | 122 | selectTime(e) { |
83 | - const self = this; | 123 | + const that = this; |
84 | const current = e.currentTarget.dataset.index; | 124 | const current = e.currentTarget.dataset.index; |
85 | - self.setData({ | ||
86 | - currentTime: current | 125 | + var lastMonth = this.data.lastMonth |
126 | + that.setData({ | ||
127 | + currentTime: current, | ||
128 | + temp_time2: lastMonth[current] | ||
87 | }); | 129 | }); |
88 | }, | 130 | }, |
89 | 131 | ||
@@ -91,9 +133,68 @@ Page({ | @@ -91,9 +133,68 @@ Page({ | ||
91 | setTime(e) { | 133 | setTime(e) { |
92 | const index = e.currentTarget.dataset.index; | 134 | const index = e.currentTarget.dataset.index; |
93 | var release_time2 = this.data.release_time2 | 135 | var release_time2 = this.data.release_time2 |
94 | - release_time2[index].relsese_state = !(release_time2[index].relsese_state) | 136 | + var relsese_state1 = this.data.relsese_state1 |
137 | + if (relsese_state1 == index) { | ||
138 | + return false | ||
139 | + } else { | ||
140 | + this.setData({ | ||
141 | + relsese_state1: index, | ||
142 | + temp_time: release_time2[index] | ||
143 | + }) | ||
144 | + } | ||
145 | + }, | ||
146 | + | ||
147 | + getTime() { | ||
148 | + var date = new Date() | ||
149 | + var week = date.getDay() | ||
150 | + var info = ""; | ||
151 | + var year = date.getFullYear() | ||
152 | + var month = date.getMonth() | ||
153 | + var day = date.getDate() | ||
154 | + var hours = date.getHours() | ||
155 | + var minutes = date.getMinutes() | ||
156 | + var seconds = date.getSeconds() | ||
157 | + var release_time = this.data.release_time | ||
158 | + | ||
159 | + if (week == 0) { | ||
160 | + info = "周日"; | ||
161 | + } else if (week == 1) { | ||
162 | + info = "周一"; | ||
163 | + } else if (week == 2) { | ||
164 | + info = "周二"; | ||
165 | + } else if (week == 3) { | ||
166 | + info = "周三"; | ||
167 | + } else if (week == 4) { | ||
168 | + info = "周四"; | ||
169 | + } else if (week == 5) { | ||
170 | + info = "周五"; | ||
171 | + } else if (week == 6) { | ||
172 | + info = "周六"; | ||
173 | + } | ||
174 | + | ||
175 | + var lastMonth = []; | ||
176 | + for (var i = 0; i < 30; i++) { | ||
177 | + lastMonth.push(new Date(new Date() | ||
178 | + .setDate(new Date().getDate() + i)) | ||
179 | + .toLocaleString().substring(0, 9)) | ||
180 | + } | ||
181 | + | ||
95 | this.setData({ | 182 | this.setData({ |
96 | - release_time2: release_time2 | 183 | + release_time: release_time, |
184 | + lastMonth: lastMonth, | ||
185 | + }) | ||
186 | + | ||
187 | + }, | ||
188 | + | ||
189 | + tempTime() { | ||
190 | + var lastMonth = this.data.lastMonth | ||
191 | + var currentTime = this.data.currentTime | ||
192 | + var time = lastMonth[currentTime] | ||
193 | + var temp_time = this.data.temp_time | ||
194 | + var open_time = time + ' ' + temp_time | ||
195 | + console.log(open_time) | ||
196 | + this.setData({ | ||
197 | + open_time: open_time | ||
97 | }) | 198 | }) |
98 | }, | 199 | }, |
99 | 200 | ||
@@ -107,6 +208,7 @@ Page({ | @@ -107,6 +208,7 @@ Page({ | ||
107 | this.setData({ | 208 | this.setData({ |
108 | relsese_state: false | 209 | relsese_state: false |
109 | }) | 210 | }) |
211 | + this.tempTime() | ||
110 | }, | 212 | }, |
111 | 213 | ||
112 | //上传图片 | 214 | //上传图片 |
@@ -199,39 +301,50 @@ Page({ | @@ -199,39 +301,50 @@ Page({ | ||
199 | }) | 301 | }) |
200 | }, | 302 | }, |
201 | 303 | ||
202 | - goEdit(e){ | ||
203 | - var index=e.currentTarget.dataset.index | ||
204 | - wx.navigateTo({ | ||
205 | - url: '/pages/index/brief/brief?index='+index, | 304 | + goEdit(e) { |
305 | + var index = e.currentTarget.dataset.index | ||
306 | + var url = e.currentTarget.dataset.url | ||
307 | + wx.setStorageSync('index', index) | ||
308 | + this.setData({ | ||
309 | + img_state: true, | ||
310 | + index: index, | ||
311 | + url: url | ||
206 | }) | 312 | }) |
313 | + // wx.navigateTo({ | ||
314 | + // url: '/pages/index/brief/brief?index=' + index + '&url=' + url, | ||
315 | + // }) | ||
207 | }, | 316 | }, |
208 | 317 | ||
209 | - showMore(){ | 318 | + showMore() { |
210 | this.setData({ | 319 | this.setData({ |
211 | - more_state:!(this.data.more_state) | 320 | + more_state: !(this.data.more_state) |
212 | }) | 321 | }) |
213 | }, | 322 | }, |
214 | 323 | ||
215 | - setOpen(e){ | 324 | + setOpen(e) { |
325 | + wx.showToast({ | ||
326 | + title: '设置成功', | ||
327 | + }) | ||
216 | this.setData({ | 328 | this.setData({ |
217 | - open:e.currentTarget.dataset.open | 329 | + open: e.currentTarget.dataset.open, |
330 | + more_state:false | ||
218 | }) | 331 | }) |
219 | }, | 332 | }, |
220 | 333 | ||
221 | - tempClassify(){ | 334 | + tempClassify() { |
222 | var classify = this.data.classify | 335 | var classify = this.data.classify |
223 | - var styles=[] | 336 | + var styles = [] |
224 | for (var i = 0; i < classify.length; i++) { | 337 | for (var i = 0; i < classify.length; i++) { |
225 | - if (classify[i].state){ | 338 | + if (classify[i].state) { |
226 | styles.push(classify[i].id) | 339 | styles.push(classify[i].id) |
227 | } | 340 | } |
228 | } | 341 | } |
229 | this.setData({ | 342 | this.setData({ |
230 | - styles:styles | 343 | + styles: styles |
231 | }) | 344 | }) |
232 | }, | 345 | }, |
233 | 346 | ||
234 | - submitInfo(){ | 347 | + submitInfo() { |
235 | this.tempClassify() | 348 | this.tempClassify() |
236 | let url = '/home/index/fashion' | 349 | let url = '/home/index/fashion' |
237 | let params = { | 350 | let params = { |
@@ -241,7 +354,7 @@ Page({ | @@ -241,7 +354,7 @@ Page({ | ||
241 | styles: this.data.styles, | 354 | styles: this.data.styles, |
242 | open_time: this.data.open_time, | 355 | open_time: this.data.open_time, |
243 | open: this.data.open, | 356 | open: this.data.open, |
244 | - img: this.data.img | 357 | + img: JSON.stringify(this.data.images) |
245 | } | 358 | } |
246 | let header = { | 359 | let header = { |
247 | "XX-Token": wx.getStorageSync('token'), | 360 | "XX-Token": wx.getStorageSync('token'), |
@@ -250,17 +363,23 @@ Page({ | @@ -250,17 +363,23 @@ Page({ | ||
250 | app.post(url, params, header).then((res) => { | 363 | app.post(url, params, header).then((res) => { |
251 | console.log(res) | 364 | console.log(res) |
252 | if (res.data.code == 20000) { | 365 | if (res.data.code == 20000) { |
253 | - | 366 | + wx.navigateBack({ |
367 | + dalta:1 | ||
368 | + }) | ||
254 | } | 369 | } |
255 | 370 | ||
256 | }) | 371 | }) |
257 | }, | 372 | }, |
258 | 373 | ||
374 | + | ||
375 | + | ||
376 | + | ||
259 | /** | 377 | /** |
260 | * 生命周期函数--监听页面加载 | 378 | * 生命周期函数--监听页面加载 |
261 | */ | 379 | */ |
262 | onLoad: function(options) { | 380 | onLoad: function(options) { |
263 | this.getStyle() | 381 | this.getStyle() |
382 | + this.getTime() | ||
264 | }, | 383 | }, |
265 | 384 | ||
266 | /** | 385 | /** |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <view class='banner_box'> | 2 | <view class='banner_box'> |
3 | <view class='type_box' bindtap="showPicker"> | 3 | <view class='type_box' bindtap="showPicker"> |
4 | <view> | 4 | <view> |
5 | - <input placeholder='标题' value='{{title}}' bindinput='setTitle'></input> | 5 | + <input placeholder='标题' value='{{title}}' bindinput='setTitle'></input> |
6 | </view> | 6 | </view> |
7 | <text class="currentWordNumber">{{currentWordNumber|0}}/{{max}}</text> | 7 | <text class="currentWordNumber">{{currentWordNumber|0}}/{{max}}</text> |
8 | </view> | 8 | </view> |
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | <view class='upload_img'> | 16 | <view class='upload_img'> |
17 | <view class='icon_box'> | 17 | <view class='icon_box'> |
18 | <view class='iconfont icon-jian' catchtap="deleteImg" data-index="{{index}}"></view> | 18 | <view class='iconfont icon-jian' catchtap="deleteImg" data-index="{{index}}"></view> |
19 | - <view class="edit_label" catchtap="goEdit" data-index="{{index}}">编辑</view> | 19 | + <view class="edit_label" catchtap="goEdit" data-index="{{index}}" data-url='{{image.url}}'>编辑</view> |
20 | </view> | 20 | </view> |
21 | <image src='{{image.url}}' data-index="{{index}}" mode="aspectFill" bindtap="previewImg"></image> | 21 | <image src='{{image.url}}' data-index="{{index}}" mode="aspectFill" bindtap="previewImg"></image> |
22 | </view> | 22 | </view> |
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | </view> | 26 | </view> |
27 | </view> | 27 | </view> |
28 | <view class='hint_box'> | 28 | <view class='hint_box'> |
29 | - <view class='hint_label' bindtap='showMask'>今天14:00</view> | 29 | + <view class='hint_label' bindtap='showMask'>{{time_info}}</view> |
30 | <view class='hint_label more_box'> | 30 | <view class='hint_label more_box'> |
31 | <text catchtap='showMore'>公开</text> | 31 | <text catchtap='showMore'>公开</text> |
32 | <view class='more_label_box' wx:if='{{more_state}}'> | 32 | <view class='more_label_box' wx:if='{{more_state}}'> |
@@ -58,7 +58,7 @@ | @@ -58,7 +58,7 @@ | ||
58 | </scroll-view> | 58 | </scroll-view> |
59 | </view> | 59 | </view> |
60 | <view class='bottom_box'> | 60 | <view class='bottom_box'> |
61 | - <view class='bottom_btn'>确定</view> | 61 | + <view class='bottom_btn1' bindtap='submitInfo'>确定</view> |
62 | </view> | 62 | </view> |
63 | </view> | 63 | </view> |
64 | 64 | ||
@@ -67,14 +67,31 @@ | @@ -67,14 +67,31 @@ | ||
67 | <view class='release_title'>选择发布时间</view> | 67 | <view class='release_title'>选择发布时间</view> |
68 | <view class='release_content_box'> | 68 | <view class='release_content_box'> |
69 | <view class='release_left'> | 69 | <view class='release_left'> |
70 | - <view class="relsese_item {{currentTime==index?'relsese_active':''}} " catchtap='selectTime' wx:for='{{release_time}}' wx:key data-index='{{index}}'>{{item}}</view> | 70 | + <view class="relsese_item {{currentTime==index?'relsese_active':''}} " catchtap='selectTime' wx:for='{{lastMonth}}' wx:key data-index='{{index}}'> |
71 | + <text wx:if='{{index==0}}'>今天</text> | ||
72 | + <text wx:elif='{{index==1}}'>明天</text> | ||
73 | + <text wx:else>{{item}} </text> | ||
74 | + </view> | ||
71 | </view> | 75 | </view> |
72 | <view class='release_right'> | 76 | <view class='release_right'> |
73 | <view class="right_item" wx:for='{{release_time2}}' wx:key data-index='{{index}}' catchtap='setTime'> | 77 | <view class="right_item" wx:for='{{release_time2}}' wx:key data-index='{{index}}' catchtap='setTime'> |
74 | - <text>{{item.time}}</text> | ||
75 | - <text class='iconfont icon-dui' wx:if='{{item.relsese_state}}'></text> | 78 | + <text>{{item}}</text> |
79 | + <text class='iconfont icon-dui' wx:if='{{relsese_state1==index}}'></text> | ||
76 | </view> | 80 | </view> |
77 | </view> | 81 | </view> |
78 | </view> | 82 | </view> |
79 | </view> | 83 | </view> |
84 | +</view> | ||
85 | + | ||
86 | + | ||
87 | +<view class='mask_box2' wx:if='{{img_state}}'> | ||
88 | + <view class='item_list2'> | ||
89 | + <image class='list_img' src='{{url}}'></image> | ||
90 | + <view class='list_content_box'> | ||
91 | + <textarea class="areas" placeholder='请输入简要描述' minlength="{{min}}" maxlength="{{max3}}" bindinput="setImgText"> | ||
92 | + <text class="currentWordNumber">{{imgInfoNum|0}}/{{max3}}</text> | ||
93 | + </textarea> | ||
94 | + </view> | ||
95 | + </view> | ||
96 | + <view class='bottom_btn2' bindtap='goCheck'>确定</view> | ||
80 | </view> | 97 | </view> |
@@ -208,7 +208,7 @@ page { | @@ -208,7 +208,7 @@ page { | ||
208 | left: 0; | 208 | left: 0; |
209 | } | 209 | } |
210 | 210 | ||
211 | -.bottom_btn { | 211 | +.bottom_btn1 { |
212 | width: 690rpx; | 212 | width: 690rpx; |
213 | height: 80rpx; | 213 | height: 80rpx; |
214 | font-size: 36rpx; | 214 | font-size: 36rpx; |
@@ -220,9 +220,7 @@ page { | @@ -220,9 +220,7 @@ page { | ||
220 | justify-content: center; | 220 | justify-content: center; |
221 | } | 221 | } |
222 | 222 | ||
223 | -.bottom_btn:active { | ||
224 | - opacity: 0.7; | ||
225 | -} | 223 | + |
226 | 224 | ||
227 | .picker-title { | 225 | .picker-title { |
228 | margin: 50rpx 0 0 0; | 226 | margin: 50rpx 0 0 0; |
@@ -382,7 +380,7 @@ picker-view-column view { | @@ -382,7 +380,7 @@ picker-view-column view { | ||
382 | display: inline-block; | 380 | display: inline-block; |
383 | position: absolute; | 381 | position: absolute; |
384 | right: 0; | 382 | right: 0; |
385 | - bottom: -200rpx; | 383 | + bottom: -265rpx; |
386 | width: 230rpx; | 384 | width: 230rpx; |
387 | background: #fff; | 385 | background: #fff; |
388 | box-shadow: 0 8rpx 30rpx 0 #e5e5e5; | 386 | box-shadow: 0 8rpx 30rpx 0 #e5e5e5; |
@@ -415,6 +413,7 @@ picker-view-column view { | @@ -415,6 +413,7 @@ picker-view-column view { | ||
415 | bottom: 0; | 413 | bottom: 0; |
416 | left: 0; | 414 | left: 0; |
417 | background: #fff; | 415 | background: #fff; |
416 | + /* overflow: scroll; */ | ||
418 | } | 417 | } |
419 | 418 | ||
420 | .release_title { | 419 | .release_title { |
@@ -438,6 +437,8 @@ picker-view-column view { | @@ -438,6 +437,8 @@ picker-view-column view { | ||
438 | 437 | ||
439 | .release_left { | 438 | .release_left { |
440 | width: 300rpx; | 439 | width: 300rpx; |
440 | + height: 325rpx; | ||
441 | + overflow-y: scroll; | ||
441 | background: #f0f0f0; | 442 | background: #f0f0f0; |
442 | } | 443 | } |
443 | 444 | ||
@@ -453,6 +454,8 @@ picker-view-column view { | @@ -453,6 +454,8 @@ picker-view-column view { | ||
453 | 454 | ||
454 | .release_right { | 455 | .release_right { |
455 | width: 60%; | 456 | width: 60%; |
457 | + height: 325rpx; | ||
458 | + overflow-y: scroll; | ||
456 | background: #fff; | 459 | background: #fff; |
457 | } | 460 | } |
458 | 461 | ||
@@ -469,3 +472,71 @@ picker-view-column view { | @@ -469,3 +472,71 @@ picker-view-column view { | ||
469 | font-size: 30rpx; | 472 | font-size: 30rpx; |
470 | font-weight: bold; | 473 | font-weight: bold; |
471 | } | 474 | } |
475 | + | ||
476 | +/* */ | ||
477 | + | ||
478 | +.mask_box2 { | ||
479 | + padding: 30rpx; | ||
480 | + box-sizing: border-box; | ||
481 | + position: fixed; | ||
482 | + left: 0; | ||
483 | + top: 0; | ||
484 | + width: 100%; | ||
485 | + height: 100%; | ||
486 | + background: #fff; | ||
487 | + z-index: 90; | ||
488 | +} | ||
489 | + | ||
490 | +.list_img { | ||
491 | + width: 187rpx; | ||
492 | + height: 187rpx; | ||
493 | +} | ||
494 | + | ||
495 | +.item_list2 { | ||
496 | + display: flex; | ||
497 | + align-items: center; | ||
498 | +} | ||
499 | + | ||
500 | +.list_content_box { | ||
501 | + width: 80%; | ||
502 | + height: 187rpx; | ||
503 | + background: #f5f6fa; | ||
504 | + padding: 20rpx; | ||
505 | + box-sizing: border-box; | ||
506 | +} | ||
507 | + | ||
508 | +.areas { | ||
509 | + width: 100%; | ||
510 | + height: 100%; | ||
511 | + font-size: 26rpx; | ||
512 | + position: relative; | ||
513 | +} | ||
514 | + | ||
515 | +.currentWordNumber { | ||
516 | + position: absolute; | ||
517 | + bottom: 0rpx; | ||
518 | + right: 0; | ||
519 | + color: #999; | ||
520 | +} | ||
521 | + | ||
522 | +.list_content { | ||
523 | + display: flex; | ||
524 | + align-items: center; | ||
525 | + justify-content: space-between; | ||
526 | + font-size: 28rpx; | ||
527 | + color: #282829; | ||
528 | +} | ||
529 | + | ||
530 | +.bottom_btn2 { | ||
531 | + width: 320rpx; | ||
532 | + height: 80rpx; | ||
533 | + background: #000; | ||
534 | + box-shadow: 0rpx -8rpx 16rpx 0rpx rgba(0, 0, 0, 0.04); | ||
535 | + border-radius: 40rpx; | ||
536 | + font-size: 30rpx; | ||
537 | + color: #fff; | ||
538 | + display: flex; | ||
539 | + align-items: center; | ||
540 | + justify-content: center; | ||
541 | + margin: 350rpx auto 0 auto; | ||
542 | +} |
1 | // pages/index/search/search.js | 1 | // pages/index/search/search.js |
2 | -const app=getApp() | 2 | +const app = getApp() |
3 | Page({ | 3 | Page({ |
4 | 4 | ||
5 | /** | 5 | /** |
6 | * 页面的初始数据 | 6 | * 页面的初始数据 |
7 | */ | 7 | */ |
8 | data: { | 8 | data: { |
9 | - searchHistory:['111','222'], | 9 | + searchHistory: ['111', '222'], |
10 | imgs: ['/images/img3.png', '/images/img3.png', '/images/img3.png'], | 10 | imgs: ['/images/img3.png', '/images/img3.png', '/images/img3.png'], |
11 | - more_state:false, | ||
12 | - list:[] | 11 | + more_state: false, |
12 | + list: [], | ||
13 | + page:1, | ||
14 | + keyword:'', | ||
15 | + }, | ||
16 | + getSearch(e){ | ||
17 | + this.setData({ | ||
18 | + keyword:e.detail.value | ||
19 | + }) | ||
13 | }, | 20 | }, |
14 | 21 | ||
22 | + goSearch(e) { | ||
23 | + let that = this; | ||
24 | + let url = '/home/index/index'; | ||
25 | + let param = { | ||
26 | + page: this.data.page, | ||
27 | + order: '', | ||
28 | + sex: '', | ||
29 | + style_id: '', | ||
30 | + stature: '', | ||
31 | + weight: '', | ||
32 | + keyword: this.data.keyword, | ||
33 | + } | ||
34 | + let header = { | ||
35 | + 'XX-Token': wx.getStorageSync('token'), | ||
36 | + 'XX-Device-Type': 'wxapp' | ||
37 | + } | ||
38 | + app.post(url, param, header).then((res) => { | ||
39 | + if (res.data.code == 20000) { | ||
40 | + var list = res.data.data.list | ||
41 | + if (list != '') { | ||
42 | + that.setData({ | ||
43 | + list: list, | ||
44 | + page: res.data.data.page, | ||
45 | + }) | ||
46 | + } else { | ||
47 | + wx.showToast({ | ||
48 | + title: '暂无数据', | ||
49 | + icon: 'none' | ||
50 | + }) | ||
51 | + that.setData({ | ||
52 | + list: list, | ||
53 | + page: res.data.data.page, | ||
54 | + }) | ||
55 | + } | ||
56 | + } | ||
57 | + }).catch((errMsg) => {}) | ||
58 | + | ||
59 | + }, | ||
15 | previewImg(e) { | 60 | previewImg(e) { |
16 | const current = e.currentTarget.dataset.index; | 61 | const current = e.currentTarget.dataset.index; |
17 | var imgs = this.data.imgs; | 62 | var imgs = this.data.imgs; |
@@ -35,7 +80,7 @@ Page({ | @@ -35,7 +80,7 @@ Page({ | ||
35 | 80 | ||
36 | getData() { | 81 | getData() { |
37 | let url = '/home/index/history' | 82 | let url = '/home/index/history' |
38 | - let params = { } | 83 | + let params = {} |
39 | let header = { | 84 | let header = { |
40 | "XX-Token": wx.getStorageSync('token'), | 85 | "XX-Token": wx.getStorageSync('token'), |
41 | 'XX-Device-Type': 'wxapp' | 86 | 'XX-Device-Type': 'wxapp' |
@@ -44,14 +89,14 @@ Page({ | @@ -44,14 +89,14 @@ Page({ | ||
44 | console.log(res) | 89 | console.log(res) |
45 | if (res.data.code == 20000) { | 90 | if (res.data.code == 20000) { |
46 | this.setData({ | 91 | this.setData({ |
47 | - list:res.data.data.list | 92 | + list: res.data.data.list |
48 | }) | 93 | }) |
49 | } | 94 | } |
50 | 95 | ||
51 | }) | 96 | }) |
52 | }, | 97 | }, |
53 | 98 | ||
54 | - clearHistory(){ | 99 | + clearHistory() { |
55 | let url = '/home/index/historyDelete' | 100 | let url = '/home/index/historyDelete' |
56 | let params = {} | 101 | let params = {} |
57 | let header = { | 102 | let header = { |
@@ -61,7 +106,7 @@ Page({ | @@ -61,7 +106,7 @@ Page({ | ||
61 | app.post(url, params, header).then((res) => { | 106 | app.post(url, params, header).then((res) => { |
62 | console.log(res) | 107 | console.log(res) |
63 | if (res.data.code == 20000) { | 108 | if (res.data.code == 20000) { |
64 | - | 109 | + |
65 | } | 110 | } |
66 | 111 | ||
67 | }) | 112 | }) |
@@ -71,56 +116,56 @@ Page({ | @@ -71,56 +116,56 @@ Page({ | ||
71 | /** | 116 | /** |
72 | * 生命周期函数--监听页面加载 | 117 | * 生命周期函数--监听页面加载 |
73 | */ | 118 | */ |
74 | - onLoad: function (options) { | 119 | + onLoad: function(options) { |
75 | this.getData() | 120 | this.getData() |
76 | }, | 121 | }, |
77 | 122 | ||
78 | /** | 123 | /** |
79 | * 生命周期函数--监听页面初次渲染完成 | 124 | * 生命周期函数--监听页面初次渲染完成 |
80 | */ | 125 | */ |
81 | - onReady: function () { | 126 | + onReady: function() { |
82 | 127 | ||
83 | }, | 128 | }, |
84 | 129 | ||
85 | /** | 130 | /** |
86 | * 生命周期函数--监听页面显示 | 131 | * 生命周期函数--监听页面显示 |
87 | */ | 132 | */ |
88 | - onShow: function () { | 133 | + onShow: function() { |
89 | 134 | ||
90 | }, | 135 | }, |
91 | 136 | ||
92 | /** | 137 | /** |
93 | * 生命周期函数--监听页面隐藏 | 138 | * 生命周期函数--监听页面隐藏 |
94 | */ | 139 | */ |
95 | - onHide: function () { | 140 | + onHide: function() { |
96 | 141 | ||
97 | }, | 142 | }, |
98 | 143 | ||
99 | /** | 144 | /** |
100 | * 生命周期函数--监听页面卸载 | 145 | * 生命周期函数--监听页面卸载 |
101 | */ | 146 | */ |
102 | - onUnload: function () { | 147 | + onUnload: function() { |
103 | 148 | ||
104 | }, | 149 | }, |
105 | 150 | ||
106 | /** | 151 | /** |
107 | * 页面相关事件处理函数--监听用户下拉动作 | 152 | * 页面相关事件处理函数--监听用户下拉动作 |
108 | */ | 153 | */ |
109 | - onPullDownRefresh: function () { | 154 | + onPullDownRefresh: function() { |
110 | 155 | ||
111 | }, | 156 | }, |
112 | 157 | ||
113 | /** | 158 | /** |
114 | * 页面上拉触底事件的处理函数 | 159 | * 页面上拉触底事件的处理函数 |
115 | */ | 160 | */ |
116 | - onReachBottom: function () { | 161 | + onReachBottom: function() { |
117 | 162 | ||
118 | }, | 163 | }, |
119 | 164 | ||
120 | /** | 165 | /** |
121 | * 用户点击右上角分享 | 166 | * 用户点击右上角分享 |
122 | */ | 167 | */ |
123 | - onShareAppMessage: function () { | 168 | + onShareAppMessage: function() { |
124 | 169 | ||
125 | } | 170 | } |
126 | }) | 171 | }) |
@@ -3,13 +3,13 @@ | @@ -3,13 +3,13 @@ | ||
3 | <view class="head_search_box"> | 3 | <view class="head_search_box"> |
4 | <view class="input"> | 4 | <view class="input"> |
5 | <view class='iconfont icon-search fangdajing'></view> | 5 | <view class='iconfont icon-search fangdajing'></view> |
6 | - <input placeholder='请输入搜索相关内容' bindinput="inputKey" value="{{searchValue}}" bindconfirm="startSearch" placeholder-class='input_size' class='search_input' /> | 6 | + <input placeholder='请输入搜索相关内容' bindinput="getSearch" value="{{searchValue}}" bindconfirm="startSearch" placeholder-class='input_size' class='search_input' /> |
7 | <view class="iconfont icon-jia1 jia1" catchtap="clearInput"></view> | 7 | <view class="iconfont icon-jia1 jia1" catchtap="clearInput"></view> |
8 | </view> | 8 | </view> |
9 | - <view class="search-text" bindtap="startSearch">搜索</view> | 9 | + <view class="search-text" bindtap="goSearch">搜索</view> |
10 | </view> | 10 | </view> |
11 | 11 | ||
12 | - <view class="history_box"> | 12 | + <!-- <view class="history_box"> |
13 | <view class="head"> | 13 | <view class="head"> |
14 | <view class="title">搜索历史</view> | 14 | <view class="title">搜索历史</view> |
15 | <view class="clear" bindtap="clearHistory"> | 15 | <view class="clear" bindtap="clearHistory"> |
@@ -19,63 +19,63 @@ | @@ -19,63 +19,63 @@ | ||
19 | </view> | 19 | </view> |
20 | 20 | ||
21 | <view class="history_list {{searchHistory.length === 0?'text-center':''}}"> | 21 | <view class="history_list {{searchHistory.length === 0?'text-center':''}}"> |
22 | - <!-- <text wx:if="{{searchHistory.length === 0}}">暂无搜索历史~</text> --> | 22 | + <!-- <text wx:if="{{searchHistory.length === 0}}">暂无搜索历史~</text> |
23 | <view wx:for="{{searchHistory}}" wx:key="index" bindtap="clickHistory" data-index="{{index}}">{{item}}</view> | 23 | <view wx:for="{{searchHistory}}" wx:key="index" bindtap="clickHistory" data-index="{{index}}">{{item}}</view> |
24 | </view> | 24 | </view> |
25 | - </view> | 25 | + </view> --> |
26 | 26 | ||
27 | <!--文章内容--> | 27 | <!--文章内容--> |
28 | <view class='content_box'> | 28 | <view class='content_box'> |
29 | - <view class='content_item' wx:for='{{[1,2]}}' wx:key> | 29 | + <view class='content_item' wx:for='{{list}}' wx:for-index='mindex' wx:key> |
30 | <view class='left_box'> | 30 | <view class='left_box'> |
31 | - <view class='head_portrait' catchtap='showModal' data-index="{{index}}"> | ||
32 | - <image src='/images/head.png'></image> | 31 | + <view class='head_portrait'> |
32 | + <image src='{{item.avatar}}'></image> | ||
33 | </view> | 33 | </view> |
34 | </view> | 34 | </view> |
35 | <view class='item_list'> | 35 | <view class='item_list'> |
36 | <view class='list_head_box'> | 36 | <view class='list_head_box'> |
37 | - <view class='user_name' catchtap='showModal' data-index="{{index}}">名字</view> | ||
38 | - <view class='state_box'> | ||
39 | - <block> | ||
40 | - <view class='collect_box active' bindtap='collectInfo' data-index="{{index}}" data-id='{{item.id}}' data-hits='{{item.is_hits}}'> | ||
41 | - <text class='iconfont icon-shoucang0 star2'></text> | ||
42 | - <text class="collect_word">关注TA</text> | ||
43 | - </view> | ||
44 | - </block> | 37 | + <view class='user_name'>{{item.user_nickname}}</view> |
38 | + <view class=' state_box'> | ||
39 | + <view class="collect_box {{item.user_host==1?'active':''}}" catchtap='attention' data-index="{{mindex}}" data-id='{{item.open_user_id}}'> | ||
40 | + <text class="collect_word">关注TA</text> | ||
41 | + </view> | ||
45 | </view> | 42 | </view> |
46 | </view> | 43 | </view> |
47 | - <view bindtap='listDetail' data-post_id='{{item.id}}' data-index="{{index}}"> | ||
48 | - <view class='list_content'>fsdfdsfdsf</view> | 44 | + <view catchtap='goDetail' data-id='{{item.id}}' data-index="{{index}}"> |
45 | + <view class='list_content'>{{item.title}}</view> | ||
49 | <view class='list_img_box'> | 46 | <view class='list_img_box'> |
50 | - <image src='{{items}}' wx:for='{{imgs}}' wx:for-item='items' wx:key='' bindtap='previewImg' data-index="{{index}}"></image> | 47 | + <block wx:for='{{item.img}}' wx:for-item='items' wx:key='' wx:for-index='sindex'> |
48 | + <image src='{{items.img}}' catchtap='viewImg' data-src='{{items.img}}' data-text='{{items.text}}' data-mindex="{{mindex}}" data-sindex='{{sindex}}'></image> | ||
49 | + </block> | ||
51 | </view> | 50 | </view> |
52 | - <view class='list_content'>fsdfdsfdsf</view> | 51 | + <view class='list_content'>{{item.text}}</view> |
53 | </view> | 52 | </view> |
54 | <view class='list_state_box'> | 53 | <view class='list_state_box'> |
55 | - <view class='time'>2019</view> | 54 | + <view class='time'>{{item.open_time}}</view> |
56 | <view class='list_icon'> | 55 | <view class='list_icon'> |
57 | - <text bindtap='likeCharge' data-index="{{index}}" data-id='{{item.id}}' data-is_paise='{{item.is_paise}}'> | ||
58 | - <text class='iconfont icon-heart xin1' wx:if="{{!item.is_paise}}"></text> | ||
59 | - <text class='iconfont icon-dianzan- zan'></text> | ||
60 | - <text class=''>0</text> | ||
61 | - </text> | ||
62 | - <text bindtap='review' data-id='{{item.id}}'> | ||
63 | - <text class='iconfont icon-pinglun pinglun1'></text> | ||
64 | - <text>0</text> | ||
65 | - </text> | ||
66 | - <text> | ||
67 | - <text class='iconfont icon-shoucang zan'></text> | ||
68 | - <text class=''>0</text> | ||
69 | - </text> | 56 | + <view catchtap='likeCharge' data-index="{{mindex}}" data-id='{{item.id}}'> |
57 | + <text class='iconfont icon-dianzan2 zan' wx:if="{{item.user_support==1}}"></text> | ||
58 | + <text class='iconfont icon-huida pinglun1' wx:else></text> | ||
59 | + <text class=''>{{item.support}}</text> | ||
60 | + </view> | ||
61 | + <view catchtap='review' data-id='{{item.id}}' data-type='review'> | ||
62 | + <text class='iconfont icon-pinglun pinglun1'></text> | ||
63 | + <text>{{item.table_num}}</text> | ||
64 | + </view> | ||
65 | + <view catchtap='collectInfo' data-index="{{mindex}}" data-id='{{item.id}}'> | ||
66 | + <text class='iconfont icon-shoucang2 zan' wx:if='{{item.user_collect==1}}'></text> | ||
67 | + <text class='iconfont icon-shoucang4 pinglun1' wx:else></text> | ||
68 | + <text class=''>{{item.collect}}</text> | ||
69 | + </view> | ||
70 | <view class='more_box'> | 70 | <view class='more_box'> |
71 | - <text class='iconfont icon-gengduo' bindtap='showMore'></text> | ||
72 | - <view class='more_label_box' wx:if='{{more_state}}'> | ||
73 | - <view class='more_item'> | 71 | + <text class='iconfont icon-gengduo' catchtap='showMore' data-index='{{mindex}}'></text> |
72 | + <view class='more_label_box' wx:if='{{item.more_state}}'> | ||
73 | + <view class='more_item' catchtap='showPoster' data-id="{{item.id}}"> | ||
74 | <text class='iconfont icon-haibao more'></text> | 74 | <text class='iconfont icon-haibao more'></text> |
75 | <text>生成分享海报</text> | 75 | <text>生成分享海报</text> |
76 | </view> | 76 | </view> |
77 | <view class='more_line'></view> | 77 | <view class='more_line'></view> |
78 | - <view class='more_item' bindtap='complain'> | 78 | + <view class='more_item' catchtap='complain' data-id='{{item.id}}' data-type='complain'> |
79 | <text class='iconfont icon-jubao more'></text> | 79 | <text class='iconfont icon-jubao more'></text> |
80 | <text>投诉举报</text> | 80 | <text>投诉举报</text> |
81 | </view> | 81 | </view> |
@@ -11,9 +11,11 @@ Page({ | @@ -11,9 +11,11 @@ Page({ | ||
11 | tab_current: 1, | 11 | tab_current: 1, |
12 | open_user_id: '', | 12 | open_user_id: '', |
13 | look: 0, | 13 | look: 0, |
14 | - look_type: '' | 14 | + look_type: '', |
15 | + state: false, | ||
16 | + state2: false, | ||
15 | }, | 17 | }, |
16 | - | 18 | + |
17 | cancleMask() { | 19 | cancleMask() { |
18 | this.setData({ | 20 | this.setData({ |
19 | mask_state: false | 21 | mask_state: false |
@@ -38,13 +40,13 @@ Page({ | @@ -38,13 +40,13 @@ Page({ | ||
38 | }, | 40 | }, |
39 | 41 | ||
40 | goList(e) { | 42 | goList(e) { |
41 | - var status=e.currentTarget.dataset.status | 43 | + var status = e.currentTarget.dataset.status |
42 | wx.navigateTo({ | 44 | wx.navigateTo({ |
43 | url: '/pages/index/fans/fans?status=' + status, | 45 | url: '/pages/index/fans/fans?status=' + status, |
44 | }) | 46 | }) |
45 | }, | 47 | }, |
46 | 48 | ||
47 | - goMessage(){ | 49 | + goMessage() { |
48 | wx.navigateTo({ | 50 | wx.navigateTo({ |
49 | url: '/pages/index/message/message', | 51 | url: '/pages/index/message/message', |
50 | }) | 52 | }) |
@@ -53,6 +55,16 @@ Page({ | @@ -53,6 +55,16 @@ Page({ | ||
53 | chargeTime(e) { | 55 | chargeTime(e) { |
54 | var current = e.currentTarget.dataset.current | 56 | var current = e.currentTarget.dataset.current |
55 | var tab_current = this.data.tab_current | 57 | var tab_current = this.data.tab_current |
58 | + if (current == 1) { | ||
59 | + this.setData({ | ||
60 | + state: !(this.data.state) | ||
61 | + }) | ||
62 | + } | ||
63 | + if (current == 4) { | ||
64 | + this.setData({ | ||
65 | + state2: !(this.data.state2) | ||
66 | + }) | ||
67 | + } | ||
56 | if (tab_current == current) { | 68 | if (tab_current == current) { |
57 | return false | 69 | return false |
58 | } else { | 70 | } else { |
@@ -76,7 +88,7 @@ Page({ | @@ -76,7 +88,7 @@ Page({ | ||
76 | app.post(url, params, header).then((res) => { | 88 | app.post(url, params, header).then((res) => { |
77 | if (res.data.code == 20000) { | 89 | if (res.data.code == 20000) { |
78 | this.setData({ | 90 | this.setData({ |
79 | - avatar: res.data.data.avatar, | 91 | + avatar: res.data.data.avatar, |
80 | fans_num: res.data.data.fans_num, | 92 | fans_num: res.data.data.fans_num, |
81 | host: res.data.data.host, | 93 | host: res.data.data.host, |
82 | host_num: res.data.data.host_num, | 94 | host_num: res.data.data.host_num, |
@@ -34,6 +34,25 @@ | @@ -34,6 +34,25 @@ | ||
34 | <view class="tab_item {{tab_current==1?'tab_active':''}}" data-current='1' bindtap='chargeTime'> | 34 | <view class="tab_item {{tab_current==1?'tab_active':''}}" data-current='1' bindtap='chargeTime'> |
35 | <view>从前</view> | 35 | <view>从前</view> |
36 | <view class="iconfont icon-caret-up {{tab_current==1?'icon_active':''}}"></view> | 36 | <view class="iconfont icon-caret-up {{tab_current==1?'icon_active':''}}"></view> |
37 | + <view class='more_box' wx:if='{{state}}'> | ||
38 | + <view class='more_label_box'> | ||
39 | + <view class='more_item' catchtap='showPoster' data-id="{{item.id}}"> | ||
40 | + <text>删除</text> | ||
41 | + </view> | ||
42 | + <view class='more_line'></view> | ||
43 | + <view class='more_item' catchtap='complain' data-id='{{item.id}}' data-type='complain'> | ||
44 | + <text>仅自己可见</text> | ||
45 | + </view> | ||
46 | + <view class='more_line'></view> | ||
47 | + <view class='more_item' catchtap='complain' data-id='{{item.id}}' data-type='complain'> | ||
48 | + <text>粉丝可见</text> | ||
49 | + </view> | ||
50 | + <view class='more_line'></view> | ||
51 | + <view class='more_item' catchtap='complain' data-id='{{item.id}}' data-type='complain'> | ||
52 | + <text>全部</text> | ||
53 | + </view> | ||
54 | + </view> | ||
55 | + </view> | ||
37 | </view> | 56 | </view> |
38 | <view class="tab_item {{tab_current==2?'tab_active':''}}" data-current='2' bindtap='chargeTime'> | 57 | <view class="tab_item {{tab_current==2?'tab_active':''}}" data-current='2' bindtap='chargeTime'> |
39 | <view>赞过</view> | 58 | <view>赞过</view> |
@@ -46,6 +65,13 @@ | @@ -46,6 +65,13 @@ | ||
46 | <view class="tab_item {{tab_current==4?'tab_active':''}}" data-current='4' bindtap='chargeTime'> | 65 | <view class="tab_item {{tab_current==4?'tab_active':''}}" data-current='4' bindtap='chargeTime'> |
47 | <view>收藏</view> | 66 | <view>收藏</view> |
48 | <view class="iconfont icon-caret-up {{tab_current==4?'icon_active':''}}"></view> | 67 | <view class="iconfont icon-caret-up {{tab_current==4?'icon_active':''}}"></view> |
68 | + <view class='more_box more_box2' wx:if='{{state2}}'> | ||
69 | + <view class='more_label_box'> | ||
70 | + <view class='more_item' catchtap='showPoster' data-id="{{item.id}}"> | ||
71 | + <text>删除</text> | ||
72 | + </view> | ||
73 | + </view> | ||
74 | + </view> | ||
49 | </view> | 75 | </view> |
50 | </view> | 76 | </view> |
51 | <view class='item_list' wx:key='' wx:for='{{list}}' wx:key> | 77 | <view class='item_list' wx:key='' wx:for='{{list}}' wx:key> |
@@ -247,6 +247,7 @@ page { | @@ -247,6 +247,7 @@ page { | ||
247 | font-size: 30rpx; | 247 | font-size: 30rpx; |
248 | font-weight: bold; | 248 | font-weight: bold; |
249 | color: #a5a6a8; | 249 | color: #a5a6a8; |
250 | + position: relative; | ||
250 | } | 251 | } |
251 | 252 | ||
252 | .tab_active { | 253 | .tab_active { |
@@ -396,19 +397,25 @@ page { | @@ -396,19 +397,25 @@ page { | ||
396 | } | 397 | } |
397 | 398 | ||
398 | .more_box { | 399 | .more_box { |
399 | - position: relative; | 400 | + position: absolute; |
401 | + left: 0; | ||
402 | + bottom: -325rpx; | ||
400 | padding: 0 30rpx; | 403 | padding: 0 30rpx; |
401 | box-sizing: border-box; | 404 | box-sizing: border-box; |
402 | } | 405 | } |
403 | 406 | ||
407 | +.more_box2 { | ||
408 | + position: absolute; | ||
409 | + left: 0; | ||
410 | + bottom: -81rpx; | ||
411 | +} | ||
412 | + | ||
404 | .more_label_box { | 413 | .more_label_box { |
405 | display: inline-block; | 414 | display: inline-block; |
406 | - position: absolute; | ||
407 | - right: 0; | ||
408 | - bottom: -325rpx; | ||
409 | width: 250rpx; | 415 | width: 250rpx; |
410 | background: #fff; | 416 | background: #fff; |
411 | box-shadow: 0 8rpx 30rpx 0 #e5e5e5; | 417 | box-shadow: 0 8rpx 30rpx 0 #e5e5e5; |
418 | + font-weight: normal; | ||
412 | color: #000; | 419 | color: #000; |
413 | padding: 20rpx 0; | 420 | padding: 20rpx 0; |
414 | } | 421 | } |
@@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
37 | "list": [] | 37 | "list": [] |
38 | }, | 38 | }, |
39 | "miniprogram": { | 39 | "miniprogram": { |
40 | - "current": 0, | 40 | + "current": 1, |
41 | "list": [ | 41 | "list": [ |
42 | { | 42 | { |
43 | "id": -1, | 43 | "id": -1, |
@@ -45,6 +45,12 @@ | @@ -45,6 +45,12 @@ | ||
45 | "pathName": "pages/index/index", | 45 | "pathName": "pages/index/index", |
46 | "query": "", | 46 | "query": "", |
47 | "scene": null | 47 | "scene": null |
48 | + }, | ||
49 | + { | ||
50 | + "id": -1, | ||
51 | + "name": "fabu", | ||
52 | + "pathName": "pages/index/release/release", | ||
53 | + "scene": null | ||
48 | } | 54 | } |
49 | ] | 55 | ] |
50 | } | 56 | } |
-
请 注册 或 登录 后发表评论