正在显示
22 个修改的文件
包含
582 行增加
和
215 行删除
@@ -14,6 +14,7 @@ Page({ | @@ -14,6 +14,7 @@ Page({ | ||
14 | list: [], | 14 | list: [], |
15 | state: false, | 15 | state: false, |
16 | name: '', | 16 | name: '', |
17 | + comment_text: '' | ||
17 | }, | 18 | }, |
18 | 19 | ||
19 | showPoster() { | 20 | showPoster() { |
@@ -34,9 +35,11 @@ Page({ | @@ -34,9 +35,11 @@ Page({ | ||
34 | }) | 35 | }) |
35 | }, | 36 | }, |
36 | 37 | ||
37 | - complain() { | 38 | + complain(e) { |
39 | + var id = e.currentTarget.dataset.id | ||
40 | + var type = e.currentTarget.dataset.type | ||
38 | wx.navigateTo({ | 41 | wx.navigateTo({ |
39 | - url: '/pages/index/comment/comment', | 42 | + url: '/pages/index/comment/comment?id=' + id + '&type=' + type, |
40 | }) | 43 | }) |
41 | }, | 44 | }, |
42 | 45 | ||
@@ -66,24 +69,24 @@ Page({ | @@ -66,24 +69,24 @@ Page({ | ||
66 | 'XX-Device-Type': 'wxapp' | 69 | 'XX-Device-Type': 'wxapp' |
67 | } | 70 | } |
68 | app.post(url, param, header).then((res) => { | 71 | app.post(url, param, header).then((res) => { |
69 | - console.log(res) | 72 | + console.log('数据:', res) |
73 | + var list = res.data.data.fashion | ||
74 | + list.more_state = false | ||
70 | if (res.data.code == 20000) { | 75 | if (res.data.code == 20000) { |
71 | that.setData({ | 76 | that.setData({ |
72 | - list: res.data.data.fashion, | 77 | + list: list, |
73 | tables: res.data.data.tables, | 78 | tables: res.data.data.tables, |
74 | }) | 79 | }) |
75 | } | 80 | } |
76 | }).catch((errMsg) => {}) | 81 | }).catch((errMsg) => {}) |
77 | }, | 82 | }, |
78 | - alertInfo(e){ | ||
79 | - console.log(1111111111) | ||
80 | - }, | 83 | + |
84 | + | ||
81 | submitComment(e) { | 85 | submitComment(e) { |
82 | - console.log(e) | ||
83 | - console.log(222) | 86 | + var id = e.currentTarget.dataset.id |
84 | let url = '/home/index/tablePost' | 87 | let url = '/home/index/tablePost' |
85 | let params = { | 88 | let params = { |
86 | - list_id: this.data.list_id, | 89 | + list_id: id, |
87 | text: e.detail.value | 90 | text: e.detail.value |
88 | } | 91 | } |
89 | let header = { | 92 | let header = { |
@@ -93,10 +96,102 @@ Page({ | @@ -93,10 +96,102 @@ Page({ | ||
93 | app.post(url, params, header).then((res) => { | 96 | app.post(url, params, header).then((res) => { |
94 | if (res.data.code == 20000) { | 97 | if (res.data.code == 20000) { |
95 | this.getData() | 98 | this.getData() |
99 | + this.setData({ | ||
100 | + comment_text: '' | ||
101 | + }) | ||
102 | + } | ||
103 | + }) | ||
104 | + }, | ||
105 | + | ||
106 | + | ||
107 | + | ||
108 | + //点击关注 | ||
109 | + attention(e) { | ||
110 | + var status = '' | ||
111 | + var index = e.currentTarget.dataset.index | ||
112 | + var id = e.currentTarget.dataset.id | ||
113 | + var list = this.data.list | ||
114 | + if (list.user_host == 1) { | ||
115 | + list.user_host = 0 | ||
116 | + status = 2 | ||
117 | + } else { | ||
118 | + list.user_host = 1 | ||
119 | + status = 1 | ||
120 | + } | ||
121 | + this.attentionInfo(id, status) | ||
122 | + this.setData({ | ||
123 | + list: list | ||
124 | + }) | ||
125 | + }, | ||
126 | + | ||
127 | + //关注接口 | ||
128 | + attentionInfo(id, status) { | ||
129 | + let that = this; | ||
130 | + let url = '/home/index/host'; | ||
131 | + let param = { | ||
132 | + open_user_id: id, | ||
133 | + status: status | ||
134 | + } | ||
135 | + let header = { | ||
136 | + 'XX-Token': wx.getStorageSync('token'), | ||
137 | + 'XX-Device-Type': 'wxapp' | ||
138 | + } | ||
139 | + app.post(url, param, header).then((res) => { | ||
140 | + if (res.data.code == 20000) { | ||
141 | + this.getData() | ||
96 | } | 142 | } |
97 | }) | 143 | }) |
98 | }, | 144 | }, |
99 | 145 | ||
146 | + | ||
147 | + | ||
148 | + //点赞 | ||
149 | + likeCharge(e) { | ||
150 | + var id = e.currentTarget.dataset.id | ||
151 | + var list = this.data.list | ||
152 | + var status = '' | ||
153 | + if (list.user_support == 1) { | ||
154 | + list.user_support = 0 | ||
155 | + status = 2 | ||
156 | + } else { | ||
157 | + list.user_support = 1 | ||
158 | + status = 1 | ||
159 | + } | ||
160 | + this.setData({ | ||
161 | + list: list | ||
162 | + }) | ||
163 | + this.like(id, status) | ||
164 | + }, | ||
165 | + | ||
166 | + like(id, status) { | ||
167 | + let url = '/home/index/support' | ||
168 | + let params = { | ||
169 | + list_id: id, | ||
170 | + status: status | ||
171 | + } | ||
172 | + let header = { | ||
173 | + "XX-Token": wx.getStorageSync('token'), | ||
174 | + 'XX-Device-Type': 'wxapp' | ||
175 | + } | ||
176 | + app.post(url, params, header).then((res) => { | ||
177 | + if (res.data.code == 20000) { | ||
178 | + this.getData() | ||
179 | + } | ||
180 | + }) | ||
181 | + }, | ||
182 | + | ||
183 | + | ||
184 | + showMore(e) { | ||
185 | + var index = e.currentTarget.dataset.index | ||
186 | + var list = this.data.list | ||
187 | + list.more_state = !(list.more_state) | ||
188 | + this.setData({ | ||
189 | + more_state: !(this.data.more_state), | ||
190 | + list: list | ||
191 | + }) | ||
192 | + }, | ||
193 | + | ||
194 | + | ||
100 | /** | 195 | /** |
101 | * 生命周期函数--监听页面加载 | 196 | * 生命周期函数--监听页面加载 |
102 | */ | 197 | */ |
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | <view class='user_name' catchtap='showModal' data-index="{{index}}">{{list.user_nickname}}</view> | 10 | <view class='user_name' catchtap='showModal' data-index="{{index}}">{{list.user_nickname}}</view> |
11 | <view class='state_box'> | 11 | <view class='state_box'> |
12 | <block> | 12 | <block> |
13 | - <view class='collect_box active' bindtap='collectInfo' data-index="{{index}}" data-id='{{item.id}}'> | 13 | + <view class="collect_box {{list.user_host==1?'active':''}}" bindtap='attention' data-id='{{list.open_user_id}}'> |
14 | <text class='iconfont icon-shoucang0 star2'></text> | 14 | <text class='iconfont icon-shoucang0 star2'></text> |
15 | <text class="collect_word">关注TA</text> | 15 | <text class="collect_word">关注TA</text> |
16 | </view> | 16 | </view> |
@@ -28,64 +28,32 @@ | @@ -28,64 +28,32 @@ | ||
28 | </view> | 28 | </view> |
29 | <view class='list_content'>{{list.text}}</view> | 29 | <view class='list_content'>{{list.text}}</view> |
30 | </view> | 30 | </view> |
31 | - <!-- <view class='list_state_box2'> | ||
32 | - <view class='time'>{{list.open_time}}</view> | ||
33 | - <view class='list_icon'> | ||
34 | - <text bindtap='likeCharge' data-index="{{index}}" data-id='{{item.id}}' data-is_paise='{{item.is_paise}}'> | ||
35 | - <text class='iconfont icon-heart xin1' wx:if="{{!item.is_paise}}"></text> | ||
36 | - <text class='iconfont icon-dianzan- zan'></text> | ||
37 | - <text class=''>{{list.support}}</text> | ||
38 | - </text> | ||
39 | - <text bindtap='review' data-id='{{item.id}}'> | ||
40 | - <text class='iconfont icon-pinglun pinglun1'></text> | ||
41 | - <text>{{list.table}}</text> | ||
42 | - </text> | ||
43 | - <text> | ||
44 | - <text class='iconfont icon-shoucang zan'></text> | ||
45 | - <text class=''>{{list.collect}}</text> | ||
46 | - </text> | ||
47 | - <view class='more_box'> | ||
48 | - <text class='iconfont icon-gengduo' bindtap='showMore'></text> | ||
49 | - <view class='more_label_box' wx:if='{{more_state}}'> | ||
50 | - <view class='more_item' bindtap='showPoster'> | ||
51 | - <text class='iconfont icon-haibao more'></text> | ||
52 | - <text>生成分享海报</text> | ||
53 | - </view> | ||
54 | - <view class='more_line'></view> | ||
55 | - <view class='more_item' bindtap='complain'> | ||
56 | - <text class='iconfont icon-jubao more'></text> | ||
57 | - <text>投诉举报</text> | ||
58 | - </view> | ||
59 | - </view> | ||
60 | - </view> | ||
61 | - </view> | ||
62 | - </view> --> | ||
63 | <view class='list_state_box'> | 31 | <view class='list_state_box'> |
64 | <view class='time'>{{list.open_time}}</view> | 32 | <view class='time'>{{list.open_time}}</view> |
65 | <view class='list_icon'> | 33 | <view class='list_icon'> |
66 | - <view catchtap='likeCharge' data-index="{{mindex}}" data-id='{{item.id}}'> | ||
67 | - <i class='iconfont icon-dianzan2 zan' wx:if="{{item.user_support==1}}"></i> | 34 | + <view catchtap='likeCharge' data-id='{{list.id}}'> |
35 | + <i class='iconfont icon-dianzan2 zan' wx:if="{{list.user_support==1}}"></i> | ||
68 | <text class='iconfont icon-huida pinglun1' wx:else></text> | 36 | <text class='iconfont icon-huida pinglun1' wx:else></text> |
69 | <text class=''>{{list.support}}</text> | 37 | <text class=''>{{list.support}}</text> |
70 | </view> | 38 | </view> |
71 | - <view catchtap='review' data-id='{{item.id}}' data-type='review'> | 39 | + <view > |
72 | <text class='iconfont icon-pinglun pinglun1'></text> | 40 | <text class='iconfont icon-pinglun pinglun1'></text> |
73 | <text>{{list.table_num}}</text> | 41 | <text>{{list.table_num}}</text> |
74 | </view> | 42 | </view> |
75 | - <view catchtap='collectInfo' data-index="{{mindex}}" data-id='{{item.id}}'> | ||
76 | - <i class='iconfont icon-shoucang2 zan' wx:if='{{item.user_collect==1}}'></i> | 43 | + <view catchtap='collectInfo' data-id='{{list.id}}'> |
44 | + <i class='iconfont icon-shoucang2 zan' wx:if='{{list.user_collect==1}}'></i> | ||
77 | <text class='iconfont icon-shoucang4 pinglun1' wx:else></text> | 45 | <text class='iconfont icon-shoucang4 pinglun1' wx:else></text> |
78 | <text class=''>{{list.collect}}</text> | 46 | <text class=''>{{list.collect}}</text> |
79 | </view> | 47 | </view> |
80 | <view class='more_box'> | 48 | <view class='more_box'> |
81 | - <text class='iconfont icon-gengduo' catchtap='showMore' data-index='{{mindex}}'></text> | ||
82 | - <view class='more_label_box' wx:if='{{item.more_state}}'> | ||
83 | - <view class='more_item' catchtap='showPoster' data-id="{{item.id}}"> | 49 | + <text class='iconfont icon-gengduo' catchtap='showMore'></text> |
50 | + <view class='more_label_box' wx:if='{{list.more_state}}'> | ||
51 | + <view class='more_item' catchtap='showPoster' data-id="{{list.id}}"> | ||
84 | <text class='iconfont icon-haibao more'></text> | 52 | <text class='iconfont icon-haibao more'></text> |
85 | <text>生成分享海报</text> | 53 | <text>生成分享海报</text> |
86 | </view> | 54 | </view> |
87 | <view class='more_line'></view> | 55 | <view class='more_line'></view> |
88 | - <view class='more_item' catchtap='complain' data-id='{{item.id}}' data-type='complain'> | 56 | + <view class='more_item' catchtap='complain' data-id='{{list.id}}' data-type='complain'> |
89 | <text class='iconfont icon-jubao more'></text> | 57 | <text class='iconfont icon-jubao more'></text> |
90 | <text>投诉举报</text> | 58 | <text>投诉举报</text> |
91 | </view> | 59 | </view> |
@@ -130,9 +98,9 @@ | @@ -130,9 +98,9 @@ | ||
130 | <textarea placeholder="回复:+{{name}}" bindconfirm='commentInfo' fixed='true'></textarea> | 98 | <textarea placeholder="回复:+{{name}}" bindconfirm='commentInfo' fixed='true'></textarea> |
131 | </view> | 99 | </view> |
132 | <!-- wx:else --> | 100 | <!-- wx:else --> |
133 | -<view class='comment_box' > | ||
134 | - <!-- <input placeholder='AAA' bindconfirm='alertInfo'></input> --> | ||
135 | - <textarea placeholder='请输入评论内容' bindconfirm='submitComment' fixed='true'></textarea> | 101 | +<view class='comment_box'> |
102 | + <input placeholder='请输入评论内容' value='{{comment_text}}' bindconfirm='submitComment' data-id='{{list.id}}'></input> | ||
103 | + <!-- <textarea placeholder='请输入评论内容' bindconfirm='submitComment' fixed='true'></textarea> --> | ||
136 | </view> | 104 | </view> |
137 | 105 | ||
138 | <view class='mask_box' wx:if='{{poster_state}}'> | 106 | <view class='mask_box' wx:if='{{poster_state}}'> |
@@ -253,8 +253,9 @@ page { | @@ -253,8 +253,9 @@ page { | ||
253 | height: 42rpx; | 253 | height: 42rpx; |
254 | line-height: 42rpx; | 254 | line-height: 42rpx; |
255 | font-size: 24rpx; | 255 | font-size: 24rpx; |
256 | - color: #53a6fa; | ||
257 | - border: 1rpx solid #F7F7F7; | 256 | + background: #dcdde0; |
257 | + color: #fff; | ||
258 | + border: 1rpx solid #f7f7f7; | ||
258 | border-radius: 4rpx; | 259 | border-radius: 4rpx; |
259 | display: flex; | 260 | display: flex; |
260 | align-items: center; | 261 | align-items: center; |
@@ -262,8 +263,8 @@ page { | @@ -262,8 +263,8 @@ page { | ||
262 | } | 263 | } |
263 | 264 | ||
264 | .collect_box.active { | 265 | .collect_box.active { |
265 | - background: #DCDDE0; | ||
266 | - color: #fff; | 266 | + background: #f7f7f7; |
267 | + color: #53a6fa; | ||
267 | } | 268 | } |
268 | 269 | ||
269 | .star1 { | 270 | .star1 { |
@@ -274,7 +275,7 @@ page { | @@ -274,7 +275,7 @@ page { | ||
274 | 275 | ||
275 | .star2 { | 276 | .star2 { |
276 | font-size: 25rpx; | 277 | font-size: 25rpx; |
277 | - color: #3568CC; | 278 | + color: #3568cc; |
278 | margin-right: 6rpx; | 279 | margin-right: 6rpx; |
279 | } | 280 | } |
280 | 281 | ||
@@ -346,6 +347,7 @@ page { | @@ -346,6 +347,7 @@ page { | ||
346 | .more_box { | 347 | .more_box { |
347 | position: relative; | 348 | position: relative; |
348 | } | 349 | } |
350 | + | ||
349 | .more_box view { | 351 | .more_box view { |
350 | display: inline-block; | 352 | display: inline-block; |
351 | } | 353 | } |
@@ -385,10 +387,7 @@ page { | @@ -385,10 +387,7 @@ page { | ||
385 | .pinglun2 { | 387 | .pinglun2 { |
386 | margin-top: 4rpx; | 388 | margin-top: 4rpx; |
387 | } | 389 | } |
388 | -.collect_word{ | ||
389 | - font-size: 24rpx; | ||
390 | - color: #3568CC; | ||
391 | -} | 390 | + |
392 | .comment_content { | 391 | .comment_content { |
393 | font-size: 26rpx; | 392 | font-size: 26rpx; |
394 | color: #13161a; | 393 | color: #13161a; |
@@ -405,11 +404,11 @@ page { | @@ -405,11 +404,11 @@ page { | ||
405 | position: fixed; | 404 | position: fixed; |
406 | left: 0; | 405 | left: 0; |
407 | bottom: 0; | 406 | bottom: 0; |
408 | - padding:20rpx 30rpx; | 407 | + padding: 20rpx 30rpx; |
409 | box-sizing: border-box; | 408 | box-sizing: border-box; |
410 | } | 409 | } |
411 | 410 | ||
412 | -.comment_box textarea { | 411 | +.comment_box textarea,input { |
413 | font-size: 26rpx; | 412 | font-size: 26rpx; |
414 | height: 80rpx; | 413 | height: 80rpx; |
415 | } | 414 | } |
1 | // pages/index/fans/fans.js | 1 | // pages/index/fans/fans.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 | - status:'' | 9 | + status: '', |
10 | + list: [] | ||
10 | }, | 11 | }, |
11 | 12 | ||
12 | getData() { | 13 | getData() { |
@@ -21,65 +22,113 @@ Page({ | @@ -21,65 +22,113 @@ Page({ | ||
21 | app.post(url, params, header).then((res) => { | 22 | app.post(url, params, header).then((res) => { |
22 | console.log(res) | 23 | console.log(res) |
23 | if (res.data.code == 20000) { | 24 | if (res.data.code == 20000) { |
25 | + this.setData({ | ||
26 | + list: res.data.data.list | ||
27 | + }) | ||
28 | + } | ||
29 | + }) | ||
30 | + }, | ||
24 | 31 | ||
32 | + //点击关注 | ||
33 | + attention(e) { | ||
34 | + var status = '' | ||
35 | + var index = e.currentTarget.dataset.index | ||
36 | + var id = e.currentTarget.dataset.id | ||
37 | + var list = this.data.list | ||
38 | + if (list.user_host == 1) { | ||
39 | + list.user_host = 0 | ||
40 | + status = 2 | ||
41 | + } else { | ||
42 | + list.user_host = 1 | ||
43 | + status = 1 | ||
25 | } | 44 | } |
45 | + this.attentionInfo(id, status) | ||
46 | + this.setData({ | ||
47 | + list: list | ||
48 | + }) | ||
49 | + }, | ||
26 | 50 | ||
51 | + //关注接口 | ||
52 | + attentionInfo(id, status) { | ||
53 | + let that = this; | ||
54 | + let url = '/home/index/host'; | ||
55 | + let param = { | ||
56 | + open_user_id: id, | ||
57 | + status: status | ||
58 | + } | ||
59 | + let header = { | ||
60 | + 'XX-Token': wx.getStorageSync('token'), | ||
61 | + 'XX-Device-Type': 'wxapp' | ||
62 | + } | ||
63 | + app.post(url, param, header).then((res) => { | ||
64 | + if (res.data.code == 20000) { | ||
65 | + this.getData() | ||
66 | + } | ||
27 | }) | 67 | }) |
28 | }, | 68 | }, |
29 | 69 | ||
70 | + | ||
30 | /** | 71 | /** |
31 | * 生命周期函数--监听页面加载 | 72 | * 生命周期函数--监听页面加载 |
32 | */ | 73 | */ |
33 | - onLoad: function (options) { | ||
34 | - options.status?(this.getData()):'' | 74 | + onLoad: function(options) { |
75 | + this.setData({ | ||
76 | + status:options.status?options.status:'' | ||
77 | + }) | ||
78 | + this.getData() | ||
79 | + if(options.status==1){ | ||
80 | + wx.setNavigationBarTitle({ | ||
81 | + title: '关注', | ||
82 | + }) | ||
83 | + } | ||
35 | }, | 84 | }, |
36 | 85 | ||
37 | /** | 86 | /** |
38 | * 生命周期函数--监听页面初次渲染完成 | 87 | * 生命周期函数--监听页面初次渲染完成 |
39 | */ | 88 | */ |
40 | - onReady: function () { | 89 | + onReady: function() { |
41 | 90 | ||
42 | }, | 91 | }, |
43 | 92 | ||
44 | /** | 93 | /** |
45 | * 生命周期函数--监听页面显示 | 94 | * 生命周期函数--监听页面显示 |
46 | */ | 95 | */ |
47 | - onShow: function () { | 96 | + onShow: function() { |
48 | 97 | ||
49 | }, | 98 | }, |
50 | 99 | ||
51 | /** | 100 | /** |
52 | * 生命周期函数--监听页面隐藏 | 101 | * 生命周期函数--监听页面隐藏 |
53 | */ | 102 | */ |
54 | - onHide: function () { | 103 | + onHide: function() { |
55 | 104 | ||
56 | }, | 105 | }, |
57 | 106 | ||
58 | /** | 107 | /** |
59 | * 生命周期函数--监听页面卸载 | 108 | * 生命周期函数--监听页面卸载 |
60 | */ | 109 | */ |
61 | - onUnload: function () { | 110 | + onUnload: function() { |
62 | 111 | ||
63 | }, | 112 | }, |
64 | 113 | ||
65 | /** | 114 | /** |
66 | * 页面相关事件处理函数--监听用户下拉动作 | 115 | * 页面相关事件处理函数--监听用户下拉动作 |
67 | */ | 116 | */ |
68 | - onPullDownRefresh: function () { | 117 | + onPullDownRefresh: function() { |
69 | 118 | ||
70 | }, | 119 | }, |
71 | 120 | ||
72 | /** | 121 | /** |
73 | * 页面上拉触底事件的处理函数 | 122 | * 页面上拉触底事件的处理函数 |
74 | */ | 123 | */ |
75 | - onReachBottom: function () { | 124 | + onReachBottom: function() { |
76 | 125 | ||
77 | }, | 126 | }, |
78 | 127 | ||
79 | /** | 128 | /** |
80 | * 用户点击右上角分享 | 129 | * 用户点击右上角分享 |
81 | */ | 130 | */ |
82 | - onShareAppMessage: function () { | 131 | + onShareAppMessage: function() { |
83 | 132 | ||
84 | } | 133 | } |
85 | }) | 134 | }) |
1 | <!--pages/index/fans/fans.wxml--> | 1 | <!--pages/index/fans/fans.wxml--> |
2 | <view class='content_box'> | 2 | <view class='content_box'> |
3 | - <view class='item_list'> | 3 | + <view class='item_list' wx:for='{{list}}' wx:key> |
4 | <view class='list_left'> | 4 | <view class='list_left'> |
5 | - <image class='head_img' src='/images/img3.png'></image> | 5 | + <image class='head_img' src='{{item.avatar}}'></image> |
6 | <view> | 6 | <view> |
7 | - <view class='user_name'>Rose | ローズ</view> | 7 | + <view class='user_name'>{{item.user_nickname}}</view> |
8 | <view> | 8 | <view> |
9 | - <text>发布365篇,粉丝50000个</text> | 9 | + <text>发布{{item.fashion_num}}篇,粉丝{{item.fans_num}}个</text> |
10 | </view> | 10 | </view> |
11 | </view> | 11 | </view> |
12 | </view> | 12 | </view> |
13 | - <view class="list_label list_active">添加关注</view> | 13 | + <view class="list_label list_active" bindtap='attention' data-id='{{list.open_user_id}}'>添加关注</view> |
14 | </view> | 14 | </view> |
15 | </view> | 15 | </view> |
@@ -93,10 +93,10 @@ Page({ | @@ -93,10 +93,10 @@ Page({ | ||
93 | var list = this.data.list | 93 | var list = this.data.list |
94 | if (list[index].user_host == 1) { | 94 | if (list[index].user_host == 1) { |
95 | list[index].user_host = 0 | 95 | list[index].user_host = 0 |
96 | - status = 1 | 96 | + status = 2 |
97 | } else { | 97 | } else { |
98 | list[index].user_host = 1 | 98 | list[index].user_host = 1 |
99 | - status = 2 | 99 | + status = 1 |
100 | } | 100 | } |
101 | this.attentionInfo(id, status) | 101 | this.attentionInfo(id, status) |
102 | this.setData({ | 102 | this.setData({ |
@@ -119,7 +119,7 @@ Page({ | @@ -119,7 +119,7 @@ Page({ | ||
119 | } | 119 | } |
120 | app.post(url, param, header).then((res) => { | 120 | app.post(url, param, header).then((res) => { |
121 | if (res.data.code == 20000) { | 121 | if (res.data.code == 20000) { |
122 | - | 122 | + this.getData() |
123 | } | 123 | } |
124 | }) | 124 | }) |
125 | }, | 125 | }, |
@@ -132,15 +132,16 @@ Page({ | @@ -132,15 +132,16 @@ Page({ | ||
132 | var status = '' | 132 | var status = '' |
133 | if (list[index].user_support == 1) { | 133 | if (list[index].user_support == 1) { |
134 | list[index].user_support = 0 | 134 | list[index].user_support = 0 |
135 | - status = 1 | 135 | + status = 2 |
136 | } else { | 136 | } else { |
137 | list[index].user_support = 1 | 137 | list[index].user_support = 1 |
138 | - status = 2 | 138 | + status = 1 |
139 | } | 139 | } |
140 | this.setData({ | 140 | this.setData({ |
141 | list: list | 141 | list: list |
142 | }) | 142 | }) |
143 | this.like(id, status) | 143 | this.like(id, status) |
144 | + // this.getData() | ||
144 | }, | 145 | }, |
145 | 146 | ||
146 | like(id, status) { | 147 | like(id, status) { |
@@ -154,7 +155,9 @@ Page({ | @@ -154,7 +155,9 @@ Page({ | ||
154 | 'XX-Device-Type': 'wxapp' | 155 | 'XX-Device-Type': 'wxapp' |
155 | } | 156 | } |
156 | app.post(url, params, header).then((res) => { | 157 | app.post(url, params, header).then((res) => { |
157 | - console.log(res) | 158 | + if (res.data.code == 20000) { |
159 | + this.getData() | ||
160 | + } | ||
158 | }) | 161 | }) |
159 | }, | 162 | }, |
160 | 163 | ||
@@ -166,10 +169,10 @@ Page({ | @@ -166,10 +169,10 @@ Page({ | ||
166 | var status = '' | 169 | var status = '' |
167 | if (list[index].user_collect == 1) { | 170 | if (list[index].user_collect == 1) { |
168 | list[index].user_collect = 0 | 171 | list[index].user_collect = 0 |
169 | - status = 1 | 172 | + status = 2 |
170 | } else { | 173 | } else { |
171 | list[index].user_collect = 1 | 174 | list[index].user_collect = 1 |
172 | - status = 2 | 175 | + status = 1 |
173 | } | 176 | } |
174 | this.setData({ | 177 | this.setData({ |
175 | list: list | 178 | list: list |
@@ -178,7 +181,7 @@ Page({ | @@ -178,7 +181,7 @@ Page({ | ||
178 | }, | 181 | }, |
179 | 182 | ||
180 | collect(id, status) { | 183 | collect(id, status) { |
181 | - let url = '/home/index/support' | 184 | + let url = '/home/index/collect' |
182 | let params = { | 185 | let params = { |
183 | list_id: id, | 186 | list_id: id, |
184 | status: status | 187 | status: status |
@@ -189,6 +192,9 @@ Page({ | @@ -189,6 +192,9 @@ Page({ | ||
189 | } | 192 | } |
190 | app.post(url, params, header).then((res) => { | 193 | app.post(url, params, header).then((res) => { |
191 | console.log(res) | 194 | console.log(res) |
195 | + if(res.data.code==20000){ | ||
196 | + this.getData() | ||
197 | + } | ||
192 | }) | 198 | }) |
193 | }, | 199 | }, |
194 | 200 | ||
@@ -278,7 +284,6 @@ Page({ | @@ -278,7 +284,6 @@ Page({ | ||
278 | complain(e) { | 284 | complain(e) { |
279 | var id = e.currentTarget.dataset.id | 285 | var id = e.currentTarget.dataset.id |
280 | var type = e.currentTarget.dataset.type | 286 | var type = e.currentTarget.dataset.type |
281 | - console.log(type) | ||
282 | wx.navigateTo({ | 287 | wx.navigateTo({ |
283 | url: '/pages/index/comment/comment?id=' + id + '&type=' + type, | 288 | url: '/pages/index/comment/comment?id=' + id + '&type=' + type, |
284 | }) | 289 | }) |
@@ -11,8 +11,23 @@ Page({ | @@ -11,8 +11,23 @@ Page({ | ||
11 | mask_state: false, | 11 | mask_state: false, |
12 | sex_array: ['男', '女'], | 12 | sex_array: ['男', '女'], |
13 | sex_index: -1, | 13 | sex_index: -1, |
14 | - birthday:'', | ||
15 | - constellation: ['白羊座', '金牛座', '双子座', '巨蟹座', '狮子座', '处女座', '天秤座', '天蝎座', '射手座', '摩羯座', '水瓶座','双鱼座'], | 14 | + birthday: '', |
15 | + constellation_array: ['白羊座', '金牛座', '双子座', '巨蟹座', '狮子座', '处女座', '天秤座', '天蝎座', '射手座', '摩羯座', '水瓶座', '双鱼座'], | ||
16 | + index:-1, | ||
17 | + current_num:0, | ||
18 | + max:30, | ||
19 | + }, | ||
20 | + | ||
21 | + getText(e) { | ||
22 | + var signature = e.detail.value; | ||
23 | + this.setData({ | ||
24 | + signature: signature | ||
25 | + }) | ||
26 | + var len = parseInt(signature.length); | ||
27 | + if (len > this.data.max) return; | ||
28 | + this.setData({ | ||
29 | + current_num: len //当前字数 | ||
30 | + }); | ||
16 | }, | 31 | }, |
17 | 32 | ||
18 | //选择性别 | 33 | //选择性别 |
@@ -23,6 +38,13 @@ Page({ | @@ -23,6 +38,13 @@ Page({ | ||
23 | }) | 38 | }) |
24 | }, | 39 | }, |
25 | 40 | ||
41 | + setInfo(e){ | ||
42 | + this.setData({ | ||
43 | + index: e.detail.value, | ||
44 | + constellation: this.data.constellation_array[e.detail.value] | ||
45 | + }) | ||
46 | + }, | ||
47 | + | ||
26 | 48 | ||
27 | setTime(e) { | 49 | setTime(e) { |
28 | this.setData({ | 50 | this.setData({ |
@@ -44,7 +66,7 @@ Page({ | @@ -44,7 +66,7 @@ Page({ | ||
44 | }) | 66 | }) |
45 | }, | 67 | }, |
46 | 68 | ||
47 | - chooseImg() { //这里是选取图片的方法 | 69 | + chooseImg() { |
48 | var that = this; | 70 | var that = this; |
49 | wx.chooseImage({ | 71 | wx.chooseImage({ |
50 | count: 1, | 72 | count: 1, |
@@ -103,6 +125,43 @@ Page({ | @@ -103,6 +125,43 @@ Page({ | ||
103 | }) | 125 | }) |
104 | }, | 126 | }, |
105 | 127 | ||
128 | + formSubmit(e) { | ||
129 | + var sex_index = parseInt(this.data.sex_index)+1 | ||
130 | + let that = this; | ||
131 | + let url = '/home/index/userUpdate'; | ||
132 | + let param = { | ||
133 | + avatar: this.data.avatar, | ||
134 | + user_nickname: e.detail.value.user_name, | ||
135 | + sex: sex_index, | ||
136 | + birthday: this.data.birthday, | ||
137 | + constellation: this.data.constellation, | ||
138 | + weight: e.detail.value.weight, | ||
139 | + stature: e.detail.value.stature, | ||
140 | + signature: this.data.signature, | ||
141 | + } | ||
142 | + let header = { | ||
143 | + 'XX-Token': wx.getStorageSync('token'), | ||
144 | + 'XX-Device-Type': 'wxapp' | ||
145 | + } | ||
146 | + app.post(url, param, header).then((res) => { | ||
147 | + if(res.data.code==20000){ | ||
148 | + wx.showToast({ | ||
149 | + title: '修改成功', | ||
150 | + }) | ||
151 | + setTimeout(function(){ | ||
152 | + wx.navigateBack({ | ||
153 | + dalta:1 | ||
154 | + }) | ||
155 | + },1500) | ||
156 | + }else{ | ||
157 | + wx.showToast({ | ||
158 | + title: res.data.msg, | ||
159 | + icon:'none' | ||
160 | + }) | ||
161 | + } | ||
162 | + }) | ||
163 | + }, | ||
164 | + | ||
106 | /** | 165 | /** |
107 | * 生命周期函数--监听页面加载 | 166 | * 生命周期函数--监听页面加载 |
108 | */ | 167 | */ |
@@ -50,8 +50,8 @@ | @@ -50,8 +50,8 @@ | ||
50 | <text>星座</text> | 50 | <text>星座</text> |
51 | </view> | 51 | </view> |
52 | <view class='list_input'> | 52 | <view class='list_input'> |
53 | - <picker mode='date' bindchange='selectTime'> | ||
54 | - <input type='text' placeholder='未选择' name='end_time' value='{{end_time}}' disabled='true'></input> | 53 | + <picker range='{{constellation_array}}' value='{{index}}' bindchange='setInfo'> |
54 | + <input type='text' placeholder='未选择' name='constellation' value='{{constellation}}' disabled='true'></input> | ||
55 | </picker> | 55 | </picker> |
56 | <view class='iconfont icon-fanhui'></view> | 56 | <view class='iconfont icon-fanhui'></view> |
57 | </view> | 57 | </view> |
@@ -63,7 +63,7 @@ | @@ -63,7 +63,7 @@ | ||
63 | <text>身高</text> | 63 | <text>身高</text> |
64 | </view> | 64 | </view> |
65 | <view class='list_input'> | 65 | <view class='list_input'> |
66 | - <input type='number' placeholder='请填写' name='period' value='{{detail_address}}'></input> | 66 | + <input type='number' placeholder='请填写' name='stature' value='{{stature}}'></input> |
67 | <view class='iconfont icon-fanhui'></view> | 67 | <view class='iconfont icon-fanhui'></view> |
68 | </view> | 68 | </view> |
69 | </view> | 69 | </view> |
@@ -72,7 +72,7 @@ | @@ -72,7 +72,7 @@ | ||
72 | <text>体重</text> | 72 | <text>体重</text> |
73 | </view> | 73 | </view> |
74 | <view class='list_input'> | 74 | <view class='list_input'> |
75 | - <input type='number' placeholder='请填写' name='current_time' value='{{detail_address}}'></input> | 75 | + <input type='number' placeholder='请填写' name='weight' value='{{weight}}'></input> |
76 | <view class='iconfont icon-fanhui'></view> | 76 | <view class='iconfont icon-fanhui'></view> |
77 | </view> | 77 | </view> |
78 | </view> | 78 | </view> |
@@ -81,7 +81,7 @@ | @@ -81,7 +81,7 @@ | ||
81 | <text>个性签名</text> | 81 | <text>个性签名</text> |
82 | </view> | 82 | </view> |
83 | <view class='list_textarea'> | 83 | <view class='list_textarea'> |
84 | - <textarea placeholder='记录此刻的心情' maxlength='{{max}}' bindinput='getText'> | 84 | + <textarea placeholder='记录此刻的心情' maxlength='{{max}}' value='{{signature}}' bindinput='getText'> |
85 | <text class='words_num'>{{current_num}}/{{max}}</text> | 85 | <text class='words_num'>{{current_num}}/{{max}}</text> |
86 | </textarea> | 86 | </textarea> |
87 | </view> | 87 | </view> |
@@ -7,7 +7,10 @@ Page({ | @@ -7,7 +7,10 @@ Page({ | ||
7 | */ | 7 | */ |
8 | data: { | 8 | data: { |
9 | status: 1, | 9 | status: 1, |
10 | - page: 1 | 10 | + page: 1, |
11 | + list1: [], | ||
12 | + list2: [], | ||
13 | + | ||
11 | }, | 14 | }, |
12 | 15 | ||
13 | readState(e) { | 16 | readState(e) { |
@@ -15,9 +18,9 @@ Page({ | @@ -15,9 +18,9 @@ Page({ | ||
15 | this.setData({ | 18 | this.setData({ |
16 | status: status | 19 | status: status |
17 | }) | 20 | }) |
18 | - if(status!=3){ | 21 | + if (status != 3) { |
19 | this.getData() | 22 | this.getData() |
20 | - }else{ | 23 | + } else { |
21 | this.getData2() | 24 | this.getData2() |
22 | } | 25 | } |
23 | }, | 26 | }, |
@@ -36,11 +39,7 @@ Page({ | @@ -36,11 +39,7 @@ Page({ | ||
36 | console.log(res) | 39 | console.log(res) |
37 | if (res.data.code == 20000) { | 40 | if (res.data.code == 20000) { |
38 | this.setData({ | 41 | this.setData({ |
39 | - current_page: res.data.data.list.current_page, | ||
40 | - list: res.data.data.list.current_page, | ||
41 | - last_page: res.data.data.list.last_page, | ||
42 | - per_page: res.data.data.list.per_page, | ||
43 | - total: res.data.data.list.total | 42 | + list1: res.data.data.list, |
44 | }) | 43 | }) |
45 | } | 44 | } |
46 | }) | 45 | }) |
@@ -58,7 +57,9 @@ Page({ | @@ -58,7 +57,9 @@ Page({ | ||
58 | app.post(url, params, header).then((res) => { | 57 | app.post(url, params, header).then((res) => { |
59 | console.log(res) | 58 | console.log(res) |
60 | if (res.data.code == 20000) { | 59 | if (res.data.code == 20000) { |
61 | - | 60 | + this.setData({ |
61 | + list2: res.data.data.list, | ||
62 | + }) | ||
62 | } | 63 | } |
63 | 64 | ||
64 | }) | 65 | }) |
@@ -5,41 +5,41 @@ | @@ -5,41 +5,41 @@ | ||
5 | <view class="label {{status ==3?'active':''}}" bindtap='readState' data-status='3'>审核消息</view> | 5 | <view class="label {{status ==3?'active':''}}" bindtap='readState' data-status='3'>审核消息</view> |
6 | </view> | 6 | </view> |
7 | <view class='content_box'> | 7 | <view class='content_box'> |
8 | - <block wx:if='{{status==1}}'> | ||
9 | - <view class='item_list'> | 8 | + <block wx:if='{{status==1||status==2}}'> |
9 | + <view class='item_list' wx:for='{{list1.data}}' wx:key> | ||
10 | <view class='list_left'> | 10 | <view class='list_left'> |
11 | - <image class='head_img' src='/images/img3.png'></image> | 11 | + <image class='head_img' src='{{item.avatar}}'></image> |
12 | <view> | 12 | <view> |
13 | - <view class='user_name'>Rose | ローズ</view> | 13 | + <view class=' user_name '>{{item.user_nickname}}</view> |
14 | <view> | 14 | <view> |
15 | <text>评论了你的</text> | 15 | <text>评论了你的</text> |
16 | - <text class='list_hint'>今日打卡</text> | 16 | + <text class='list_hint '>{{item.title}}</text> |
17 | </view> | 17 | </view> |
18 | </view> | 18 | </view> |
19 | </view> | 19 | </view> |
20 | - <view class='point'></view> | 20 | + <view class='point '></view> |
21 | </view> | 21 | </view> |
22 | </block> | 22 | </block> |
23 | - <block wx:if='{{status==2}}'> | ||
24 | - <view class='item_list'> | ||
25 | - <view class='list_left'> | ||
26 | - <image class='head_img' src='/images/img3.png'></image> | 23 | + <!-- <block wx:if='{{status==2}} '> |
24 | + <view class='item_list '> | ||
25 | + <view class='list_left '> | ||
26 | + <image class='head_img ' src='/images/img3.png '></image> | ||
27 | <view> | 27 | <view> |
28 | - <view class='user_name'>Rose | ローズ</view> | 28 | + <view class='user_name '>Rose | ローズ</view> |
29 | <view> | 29 | <view> |
30 | <text>评论了你的</text> | 30 | <text>评论了你的</text> |
31 | - <text class='list_hint'>今日打卡</text> | 31 | + <text class='list_hint '>今日打卡</text> |
32 | </view> | 32 | </view> |
33 | </view> | 33 | </view> |
34 | </view> | 34 | </view> |
35 | - <view class='point'></view> | 35 | + <view class='point '></view> |
36 | </view> | 36 | </view> |
37 | - </block> | ||
38 | - <block wx:if='{{status==3}}'> | ||
39 | - <view class='item_list'> | 37 | + </block> --> |
38 | + <block wx:if='{{status==3}} '> | ||
39 | + <view class='item_list' wx:for='{{list2}}' wx:key> | ||
40 | <view class='list_left'> | 40 | <view class='list_left'> |
41 | <view> | 41 | <view> |
42 | - <view class='user_name' style='font-weight:normal;'> | 42 | + <view class='user_name' style='font-weight:normal; '> |
43 | <text>Rose | ローズ您好,您发布的今日打卡审核</text> | 43 | <text>Rose | ローズ您好,您发布的今日打卡审核</text> |
44 | <text class='list_hint2'>未通过</text> | 44 | <text class='list_hint2'>未通过</text> |
45 | </view> | 45 | </view> |
@@ -27,8 +27,10 @@ Page({ | @@ -27,8 +27,10 @@ Page({ | ||
27 | open_time: '', | 27 | open_time: '', |
28 | temp_time2: '', | 28 | temp_time2: '', |
29 | temp_time: '', | 29 | temp_time: '', |
30 | - list_id:0, | ||
31 | - | 30 | + list_id: 0, |
31 | + imgsUrl: [], | ||
32 | + open: 1, | ||
33 | + more_info: '公开', | ||
32 | }, | 34 | }, |
33 | 35 | ||
34 | setTitle(e) { | 36 | setTitle(e) { |
@@ -71,7 +73,6 @@ Page({ | @@ -71,7 +73,6 @@ Page({ | ||
71 | var tempUrl = this.data.tempUrl | 73 | var tempUrl = this.data.tempUrl |
72 | var imgInfo = this.data.imgInfo | 74 | var imgInfo = this.data.imgInfo |
73 | images[index].text = imgInfo | 75 | images[index].text = imgInfo |
74 | - console.log(images) | ||
75 | this.setData({ | 76 | this.setData({ |
76 | img_state: false, | 77 | img_state: false, |
77 | images: images | 78 | images: images |
@@ -88,11 +89,11 @@ Page({ | @@ -88,11 +89,11 @@ Page({ | ||
88 | }) | 89 | }) |
89 | }, | 90 | }, |
90 | 91 | ||
91 | - getStyleId(){ | 92 | + getStyleId() { |
92 | var styles = this.data.styles | 93 | var styles = this.data.styles |
93 | var classify = this.data.classify | 94 | var classify = this.data.classify |
94 | - for(var i=0;i<classify;i++){ | ||
95 | - if(classify[i].state){ | 95 | + for (var i = 0; i < classify; i++) { |
96 | + if (classify[i].state) { | ||
96 | styles.push(classify[i].id) | 97 | styles.push(classify[i].id) |
97 | } | 98 | } |
98 | } | 99 | } |
@@ -190,11 +191,18 @@ Page({ | @@ -190,11 +191,18 @@ Page({ | ||
190 | var lastMonth = this.data.lastMonth | 191 | var lastMonth = this.data.lastMonth |
191 | var currentTime = this.data.currentTime | 192 | var currentTime = this.data.currentTime |
192 | var time = lastMonth[currentTime] | 193 | var time = lastMonth[currentTime] |
194 | + var time2 = lastMonth[currentTime] | ||
193 | var temp_time = this.data.temp_time | 195 | var temp_time = this.data.temp_time |
196 | + if (currentTime == 0) { | ||
197 | + time2 = '今天' | ||
198 | + } else if (currentTime == 1) { | ||
199 | + time2 = '明天' | ||
200 | + } | ||
194 | var open_time = time + ' ' + temp_time | 201 | var open_time = time + ' ' + temp_time |
195 | - console.log(open_time) | 202 | + var open_time2 = time2 + ' ' + temp_time |
196 | this.setData({ | 203 | this.setData({ |
197 | - open_time: open_time | 204 | + open_time: open_time, |
205 | + time_info: open_time2 | ||
198 | }) | 206 | }) |
199 | }, | 207 | }, |
200 | 208 | ||
@@ -248,10 +256,16 @@ Page({ | @@ -248,10 +256,16 @@ Page({ | ||
248 | //服务器返回格式: { "Catalog": "testFolder", "FileName": "1.jpg", "Url": "https://test.com/1.jpg" } | 256 | //服务器返回格式: { "Catalog": "testFolder", "FileName": "1.jpg", "Url": "https://test.com/1.jpg" } |
249 | let images = that.data.images; | 257 | let images = that.data.images; |
250 | images.push(data.data); | 258 | images.push(data.data); |
259 | + var imgsUrl = [] | ||
260 | + for (var i in images) { | ||
261 | + var tempImg = {} | ||
262 | + tempImg.url = images[i].url | ||
263 | + imgsUrl.push(tempImg) | ||
264 | + } | ||
251 | that.setData({ | 265 | that.setData({ |
252 | - images: images | 266 | + images: imgsUrl |
253 | }); | 267 | }); |
254 | - console.log(images) | 268 | + |
255 | //如果是最后一张,则隐藏等待中 | 269 | //如果是最后一张,则隐藏等待中 |
256 | if (uploadImgCount == tempFilePaths.length) { | 270 | if (uploadImgCount == tempFilePaths.length) { |
257 | wx.hideToast(); | 271 | wx.hideToast(); |
@@ -325,9 +339,20 @@ Page({ | @@ -325,9 +339,20 @@ Page({ | ||
325 | wx.showToast({ | 339 | wx.showToast({ |
326 | title: '设置成功', | 340 | title: '设置成功', |
327 | }) | 341 | }) |
342 | + var more_info = this.data.more_info | ||
343 | + if (e.currentTarget.dataset.open == 1) { | ||
344 | + more_info = '公开' | ||
345 | + } else if (e.currentTarget.dataset.open == 2) { | ||
346 | + more_info = '粉丝可见' | ||
347 | + } else if (e.currentTarget.dataset.open == 3) { | ||
348 | + more_info = '仅自己可见' | ||
349 | + } else if (e.currentTarget.dataset.open == 4) { | ||
350 | + more_info = '草稿箱' | ||
351 | + } | ||
328 | this.setData({ | 352 | this.setData({ |
329 | open: e.currentTarget.dataset.open, | 353 | open: e.currentTarget.dataset.open, |
330 | - more_state:false | 354 | + more_state: false, |
355 | + more_info: more_info | ||
331 | }) | 356 | }) |
332 | }, | 357 | }, |
333 | 358 | ||
@@ -363,15 +388,80 @@ Page({ | @@ -363,15 +388,80 @@ Page({ | ||
363 | app.post(url, params, header).then((res) => { | 388 | app.post(url, params, header).then((res) => { |
364 | console.log(res) | 389 | console.log(res) |
365 | if (res.data.code == 20000) { | 390 | if (res.data.code == 20000) { |
391 | + wx.showToast({ | ||
392 | + title: '提交成功', | ||
393 | + }) | ||
394 | + setTimeout((res) => { | ||
366 | wx.navigateBack({ | 395 | wx.navigateBack({ |
367 | - dalta:1 | 396 | + dalta: 1 |
397 | + }) | ||
398 | + }, 1000) | ||
399 | + } else { | ||
400 | + wx.showToast({ | ||
401 | + title: res.data.msg, | ||
402 | + icon: 'none' | ||
368 | }) | 403 | }) |
369 | } | 404 | } |
370 | 405 | ||
371 | }) | 406 | }) |
372 | }, | 407 | }, |
373 | 408 | ||
409 | + getData() { | ||
410 | + let url = '/home/index/draftsEdit' | ||
411 | + let params = { | ||
412 | + list_id: this.data.list_id, | ||
413 | + } | ||
414 | + let header = { | ||
415 | + "XX-Token": wx.getStorageSync('token'), | ||
416 | + 'XX-Device-Type': 'wxapp' | ||
417 | + } | ||
418 | + app.post(url, params, header).then((res) => { | ||
419 | + console.log(res) | ||
420 | + var open = res.data.data.open | ||
421 | + var more_info = this.data.more_info | ||
422 | + if (open == 1) { | ||
423 | + more_info = '公开' | ||
424 | + } else if (open == 2) { | ||
425 | + more_info = '粉丝可见' | ||
426 | + } else if (open == 3) { | ||
427 | + more_info = '仅自己可见' | ||
428 | + } else if (open == 4) { | ||
429 | + more_info = '草稿箱' | ||
430 | + } | ||
431 | + var classify = this.data.classify | ||
432 | + var styles = res.data.data.styles | ||
433 | + for (var i in classify) { | ||
434 | + for (var j in styles) { | ||
435 | + if (classify[i].id == styles[j]) { | ||
436 | + classify[i].state = true | ||
437 | + } | ||
438 | + } | ||
439 | + } | ||
374 | 440 | ||
441 | + var images = res.data.data.img | ||
442 | + var imgsUrl = [] | ||
443 | + for (var i in images) { | ||
444 | + var tempImg = {} | ||
445 | + tempImg.url = images[i].url | ||
446 | + tempImg.text = images[i].text | ||
447 | + imgsUrl.push(tempImg) | ||
448 | + } | ||
449 | + // console.log(imgsUrl) | ||
450 | + if (res.data.code == 20000) { | ||
451 | + this.setData({ | ||
452 | + title: res.data.data.title, | ||
453 | + text: res.data.data.text, | ||
454 | + open: open, | ||
455 | + more_info: more_info, | ||
456 | + time_info: res.data.data.open_time, | ||
457 | + open_time: res.data.data.open_time, | ||
458 | + images: imgsUrl, | ||
459 | + classify: classify, | ||
460 | + styles: styles | ||
461 | + }) | ||
462 | + } | ||
463 | + }) | ||
464 | + }, | ||
375 | 465 | ||
376 | 466 | ||
377 | /** | 467 | /** |
@@ -380,6 +470,12 @@ Page({ | @@ -380,6 +470,12 @@ Page({ | ||
380 | onLoad: function(options) { | 470 | onLoad: function(options) { |
381 | this.getStyle() | 471 | this.getStyle() |
382 | this.getTime() | 472 | this.getTime() |
473 | + this.setData({ | ||
474 | + list_id: options.id ? options.id : '' | ||
475 | + }) | ||
476 | + if (options.id != 0) { | ||
477 | + this.getData() | ||
478 | + } | ||
383 | }, | 479 | }, |
384 | 480 | ||
385 | /** | 481 | /** |
@@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
28 | <view class='hint_box'> | 28 | <view class='hint_box'> |
29 | <view class='hint_label' bindtap='showMask'>{{time_info}}</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'>{{more_info}}</text> |
32 | <view class='more_label_box' wx:if='{{more_state}}'> | 32 | <view class='more_label_box' wx:if='{{more_state}}'> |
33 | <view class='more_item' bindtap='setOpen' data-open='1'> | 33 | <view class='more_item' bindtap='setOpen' data-open='1'> |
34 | <text>公开</text> | 34 | <text>公开</text> |
@@ -10,12 +10,13 @@ Page({ | @@ -10,12 +10,13 @@ Page({ | ||
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, | 11 | more_state: false, |
12 | list: [], | 12 | list: [], |
13 | - page:1, | ||
14 | - keyword:'', | 13 | + page: 1, |
14 | + keyword: '', | ||
15 | + label_list: '' | ||
15 | }, | 16 | }, |
16 | - getSearch(e){ | 17 | + getSearch(e) { |
17 | this.setData({ | 18 | this.setData({ |
18 | - keyword:e.detail.value | 19 | + keyword: e.detail.value |
19 | }) | 20 | }) |
20 | }, | 21 | }, |
21 | 22 | ||
@@ -89,7 +90,7 @@ Page({ | @@ -89,7 +90,7 @@ Page({ | ||
89 | console.log(res) | 90 | console.log(res) |
90 | if (res.data.code == 20000) { | 91 | if (res.data.code == 20000) { |
91 | this.setData({ | 92 | this.setData({ |
92 | - list: res.data.data.list | 93 | + label_list: res.data.data.list |
93 | }) | 94 | }) |
94 | } | 95 | } |
95 | 96 | ||
@@ -106,12 +107,21 @@ Page({ | @@ -106,12 +107,21 @@ Page({ | ||
106 | app.post(url, params, header).then((res) => { | 107 | app.post(url, params, header).then((res) => { |
107 | console.log(res) | 108 | console.log(res) |
108 | if (res.data.code == 20000) { | 109 | if (res.data.code == 20000) { |
109 | - | 110 | + this.setData({ |
111 | + label_list: '' | ||
112 | + }) | ||
110 | } | 113 | } |
111 | 114 | ||
112 | }) | 115 | }) |
113 | }, | 116 | }, |
114 | 117 | ||
118 | + //清空输入框 | ||
119 | + clearInput() { | ||
120 | + this.setData({ | ||
121 | + keyword: '' | ||
122 | + }) | ||
123 | + }, | ||
124 | + | ||
115 | 125 | ||
116 | /** | 126 | /** |
117 | * 生命周期函数--监听页面加载 | 127 | * 生命周期函数--监听页面加载 |
@@ -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="getSearch" value="{{searchValue}}" bindconfirm="startSearch" placeholder-class='input_size' class='search_input' /> | 6 | + <input placeholder='请输入搜索相关内容' bindinput="getSearch" value="{{keyword}}" 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="goSearch">搜索</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" wx:if="{{list.length<=0}}"> |
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"> |
@@ -17,15 +17,14 @@ | @@ -17,15 +17,14 @@ | ||
17 | <text>清空历史</text> | 17 | <text>清空历史</text> |
18 | </view> | 18 | </view> |
19 | </view> | 19 | </view> |
20 | - | ||
21 | - <view class="history_list {{searchHistory.length === 0?'text-center':''}}"> | ||
22 | - <!-- <text wx:if="{{searchHistory.length === 0}}">暂无搜索历史~</text> | ||
23 | - <view wx:for="{{searchHistory}}" wx:key="index" bindtap="clickHistory" data-index="{{index}}">{{item}}</view> | 20 | + <view class="history_list {{label_list.length === 0?'text-center':''}}"> |
21 | + <text wx:if="{{label_list.length === 0}}">暂无搜索历史~</text> | ||
22 | + <view wx:for="{{label_list}}" wx:key="index" bindtap="clickHistory" data-index="{{index}}">{{item}}</view> | ||
23 | + </view> | ||
24 | </view> | 24 | </view> |
25 | - </view> --> | ||
26 | 25 | ||
27 | <!--文章内容--> | 26 | <!--文章内容--> |
28 | - <view class='content_box'> | 27 | + <view class='content_box' wx:if="{{list.length > 0}}"> |
29 | <view class='content_item' wx:for='{{list}}' wx:for-index='mindex' wx:key> | 28 | <view class='content_item' wx:for='{{list}}' wx:for-index='mindex' wx:key> |
30 | <view class='left_box'> | 29 | <view class='left_box'> |
31 | <view class='head_portrait'> | 30 | <view class='head_portrait'> |
@@ -19,14 +19,31 @@ Page({ | @@ -19,14 +19,31 @@ Page({ | ||
19 | app.post(url, params, header).then((res) => { | 19 | app.post(url, params, header).then((res) => { |
20 | console.log(res) | 20 | console.log(res) |
21 | if(res.data.code==20000){ | 21 | if(res.data.code==20000){ |
22 | + if(res.data.data.list==''){ | ||
22 | this.setData({ | 23 | this.setData({ |
23 | - list:res.data.data.list | 24 | + list: res.data.data.list |
24 | }) | 25 | }) |
26 | + wx.showToast({ | ||
27 | + title: '暂无数据', | ||
28 | + icon:'none' | ||
29 | + }) | ||
30 | + }else{ | ||
31 | + this.setData({ | ||
32 | + list: res.data.data.list | ||
33 | + }) | ||
34 | + } | ||
25 | } | 35 | } |
26 | 36 | ||
27 | }) | 37 | }) |
28 | }, | 38 | }, |
29 | 39 | ||
40 | + goDetail(e){ | ||
41 | + var id=e.currentTarget.dataset.id | ||
42 | + wx.navigateTo({ | ||
43 | + url: '/pages/index/release/release?id='+id, | ||
44 | + }) | ||
45 | + }, | ||
46 | + | ||
30 | /** | 47 | /** |
31 | * 生命周期函数--监听页面加载 | 48 | * 生命周期函数--监听页面加载 |
32 | */ | 49 | */ |
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'> | ||
4 | - <image class='list_img' src='/images/img3.png'></image> | 3 | + <view class='item_list' wx:for='{{list}}' wx:key bindtap='goDetail' data-id='{{item.list_id}}'> |
4 | + <image class='list_img' src='{{item.img}}'></image> | ||
5 | <view class='list_content_box'> | 5 | <view class='list_content_box'> |
6 | <view class='list_content'> | 6 | <view class='list_content'> |
7 | - <view>今日穿搭</view> | ||
8 | - <view>2分钟前</view> | 7 | + <view>{{item.title}}</view> |
8 | + <view>{{item.time}}</view> | ||
9 | </view> | 9 | </view> |
10 | <view class='list_content'> | 10 | <view class='list_content'> |
11 | - <view>今日穿搭</view> | 11 | + <view>{{item.text}}</view> |
12 | <view class='iconfont icon-shanchu1'></view> | 12 | <view class='iconfont icon-shanchu1'></view> |
13 | </view> | 13 | </view> |
14 | </view> | 14 | </view> |
@@ -14,6 +14,8 @@ Page({ | @@ -14,6 +14,8 @@ Page({ | ||
14 | look_type: '', | 14 | look_type: '', |
15 | state: false, | 15 | state: false, |
16 | state2: false, | 16 | state2: false, |
17 | + page: 1, | ||
18 | + status: 1, | ||
17 | }, | 19 | }, |
18 | 20 | ||
19 | cancleMask() { | 21 | cancleMask() { |
@@ -21,15 +23,20 @@ Page({ | @@ -21,15 +23,20 @@ Page({ | ||
21 | mask_state: false | 23 | mask_state: false |
22 | }) | 24 | }) |
23 | }, | 25 | }, |
26 | + | ||
24 | editInfo() { | 27 | editInfo() { |
25 | wx.navigateTo({ | 28 | wx.navigateTo({ |
26 | url: '/pages/index/info/info', | 29 | url: '/pages/index/info/info', |
27 | }) | 30 | }) |
28 | }, | 31 | }, |
29 | 32 | ||
30 | - showMore() { | 33 | + showMore(e) { |
34 | + var index = e.currentTarget.dataset.index | ||
35 | + var list = this.data.list | ||
36 | + list[index].more_state = !(list[index].more_state) | ||
31 | this.setData({ | 37 | this.setData({ |
32 | - more_state: !(this.data.more_state) | 38 | + // more_state: !(this.data.more_state), |
39 | + list: list | ||
33 | }) | 40 | }) |
34 | }, | 41 | }, |
35 | 42 | ||
@@ -52,6 +59,52 @@ Page({ | @@ -52,6 +59,52 @@ Page({ | ||
52 | }) | 59 | }) |
53 | }, | 60 | }, |
54 | 61 | ||
62 | + //点赞 | ||
63 | + likeCharge(e) { | ||
64 | + var id = e.currentTarget.dataset.id | ||
65 | + var index = e.currentTarget.dataset.index | ||
66 | + var list = this.data.list | ||
67 | + var status = '' | ||
68 | + if (list[index].user_support == 1) { | ||
69 | + list[index].user_support = 0 | ||
70 | + status = 2 | ||
71 | + } else { | ||
72 | + list[index].user_support = 1 | ||
73 | + status = 1 | ||
74 | + } | ||
75 | + this.setData({ | ||
76 | + list: list | ||
77 | + }) | ||
78 | + this.like(id, status) | ||
79 | + // this.getData() | ||
80 | + }, | ||
81 | + | ||
82 | + like(id, status) { | ||
83 | + let url = '/home/index/support' | ||
84 | + let params = { | ||
85 | + list_id: id, | ||
86 | + status: status | ||
87 | + } | ||
88 | + let header = { | ||
89 | + "XX-Token": wx.getStorageSync('token'), | ||
90 | + 'XX-Device-Type': 'wxapp' | ||
91 | + } | ||
92 | + app.post(url, params, header).then((res) => { | ||
93 | + if (res.data.code == 20000) { | ||
94 | + this.getData() | ||
95 | + } | ||
96 | + }) | ||
97 | + }, | ||
98 | + | ||
99 | + //评论 | ||
100 | + review(e) { | ||
101 | + var id = e.currentTarget.dataset.id | ||
102 | + var type = e.currentTarget.dataset.type | ||
103 | + wx.navigateTo({ | ||
104 | + url: '/pages/index/comment/comment?id=' + id + '&type=' + type, | ||
105 | + }) | ||
106 | + }, | ||
107 | + | ||
55 | chargeTime(e) { | 108 | chargeTime(e) { |
56 | var current = e.currentTarget.dataset.current | 109 | var current = e.currentTarget.dataset.current |
57 | var tab_current = this.data.tab_current | 110 | var tab_current = this.data.tab_current |
@@ -62,19 +115,25 @@ Page({ | @@ -62,19 +115,25 @@ Page({ | ||
62 | } | 115 | } |
63 | if (current == 4) { | 116 | if (current == 4) { |
64 | this.setData({ | 117 | this.setData({ |
65 | - state2: !(this.data.state2) | 118 | + state2: true |
119 | + }) | ||
120 | + } else { | ||
121 | + this.setData({ | ||
122 | + state2: false | ||
66 | }) | 123 | }) |
67 | } | 124 | } |
68 | if (tab_current == current) { | 125 | if (tab_current == current) { |
69 | return false | 126 | return false |
70 | } else { | 127 | } else { |
71 | this.setData({ | 128 | this.setData({ |
72 | - tab_current: current | 129 | + tab_current: current, |
130 | + status: current, | ||
73 | }) | 131 | }) |
132 | + this.getData() | ||
74 | } | 133 | } |
75 | }, | 134 | }, |
76 | 135 | ||
77 | - getData() { | 136 | + getData2() { |
78 | let url = '/home/index/userPage' | 137 | let url = '/home/index/userPage' |
79 | let params = { | 138 | let params = { |
80 | open_user_id: this.data.open_user_id, | 139 | open_user_id: this.data.open_user_id, |
@@ -92,21 +151,40 @@ Page({ | @@ -92,21 +151,40 @@ Page({ | ||
92 | fans_num: res.data.data.fans_num, | 151 | fans_num: res.data.data.fans_num, |
93 | host: res.data.data.host, | 152 | host: res.data.data.host, |
94 | host_num: res.data.data.host_num, | 153 | host_num: res.data.data.host_num, |
95 | - list: res.data.data.list, | 154 | + // list: res.data.data.list, |
96 | signature: res.data.data.signature, | 155 | signature: res.data.data.signature, |
97 | user_nickname: res.data.data.user_nickname | 156 | user_nickname: res.data.data.user_nickname |
98 | }) | 157 | }) |
99 | } | 158 | } |
100 | - | ||
101 | }) | 159 | }) |
102 | }, | 160 | }, |
103 | - | 161 | + getData() { |
162 | + let url = '/home/index/checkPage' | ||
163 | + let params = { | ||
164 | + open_user_id: this.data.open_user_id, | ||
165 | + status: this.data.status, | ||
166 | + page: this.data.page | ||
167 | + } | ||
168 | + let header = { | ||
169 | + "XX-Token": wx.getStorageSync('token'), | ||
170 | + 'XX-Device-Type': 'wxapp' | ||
171 | + } | ||
172 | + app.post(url, params, header).then((res) => { | ||
173 | + console.log(res) | ||
174 | + if (res.data.code == 20000) { | ||
175 | + this.setData({ | ||
176 | + list: res.data.data.list | ||
177 | + }) | ||
178 | + } | ||
179 | + }) | ||
180 | + }, | ||
104 | 181 | ||
105 | /** | 182 | /** |
106 | * 生命周期函数--监听页面加载 | 183 | * 生命周期函数--监听页面加载 |
107 | */ | 184 | */ |
108 | onLoad: function(options) { | 185 | onLoad: function(options) { |
109 | this.getData() | 186 | this.getData() |
187 | + this.getData2() | ||
110 | }, | 188 | }, |
111 | 189 | ||
112 | /** | 190 | /** |
@@ -34,25 +34,6 @@ | @@ -34,25 +34,6 @@ | ||
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> | ||
56 | </view> | 37 | </view> |
57 | <view class="tab_item {{tab_current==2?'tab_active':''}}" data-current='2' bindtap='chargeTime'> | 38 | <view class="tab_item {{tab_current==2?'tab_active':''}}" data-current='2' bindtap='chargeTime'> |
58 | <view>赞过</view> | 39 | <view>赞过</view> |
@@ -65,20 +46,13 @@ | @@ -65,20 +46,13 @@ | ||
65 | <view class="tab_item {{tab_current==4?'tab_active':''}}" data-current='4' bindtap='chargeTime'> | 46 | <view class="tab_item {{tab_current==4?'tab_active':''}}" data-current='4' bindtap='chargeTime'> |
66 | <view>收藏</view> | 47 | <view>收藏</view> |
67 | <view class="iconfont icon-caret-up {{tab_current==4?'icon_active':''}}"></view> | 48 | <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> | ||
75 | </view> | 49 | </view> |
76 | </view> | 50 | </view> |
77 | <view class='item_list' wx:key='' wx:for='{{list}}' wx:key> | 51 | <view class='item_list' wx:key='' wx:for='{{list}}' wx:key> |
78 | <view class='list_title'>{{item.open_time}}</view> | 52 | <view class='list_title'>{{item.open_time}}</view> |
79 | <view class='content_item_box' data-id='{{item.id}}' bindtap='messageDetail'> | 53 | <view class='content_item_box' data-id='{{item.id}}' bindtap='messageDetail'> |
80 | <view class='list_content_box'> | 54 | <view class='list_content_box'> |
81 | - <view class='list_img' wx:for='{{item.img}}' wx:key> | 55 | + <view class='list_img'> |
82 | <image src='{{item.img}}' wx:key=''></image> | 56 | <image src='{{item.img}}' wx:key=''></image> |
83 | </view> | 57 | </view> |
84 | <view class='list_content'> | 58 | <view class='list_content'> |
@@ -89,18 +63,26 @@ | @@ -89,18 +63,26 @@ | ||
89 | <view class='list_state_box'> | 63 | <view class='list_state_box'> |
90 | <view class='time'>{{item.open_time}}</view> | 64 | <view class='time'>{{item.open_time}}</view> |
91 | <view class='list_icon'> | 65 | <view class='list_icon'> |
92 | - <view bindtap='likeCharge' data-index="{{index}}" data-id='{{item.id}}' data-is_paise='{{item.is_paise}}'> | 66 | + <view bindtap='likeCharge' data-index="{{index}}" data-id='{{item.id}}'> |
93 | <text class='iconfont icon-dianzan2 zan' wx:if="{{item.user_support==1}}"></text> | 67 | <text class='iconfont icon-dianzan2 zan' wx:if="{{item.user_support==1}}"></text> |
94 | <text class='iconfont icon-huida pinglun1' wx:else></text> | 68 | <text class='iconfont icon-huida pinglun1' wx:else></text> |
95 | <text class=''>{{item.support}}</text> | 69 | <text class=''>{{item.support}}</text> |
96 | </view> | 70 | </view> |
97 | - <view bindtap='review' data-id='{{item.id}}'> | 71 | + <view bindtap='review' data-id='{{item.id}}' data-type='review'> |
98 | <text class='iconfont icon-pinglun pinglun1'></text> | 72 | <text class='iconfont icon-pinglun pinglun1'></text> |
99 | - <text>{{item.table_num}}</text> | 73 | + <text>{{item.table}}</text> |
100 | </view> | 74 | </view> |
101 | <view class='more_box'> | 75 | <view class='more_box'> |
102 | - <text class='iconfont icon-gengduo' catchtap='showMore'></text> | ||
103 | - <view class='more_label_box' wx:if='{{more_state}}'> | 76 | + <text class='iconfont icon-gengduo' catchtap='showMore' data-index='{{index}}'></text> |
77 | + <block wx:if='{{state2}}'> | ||
78 | + <view class='more_label_box more2' wx:if='{{item.more_state}}'> | ||
79 | + <view class='more_item' bindtap='showPoster'> | ||
80 | + <text>删除</text> | ||
81 | + </view> | ||
82 | + </view> | ||
83 | + </block> | ||
84 | + <block wx:else> | ||
85 | + <view class='more_label_box' wx:if='{{item.more_state}}'> | ||
104 | <view class='more_item' bindtap='showPoster'> | 86 | <view class='more_item' bindtap='showPoster'> |
105 | <text>删除</text> | 87 | <text>删除</text> |
106 | </view> | 88 | </view> |
@@ -117,6 +99,7 @@ | @@ -117,6 +99,7 @@ | ||
117 | <text>全部</text> | 99 | <text>全部</text> |
118 | </view> | 100 | </view> |
119 | </view> | 101 | </view> |
102 | + </block> | ||
120 | </view> | 103 | </view> |
121 | <text class='iconfont icon-suo'></text> | 104 | <text class='iconfont icon-suo'></text> |
122 | </view> | 105 | </view> |
@@ -113,7 +113,7 @@ page { | @@ -113,7 +113,7 @@ page { | ||
113 | } | 113 | } |
114 | 114 | ||
115 | .content_box { | 115 | .content_box { |
116 | - padding: 30rpx; | 116 | + padding: 30rpx 20rpx; |
117 | box-sizing: border-box; | 117 | box-sizing: border-box; |
118 | margin-top: 20rpx; | 118 | margin-top: 20rpx; |
119 | background: #fff; | 119 | background: #fff; |
@@ -138,7 +138,7 @@ page { | @@ -138,7 +138,7 @@ page { | ||
138 | } | 138 | } |
139 | 139 | ||
140 | .list_title { | 140 | .list_title { |
141 | - width: 20%; | 141 | + width: 25%; |
142 | font-size: 32rpx; | 142 | font-size: 32rpx; |
143 | font-weight: bold; | 143 | font-weight: bold; |
144 | color: #010000; | 144 | color: #010000; |
@@ -278,6 +278,7 @@ page { | @@ -278,6 +278,7 @@ page { | ||
278 | } | 278 | } |
279 | 279 | ||
280 | .content { | 280 | .content { |
281 | + width: 100%; | ||
281 | display: flex; | 282 | display: flex; |
282 | align-items: flex-start; | 283 | align-items: flex-start; |
283 | justify-content: space-between; | 284 | justify-content: space-between; |
@@ -397,33 +398,36 @@ page { | @@ -397,33 +398,36 @@ page { | ||
397 | } | 398 | } |
398 | 399 | ||
399 | .more_box { | 400 | .more_box { |
400 | - position: absolute; | ||
401 | - left: 0; | ||
402 | - bottom: -325rpx; | ||
403 | - padding: 0 30rpx; | ||
404 | - box-sizing: border-box; | 401 | + position: relative; |
405 | } | 402 | } |
406 | 403 | ||
407 | -.more_box2 { | ||
408 | - position: absolute; | ||
409 | - left: 0; | ||
410 | - bottom: -81rpx; | 404 | +.more_box view { |
405 | + display: inline-block; | ||
411 | } | 406 | } |
412 | 407 | ||
413 | .more_label_box { | 408 | .more_label_box { |
414 | display: inline-block; | 409 | display: inline-block; |
410 | + position: absolute; | ||
411 | + right: 0; | ||
412 | + bottom: -355rpx; | ||
415 | width: 250rpx; | 413 | width: 250rpx; |
416 | background: #fff; | 414 | background: #fff; |
417 | box-shadow: 0 8rpx 30rpx 0 #e5e5e5; | 415 | box-shadow: 0 8rpx 30rpx 0 #e5e5e5; |
418 | - font-weight: normal; | ||
419 | color: #000; | 416 | color: #000; |
420 | - padding: 20rpx 0; | 417 | + text-align: center; |
418 | + padding: 30rpx 0; | ||
421 | } | 419 | } |
422 | 420 | ||
423 | .more { | 421 | .more { |
424 | margin-right: 10rpx; | 422 | margin-right: 10rpx; |
425 | } | 423 | } |
426 | 424 | ||
425 | +.more2 { | ||
426 | + position: absolute; | ||
427 | + right: 0; | ||
428 | + bottom: -105rpx; | ||
429 | +} | ||
430 | + | ||
427 | .more_item { | 431 | .more_item { |
428 | padding: 0 25rpx; | 432 | padding: 0 25rpx; |
429 | text-align: center; | 433 | text-align: center; |
@@ -6,6 +6,7 @@ | @@ -6,6 +6,7 @@ | ||
6 | <!-- <image src='/images/img2.png'></image> | 6 | <!-- <image src='/images/img2.png'></image> |
7 | <image src='/images/img2.png'></image> | 7 | <image src='/images/img2.png'></image> |
8 | <image src='/images/img2.png'></image> --> | 8 | <image src='/images/img2.png'></image> --> |
9 | + <image src='{{imgs}}'></image> | ||
9 | </view> | 10 | </view> |
10 | <view class='box2'> | 11 | <view class='box2'> |
11 | <button class='btn' open-type="getUserInfo" bindgetuserinfo='start'>立即开启</button> | 12 | <button class='btn' open-type="getUserInfo" bindgetuserinfo='start'>立即开启</button> |
@@ -25,8 +25,10 @@ | @@ -25,8 +25,10 @@ | ||
25 | } | 25 | } |
26 | 26 | ||
27 | .box image { | 27 | .box image { |
28 | - width: 50%; | ||
29 | - height: 50%; | 28 | + /* width: 50%; |
29 | + height: 50%; */ | ||
30 | + width: 100%; | ||
31 | + height: 100%; | ||
30 | } | 32 | } |
31 | 33 | ||
32 | .btn { | 34 | .btn { |
@@ -36,6 +38,7 @@ | @@ -36,6 +38,7 @@ | ||
36 | font-size: 30rpx; | 38 | font-size: 30rpx; |
37 | color: #fff; | 39 | color: #fff; |
38 | } | 40 | } |
39 | -.btn::after{ | 41 | + |
42 | +.btn::after { | ||
40 | border: 0; | 43 | border: 0; |
41 | } | 44 | } |
-
请 注册 或 登录 后发表评论