正在显示
97 个修改的文件
包含
227 行增加
和
178 行删除
@@ -32,9 +32,6 @@ App({ | @@ -32,9 +32,6 @@ App({ | ||
32 | } | 32 | } |
33 | } | 33 | } |
34 | }) | 34 | }) |
35 | - | ||
36 | - | ||
37 | - | ||
38 | }, | 35 | }, |
39 | 36 | ||
40 | post: function (url, data, headerParams, showLoad) { | 37 | post: function (url, data, headerParams, showLoad) { |
@@ -56,7 +53,6 @@ App({ | @@ -56,7 +53,6 @@ App({ | ||
56 | data: postData, | 53 | data: postData, |
57 | method: 'POST', | 54 | method: 'POST', |
58 | header: header, | 55 | header: header, |
59 | - | ||
60 | success: function (res) { //返回取得的数据 | 56 | success: function (res) { //返回取得的数据 |
61 | if (res.data.code == '20000') { | 57 | if (res.data.code == '20000') { |
62 | resolve(res.data.data); | 58 | resolve(res.data.data); |
@@ -79,4 +79,14 @@ image{ | @@ -79,4 +79,14 @@ image{ | ||
79 | width:26rpx; | 79 | width:26rpx; |
80 | height:15rpx; | 80 | height:15rpx; |
81 | font-size: 0 | 81 | font-size: 0 |
82 | + } | ||
83 | + .noData{ | ||
84 | + height: 360rpx; | ||
85 | + width: 750rpx; | ||
86 | + text-align: center; | ||
87 | + display: flex; | ||
88 | + align-items: center; | ||
89 | + font-size: 26rpx; | ||
90 | + color: #999; | ||
91 | + justify-content: center; | ||
82 | } | 92 | } |
img/aicon_03.png
0 → 100644
1.6 KB
img/aicon_05.png
0 → 100644
2.1 KB
img/aicon_06.png
0 → 100644
2.0 KB
img/aicon_07.png
0 → 100644
1.6 KB
img/aicon_08.png
0 → 100644
1.9 KB
img/aicon_09.png
0 → 100644
740 字节
img/aicon_10.png
0 → 100644
610 字节
img/aicon_14.png
0 → 100644
229 字节
img/aicon_15.png
0 → 100644
235 字节
img/aicon_17.png
0 → 100644
2.7 KB
img/aicon_18.png
0 → 100644
1.6 KB
img/aicon_20.png
0 → 100644
2.0 KB
img/aicon_21.png
0 → 100644
125.7 KB
img/aicon_24.png
0 → 100644
1.4 KB
img/aicon_26.png
0 → 100644
1.2 KB
img/aicon_46.png
0 → 100644
417 字节
img/aicon_47.png
0 → 100644
506 字节
img/aicon_48.png
0 → 100644
6.9 KB
img/aicon_50.png
0 → 100644
749 字节
img/aicon_51.png
0 → 100644
731 字节
img/aicon_52.png
0 → 100644
1.3 KB
img/aicon_53.png
0 → 100644
1.3 KB
img/aicon_54.png
0 → 100644
2.0 KB
img/aicon_55.png
0 → 100644
1.2 KB
img/aicon_56.png
0 → 100644
501 字节
img/aicon_62.png
0 → 100644
354 字节
img/aicon_63.png
0 → 100644
2.4 KB
img/aicon_65.png
0 → 100644
1.1 KB
img/aicon_66.png
0 → 100644
506 字节
img/aicon_67.png
0 → 100644
453 字节
img/aicon_68.png
0 → 100644
550 字节
img/aicon_69.png
0 → 100644
515 字节
img/aicon_70.png
0 → 100644
1.2 KB
img/aicon_71.png
0 → 100644
417 字节
img/aicon_72.png
0 → 100644
625 字节
img/aicon_73.png
0 → 100644
1005 字节
img/aicon_74.png
0 → 100644
770 字节
img/aicon_75.png
0 → 100644
719 字节
img/aicon_79.png
0 → 100644
2.5 KB
img/aicon_80.png
0 → 100644
2.3 KB
img/aicon_81.png
0 → 100644
3.2 KB
img/aicon_82.png
0 → 100644
673 字节
img/aicon_83.png
0 → 100644
462 字节
img/aicon_84.png
0 → 100644
804 字节
img/aicon_85.png
0 → 100644
456 字节
img/aicon_86.png
0 → 100644
712 字节
img/aicon_88.png
0 → 100644
537 字节
img/b1.png
0 → 100644
474 字节
img/back.png
0 → 100644
883 字节
img/bicon_01.png
0 → 100644
555 字节
img/bicon_05.png
0 → 100644
274 字节
img/bicon_06.png
0 → 100644
275 字节
img/bicon_08.png
0 → 100644
635 字节
img/bicon_09.png
0 → 100644
358 字节
img/bicon_13.png
0 → 100644
616 字节
img/bicon_14.png
0 → 100644
577 字节
img/cc.png
0 → 100644
1.0 KB
img/dp1.png
0 → 100644
941 字节
img/dp2.png
0 → 100644
871 字节
img/dp3.png
0 → 100644
1.3 KB
img/fanhui.png
0 → 100644
474 字节
img/gengduo.png
0 → 100644
281 字节
img/huo.png
0 → 100644
6.2 KB
img/ic1.png
0 → 100644
517 字节
img/nav_01.png
0 → 100644
566 字节
img/nav_02.png
0 → 100644
844 字节
img/nav_03.png
0 → 100644
621 字节
img/nav_04.png
0 → 100644
675 字节
img/nav_05.png
0 → 100644
616 字节
img/nav_06.png
0 → 100644
789 字节
img/pinglun_wxz.png
0 → 100644
539 字节
img/pinglun_xz.png
0 → 100644
737 字节
img/qidong.png
0 → 100644
26.7 KB
img/qq.png
0 → 100644
1.7 KB
img/saoma.png
0 → 100644
268 字节
img/search_image1.png
0 → 100644
432 字节
img/search_image2.png
0 → 100644
9.7 KB
img/search_image2x.png
0 → 100644
2.2 KB
img/xiazai5.png
0 → 100644
1.9 KB
img/zan1.png
0 → 100644
1.8 KB
img/zan2.png
0 → 100644
517 字节
@@ -6,8 +6,6 @@ | @@ -6,8 +6,6 @@ | ||
6 | <view class="registeritem {{item.sel==true?'selact':''}}" wx:for="{{shaikind}}" wx:key="" wx:if="{{type==2}}" data-id="{{item.id}}" catchtap='selectkind'>{{item.country_name}}</view> | 6 | <view class="registeritem {{item.sel==true?'selact':''}}" wx:for="{{shaikind}}" wx:key="" wx:if="{{type==2}}" data-id="{{item.id}}" catchtap='selectkind'>{{item.country_name}}</view> |
7 | <view class="registeritem {{item.sel==true?'selact':''}}" wx:for="{{shaikind}}" wx:key="" wx:if="{{type==3}}" data-id="{{item.id}}" catchtap='selectkind'>{{item.region_name}}</view> | 7 | <view class="registeritem {{item.sel==true?'selact':''}}" wx:for="{{shaikind}}" wx:key="" wx:if="{{type==3}}" data-id="{{item.id}}" catchtap='selectkind'>{{item.region_name}}</view> |
8 | <view class="registeritem {{item.sel==true?'selact':''}}" wx:for="{{shaikind}}" wx:key="" wx:if="{{type==4}}" data-id="{{item.id}}" catchtap='selectkind'>{{item.odor_name}}</view> | 8 | <view class="registeritem {{item.sel==true?'selact':''}}" wx:for="{{shaikind}}" wx:key="" wx:if="{{type==4}}" data-id="{{item.id}}" catchtap='selectkind'>{{item.odor_name}}</view> |
9 | - | ||
10 | - | ||
11 | </view> | 9 | </view> |
12 | </view> | 10 | </view> |
13 | 11 | ||
@@ -18,19 +16,12 @@ | @@ -18,19 +16,12 @@ | ||
18 | <view class="selcoun">选择国别</view> | 16 | <view class="selcoun">选择国别</view> |
19 | <view class="cqueding" bindtap="countrysure">确定</view> | 17 | <view class="cqueding" bindtap="countrysure">确定</view> |
20 | </view> | 18 | </view> |
21 | - | ||
22 | <view class="countryitem" wx:for="{{countrylist}}" wx:key="" data-name="{{item.country_name}}" bindtap="selectcountry" data-id="{{item.id}}"> | 19 | <view class="countryitem" wx:for="{{countrylist}}" wx:key="" data-name="{{item.country_name}}" bindtap="selectcountry" data-id="{{item.id}}"> |
23 | <view class="selcounitem">{{item.country_name}}</view> | 20 | <view class="selcounitem">{{item.country_name}}</view> |
24 | - | ||
25 | <view class="gouimg" wx:if="{{item.sel==true}}"> | 21 | <view class="gouimg" wx:if="{{item.sel==true}}"> |
26 | <image src="{{url}}/aicon_18x.png"></image> | 22 | <image src="{{url}}/aicon_18x.png"></image> |
27 | </view> | 23 | </view> |
28 | </view> | 24 | </view> |
29 | - | ||
30 | - | ||
31 | - | ||
32 | - | ||
33 | - | ||
34 | </view> | 25 | </view> |
35 | <!-- 城市遮罩层 --> | 26 | <!-- 城市遮罩层 --> |
36 | <view class="cregister" wx:if="{{showcity}}"> | 27 | <view class="cregister" wx:if="{{showcity}}"> |
@@ -39,22 +30,15 @@ | @@ -39,22 +30,15 @@ | ||
39 | <view class="selcoun">选择城市</view> | 30 | <view class="selcoun">选择城市</view> |
40 | <view class="cqueding" bindtap="citysure">确定</view> | 31 | <view class="cqueding" bindtap="citysure">确定</view> |
41 | </view> | 32 | </view> |
42 | - | ||
43 | <view class="nodata" wx:if="{{citylist.length==0}}">暂无数据</view> | 33 | <view class="nodata" wx:if="{{citylist.length==0}}">暂无数据</view> |
44 | - | ||
45 | - | ||
46 | -<block wx:else> | ||
47 | - <view class="countryitem" wx:for="{{citylist}}" wx:key="" data-name="{{item.country_name}}" bindtap="selectcity" data-index="{{index}}" > | ||
48 | - <view class="selcounitem" >{{item.city}}</view> | ||
49 | - | ||
50 | - <!-- <view class="gouimg" wx:if="{{item.sel==true}}"> | 34 | + <block wx:else> |
35 | + <view class="countryitem" wx:for="{{citylist}}" wx:key="" data-name="{{item.country_name}}" bindtap="selectcity" data-index="{{index}}"> | ||
36 | + <view class="selcounitem">{{item.city}}</view> | ||
37 | + <!-- <view class="gouimg" wx:if="{{item.sel==true}}"> | ||
51 | <image src="{{url}}/aicon_18x.png"></image> | 38 | <image src="{{url}}/aicon_18x.png"></image> |
52 | </view> --> | 39 | </view> --> |
53 | - </view> | ||
54 | -</block> | ||
55 | - | ||
56 | - | ||
57 | - | 40 | + </view> |
41 | + </block> | ||
58 | </view> | 42 | </view> |
59 | <!-- 区域选择 --> | 43 | <!-- 区域选择 --> |
60 | <view class="cregister" wx:if="{{showregin}}"> | 44 | <view class="cregister" wx:if="{{showregin}}"> |
@@ -67,7 +51,7 @@ | @@ -67,7 +51,7 @@ | ||
67 | 51 | ||
68 | 52 | ||
69 | <view class="countryitem" wx:for="{{reginlist}}" wx:key="" data-name="{{item.name}}" bindtap="selectregin" data-index="{{index}}"> | 53 | <view class="countryitem" wx:for="{{reginlist}}" wx:key="" data-name="{{item.name}}" bindtap="selectregin" data-index="{{index}}"> |
70 | - <view class="selcounitem" >{{item.name}}</view> | 54 | + <view class="selcounitem">{{item.name}}</view> |
71 | 55 | ||
72 | <view class="gouimg" wx:if="{{item.sel==true}}"> | 56 | <view class="gouimg" wx:if="{{item.sel==true}}"> |
73 | <image src="{{url}}/aicon_18x.png"></image> | 57 | <image src="{{url}}/aicon_18x.png"></image> |
@@ -6,13 +6,11 @@ | @@ -6,13 +6,11 @@ | ||
6 | <view class="registeritem">浓香型</view> | 6 | <view class="registeritem">浓香型</view> |
7 | <view class="registeritem">浓香型</view> | 7 | <view class="registeritem">浓香型</view> |
8 | <view class="registeritem">浓香型</view> | 8 | <view class="registeritem">浓香型</view> |
9 | - | ||
10 | </view> | 9 | </view> |
11 | </view> | 10 | </view> |
12 | 11 | ||
13 | 12 | ||
14 | <view class="shaisel"> | 13 | <view class="shaisel"> |
15 | - | ||
16 | <view class="kind"> | 14 | <view class="kind"> |
17 | <view class="shaikind" wx:for="{{navarr}}" wx:key='' bindtap="select" data-idx="{{index}}"> | 15 | <view class="shaikind" wx:for="{{navarr}}" wx:key='' bindtap="select" data-idx="{{index}}"> |
18 | <view class="shaikindname {{current==index?'selactive':''}}">{{item.name}}</view> | 16 | <view class="shaikindname {{current==index?'selactive':''}}">{{item.name}}</view> |
@@ -11,8 +11,8 @@ Page({ | @@ -11,8 +11,8 @@ Page({ | ||
11 | url:'', | 11 | url:'', |
12 | phonenum:'', | 12 | phonenum:'', |
13 | currentTime: 60, | 13 | currentTime: 60, |
14 | - mimaphone:'', | ||
15 | - mima:'' | 14 | + mimaphone:'18902082533', |
15 | + mima:'qqqqqq' | ||
16 | }, | 16 | }, |
17 | 17 | ||
18 | /** | 18 | /** |
@@ -127,11 +127,10 @@ Page({ | @@ -127,11 +127,10 @@ Page({ | ||
127 | 127 | ||
128 | app.post(url, params).then((res) => { | 128 | app.post(url, params).then((res) => { |
129 | console.log(res); | 129 | console.log(res); |
130 | - wx.navigateTo({ | 130 | + wx.setStorageSync('token', res.token) |
131 | + wx.switchTab({ | ||
131 | url: '/pages/homapage/homepage', | 132 | url: '/pages/homapage/homepage', |
132 | }) | 133 | }) |
133 | - | ||
134 | - | ||
135 | }).catch((err) => { | 134 | }).catch((err) => { |
136 | console.log(err) | 135 | console.log(err) |
137 | wx.showToast({ | 136 | wx.showToast({ |
@@ -17,7 +17,14 @@ Page({ | @@ -17,7 +17,14 @@ Page({ | ||
17 | url: app.globalData.url | 17 | url: app.globalData.url |
18 | }) | 18 | }) |
19 | }, | 19 | }, |
20 | - | 20 | + getInformation(){ |
21 | + let url = '/user/Center/user_index'; | ||
22 | + app.post(url,{}).then(r=>{ | ||
23 | + this.setData({ | ||
24 | + userInfo:r | ||
25 | + }) | ||
26 | + }) | ||
27 | + }, | ||
21 | /** | 28 | /** |
22 | * 生命周期函数--监听页面初次渲染完成 | 29 | * 生命周期函数--监听页面初次渲染完成 |
23 | */ | 30 | */ |
@@ -29,7 +36,7 @@ Page({ | @@ -29,7 +36,7 @@ Page({ | ||
29 | * 生命周期函数--监听页面显示 | 36 | * 生命周期函数--监听页面显示 |
30 | */ | 37 | */ |
31 | onShow: function () { | 38 | onShow: function () { |
32 | - | 39 | + this.getInformation(); |
33 | }, | 40 | }, |
34 | 41 | ||
35 | /** | 42 | /** |
1 | - | ||
2 | - | ||
3 | <view class="headimg"> | 1 | <view class="headimg"> |
4 | <image src="{{url}}aicon_87x.png"></image> | 2 | <image src="{{url}}aicon_87x.png"></image> |
5 | - | ||
6 | - <view class="peopleinfo"> | ||
7 | - | 3 | + <navigator class="peopleinfo" url=''> |
8 | <view class="peoplecontent"> | 4 | <view class="peoplecontent"> |
9 | <view class="peopleleft"> | 5 | <view class="peopleleft"> |
10 | - <image src="{{url}}aicon_77@2x.png"></image> | 6 | + <image src="{{userInfo.avatar||url+'aicon_77@2x.png'}}"></image> |
11 | </view> | 7 | </view> |
12 | - | ||
13 | <view class="peopletext"> | 8 | <view class="peopletext"> |
14 | - <view class="peopletitle">万丈红尘一人醉</view> | ||
15 | - <view class="level">M1</view> | 9 | + <view class="peopletitle">{{userInfo.user_nickname||'酒字典'}}</view> |
10 | + <view class="level">M{{userInfo.level}}</view> | ||
16 | </view> | 11 | </view> |
17 | </view> | 12 | </view> |
18 | - | ||
19 | - | ||
20 | <view class="iconfont icon-jiantou"> </view> | 13 | <view class="iconfont icon-jiantou"> </view> |
21 | - </view> | ||
22 | - | ||
23 | - <view class="jifen"> | ||
24 | - <view class="jifennum">1600</view> | 14 | + </navigator> |
25 | 15 | ||
16 | + <navigator class="jifen"> | ||
17 | + <view class="jifennum">{{userInfo.score}}</view> | ||
26 | <view class="myuse">可用积分</view> | 18 | <view class="myuse">可用积分</view> |
27 | <view class="iconfont icon-jiantou jirow"></view> | 19 | <view class="iconfont icon-jiantou jirow"></view> |
28 | - </view> | 20 | + </navigator> |
29 | 21 | ||
30 | <view class="xinhead"> | 22 | <view class="xinhead"> |
31 | - | ||
32 | - <view class="xinitem"> | 23 | + <navigator class="xinitem" url='/pages/myblock/guanzhu/guanzhu'> |
33 | <view class="xinimg"> | 24 | <view class="xinimg"> |
34 | <image src="{{url}}aicon_79.png"></image> | 25 | <image src="{{url}}aicon_79.png"></image> |
35 | </view> | 26 | </view> |
36 | - | ||
37 | <view class="xintitle">关注</view> | 27 | <view class="xintitle">关注</view> |
38 | - </view> | ||
39 | - <view class="xinitem"> | 28 | + </navigator> |
29 | + <navigator class="xinitem" url='/pages/myblock/pinglun/pinglun'> | ||
40 | <view class="ping"> | 30 | <view class="ping"> |
41 | <image src="{{url}}aicon_80x.png"></image> | 31 | <image src="{{url}}aicon_80x.png"></image> |
42 | </view> | 32 | </view> |
43 | - | ||
44 | <view class="xintitle">评论</view> | 33 | <view class="xintitle">评论</view> |
45 | - </view> | ||
46 | - <view class="xinitem"> | 34 | + </navigator> |
35 | + <navigator class="xinitem" url='/pages/myblock/pinglun/pinglun'> | ||
47 | <view class="history"> | 36 | <view class="history"> |
48 | <image src="{{url}}aicon_81x.png"></image> | 37 | <image src="{{url}}aicon_81x.png"></image> |
49 | </view> | 38 | </view> |
50 | - | ||
51 | <view class="xintitle">历史</view> | 39 | <view class="xintitle">历史</view> |
52 | - </view> | ||
53 | - | ||
54 | - | 40 | + </navigator> |
55 | </view> | 41 | </view> |
56 | - | ||
57 | </view> | 42 | </view> |
58 | 43 | ||
59 | <view class="collect"> | 44 | <view class="collect"> |
@@ -71,62 +56,53 @@ | @@ -71,62 +56,53 @@ | ||
71 | <view class="collectitemnum">19</view> | 56 | <view class="collectitemnum">19</view> |
72 | <view class="collectitemtitle">酒企</view> | 57 | <view class="collectitemtitle">酒企</view> |
73 | </view> | 58 | </view> |
74 | - | ||
75 | </view> | 59 | </view> |
76 | </view> | 60 | </view> |
77 | 61 | ||
78 | <view class="mylist"> | 62 | <view class="mylist"> |
79 | - | ||
80 | - <navigator class="mylistitem" url="/pages/myblock/personpage/personpage" redirect="true" hover-class="none"> | ||
81 | - <view class="mylistleft"> | ||
82 | - <view class="mylistimage"> | ||
83 | - <image src="{{url}}aicon_82x.png"></image> | ||
84 | - </view> | ||
85 | - <view class="message">消息通知</view> | 63 | + <navigator class="mylistitem" url="/pages/myblock/personpage/personpage" hover-class="none"> |
64 | + <view class="mylistleft"> | ||
65 | + <view class="mylistimage"> | ||
66 | + <image src="{{url}}aicon_82x.png"></image> | ||
86 | </view> | 67 | </view> |
87 | - | ||
88 | - <view class="iconfont icon-jiantou listrow"></view> | ||
89 | - </navigator> | ||
90 | - | ||
91 | - | ||
92 | - <view class="mylistitem"> | 68 | + <view class="message">消息通知</view> |
69 | + </view> | ||
70 | + <view class="iconfont icon-jiantou listrow"></view> | ||
71 | + </navigator> | ||
72 | + <navigator class="mylistitem"> | ||
93 | <view class="mylistleft"> | 73 | <view class="mylistleft"> |
94 | <view class="mylistimage"> | 74 | <view class="mylistimage"> |
95 | <image src="{{url}}aicon_83x.png"></image> | 75 | <image src="{{url}}aicon_83x.png"></image> |
96 | </view> | 76 | </view> |
97 | <view class="message">用户反馈</view> | 77 | <view class="message">用户反馈</view> |
98 | </view> | 78 | </view> |
99 | - | ||
100 | <view class="iconfont icon-jiantou listrow"></view> | 79 | <view class="iconfont icon-jiantou listrow"></view> |
101 | - </view> | ||
102 | - <view class="mylistitem"> | 80 | + </navigator> |
81 | + <navigator class="mylistitem" url='/pages/myblock/zhanghaoyuanquan/zhanghaoyuanquan'> | ||
103 | <view class="mylistleft"> | 82 | <view class="mylistleft"> |
104 | <view class="mylistimage"> | 83 | <view class="mylistimage"> |
105 | <image src="{{url}}aicon_84x.png"></image> | 84 | <image src="{{url}}aicon_84x.png"></image> |
106 | </view> | 85 | </view> |
107 | <view class="message">账号与安全</view> | 86 | <view class="message">账号与安全</view> |
108 | </view> | 87 | </view> |
109 | - | ||
110 | <view class="iconfont icon-jiantou listrow"></view> | 88 | <view class="iconfont icon-jiantou listrow"></view> |
111 | - </view> | ||
112 | - <view class="mylistitem"> | 89 | + </navigator> |
90 | + <navigator class="mylistitem"> | ||
113 | <view class="mylistleft"> | 91 | <view class="mylistleft"> |
114 | <view class="mylistimage"> | 92 | <view class="mylistimage"> |
115 | <image src="{{url}}aicon_85x.png"></image> | 93 | <image src="{{url}}aicon_85x.png"></image> |
116 | </view> | 94 | </view> |
117 | <view class="message">协议与规则</view> | 95 | <view class="message">协议与规则</view> |
118 | </view> | 96 | </view> |
119 | - | ||
120 | <view class="iconfont icon-jiantou listrow"></view> | 97 | <view class="iconfont icon-jiantou listrow"></view> |
121 | - </view> | ||
122 | - <view class="mylistitem"> | 98 | + </navigator> |
99 | + <navigator class="mylistitem"> | ||
123 | <view class="mylistleft"> | 100 | <view class="mylistleft"> |
124 | <view class="mylistimage"> | 101 | <view class="mylistimage"> |
125 | <image src="{{url}}aicon_86x.png"></image> | 102 | <image src="{{url}}aicon_86x.png"></image> |
126 | </view> | 103 | </view> |
127 | <view class="message">关于</view> | 104 | <view class="message">关于</view> |
128 | </view> | 105 | </view> |
129 | - | ||
130 | <view class="iconfont icon-jiantou listrow"></view> | 106 | <view class="iconfont icon-jiantou listrow"></view> |
131 | - </view> | 107 | + </navigator> |
132 | </view> | 108 | </view> |
@@ -30,9 +30,10 @@ image{ | @@ -30,9 +30,10 @@ image{ | ||
30 | } | 30 | } |
31 | .peopleleft{ | 31 | .peopleleft{ |
32 | width:100rpx; | 32 | width:100rpx; |
33 | -height:100rpx; | ||
34 | -font-size: 0; | ||
35 | -border-radius: 50%; | 33 | + height:100rpx; |
34 | + font-size: 0; | ||
35 | + border-radius: 50%; | ||
36 | + overflow: hidden; | ||
36 | } | 37 | } |
37 | .peopletitle{ | 38 | .peopletitle{ |
38 | color:#FFFEFE; | 39 | color:#FFFEFE; |
@@ -8,7 +8,36 @@ Page({ | @@ -8,7 +8,36 @@ Page({ | ||
8 | data: { | 8 | data: { |
9 | navbar:['酒企','酿酒师'], | 9 | navbar:['酒企','酿酒师'], |
10 | currentTab: 0, | 10 | currentTab: 0, |
11 | - url:'' | 11 | + url:'', |
12 | + page: 1, | ||
13 | + compony:[], | ||
14 | + noData: true | ||
15 | + }, | ||
16 | + getWine(){ | ||
17 | + let url = '/user/Center/concern_company',params = { | ||
18 | + page: this.data.page | ||
19 | + }; | ||
20 | + app.post(url,params).then(r=>{ | ||
21 | + var list = this.data.page == 1 ? r.list : this.data.compony.concat(r.list); | ||
22 | + this.setData({ | ||
23 | + compony: list, | ||
24 | + totalPage: r.total_page, | ||
25 | + noData: list.length>0?true:false | ||
26 | + }) | ||
27 | + }) | ||
28 | + }, | ||
29 | + getTeach() { | ||
30 | + let url = '/user/Center/concern_company', params = { | ||
31 | + page: this.data.page | ||
32 | + }; | ||
33 | + app.post(url, params).then(r => { | ||
34 | + var list = this.data.page == 1 ? r.list : this.data.compony.concat(r.list); | ||
35 | + this.setData({ | ||
36 | + compony: list, | ||
37 | + totalPage: r.total_page, | ||
38 | + noData: list.length > 0 ? true : false | ||
39 | + }) | ||
40 | + }) | ||
12 | }, | 41 | }, |
13 | 42 | ||
14 | /** | 43 | /** |
@@ -18,13 +47,15 @@ Page({ | @@ -18,13 +47,15 @@ Page({ | ||
18 | this.setData({ | 47 | this.setData({ |
19 | url: app.globalData.url | 48 | url: app.globalData.url |
20 | }) | 49 | }) |
21 | - }, | 50 | + this.getWine(); |
51 | + }, | ||
22 | navbarTap: function (e) { | 52 | navbarTap: function (e) { |
53 | + let idx = e.currentTarget.dataset.idx; | ||
23 | this.setData({ | 54 | this.setData({ |
24 | currentTab: e.currentTarget.dataset.idx, | 55 | currentTab: e.currentTarget.dataset.idx, |
25 | - | ||
26 | - | ||
27 | - }) | 56 | + page:1 |
57 | + }); | ||
58 | + idx==0?this.getWine():this.getTeach(); | ||
28 | }, | 59 | }, |
29 | 60 | ||
30 | /** | 61 | /** |
@@ -66,7 +97,16 @@ Page({ | @@ -66,7 +97,16 @@ Page({ | ||
66 | * 页面上拉触底事件的处理函数 | 97 | * 页面上拉触底事件的处理函数 |
67 | */ | 98 | */ |
68 | onReachBottom: function () { | 99 | onReachBottom: function () { |
69 | - | 100 | + this.data.page < this.data.totalPage ?( |
101 | + this.data.currentTab == 0? (this.setData({ | ||
102 | + page: page+1 | ||
103 | + }), this.getWine()) : (this.setData({ | ||
104 | + page: page + 1 | ||
105 | + }), this.getTeach()) | ||
106 | + ):wx.showToast({ | ||
107 | + title: '没有更多了', | ||
108 | + icon:'none' | ||
109 | + }) | ||
70 | }, | 110 | }, |
71 | 111 | ||
72 | /** | 112 | /** |
1 | - | ||
2 | <view class="kindnav"> | 1 | <view class="kindnav"> |
3 | - <view wx:for="{{navbar}}" data-idx="{{index}}" class="kindnav_item {{currentTab==index ? 'kindactive' : ''}}" wx:key="unique" bindtap="navbarTap" data-id="{{item.id}}">{{item}} | ||
4 | - </view> | 2 | + <view wx:for="{{navbar}}" data-idx="{{index}}" class="kindnav_item {{currentTab==index ? 'kindactive' : ''}}" wx:key="unique" bindtap="navbarTap" data-id="{{item.id}}">{{item}} |
3 | + </view> | ||
5 | </view> | 4 | </view> |
6 | <!-- 酒企 --> | 5 | <!-- 酒企 --> |
7 | <view class="guanzhulist" wx:if="{{currentTab==0}}"> | 6 | <view class="guanzhulist" wx:if="{{currentTab==0}}"> |
8 | - <view class="guanzhuitem"> | ||
9 | - <view class="guanzhuitemleft"> | ||
10 | - <view class="guanzhuleftname">湖北白云边股份股份有限公司</view> | ||
11 | - <view class="gouimg"> | ||
12 | - <image src="{{url}}/aicon_20x.png"></image> | ||
13 | - </view> | ||
14 | - </view> | ||
15 | - | ||
16 | - <view class="guanzhuright">关注</view> | ||
17 | - </view> | ||
18 | - <view class="guanzhuitem"> | 7 | + <view class="guanzhuitem" wx:for='{{compony}}' wx:key=''> |
19 | <view class="guanzhuitemleft"> | 8 | <view class="guanzhuitemleft"> |
20 | - <view class="guanzhuleftname">湖北白云边股份股份有限公司</view> | 9 | + <view class="guanzhuleftname">{{item.name}}</view> |
21 | <view class="gouimg"> | 10 | <view class="gouimg"> |
22 | - <image src="{{url}}/aicon_20x.png"></image> | 11 | + <image src="{{url}}/aicon_20x.png"></image> |
23 | </view> | 12 | </view> |
24 | </view> | 13 | </view> |
25 | - | ||
26 | - <view class="guanzhuright">关注</view> | ||
27 | - </view> | ||
28 | - <view class="guanzhuitem"> | ||
29 | - <view class="guanzhuitemleft"> | ||
30 | - <view class="guanzhuleftname">湖北白云边股份股份有限公司</view> | ||
31 | - <view class="gouimg"> | ||
32 | - <image src="{{url}}/aicon_20x.png"></image> | ||
33 | - </view> | ||
34 | - </view> | ||
35 | - | ||
36 | - <view class="guanzhuright">关注</view> | 14 | + <view class="guanzhuright" bindtap='Action' id='{{item.id}}'>已关注</view> |
37 | </view> | 15 | </view> |
38 | </view> | 16 | </view> |
39 | 17 | ||
40 | <!-- 酿酒师 --> | 18 | <!-- 酿酒师 --> |
41 | 19 | ||
42 | <view class="guanzhulist" wx:if="{{currentTab==1}}"> | 20 | <view class="guanzhulist" wx:if="{{currentTab==1}}"> |
43 | - <view class="guanzhuitem"> | 21 | + <view class="guanzhuitem" wx:for='{{compony}}' wx:key=''> |
44 | <view class="guanzhuitemleft"> | 22 | <view class="guanzhuitemleft"> |
45 | - | ||
46 | - <view class="teacherimg"> | ||
47 | - <image src="/img/nav_04x.png"></image> | ||
48 | - </view> | ||
49 | - | ||
50 | - <view class="guanzhuleftname teachername">徐强</view> | ||
51 | - <view class="gouimg"> | ||
52 | - <image src="{{url}}/aicon_20x.png"></image> | 23 | + <view class="teacherimg"> |
24 | + <image src="{{item.avatar}}"></image> | ||
53 | </view> | 25 | </view> |
54 | - </view> | ||
55 | - | ||
56 | - <view class="guanzhuright">关注</view> | ||
57 | - </view> | ||
58 | - <view class="guanzhuitem"> | ||
59 | - <view class="guanzhuitemleft"> | ||
60 | - <view class="guanzhuleftname">湖北白云边股份股份有限公司</view> | 26 | + <view class="guanzhuleftname teachername">{{item.name}}</view> |
61 | <view class="gouimg"> | 27 | <view class="gouimg"> |
62 | - <image src="{{url}}/aicon_20x.png"></image> | 28 | + <image src="{{url}}/aicon_20x.png"></image> |
63 | </view> | 29 | </view> |
64 | </view> | 30 | </view> |
65 | - | ||
66 | <view class="guanzhuright">关注</view> | 31 | <view class="guanzhuright">关注</view> |
67 | </view> | 32 | </view> |
68 | - <view class="guanzhuitem"> | ||
69 | - <view class="guanzhuitemleft"> | ||
70 | - <view class="guanzhuleftname">湖北白云边股份股份有限公司</view> | ||
71 | - <view class="gouimg"> | ||
72 | - <image src="{{url}}/aicon_20x.png"></image> | ||
73 | - </view> | ||
74 | - </view> | 33 | +</view> |
75 | 34 | ||
76 | - <view class="guanzhuright">关注</view> | ||
77 | - </view> | 35 | +<view class='noData' wx:if='{{!noData}}'> |
36 | + 暂无相关数据 | ||
78 | </view> | 37 | </view> |
1 | // pages/myblock/pinglun/pinglun.js | 1 | // pages/myblock/pinglun/pinglun.js |
2 | +const app = getApp(); | ||
2 | Page({ | 3 | Page({ |
3 | 4 | ||
4 | /** | 5 | /** |
5 | * 页面的初始数据 | 6 | * 页面的初始数据 |
6 | */ | 7 | */ |
7 | data: { | 8 | data: { |
8 | - | 9 | + page: 1, |
10 | + list:[], | ||
11 | + noData: true, | ||
12 | + noMore:!1, | ||
13 | + edit:!1 | ||
9 | }, | 14 | }, |
10 | 15 | ||
11 | /** | 16 | /** |
12 | * 生命周期函数--监听页面加载 | 17 | * 生命周期函数--监听页面加载 |
13 | */ | 18 | */ |
14 | onLoad: function (options) { | 19 | onLoad: function (options) { |
15 | - | 20 | + this.getList(); |
21 | + }, | ||
22 | + edit(){ | ||
23 | + console.log(11) | ||
24 | + this.setData({ | ||
25 | + edit:!this.data.edit | ||
26 | + }) | ||
27 | + }, | ||
28 | + getList(){ | ||
29 | + let url = 'user/Center/my_comment', params = { | ||
30 | + page: this.data.page | ||
31 | + }; | ||
32 | + app.post(url, params).then(r => { | ||
33 | + var list = this.data.page == 1 ? r.list : this.data.list.concat(r.list); | ||
34 | + this.setData({ | ||
35 | + list: list, | ||
36 | + totalPage: r.total_page, | ||
37 | + noData: list.length > 0 ? true : false, | ||
38 | + noMore: r.totalPage==r.page?!0:!1 | ||
39 | + }) | ||
40 | + }) | ||
16 | }, | 41 | }, |
17 | 42 | ||
18 | /** | 43 | /** |
1 | -<view class="pinglunlist"> | ||
2 | - <view class="pinglunitem"> | 1 | +<view class="pinglunlist" hidden='{{noData}}'> |
2 | + <view class='top_eidt'> | ||
3 | + 我的评论 | ||
4 | + <text class='action' bindtap='edit'>{{edit?'取消':'编辑'}}</text> | ||
5 | + </view> | ||
6 | + <view class="pinglunitem" wx:for='{{list}}' wx:key=''> | ||
3 | <view class="pinglunitemleft"> | 7 | <view class="pinglunitemleft"> |
4 | <view class="leftimg"> | 8 | <view class="leftimg"> |
5 | - <image src=""></image> | 9 | + <image src="{{item.avatar}}"></image> |
6 | </view> | 10 | </view> |
7 | - | ||
8 | <view class="pinglunright"> | 11 | <view class="pinglunright"> |
9 | - <view class="righttop">小叶子</view> | ||
10 | - <view class="rightbottom">2019年11月5日</view> | 12 | + <view class="righttop">{{item.user_nickname}}</view> |
13 | + <view class="rightbottom">{{item.create_time}}</view> | ||
14 | + </view> | ||
15 | + <view class='eidt {{item.checked?"choose":""}}' bindtap='choose' id='{{index}}' wx:if='{{edit}}'> | ||
16 | + <image src='/img/pinglun_xz.png'></image> | ||
11 | </view> | 17 | </view> |
12 | - | ||
13 | </view> | 18 | </view> |
14 | - | ||
15 | <view class="pinglunmiddle"> | 19 | <view class="pinglunmiddle"> |
16 | - 教练,我想学酿酒 | 20 | + {{item.content}} |
17 | </view> | 21 | </view> |
18 | - | ||
19 | <view class="pinglunbottom"> | 22 | <view class="pinglunbottom"> |
20 | <view class="pingbottomleft"> | 23 | <view class="pingbottomleft"> |
21 | - <image src=""></image> | 24 | + <image src="{{item.article.thumb}}"></image> |
22 | </view> | 25 | </view> |
23 | - | ||
24 | <view class='pingbottomright'> | 26 | <view class='pingbottomright'> |
25 | - <view class='xinxi'>浓香酒酿酒大师:沈才宏</view> | 27 | + <view class='xinxi'>{{item.article.title}}</view> |
26 | <view class="biangjiubottom"> | 28 | <view class="biangjiubottom"> |
27 | <view class='rightbottomimg'> | 29 | <view class='rightbottomimg'> |
28 | - <image src=''></image> | 30 | + <image src='{{item.article.logo}}'></image> |
29 | </view> | 31 | </view> |
30 | - | ||
31 | - <text class="niangjiutext">WinesBook</text> | 32 | + <text class="niangjiutext">{{item.article.name}}</text> |
32 | </view> | 33 | </view> |
33 | - | ||
34 | </view> | 34 | </view> |
35 | </view> | 35 | </view> |
36 | </view> | 36 | </view> |
37 | + <view class='showall' wx:if='{{noMore&&noData}}'>已显示全部内容</view> | ||
37 | </view> | 38 | </view> |
38 | 39 | ||
39 | -<view class='showall'>已显示全部内容</view> | ||
40 | 40 | ||
41 | -<view class="btnbottom"> | 41 | +<view class="btnbottom" wx:if='{{edit}}'> |
42 | <view class="btnleft">一键清空</view> | 42 | <view class="btnleft">一键清空</view> |
43 | - <view class="btnright">删除(1)</view> | 43 | + <view class="btnright">删除(1)</view> |
44 | +</view> | ||
45 | + | ||
46 | +<view class='noData' wx:if='{{!noData}}'> | ||
47 | + 暂无相关数据 | ||
44 | </view> | 48 | </view> |
@@ -113,3 +113,38 @@ | @@ -113,3 +113,38 @@ | ||
113 | line-height: 80rpx; | 113 | line-height: 80rpx; |
114 | margin-left:55rpx; | 114 | margin-left:55rpx; |
115 | } | 115 | } |
116 | +.top_eidt{ | ||
117 | + display: flex; | ||
118 | + align-items: center; | ||
119 | + justify-content: center; | ||
120 | + position: relative; | ||
121 | + height: 88rpx; | ||
122 | + border-bottom: 2rpx solid #f5f5f5; | ||
123 | + border-top:2rpx solid #f5f5f5; | ||
124 | + font-size: 26rpx; | ||
125 | +} | ||
126 | + | ||
127 | +.action{ | ||
128 | + position: absolute; | ||
129 | + top: 50%; | ||
130 | + right: 40rpx; | ||
131 | + transform: translateY(-50%); | ||
132 | + color: #999; | ||
133 | +} | ||
134 | +.eidt{ | ||
135 | + border: 1rpx solid #999; | ||
136 | + width: 36rpx; | ||
137 | + height: 36rpx; | ||
138 | + border-radius: 50%; | ||
139 | + margin-left: auto; | ||
140 | + -webkit-margin-start: auto; | ||
141 | + display: flex; | ||
142 | + align-items: center; | ||
143 | + justify-content: center; | ||
144 | +} | ||
145 | +.eidt image{ | ||
146 | + display: none; | ||
147 | +} | ||
148 | +.eidt.choose image{ | ||
149 | + display: block | ||
150 | +} |
@@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
49 | "list": [] | 49 | "list": [] |
50 | }, | 50 | }, |
51 | "miniprogram": { | 51 | "miniprogram": { |
52 | - "current": 23, | 52 | + "current": 25, |
53 | "list": [ | 53 | "list": [ |
54 | { | 54 | { |
55 | "id": -1, | 55 | "id": -1, |
@@ -216,6 +216,20 @@ | @@ -216,6 +216,20 @@ | ||
216 | "id": -1, | 216 | "id": -1, |
217 | "name": "完善个人信息", | 217 | "name": "完善个人信息", |
218 | "pathName": "pages/peopleinfo/peopleinfo", | 218 | "pathName": "pages/peopleinfo/peopleinfo", |
219 | + "query": "", | ||
220 | + "scene": null | ||
221 | + }, | ||
222 | + { | ||
223 | + "id": -1, | ||
224 | + "name": "关注", | ||
225 | + "pathName": "pages/myblock/guanzhu/guanzhu", | ||
226 | + "query": "", | ||
227 | + "scene": null | ||
228 | + }, | ||
229 | + { | ||
230 | + "id": -1, | ||
231 | + "name": "我的评论", | ||
232 | + "pathName": "pages/myblock/pinglun/pinglun", | ||
219 | "scene": null | 233 | "scene": null |
220 | } | 234 | } |
221 | ] | 235 | ] |
-
请 注册 或 登录 后发表评论