作者 刘晓艳

穿搭小程序

@@ -4,6 +4,14 @@ @@ -4,6 +4,14 @@
4 width: 100%; 4 width: 100%;
5 height: 120rpx; 5 height: 120rpx;
6 } 6 }
  7 +.no_data{
  8 + display: inline-block;
  9 + width: 100%;
  10 + font-size: 32rpx;
  11 + text-align: center;
  12 + color: #000;
  13 + margin: 50rpx 0;
  14 +}
7 /* 弹窗 */ 15 /* 弹窗 */
8 .mask_box { 16 .mask_box {
9 width: 100%; 17 width: 100%;
@@ -7,11 +7,13 @@ Page({ @@ -7,11 +7,13 @@ Page({
7 data: { 7 data: {
8 8
9 }, 9 },
  10 +
10 goIndex(){ 11 goIndex(){
11 - wx.redirectTo({ 12 + wx.switchTab({
12 url: '/pages/index/index', 13 url: '/pages/index/index',
13 }) 14 })
14 }, 15 },
  16 +
15 /** 17 /**
16 * 生命周期函数--监听页面加载 18 * 生命周期函数--监听页面加载
17 */ 19 */
@@ -43,6 +43,11 @@ Page({ @@ -43,6 +43,11 @@ Page({
43 wx.navigateBack({ 43 wx.navigateBack({
44 delta: 1 44 delta: 1
45 }) 45 })
  46 + }else{
  47 + wx.showToast({
  48 + title: '举报内容不能为空',
  49 + icon:'none'
  50 + })
46 } 51 }
47 }) 52 })
48 }, 53 },
@@ -67,6 +72,11 @@ Page({ @@ -67,6 +72,11 @@ Page({
67 wx.navigateBack({ 72 wx.navigateBack({
68 delta: 1 73 delta: 1
69 }) 74 })
  75 + } else {
  76 + wx.showToast({
  77 + title: '评论不能为空',
  78 + icon: 'none'
  79 + })
70 } 80 }
71 }) 81 })
72 }, 82 },
@@ -20,16 +20,23 @@ Page({ @@ -20,16 +20,23 @@ Page({
20 showPoster(e) { 20 showPoster(e) {
21 var id = e.currentTarget.dataset.id 21 var id = e.currentTarget.dataset.id
22 var that = this 22 var that = this
  23 + var list = that.data.list
  24 + list.showMore = false
23 wx.hideTabBar({}) 25 wx.hideTabBar({})
24 wx.showToast({ 26 wx.showToast({
25 title: '加载中', 27 title: '加载中',
26 - icon: 'loading' 28 + icon: 'loading',
  29 + // success: (res) => {
  30 + // setTimeout((res) => {
  31 +
  32 + // }, 2000)
  33 +
  34 + // },
27 }) 35 })
28 - // setTimeout(function() {  
29 that.setData({ 36 that.setData({
30 - poster_state: true 37 + poster_state: true,
  38 + more_state: false
31 }) 39 })
32 - // }, 2000)  
33 this.getPoster(id) 40 this.getPoster(id)
34 }, 41 },
35 42
@@ -40,12 +47,12 @@ Page({ @@ -40,12 +47,12 @@ Page({
40 } 47 }
41 this.setData({ 48 this.setData({
42 poster_state: false, 49 poster_state: false,
43 - list: list 50 + // list: list,
  51 + more_state: false
44 }) 52 })
45 wx.showTabBar({}) 53 wx.showTabBar({})
46 }, 54 },
47 55
48 -  
49 getPoster(id) { 56 getPoster(id) {
50 let that = this; 57 let that = this;
51 let url = '/home/index/fashionShare'; 58 let url = '/home/index/fashionShare';
@@ -68,7 +75,6 @@ Page({ @@ -68,7 +75,6 @@ Page({
68 }) 75 })
69 }, 76 },
70 77
71 -  
72 showMore() { 78 showMore() {
73 this.setData({ 79 this.setData({
74 more_state: !(this.data.more_state) 80 more_state: !(this.data.more_state)
@@ -121,7 +127,6 @@ Page({ @@ -121,7 +127,6 @@ Page({
121 }).catch((errMsg) => {}) 127 }).catch((errMsg) => {})
122 }, 128 },
123 129
124 -  
125 submitComment(e) { 130 submitComment(e) {
126 var id = e.currentTarget.dataset.id 131 var id = e.currentTarget.dataset.id
127 let url = '/home/index/tablePost' 132 let url = '/home/index/tablePost'
@@ -144,7 +149,6 @@ Page({ @@ -144,7 +149,6 @@ Page({
144 }, 149 },
145 150
146 151
147 -  
148 //点击关注 152 //点击关注
149 attention(e) { 153 attention(e) {
150 var status = '' 154 var status = ''
@@ -183,8 +187,6 @@ Page({ @@ -183,8 +187,6 @@ Page({
183 }) 187 })
184 }, 188 },
185 189
186 -  
187 -  
188 //点赞 190 //点赞
189 likeCharge(e) { 191 likeCharge(e) {
190 var id = e.currentTarget.dataset.id 192 var id = e.currentTarget.dataset.id
@@ -220,6 +222,41 @@ Page({ @@ -220,6 +222,41 @@ Page({
220 }) 222 })
221 }, 223 },
222 224
  225 + //收藏,取消收藏
  226 + collectInfo(e) {
  227 + var id = e.currentTarget.dataset.id
  228 + var list = this.data.list
  229 + var status = ''
  230 + if (list.user_collect == 1) {
  231 + list.user_collect = 0
  232 + status = 2
  233 + } else {
  234 + list.user_collect = 1
  235 + status = 1
  236 + }
  237 + this.setData({
  238 + list: list
  239 + })
  240 + this.collect(id, status)
  241 + },
  242 +
  243 + collect(id, status) {
  244 + let url = '/home/index/collect'
  245 + let params = {
  246 + list_id: id,
  247 + status: status
  248 + }
  249 + let header = {
  250 + "XX-Token": wx.getStorageSync('token'),
  251 + 'XX-Device-Type': 'wxapp'
  252 + }
  253 + app.post(url, params, header).then((res) => {
  254 + console.log(res)
  255 + if (res.data.code == 20000) {
  256 + this.getData()
  257 + }
  258 + })
  259 + },
223 260
224 showMore(e) { 261 showMore(e) {
225 var index = e.currentTarget.dataset.index 262 var index = e.currentTarget.dataset.index
@@ -23,10 +23,12 @@ @@ -23,10 +23,12 @@
23 <view class='list_content'>{{list.title}}</view> 23 <view class='list_content'>{{list.title}}</view>
24 <view class='list_img_box'> 24 <view class='list_img_box'>
25 <block wx:for='{{list.img}}' wx:for-item='items' wx:key=''> 25 <block wx:for='{{list.img}}' wx:for-item='items' wx:key=''>
26 - <image src='{{items}}'></image> 26 + <image src='{{items.img}}'></image>
27 </block> 27 </block>
28 </view> 28 </view>
29 - <view class='list_content'>{{list.text}}</view> 29 + <view class='list_content'>
  30 + <text wx:for='{{list.styles}}' wx:key=''>#{{item}}</text>
  31 + </view>
30 </view> 32 </view>
31 <view class='list_state_box'> 33 <view class='list_state_box'>
32 <view class='time'>{{list.open_time}}</view> 34 <view class='time'>{{list.open_time}}</view>
@@ -47,7 +49,7 @@ @@ -47,7 +49,7 @@
47 </view> 49 </view>
48 <view class='more_box'> 50 <view class='more_box'>
49 <text class='iconfont icon-gengduo' catchtap='showMore'></text> 51 <text class='iconfont icon-gengduo' catchtap='showMore'></text>
50 - <view class='more_label_box' wx:if='{{list.more_state}}'> 52 + <view class='more_label_box' wx:if='{{more_state}}'>
51 <view class='more_item' catchtap='showPoster' data-id="{{list.id}}"> 53 <view class='more_item' catchtap='showPoster' data-id="{{list.id}}">
52 <text class='iconfont icon-haibao more'></text> 54 <text class='iconfont icon-haibao more'></text>
53 <text>生成分享海报</text> 55 <text>生成分享海报</text>
@@ -245,7 +245,7 @@ page { @@ -245,7 +245,7 @@ page {
245 .user_name { 245 .user_name {
246 font-size: 30rpx; 246 font-size: 30rpx;
247 color: #000; 247 color: #000;
248 - width: 40%; 248 + /* width: 40%; */
249 } 249 }
250 250
251 .collect_box { 251 .collect_box {
@@ -289,7 +289,9 @@ page { @@ -289,7 +289,9 @@ page {
289 color: #1a1a1a; 289 color: #1a1a1a;
290 margin-top: 10rpx; 290 margin-top: 10rpx;
291 } 291 }
292 - 292 +.list_content text{
  293 + margin-right: 10rpx;
  294 +}
293 .list_img_box { 295 .list_img_box {
294 margin-top: 30rpx; 296 margin-top: 30rpx;
295 } 297 }
@@ -360,12 +362,13 @@ page { @@ -360,12 +362,13 @@ page {
360 display: inline-block; 362 display: inline-block;
361 position: absolute; 363 position: absolute;
362 right: 0; 364 right: 0;
363 - bottom: -205rpx; 365 + bottom: -185rpx;
364 width: 250rpx; 366 width: 250rpx;
365 background: #fff; 367 background: #fff;
366 box-shadow: 0 8rpx 30rpx 0 #e5e5e5; 368 box-shadow: 0 8rpx 30rpx 0 #e5e5e5;
367 color: #000; 369 color: #000;
368 padding: 30rpx 0; 370 padding: 30rpx 0;
  371 + z-index: 100;
369 } 372 }
370 373
371 .more { 374 .more {
@@ -380,7 +383,7 @@ page { @@ -380,7 +383,7 @@ page {
380 width: 100%; 383 width: 100%;
381 height: 3rpx; 384 height: 3rpx;
382 background: #ebebeb; 385 background: #ebebeb;
383 - margin: 30rpx 0; 386 + margin: 20rpx 0;
384 } 387 }
385 388
386 .pinglun2, .xin2 { 389 .pinglun2, .xin2 {
@@ -8,8 +8,9 @@ Page({ @@ -8,8 +8,9 @@ Page({
8 data: { 8 data: {
9 status: '', 9 status: '',
10 list: [], 10 list: [],
11 - mask_state:false,  
12 - id:0, 11 + mask_state: false,
  12 + id: 0,
  13 + page: 1
13 }, 14 },
14 15
15 goUserInfo(e) { 16 goUserInfo(e) {
@@ -23,8 +24,8 @@ Page({ @@ -23,8 +24,8 @@ Page({
23 let url = '/home/index/checkFans' 24 let url = '/home/index/checkFans'
24 let params = { 25 let params = {
25 status: this.data.status, 26 status: this.data.status,
26 - open_user_id:this.data.id,  
27 - page:1 27 + open_user_id: this.data.id,
  28 + page: this.data.page
28 } 29 }
29 let header = { 30 let header = {
30 "XX-Token": wx.getStorageSync('token'), 31 "XX-Token": wx.getStorageSync('token'),
@@ -41,38 +42,19 @@ Page({ @@ -41,38 +42,19 @@ Page({
41 }) 42 })
42 }, 43 },
43 44
44 -  
45 - //关注接口  
46 - // attentionInfo(e) {  
47 - // let that = this;  
48 - // var id = e.currentTarget.dataset.id  
49 - // var status = e.currentTarget.dataset.status  
50 - // let url = '/home/index/host';  
51 - // let param = {  
52 - // open_user_id: id,  
53 - // status: status  
54 - // }  
55 - // let header = {  
56 - // 'XX-Token': wx.getStorageSync('token'),  
57 - // 'XX-Device-Type': 'wxapp'  
58 - // }  
59 - // app.post(url, param, header).then((res) => {  
60 - // if (res.data.code == 20000) {  
61 - // this.getData()  
62 - // }  
63 - // })  
64 - // },  
65 -  
66 showMask(e) { 45 showMask(e) {
67 var id = e.currentTarget.dataset.id 46 var id = e.currentTarget.dataset.id
68 var status = e.currentTarget.dataset.status 47 var status = e.currentTarget.dataset.status
  48 + var host = status
69 wx.setStorageSync('id', id) 49 wx.setStorageSync('id', id)
70 wx.setStorageSync('status', status) 50 wx.setStorageSync('status', status)
  51 + if (host != 1) {
71 this.setData({ 52 this.setData({
72 mask_state: true, 53 mask_state: true,
73 - // id: id,  
74 - // status: status  
75 }) 54 })
  55 + } else {
  56 + this.attentionInfo()
  57 + }
76 }, 58 },
77 59
78 cancleMask() { 60 cancleMask() {
@@ -80,14 +62,15 @@ Page({ @@ -80,14 +62,15 @@ Page({
80 mask_state: false 62 mask_state: false
81 }) 63 })
82 }, 64 },
  65 +
83 attentionInfo() { 66 attentionInfo() {
84 var id = wx.getStorageSync('id') 67 var id = wx.getStorageSync('id')
85 var status = parseInt(wx.getStorageSync('status')) 68 var status = parseInt(wx.getStorageSync('status'))
86 var that = this 69 var that = this
87 let url = '/home/index/host'; 70 let url = '/home/index/host';
88 let param = { 71 let param = {
89 - open_user_id:id,  
90 - status:status , 72 + open_user_id: id,
  73 + status: status,
91 } 74 }
92 let header = { 75 let header = {
93 'XX-Token': wx.getStorageSync('token'), 76 'XX-Token': wx.getStorageSync('token'),
@@ -95,6 +78,11 @@ Page({ @@ -95,6 +78,11 @@ Page({
95 } 78 }
96 app.post(url, param, header).then((res) => { 79 app.post(url, param, header).then((res) => {
97 if (res.data.code == 20000) { 80 if (res.data.code == 20000) {
  81 + // // status == 1 ? status = 1 : status = 2
  82 + // console.log(status)
  83 + // that.setData({
  84 + // status: status
  85 + // })
98 that.getData() 86 that.getData()
99 } 87 }
100 }) 88 })
@@ -108,12 +96,12 @@ Page({ @@ -108,12 +96,12 @@ Page({
108 status: options.status ? options.status : '', 96 status: options.status ? options.status : '',
109 id: options.id ? options.id : 0 97 id: options.id ? options.id : 0
110 }) 98 })
111 - this.getData()  
112 if (options.status == 1) { 99 if (options.status == 1) {
113 wx.setNavigationBarTitle({ 100 wx.setNavigationBarTitle({
114 title: '关注', 101 title: '关注',
115 }) 102 })
116 } 103 }
  104 + this.getData()
117 }, 105 },
118 106
119 /** 107 /**
@@ -10,8 +10,8 @@ @@ -10,8 +10,8 @@
10 </view> 10 </view>
11 </view> 11 </view>
12 </view> 12 </view>
13 - <view class="list_label list_active" catchtap='showMask' data-id='{{item.id}}' data-status='1' wx:if='{{status==2}}'>添加关注</view>  
14 - <view class="list_label" catchtap='showMask' data-id='{{item.id}}' data-status='2' wx:if='{{status==1}}'>取消关注</view> 13 + <view class="list_label" catchtap='showMask' data-id='{{item.id}}' data-status='1' wx:if='{{status==2}}'>添加关注</view>
  14 + <view class="list_label list_active" catchtap='showMask' data-id='{{item.id}}' data-status='2' wx:if='{{status==1}}'>取消关注</view>
15 </view> 15 </view>
16 </view> 16 </view>
17 17
@@ -50,6 +50,7 @@ @@ -50,6 +50,7 @@
50 align-items: center; 50 align-items: center;
51 justify-content: center; 51 justify-content: center;
52 } 52 }
  53 +
53 .list_active{ 54 .list_active{
54 background: #F7F7F7; 55 background: #F7F7F7;
55 color: #3568CC; 56 color: #3568CC;
@@ -14,7 +14,7 @@ Page({ @@ -14,7 +14,7 @@ Page({
14 style_array: ['时尚', '学院', '欧美风'], 14 style_array: ['时尚', '学院', '欧美风'],
15 style_index: -1, 15 style_index: -1,
16 height_array: [ 16 height_array: [
17 - '150cm-153cm', '153cm-156cm', '156cm-159cm', '159cm-162cm', '162cm-165cm', '165cm-168cm', '168cm-171cm', '171cm-174cm', '174cm-177cm', '174cm-177cm', '177cm-180cm', '180cm-183cm', '183cm-186cm', '186cm-189cm', '192cm-195cm', '195cm-198cm', 17 + '150cm-153cm', '153cm-156cm', '156cm-159cm', '159cm-162cm', '162cm-165cm', '165cm-168cm', '168cm-171cm', '171cm-174cm', '174cm-177cm', '177cm-180cm', '180cm-183cm', '183cm-186cm', '186cm-190cm',
18 ], 18 ],
19 height_index: -1, 19 height_index: -1,
20 weight_array: [ 20 weight_array: [
@@ -27,7 +27,6 @@ Page({ @@ -27,7 +27,6 @@ Page({
27 stature: '', 27 stature: '',
28 weight: '', 28 weight: '',
29 status: 0, 29 status: 0,
30 -  
31 order: 1, 30 order: 1,
32 poster_list: [], 31 poster_list: [],
33 img_state: false, 32 img_state: false,
@@ -37,12 +36,8 @@ Page({ @@ -37,12 +36,8 @@ Page({
37 list: [], 36 list: [],
38 list2: [], 37 list2: [],
39 last_page: '', 38 last_page: '',
40 -  
41 - // 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  
42 - cardPath: '',  
43 - headPath: '',  
44 - // https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1534765039080&di=1e81a596bc89cd54db55c0dbc7c4bb87&imgtype=0&src=http%3A%2F%2Fimg3.100bt.com%2Fupload%2Fttq%2F20140529%2F1401337844678_middle.png  
45 - sendName: '' 39 + state: true,
  40 + tempHeight: ''
46 }, 41 },
47 42
48 saveImg(e) { 43 saveImg(e) {
@@ -108,39 +103,56 @@ Page({ @@ -108,39 +103,56 @@ Page({
108 return false 103 return false
109 } else { 104 } else {
110 this.setData({ 105 this.setData({
111 - order: current 106 + order: current,
  107 + page: 1,
  108 + list: []
112 }) 109 })
113 } 110 }
114 this.getData() 111 this.getData()
115 }, 112 },
116 113
117 - //点击关注  
118 - attention(e) {  
119 - var status = this.data.status 114 + showMask(e) {
120 var index = e.currentTarget.dataset.index 115 var index = e.currentTarget.dataset.index
121 var id = e.currentTarget.dataset.id 116 var id = e.currentTarget.dataset.id
122 var list = this.data.list 117 var list = this.data.list
  118 + var status = this.data.status
  119 + var host = e.currentTarget.dataset.host
123 if (list[index].user_host == 1) { 120 if (list[index].user_host == 1) {
124 - list[index].user_host = 0  
125 status = 2 121 status = 2
126 } else { 122 } else {
127 - list[index].user_host = 1  
128 status = 1 123 status = 1
129 } 124 }
130 - this.attentionInfo(id, status)  
131 this.setData({ 125 this.setData({
132 status: status, 126 status: status,
133 - list: list  
134 }) 127 })
  128 + wx.setStorageSync('id', id)
  129 + wx.setStorageSync('status', status)
  130 + wx.setStorageSync('index', index)
  131 + if (host == 1) {
  132 + this.setData({
  133 + mask_state: true,
  134 + })
  135 + } else {
  136 + this.attentionInfo()
  137 + }
135 }, 138 },
136 139
137 - //关注接口  
138 - attentionInfo(id, status) {  
139 - let that = this; 140 + cancleMask() {
  141 + this.setData({
  142 + mask_state: false
  143 + })
  144 + },
  145 +
  146 + attentionInfo() {
  147 + var id = wx.getStorageSync('id')
  148 + var status = parseInt(wx.getStorageSync('status'))
  149 + var list = this.data.list
  150 + var index = wx.getStorageSync('index')
  151 + var that = this
140 let url = '/home/index/host'; 152 let url = '/home/index/host';
141 let param = { 153 let param = {
142 open_user_id: id, 154 open_user_id: id,
143 - status: status 155 + status: status,
144 } 156 }
145 let header = { 157 let header = {
146 'XX-Token': wx.getStorageSync('token'), 158 'XX-Token': wx.getStorageSync('token'),
@@ -148,16 +160,27 @@ Page({ @@ -148,16 +160,27 @@ Page({
148 } 160 }
149 app.post(url, param, header).then((res) => { 161 app.post(url, param, header).then((res) => {
150 if (res.data.code == 20000) { 162 if (res.data.code == 20000) {
151 - this.getData() 163 + status == 1 ? list[index].user_host = 1 : list[index].user_host = 2
  164 + console.log(status)
  165 + that.setData({
  166 + status: status,
  167 + list: list
  168 + })
  169 + that.setData({
  170 + list: [],
  171 + page: 1,
  172 + })
  173 + that.getData()
152 } 174 }
153 }) 175 })
154 }, 176 },
155 177
156 //点赞 178 //点赞
157 likeCharge(e) { 179 likeCharge(e) {
  180 + var that = this
158 var id = e.currentTarget.dataset.id 181 var id = e.currentTarget.dataset.id
159 var index = e.currentTarget.dataset.index 182 var index = e.currentTarget.dataset.index
160 - var list = this.data.list 183 + var list = that.data.list
161 var status = '' 184 var status = ''
162 if (list[index].user_support == 1) { 185 if (list[index].user_support == 1) {
163 list[index].user_support = 0 186 list[index].user_support = 0
@@ -166,14 +189,14 @@ Page({ @@ -166,14 +189,14 @@ Page({
166 list[index].user_support = 1 189 list[index].user_support = 1
167 status = 1 190 status = 1
168 } 191 }
169 - this.setData({ 192 + that.setData({
170 list: list 193 list: list
171 }) 194 })
172 - this.like(id, status)  
173 - // this.getData() 195 + that.like(id, status)
174 }, 196 },
175 197
176 like(id, status) { 198 like(id, status) {
  199 + var that = this
177 let url = '/home/index/support' 200 let url = '/home/index/support'
178 let params = { 201 let params = {
179 list_id: id, 202 list_id: id,
@@ -185,7 +208,12 @@ Page({ @@ -185,7 +208,12 @@ Page({
185 } 208 }
186 app.post(url, params, header).then((res) => { 209 app.post(url, params, header).then((res) => {
187 if (res.data.code == 20000) { 210 if (res.data.code == 20000) {
188 - this.getData() 211 + var page = parseInt(this.data.page)-1
  212 + that.setData({
  213 + list: [],
  214 + page: page,
  215 + })
  216 + that.getData()
189 } 217 }
190 }) 218 })
191 }, 219 },
@@ -222,6 +250,10 @@ Page({ @@ -222,6 +250,10 @@ Page({
222 app.post(url, params, header).then((res) => { 250 app.post(url, params, header).then((res) => {
223 console.log(res) 251 console.log(res)
224 if (res.data.code == 20000) { 252 if (res.data.code == 20000) {
  253 + this.setData({
  254 + list: [],
  255 + page: 1,
  256 + })
225 this.getData() 257 this.getData()
226 } 258 }
227 }) 259 })
@@ -234,13 +266,7 @@ Page({ @@ -234,13 +266,7 @@ Page({
234 wx.navigateTo({ 266 wx.navigateTo({
235 url: '/pages/index/comment/comment?id=' + id + '&type=' + type, 267 url: '/pages/index/comment/comment?id=' + id + '&type=' + type,
236 }) 268 })
237 - },  
238 269
239 - //事件处理函数  
240 - bindViewTap: function() {  
241 - wx.navigateTo({  
242 - url: '../logs/logs'  
243 - })  
244 }, 270 },
245 271
246 showClassify() { 272 showClassify() {
@@ -248,6 +274,21 @@ Page({ @@ -248,6 +274,21 @@ Page({
248 classify_state: !(this.data.classify_state) 274 classify_state: !(this.data.classify_state)
249 }) 275 })
250 }, 276 },
  277 + cancleClassify() {
  278 + this.setData({
  279 + classify_state: false
  280 + })
  281 + },
  282 +
  283 + showMore(e) {
  284 + var index = e.currentTarget.dataset.index
  285 + var list = this.data.list
  286 + list[index].more_state = !(list[index].more_state)
  287 + this.setData({
  288 + more_state: !(this.data.more_state),
  289 + list: list
  290 + })
  291 + },
251 292
252 showPoster(e) { 293 showPoster(e) {
253 var id = e.currentTarget.dataset.id 294 var id = e.currentTarget.dataset.id
@@ -257,11 +298,9 @@ Page({ @@ -257,11 +298,9 @@ Page({
257 title: '加载中', 298 title: '加载中',
258 icon: 'loading' 299 icon: 'loading'
259 }) 300 })
260 - // setTimeout(function() {  
261 that.setData({ 301 that.setData({
262 poster_state: true 302 poster_state: true
263 }) 303 })
264 - // }, 2000)  
265 this.getPoster(id) 304 this.getPoster(id)
266 }, 305 },
267 306
@@ -277,7 +316,6 @@ Page({ @@ -277,7 +316,6 @@ Page({
277 wx.showTabBar({}) 316 wx.showTabBar({})
278 }, 317 },
279 318
280 -  
281 getPoster(id) { 319 getPoster(id) {
282 let that = this; 320 let that = this;
283 let url = '/home/index/fashionShare'; 321 let url = '/home/index/fashionShare';
@@ -292,27 +330,30 @@ Page({ @@ -292,27 +330,30 @@ Page({
292 console.log(res) 330 console.log(res)
293 331
294 if (res.data.code == 20000) { 332 if (res.data.code == 20000) {
295 - this.setData({ 333 + that.setData({
296 poster: res.data.data.url, 334 poster: res.data.data.url,
297 }) 335 })
298 - }  
299 - 336 + that.setData({
  337 + state: true
300 }) 338 })
301 - }, 339 + } else if (res.data.code == 30001) {
  340 + wx.showToast({
  341 + title: '上传图片才可生成海报',
  342 + icon: 'none'
  343 + })
  344 + setTimeout(function() {
  345 + that.setData({
  346 + poster_state: false
  347 + })
  348 + wx.showTabBar({
302 349
303 - cancleClassify() {  
304 - this.setData({  
305 - classify_state: false  
306 }) 350 })
307 - }, 351 + }, 2000)
  352 + that.setData({
  353 + state: false
  354 + })
  355 + }
308 356
309 - showMore(e) {  
310 - var index = e.currentTarget.dataset.index  
311 - var list = this.data.list  
312 - list[index].more_state = !(list[index].more_state)  
313 - this.setData({  
314 - more_state: !(this.data.more_state),  
315 - list: list  
316 }) 357 })
317 }, 358 },
318 359
@@ -338,9 +379,16 @@ Page({ @@ -338,9 +379,16 @@ Page({
338 }, 379 },
339 380
340 releaseInfo() { 381 releaseInfo() {
  382 + if (this.data.tempHeight == '') {
  383 + wx.showToast({
  384 + title: '请去完善身份信息',
  385 + icon: 'none'
  386 + })
  387 + } else {
341 wx.navigateTo({ 388 wx.navigateTo({
342 url: '/pages/index/release/release', 389 url: '/pages/index/release/release',
343 }) 390 })
  391 + }
344 }, 392 },
345 393
346 //设置查询的关键词 394 //设置查询的关键词
@@ -442,22 +490,14 @@ Page({ @@ -442,22 +490,14 @@ Page({
442 console.log('data', res) 490 console.log('data', res)
443 if (res.data.code == 20000) { 491 if (res.data.code == 20000) {
444 var list = this.data.list 492 var list = this.data.list
445 - console.log(list, '33')  
446 - console.log(list.concat(res.data.data.list))  
447 - // list2.concat(res.data.data.list)  
448 - // var list = list2  
449 // for (var i = 0; i < list.length; i++) { 493 // for (var i = 0; i < list.length; i++) {
450 // list[i].more_state = false 494 // list[i].more_state = false
451 // } 495 // }
452 -  
453 -  
454 if (res.data.data.list != '') { 496 if (res.data.data.list != '') {
455 - console.log(that.data.list2)  
456 that.setData({ 497 that.setData({
457 list: list.concat(res.data.data.list), 498 list: list.concat(res.data.data.list),
458 last_page: res.data.data.last_page, 499 last_page: res.data.data.last_page,
459 }) 500 })
460 - console.log('list', that.data.list)  
461 } else if (this.data.page > res.data.data.last_page) { 501 } else if (this.data.page > res.data.data.last_page) {
462 wx.showToast({ 502 wx.showToast({
463 title: '没有更多数据了', 503 title: '没有更多数据了',
@@ -477,107 +517,43 @@ Page({ @@ -477,107 +517,43 @@ Page({
477 }).catch((errMsg) => {}) 517 }).catch((errMsg) => {})
478 }, 518 },
479 519
480 - //画图  
481 - drawCanvas: function() {  
482 - console.log(this.data.cardPath, 'aa')  
483 - this.setData({  
484 - cardPath: this.data.cardPath,  
485 - headPath: this.data.headPath,  
486 - sendName: this.data.sendName  
487 - });  
488 - let ctx = wx.createCanvasContext('myCanvas');  
489 - let ctxW = this.data.windowWidth;  
490 - let ctxH = 1210;  
491 -  
492 - // 默认像素比  
493 - let pixelRatio = this.data.pixelRatio;  
494 - // 垂直渐变  
495 - const grd = ctx.createLinearGradient(0, 0, 0, ctxH);  
496 - grd.addColorStop(0, '#ffffff');  
497 - grd.addColorStop(1, '#ffffff');  
498 - ctx.setFillStyle(grd);  
499 - ctx.fillRect(0, 0, ctxW, ctxH);  
500 -  
501 - wx.getImageInfo({  
502 - src: this.data.cardPath,  
503 - success: (res) => {  
504 - console.log('canvas', res)  
505 - ctx.drawImage(res.path, 15, 15, 345, 470); //card  
506 - wx.getImageInfo({  
507 - src: this.data.headPath,  
508 - success: (res) => {  
509 - /**/  
510 - ctx.arc(46, 358, 25, 0, 2 * Math.PI)  
511 - ctx.fill()  
512 - ctx.save();  
513 - ctx.beginPath(); //开始绘制  
514 - ctx.clip(); //剪切  
515 - ctx.drawImage(res.path, 23, 333, 50, 50); //userHeader // 推进去图片必须是https  
516 - ctx.restore(); //恢复之前保存的绘图上下文 继续绘制  
517 - /**/  
518 - ctx.setTextAlign('left');  
519 - ctx.setTextBaseline('middle');  
520 - ctx.setFontSize(16);  
521 - ctx.setFillStyle('#fff');  
522 - this.fontLineFeed(ctx, this.data.sendName, 450, 30, 79, 328);  
523 - ctx.stroke();  
524 - ctx.draw();  
525 - }  
526 - })  
527 - }  
528 - })  
529 - },  
530 520
531 - // 保存图片  
532 - saveImage: function(e) {  
533 - wx.canvasToTempFilePath({  
534 - canvasId: 'myCanvas',  
535 - success: function(res) {  
536 - wx.saveImageToPhotosAlbum({  
537 - filePath: res.tempFilePath,  
538 - success(result) {  
539 - wx.showToast({  
540 - title: '图片保存成功',  
541 - icon: 'success',  
542 - duration: 2000  
543 - }) 521 + getUserInfo() {
  522 + let url = '/home/index/userLook'
  523 + let params = {}
  524 + let header = {
  525 + "XX-Token": wx.getStorageSync('token'),
  526 + 'XX-Device-Type': 'wxapp'
544 } 527 }
  528 + app.post(url, params, header).then((res) => {
  529 + console.log('userinfo', res)
  530 + if (res.data.code == 20000) {
  531 + this.setData({
  532 + // avatar: res.data.data.avatar,
  533 + // birthday: birthday,
  534 + // constellation: res.data.data.constellation,
  535 + // sex_index: sex_index,
  536 + // signature: res.data.data.signature,
  537 + tempHeight: res.data.data.stature,
  538 + // user_name: res.data.data.user_nickname,
  539 + // weight: res.data.data.weight,
545 }) 540 })
546 } 541 }
547 - })  
548 - },  
549 542
550 - // 文字换行  
551 - fontLineFeed: function(ctx, str, splitLen, strHeight, x, y) {  
552 - let strArr = [];  
553 - for (let i = 0, len = str.length / splitLen; i < len; i++) {  
554 - strArr.push(str.substring(i * splitLen, i * splitLen + splitLen));  
555 - }  
556 - let s = 0;  
557 - for (let j = 0, len = strArr.length; j < len; j++) {  
558 - s = s + strHeight;  
559 - ctx.fillText(strArr[j], x, y + s);  
560 - } 543 + })
561 }, 544 },
562 -  
563 onLoad: function() { 545 onLoad: function() {
564 - this.getData() 546 + // this.getData()
565 this.getStyle() 547 this.getStyle()
566 - var that = this;  
567 - wx: wx.getSystemInfo({  
568 - success: function(res) {  
569 - that.setData({  
570 - pixelRatio: res.pixelRatio,  
571 - windowWidth: res.windowWidth,  
572 - windowHeight: res.windowHeight  
573 - })  
574 - }  
575 - })  
576 - that.drawCanvas(); 548 + this.getUserInfo()
577 }, 549 },
578 550
579 onShow() { 551 onShow() {
580 - // this.getData() 552 + this.setData({
  553 + list: [],
  554 + page: 1
  555 + })
  556 + this.getData()
581 }, 557 },
582 558
583 onReachBottom: function() { 559 onReachBottom: function() {
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 <view class='list_head_box'> 24 <view class='list_head_box'>
25 <view class='user_name'>{{item.user_nickname}}</view> 25 <view class='user_name'>{{item.user_nickname}}</view>
26 <view class=' state_box'> 26 <view class=' state_box'>
27 - <view class="collect_box {{item.user_host==1?'active':''}}" catchtap='attention' data-index="{{mindex}}" data-id='{{item.open_user_id}}'> 27 + <view class="collect_box {{item.user_host==1?'active':''}}" catchtap='showMask' data-index="{{mindex}}" data-id='{{item.open_user_id}}' data-host='{{item.user_host}}'>
28 <text class="collect_word">{{item.user_host==1?'取消关注':'关注TA'}}</text> 28 <text class="collect_word">{{item.user_host==1?'取消关注':'关注TA'}}</text>
29 </view> 29 </view>
30 </view> 30 </view>
@@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
38 </view> 38 </view>
39 <view class='list_content'> 39 <view class='list_content'>
40 <!-- {{item.text}} --> 40 <!-- {{item.text}} -->
41 - <text wx:for='{{item.styles}}' wx:for-item='its' wx:key>{{its}}</text> 41 + <text wx:for='{{item.styles}}' wx:for-item='its' wx:key>#{{its}}</text>
42 </view> 42 </view>
43 </view> 43 </view>
44 <view class='list_state_box'> 44 <view class='list_state_box'>
@@ -78,7 +78,7 @@ @@ -78,7 +78,7 @@
78 </view> 78 </view>
79 </view> 79 </view>
80 <view class='iconfont icon-jia' bindtap='releaseInfo'></view> 80 <view class='iconfont icon-jia' bindtap='releaseInfo'></view>
81 -<view class='mask_box2' wx:if='{{poster_state}}'> 81 +<view class="mask_box2 {{!state?'mask3':''}}" wx:if='{{poster_state}}'>
82 <!-- <view class="canvasBox"> --> 82 <!-- <view class="canvasBox"> -->
83 <!-- <canvas canvas-id='myCanvas' style=''></canvas> --> 83 <!-- <canvas canvas-id='myCanvas' style=''></canvas> -->
84 <!-- </view> --> 84 <!-- </view> -->
@@ -101,8 +101,8 @@ @@ -101,8 +101,8 @@
101 <view class='popup_img'> 101 <view class='popup_img'>
102 <image src='{{poster}}'></image> 102 <image src='{{poster}}'></image>
103 </view> 103 </view>
104 - <view class='popup_icon_box'>  
105 - <view class='popup_btn_box' bindtap='saveImg' data-src='{{poster}}'> 104 + <view class='popup_icon_box' wx:if='{{state}}'>
  105 + <view class='popup_btn_box2' bindtap='saveImg' data-src='{{poster}}'>
106 <view class='popup_btn2'>保存图片</view> 106 <view class='popup_btn2'>保存图片</view>
107 </view> 107 </view>
108 <!-- <image src='/images/chuanda_quan_90@2x.png'></image> --> 108 <!-- <image src='/images/chuanda_quan_90@2x.png'></image> -->
@@ -110,7 +110,7 @@ @@ -110,7 +110,7 @@
110 </view> 110 </view>
111 </view> 111 </view>
112 </view> 112 </view>
113 - <view class='iconfont icon-quxiao' bindtap='canclePopup'></view> 113 + <view class='iconfont icon-quxiao' bindtap='canclePopup' wx:if='{{state}}'></view>
114 </view> 114 </view>
115 </view> 115 </view>
116 116
@@ -160,3 +160,14 @@ @@ -160,3 +160,14 @@
160 <text>{{img_text}}</text> 160 <text>{{img_text}}</text>
161 </view> 161 </view>
162 </view> 162 </view>
  163 +
  164 +<view class='mask_box' wx:if='{{mask_state}}' catchtap='cancleMask'>
  165 + <view class='popup_box'>
  166 + <view class='popup_title'>提示</view>
  167 + <view>确认取消关注吗?</view>
  168 + <view class='popup_btn_box'>
  169 + <view class='popup_btn' catchtap='cancleMask'>取消</view>
  170 + <view class='popup_btn' bindtap='attentionInfo'>确定</view>
  171 + </view>
  172 + </view>
  173 +</view>
@@ -13,28 +13,37 @@ page { @@ -13,28 +13,37 @@ page {
13 .mask_box2 { 13 .mask_box2 {
14 position: relative; 14 position: relative;
15 } 15 }
16 -.mask{ 16 +
  17 +.mask3 {
  18 + background: #fff !important;
  19 +}
  20 +
  21 +.mask {
17 background: rgba(0, 0, 0, 0.8); 22 background: rgba(0, 0, 0, 0.8);
18 font-size: 32rpx; 23 font-size: 32rpx;
19 - color: #FFFFFF; 24 + color: #fff;
20 flex-wrap: wrap; 25 flex-wrap: wrap;
21 } 26 }
22 -.img_box{ 27 +
  28 +.img_box {
23 width: 100%; 29 width: 100%;
24 display: flex; 30 display: flex;
25 align-items: center; 31 align-items: center;
26 justify-content: center; 32 justify-content: center;
27 flex-wrap: wrap; 33 flex-wrap: wrap;
28 } 34 }
29 -.img_box image{ 35 +
  36 +.img_box image {
30 margin: 0 auto; 37 margin: 0 auto;
31 } 38 }
32 -.mask text{ 39 +
  40 +.mask text {
33 display: inline-block; 41 display: inline-block;
34 width: 100%; 42 width: 100%;
35 margin-top: 30rpx; 43 margin-top: 30rpx;
36 text-align: center; 44 text-align: center;
37 } 45 }
  46 +
38 .btn { 47 .btn {
39 width: 400rpx; 48 width: 400rpx;
40 height: 80rpx; 49 height: 80rpx;
@@ -329,9 +338,11 @@ page { @@ -329,9 +338,11 @@ page {
329 color: #1a1a1a; 338 color: #1a1a1a;
330 margin-top: 10rpx; 339 margin-top: 10rpx;
331 } 340 }
332 -.list_content text{ 341 +
  342 +.list_content text {
333 margin-right: 10rpx; 343 margin-right: 10rpx;
334 } 344 }
  345 +
335 .list_img_box { 346 .list_img_box {
336 display: flex; 347 display: flex;
337 flex-wrap: wrap; 348 flex-wrap: wrap;
@@ -505,7 +516,7 @@ page { @@ -505,7 +516,7 @@ page {
505 height: 156rpx; 516 height: 156rpx;
506 } 517 }
507 518
508 -.popup_btn_box { 519 +.popup_btn_box2 {
509 width: 200rpx; 520 width: 200rpx;
510 height: 72rpx; 521 height: 72rpx;
511 background: rgba(255, 255, 255, 1); 522 background: rgba(255, 255, 255, 1);
@@ -549,13 +560,15 @@ page { @@ -549,13 +560,15 @@ page {
549 right: 0; 560 right: 0;
550 z-index: 100; 561 z-index: 100;
551 } 562 }
552 -.popup_img{ 563 +
  564 +.popup_img {
553 width: 100%; 565 width: 100%;
554 - height:1026rpx; 566 + height: 1026rpx;
555 border-radius: 16rpx; 567 border-radius: 16rpx;
556 overflow: hidden; 568 overflow: hidden;
557 } 569 }
558 -.popup_img image{ 570 +
  571 +.popup_img image {
559 width: 100%; 572 width: 100%;
560 height: 100%; 573 height: 100%;
561 } 574 }
@@ -588,7 +601,7 @@ page { @@ -588,7 +601,7 @@ page {
588 position: fixed; 601 position: fixed;
589 top: 90rpx; 602 top: 90rpx;
590 right: 0rpx; 603 right: 0rpx;
591 - z-index:900; 604 + z-index: 900;
592 } 605 }
593 606
594 .classify_item { 607 .classify_item {
@@ -605,11 +618,15 @@ page { @@ -605,11 +618,15 @@ page {
605 width: 83%; 618 width: 83%;
606 display: flex; 619 display: flex;
607 align-items: center; 620 align-items: center;
  621 + justify-content: flex-end;
  622 + /* border: 1rpx solid red; */
  623 +
608 } 624 }
609 625
610 .chassify_picker input { 626 .chassify_picker input {
611 - width: 140%; 627 + /* width: 140%; */
612 text-align: right; 628 text-align: right;
  629 + /* border: 1rpx solid black; */
613 } 630 }
614 631
615 .classify_btn_box { 632 .classify_btn_box {
@@ -13,9 +13,9 @@ Page({ @@ -13,9 +13,9 @@ Page({
13 sex_index: -1, 13 sex_index: -1,
14 birthday: '', 14 birthday: '',
15 constellation_array: ['白羊座', '金牛座', '双子座', '巨蟹座', '狮子座', '处女座', '天秤座', '天蝎座', '射手座', '摩羯座', '水瓶座', '双鱼座'], 15 constellation_array: ['白羊座', '金牛座', '双子座', '巨蟹座', '狮子座', '处女座', '天秤座', '天蝎座', '射手座', '摩羯座', '水瓶座', '双鱼座'],
16 - index:-1,  
17 - current_num:0,  
18 - max:30, 16 + index: -1,
  17 + current_num: 0,
  18 + max: 30,
19 }, 19 },
20 20
21 getText(e) { 21 getText(e) {
@@ -38,7 +38,7 @@ Page({ @@ -38,7 +38,7 @@ Page({
38 }) 38 })
39 }, 39 },
40 40
41 - setInfo(e){ 41 + setInfo(e) {
42 this.setData({ 42 this.setData({
43 index: e.detail.value, 43 index: e.detail.value,
44 constellation: this.data.constellation_array[e.detail.value] 44 constellation: this.data.constellation_array[e.detail.value]
@@ -85,7 +85,6 @@ Page({ @@ -85,7 +85,6 @@ Page({
85 file: tempFilePaths[0] 85 file: tempFilePaths[0]
86 }, 86 },
87 success: function(res) { 87 success: function(res) {
88 - console.log(res)  
89 var data = JSON.parse(res.data) 88 var data = JSON.parse(res.data)
90 var avatar = data.data.url; 89 var avatar = data.data.url;
91 that.setData({ 90 that.setData({
@@ -105,14 +104,17 @@ Page({ @@ -105,14 +104,17 @@ Page({
105 'XX-Device-Type': 'wxapp' 104 'XX-Device-Type': 'wxapp'
106 } 105 }
107 app.post(url, params, header).then((res) => { 106 app.post(url, params, header).then((res) => {
108 - console.log(res)  
109 if (res.data.code == 20000) { 107 if (res.data.code == 20000) {
110 var sex = res.data.data.sex 108 var sex = res.data.data.sex
111 var sex_index = this.data.sex_index 109 var sex_index = this.data.sex_index
112 sex_index = sex - 1 110 sex_index = sex - 1
  111 + var birthday = res.data.data.birthday
  112 + if (birthday == '1970-01-01') {
  113 + birthday = ''
  114 + }
113 this.setData({ 115 this.setData({
114 avatar: res.data.data.avatar, 116 avatar: res.data.data.avatar,
115 - birthday: res.data.data.birthday, 117 + birthday: birthday,
116 constellation: res.data.data.constellation, 118 constellation: res.data.data.constellation,
117 sex_index: sex_index, 119 sex_index: sex_index,
118 signature: res.data.data.signature, 120 signature: res.data.data.signature,
@@ -126,40 +128,81 @@ Page({ @@ -126,40 +128,81 @@ Page({
126 }, 128 },
127 129
128 formSubmit(e) { 130 formSubmit(e) {
129 - var sex_index = parseInt(this.data.sex_index)+1 131 + var sex_index = parseInt(this.data.sex_index) + 1
  132 + var avatar = this.data.avatar
  133 + var user_nickname = e.detail.value.user_name
  134 + var sex = sex_index
  135 + var birthday = this.data.birthday
  136 + var constellation = this.data.constellation
  137 + var weight = e.detail.value.weight
  138 + var stature = e.detail.value.stature
  139 + var signature = this.data.signature
  140 + var warn = ''
  141 + var flag = true
  142 + // if (avatar == "") {
  143 + // warn = "请上传头像";
  144 + // } else if (user_nickname == '') {
  145 + // warn = "请填写姓名";
  146 + // } else
  147 + // else if(birthday == '') {
  148 + // warn = "请选择出生日期"
  149 + // } else if (constellation == '') {
  150 + // warn = "请选择星座";
  151 + // }
  152 + // else if(signature == '') {
  153 + // warn = "请输入个性签名"
  154 +
  155 + // }
  156 +
  157 + if (sex_index == 0) {
  158 + warn = '请选择性别'
  159 + } else if (stature == '') {
  160 + warn = "请填写身高"
  161 + } else if (weight == '') {
  162 + warn = '请填写体重'
  163 + } else {
  164 + flag = false; //若必要信息都填写,则不用弹框.正常调用接口
130 let that = this; 165 let that = this;
131 let url = '/home/index/userUpdate'; 166 let url = '/home/index/userUpdate';
132 let param = { 167 let param = {
133 - avatar: this.data.avatar,  
134 - user_nickname: e.detail.value.user_name, 168 + avatar: avatar,
  169 + user_nickname: user_nickname,
135 sex: sex_index, 170 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, 171 + birthday: birthday,
  172 + constellation: constellation,
  173 + weight: weight,
  174 + stature: stature,
  175 + signature: signature,
141 } 176 }
142 let header = { 177 let header = {
143 'XX-Token': wx.getStorageSync('token'), 178 'XX-Token': wx.getStorageSync('token'),
144 'XX-Device-Type': 'wxapp' 179 'XX-Device-Type': 'wxapp'
145 } 180 }
146 app.post(url, param, header).then((res) => { 181 app.post(url, param, header).then((res) => {
147 - if(res.data.code==20000){ 182 + if (res.data.code == 20000) {
148 wx.showToast({ 183 wx.showToast({
149 title: '修改成功', 184 title: '修改成功',
150 }) 185 })
151 - setTimeout(function(){ 186 + setTimeout(function() {
152 wx.navigateBack({ 187 wx.navigateBack({
153 - dalta:1 188 + dalta: 1
154 }) 189 })
155 - },1500)  
156 - }else{ 190 + }, 1500)
  191 + } else {
157 wx.showToast({ 192 wx.showToast({
158 title: res.data.msg, 193 title: res.data.msg,
159 - icon:'none' 194 + icon: 'none'
160 }) 195 })
161 } 196 }
162 }) 197 })
  198 + }
  199 + if (flag == true) {
  200 + wx.showToast({
  201 + title: warn,
  202 + icon: 'none',
  203 + duration: 2000
  204 + })
  205 + }
163 }, 206 },
164 207
165 /** 208 /**
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 </view> 16 </view>
17 <!-- bindtap='showMask' --> 17 <!-- bindtap='showMask' -->
18 <view class='list_input'> 18 <view class='list_input'>
19 - <input type='number' placeholder='请输入' name='user_name' value='{{user_name}}' bindinput='getName'></input> 19 + <input type='text' placeholder='请输入' name='user_name' value='{{user_name}}' bindinput='getName'></input>
20 <view class='iconfont icon-fanhui'></view> 20 <view class='iconfont icon-fanhui'></view>
21 </view> 21 </view>
22 </view> 22 </view>
@@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
51 </view> 51 </view>
52 <view class='list_input'> 52 <view class='list_input'>
53 <picker range='{{constellation_array}}' value='{{index}}' bindchange='setInfo'> 53 <picker range='{{constellation_array}}' value='{{index}}' bindchange='setInfo'>
54 - <input type='text' placeholder='未选择' name='constellation' value='{{constellation}}' disabled='true'></input> 54 + <input type='text' placeholder='未选择' name='constellation' value="{{constellation!='null'?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>
@@ -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}}' value='{{signature}}' bindinput='getText'> 84 + <textarea placeholder='记录此刻的心情' maxlength='{{max}}' value='{{signature}}' bindinput='getText' maxlength='{{max}}'>
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>
@@ -16,12 +16,18 @@ Page({ @@ -16,12 +16,18 @@ Page({
16 var id = e.currentTarget.dataset.id 16 var id = e.currentTarget.dataset.id
17 var look_type = e.currentTarget.dataset.look_type 17 var look_type = e.currentTarget.dataset.look_type
18 var look = e.currentTarget.dataset.look 18 var look = e.currentTarget.dataset.look
19 -  
20 wx.navigateTo({ 19 wx.navigateTo({
21 url: '/pages/my/userInfo/userInfo?id=' + id + '&look_type=' + look_type + '&look=' + look, 20 url: '/pages/my/userInfo/userInfo?id=' + id + '&look_type=' + look_type + '&look=' + look,
22 }) 21 })
23 }, 22 },
24 23
  24 + goDetail(e){
  25 + var id = e.currentTarget.dataset.id
  26 + wx.navigateTo({
  27 + url: '/pages/index/detail/detail?id=' + id,
  28 + })
  29 + },
  30 +
25 readState(e) { 31 readState(e) {
26 var status = e.currentTarget.dataset.status 32 var status = e.currentTarget.dataset.status
27 this.setData({ 33 this.setData({
@@ -81,7 +87,7 @@ Page({ @@ -81,7 +87,7 @@ Page({
81 */ 87 */
82 onLoad: function(options) { 88 onLoad: function(options) {
83 this.getData() 89 this.getData()
84 - this.getData2() 90 + // this.getData2()
85 }, 91 },
86 92
87 /** 93 /**
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 </view> 6 </view>
7 <view class='content_box'> 7 <view class='content_box'>
8 <block wx:if='{{status==1||status==2}}'> 8 <block wx:if='{{status==1||status==2}}'>
9 - <view class='item_list' wx:for='{{list1.data}}' wx:key> 9 + <view class='item_list' wx:for='{{list1}}' wx:key>
10 <view class='list_left'> 10 <view class='list_left'>
11 <image class='head_img' src='{{item.avatar}}' catchtap='goCenter' data-id='{{item.news_user_id}}' data-look_type='{{status}}' data-look="{{item.news_id}}"></image> 11 <image class='head_img' src='{{item.avatar}}' catchtap='goCenter' data-id='{{item.news_user_id}}' data-look_type='{{status}}' data-look="{{item.news_id}}"></image>
12 <view> 12 <view>
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 <view> 14 <view>
15 <text wx:if='{{status==1}}'>评论了你的</text> 15 <text wx:if='{{status==1}}'>评论了你的</text>
16 <text wx:elif='{{status==2}}'>点赞了你的</text> 16 <text wx:elif='{{status==2}}'>点赞了你的</text>
17 - <text class='list_hint '>{{item.title}}</text> 17 + <text class='list_hint' catchtap='goDetail' data-id='{{item.list_id}}' >{{item.title}}</text>
18 </view> 18 </view>
19 </view> 19 </view>
20 </view> 20 </view>
@@ -36,15 +36,15 @@ @@ -36,15 +36,15 @@
36 <view class='point '></view> 36 <view class='point '></view>
37 </view> 37 </view>
38 </block> --> 38 </block> -->
39 - <block wx:elif='{{status==3}} '>  
40 - <view class='item_list' wx:for='{{list2}}' wx:key> 39 + <block wx:elif='{{status==3}}'>
  40 + <view class='item_list' wx:for='{{list2}}' wx:key >
41 <view class='list_left'> 41 <view class='list_left'>
42 <view> 42 <view>
43 <view class='user_name' style='font-weight:normal; '> 43 <view class='user_name' style='font-weight:normal; '>
44 <text>{{item.user_nickname}}您好,您发布的{{title}}审核</text> 44 <text>{{item.user_nickname}}您好,您发布的{{title}}审核</text>
45 - <text class='list_hint2'>未通过</text> 45 + <text class='list_hint2'>{{item.status==1?'通过':'未通过'}}</text>
46 </view> 46 </view>
47 - <view>原因:{{item.status_text}}</view> 47 + <view wx:if='{{item.status!=1}}'>原因:{{item.status_text}}</view>
48 <view>{{item.status_time}}</view> 48 <view>{{item.status_time}}</view>
49 </view> 49 </view>
50 </view> 50 </view>
@@ -31,8 +31,11 @@ Page({ @@ -31,8 +31,11 @@ Page({
31 imgsUrl: [], 31 imgsUrl: [],
32 open: 1, 32 open: 1,
33 more_info: '公开', 33 more_info: '公开',
  34 + imgInfoNum: 0,
34 }, 35 },
35 36
  37 +
  38 +
36 setTitle(e) { 39 setTitle(e) {
37 var content = e.detail.value; 40 var content = e.detail.value;
38 this.setData({ 41 this.setData({
@@ -61,7 +64,7 @@ Page({ @@ -61,7 +64,7 @@ Page({
61 imgInfo: content 64 imgInfo: content
62 }) 65 })
63 var len = parseInt(content.length); 66 var len = parseInt(content.length);
64 - if (len > this.data.max) return; 67 + if (len > this.data.max3) return;
65 this.setData({ 68 this.setData({
66 imgInfoNum: len //当前字数 69 imgInfoNum: len //当前字数
67 }); 70 });
@@ -205,19 +208,19 @@ Page({ @@ -205,19 +208,19 @@ Page({
205 console.log(open_time) 208 console.log(open_time)
206 this.setData({ 209 this.setData({
207 open_time: open_time, 210 open_time: open_time,
208 - time_info: open_time2 211 + time_info: open_time2 + ' 发送'
209 }) 212 })
210 }, 213 },
211 214
212 - showMask() { 215 + showMask1() {
213 this.setData({ 216 this.setData({
214 relsese_state: true 217 relsese_state: true
215 }) 218 })
216 }, 219 },
217 220
218 - cancleMask() { 221 + cancleMask1() {
219 this.setData({ 222 this.setData({
220 - relsese_state: false 223 + relsese_state: false,
221 }) 224 })
222 this.tempTime() 225 this.tempTime()
223 }, 226 },
@@ -298,10 +301,25 @@ Page({ @@ -298,10 +301,25 @@ Page({
298 }); 301 });
299 }, 302 },
300 303
  304 + showMask(e) {
  305 + var index = e.currentTarget.dataset.index
  306 + wx.setStorageSync('index', index)
  307 + this.setData({
  308 + mask_state: true,
  309 + // id: id
  310 + })
  311 + },
  312 +
  313 + cancleMask2() {
  314 + this.setData({
  315 + mask_state: false
  316 + })
  317 + },
  318 +
301 // 删除图片 319 // 删除图片
302 deleteImg(e) { 320 deleteImg(e) {
303 var imgs = this.data.images; 321 var imgs = this.data.images;
304 - var index = e.currentTarget.dataset.index; 322 + var index = wx.getStorageSync('index');
305 imgs.splice(index, 1); 323 imgs.splice(index, 1);
306 this.setData({ 324 this.setData({
307 images: imgs 325 images: imgs
@@ -368,6 +386,11 @@ Page({ @@ -368,6 +386,11 @@ Page({
368 styles: styles 386 styles: styles
369 }) 387 })
370 }, 388 },
  389 + cancleMask3() {
  390 + this.setData({
  391 + box_state: false
  392 + })
  393 + },
371 394
372 submitInfo() { 395 submitInfo() {
373 this.tempClassify() 396 this.tempClassify()
@@ -452,18 +475,19 @@ Page({ @@ -452,18 +475,19 @@ Page({
452 tempImg.text = images[i].text 475 tempImg.text = images[i].text
453 imgsUrl.push(tempImg) 476 imgsUrl.push(tempImg)
454 } 477 }
455 - // console.log(imgsUrl)  
456 if (res.data.code == 20000) { 478 if (res.data.code == 20000) {
457 this.setData({ 479 this.setData({
458 title: res.data.data.title, 480 title: res.data.data.title,
459 text: res.data.data.text, 481 text: res.data.data.text,
460 open: open, 482 open: open,
461 more_info: more_info, 483 more_info: more_info,
462 - time_info: res.data.data.open_time, 484 + time_info: res.data.data.open_time + ' 发送',
463 open_time: res.data.data.open_time, 485 open_time: res.data.data.open_time,
464 images: imgsUrl, 486 images: imgsUrl,
465 classify: classify, 487 classify: classify,
466 - styles: styles 488 + styles: styles,
  489 + currentWordNumber: (res.data.data.title).length,
  490 + number: (res.data.data.text).length
467 }) 491 })
468 } 492 }
469 }) 493 })
1 <!--pages/release/release.wxml--> 1 <!--pages/release/release.wxml-->
2 <view class='banner_box'> 2 <view class='banner_box'>
3 - <view class='type_box' bindtap="showPicker">  
4 <view> 3 <view>
5 - <input placeholder='标题' value='{{title}}' bindinput='setTitle'></input>  
6 - </view>  
7 - <text class="currentWordNumber">{{currentWordNumber|0}}/{{max}}</text> 4 + <view class='type_box' bindtap="showPicker">
  5 + <input placeholder='标题' value='{{title}}' bindinput='setTitle' maxlength="{{max}}"></input>
  6 + <text class="input_num">{{currentWordNumber|0}}/{{max}}</text>
8 </view> 7 </view>
9 <view class='textarea_box'> 8 <view class='textarea_box'>
10 <textarea class='textarea' placeholder='同大家分享一下你的穿搭秘籍吧~' maxlength='{{max2}}' value='{{text}}' bindinput='setText'> 9 <textarea class='textarea' placeholder='同大家分享一下你的穿搭秘籍吧~' maxlength='{{max2}}' value='{{text}}' bindinput='setText'>
11 <text class="number">{{number|0}}/{{max2}}</text> 10 <text class="number">{{number|0}}/{{max2}}</text>
12 </textarea> 11 </textarea>
13 </view> 12 </view>
  13 + </view>
14 <view class='upload_box'> 14 <view class='upload_box'>
15 <block wx:for="{{images}}" wx:for-item="image" wx:key="index"> 15 <block wx:for="{{images}}" wx:for-item="image" wx:key="index">
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="showMask" data-index="{{index}}"></view>
19 <view class="edit_label" catchtap="goEdit" data-index="{{index}}" data-url='{{image.url}}'>编辑</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>
@@ -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'>{{time_info}}</view> 29 + <view class='hint_label' bindtap='showMask1'>{{time_info}}</view>
30 <view class='hint_label more_box'> 30 <view class='hint_label more_box'>
31 <text catchtap='showMore'>{{more_info}}</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}}'>
@@ -49,7 +49,6 @@ @@ -49,7 +49,6 @@
49 </view> 49 </view>
50 </view> 50 </view>
51 </view> 51 </view>
52 -  
53 <view class='content_box'> 52 <view class='content_box'>
54 <view class='tab_box'> 53 <view class='tab_box'>
55 <scroll-view scroll-x> 54 <scroll-view scroll-x>
@@ -57,12 +56,16 @@ @@ -57,12 +56,16 @@
57 <view class="tab_item {{item.state?'bgc-active':''}}" wx:for='{{classify}}' wx:key='index' data-index="{{index}}" bindtap="setClassify">{{item.name}}</view> 56 <view class="tab_item {{item.state?'bgc-active':''}}" wx:for='{{classify}}' wx:key='index' data-index="{{index}}" bindtap="setClassify">{{item.name}}</view>
58 </scroll-view> 57 </scroll-view>
59 </view> 58 </view>
  59 + <view class='null_box'></view>
60 <view class='bottom_box'> 60 <view class='bottom_box'>
61 - <view class='bottom_btn1' bindtap='submitInfo'>确定</view> 61 + <view class='bottom_btn1' bindtap='submitInfo'>确定发布</view>
62 </view> 62 </view>
63 </view> 63 </view>
64 64
65 -<view class='mask_box' wx:if='{{relsese_state}}' catchtap='cancleMask'> 65 +
  66 +
  67 +<!-- 定时发送 -->
  68 +<view class='mask_box' wx:if='{{relsese_state}}' catchtap='cancleMask1'>
66 <view class='release_box'> 69 <view class='release_box'>
67 <view class='release_title'>选择发布时间</view> 70 <view class='release_title'>选择发布时间</view>
68 <view class='release_content_box'> 71 <view class='release_content_box'>
@@ -83,15 +86,40 @@ @@ -83,15 +86,40 @@
83 </view> 86 </view>
84 </view> 87 </view>
85 88
86 - 89 +<!-- 编辑图片信息 -->
87 <view class='mask_box2' wx:if='{{img_state}}'> 90 <view class='mask_box2' wx:if='{{img_state}}'>
88 <view class='item_list2'> 91 <view class='item_list2'>
89 <image class='list_img' src='{{url}}'></image> 92 <image class='list_img' src='{{url}}'></image>
90 <view class='list_content_box'> 93 <view class='list_content_box'>
91 - <textarea class="areas" placeholder='请输入简要描述' minlength="{{min}}" maxlength="{{max3}}" bindinput="setImgText">  
92 - <text class="currentWordNumber">{{imgInfoNum|0}}/{{max3}}</text> 94 + <textarea class="areas" placeholder='请输入简要描述' minlength="{{min}}" value='{{imgInfo}}' maxlength="{{max3}}" bindinput="setImgText">
  95 + <text class="currentWordNumber">{{imgInfoNum}}/{{max3}}</text>
93 </textarea> 96 </textarea>
94 </view> 97 </view>
95 </view> 98 </view>
96 - <view class='bottom_btn2' bindtap='goCheck'>确定发布</view> 99 + <view class='bottom_btn2' bindtap='goCheck'>确定</view>
  100 +</view>
  101 +
  102 +<!-- 草稿箱 -->
  103 +<view class='mask_box' wx:if='{{box_state}}' catchtap='cancleMask3'>
  104 + <view class='popup_box'>
  105 + <view class='popup_title'>提示</view>
  106 + <view>是否保存为草稿?</view>
  107 + <view class='popup_btn_box'>
  108 + <view class='popup_btn' catchtap='cancleMask3'>取消</view>
  109 + <view class='popup_btn' bindtap='confirmInfo'>确定</view>
  110 + </view>
  111 + </view>
  112 +</view>
  113 +
  114 +
  115 +<!-- 草稿箱 -->
  116 +<view class='mask_box' wx:if='{{mask_state}}' catchtap='cancleMask2'>
  117 + <view class='popup_box'>
  118 + <view class='popup_title'>提示</view>
  119 + <view>是否确认删除?</view>
  120 + <view class='popup_btn_box'>
  121 + <view class='popup_btn' catchtap='cancleMask2'>取消</view>
  122 + <view class='popup_btn' bindtap='deleteImg'>确定</view>
  123 + </view>
  124 + </view>
97 </view> 125 </view>
@@ -120,7 +120,7 @@ page { @@ -120,7 +120,7 @@ page {
120 120
121 .tab_item { 121 .tab_item {
122 display: inline-block; 122 display: inline-block;
123 - width: 94rpx; 123 + /* width: 94rpx; */
124 height: 50rpx; 124 height: 50rpx;
125 text-align: center; 125 text-align: center;
126 line-height: 54rpx; 126 line-height: 54rpx;
@@ -129,6 +129,7 @@ page { @@ -129,6 +129,7 @@ page {
129 border-radius: 25rpx; 129 border-radius: 25rpx;
130 background: #f5f5f5; 130 background: #f5f5f5;
131 color: #000; 131 color: #000;
  132 + padding: 0 10rpx;
132 } 133 }
133 134
134 .tab_item:last-child { 135 .tab_item:last-child {
@@ -156,12 +157,21 @@ page { @@ -156,12 +157,21 @@ page {
156 align-items: center; 157 align-items: center;
157 justify-content: space-between; 158 justify-content: space-between;
158 border-bottom: 1rpx solid #ebebeb; 159 border-bottom: 1rpx solid #ebebeb;
  160 + position: relative;
159 } 161 }
160 162
161 .type_box input { 163 .type_box input {
  164 + width: 90%;
162 font-size: 28rpx; 165 font-size: 28rpx;
163 } 166 }
164 167
  168 +.input_num {
  169 + position: absolute;
  170 + right: 0;
  171 + font-size: 28rpx;
  172 + color: #999;
  173 +}
  174 +
165 .type_info { 175 .type_info {
166 font-size: 32rpx; 176 font-size: 32rpx;
167 color: RGBA(102, 102, 102, 0.6); 177 color: RGBA(102, 102, 102, 0.6);
@@ -295,14 +305,6 @@ picker-view { @@ -295,14 +305,6 @@ picker-view {
295 z-index: 10; 305 z-index: 10;
296 } 306 }
297 307
298 -picker-view-column view {  
299 - /*height: 30rpx;*//*line-height: 100rpx;*/  
300 -}  
301 -  
302 -.confirm {  
303 - /*width: 80%;*//*padding: 0 62rpx;*//*box-sizing: border-box;*//*height: 88rpx;*/  
304 -}  
305 -  
306 .confirm_btn { 308 .confirm_btn {
307 width: 600rpx; 309 width: 600rpx;
308 height: 88rpx; 310 height: 88rpx;
@@ -386,6 +388,7 @@ picker-view-column view { @@ -386,6 +388,7 @@ picker-view-column view {
386 color: #000; 388 color: #000;
387 padding: 0 30rpx; 389 padding: 0 30rpx;
388 box-sizing: border-box; 390 box-sizing: border-box;
  391 + z-index: 100;
389 } 392 }
390 393
391 .more { 394 .more {
@@ -543,3 +546,7 @@ picker-view-column view { @@ -543,3 +546,7 @@ picker-view-column view {
543 justify-content: center; 546 justify-content: center;
544 margin: 350rpx auto 0 auto; 547 margin: 350rpx auto 0 auto;
545 } 548 }
  549 +.null_box{
  550 + width: 100%;
  551 + height: 200rpx;
  552 +}
@@ -14,12 +14,45 @@ Page({ @@ -14,12 +14,45 @@ Page({
14 keyword: '', 14 keyword: '',
15 label_list: '' 15 label_list: ''
16 }, 16 },
  17 +
  18 + //点击搜索历史
  19 + clickHistory(e) {
  20 + var keyword = e.currentTarget.dataset.keyword
  21 + this.setData({
  22 + keyword: keyword
  23 + })
  24 + this.goSearch()
  25 + },
  26 +
17 getSearch(e) { 27 getSearch(e) {
18 this.setData({ 28 this.setData({
19 keyword: e.detail.value 29 keyword: e.detail.value
20 }) 30 })
21 }, 31 },
  32 + //清空输入框
  33 + clearInput() {
  34 + this.setData({
  35 + keyword: '',
  36 + page: 1
  37 + })
  38 + },
  39 + clearHistory() {
  40 + let url = '/home/index/historyDelete'
  41 + let params = {}
  42 + let header = {
  43 + "XX-Token": wx.getStorageSync('token'),
  44 + 'XX-Device-Type': 'wxapp'
  45 + }
  46 + app.post(url, params, header).then((res) => {
  47 + console.log(res)
  48 + if (res.data.code == 20000) {
  49 + this.setData({
  50 + label_list: ''
  51 + })
  52 + }
22 53
  54 + })
  55 + },
23 goSearch(e) { 56 goSearch(e) {
24 let that = this; 57 let that = this;
25 let url = '/home/index/index'; 58 let url = '/home/index/index';
@@ -38,11 +71,15 @@ Page({ @@ -38,11 +71,15 @@ Page({
38 } 71 }
39 app.post(url, param, header).then((res) => { 72 app.post(url, param, header).then((res) => {
40 if (res.data.code == 20000) { 73 if (res.data.code == 20000) {
41 - var list = res.data.data.list  
42 - if (list != '') { 74 + var list = this.data.list
  75 + if (res.data.data.list != '') {
43 that.setData({ 76 that.setData({
44 - list: list,  
45 - page: res.data.data.page, 77 + list: list.concat(res.data.data.list),
  78 + })
  79 + } else if (this.data.page > res.data.data.last_page) {
  80 + wx.showToast({
  81 + title: '没有更多数据了',
  82 + icon: 'none'
46 }) 83 })
47 } else { 84 } else {
48 wx.showToast({ 85 wx.showToast({
@@ -50,38 +87,157 @@ Page({ @@ -50,38 +87,157 @@ Page({
50 icon: 'none' 87 icon: 'none'
51 }) 88 })
52 that.setData({ 89 that.setData({
53 - list: list,  
54 - page: res.data.data.page, 90 + list: list.concat(res.data.data.list),
55 }) 91 })
56 } 92 }
57 } 93 }
58 }).catch((errMsg) => {}) 94 }).catch((errMsg) => {})
59 95
60 }, 96 },
61 - previewImg(e) {  
62 - const current = e.currentTarget.dataset.index;  
63 - var imgs = this.data.imgs;  
64 - wx.previewImage({  
65 - current: imgs[current],  
66 - urls: imgs 97 +
  98 + goDetail(e) {
  99 + var id = e.currentTarget.dataset.id
  100 + wx.navigateTo({
  101 + url: '/pages/index/detail/detail?id=' + id,
  102 + })
  103 + },
  104 + viewImg(e) {
  105 + var mindex = e.currentTarget.dataset.mindex
  106 + var sindex = e.currentTarget.dataset.sindex
  107 + var list = this.data.list
  108 + var imgs = list[mindex].img
  109 + var current = e.currentTarget.dataset.src
  110 + // console.log(imgs)
  111 + this.setData({
  112 + imgUrl: current,
  113 + img_text: e.currentTarget.dataset.text,
  114 + img_state: true
67 }) 115 })
  116 + wx.hideTabBar({})
68 }, 117 },
69 118
70 - showMore() { 119 + cancle_img() {
71 this.setData({ 120 this.setData({
72 - more_state: !(this.data.more_state) 121 + img_state: false
73 }) 122 })
  123 + wx.showTabBar({})
74 }, 124 },
75 125
76 - complain() {  
77 - wx.navigateTo({  
78 - url: '/pages/index/comment/comment', 126 + showMask(e) {
  127 + var index = e.currentTarget.dataset.index
  128 + var id = e.currentTarget.dataset.id
  129 + var list = this.data.list
  130 + var status = this.data.status
  131 + if (list[index].user_host == 1) {
  132 + status = 2
  133 + } else {
  134 + status = 1
  135 + }
  136 + this.setData({
  137 + status: status,
  138 + })
  139 + wx.setStorageSync('id', id)
  140 + wx.setStorageSync('status', status)
  141 + wx.setStorageSync('index', index)
  142 + this.setData({
  143 + mask_state: true,
79 }) 144 })
80 }, 145 },
81 146
82 - getData() {  
83 - let url = '/home/index/history'  
84 - let params = {} 147 + cancleMask() {
  148 + this.setData({
  149 + mask_state: false
  150 + })
  151 + },
  152 +
  153 + attentionInfo() {
  154 + var id = wx.getStorageSync('id')
  155 + var status = parseInt(wx.getStorageSync('status'))
  156 + var list = this.data.list
  157 + var index = wx.getStorageSync('index')
  158 + var that = this
  159 + let url = '/home/index/host';
  160 + let param = {
  161 + open_user_id: id,
  162 + status: status,
  163 + }
  164 + let header = {
  165 + 'XX-Token': wx.getStorageSync('token'),
  166 + 'XX-Device-Type': 'wxapp'
  167 + }
  168 + app.post(url, param, header).then((res) => {
  169 + if (res.data.code == 20000) {
  170 + status == 1 ? list[index].user_host = 1 : list[index].user_host = 2
  171 + console.log(status)
  172 + that.setData({
  173 + status: status,
  174 + list: list
  175 + })
  176 + that.goSearch()
  177 + }
  178 + })
  179 + },
  180 + //点赞
  181 + likeCharge(e) {
  182 + var id = e.currentTarget.dataset.id
  183 + var index = e.currentTarget.dataset.index
  184 + var list = this.data.list
  185 + var status = ''
  186 + if (list[index].user_support == 1) {
  187 + list[index].user_support = 0
  188 + status = 2
  189 + } else {
  190 + list[index].user_support = 1
  191 + status = 1
  192 + }
  193 + this.setData({
  194 + list: list
  195 + })
  196 + this.like(id, status)
  197 + },
  198 +
  199 + like(id, status) {
  200 + let url = '/home/index/support'
  201 + let params = {
  202 + list_id: id,
  203 + status: status
  204 + }
  205 + let header = {
  206 + "XX-Token": wx.getStorageSync('token'),
  207 + 'XX-Device-Type': 'wxapp'
  208 + }
  209 + app.post(url, params, header).then((res) => {
  210 + if (res.data.code == 20000) {
  211 + this.goSearch()
  212 + }
  213 + })
  214 + },
  215 +
  216 + //收藏,取消收藏
  217 + collectInfo(e) {
  218 + var id = e.currentTarget.dataset.id
  219 + var index = e.currentTarget.dataset.index
  220 + var list = this.data.list
  221 + var status = ''
  222 + if (list[index].user_collect == 1) {
  223 + list[index].user_collect = 0
  224 + status = 2
  225 + } else {
  226 + list[index].user_collect = 1
  227 + status = 1
  228 + }
  229 + this.setData({
  230 + list: list
  231 + })
  232 + this.collect(id, status)
  233 + },
  234 +
  235 + collect(id, status) {
  236 + let url = '/home/index/collect'
  237 + let params = {
  238 + list_id: id,
  239 + status: status
  240 + }
85 let header = { 241 let header = {
86 "XX-Token": wx.getStorageSync('token'), 242 "XX-Token": wx.getStorageSync('token'),
87 'XX-Device-Type': 'wxapp' 243 'XX-Device-Type': 'wxapp'
@@ -89,16 +245,93 @@ Page({ @@ -89,16 +245,93 @@ Page({
89 app.post(url, params, header).then((res) => { 245 app.post(url, params, header).then((res) => {
90 console.log(res) 246 console.log(res)
91 if (res.data.code == 20000) { 247 if (res.data.code == 20000) {
  248 + this.goSearch()
  249 + }
  250 + })
  251 + },
  252 +
  253 + showMore(e) {
  254 + var index = e.currentTarget.dataset.index
  255 + var list = this.data.list
  256 + list[index].more_state = !(list[index].more_state)
92 this.setData({ 257 this.setData({
93 - label_list: res.data.data.list 258 + more_state: !(this.data.more_state),
  259 + list: list
  260 + })
  261 + },
  262 + showPoster(e) {
  263 + var id = e.currentTarget.dataset.id
  264 + var that = this
  265 + wx.hideTabBar({})
  266 + wx.showToast({
  267 + title: '加载中',
  268 + icon: 'loading'
94 }) 269 })
  270 + that.setData({
  271 + poster_state: true
  272 + })
  273 + this.getPoster(id)
  274 + },
  275 +
  276 + canclePopup() {
  277 + var list = this.data.list
  278 + for (var i = 0; i < list.length; i++) {
  279 + list[i].more_state = false
  280 + }
  281 + this.setData({
  282 + poster_state: false,
  283 + list: list
  284 + })
  285 + },
  286 +
  287 + getPoster(id) {
  288 + let that = this;
  289 + let url = '/home/index/fashionShare';
  290 + let param = {
  291 + list_id: id
  292 + }
  293 + let header = {
  294 + 'XX-Token': wx.getStorageSync('token'),
  295 + 'XX-Device-Type': 'wxapp'
  296 + }
  297 + app.post(url, param, header).then((res) => {
  298 + console.log(res)
  299 +
  300 + if (res.data.code == 20000) {
  301 + this.setData({
  302 + poster: res.data.data.url,
  303 + })
  304 + // if(this.data.poster==''){
  305 + // wx.showToast({
  306 + // title: '上传图片才可生成海报',
  307 + // })
  308 + // }
95 } 309 }
96 310
97 }) 311 })
98 }, 312 },
99 313
100 - clearHistory() {  
101 - let url = '/home/index/historyDelete' 314 + //评论
  315 + review(e) {
  316 + var id = e.currentTarget.dataset.id
  317 + var type = e.currentTarget.dataset.type
  318 + wx.navigateTo({
  319 + url: '/pages/index/comment/comment?id=' + id + '&type=' + type,
  320 + })
  321 + },
  322 +
  323 + complain(e) {
  324 + var id = e.currentTarget.dataset.id
  325 + var type = e.currentTarget.dataset.type
  326 + wx.navigateTo({
  327 + url: '/pages/index/comment/comment?id=' + id + '&type=' + type,
  328 + })
  329 + },
  330 +
  331 +
  332 +
  333 + getData() {
  334 + let url = '/home/index/history'
102 let params = {} 335 let params = {}
103 let header = { 336 let header = {
104 "XX-Token": wx.getStorageSync('token'), 337 "XX-Token": wx.getStorageSync('token'),
@@ -108,19 +341,16 @@ Page({ @@ -108,19 +341,16 @@ Page({
108 console.log(res) 341 console.log(res)
109 if (res.data.code == 20000) { 342 if (res.data.code == 20000) {
110 this.setData({ 343 this.setData({
111 - label_list: '' 344 + label_list: (res.data.data.list).splice(0,9)
112 }) 345 })
113 } 346 }
114 347
115 }) 348 })
116 }, 349 },
117 350
118 - //清空输入框  
119 - clearInput() {  
120 - this.setData({  
121 - keyword: ''  
122 - })  
123 - }, 351 +
  352 +
  353 +
124 354
125 355
126 /** 356 /**
@@ -169,7 +399,8 @@ Page({ @@ -169,7 +399,8 @@ Page({
169 * 页面上拉触底事件的处理函数 399 * 页面上拉触底事件的处理函数
170 */ 400 */
171 onReachBottom: function() { 401 onReachBottom: function() {
172 - 402 + this.data.page++
  403 + this.goSearch()
173 }, 404 },
174 405
175 /** 406 /**
@@ -19,13 +19,13 @@ @@ -19,13 +19,13 @@
19 </view> 19 </view>
20 <view class="history_list {{label_list.length === 0?'text-center':''}}"> 20 <view class="history_list {{label_list.length === 0?'text-center':''}}">
21 <text wx:if="{{label_list.length === 0}}">暂无搜索历史~</text> 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> 22 + <view wx:for="{{label_list}}" wx:key="index" bindtap="clickHistory" data-index="{{index}}" data-keyword='{{item}}'>{{item}}</view>
23 </view> 23 </view>
24 </view> 24 </view>
25 25
26 <!--文章内容--> 26 <!--文章内容-->
27 <view class='content_box' wx:if="{{list.length > 0}}"> 27 <view class='content_box' wx:if="{{list.length > 0}}">
28 - <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 bindtap='goDetail' data-id='{{item.id}}'>
29 <view class='left_box'> 29 <view class='left_box'>
30 <view class='head_portrait'> 30 <view class='head_portrait'>
31 <image src='{{item.avatar}}'></image> 31 <image src='{{item.avatar}}'></image>
@@ -35,8 +35,8 @@ @@ -35,8 +35,8 @@
35 <view class='list_head_box'> 35 <view class='list_head_box'>
36 <view class='user_name'>{{item.user_nickname}}</view> 36 <view class='user_name'>{{item.user_nickname}}</view>
37 <view class=' state_box'> 37 <view class=' state_box'>
38 - <view class="collect_box {{item.user_host==1?'active':''}}" catchtap='attention' data-index="{{mindex}}" data-id='{{item.open_user_id}}'>  
39 - <text class="collect_word">关注TA</text> 38 + <view class="collect_box {{item.user_host==1?'active':''}}" catchtap='showMask' data-index="{{mindex}}" data-id='{{item.open_user_id}}'>
  39 + <text class="collect_word">{{item.user_host==1?'取消关注':'关注TA'}}</text>
40 </view> 40 </view>
41 </view> 41 </view>
42 </view> 42 </view>
@@ -86,3 +86,57 @@ @@ -86,3 +86,57 @@
86 </view> 86 </view>
87 </view> 87 </view>
88 </view> 88 </view>
  89 +
  90 +<view class='mask_box2' wx:if='{{poster_state}}'>
  91 + <!-- <view class="canvasBox"> -->
  92 + <!-- <canvas canvas-id='myCanvas' style=''></canvas> -->
  93 + <!-- </view> -->
  94 + <!-- <view class='popup_img'>
  95 + <image src='{{poster}}'></image>
  96 + </view>
  97 + <view class="btn" bindtap="saveImage">保存图片</view>
  98 + <view class='iconfont icon-quxiao quxiao2' bindtap='canclePopup'></view> -->
  99 + <view class='popup_box2'>
  100 + <view>
  101 + <view class='popup_content_box'>
  102 + <!-- <view class='popup_img2'>
  103 + <image src='{{poster_list.img}}'></image>
  104 + <view class='circle'></view>
  105 + <view class='circle2'></view>
  106 + </view> -->
  107 + <view class='popup_info_box'>
  108 + <!-- <view class='popup_title2'>{{poster_list.title}}</view>
  109 + <view>{{poster_list.text}}</view> -->
  110 + <view class='popup_img'>
  111 + <image src='{{poster}}'></image>
  112 + </view>
  113 + <view class='popup_icon_box'>
  114 + <view class='popup_btn_box2' bindtap='saveImg' data-src='{{poster}}'>
  115 + <view class='popup_btn2'>保存图片</view>
  116 + </view>
  117 + <!-- <image src='/images/chuanda_quan_90@2x.png'></image> -->
  118 + </view>
  119 + </view>
  120 + </view>
  121 + </view>
  122 + <view class='iconfont icon-quxiao' bindtap='canclePopup'></view>
  123 + </view>
  124 +</view>
  125 +
  126 +<view class='mask_box mask' wx:if='{{img_state}}' catchtap='cancle_img'>
  127 + <view class='img_box'>
  128 + <image src='{{imgUrl}}'></image>
  129 + <text>{{img_text}}</text>
  130 + </view>
  131 +</view>
  132 +
  133 +<view class='mask_box' wx:if='{{mask_state}}' catchtap='cancleMask'>
  134 + <view class='popup_box'>
  135 + <view class='popup_title'>提示</view>
  136 + <view>确认取消关注吗?</view>
  137 + <view class='popup_btn_box'>
  138 + <view class='popup_btn' catchtap='cancleMask'>取消</view>
  139 + <view class='popup_btn' bindtap='attentionInfo'>确定</view>
  140 + </view>
  141 + </view>
  142 +</view>
1 /* pages/service/renting/search/search.wxss */ 1 /* pages/service/renting/search/search.wxss */
2 2
3 -/* @import '../renting.wxss'; */ 3 +/* @import '../index.wxss'; */
4 4
5 page { 5 page {
6 background-color: #f2f2f2; 6 background-color: #f2f2f2;
@@ -348,7 +348,8 @@ page { @@ -348,7 +348,8 @@ page {
348 height: 42rpx; 348 height: 42rpx;
349 line-height: 42rpx; 349 line-height: 42rpx;
350 font-size: 24rpx; 350 font-size: 24rpx;
351 - color: #53a6fa; 351 + background: #dcdde0;
  352 + color: #fff;
352 border: 1rpx solid #f7f7f7; 353 border: 1rpx solid #f7f7f7;
353 border-radius: 4rpx; 354 border-radius: 4rpx;
354 display: flex; 355 display: flex;
@@ -357,8 +358,8 @@ page { @@ -357,8 +358,8 @@ page {
357 } 358 }
358 359
359 .collect_box.active { 360 .collect_box.active {
360 - background: #dcdde0;  
361 - color: #fff; 361 + background: #f7f7f7;
  362 + color: #53a6fa;
362 } 363 }
363 364
364 .star1 { 365 .star1 {
@@ -412,7 +413,9 @@ page { @@ -412,7 +413,9 @@ page {
412 .time { 413 .time {
413 font-size: 26rpx; 414 font-size: 26rpx;
414 } 415 }
415 - 416 +.zan{
  417 + color: #000;
  418 +}
416 .zan, .pinglun1 { 419 .zan, .pinglun1 {
417 font-size: 28rpx; 420 font-size: 28rpx;
418 margin-right: 10rpx; 421 margin-right: 10rpx;
@@ -486,18 +489,17 @@ page { @@ -486,18 +489,17 @@ page {
486 489
487 /* 发布弹窗 */ 490 /* 发布弹窗 */
488 491
489 -.mask_box { 492 +.mask_box2 {
490 width: 100%; 493 width: 100%;
491 height: 100%; 494 height: 100%;
492 background: #000; 495 background: #000;
493 position: fixed; 496 position: fixed;
494 top: 0; 497 top: 0;
495 left: 0; 498 left: 0;
496 - z-index: 10;  
497 padding: 30rpx; 499 padding: 30rpx;
498 box-sizing: border-box; 500 box-sizing: border-box;
  501 + z-index: 200;
499 } 502 }
500 -  
501 .icon-quxiao { 503 .icon-quxiao {
502 font-size: 36rpx; 504 font-size: 36rpx;
503 text-align: center; 505 text-align: center;
@@ -508,25 +510,22 @@ page { @@ -508,25 +510,22 @@ page {
508 transform: translateX(-50%); 510 transform: translateX(-50%);
509 } 511 }
510 512
511 -.popup_box { 513 +.popup_box2 {
512 width: 100%; 514 width: 100%;
513 border-radius: 10rpx; 515 border-radius: 10rpx;
514 position: relative; 516 position: relative;
515 } 517 }
516 518
517 -.popup_box image { 519 +.popup_box2 image {
518 width: 100%; 520 width: 100%;
519 height: 686rpx; 521 height: 686rpx;
520 border-radius: 10rpx; 522 border-radius: 10rpx;
521 } 523 }
522 524
523 .popup_info_box { 525 .popup_info_box {
524 - background: #fff;  
525 - padding: 30rpx;  
526 - box-sizing: border-box;  
527 - font-size: 28rpx;  
528 - color: #282829; 526 + width: 686rpx;
529 border-radius: 10rpx; 527 border-radius: 10rpx;
  528 + position: relative;
530 } 529 }
531 530
532 .popup_icon_box { 531 .popup_icon_box {
@@ -535,9 +534,12 @@ page { @@ -535,9 +534,12 @@ page {
535 justify-content: space-between; 534 justify-content: space-between;
536 padding: 0 45rpx; 535 padding: 0 45rpx;
537 margin-top: 30rpx; 536 margin-top: 30rpx;
  537 + position: absolute;
  538 + left: 0;
  539 + bottom: 10rpx;
538 } 540 }
539 541
540 -.popup_title { 542 +.popup_title2 {
541 font-size: 34rpx; 543 font-size: 34rpx;
542 color: #000; 544 color: #000;
543 font-weight: bold; 545 font-weight: bold;
@@ -548,7 +550,7 @@ page { @@ -548,7 +550,7 @@ page {
548 height: 156rpx; 550 height: 156rpx;
549 } 551 }
550 552
551 -.popup_btn_box { 553 +.popup_btn_box2 {
552 width: 200rpx; 554 width: 200rpx;
553 height: 72rpx; 555 height: 72rpx;
554 background: rgba(255, 255, 255, 1); 556 background: rgba(255, 255, 255, 1);
@@ -556,7 +558,7 @@ page { @@ -556,7 +558,7 @@ page {
556 position: relative; 558 position: relative;
557 } 559 }
558 560
559 -.popup_btn { 561 +.popup_btn2 {
560 width: 200rpx; 562 width: 200rpx;
561 height: 72rpx; 563 height: 72rpx;
562 background: rgba(0, 0, 0, 1); 564 background: rgba(0, 0, 0, 1);
@@ -590,8 +592,53 @@ page { @@ -590,8 +592,53 @@ page {
590 position: absolute; 592 position: absolute;
591 bottom: -25rpx; 593 bottom: -25rpx;
592 right: 0; 594 right: 0;
  595 + z-index: 100;
593 } 596 }
594 -  
595 -.popup_img { 597 +.popup_img{
  598 + width: 100%;
  599 + height:1026rpx;
  600 + border-radius: 16rpx;
  601 + overflow: hidden;
  602 +}
  603 +.popup_img image{
  604 + width: 100%;
  605 + height: 100%;
  606 +}
  607 +.popup_img2 {
  608 + width: 686rpx;
  609 + height: 686rpx;
596 position: relative; 610 position: relative;
597 } 611 }
  612 +
  613 +.popup_img2 image {
  614 + width: 100%;
  615 + height: 100%;
  616 +}
  617 +
  618 +/* */
  619 +
  620 +
  621 +.mask {
  622 + background: rgba(0, 0, 0, 0.8);
  623 + font-size: 32rpx;
  624 + color: #fff;
  625 + flex-wrap: wrap;
  626 +}
  627 +
  628 +.img_box {
  629 + width: 100%;
  630 + display: flex;
  631 + align-items: center;
  632 + justify-content: center;
  633 + flex-wrap: wrap;
  634 +}
  635 +
  636 +.img_box image {
  637 + margin: 20rpx auto;
  638 +}
  639 +
  640 +.img_box text {
  641 + display: inline-block;
  642 + width: 100%;
  643 + text-align: center;
  644 +}
@@ -16,11 +16,97 @@ Page({ @@ -16,11 +16,97 @@ Page({
16 state2: false, 16 state2: false,
17 page: 1, 17 page: 1,
18 status: 1, 18 status: 1,
  19 + secret_state: false
  20 + },
  21 +
  22 +
  23 + //点赞
  24 + likeCharge(e) {
  25 + var id = e.currentTarget.dataset.id
  26 + var index = e.currentTarget.dataset.index
  27 + var list = this.data.list
  28 + var status = ''
  29 + if (list[index].user_support == 1) {
  30 + list[index].user_support = 0
  31 + status = 2
  32 + } else {
  33 + list[index].user_support = 1
  34 + status = 1
  35 + }
  36 + this.setData({
  37 + list: list
  38 + })
  39 + this.like(id, status)
  40 + },
  41 +
  42 + like(id, status) {
  43 + let url = '/home/index/support'
  44 + let params = {
  45 + list_id: id,
  46 + status: status
  47 + }
  48 + let header = {
  49 + "XX-Token": wx.getStorageSync('token'),
  50 + 'XX-Device-Type': 'wxapp'
  51 + }
  52 + app.post(url, params, header).then((res) => {
  53 + if (res.data.code == 20000) {
  54 + this.getData()
  55 + }
  56 + })
  57 + },
  58 +
  59 +
  60 + //收藏,取消收藏
  61 + collectInfo(e) {
  62 + var id = e.currentTarget.dataset.id
  63 + var index = e.currentTarget.dataset.index
  64 + var list = this.data.list
  65 + var status = ''
  66 + if (list[index].user_collect == 1) {
  67 + list[index].user_collect = 0
  68 + status = 2
  69 + } else {
  70 + list[index].user_collect = 1
  71 + status = 1
  72 + }
  73 + this.setData({
  74 + list: list
  75 + })
  76 + this.collect(id, status)
  77 + },
  78 +
  79 + collect(id, status) {
  80 + let url = '/home/index/collect'
  81 + let params = {
  82 + list_id: id,
  83 + status: status
  84 + }
  85 + let header = {
  86 + "XX-Token": wx.getStorageSync('token'),
  87 + 'XX-Device-Type': 'wxapp'
  88 + }
  89 + app.post(url, params, header).then((res) => {
  90 + console.log(res)
  91 + if (res.data.code == 20000) {
  92 + this.getData()
  93 + }
  94 + })
  95 + },
  96 +
  97 +
  98 + goDetail(e) {
  99 + var id = e.currentTarget.dataset.id
  100 + wx.navigateTo({
  101 + url: '/pages/index/detail/detail?id=' + id,
  102 + })
19 }, 103 },
20 104
21 complain(e) { 105 complain(e) {
22 var id = e.currentTarget.dataset.id 106 var id = e.currentTarget.dataset.id
23 var status = e.currentTarget.dataset.status 107 var status = e.currentTarget.dataset.status
  108 + var list = this.data.list
  109 + var index = e.currentTarget.dataset.index
24 let url = '/home/index/updateFashion' 110 let url = '/home/index/updateFashion'
25 let params = { 111 let params = {
26 list_id: id, 112 list_id: id,
@@ -31,8 +117,20 @@ Page({ @@ -31,8 +117,20 @@ Page({
31 'XX-Device-Type': 'wxapp' 117 'XX-Device-Type': 'wxapp'
32 } 118 }
33 app.post(url, params, header).then((res) => { 119 app.post(url, params, header).then((res) => {
  120 + console.log('sz', res)
34 if (res.data.code == 20000) { 121 if (res.data.code == 20000) {
35 - this.getData() 122 + if (status == 3) {
  123 + list[index].secret_state = true
  124 + console.log(list)
  125 + this.setData({
  126 + list: list
  127 + })
  128 + }
  129 + }else{
  130 + wx.showToast({
  131 + title: '设置失败',
  132 + icon:'none'
  133 + })
36 } 134 }
37 }) 135 })
38 }, 136 },
@@ -54,7 +152,6 @@ Page({ @@ -54,7 +152,6 @@ Page({
54 var list = this.data.list 152 var list = this.data.list
55 list[index].more_state = !(list[index].more_state) 153 list[index].more_state = !(list[index].more_state)
56 this.setData({ 154 this.setData({
57 - // more_state: !(this.data.more_state),  
58 list: list 155 list: list
59 }) 156 })
60 }, 157 },
@@ -78,44 +175,43 @@ Page({ @@ -78,44 +175,43 @@ Page({
78 }) 175 })
79 }, 176 },
80 177
81 - likeCharge(e) {  
82 - var id = e.currentTarget.dataset.id  
83 - var status = e.currentTarget.dataset.status  
84 - let url = '/home/index/support'  
85 - let params = {  
86 - list_id: id,  
87 - status: status  
88 - }  
89 - let header = {  
90 - "XX-Token": wx.getStorageSync('token'),  
91 - 'XX-Device-Type': 'wxapp'  
92 - }  
93 - app.post(url, params, header).then((res) => {  
94 - if (res.data.code == 20000) {  
95 - this.getData()  
96 - }  
97 - })  
98 - }, 178 + // likeCharge(e) {
  179 + // var id = e.currentTarget.dataset.id
  180 + // var status = e.currentTarget.dataset.status
  181 + // let url = '/home/index/support'
  182 + // let params = {
  183 + // list_id: id,
  184 + // status: status
  185 + // }
  186 + // let header = {
  187 + // "XX-Token": wx.getStorageSync('token'),
  188 + // 'XX-Device-Type': 'wxapp'
  189 + // }
  190 + // app.post(url, params, header).then((res) => {
  191 + // if (res.data.code == 20000) {
  192 + // this.getData()
  193 + // }
  194 + // })
  195 + // },
99 196
100 - collectInfo(e) {  
101 - var id=e.currentTarget.dataset.id  
102 - var status=e.currentTarget.dataset.status  
103 - let url = '/home/index/collect'  
104 - let params = {  
105 - list_id: id,  
106 - status: status  
107 - }  
108 - let header = {  
109 - "XX-Token": wx.getStorageSync('token'),  
110 - 'XX-Device-Type': 'wxapp'  
111 - }  
112 - app.post(url, params, header).then((res) => {  
113 - console.log(res)  
114 - if (res.data.code == 20000) {  
115 - this.getData()  
116 - }  
117 - })  
118 - }, 197 + // collectInfo(e) {
  198 + // var id = e.currentTarget.dataset.id
  199 + // var status = e.currentTarget.dataset.status
  200 + // let url = '/home/index/collect'
  201 + // let params = {
  202 + // list_id: id,
  203 + // status: status
  204 + // }
  205 + // let header = {
  206 + // "XX-Token": wx.getStorageSync('token'),
  207 + // 'XX-Device-Type': 'wxapp'
  208 + // }
  209 + // app.post(url, params, header).then((res) => {
  210 + // if (res.data.code == 20000) {
  211 + // this.getData()
  212 + // }
  213 + // })
  214 + // },
119 215
120 //评论 216 //评论
121 review(e) { 217 review(e) {
@@ -159,7 +255,8 @@ Page({ @@ -159,7 +255,8 @@ Page({
159 let params = { 255 let params = {
160 open_user_id: this.data.open_user_id, 256 open_user_id: this.data.open_user_id,
161 look: this.data.look, 257 look: this.data.look,
162 - look_type: this.data.look_type 258 + look_type: this.data.look_type,
  259 + page: this.data.page
163 } 260 }
164 let header = { 261 let header = {
165 "XX-Token": wx.getStorageSync('token'), 262 "XX-Token": wx.getStorageSync('token'),
@@ -192,10 +289,25 @@ Page({ @@ -192,10 +289,25 @@ Page({
192 'XX-Device-Type': 'wxapp' 289 'XX-Device-Type': 'wxapp'
193 } 290 }
194 app.post(url, params, header).then((res) => { 291 app.post(url, params, header).then((res) => {
195 - console.log(res)  
196 if (res.data.code == 20000) { 292 if (res.data.code == 20000) {
  293 + const list = res.data.data.list.map((item, index) => {
  294 + if (item.open_time) {
  295 + var time = item.open_time.split(' ');
  296 + return { ...item,
  297 + date: time
  298 + }
  299 + } else {
  300 + return { ...item,
  301 + time: item.time
  302 + }
  303 + }
  304 + });
  305 + for (var i in list) {
  306 + list[i].secret_state = false
  307 + }
  308 + console.log('list', list)
197 this.setData({ 309 this.setData({
198 - list: res.data.data.list 310 + list: list
199 }) 311 })
200 } 312 }
201 }) 313 })
@@ -207,6 +319,7 @@ Page({ @@ -207,6 +319,7 @@ Page({
207 onLoad: function(options) { 319 onLoad: function(options) {
208 this.getData() 320 this.getData()
209 this.getData2() 321 this.getData2()
  322 +
210 }, 323 },
211 324
212 /** 325 /**
@@ -48,12 +48,24 @@ @@ -48,12 +48,24 @@
48 <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>
49 </view> 49 </view>
50 </view> 50 </view>
51 - <view class='item_list' wx:key='' wx:for='{{list}}' wx:key> 51 + <block wx:if='{{list.length==0}}'>
  52 + <text class='no_data'>暂无信息</text>
  53 + </block>
  54 + <block wx:else>
  55 + <view class='item_list' wx:key='' wx:for='{{list}}' wx:key bindtap='goDetail' data-id='{{item.list_id}}'>
  56 + <block wx:if="{{item.open_time === '昨天' || item.open_time === '今天'||item.open_time === '前天'}}">
52 <view class='list_title'>{{item.open_time}}</view> 57 <view class='list_title'>{{item.open_time}}</view>
  58 + </block>
  59 + <block wx:else>
  60 + <view class='list_title'>
  61 + <view class='year'>{{item.date[0]}}</view>
  62 + <view class='month'>{{item.date[1]}}</view>
  63 + </view>
  64 + </block>
53 <view class='content_item_box' data-id='{{item.id}}' bindtap='messageDetail'> 65 <view class='content_item_box' data-id='{{item.id}}' bindtap='messageDetail'>
54 <view class='list_content_box'> 66 <view class='list_content_box'>
55 <view class='list_img'> 67 <view class='list_img'>
56 - <image src='{{item.img}}' wx:key=''></image> 68 + <image src='{{item.img.img}}' wx:key=''></image>
57 </view> 69 </view>
58 <view class='list_content'> 70 <view class='list_content'>
59 <view class='content'> 71 <view class='content'>
@@ -63,56 +75,57 @@ @@ -63,56 +75,57 @@
63 <view class='list_state_box'> 75 <view class='list_state_box'>
64 <view class='time'>{{item.open_time}}</view> 76 <view class='time'>{{item.open_time}}</view>
65 <view class='list_icon'> 77 <view class='list_icon'>
66 - <view bindtap='likeCharge' data-index="{{index}}" data-id='{{item.list_id}}' data-status='2' wx:if='{{tab_current!=4&&tab_current!=3}}'>  
67 - <text class='iconfont icon-dianzan2 zan' wx:if='{{tab_current!=1}}'></text> 78 + <view catchtap='likeCharge' data-index="{{index}}" data-id='{{item.list_id}}' wx:if='{{status!=4}}'>
  79 + <text class='iconfont icon-dianzan2 zan' wx:if="{{item.user_support==1}}"></text>
68 <text class='iconfont icon-huida pinglun1' wx:else></text> 80 <text class='iconfont icon-huida pinglun1' wx:else></text>
69 <text class=''>{{item.support}}</text> 81 <text class=''>{{item.support}}</text>
70 </view> 82 </view>
71 - <view bindtap='review' data-id='{{item.list_id}}' data-type='review'> 83 + <view catchtap='review' data-id='{{item.list_id}}' data-type='review'>
72 <text class='iconfont icon-pinglun pinglun1'></text> 84 <text class='iconfont icon-pinglun pinglun1'></text>
73 <text>{{item.table}}</text> 85 <text>{{item.table}}</text>
74 </view> 86 </view>
75 - <view catchtap='collectInfo' wx:if='{{tab_current==4}}' data-status='2' data-index="{{index}}" data-id='{{item.list_id}}'>  
76 - <text class='iconfont icon-shoucang2 zan'></text>  
77 - <!-- <text class='iconfont icon-shoucang4 pinglun1' wx:else></text> --> 87 + <view catchtap='collectInfo' data-index="{{index}}" data-id='{{item.list_id}}'>
  88 + <text class='iconfont icon-shoucang2 zan' wx:if='{{item.user_collect==1}}'></text>
  89 + <text class='iconfont icon-shoucang4 pinglun1' wx:else></text>
78 <text class=''>{{item.collect}}</text> 90 <text class=''>{{item.collect}}</text>
79 </view> 91 </view>
80 <view class='more_box' wx:if='{{tab_current==1 || tab_current==4}}'> 92 <view class='more_box' wx:if='{{tab_current==1 || tab_current==4}}'>
81 - <text class='iconfont icon-gengduo'></text> 93 + <text class='iconfont icon-gengduo' catchtap='showMore' data-index='{{index}}'></text>
82 <block wx:if='{{state2}}'> 94 <block wx:if='{{state2}}'>
83 <view class='more_label_box more2' wx:if='{{item.more_state}}'> 95 <view class='more_label_box more2' wx:if='{{item.more_state}}'>
84 - <view class='more_item' bindtap='showPoster'> 96 + <view class='more_item' catchtap='collectInfo' data-index="{{index}}" data-id='{{item.list_id}}'>
85 <text>删除</text> 97 <text>删除</text>
86 </view> 98 </view>
87 </view> 99 </view>
88 </block> 100 </block>
89 <block wx:else> 101 <block wx:else>
90 <view class='more_label_box' wx:if='{{item.more_state}}'> 102 <view class='more_label_box' wx:if='{{item.more_state}}'>
91 - <view class='more_item' catchtap='complain' data-id='{{item.list_id}}' data-status='4'> 103 + <view class='more_item' catchtap='complain' data-id='{{item.list_id}}' data-index='{{index}}' data-status='4'>
92 <text>删除</text> 104 <text>删除</text>
93 </view> 105 </view>
94 <!-- <view class='more_line'></view> --> 106 <!-- <view class='more_line'></view> -->
95 - <view class='more_item' catchtap='complain' data-id='{{item.list_id}}' data-status='4'> 107 + <view class='more_item' catchtap='complain' data-id='{{item.list_id}}' data-index='{{index}}' data-status='3'>
96 <text>仅自己可见</text> 108 <text>仅自己可见</text>
97 </view> 109 </view>
98 <!-- <view class='more_line'></view> --> 110 <!-- <view class='more_line'></view> -->
99 - <view class='more_item' catchtap='complain' data-id='{{item.list_id}}' data-status='3'> 111 + <view class='more_item' catchtap='complain' data-id='{{item.list_id}}' data-index='{{index}}' data-status='2'>
100 <text>粉丝可见</text> 112 <text>粉丝可见</text>
101 </view> 113 </view>
102 <!-- <view class='more_line'></view> --> 114 <!-- <view class='more_line'></view> -->
103 - <view class='more_item' catchtap='complain' data-id='{{item.list_id}}' data-status='1'>  
104 - <text>全部</text> 115 + <view class='more_item' catchtap='complain' data-id='{{item.list_id}}' data-index='{{index}}' data-status='1'>
  116 + <text>公开</text>
105 </view> 117 </view>
106 </view> 118 </view>
107 </block> 119 </block>
108 </view> 120 </view>
109 - <text class='iconfont icon-suo' wx:if='{{tab_current==1}}' catchtap='showMore' data-index='{{index}}'></text> 121 + <text class='iconfont icon-suo' wx:if='{{item.secret_state}}'></text>
110 </view> 122 </view>
111 </view> 123 </view>
112 </view> 124 </view>
113 </view> 125 </view>
114 </view> 126 </view>
115 </view> 127 </view>
  128 + </block>
116 </view> 129 </view>
117 130
118 131
@@ -142,6 +142,8 @@ page { @@ -142,6 +142,8 @@ page {
142 font-size: 32rpx; 142 font-size: 32rpx;
143 font-weight: bold; 143 font-weight: bold;
144 color: #010000; 144 color: #010000;
  145 + display: flex;
  146 + align-items: center;
145 } 147 }
146 148
147 .date .day { 149 .date .day {
@@ -151,12 +153,11 @@ page { @@ -151,12 +153,11 @@ page {
151 } 153 }
152 154
153 .month { 155 .month {
154 - /*width: 52%;*/  
155 font-size: 24rpx; 156 font-size: 24rpx;
156 - /* font-weight: bold; */  
157 color: #010000; 157 color: #010000;
158 margin-bottom: -4rpx; 158 margin-bottom: -4rpx;
159 font-weight: bold; 159 font-weight: bold;
  160 + margin-left: 5rpx;
160 } 161 }
161 162
162 .date { 163 .date {
@@ -11,29 +11,68 @@ Page({ @@ -11,29 +11,68 @@ Page({
11 look_type: '', 11 look_type: '',
12 status: 1, 12 status: 1,
13 page: 1, 13 page: 1,
14 - list:[], 14 + list: [],
15 }, 15 },
  16 +
  17 + goDetail(e) {
  18 + var id = e.currentTarget.dataset.id
  19 + wx.navigateTo({
  20 + url: '/pages/index/detail/detail?id=' + id,
  21 + })
  22 + },
  23 +
  24 + showMask(e) {
  25 + this.setData({
  26 + mask_state: true,
  27 + })
  28 + },
  29 +
  30 + cancleMask() {
  31 + this.setData({
  32 + mask_state: false
  33 + })
  34 + },
  35 +
  36 + attentionInfo() {
  37 + var that = this
  38 + var id = that.data.id
  39 + var status = that.data.host
  40 + status == 1 ? status = 2 : status = 1
  41 + let url = '/home/index/host';
  42 + let param = {
  43 + open_user_id: id,
  44 + status: status,
  45 + }
  46 + let header = {
  47 + 'XX-Token': wx.getStorageSync('token'),
  48 + 'XX-Device-Type': 'wxapp'
  49 + }
  50 + app.post(url, param, header).then((res) => {
  51 + if (res.data.code == 20000) {
  52 + that.getData()
  53 + }
  54 + })
  55 + },
  56 +
16 goList(e) { 57 goList(e) {
17 var status = e.currentTarget.dataset.status 58 var status = e.currentTarget.dataset.status
18 var id = this.data.id 59 var id = this.data.id
19 wx.navigateTo({ 60 wx.navigateTo({
20 - url: '/pages/index/fans/fans?status=' + status+'&id='+id, 61 + url: '/pages/index/fans/fans?status=' + status + '&id=' + id,
21 }) 62 })
22 }, 63 },
  64 +
23 //点赞 65 //点赞
24 likeCharge(e) { 66 likeCharge(e) {
25 - console.log(e)  
26 var id = e.currentTarget.dataset.id 67 var id = e.currentTarget.dataset.id
27 var index = e.currentTarget.dataset.index 68 var index = e.currentTarget.dataset.index
28 var list = this.data.list 69 var list = this.data.list
29 var status = '' 70 var status = ''
30 - if (list[index].my_support == 1) {  
31 - console.log(11)  
32 - list[index].my_support = 0 71 + if (list[index].user_support == 1) {
  72 + list[index].user_support = 0
33 status = 2 73 status = 2
34 } else { 74 } else {
35 - console.log(22)  
36 - list[index].my_support = 1 75 + list[index].user_support = 1
37 status = 1 76 status = 1
38 } 77 }
39 this.setData({ 78 this.setData({
@@ -54,17 +93,64 @@ Page({ @@ -54,17 +93,64 @@ Page({
54 } 93 }
55 app.post(url, params, header).then((res) => { 94 app.post(url, params, header).then((res) => {
56 if (res.data.code == 20000) { 95 if (res.data.code == 20000) {
57 - this.getData() 96 + this.getData2()
  97 + }
  98 + })
  99 + },
  100 + //收藏,取消收藏
  101 + collectInfo(e) {
  102 + console.log(e)
  103 + var id = e.currentTarget.dataset.id
  104 + var index = e.currentTarget.dataset.index
  105 + var list = this.data.list
  106 + var status = ''
  107 + if (list[index].user_collect == 1) {
  108 + list[index].user_collect = 0
  109 + status = 2
  110 + } else {
  111 + list[index].user_collect = 1
  112 + status = 1
58 } 113 }
  114 + this.setData({
  115 + list: list
59 }) 116 })
  117 + this.collect(id, status)
60 }, 118 },
61 119
  120 + collect(id, status) {
  121 + let url = '/home/index/collect'
  122 + let params = {
  123 + list_id: id,
  124 + status: status
  125 + }
  126 + let header = {
  127 + "XX-Token": wx.getStorageSync('token'),
  128 + 'XX-Device-Type': 'wxapp'
  129 + }
  130 + app.post(url, params, header).then((res) => {
  131 + console.log(res)
  132 + if (res.data.code == 20000) {
  133 + this.getData2()
  134 + }
  135 + })
  136 + },
  137 +
  138 + //评论
  139 + review(e) {
  140 + var id = e.currentTarget.dataset.id
  141 + var type = e.currentTarget.dataset.type
  142 + wx.navigateTo({
  143 + url: '/pages/index/comment/comment?id=' + id + '&type=' + type,
  144 + })
  145 +
  146 + },
62 getData() { 147 getData() {
63 let url = '/home/index/userPage' 148 let url = '/home/index/userPage'
64 let params = { 149 let params = {
65 open_user_id: this.data.id, 150 open_user_id: this.data.id,
66 look: this.data.look, 151 look: this.data.look,
67 - look_type: this.data.look_type 152 + look_type: this.data.look_type,
  153 + page: this.data.page
68 } 154 }
69 let header = { 155 let header = {
70 "XX-Token": wx.getStorageSync('token'), 156 "XX-Token": wx.getStorageSync('token'),
@@ -73,12 +159,18 @@ Page({ @@ -73,12 +159,18 @@ Page({
73 app.post(url, params, header).then((res) => { 159 app.post(url, params, header).then((res) => {
74 console.log(res) 160 console.log(res)
75 if (res.data.code == 20000) { 161 if (res.data.code == 20000) {
  162 + if (this.data.id != '') {
  163 + var open_user_id = this.data.id
  164 + } else {
  165 + var open_user_id = res.data.data.list[0].open_user_id
  166 + }
76 this.setData({ 167 this.setData({
77 avatar: res.data.data.avatar, 168 avatar: res.data.data.avatar,
78 fans_num: res.data.data.fans_num, 169 fans_num: res.data.data.fans_num,
79 host: res.data.data.host, 170 host: res.data.data.host,
80 host_num: res.data.data.host_num, 171 host_num: res.data.data.host_num,
81 - list: res.data.data.list, 172 + // list: res.data.data.list,
  173 + open_user_id: open_user_id ,
82 signature: res.data.data.signature, 174 signature: res.data.data.signature,
83 user_nickname: res.data.data.user_nickname 175 user_nickname: res.data.data.user_nickname
84 }) 176 })
@@ -184,6 +276,7 @@ Page({ @@ -184,6 +276,7 @@ Page({
184 }) 276 })
185 if (options.id != '' && options.id != undefined) { 277 if (options.id != '' && options.id != undefined) {
186 this.getData() 278 this.getData()
  279 + this.getData2()
187 } 280 }
188 }, 281 },
189 282
1 <view class='banner_box' bindtap='uoloadImg'> 1 <view class='banner_box' bindtap='uoloadImg'>
2 <view class='banner_info info1'> 2 <view class='banner_info info1'>
3 - <view class="list_label1 {{host==1?'list_active1':''}}" bindtap='attentionInfo'>{{host==1?'已关注':'添加关注'}}</view> 3 + <view class="list_label1 {{host==1?'list_active1':''}}" bindtap='showMask'>{{host==1?'取消关注':'添加关注'}}</view>
4 </view> 4 </view>
5 <view class='head_img'> 5 <view class='head_img'>
6 <image class='banner_img' src='{{avatar}}'></image> 6 <image class='banner_img' src='{{avatar}}'></image>
@@ -30,12 +30,17 @@ @@ -30,12 +30,17 @@
30 <view class="iconfont icon-caret-up {{status==4?'icon_active':''}}"></view> 30 <view class="iconfont icon-caret-up {{status==4?'icon_active':''}}"></view>
31 </view> 31 </view>
32 </view> 32 </view>
33 - <view class='item_list' wx:key='' wx:for='{{list}}' wx:key> 33 + <block wx:if='{{list.length==0}}'>
  34 + <text class='no_data'>暂无信息</text>
  35 + </block>
  36 + <block wx:else>
  37 + <block wx:if='{{status==1}}'>
  38 + <view class='item_list' wx:key='' wx:for='{{list}}' wx:key catchtap='goDetail' data-id='{{item.list_id}}'>
34 <view class='list_title'>{{item.open_time}}</view> 39 <view class='list_title'>{{item.open_time}}</view>
35 - <view class='content_item_box' data-id='{{item.id}}' bindtap='messageDetail'> 40 + <view class='content_item_box'>
36 <view class='list_content_box'> 41 <view class='list_content_box'>
37 <view class='list_img'> 42 <view class='list_img'>
38 - <image src='{{item.img}}' wx:key=''></image> 43 + <image src='{{item.img.img}}' wx:key=''></image>
39 </view> 44 </view>
40 <view class='list_content'> 45 <view class='list_content'>
41 <view class='content'> 46 <view class='content'>
@@ -46,7 +51,7 @@ @@ -46,7 +51,7 @@
46 <view class='time'>{{item.open_time}}</view> 51 <view class='time'>{{item.open_time}}</view>
47 <view class='list_icon'> 52 <view class='list_icon'>
48 <view bindtap='likeCharge' data-index="{{index}}" data-id='{{item.list_id}}' wx:if='{{status!=4}}'> 53 <view bindtap='likeCharge' data-index="{{index}}" data-id='{{item.list_id}}' wx:if='{{status!=4}}'>
49 - <text class='iconfont icon-dianzan2 zan' wx:if="{{item.my_support==1}}"></text> 54 + <text class='iconfont icon-dianzan2 zan' wx:if="{{item.user_support==1}}"></text>
50 <text class='iconfont icon-huida pinglun1' wx:else></text> 55 <text class='iconfont icon-huida pinglun1' wx:else></text>
51 <text class=''>{{item.support}}</text> 56 <text class=''>{{item.support}}</text>
52 </view> 57 </view>
@@ -54,9 +59,9 @@ @@ -54,9 +59,9 @@
54 <text class='iconfont icon-pinglun pinglun1'></text> 59 <text class='iconfont icon-pinglun pinglun1'></text>
55 <text>{{item.table}}</text> 60 <text>{{item.table}}</text>
56 </view> 61 </view>
57 - <view catchtap='collectInfo' wx:if='{{status==4}}' data-index="{{index}}" data-id='{{item.list_id}}'>  
58 - <text class='iconfont icon-shoucang2 zan'></text>  
59 - <!-- <text class='iconfont icon-shoucang4 pinglun1' wx:else></text> --> 62 + <view catchtap='collectInfo' data-index="{{index}}" data-id='{{item.list_id}}'>
  63 + <text class='iconfont icon-shoucang2 zan' wx:if='{{item.user_collect==1}}'></text>
  64 + <text class='iconfont icon-shoucang4 pinglun1' wx:else></text>
60 <text class=''>{{item.collect}}</text> 65 <text class=''>{{item.collect}}</text>
61 </view> 66 </view>
62 </view> 67 </view>
@@ -65,16 +70,63 @@ @@ -65,16 +70,63 @@
65 </view> 70 </view>
66 </view> 71 </view>
67 </view> 72 </view>
  73 + </block>
  74 + <block wx:else>
  75 + <view class='content_item' wx:for='{{list}}' wx:for-index='mindex' wx:key>
  76 + <view class='left_box'>
  77 + <view class='head_portrait' bindtap='goUserInfo' data-id='{{item.open_user_id}}'>
  78 + <image src='{{item.avatar}}'></image>
  79 + </view>
  80 + </view>
  81 + <view class='item_list2'>
  82 + <view class='list_head_box'>
  83 + <view class='user_name1'>{{item.user_nickname}}</view>
  84 + </view>
  85 + <view catchtap='goDetail' data-id='{{item.id}}' data-index="{{index}}">
  86 + <view class='list_content1'>{{item.title}}</view>
  87 + <view class='list_img_box'>
  88 + <block wx:for='{{item.img}}' wx:for-item='items' wx:key='' wx:for-index='sindex'>
  89 + <image src='{{items.img}}' catchtap='viewImg' data-src='{{items.img}}' data-text='{{items.text}}' data-mindex="{{mindex}}" data-sindex='{{sindex}}'></image>
  90 + </block>
  91 + </view>
  92 + <view class='list_content'>
  93 + <!-- {{item.text}} -->
  94 + <text wx:for='{{item.styles}}' wx:for-item='its' wx:key>#{{its}}</text>
  95 + </view>
  96 + </view>
  97 + <view class='list_state_box2'>
  98 + <view class='time2'>{{item.open_time}}</view>
  99 + <view class='list_icon'>
  100 + <view bindtap='likeCharge' data-index="{{mindex}}" data-id='{{item.id}}'>
  101 + <text class='iconfont icon-dianzan2 zan' wx:if="{{item.user_support==1}}"></text>
  102 + <text class='iconfont icon-huida pinglun1' wx:else></text>
  103 + <text class=''>{{item.support}}</text>
  104 + </view>
  105 + <view bindtap='review' data-id='{{item.id}}' data-type='review'>
  106 + <text class='iconfont icon-pinglun pinglun1'></text>
  107 + <text>{{item.table_num}}</text>
  108 + </view>
  109 + <view catchtap='collectInfo' data-index="{{mindex}}" data-id='{{item.id}}'>
  110 + <text class='iconfont icon-shoucang2 zan' wx:if='{{item.user_collect==1}}'></text>
  111 + <text class='iconfont icon-shoucang4 pinglun1' wx:else></text>
  112 + <text class=''>{{item.collect}}</text>
  113 + </view>
  114 + </view>
  115 + </view>
  116 + </view>
  117 + </view>
  118 + </block>
  119 + </block>
68 </view> 120 </view>
69 121
70 122
71 -<view class='mask_box' wx:if='{{}}' catchtap='cancleMask'> 123 +<view class='mask_box' wx:if='{{mask_state}}' catchtap='cancleMask'>
72 <view class='popup_box'> 124 <view class='popup_box'>
73 - <view class='popup_title'>取消关注</view>  
74 - <view>确认取消关注?</view> 125 + <view class='popup_title'>提示</view>
  126 + <view>确认取消关注吗?</view>
75 <view class='popup_btn_box'> 127 <view class='popup_btn_box'>
76 - <view class='popup_btn'>再想想</view>  
77 - <view class='popup_btn'>再想想</view> 128 + <view class='popup_btn' catchtap='cancleMask'>取消</view>
  129 + <view class='popup_btn' bindtap='attentionInfo'>确定</view>
78 </view> 130 </view>
79 </view> 131 </view>
80 </view> 132 </view>
@@ -3,6 +3,124 @@ @@ -3,6 +3,124 @@
3 page { 3 page {
4 background: #f5f6fa; 4 background: #f5f6fa;
5 } 5 }
  6 +.content_item {
  7 + display: flex;
  8 + align-items: flex-start;
  9 + margin-bottom: 16rpx;
  10 + background: #fff;
  11 +}
  12 +
  13 +.content_item:last-child {
  14 + border-bottom: 0;
  15 +}
  16 +
  17 +.head_portrait {
  18 + width: 80rpx;
  19 + height: 80rpx;
  20 + border-radius: 10rpx;
  21 + display: flex;
  22 + align-items: center;
  23 + justify-content: center;
  24 + margin-right: 20rpx;
  25 +}
  26 +
  27 +.head_portrait image {
  28 + width: 100%;
  29 + height: 100%;
  30 +}
  31 +
  32 +.left_box {
  33 + position: relative;
  34 +}
  35 +
  36 +.item_list2 {
  37 + width: 85%;
  38 +}
  39 +
  40 +.list_head_box {
  41 + display: flex;
  42 + align-items: center;
  43 + justify-content: space-between;
  44 +}
  45 +
  46 +.user_name1 {
  47 + font-size: 30rpx;
  48 + color: #000;
  49 + width: 40%;
  50 +}
  51 +
  52 +.collect_box {
  53 + width: 102rpx;
  54 + height: 42rpx;
  55 + line-height: 42rpx;
  56 + font-size: 24rpx;
  57 + background: #dcdde0;
  58 + color: #fff;
  59 + border: 1rpx solid #f7f7f7;
  60 + border-radius: 4rpx;
  61 + display: flex;
  62 + align-items: center;
  63 + justify-content: center;
  64 +}
  65 +
  66 +.collect_box.active {
  67 + background: #f7f7f7;
  68 + color: #53a6fa;
  69 +}
  70 +
  71 +.star1 {
  72 + font-size: 20rpx;
  73 + margin-right: 6rpx;
  74 + color: #000;
  75 +}
  76 +
  77 +.star2 {
  78 + font-size: 20rpx;
  79 + color: #53a6fa;
  80 + margin-right: 6rpx;
  81 +}
  82 +
  83 +.list_info_box {
  84 + font-size: 24rpx;
  85 + color: #b3b3b3;
  86 +}
  87 +
  88 +.list_content {
  89 + width: 80%;
  90 + font-size: 30rpx;
  91 + color: #1a1a1a;
  92 + margin-top: 10rpx;
  93 +}
  94 +
  95 +.list_content text {
  96 + margin-right: 10rpx;
  97 +}
  98 +
  99 +.list_img_box {
  100 + display: flex;
  101 + flex-wrap: wrap;
  102 + align-items: center;
  103 + margin-top: 30rpx;
  104 +}
  105 +
  106 +.list_img_box image {
  107 + width: 150rpx;
  108 + height: 150rpx;
  109 + margin-left: 9rpx;
  110 + margin-bottom: 9rpx;
  111 + border-radius: 10rpx;
  112 + border: 1rpx solid #e5e5e5;
  113 +}
  114 +.list_state_box2 {
  115 + display: flex;
  116 + align-items: center;
  117 + justify-content: space-between;
  118 + font-size: 26rpx;
  119 + color: #999;
  120 + margin-top: 30rpx;
  121 +}
  122 +
  123 +/* */
6 .list_label1 { 124 .list_label1 {
7 width: 112rpx; 125 width: 112rpx;
8 height: 40rpx; 126 height: 40rpx;
@@ -212,13 +330,15 @@ page { @@ -212,13 +330,15 @@ page {
212 margin-bottom: 10rpx; 330 margin-bottom: 10rpx;
213 } 331 }
214 332
215 -.list_content { 333 +.list_content1 {
216 width: 65%; 334 width: 65%;
217 height: 100%; 335 height: 100%;
218 display: flex; 336 display: flex;
219 align-items: center; 337 align-items: center;
220 justify-content: space-between; 338 justify-content: space-between;
221 flex-wrap: wrap; 339 flex-wrap: wrap;
  340 + font-size: 28rpx;
  341 + color: #000;
222 } 342 }
223 343
224 .content_info { 344 .content_info {
@@ -283,6 +403,11 @@ page { @@ -283,6 +403,11 @@ page {
283 font-size: 26rpx; 403 font-size: 26rpx;
284 color: #fff; 404 color: #fff;
285 } 405 }
  406 +.time2{
  407 + width: 60%;
  408 + font-size: 26rpx;
  409 + color: #999;
  410 +}
286 .zan{ 411 .zan{
287 color: #000; 412 color: #000;
288 } 413 }
@@ -311,7 +436,7 @@ page { @@ -311,7 +436,7 @@ page {
311 background: #f5f5f5; 436 background: #f5f5f5;
312 border-radius: 8rpx; 437 border-radius: 8rpx;
313 height: 40rpx; 438 height: 40rpx;
314 - padding: 0 20rpx; 439 + padding: 0 10rpx;
315 display: flex; 440 display: flex;
316 align-items: center; 441 align-items: center;
317 justify-content: center; 442 justify-content: center;
@@ -397,11 +522,11 @@ page { @@ -397,11 +522,11 @@ page {
397 .zan, .pinglun1 { 522 .zan, .pinglun1 {
398 font-size: 28rpx; 523 font-size: 28rpx;
399 margin-right: 10rpx; 524 margin-right: 10rpx;
400 - margin-left: 52rpx; 525 + margin-left: 32rpx;
401 } 526 }
402 527
403 .pinglun1 { 528 .pinglun1 {
404 - margin-left: 52rpx; 529 + margin-left: 32rpx;
405 } 530 }
406 531
407 .list_comment_box { 532 .list_comment_box {
@@ -23,7 +23,6 @@ Page({ @@ -23,7 +23,6 @@ Page({
23 iv: this.data.iv 23 iv: this.data.iv
24 } 24 }
25 app.post(url, param).then((res) => { 25 app.post(url, param).then((res) => {
26 - console.log(res)  
27 if (res.data.code == 20000) { 26 if (res.data.code == 20000) {
28 wx.setStorageSync('token', res.data.data.token) 27 wx.setStorageSync('token', res.data.data.token)
29 wx.switchTab({ 28 wx.switchTab({
@@ -41,12 +40,10 @@ Page({ @@ -41,12 +40,10 @@ Page({
41 let url = '/wxapp/public/loginImg'; 40 let url = '/wxapp/public/loginImg';
42 let param = {} 41 let param = {}
43 app.post(url, param).then((res) => { 42 app.post(url, param).then((res) => {
44 - // console.log(res, res.data.data.img)  
45 if (res.data.code == 20000) { 43 if (res.data.code == 20000) {
46 that.setData({ 44 that.setData({
47 imgs:res.data.data.img 45 imgs:res.data.data.img
48 }) 46 })
49 - console.log(this.data.imgs)  
50 } 47 }
51 }).catch((errMsg) => { }) 48 }).catch((errMsg) => { })
52 }, 49 },
@@ -53,7 +53,7 @@ Page({ @@ -53,7 +53,7 @@ Page({
53 * 生命周期函数--监听页面显示 53 * 生命周期函数--监听页面显示
54 */ 54 */
55 onShow: function () { 55 onShow: function () {
56 - 56 + this.getTopicList()
57 }, 57 },
58 58
59 /** 59 /**
@@ -7,6 +7,6 @@ @@ -7,6 +7,6 @@
7 </view> 7 </view>
8 <view class='list_title'>{{item.post_title}}</view> 8 <view class='list_title'>{{item.post_title}}</view>
9 <view class='list_content'>{{item.post_excerpt}}</view> 9 <view class='list_content'>{{item.post_excerpt}}</view>
10 - <view class='list_time'>{{item.post_source}}·{{item.create_time}}</view> 10 + <view class='list_time'>{{item.post_source}} · {{item.create_time=='0小时'?'1分钟内':item.create_time}}</view>
11 </view> 11 </view>
12 </view> 12 </view>
@@ -11,21 +11,23 @@ @@ -11,21 +11,23 @@
11 height: 520rpx; 11 height: 520rpx;
12 margin-bottom: 40rpx; 12 margin-bottom: 40rpx;
13 } 13 }
14 -.label_box{ 14 +
  15 +.label_box {
15 display: flex; 16 display: flex;
16 align-items: center; 17 align-items: center;
17 } 18 }
18 19
19 .list_label { 20 .list_label {
20 - width: 80rpx; 21 + min-width: 80rpx;
  22 + display: inline-block;
21 height: 36rpx; 23 height: 36rpx;
22 background: #8b4e93; 24 background: #8b4e93;
23 color: #fff; 25 color: #fff;
24 font-size: 30rpx; 26 font-size: 30rpx;
25 border-radius: 5rpx; 27 border-radius: 5rpx;
26 - display: flex;  
27 - align-items: center;  
28 - justify-content: center; 28 + line-height: 36rpx;
  29 + text-align: center;
  30 + padding: 3rpx 10rpx;
29 margin-bottom: 30rpx; 31 margin-bottom: 30rpx;
30 margin-right: 10rpx; 32 margin-right: 10rpx;
31 } 33 }
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 "list": [] 37 "list": []
38 }, 38 },
39 "miniprogram": { 39 "miniprogram": {
40 - "current": 2, 40 + "current": 3,
41 "list": [ 41 "list": [
42 { 42 {
43 "id": -1, 43 "id": -1,
@@ -54,11 +54,18 @@ @@ -54,11 +54,18 @@
54 "scene": null 54 "scene": null
55 }, 55 },
56 { 56 {
57 - "id": -1, 57 + "id": 2,
58 "name": "aa", 58 "name": "aa",
59 - "pathName": "pages/my/userInfo/userInfo", 59 + "pathName": "pages/index/search/search",
60 "query": "id=2", 60 "query": "id=2",
61 "scene": null 61 "scene": null
  62 + },
  63 + {
  64 + "id": 3,
  65 + "name": "aa",
  66 + "pathName": "pages/my/userInfo/userInfo",
  67 + "query": "id=3",
  68 + "scene": null
62 } 69 }
63 ] 70 ]
64 } 71 }