正在显示
57 个修改的文件
包含
2349 行增加
和
782 行删除
@@ -15,6 +15,7 @@ App({ | @@ -15,6 +15,7 @@ App({ | ||
15 | // 获取用户信息 | 15 | // 获取用户信息 |
16 | wx.getSetting({ | 16 | wx.getSetting({ |
17 | success: res => { | 17 | success: res => { |
18 | + | ||
18 | if (res.authSetting['scope.userInfo']) { | 19 | if (res.authSetting['scope.userInfo']) { |
19 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 | 20 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 |
20 | wx.getUserInfo({ | 21 | wx.getUserInfo({ |
@@ -155,7 +156,7 @@ App({ | @@ -155,7 +156,7 @@ App({ | ||
155 | }, | 156 | }, |
156 | globalData: { | 157 | globalData: { |
157 | userInfo: null, | 158 | userInfo: null, |
158 | - url:'http://winesbook.cn/static/images_mini/', | 159 | + url:'https://winesbook.cn/static/images_mini/', |
159 | baseUrl:'https://winesbook.cn/api' | 160 | baseUrl:'https://winesbook.cn/api' |
160 | } | 161 | } |
161 | }) | 162 | }) |
1 | { | 1 | { |
2 | "pages": [ | 2 | "pages": [ |
3 | + | ||
3 | "pages/homapage/homepage", | 4 | "pages/homapage/homepage", |
5 | + "pages/login/login", | ||
4 | "pages/forgetmima/forgetmima", | 6 | "pages/forgetmima/forgetmima", |
5 | "pages/setmima/setmima", | 7 | "pages/setmima/setmima", |
6 | "pages/myblock/shezhimima/shezhimima", | 8 | "pages/myblock/shezhimima/shezhimima", |
7 | "pages/enteryanzheng/enteryanzheng", | 9 | "pages/enteryanzheng/enteryanzheng", |
8 | - "pages/login/login", | ||
9 | "pages/homeblock/zhinengselect/zhinengselect", | 10 | "pages/homeblock/zhinengselect/zhinengselect", |
10 | "pages/homeblock/search/search", | 11 | "pages/homeblock/search/search", |
11 | "pages/find/find", | 12 | "pages/find/find", |
@@ -52,7 +53,10 @@ | @@ -52,7 +53,10 @@ | ||
52 | "pages/findblock/jiulist/jiulist", | 53 | "pages/findblock/jiulist/jiulist", |
53 | "pages/findblock/putongwenzhang/putongwenzhang", | 54 | "pages/findblock/putongwenzhang/putongwenzhang", |
54 | "pages/findblock/wenzhangdetail/wenzhangdetail", | 55 | "pages/findblock/wenzhangdetail/wenzhangdetail", |
55 | - "pages/homeblock/bofangexample/bofangexample" | 56 | + "pages/homeblock/bofangexample/bofangexample", |
57 | + "pages/myblock/jiudan/jiudan", | ||
58 | + "pages/myblock/yonghufankui/yonghufankui", | ||
59 | + "pages/myblock/xiugaimima/xiugaimima" | ||
56 | ], | 60 | ], |
57 | "window": { | 61 | "window": { |
58 | "backgroundTextStyle": "light", | 62 | "backgroundTextStyle": "light", |
@@ -110,3 +110,25 @@ image { | @@ -110,3 +110,25 @@ image { | ||
110 | .nambottom .namebottomitem:first-child { | 110 | .nambottom .namebottomitem:first-child { |
111 | padding-left: 0; | 111 | padding-left: 0; |
112 | } | 112 | } |
113 | + | ||
114 | +.nodataimg{ | ||
115 | + width:124rpx; | ||
116 | + height:249rpx; | ||
117 | + font-size: 0; | ||
118 | + margin:350rpx auto 0; | ||
119 | +} | ||
120 | +.nodataimg image{ | ||
121 | + width:100%; | ||
122 | + height:100%; | ||
123 | +} | ||
124 | + | ||
125 | +.cannodataimg{ | ||
126 | + width:124rpx; | ||
127 | + height:249rpx; | ||
128 | + font-size: 0; | ||
129 | + margin:73rpx auto 0; | ||
130 | +} | ||
131 | +.cannodataimg image{ | ||
132 | + width:100%; | ||
133 | + height:100%; | ||
134 | +} |
@@ -10,7 +10,7 @@ Page({ | @@ -10,7 +10,7 @@ Page({ | ||
10 | 'http://winesbook.cn/static/images_mini/aicon_60@2x.png' | 10 | 'http://winesbook.cn/static/images_mini/aicon_60@2x.png' |
11 | ], | 11 | ], |
12 | indicatorDots: false, | 12 | indicatorDots: false, |
13 | - autoplay: false, | 13 | + autoplay: true, |
14 | interval: 2000, | 14 | interval: 2000, |
15 | duration: 1000, | 15 | duration: 1000, |
16 | currentSwiper: 0, | 16 | currentSwiper: 0, |
@@ -23,9 +23,13 @@ Page({ | @@ -23,9 +23,13 @@ Page({ | ||
23 | * 生命周期函数--监听页面加载 | 23 | * 生命周期函数--监听页面加载 |
24 | */ | 24 | */ |
25 | onLoad: function (options) { | 25 | onLoad: function (options) { |
26 | - this.setData({ | ||
27 | - url: app.globalData.url | ||
28 | - }) | 26 | + let that=this; |
27 | + setTimeout(function(){ | ||
28 | + that.setData({ | ||
29 | + url: app.globalData.url | ||
30 | + }) | ||
31 | + },1000) | ||
32 | + | ||
29 | 33 | ||
30 | 34 | ||
31 | }, | 35 | }, |
@@ -168,6 +172,7 @@ Page({ | @@ -168,6 +172,7 @@ Page({ | ||
168 | } | 172 | } |
169 | 173 | ||
170 | }, | 174 | }, |
175 | + | ||
171 | /** | 176 | /** |
172 | * 生命周期函数--监听页面初次渲染完成 | 177 | * 生命周期函数--监听页面初次渲染完成 |
173 | */ | 178 | */ |
@@ -214,6 +219,7 @@ Page({ | @@ -214,6 +219,7 @@ Page({ | ||
214 | * 用户点击右上角分享 | 219 | * 用户点击右上角分享 |
215 | */ | 220 | */ |
216 | onShareAppMessage: function (e) { | 221 | onShareAppMessage: function (e) { |
222 | + console.log(9090) | ||
217 | let that = this; | 223 | let that = this; |
218 | console.log(e) | 224 | console.log(e) |
219 | let id=e.target.dataset.id; | 225 | let id=e.target.dataset.id; |
1 | <view class="swiper_image"> | 1 | <view class="swiper_image"> |
2 | - <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" class="swiper_item_img" bindchange="swiperChange"> | 2 | + <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" class="swiper_item_img" bindchange="swiperChange" circular="true"> |
3 | <block wx:for="{{imgUrls}}" wx:key="doct"> | 3 | <block wx:for="{{imgUrls}}" wx:key="doct"> |
4 | - <swiper-item > | ||
5 | - <image src="{{item.image}}" data-index='{{index}}' class="slide-image" width="355" height="150" /> | 4 | + <swiper-item> |
5 | + <image src="{{item.image}}" data-index='{{index}}' class="slide-image" width="355" height="150" /> | ||
6 | </swiper-item> | 6 | </swiper-item> |
7 | </block> | 7 | </block> |
8 | </swiper> | 8 | </swiper> |
@@ -18,10 +18,10 @@ | @@ -18,10 +18,10 @@ | ||
18 | <view class="middlehead" bindtap="everyjiu"> | 18 | <view class="middlehead" bindtap="everyjiu"> |
19 | <view class="rilihead"> | 19 | <view class="rilihead"> |
20 | <view class="rili"> | 20 | <view class="rili"> |
21 | - <image src="{{url}}aicon_62x.png"></image> | 21 | + <image src="{{url}}aicon_62x.png" mode="aspectFit"></image> |
22 | </view> | 22 | </view> |
23 | <view class="every"> | 23 | <view class="every"> |
24 | - <image src="{{url}}aicon_63x.png"></image> | 24 | + <image src="{{url}}aicon_63x.png" mode="aspectFit"></image> |
25 | </view> | 25 | </view> |
26 | </view> | 26 | </view> |
27 | 27 | ||
@@ -34,22 +34,22 @@ | @@ -34,22 +34,22 @@ | ||
34 | 34 | ||
35 | </view> | 35 | </view> |
36 | <view class="dayjiu" bindtap="everyjiu"> | 36 | <view class="dayjiu" bindtap="everyjiu"> |
37 | -<view class="tast" wx:for="{{news}}" wx:key='' catchtap="jumpnewdetail" data-id="{{item.wine_id}}"> | ||
38 | - <view class="tastimg"> | ||
39 | - <image src="{{item.thumb}}"></image> | ||
40 | - </view> | 37 | + <view class="tast" wx:for="{{news}}" wx:key='' catchtap="jumpnewdetail" data-id="{{item.wine_id}}"> |
38 | + <view class="tastimg"> | ||
39 | + <image src="{{item.thumb}}"></image> | ||
40 | + </view> | ||
41 | 41 | ||
42 | - <view class="tastcontent"> | ||
43 | - <view class="tasttitle">{{item.title}}</view> | ||
44 | - <view class="tasttext">{{item.description}}</view> | ||
45 | - </view> | 42 | + <view class="tastcontent"> |
43 | + <view class="tasttitle">{{item.title}}</view> | ||
44 | + <view class="tasttext">{{item.description}}</view> | ||
45 | + </view> | ||
46 | 46 | ||
47 | -</view> | 47 | + </view> |
48 | </view> | 48 | </view> |
49 | 49 | ||
50 | 50 | ||
51 | -<view class="wineblock" wx:for="{{list}}" wx:key="" bindtap="jump" data-type="{{item.type}}" data-id="{{item.id}}"> | ||
52 | - <view class="middlehead"> | 51 | +<view class="wineblock" wx:for="{{list}}" wx:key=""> |
52 | + <view class="middlehead" bindtap="jump" data-type="{{item.type}}" data-id="{{item.id}}"> | ||
53 | <view class="rilihead"> | 53 | <view class="rilihead"> |
54 | <view class="rili"> | 54 | <view class="rili"> |
55 | <image src="{{item.icon}}" mode="aspectFit"></image> | 55 | <image src="{{item.icon}}" mode="aspectFit"></image> |
@@ -67,18 +67,18 @@ | @@ -67,18 +67,18 @@ | ||
67 | </view> | 67 | </view> |
68 | 68 | ||
69 | </view> | 69 | </view> |
70 | - <view class="winetitle" catchtap='enterdetail' data-id="{{item.article.id}}" data-type="{{item.type}}">{{item.article.share_content}}</view> | 70 | + <view class="winetitle" bindtap='enterdetail' data-id="{{item.article.id}}" data-type="{{item.type}}" data-winemaker_id="{{item.article.winemaker_id}}">{{item.article.title}}</view> |
71 | + | ||
71 | 72 | ||
72 | 73 | ||
73 | - | ||
74 | - <view class="wineimg" wx:if="{{item.type==2}}" data-url="{{item.article.video}}" catchtap='entervideo' catchtap='enterdetail' data-id="{{item.article.id}}" data-type="{{item.type}}"> | 74 | + <view class="wineimg" wx:if="{{item.type==2}}" data-url="{{item.article.video}}" catchtap='entervideo' bindtap='enterdetail' data-id="{{item.article.id}}" data-type="{{item.type}}"> |
75 | <image src="{{item.article.video_image}}"></image> | 75 | <image src="{{item.article.video_image}}"></image> |
76 | 76 | ||
77 | <view class="vioimg"> | 77 | <view class="vioimg"> |
78 | - <image src="{{url}}/aicon_70x.png"></image> | 78 | + <image src="{{url}}/aicon_70x.png"></image> |
79 | </view> | 79 | </view> |
80 | </view> | 80 | </view> |
81 | - <view class="wineimg" wx:else catchtap='enterdetail' data-id="{{item.article.id}}" data-type="{{item.type}}" data-winemaker_id="{{item.article.winemaker_id}}"> | 81 | + <view class="wineimg" wx:else bindtap='enterdetail' data-id="{{item.article.id}}" data-type="{{item.type}}" data-winemaker_id="{{item.article.winemaker_id}}"> |
82 | <image src="{{item.article.thumb}}"></image> | 82 | <image src="{{item.article.thumb}}"></image> |
83 | </view> | 83 | </view> |
84 | 84 | ||
@@ -95,8 +95,8 @@ | @@ -95,8 +95,8 @@ | ||
95 | <view class="winerighttou"> | 95 | <view class="winerighttou"> |
96 | <view class="winerighttouimg" catchtap='dianzan' data-userid="{{item.article.user_id}}" data-type="{{item.type}}" data-id="{{item.article.id}}" data-winemaker_id="{{item.article.winemaker_id}}"> | 96 | <view class="winerighttouimg" catchtap='dianzan' data-userid="{{item.article.user_id}}" data-type="{{item.type}}" data-id="{{item.article.id}}" data-winemaker_id="{{item.article.winemaker_id}}"> |
97 | <image src="{{url}}aicon_71x.png" wx:if="{{item.article.is_good==1}}"></image> | 97 | <image src="{{url}}aicon_71x.png" wx:if="{{item.article.is_good==1}}"></image> |
98 | - <image src="{{url}}aicon_66x.png"wx:else></image> | ||
99 | - | 98 | + <image src="{{url}}aicon_66x.png" wx:else></image> |
99 | + | ||
100 | </view> | 100 | </view> |
101 | <view class="winezan">{{item.article.good_count}}</view> | 101 | <view class="winezan">{{item.article.good_count}}</view> |
102 | </view> | 102 | </view> |
@@ -110,9 +110,9 @@ | @@ -110,9 +110,9 @@ | ||
110 | <view class="winerighttou"> | 110 | <view class="winerighttou"> |
111 | <view class="winerighttouimg" catchtap='share'> | 111 | <view class="winerighttouimg" catchtap='share'> |
112 | <image src="{{url}}aicon_68x.png"></image> | 112 | <image src="{{url}}aicon_68x.png"></image> |
113 | - <button class="lj_share" bindtap="buildshare" open-type='share' data-id="{{item.article.id}}" data-type="{{item.type}}" data-winemaker_id="{{item.article.winemaker_id}}"></button> | 113 | + <button class="lj_share" bindtap="buildshare" open-type='share' data-id="{{item.article.id}}" data-type="{{item.type}}" data-winemaker_id="{{item.article.winemaker_id}}"></button> |
114 | </view> | 114 | </view> |
115 | - | 115 | + |
116 | 116 | ||
117 | </view> | 117 | </view> |
118 | </view> | 118 | </view> |
@@ -191,10 +191,15 @@ image{ | @@ -191,10 +191,15 @@ image{ | ||
191 | justify-content: space-around | 191 | justify-content: space-around |
192 | } | 192 | } |
193 | .winerighttouimg{ | 193 | .winerighttouimg{ |
194 | - width:30rpx; | 194 | + width:60rpx; |
195 | height:28rpx; | 195 | height:28rpx; |
196 | font-size: 0; | 196 | font-size: 0; |
197 | position:relative; | 197 | position:relative; |
198 | + text-align: center | ||
199 | +} | ||
200 | +.winerighttouimg image{ | ||
201 | + width:30rpx; | ||
202 | + margin:0 auto; | ||
198 | } | 203 | } |
199 | .lj_share{ | 204 | .lj_share{ |
200 | width:60rpx; | 205 | width:60rpx; |
@@ -215,7 +220,7 @@ button::after{ | @@ -215,7 +220,7 @@ button::after{ | ||
215 | align-items: center | 220 | align-items: center |
216 | } | 221 | } |
217 | .wineeng{ | 222 | .wineeng{ |
218 | - color:#666666; | 223 | + color:#666666; |
219 | font-size: 28rpx; | 224 | font-size: 28rpx; |
220 | margin-left: 20rpx; | 225 | margin-left: 20rpx; |
221 | } | 226 | } |
@@ -223,6 +228,9 @@ button::after{ | @@ -223,6 +228,9 @@ button::after{ | ||
223 | color:#666666; | 228 | color:#666666; |
224 | font-size:28rpx; | 229 | font-size:28rpx; |
225 | margin-left:10rpx; | 230 | margin-left:10rpx; |
231 | + /* height:28rpx; | ||
232 | + line-height:28rpx; */ | ||
233 | + margin-top:1rpx; | ||
226 | } | 234 | } |
227 | .wineblock{ | 235 | .wineblock{ |
228 | border-bottom: 14rpx solid #F2F2F2; | 236 | border-bottom: 14rpx solid #F2F2F2; |
@@ -148,6 +148,15 @@ Page({ | @@ -148,6 +148,15 @@ Page({ | ||
148 | 148 | ||
149 | }) | 149 | }) |
150 | }, | 150 | }, |
151 | + | ||
152 | + jumpbrand(e) { | ||
153 | + let id = e.currentTarget.dataset.id | ||
154 | + wx.navigateTo({ | ||
155 | + url: '/pages/homeblock/jiuzidian/jiuzidian?id=' + id, | ||
156 | + }) | ||
157 | + | ||
158 | + | ||
159 | + }, | ||
151 | 160 | ||
152 | /** | 161 | /** |
153 | * 生命周期函数--监听页面初次渲染完成 | 162 | * 生命周期函数--监听页面初次渲染完成 |
@@ -160,6 +169,10 @@ Page({ | @@ -160,6 +169,10 @@ Page({ | ||
160 | * 生命周期函数--监听页面显示 | 169 | * 生命周期函数--监听页面显示 |
161 | */ | 170 | */ |
162 | onShow: function () { | 171 | onShow: function () { |
172 | + this.setData({ | ||
173 | + page:1, | ||
174 | + rec_list:[] | ||
175 | + }) | ||
163 | this.getjiudandetail() | 176 | this.getjiudandetail() |
164 | }, | 177 | }, |
165 | 178 |
@@ -18,27 +18,27 @@ | @@ -18,27 +18,27 @@ | ||
18 | <view class="jiudanfenitem"> | 18 | <view class="jiudanfenitem"> |
19 | <view class="jiudanfenimg" bindtap="collect" data-id="{{info.user_id}}"> | 19 | <view class="jiudanfenimg" bindtap="collect" data-id="{{info.user_id}}"> |
20 | <image src="{{url}}/aicon_10x.png" wx:if="{{info.is_favorite==1}}"></image> | 20 | <image src="{{url}}/aicon_10x.png" wx:if="{{info.is_favorite==1}}"></image> |
21 | - <image src="{{url}}/aicon_09x.png" wx:else></image> | 21 | + <image src="{{url}}aicon_09x.png" wx:else></image> |
22 | </view> | 22 | </view> |
23 | <view class="collect">收藏</view> | 23 | <view class="collect">收藏</view> |
24 | </view> | 24 | </view> |
25 | <view class="jiudanfenitem"> | 25 | <view class="jiudanfenitem"> |
26 | <view class="jiudanfenimg zhuan"> | 26 | <view class="jiudanfenimg zhuan"> |
27 | - <image src="{{url}}/aicon_68x.png"></image> | 27 | + <image src="{{url}}aicon_68x.png"></image> |
28 | <button class="lj_share" catchtap="buildshare" open-type='share'></button> | 28 | <button class="lj_share" catchtap="buildshare" open-type='share'></button> |
29 | </view> | 29 | </view> |
30 | <view class="collect">转发</view> | 30 | <view class="collect">转发</view> |
31 | </view> | 31 | </view> |
32 | <view class="jiudanfenitem" bindtap="pinglun" data-id="{{info.id}}"> | 32 | <view class="jiudanfenitem" bindtap="pinglun" data-id="{{info.id}}"> |
33 | <view class="jiudanfenimg"> | 33 | <view class="jiudanfenimg"> |
34 | - <image src="{{url}}/aicon_67x.png"></image> | 34 | + <image src="{{url}}aicon_67x.png"></image> |
35 | </view> | 35 | </view> |
36 | <view class="collect">{{info.comment_count}}</view> | 36 | <view class="collect">{{info.comment_count}}</view> |
37 | </view> | 37 | </view> |
38 | <view class="jiudanfenitem" bindtap="dianzan" data-id="{{info.user_id}}"> | 38 | <view class="jiudanfenitem" bindtap="dianzan" data-id="{{info.user_id}}"> |
39 | <view class="jiudanfenimg"> | 39 | <view class="jiudanfenimg"> |
40 | - <image src="{{url}}/aicon_46x.png" wx:if="{{info.is_good==1}}"></image> | ||
41 | - <image src="{{url}}/aicon_47x.png" wx:else></image> | 40 | + <image src="{{url}}aicon_46x.png" wx:if="{{info.is_good==1}}"></image> |
41 | + <image src="{{url}}aicon_47x.png" wx:else></image> | ||
42 | 42 | ||
43 | </view> | 43 | </view> |
44 | <view class="collect">{{info.good_count}}</view> | 44 | <view class="collect">{{info.good_count}}</view> |
@@ -50,7 +50,11 @@ | @@ -50,7 +50,11 @@ | ||
50 | 50 | ||
51 | <view class="jiupin" > | 51 | <view class="jiupin" > |
52 | 52 | ||
53 | - <view class="searchitem" wx:for="{{rec_list}}" wx:key=''> | 53 | + <view class="nodataimg" wx:if="{{rec_list.length==0}}"> |
54 | +<image src="/img/wushuju.png"></image> | ||
55 | +</view> | ||
56 | + | ||
57 | + <view class="searchitem" wx:for="{{rec_list}}" wx:key='' bindtap="jumpbrand" data-id="{{item.id}}"> | ||
54 | <view class="searchitemleft"> | 58 | <view class="searchitemleft"> |
55 | <view class="itemleftimg"> | 59 | <view class="itemleftimg"> |
56 | <image src="{{item.logo}}"></image> | 60 | <image src="{{item.logo}}"></image> |
@@ -166,6 +166,7 @@ Page({ | @@ -166,6 +166,7 @@ Page({ | ||
166 | }, | 166 | }, |
167 | //进入详情页 | 167 | //进入详情页 |
168 | detail(e){ | 168 | detail(e){ |
169 | + console.log(9090) | ||
169 | let id=e.currentTarget.dataset.id; | 170 | let id=e.currentTarget.dataset.id; |
170 | wx.navigateTo({ | 171 | wx.navigateTo({ |
171 | url: '/pages/findblock/jiudandetail/jiudandetail?id='+id, | 172 | url: '/pages/findblock/jiudandetail/jiudandetail?id='+id, |
1 | +<view class="nodataimg" wx:if="{{peoplelist.length==0}}"> | ||
2 | +<image src="/img/wushuju.png"></image> | ||
3 | +</view> | ||
4 | + | ||
5 | +<block wx:else> | ||
1 | <view class="wineblock" wx:for="{{peoplelist}}" wx:key=''> | 6 | <view class="wineblock" wx:for="{{peoplelist}}" wx:key=''> |
2 | -<view class="date">{{item.date}}</view> | ||
3 | -<view class='wine_list' > | ||
4 | - <view class='list_item' wx:for="{{item.list}}" wx:key="" bindtap="detail" data-id="{{item.id}}"> | ||
5 | - <view class='img_box'> | ||
6 | - <image src='{{item.avatar}}'></image> | ||
7 | - </view> | ||
8 | - <view class='wine_title'>{{item.title}}</view> | ||
9 | - <view class='wine_name'>{{item.user_nickname}}</view> | ||
10 | - <view class='wine_leavel'>lv{{item.level}}</view> | ||
11 | - <view class='action_box'> | ||
12 | - <view class='single_action' catchtap="zan" data-id="{{item.user_id}}"> | ||
13 | - <view class='zan_icon'> | ||
14 | - <image src='/img/aicon_46.png' mode='widthFix' wx:if="{{item.is_good==1}}"></image> | ||
15 | - <image src='/img/aicon_47.png' mode='widthFix' wx:else></image> | 7 | + <view class="date">{{item.date}}</view> |
8 | + <view class='wine_list'> | ||
9 | + <view class='list_item' wx:for="{{item.list}}" wx:key=""> | ||
10 | + | ||
11 | + <view class="tou" bindtap="detail" data-id="{{item.id}}"> | ||
12 | + <view class='img_box'> | ||
13 | + <image src='{{item.avatar}}'></image> | ||
16 | </view> | 14 | </view> |
17 | - {{item.good_count}} | 15 | + <!-- <view class='wine_title'>{{item.title}}</view> --> |
16 | + <view class='wine_name'>{{item.user_nickname}}</view> | ||
17 | + <view class='wine_leavel'>lv{{item.level}}</view> | ||
18 | </view> | 18 | </view> |
19 | - <view class='single_action' catchtap="pinglun" data-id="{{item.id}}"> | ||
20 | - <view class='zan_icon'> | ||
21 | - <image src='/img/aicon_67.png' mode='widthFix'></image> | 19 | + |
20 | + <view class='action_box'> | ||
21 | + <view class='single_action' catchtap="zan" data-id="{{item.user_id}}"> | ||
22 | + <view class='zan_icon'> | ||
23 | + <image src='/img/aicon_46.png' mode='widthFix' wx:if="{{item.is_good==1}}"></image> | ||
24 | + <image src='/img/aicon_47.png' mode='widthFix' wx:else></image> | ||
25 | + </view> | ||
26 | + {{item.good_count}} | ||
22 | </view> | 27 | </view> |
23 | - {{item.comment_count}} | ||
24 | - </view> | ||
25 | - <view class='single_action {{item.choose?"active":""}}' catchtap='shareAction' data-id="{{item.id}}"> | ||
26 | - <image src='/img/gengduo.png' mode='widthFix' class='moreIcon'></image> | ||
27 | - <view class='min_action_box'> | ||
28 | - <view class='action_btn' wx:if="{{item.is_favorite==0}}" catchtap="collect" data-id="{{item.user_id}}">收藏</view> | ||
29 | - <view class='action_btn yishou' wx:else catchtap="collect" data-id="{{item.user_id}}">已收藏</view> | 28 | + <view class='single_action' catchtap="pinglun" data-id="{{item.id}}"> |
29 | + <view class='zan_icon'> | ||
30 | + <image src='/img/aicon_67.png' mode='widthFix'></image> | ||
31 | + </view> | ||
32 | + {{item.comment_count}} | ||
33 | + </view> | ||
34 | + <view class='single_action {{item.choose?"active":""}}' catchtap='shareAction' data-id="{{item.id}}"> | ||
35 | + <image src='/img/gengduo.png' mode='widthFix' class='moreIcon'></image> | ||
36 | + <view class='min_action_box'> | ||
37 | + <view class='action_btn' wx:if="{{item.is_favorite==0}}" catchtap="collect" data-id="{{item.user_id}}">收藏</view> | ||
38 | + <view class='action_btn yishou' wx:else catchtap="collect" data-id="{{item.user_id}}">已收藏</view> | ||
30 | 39 | ||
31 | - <view class='action_btn'>分享</view> | ||
32 | - <button class="lj_share" catchtap="buildshare" open-type='share' data-id="{{item.id}}" ></button> | ||
33 | - </view> | 40 | + <view class='action_btn'>分享</view> |
41 | + <button class="lj_share" catchtap="buildshare" open-type='share' data-id="{{item.id}}"></button> | ||
42 | + </view> | ||
43 | + </view> | ||
34 | </view> | 44 | </view> |
35 | </view> | 45 | </view> |
46 | + | ||
36 | </view> | 47 | </view> |
37 | - | ||
38 | -</view> | ||
39 | 48 | ||
40 | </view> | 49 | </view> |
50 | +</block> |
@@ -71,7 +71,7 @@ page{ | @@ -71,7 +71,7 @@ page{ | ||
71 | margin-right: 10rpx; | 71 | margin-right: 10rpx; |
72 | } | 72 | } |
73 | .moreIcon{ | 73 | .moreIcon{ |
74 | - width: 4rpx; | 74 | + width: 5rpx; |
75 | } | 75 | } |
76 | .min_action_box{ | 76 | .min_action_box{ |
77 | width: 134rpx; | 77 | width: 134rpx; |
@@ -141,4 +141,9 @@ button::after{ | @@ -141,4 +141,9 @@ button::after{ | ||
141 | border:none; | 141 | border:none; |
142 | outline: none; | 142 | outline: none; |
143 | background: transparent | 143 | background: transparent |
144 | +} | ||
145 | +.tou{ | ||
146 | + display:flex; | ||
147 | + flex-direction: column; | ||
148 | + align-items: center | ||
144 | } | 149 | } |
1 | +<view class="nodataimg" wx:if="{{winelist.length==0}}"> | ||
2 | + <image src="/img/wushuju.png"></image> | ||
3 | +</view> | ||
4 | + | ||
5 | +<block wx:else> | ||
1 | <view class="jiupin" wx:for="{{winelist}}" wx:key=''> | 6 | <view class="jiupin" wx:for="{{winelist}}" wx:key=''> |
2 | 7 | ||
3 | <view class="date">{{item.date}}</view> | 8 | <view class="date">{{item.date}}</view> |
4 | 9 | ||
5 | - <view class="searchitem" wx:for="{{item.list}}" wx:key="" bindtap="jump" data-id="{{item.wine_id}}"> | ||
6 | - <view class="searchitemleft"> | 10 | + <view class="searchitem" wx:for="{{item.list}}" wx:key="" > |
11 | + <view class="searchitemleft" bindtap="jump" data-id="{{item.wine_id}}"> | ||
7 | <view class="itemleftimg"> | 12 | <view class="itemleftimg"> |
8 | <image src="{{item.thumb}}"></image> | 13 | <image src="{{item.thumb}}"></image> |
9 | </view> | 14 | </view> |
@@ -19,12 +24,14 @@ | @@ -19,12 +24,14 @@ | ||
19 | </view> | 24 | </view> |
20 | </view> | 25 | </view> |
21 | 26 | ||
22 | - <view class="starimg" catchtap="collect" data-id="{{item.wine_id}}"> | 27 | + <view class="searchitemright" bindtap="collect" data-id="{{item.wine_id}}"> |
28 | + | ||
29 | + <view class="starimg"> | ||
23 | <image src="{{url}}aicon_10x.png" wx:if="{{item.is_favorite==1}}"></image> | 30 | <image src="{{url}}aicon_10x.png" wx:if="{{item.is_favorite==1}}"></image> |
24 | <image src="{{url}}aicon_09x.png" wx:else></image> | 31 | <image src="{{url}}aicon_09x.png" wx:else></image> |
25 | - | ||
26 | </view> | 32 | </view> |
27 | - | 33 | + </view> |
28 | </view> | 34 | </view> |
29 | 35 | ||
30 | -</view> | ||
36 | +</view> | ||
37 | +</block> |
@@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
7 | border-bottom: 1rpx solid #f5f5f5; | 7 | border-bottom: 1rpx solid #f5f5f5; |
8 | } | 8 | } |
9 | .searchitemleft{ | 9 | .searchitemleft{ |
10 | + width:670rpx; | ||
10 | display:flex; | 11 | display:flex; |
11 | align-items: center | 12 | align-items: center |
12 | } | 13 | } |
@@ -76,4 +77,10 @@ | @@ -76,4 +77,10 @@ | ||
76 | padding: 11rpx 32rpx; | 77 | padding: 11rpx 32rpx; |
77 | box-sizing: border-box; | 78 | box-sizing: border-box; |
78 | background: #F2F2F2 | 79 | background: #F2F2F2 |
80 | + } | ||
81 | + .searchitemright{ | ||
82 | + display: flex; | ||
83 | + align-items: center; | ||
84 | + justify-content: center; | ||
85 | + flex:1; | ||
79 | } | 86 | } |
1 | -<view class="niangjiulist"> | ||
2 | - <view class="niangjiuitem" wx:for="{{list}}" wx:key="" bindtap="niangjiuteacherdetail" data-id="{{item.winemaker_id}}"> | ||
3 | - <view class="teachimg"> | ||
4 | - <image src="{{item.avatar}}"></image> | 1 | + |
2 | +<view class="nodataimg" wx:if="{{list.length==0}}"> | ||
3 | +<image src="/img/wushuju.png"></image> | ||
4 | +</view> | ||
5 | + | ||
6 | +<view class="niangjiulist" wx:else> | ||
7 | + <view class="niangjiuitem" wx:for="{{list}}" wx:key="" > | ||
8 | + | ||
9 | + <view bindtap="niangjiuteacherdetail" data-id="{{item.winemaker_id}}"> | ||
10 | + <view class="teachimg"> | ||
11 | + <image src="{{item.avatar}}"></image> | ||
12 | + </view> | ||
13 | + <view class="jiuname">{{item.name}}</view> | ||
14 | + | ||
15 | + <view class="atten" wx:if="{{item.is_concern==0}}" catchtap="atten" data-id="{{item.winemaker_id}}">关注</view> | ||
16 | + <view class="atten aten1" wx:else catchtap="atten" data-id="{{item.winemaker_id}}">取消关注</view> | ||
17 | + | ||
18 | + </view> | ||
19 | + | ||
20 | + | ||
21 | + <view class="jiubottom"> | ||
22 | + <view class="jiuleft"> | ||
23 | + <view class="jiuleftimg" catchtap="zan" data-id="{{item.winemaker_id}}"> | ||
24 | + <image src="{{url}}/aicon_47x.png" wx:if="{{item.is_good==0}}"></image> | ||
25 | + <image src="{{url}}/aicon_46x.png" wx:else></image> | ||
5 | </view> | 26 | </view> |
6 | - <view class="jiuname">{{item.name}}</view> | ||
7 | - | ||
8 | - <view class="atten" wx:if="{{item.is_concern==0}}" catchtap="atten" data-id="{{item.winemaker_id}}">关注</view> | ||
9 | - <view class="atten aten1" wx:else catchtap="atten" data-id="{{item.winemaker_id}}">取消关注</view> | ||
10 | - | ||
11 | - <view class="jiubottom"> | ||
12 | - <view class="jiuleft"> | ||
13 | - <view class="jiuleftimg" catchtap="zan" data-id="{{item.winemaker_id}}"> | ||
14 | - <image src="{{url}}/aicon_47x.png" wx:if="{{item.is_good==0}}"></image> | ||
15 | - <image src="{{url}}/aicon_46x.png" wx:else></image> | ||
16 | - </view> | ||
17 | - <view class="jiuzan">{{item.good_count}}</view> | ||
18 | - </view> | ||
19 | - | ||
20 | - <view class="jiumiddle" catchtap="ping" data-id="{{item.winemaker_id}}"> | ||
21 | - <view class="middleimg"> | ||
22 | - <image src="{{url}}/aicon_67x.png"></image> | ||
23 | - </view> | ||
24 | - <view class="tiao">{{item.comment_count}}</view> | ||
25 | - </view> | ||
26 | - | ||
27 | - <view class="jiuright"> | ||
28 | - <image src="{{url}}/aicon_68x.png"></image> | ||
29 | - <button class="lj_share" bindtap="buildshare" open-type='share' data-id="{{item.winemaker_id}}" ></button> | ||
30 | - </view> | 27 | + <view class="jiuzan">{{item.good_count}}</view> |
28 | + </view> | ||
29 | + | ||
30 | + <view class="jiumiddle" catchtap="ping" data-id="{{item.winemaker_id}}"> | ||
31 | + <view class="middleimg"> | ||
32 | + <image src="{{url}}/aicon_67x.png"></image> | ||
31 | </view> | 33 | </view> |
34 | + <view class="tiao">{{item.comment_count}}</view> | ||
35 | + </view> | ||
36 | + | ||
37 | + <view class="jiuright"> | ||
38 | + <image src="{{url}}/aicon_68x.png"></image> | ||
39 | + <button class="lj_share" bindtap="buildshare" open-type='share' data-id="{{item.winemaker_id}}"></button> | ||
40 | + </view> | ||
32 | </view> | 41 | </view> |
33 | - | ||
34 | -</view> | 42 | + </view> |
43 | + | ||
44 | +</view> |
@@ -63,17 +63,20 @@ Page({ | @@ -63,17 +63,20 @@ Page({ | ||
63 | 63 | ||
64 | let newlist=that.data.list; | 64 | let newlist=that.data.list; |
65 | for(var obj of newlist){ | 65 | for(var obj of newlist){ |
66 | - if (obj.is_good==0){ | ||
67 | - obj.is_good=1; | ||
68 | - obj.good_count = obj.good_count+1 | ||
69 | - }else{ | ||
70 | - obj.is_good=0; | ||
71 | - if (obj.good_count==0){ | ||
72 | - obj.obj.good_count=0 | ||
73 | - }else{ | ||
74 | - obj.good_count = obj.good_count-1 | 66 | + if(obj.id==id){ |
67 | + if (obj.is_good == 0) { | ||
68 | + obj.is_good = 1; | ||
69 | + obj.good_count = obj.good_count + 1 | ||
70 | + } else { | ||
71 | + obj.is_good = 0; | ||
72 | + if (obj.good_count == 0) { | ||
73 | + obj.obj.good_count = 0 | ||
74 | + } else { | ||
75 | + obj.good_count = obj.good_count - 1 | ||
76 | + } | ||
75 | } | 77 | } |
76 | } | 78 | } |
79 | + | ||
77 | } | 80 | } |
78 | 81 | ||
79 | that.setData({ | 82 | that.setData({ |
1 | +<view class="nodataimg" wx:if="{{list.length==0}}"> | ||
2 | +<image src="/img/wushuju.png"></image> | ||
3 | +</view> | ||
1 | 4 | ||
2 | -<view class="nodata" wx:if="{{list.length==0}}" class="nodata">暂无数据</view> | ||
3 | <block wx:else> | 5 | <block wx:else> |
4 | <view class="wineblock" wx:for="{{list}}" wx:key='' bindtap="detail" data-id="{{item.id}}"> | 6 | <view class="wineblock" wx:for="{{list}}" wx:key='' bindtap="detail" data-id="{{item.id}}"> |
5 | 7 |
@@ -128,11 +128,11 @@ image{ | @@ -128,11 +128,11 @@ image{ | ||
128 | } | 128 | } |
129 | 129 | ||
130 | .lj_share{ | 130 | .lj_share{ |
131 | - width:20rpx; | 131 | + width:100rpx; |
132 | height:30rpx; | 132 | height:30rpx; |
133 | border:none; | 133 | border:none; |
134 | position: absolute; | 134 | position: absolute; |
135 | - right:0; | 135 | + right:-52rpx; |
136 | top:0; | 136 | top:0; |
137 | background: transparent | 137 | background: transparent |
138 | 138 |
1 | -<view class="wineblock" wx:for="{{list}}" wx:key='' bindtap="detail" data-id="{{item.id}}"> | 1 | +<!-- <view class="wineblock" wx:for="{{list}}" wx:key='' bindtap="detail" data-id="{{item.id}}"> |
2 | <view class="winetitle">{{item.title}}</view> | 2 | <view class="winetitle">{{item.title}}</view> |
3 | <view class="wineimg" catchtap="entervideo" data-url="{{item.video}}"> | 3 | <view class="wineimg" catchtap="entervideo" data-url="{{item.video}}"> |
4 | <image src="{{item.video_image}}"></image> | 4 | <image src="{{item.video_image}}"></image> |
@@ -25,13 +25,22 @@ | @@ -25,13 +25,22 @@ | ||
25 | </view> | 25 | </view> |
26 | </view> | 26 | </view> |
27 | </view> | 27 | </view> |
28 | +</view> --> | ||
29 | + | ||
30 | +<view class="nodataimg" wx:if="{{list.length==0}}"> | ||
31 | +<image src="/img/wushuju.png"></image> | ||
28 | </view> | 32 | </view> |
29 | -<view class="wineblock"> | ||
30 | 33 | ||
31 | - <view class="winetitle">浓香酒酿酒大师:沈才宏</view> | 34 | +<block wx:else> |
35 | +<view class="wineblock" wx:for="{{list}}" wx:key='' bindtap="detail" data-id="{{item.id}}"> | ||
36 | + | ||
37 | + <view class="winetitle">{{item.title}}</view> | ||
32 | 38 | ||
33 | - <view class="wineimg"> | ||
34 | - <image src="{{url}}aicon_64.png"></image> | 39 | + <view class="wineimg" catchtap="entervideo" data-url="{{item.video}}"> |
40 | + <image src="{{item.video_image}}"></image> | ||
41 | + <view class="vimg"> | ||
42 | + <image src="{{url}}/aicon_70x.png"></image> | ||
43 | + </view> | ||
35 | </view> | 44 | </view> |
36 | 45 | ||
37 | <view class="winebottom"> | 46 | <view class="winebottom"> |
@@ -69,3 +78,4 @@ | @@ -69,3 +78,4 @@ | ||
69 | </view> | 78 | </view> |
70 | 79 | ||
71 | </view> | 80 | </view> |
81 | +</block> |
1 | .winetitle{ | 1 | .winetitle{ |
2 | color:#1A1A1A; | 2 | color:#1A1A1A; |
3 | font-size: 28rpx; | 3 | font-size: 28rpx; |
4 | - margin-left:36rpx; | 4 | + /* margin-left:36rpx; */ |
5 | + padding: 0 36rpx; | ||
6 | + box-sizing: border-box; | ||
5 | font-weight: bold | 7 | font-weight: bold |
6 | } | 8 | } |
7 | .wineimg{ | 9 | .wineimg{ |
@@ -14,6 +16,8 @@ | @@ -14,6 +16,8 @@ | ||
14 | display:flex; | 16 | display:flex; |
15 | justify-content: space-between; | 17 | justify-content: space-between; |
16 | align-items: center; | 18 | align-items: center; |
19 | + | ||
20 | + padding: 0 30rpx; | ||
17 | box-sizing: border-box; | 21 | box-sizing: border-box; |
18 | margin-top:30rpx; | 22 | margin-top:30rpx; |
19 | } | 23 | } |
@@ -40,10 +44,14 @@ | @@ -40,10 +44,14 @@ | ||
40 | justify-content: space-between | 44 | justify-content: space-between |
41 | } | 45 | } |
42 | .winerighttouimg{ | 46 | .winerighttouimg{ |
43 | - width:30rpx; | 47 | + width:60rpx; |
44 | height:28rpx; | 48 | height:28rpx; |
45 | font-size: 0; | 49 | font-size: 0; |
46 | - position: relative | 50 | + position: relative; |
51 | + text-align: center | ||
52 | +} | ||
53 | +.winerighttouimg image{ | ||
54 | + width:30rpx; | ||
47 | } | 55 | } |
48 | .winerighttou{ | 56 | .winerighttou{ |
49 | display:flex; | 57 | display:flex; |
@@ -138,10 +138,11 @@ Page({ | @@ -138,10 +138,11 @@ Page({ | ||
138 | }, | 138 | }, |
139 | send(e){ | 139 | send(e){ |
140 | let that=this; | 140 | let that=this; |
141 | - let content=e.detail.value; | ||
142 | - if(content==''){ | 141 | + |
142 | + if(that.data.content==''){ | ||
143 | wx.showToast({ | 143 | wx.showToast({ |
144 | title: '请输入评论内容', | 144 | title: '请输入评论内容', |
145 | + icon:'none' | ||
145 | }) | 146 | }) |
146 | }else{ | 147 | }else{ |
147 | let url = 'index/Common/comment', params = { | 148 | let url = 'index/Common/comment', params = { |
@@ -158,7 +159,8 @@ Page({ | @@ -158,7 +159,8 @@ Page({ | ||
158 | }) | 159 | }) |
159 | that.setData({ | 160 | that.setData({ |
160 | page:1, | 161 | page:1, |
161 | - comment_list:[] | 162 | + comment_list:[], |
163 | + content:'' | ||
162 | 164 | ||
163 | }) | 165 | }) |
164 | 166 |
@@ -59,7 +59,7 @@ | @@ -59,7 +59,7 @@ | ||
59 | </view> | 59 | </view> |
60 | <view class="pingjiabottom"> | 60 | <view class="pingjiabottom"> |
61 | <view class="pbleft"> | 61 | <view class="pbleft"> |
62 | - <input placeholder='输入评论的内容' placeholder-class='enterping' bindinput="entercontent"/> | 62 | + <input placeholder='输入评论的内容' placeholder-class='enterping' value="{{content}}" bindinput="entercontent"/> |
63 | </view> | 63 | </view> |
64 | 64 | ||
65 | <view class="pbright" bindtap="send">发送</view> | 65 | <view class="pbright" bindtap="send">发送</view> |
1 | +page{ | ||
2 | + overflow-x:hidden; | ||
3 | +} | ||
4 | + | ||
1 | .detailhead { | 5 | .detailhead { |
2 | width: 750rpx; | 6 | width: 750rpx; |
3 | height: 483rpx; | 7 | height: 483rpx; |
@@ -94,7 +98,7 @@ | @@ -94,7 +98,7 @@ | ||
94 | .winezan { | 98 | .winezan { |
95 | color: #666; | 99 | color: #666; |
96 | font-size: 28rpx; | 100 | font-size: 28rpx; |
97 | - margin-left: 5rpx; | 101 | + margin-left: 10rpx; |
98 | } | 102 | } |
99 | 103 | ||
100 | .wineblock { | 104 | .wineblock { |
@@ -224,4 +228,7 @@ image { | @@ -224,4 +228,7 @@ image { | ||
224 | button::after{ | 228 | button::after{ |
225 | border:none; | 229 | border:none; |
226 | outline:none; | 230 | outline:none; |
231 | +} | ||
232 | +.niangjiubox{ | ||
233 | + overflow-x: hidden; | ||
227 | } | 234 | } |
@@ -17,7 +17,9 @@ Page({ | @@ -17,7 +17,9 @@ Page({ | ||
17 | disabled:false, | 17 | disabled:false, |
18 | yanzhengcode:'', | 18 | yanzhengcode:'', |
19 | newpassword:'', | 19 | newpassword:'', |
20 | - dengshow:false | 20 | + dengshow:false, |
21 | + newmima:true, | ||
22 | + | ||
21 | }, | 23 | }, |
22 | 24 | ||
23 | /** | 25 | /** |
@@ -27,15 +29,13 @@ Page({ | @@ -27,15 +29,13 @@ Page({ | ||
27 | this.setData({ | 29 | this.setData({ |
28 | url: app.globalData.url | 30 | url: app.globalData.url |
29 | }) | 31 | }) |
30 | - | ||
31 | - | ||
32 | }, | 32 | }, |
33 | 33 | ||
34 | enterphone(e){ | 34 | enterphone(e){ |
35 | this.setData({ | 35 | this.setData({ |
36 | phone:e.detail.value | 36 | phone:e.detail.value |
37 | }) | 37 | }) |
38 | - this.yanhzengphone() | 38 | + this.yanhzengphone(); |
39 | 39 | ||
40 | }, | 40 | }, |
41 | 41 | ||
@@ -51,6 +51,11 @@ Page({ | @@ -51,6 +51,11 @@ Page({ | ||
51 | }) | 51 | }) |
52 | } | 52 | } |
53 | }, | 53 | }, |
54 | + showmima(){ | ||
55 | + this.setData({ | ||
56 | + newmima:false | ||
57 | + }) | ||
58 | + }, | ||
54 | clearphone(){ | 59 | clearphone(){ |
55 | console.log(342) | 60 | console.log(342) |
56 | this.setData({ | 61 | this.setData({ |
@@ -70,7 +75,6 @@ Page({ | @@ -70,7 +75,6 @@ Page({ | ||
70 | first:false, | 75 | first:false, |
71 | second:true | 76 | second:true |
72 | }) | 77 | }) |
73 | - | ||
74 | this.getcode() | 78 | this.getcode() |
75 | } | 79 | } |
76 | 80 |
@@ -41,11 +41,14 @@ | @@ -41,11 +41,14 @@ | ||
41 | <view class="yanzheng mima"> | 41 | <view class="yanzheng mima"> |
42 | <view class="yanzhengmiddle yanzhengma"> | 42 | <view class="yanzhengmiddle yanzhengma"> |
43 | 43 | ||
44 | - <input placeholder='设置新密码' placeholder-class='enterphone' bindinput="setnewmima" type="password" value="{{newpassword}}"/> | 44 | + <input placeholder='设置新密码' placeholder-class='enterphone' bindinput="setnewmima" type="password" value="{{newpassword}}" wx:if="{{newmima}}"/> |
45 | + | ||
46 | + <input placeholder='设置新密码' placeholder-class='enterphone' bindinput="setnewmima" type="text" value="{{newpassword}}" wx:else/> | ||
47 | + | ||
45 | </view> | 48 | </view> |
46 | <view class="mimaimg"> | 49 | <view class="mimaimg"> |
47 | 50 | ||
48 | - <view class="eyeimg"> | 51 | + <view class="eyeimg" bindtap="showmima"> |
49 | <image src="{{url}}/bicon_13x.png"></image> | 52 | <image src="{{url}}/bicon_13x.png"></image> |
50 | </view> | 53 | </view> |
51 | </view> | 54 | </view> |
@@ -175,10 +175,15 @@ Page({ | @@ -175,10 +175,15 @@ Page({ | ||
175 | * 生命周期函数--监听页面加载 | 175 | * 生命周期函数--监听页面加载 |
176 | */ | 176 | */ |
177 | onLoad: function(options) { | 177 | onLoad: function(options) { |
178 | - this.setData({ | ||
179 | - url: app.globalData.url | ||
180 | - }) | ||
181 | - console.log(this.data.url) | 178 | + let that=this; |
179 | + setTimeout(function(){ | ||
180 | + that.setData({ | ||
181 | + url: app.globalData.url | ||
182 | + }) | ||
183 | + },1000) | ||
184 | + | ||
185 | + | ||
186 | + | ||
182 | this.getshailist(); | 187 | this.getshailist(); |
183 | 188 | ||
184 | this.getcity(); | 189 | this.getcity(); |
@@ -453,37 +458,58 @@ Page({ | @@ -453,37 +458,58 @@ Page({ | ||
453 | let newshaikind = this.data.shaikind; | 458 | let newshaikind = this.data.shaikind; |
454 | 459 | ||
455 | for (var obj of newshaikind) { | 460 | for (var obj of newshaikind) { |
456 | - if (obj.id == id) { | ||
457 | - obj.sel = !obj.sel | ||
458 | - } else { | ||
459 | - obj.sel = false | ||
460 | - } | 461 | + |
461 | 462 | ||
462 | if (this.data.type == 1) { | 463 | if (this.data.type == 1) { |
463 | - if (obj.sel == true) { | ||
464 | - this.setData({ | ||
465 | - sort_id: obj.id, | ||
466 | - | ||
467 | - }) | 464 | + if (obj.id == id) { |
465 | + obj.sel = !obj.sel; | ||
466 | + if (obj.sel == true) { | ||
467 | + this.setData({ | ||
468 | + sort_id: obj.id, | ||
468 | 469 | ||
469 | - let newkindlist=this.data.kindlist; | ||
470 | - newkindlist[0].name = obj.sort_name; | ||
471 | - this.setData({ | ||
472 | - kindlist:newkindlist | ||
473 | - }) | 470 | + }) |
471 | + | ||
472 | + let newkindlist = this.data.kindlist; | ||
473 | + newkindlist[0].name = obj.sort_name; | ||
474 | + this.setData({ | ||
475 | + kindlist: newkindlist | ||
476 | + }) | ||
477 | + } else { | ||
478 | + let newkindlist = this.data.kindlist; | ||
479 | + newkindlist[0].name = "品类"; | ||
480 | + this.setData({ | ||
481 | + kindlist: newkindlist | ||
482 | + }) | ||
483 | + } | ||
484 | + } else { | ||
485 | + obj.sel = false | ||
474 | } | 486 | } |
487 | + | ||
475 | } else if (this.data.type == 4) { | 488 | } else if (this.data.type == 4) { |
476 | - if (obj.sel == true) { | ||
477 | - this.setData({ | ||
478 | - odor_id: obj.id | ||
479 | - }) | ||
480 | 489 | ||
481 | - let newkindlist = this.data.kindlist; | ||
482 | - newkindlist[3].name = obj.odor_name; | ||
483 | - this.setData({ | ||
484 | - kindlist: newkindlist | ||
485 | - }) | 490 | + if(obj.id==id){ |
491 | + obj.sel = !obj.sel; | ||
492 | + if (obj.sel == true) { | ||
493 | + this.setData({ | ||
494 | + odor_id: obj.id | ||
495 | + }) | ||
496 | + | ||
497 | + let newkindlist = this.data.kindlist; | ||
498 | + newkindlist[3].name = obj.odor_name; | ||
499 | + this.setData({ | ||
500 | + kindlist: newkindlist | ||
501 | + }) | ||
502 | + }else{ | ||
503 | + let newkindlist = this.data.kindlist; | ||
504 | + newkindlist[3].name = "香型"; | ||
505 | + this.setData({ | ||
506 | + kindlist: newkindlist | ||
507 | + }) | ||
508 | + } | ||
509 | + }else{ | ||
510 | + obj.sel = false | ||
486 | } | 511 | } |
512 | + | ||
487 | } | 513 | } |
488 | 514 | ||
489 | 515 | ||
@@ -548,19 +574,30 @@ Page({ | @@ -548,19 +574,30 @@ Page({ | ||
548 | 574 | ||
549 | for (var obj of newcountrylist) { | 575 | for (var obj of newcountrylist) { |
550 | obj.sel = !obj.sel; | 576 | obj.sel = !obj.sel; |
551 | - if (obj.sel == true) { | 577 | + |
552 | if (obj.id == countryid) { | 578 | if (obj.id == countryid) { |
553 | - let newkindlist = this.data.kindlist; | 579 | + if (obj.sel == true) { |
580 | + let newkindlist = this.data.kindlist; | ||
554 | 581 | ||
555 | - newkindlist[1].name = obj.country_name | ||
556 | - this.setData({ | ||
557 | - kindlist: newkindlist, | ||
558 | - country: obj.country_name | ||
559 | - }) | 582 | + newkindlist[1].name = obj.country_name |
583 | + this.setData({ | ||
584 | + kindlist: newkindlist, | ||
585 | + country: obj.country_name | ||
586 | + }) | ||
587 | + }else{ | ||
588 | + let newkindlist = this.data.kindlist; | ||
589 | + | ||
590 | + newkindlist[1].name = "国别" | ||
591 | + this.setData({ | ||
592 | + kindlist: newkindlist, | ||
593 | + country: '' | ||
594 | + }) | ||
595 | + } | ||
596 | + | ||
560 | } else { | 597 | } else { |
561 | obj.sel = false | 598 | obj.sel = false |
562 | } | 599 | } |
563 | - } | 600 | + |
564 | 601 | ||
565 | 602 | ||
566 | } | 603 | } |
@@ -609,17 +646,25 @@ Page({ | @@ -609,17 +646,25 @@ Page({ | ||
609 | for(var i=0;i<newreginlist.length;i++){ | 646 | for(var i=0;i<newreginlist.length;i++){ |
610 | // newreginlist[i].sel = !newreginlist[i].sel | 647 | // newreginlist[i].sel = !newreginlist[i].sel |
611 | if(i==reginindex){ | 648 | if(i==reginindex){ |
612 | - console.log(243782347) | ||
613 | - newreginlist[i].sel=true; | ||
614 | - let newkindlist = this.data.kindlist; | ||
615 | - newkindlist[2].name = newreginlist[i].name; | ||
616 | - this.setData({ | ||
617 | - kindlist: newkindlist, | ||
618 | - region: newreginlist[i].name | ||
619 | - }) | 649 | + newreginlist[i].sel = !newreginlist[i].sel; |
650 | + if (newreginlist[i].sel==true){ | ||
651 | + // newreginlist[i].sel=true; | ||
652 | + let newkindlist = this.data.kindlist; | ||
653 | + newkindlist[2].name = newreginlist[i].name; | ||
654 | + this.setData({ | ||
655 | + kindlist: newkindlist, | ||
656 | + region: newreginlist[i].name | ||
657 | + }) | ||
620 | 658 | ||
621 | - console.log(this.data.kindlist) | ||
622 | - | 659 | + console.log(this.data.kindlist) |
660 | + }else{ | ||
661 | + let newkindlist = this.data.kindlist; | ||
662 | + newkindlist[2].name = "产区"; | ||
663 | + this.setData({ | ||
664 | + kindlist: newkindlist, | ||
665 | + region: "" | ||
666 | + }) | ||
667 | + } | ||
623 | }else{ | 668 | }else{ |
624 | newreginlist[i].sel=false | 669 | newreginlist[i].sel=false |
625 | } | 670 | } |
@@ -21,9 +21,15 @@ Page({ | @@ -21,9 +21,15 @@ Page({ | ||
21 | * 生命周期函数--监听页面加载 | 21 | * 生命周期函数--监听页面加载 |
22 | */ | 22 | */ |
23 | onLoad: function (options) { | 23 | onLoad: function (options) { |
24 | + let that = this; | ||
25 | + setTimeout(function () { | ||
26 | + that.setData({ | ||
27 | + url: app.globalData.url | ||
28 | + }) | ||
29 | + }, 1000) | ||
24 | console.log(options) | 30 | console.log(options) |
25 | this.setData({ | 31 | this.setData({ |
26 | - url: app.globalData.url, | 32 | + |
27 | brandid:options.id | 33 | brandid:options.id |
28 | }) | 34 | }) |
29 | 35 | ||
@@ -36,6 +42,10 @@ Page({ | @@ -36,6 +42,10 @@ Page({ | ||
36 | status:e.currentTarget.dataset.idx+1 | 42 | status:e.currentTarget.dataset.idx+1 |
37 | 43 | ||
38 | }) | 44 | }) |
45 | + this.setData({ | ||
46 | + page:1, | ||
47 | + brandlist:[] | ||
48 | + }) | ||
39 | this.getbrandlist() | 49 | this.getbrandlist() |
40 | 50 | ||
41 | }, | 51 | }, |
@@ -54,7 +64,7 @@ Page({ | @@ -54,7 +64,7 @@ Page({ | ||
54 | console.log(res); | 64 | console.log(res); |
55 | that.setData({ | 65 | that.setData({ |
56 | info: res.info, | 66 | info: res.info, |
57 | - brandlist:res.list | 67 | + brandlist:that.data.brandlist.concat(res.list) |
58 | }) | 68 | }) |
59 | 69 | ||
60 | 70 | ||
@@ -77,9 +87,23 @@ Page({ | @@ -77,9 +87,23 @@ Page({ | ||
77 | console.log(res); | 87 | console.log(res); |
78 | wx.showToast({ | 88 | wx.showToast({ |
79 | title: res, | 89 | title: res, |
80 | - icon:'none' | 90 | + icon:'none', |
91 | + | ||
92 | + }) | ||
93 | + let newinfo=that.data.info; | ||
94 | + if (newinfo.is_favorite==0){ | ||
95 | + newinfo.is_favorite=1 | ||
96 | + }else{ | ||
97 | + newinfo.is_favorite = 0 | ||
98 | + } | ||
99 | + that.setData({ | ||
100 | + info:newinfo | ||
81 | }) | 101 | }) |
82 | - that.getbrandlist() | 102 | + // that.setData({ |
103 | + // page: 1, | ||
104 | + // brandlist: [] | ||
105 | + // }) | ||
106 | + // that.getbrandlist() | ||
83 | 107 | ||
84 | 108 | ||
85 | }).catch((err) => { | 109 | }).catch((err) => { |
@@ -102,7 +126,24 @@ Page({ | @@ -102,7 +126,24 @@ Page({ | ||
102 | title: res, | 126 | title: res, |
103 | icon:'none' | 127 | icon:'none' |
104 | }) | 128 | }) |
105 | - that.getbrandlist() | 129 | + |
130 | + let newbrandlist=that.data.brandlist; | ||
131 | + console.log(newbrandlist) | ||
132 | + console.log(id) | ||
133 | + for (var obj of newbrandlist){ | ||
134 | + | ||
135 | + if(obj.id==id){ | ||
136 | + console.log(888) | ||
137 | + if (obj.is_favorite==0){ | ||
138 | + obj.is_favorite=1 | ||
139 | + } else { | ||
140 | + obj.is_favorite = 0 | ||
141 | + } | ||
142 | + } | ||
143 | + } | ||
144 | + that.setData({ | ||
145 | + brandlist: newbrandlist | ||
146 | + }) | ||
106 | 147 | ||
107 | 148 | ||
108 | }).catch((err) => { | 149 | }).catch((err) => { |
@@ -118,6 +159,15 @@ Page({ | @@ -118,6 +159,15 @@ Page({ | ||
118 | url: '/pages/homeblock/brandpage/brandpage?id='+id, | 159 | url: '/pages/homeblock/brandpage/brandpage?id='+id, |
119 | }) | 160 | }) |
120 | }, | 161 | }, |
162 | + jumpbrand(e) { | ||
163 | + let id = e.currentTarget.dataset.id | ||
164 | + wx.navigateTo({ | ||
165 | + url: '/pages/homeblock/jiuzidian/jiuzidian?id=' + id, | ||
166 | + }) | ||
167 | + | ||
168 | + | ||
169 | + }, | ||
170 | + | ||
121 | /** | 171 | /** |
122 | * 生命周期函数--监听页面初次渲染完成 | 172 | * 生命周期函数--监听页面初次渲染完成 |
123 | */ | 173 | */ |
@@ -157,7 +207,13 @@ Page({ | @@ -157,7 +207,13 @@ Page({ | ||
157 | * 页面上拉触底事件的处理函数 | 207 | * 页面上拉触底事件的处理函数 |
158 | */ | 208 | */ |
159 | onReachBottom: function () { | 209 | onReachBottom: function () { |
210 | + let page=this.data.page; | ||
211 | + page++; | ||
212 | + this.setData({ | ||
213 | + page:page | ||
214 | + }) | ||
160 | 215 | ||
216 | + this.getbrandlist() | ||
161 | }, | 217 | }, |
162 | 218 | ||
163 | /** | 219 | /** |
@@ -26,10 +26,12 @@ | @@ -26,10 +26,12 @@ | ||
26 | <view class="baiyun">{{info.name}}</view> | 26 | <view class="baiyun">{{info.name}}</view> |
27 | 27 | ||
28 | <view> | 28 | <view> |
29 | - | ||
30 | -<view class="nodata" wx:if="{{brandlist.length==0}}">暂无数据</view> | 29 | +<view class="nodataimg" wx:if="{{brandlist.length==0}}"> |
30 | +<image src="/img/wushuju.png"></image> | ||
31 | +</view> | ||
32 | +<!-- <view class="nodata" wx:if="{{brandlist.length==0}}">暂无数据</view> --> | ||
31 | <block wx:else> | 33 | <block wx:else> |
32 | - <view class="searchitem" wx:for="{{brandlist}}" wx:key=''> | 34 | + <view class="searchitem" wx:for="{{brandlist}}" wx:key='' bindtap="jumpbrand" data-id="{{item.id}}"> |
33 | <view class="searchitemleft"> | 35 | <view class="searchitemleft"> |
34 | <view class="itemleftimg"> | 36 | <view class="itemleftimg"> |
35 | <image src="{{item.logo}}"></image> | 37 | <image src="{{item.logo}}"></image> |
@@ -46,7 +48,7 @@ | @@ -46,7 +48,7 @@ | ||
46 | </view> | 48 | </view> |
47 | </view> | 49 | </view> |
48 | 50 | ||
49 | - <view class="starimg" bindtap="collectwine" data-id="{{item.id}}"> | 51 | + <view class="starimg" catchtap="collectwine" data-id="{{item.id}}"> |
50 | 52 | ||
51 | <image src="{{url}}aicon_10x.png" wx:if="{{item.is_favorite==1}}"></image> | 53 | <image src="{{url}}aicon_10x.png" wx:if="{{item.is_favorite==1}}"></image> |
52 | <image src="{{url}}aicon_09x.png" wx:else></image> | 54 | <image src="{{url}}aicon_09x.png" wx:else></image> |
@@ -17,8 +17,14 @@ Page({ | @@ -17,8 +17,14 @@ Page({ | ||
17 | * 生命周期函数--监听页面加载 | 17 | * 生命周期函数--监听页面加载 |
18 | */ | 18 | */ |
19 | onLoad: function (options) { | 19 | onLoad: function (options) { |
20 | + let that = this; | ||
21 | + setTimeout(function () { | ||
22 | + that.setData({ | ||
23 | + url: app.globalData.url | ||
24 | + }) | ||
25 | + }, 1000) | ||
20 | this.setData({ | 26 | this.setData({ |
21 | - url: app.globalData.url, | 27 | + |
22 | id:options.id | 28 | id:options.id |
23 | }) | 29 | }) |
24 | this.getbrandtail() | 30 | this.getbrandtail() |
@@ -32,11 +32,11 @@ | @@ -32,11 +32,11 @@ | ||
32 | 32 | ||
33 | <view class="brandbox"> | 33 | <view class="brandbox"> |
34 | <view class="brandboxitem" wx:for="{{attr}}" wx:key='' wx:for-index="idxs"> | 34 | <view class="brandboxitem" wx:for="{{attr}}" wx:key='' wx:for-index="idxs"> |
35 | - <view class="boxtop"> | 35 | + <view class="boxtop" bindtap="showinfo" data-idx="{{idxs}}"> |
36 | <view class="boxtopleft"> | 36 | <view class="boxtopleft"> |
37 | {{item.name}} | 37 | {{item.name}} |
38 | </view> | 38 | </view> |
39 | - <view class="boxright" bindtap="showinfo" data-idx="{{idxs}}"> | 39 | + <view class="boxright" > |
40 | <image src="{{url}}aicon_53x.png" wx:if="{{item.show}}"></image> | 40 | <image src="{{url}}aicon_53x.png" wx:if="{{item.show}}"></image> |
41 | <image src="{{url}}aicon_52x.png" wx:else></image> | 41 | <image src="{{url}}aicon_52x.png" wx:else></image> |
42 | </view> | 42 | </view> |
@@ -8,11 +8,9 @@ Page({ | @@ -8,11 +8,9 @@ Page({ | ||
8 | */ | 8 | */ |
9 | data: { | 9 | data: { |
10 | url:'', | 10 | url:'', |
11 | - imgUrls: ["http://winesbook.cn/static/images_mini/aicon_23@2x.png", | ||
12 | - "http://winesbook.cn/static/images_mini/aicon_23@2x.png", | ||
13 | - "http://winesbook.cn/static/images_mini/aicon_23@2x.png"], | 11 | + imgUrls: [], |
14 | indicatorDots: false, | 12 | indicatorDots: false, |
15 | - autoplay: false, | 13 | + autoplay: true, |
16 | interval: 2000, | 14 | interval: 2000, |
17 | duration: 1000, | 15 | duration: 1000, |
18 | currentSwiper: 0, | 16 | currentSwiper: 0, |
@@ -26,8 +24,14 @@ Page({ | @@ -26,8 +24,14 @@ Page({ | ||
26 | * 生命周期函数--监听页面加载 | 24 | * 生命周期函数--监听页面加载 |
27 | */ | 25 | */ |
28 | onLoad: function (options) { | 26 | onLoad: function (options) { |
27 | + let that=this; | ||
28 | + setTimeout(function(){ | ||
29 | + that.setData({ | ||
30 | + url: app.globalData.url, | ||
31 | + }) | ||
32 | + },1500) | ||
29 | this.setData({ | 33 | this.setData({ |
30 | - url: app.globalData.url, | 34 | + |
31 | id:options.id | 35 | id:options.id |
32 | }) | 36 | }) |
33 | this.getcompanydetail() | 37 | this.getcompanydetail() |
@@ -137,7 +141,7 @@ Page({ | @@ -137,7 +141,7 @@ Page({ | ||
137 | * 生命周期函数--监听页面卸载 | 141 | * 生命周期函数--监听页面卸载 |
138 | */ | 142 | */ |
139 | onUnload: function () { | 143 | onUnload: function () { |
140 | - | 144 | + wx.setStorageSync("guantype", "") |
141 | }, | 145 | }, |
142 | 146 | ||
143 | /** | 147 | /** |
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | 13 | ||
14 | </view> | 14 | </view> |
15 | <view class="swiper_image"> | 15 | <view class="swiper_image"> |
16 | - <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" class="swiper_item_img" bindchange="swiperChange"> | 16 | + <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" class="swiper_item_img" bindchange="swiperChange" circular='true'> |
17 | <block wx:for="{{imgUrls}}" wx:key="doct"> | 17 | <block wx:for="{{imgUrls}}" wx:key="doct"> |
18 | <swiper-item style="border-radius:10px;"> | 18 | <swiper-item style="border-radius:10px;"> |
19 | <image src="{{item.url}}" data-index='{{index}}' class="slide-image" bindtap='viewImg' width="355" height="150" /> | 19 | <image src="{{item.url}}" data-index='{{index}}' class="slide-image" bindtap='viewImg' width="355" height="150" /> |
@@ -31,11 +31,11 @@ | @@ -31,11 +31,11 @@ | ||
31 | 31 | ||
32 | <view class="brandbox"> | 32 | <view class="brandbox"> |
33 | <view class="brandboxitem" wx:for="{{attr}}" wx:key='' wx:for-index="idxs"> | 33 | <view class="brandboxitem" wx:for="{{attr}}" wx:key='' wx:for-index="idxs"> |
34 | - <view class="boxtop"> | 34 | + <view class="boxtop" bindtap="showinfo" data-idx="{{idxs}}"> |
35 | <view class="boxtopleft"> | 35 | <view class="boxtopleft"> |
36 | {{item.name}} | 36 | {{item.name}} |
37 | </view> | 37 | </view> |
38 | - <view class="boxright" bindtap="showinfo" data-idx="{{idxs}}"> | 38 | + <view class="boxright" > |
39 | <image src="{{url}}aicon_53x.png" wx:if="{{item.show}}"></image> | 39 | <image src="{{url}}aicon_53x.png" wx:if="{{item.show}}"></image> |
40 | <image src="{{url}}aicon_52x.png" wx:else></image> | 40 | <image src="{{url}}aicon_52x.png" wx:else></image> |
41 | </view> | 41 | </view> |
@@ -75,7 +75,9 @@ image{ | @@ -75,7 +75,9 @@ image{ | ||
75 | .boxtop{ | 75 | .boxtop{ |
76 | display:flex; | 76 | display:flex; |
77 | justify-content: space-between; | 77 | justify-content: space-between; |
78 | - align-items: center | 78 | + align-items: center; |
79 | + padding: 10rpx 0; | ||
80 | + box-sizing: border-box | ||
79 | } | 81 | } |
80 | .boxtopleft{ | 82 | .boxtopleft{ |
81 | color:#1A1A1A; | 83 | color:#1A1A1A; |
@@ -7,7 +7,7 @@ Page({ | @@ -7,7 +7,7 @@ Page({ | ||
7 | */ | 7 | */ |
8 | data: { | 8 | data: { |
9 | url: '', | 9 | url: '', |
10 | - star1: 0, | 10 | + star1: 5, |
11 | sepic: true, | 11 | sepic: true, |
12 | id: '', | 12 | id: '', |
13 | biaoqian: false, | 13 | biaoqian: false, |
@@ -180,7 +180,12 @@ Page({ | @@ -180,7 +180,12 @@ Page({ | ||
180 | sureadd() { | 180 | sureadd() { |
181 | 181 | ||
182 | let that = this; | 182 | let that = this; |
183 | - if (that.data.labelname.length > 10) { | 183 | + if (that.data.labelname==''){ |
184 | + wx.showToast({ | ||
185 | + title: '请输入标签名字', | ||
186 | + icon: 'none' | ||
187 | + }) | ||
188 | + }else if (that.data.labelname.length > 10) { | ||
184 | wx.showToast({ | 189 | wx.showToast({ |
185 | title: '请输入10以下的字符', | 190 | title: '请输入10以下的字符', |
186 | icon: 'none' | 191 | icon: 'none' |
@@ -392,54 +397,73 @@ Page({ | @@ -392,54 +397,73 @@ Page({ | ||
392 | //发布 | 397 | //发布 |
393 | publish() { | 398 | publish() { |
394 | let that = this; | 399 | let that = this; |
395 | - let newfiles = []; | ||
396 | - let newimages = that.data.chuanimages; | ||
397 | - if (that.data.chuanvideoimg != '') { | ||
398 | - newfiles.push(that.data.chuanvideoimg) | 400 | + if (that.data.star1==0){ |
401 | + wx.showToast({ | ||
402 | + title: '请滑动选择星星评分', | ||
403 | + icon: 'none' | ||
404 | + }) | ||
405 | + }else if (that.data.content==''){ | ||
406 | + wx.showToast({ | ||
407 | + title: '请输入评论内容', | ||
408 | + icon:'none' | ||
409 | + }) | ||
410 | + } else if (that.data.labelid.length==0){ | ||
411 | + wx.showToast({ | ||
412 | + title: '请选择标签', | ||
413 | + icon: 'none' | ||
414 | + }) | ||
399 | } | 415 | } |
400 | - | ||
401 | - if (newimages.length != 0) { | ||
402 | - for (var i = 0; i < newimages.length; i++) { | ||
403 | - newfiles.push(newimages[i]) | 416 | + else{ |
417 | + let newfiles = []; | ||
418 | + let newimages = that.data.chuanimages; | ||
419 | + if (that.data.chuanvideoimg != '') { | ||
420 | + newfiles.push(that.data.chuanvideoimg) | ||
404 | } | 421 | } |
405 | - } | ||
406 | - newfiles = newfiles.join(","); | ||
407 | - console.log(newfiles) | ||
408 | - let newlabelid=that.data.labelid; | ||
409 | 422 | ||
410 | - newlabelid= newlabelid.join(",") | ||
411 | - console.log(newlabelid) | 423 | + if (newimages.length != 0) { |
424 | + for (var i = 0; i < newimages.length; i++) { | ||
425 | + newfiles.push(newimages[i]) | ||
426 | + } | ||
427 | + } | ||
428 | + newfiles = newfiles.join(","); | ||
429 | + console.log(newfiles) | ||
430 | + let newlabelid = that.data.labelid; | ||
412 | 431 | ||
432 | + newlabelid = newlabelid.join(",") | ||
433 | + console.log(newlabelid) | ||
413 | 434 | ||
414 | - let url = 'index/Wine/create_comment', | ||
415 | - params = { | ||
416 | - wine_id: that.data.id, | ||
417 | - score: that.data.star1, | ||
418 | - content: that.data.content, | ||
419 | - files: newfiles, | ||
420 | - position: that.data.currentCity, | ||
421 | - tags: newlabelid | ||
422 | 435 | ||
423 | - } | ||
424 | - app.post(url, params).then((res) => { | ||
425 | - console.log(res); | 436 | + let url = 'index/Wine/create_comment', |
437 | + params = { | ||
438 | + wine_id: that.data.id, | ||
439 | + score: that.data.star1, | ||
440 | + content: that.data.content, | ||
441 | + files: newfiles, | ||
442 | + position: that.data.currentCity, | ||
443 | + tags: newlabelid | ||
426 | 444 | ||
427 | - wx.showToast({ | ||
428 | - title: '发布成功', | ||
429 | - icon:'none' | ||
430 | - }) | 445 | + } |
446 | + app.post(url, params).then((res) => { | ||
447 | + console.log(res); | ||
431 | 448 | ||
432 | - setTimeout(function(){ | ||
433 | - wx.navigateBack({ | ||
434 | - checked:true | 449 | + wx.showToast({ |
450 | + title: '发布成功', | ||
451 | + icon: 'none' | ||
435 | }) | 452 | }) |
436 | - },1500) | ||
437 | 453 | ||
454 | + setTimeout(function () { | ||
455 | + wx.navigateBack({ | ||
456 | + checked: true | ||
457 | + }) | ||
458 | + }, 1500) | ||
438 | 459 | ||
439 | 460 | ||
440 | - }).catch((err) => { | ||
441 | 461 | ||
442 | - }) | 462 | + }).catch((err) => { |
463 | + | ||
464 | + }) | ||
465 | + } | ||
466 | + | ||
443 | }, | 467 | }, |
444 | 468 | ||
445 | /** | 469 | /** |
@@ -40,11 +40,11 @@ | @@ -40,11 +40,11 @@ | ||
40 | 40 | ||
41 | </view> | 41 | </view> |
42 | 42 | ||
43 | -<view class="biaoqian"> | 43 | +<view class="biaoqian" bindtap="se"> |
44 | <view class="biaoqianleft"> | 44 | <view class="biaoqianleft"> |
45 | 选择标签 | 45 | 选择标签 |
46 | </view> | 46 | </view> |
47 | - <view class="biaoqianright" bindtap="se"> | 47 | + <view class="biaoqianright" > |
48 | <image src="{{sepic==true?'http://winesbook.cn/static/images_mini/aicon_53x.png':'http://winesbook.cn/static/images_mini/aicon_52x.png'}}"></image> | 48 | <image src="{{sepic==true?'http://winesbook.cn/static/images_mini/aicon_53x.png':'http://winesbook.cn/static/images_mini/aicon_52x.png'}}"></image> |
49 | </view> | 49 | </view> |
50 | </view> | 50 | </view> |
@@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
21 | display:flex; | 21 | display:flex; |
22 | align-items: center; | 22 | align-items: center; |
23 | justify-content: center; | 23 | justify-content: center; |
24 | - margin-top:105rpx; | 24 | + margin-top:95rpx; |
25 | } | 25 | } |
26 | .biaoqianright{ | 26 | .biaoqianright{ |
27 | width:24rpx; | 27 | width:24rpx; |
@@ -39,6 +39,7 @@ | @@ -39,6 +39,7 @@ | ||
39 | flex-wrap: wrap; | 39 | flex-wrap: wrap; |
40 | padding: 0 32rpx 0 32rpx; | 40 | padding: 0 32rpx 0 32rpx; |
41 | box-sizing: border-box; | 41 | box-sizing: border-box; |
42 | + margin-top:20rpx; | ||
42 | 43 | ||
43 | } | 44 | } |
44 | .showpicitem{ | 45 | .showpicitem{ |
@@ -212,5 +213,6 @@ font-size: 32rpx | @@ -212,5 +213,6 @@ font-size: 32rpx | ||
212 | font-size: 32rpx; | 213 | font-size: 32rpx; |
213 | } | 214 | } |
214 | .labelactive{ | 215 | .labelactive{ |
215 | - border:1rpx solid #E81825 | 216 | + background: #E81825; |
217 | + color:#fff; | ||
216 | } | 218 | } |
@@ -89,6 +89,21 @@ Page({ | @@ -89,6 +89,21 @@ Page({ | ||
89 | }) | 89 | }) |
90 | }, | 90 | }, |
91 | 91 | ||
92 | + //图片预览 | ||
93 | + viewImg(e) { | ||
94 | + | ||
95 | + let that = this; | ||
96 | + let parindex = e.currentTarget.dataset.paridx; | ||
97 | + let childindex = e.currentTarget.dataset.childidx; | ||
98 | + wx.previewImage({ | ||
99 | + current: that.data.list[parindex].files[childindex].url, | ||
100 | + urls: that.data.list[parindex].files, | ||
101 | + success: function (res) { }, | ||
102 | + fail: function (res) { }, | ||
103 | + complete: function (res) { }, | ||
104 | + }) | ||
105 | + }, | ||
106 | + | ||
92 | //进入视频页面 | 107 | //进入视频页面 |
93 | entervido(e){ | 108 | entervido(e){ |
94 | let url=e.currentTarget.dataset.url | 109 | let url=e.currentTarget.dataset.url |
@@ -142,7 +142,7 @@ | @@ -142,7 +142,7 @@ | ||
142 | <view class="hotticket">热门标签</view> | 142 | <view class="hotticket">热门标签</view> |
143 | 143 | ||
144 | <view class="botlabet"> | 144 | <view class="botlabet"> |
145 | - <view class="labelitem" wx:for="{{hot_tag}}" wx:key=''> | 145 | + <view class="labelitem" wx:for="{{hot_tag}}" wx:key='' > |
146 | <text>{{item.name}}</text> | 146 | <text>{{item.name}}</text> |
147 | <text class="labelitemright">{{item.comment_count}}</text> | 147 | <text class="labelitemright">{{item.comment_count}}</text> |
148 | </view> | 148 | </view> |
@@ -152,7 +152,7 @@ | @@ -152,7 +152,7 @@ | ||
152 | </view> | 152 | </view> |
153 | 153 | ||
154 | <view class="boxmiddle"> | 154 | <view class="boxmiddle"> |
155 | - <view class="boxmiddleitem" wx:for="{{list}}" wx:key=''> | 155 | + <view class="boxmiddleitem" wx:for="{{list}}" wx:key='' wx:for-index='par'> |
156 | <view class="evaluteitemleft"> | 156 | <view class="evaluteitemleft"> |
157 | <image src="{{item.avatar}}"></image> | 157 | <image src="{{item.avatar}}"></image> |
158 | </view> | 158 | </view> |
@@ -195,7 +195,7 @@ | @@ -195,7 +195,7 @@ | ||
195 | <view class="evaltext">{{item.content}}</view> | 195 | <view class="evaltext">{{item.content}}</view> |
196 | <view class="medioblock"> | 196 | <view class="medioblock"> |
197 | <block wx:if="{{item.files.length!=0}}"> | 197 | <block wx:if="{{item.files.length!=0}}"> |
198 | - <view class="evalimgitem" wx:for='{{item.files}}' wx:key=""> | 198 | + <view class="evalimgitem" wx:for='{{item.files}}' wx:key="" bindtap='viewImg' data-paridx="{{par}}" wx:for-index='sec' data-childidx="{{sec}}"> |
199 | <image src="{{item}}"></image> | 199 | <image src="{{item}}"></image> |
200 | </view> | 200 | </view> |
201 | 201 |
@@ -205,14 +205,19 @@ image { | @@ -205,14 +205,19 @@ image { | ||
205 | } | 205 | } |
206 | 206 | ||
207 | .zanimg{ | 207 | .zanimg{ |
208 | - width:30rpx; | 208 | + width:60rpx; |
209 | + | ||
209 | height:28rpx; | 210 | height:28rpx; |
210 | - font-size: 0 | 211 | + font-size: 0; |
212 | + text-align: center | ||
213 | +} | ||
214 | +.zanimg image{ | ||
215 | + width:30rpx; | ||
211 | } | 216 | } |
212 | .zannum{ | 217 | .zannum{ |
213 | color:#999999; | 218 | color:#999999; |
214 | font-size: 28rpx; | 219 | font-size: 28rpx; |
215 | - margin-left:20rpx; | 220 | + margin-left:0rpx; |
216 | } | 221 | } |
217 | .writeimg{ | 222 | .writeimg{ |
218 | width:126rpx; | 223 | width:126rpx; |
@@ -2,11 +2,19 @@ | @@ -2,11 +2,19 @@ | ||
2 | 标准图 | 2 | 标准图 |
3 | 3 | ||
4 | </view> | 4 | </view> |
5 | + | ||
6 | + | ||
7 | + | ||
5 | <view class="biaozhaunbox"> | 8 | <view class="biaozhaunbox"> |
6 | - <view class="biaozhuanitem" wx:for="{{banner}}" wx:key="" bindtap='viewImg' data-index="{{index}}"> | ||
7 | - <image src="{{item.url}}"></image> | 9 | + |
10 | + <view class="nodataimg" wx:if="{{banner.length==0}}"> | ||
11 | + <image src="/img/wushuju.png"></image> | ||
8 | </view> | 12 | </view> |
9 | - | 13 | + <block wx:else> |
14 | + <view class="biaozhuanitem" wx:for="{{banner}}" wx:key="" bindtap='viewImg' data-index="{{index}}"> | ||
15 | + <image src="{{item.url}}"></image> | ||
16 | + </view> | ||
17 | + </block> | ||
10 | </view> | 18 | </view> |
11 | 19 | ||
12 | 20 | ||
@@ -16,8 +24,12 @@ | @@ -16,8 +24,12 @@ | ||
16 | 24 | ||
17 | </view> | 25 | </view> |
18 | <view class="biaozhaunbox"> | 26 | <view class="biaozhaunbox"> |
19 | - <view class="biaozhuanitem" wx:for="{{picture}}" wx:key='' bindtap='viewImg1' data-index="{{index}}"> | ||
20 | - <image src="{{item.url}}"></image> | 27 | + <view class="nodataimg" wx:if="{{picture.length==0}}"> |
28 | + <image src="/img/wushuju.png"></image> | ||
21 | </view> | 29 | </view> |
22 | - | 30 | + <block wx:else> |
31 | + <view class="biaozhuanitem" wx:for="{{picture}}" wx:key='' bindtap='viewImg1' data-index="{{index}}"> | ||
32 | + <image src="{{item.url}}"></image> | ||
33 | + </view> | ||
34 | + </block> | ||
23 | </view> | 35 | </view> |
1 | // pages/homeblock/jiuzidian/jiuzidian.js | 1 | // pages/homeblock/jiuzidian/jiuzidian.js |
2 | var WxParse = require('../../../wxParse/wxParse.js'); | 2 | var WxParse = require('../../../wxParse/wxParse.js'); |
3 | -const app=getApp() | 3 | +const app = getApp() |
4 | Page({ | 4 | Page({ |
5 | 5 | ||
6 | /** | 6 | /** |
@@ -10,63 +10,75 @@ Page({ | @@ -10,63 +10,75 @@ Page({ | ||
10 | navarr: [], | 10 | navarr: [], |
11 | 11 | ||
12 | current: 0, | 12 | current: 0, |
13 | - url:'', | ||
14 | - kind:0, | ||
15 | - picindex:0, | ||
16 | - id:'', | ||
17 | - wineinfo:'', | ||
18 | - selectid:-1, | ||
19 | - canshu:[], | ||
20 | - qiye:[], | ||
21 | - jiushi:[], | 13 | + url: '', |
14 | + kind: 0, | ||
15 | + picindex: 0, | ||
16 | + id: '', | ||
17 | + wineinfo: '', | ||
18 | + selectid: -1, | ||
19 | + canshu: [], | ||
20 | + qiye: [], | ||
21 | + jiushi: [], | ||
22 | jiushiarr: [], | 22 | jiushiarr: [], |
23 | - zhuanye:[], | ||
24 | - jiben:[], | ||
25 | - jiushishow:true, | ||
26 | - othercontent:[], | ||
27 | - qiyearr:[], | ||
28 | - score:'', | ||
29 | - panorama:[], | ||
30 | - imglogo:'', | ||
31 | - videoimg:'' | ||
32 | - | 23 | + zhuanye: [], |
24 | + jiben: [], | ||
25 | + jiushishow: true, | ||
26 | + othercontent: [], | ||
27 | + qiyearr: [], | ||
28 | + score: '', | ||
29 | + panorama: [], | ||
30 | + imglogo: '', | ||
31 | + videoimg: '', | ||
32 | + autoplay: true, | ||
33 | + interval: 2000, | ||
34 | + duration: 1000, | ||
35 | + currentSwiper: 0, | ||
36 | + | ||
33 | }, | 37 | }, |
34 | 38 | ||
35 | /** | 39 | /** |
36 | * 生命周期函数--监听页面加载 | 40 | * 生命周期函数--监听页面加载 |
37 | */ | 41 | */ |
38 | - onLoad: function (options) { | 42 | + onLoad: function(options) { |
43 | + let that = this; | ||
44 | + setTimeout(function () { | ||
45 | + that.setData({ | ||
46 | + url: app.globalData.url | ||
47 | + }) | ||
48 | + }, 1000) | ||
49 | + | ||
39 | console.log(options) | 50 | console.log(options) |
40 | this.setData({ | 51 | this.setData({ |
41 | - url: app.globalData.url, | ||
42 | - id:options.id, | ||
43 | - wineinfo:'' | 52 | + |
53 | + id: options.id, | ||
54 | + wineinfo: '' | ||
44 | }) | 55 | }) |
45 | 56 | ||
46 | - | ||
47 | - this.getwinedetail(); | ||
48 | - let token=wx.getStorageSync("token"); | ||
49 | - if(token==''){ | 57 | + |
58 | + | ||
59 | + let token = wx.getStorageSync("token"); | ||
60 | + if (token == '') { | ||
50 | wx.navigateTo({ | 61 | wx.navigateTo({ |
51 | - url: '/pages/login/login?id=' + this.data.id+'&type=' +2,//type=2酒字典详情页 | 62 | + url: '/pages/login/login?id=' + this.data.id + '&type=' + 2, //type=2酒字典详情页 |
52 | }) | 63 | }) |
53 | 64 | ||
54 | wx.setStorageSync("url", "/pages/homeblock/jiuzidian/jiuzidian") | 65 | wx.setStorageSync("url", "/pages/homeblock/jiuzidian/jiuzidian") |
55 | } | 66 | } |
56 | }, | 67 | }, |
57 | //获取酒品详情 | 68 | //获取酒品详情 |
58 | - getwinedetail(){ | 69 | + getwinedetail() { |
59 | let that = this; | 70 | let that = this; |
60 | - let url = 'index/Wine/detail', params = { | ||
61 | - wine_id: that.data.id, | 71 | + let url = 'index/Wine/detail', |
72 | + params = { | ||
73 | + wine_id: that.data.id, | ||
62 | 74 | ||
63 | - } | 75 | + } |
64 | app.post(url, params).then((res) => { | 76 | app.post(url, params).then((res) => { |
65 | console.log(res); | 77 | console.log(res); |
66 | that.setData({ | 78 | that.setData({ |
67 | - wineinfo:res, | 79 | + wineinfo: res, |
68 | navarr: res.wine_attr, | 80 | navarr: res.wine_attr, |
69 | - score: res.score*10, | 81 | + score: res.score * 10, |
70 | panorama: res.panorama, | 82 | panorama: res.panorama, |
71 | imglogo: res.panorama[0].product_thumbnail, | 83 | imglogo: res.panorama[0].product_thumbnail, |
72 | videoimg: res.panorama[0].product_url, | 84 | videoimg: res.panorama[0].product_url, |
@@ -74,23 +86,23 @@ Page({ | @@ -74,23 +86,23 @@ Page({ | ||
74 | 86 | ||
75 | wx.setStorageSync("quanurl", res.panorama[0].product_url) | 87 | wx.setStorageSync("quanurl", res.panorama[0].product_url) |
76 | 88 | ||
77 | - | 89 | + |
78 | 90 | ||
79 | let newnavarr = that.data.navarr; | 91 | let newnavarr = that.data.navarr; |
80 | - for (var obj of newnavarr){ | ||
81 | - if(obj.id==-1){ | 92 | + for (var obj of newnavarr) { |
93 | + if (obj.id == -1) { | ||
82 | that.setData({ | 94 | that.setData({ |
83 | - canshu:obj.value | 95 | + canshu: obj.value |
84 | }) | 96 | }) |
85 | - }else if(obj.id==-2){ | ||
86 | - | 97 | + } else if (obj.id == -2) { |
98 | + | ||
87 | that.setData({ | 99 | that.setData({ |
88 | - qiye:obj.value[0].attr, | ||
89 | - qiyearr:obj.value[0] | 100 | + qiye: obj.value[0].attr, |
101 | + qiyearr: obj.value[0] | ||
90 | }) | 102 | }) |
91 | - | 103 | + |
92 | let newqiye = obj.value[0].attr; | 104 | let newqiye = obj.value[0].attr; |
93 | - | 105 | + |
94 | for (let i = 0; i < newqiye.length; i++) { | 106 | for (let i = 0; i < newqiye.length; i++) { |
95 | newqiye[i].show = true | 107 | newqiye[i].show = true |
96 | 108 | ||
@@ -106,12 +118,12 @@ Page({ | @@ -106,12 +118,12 @@ Page({ | ||
106 | qiye: newqiye | 118 | qiye: newqiye |
107 | }) | 119 | }) |
108 | 120 | ||
109 | - | 121 | + |
110 | 122 | ||
111 | } else if (obj.id == -3) { | 123 | } else if (obj.id == -3) { |
112 | that.setData({ | 124 | that.setData({ |
113 | - jiushi: obj.value[0], | ||
114 | - jiushiarr:obj.value[0].attr | 125 | + jiushi: obj.value[0], |
126 | + jiushiarr: obj.value[0].attr | ||
115 | }) | 127 | }) |
116 | 128 | ||
117 | let newjiushiarr = obj.value[0].attr | 129 | let newjiushiarr = obj.value[0].attr |
@@ -129,9 +141,9 @@ Page({ | @@ -129,9 +141,9 @@ Page({ | ||
129 | } | 141 | } |
130 | 142 | ||
131 | that.setData({ | 143 | that.setData({ |
132 | - jiushiarr:newjiushiarr | 144 | + jiushiarr: newjiushiarr |
133 | }) | 145 | }) |
134 | - | 146 | + |
135 | } else if (obj.id == -4) { | 147 | } else if (obj.id == -4) { |
136 | that.setData({ | 148 | that.setData({ |
137 | zhuanye: obj.value | 149 | zhuanye: obj.value |
@@ -157,7 +169,7 @@ Page({ | @@ -157,7 +169,7 @@ Page({ | ||
157 | that.setData({ | 169 | that.setData({ |
158 | jiben: obj.value | 170 | jiben: obj.value |
159 | }) | 171 | }) |
160 | - }else{ | 172 | + } else { |
161 | that.setData({ | 173 | that.setData({ |
162 | othercontent: obj.value | 174 | othercontent: obj.value |
163 | }) | 175 | }) |
@@ -187,25 +199,83 @@ Page({ | @@ -187,25 +199,83 @@ Page({ | ||
187 | 199 | ||
188 | }) | 200 | }) |
189 | }, | 201 | }, |
190 | - jiushinfoshow(){ | 202 | + //酒师点赞和取消点赞 |
203 | + dianzan(e) { | ||
204 | + let id = e.currentTarget.dataset.id; | ||
205 | + | ||
206 | + | ||
207 | + let that = this; | ||
208 | + let url = 'index/Common/good', | ||
209 | + params = { | ||
210 | + sort: 3, | ||
211 | + id: id | ||
212 | + | ||
213 | + } | ||
214 | + app.post(url, params).then((res) => { | ||
215 | + console.log(res); | ||
216 | + wx.showToast({ | ||
217 | + title: res, | ||
218 | + icon: 'none' | ||
219 | + }) | ||
220 | + | ||
221 | + | ||
222 | + let newjiushi = that.data.jiushi; | ||
223 | + console.log(newjiushi) | ||
224 | + | ||
225 | + if (newjiushi.is_good == 0) { | ||
226 | + | ||
227 | + newjiushi.is_good = 1 | ||
228 | + } else { | ||
229 | + newjiushi.is_good = 0 | ||
230 | + } | ||
231 | + that.setData({ | ||
232 | + jiushi: newjiushi | ||
233 | + }) | ||
234 | + console.log(that.data.jiushi) | ||
235 | + | ||
236 | + | ||
237 | + }).catch((err) => { | ||
238 | + | ||
239 | + }) | ||
240 | + | ||
241 | + }, | ||
242 | + | ||
243 | + //进入评论页面 | ||
244 | + ping(e) { | ||
245 | + // + '&winemaker_id=' + winemaker_id, | ||
246 | + let id = e.currentTarget.dataset.id; | ||
247 | + | ||
248 | + | ||
249 | + wx.navigateTo({ | ||
250 | + url: '/pages/myblock/pingjia/pingjia?type=' + 3 + '&winemaker_id=' + id | ||
251 | + }) | ||
252 | + }, | ||
253 | + | ||
254 | + swiperChange: function(e) { | ||
255 | + this.setData({ | ||
256 | + currentSwiper: e.detail.current | ||
257 | + }) | ||
258 | + }, | ||
259 | + jiushinfoshow() { | ||
191 | this.setData({ | 260 | this.setData({ |
192 | jiushishow: !this.data.jiushishow | 261 | jiushishow: !this.data.jiushishow |
193 | }) | 262 | }) |
194 | }, | 263 | }, |
195 | //关注酒师 | 264 | //关注酒师 |
196 | - attenjiushi(e){ | 265 | + attenjiushi(e) { |
197 | let that = this; | 266 | let that = this; |
198 | - let id=e.currentTarget.dataset.id | ||
199 | - let url = 'index/Common/concern', params = { | ||
200 | - sort: 2, | ||
201 | - id:id | 267 | + let id = e.currentTarget.dataset.id |
268 | + let url = 'index/Common/concern', | ||
269 | + params = { | ||
270 | + sort: 2, | ||
271 | + id: id | ||
202 | 272 | ||
203 | - } | 273 | + } |
204 | app.post(url, params).then((res) => { | 274 | app.post(url, params).then((res) => { |
205 | console.log(res); | 275 | console.log(res); |
206 | wx.showToast({ | 276 | wx.showToast({ |
207 | title: res, | 277 | title: res, |
208 | - icon:'none' | 278 | + icon: 'none' |
209 | }) | 279 | }) |
210 | 280 | ||
211 | that.getwinedetail() | 281 | that.getwinedetail() |
@@ -215,14 +285,15 @@ Page({ | @@ -215,14 +285,15 @@ Page({ | ||
215 | }) | 285 | }) |
216 | }, | 286 | }, |
217 | //关注企业 | 287 | //关注企业 |
218 | - attenqiye(e){ | 288 | + attenqiye(e) { |
219 | let that = this; | 289 | let that = this; |
220 | let id = e.currentTarget.dataset.id | 290 | let id = e.currentTarget.dataset.id |
221 | - let url = 'index/Common/concern', params = { | ||
222 | - sort: 1, | ||
223 | - id: id | 291 | + let url = 'index/Common/concern', |
292 | + params = { | ||
293 | + sort: 1, | ||
294 | + id: id | ||
224 | 295 | ||
225 | - } | 296 | + } |
226 | app.post(url, params).then((res) => { | 297 | app.post(url, params).then((res) => { |
227 | console.log(res); | 298 | console.log(res); |
228 | wx.showToast({ | 299 | wx.showToast({ |
@@ -236,25 +307,25 @@ Page({ | @@ -236,25 +307,25 @@ Page({ | ||
236 | 307 | ||
237 | }) | 308 | }) |
238 | }, | 309 | }, |
239 | - selectkind(e){ | 310 | + selectkind(e) { |
240 | this.setData({ | 311 | this.setData({ |
241 | - kind:e.currentTarget.dataset.kind | 312 | + kind: e.currentTarget.dataset.kind |
242 | }) | 313 | }) |
243 | let kind = e.currentTarget.dataset.kind; | 314 | let kind = e.currentTarget.dataset.kind; |
244 | - if(kind==0){ | 315 | + if (kind == 0) { |
245 | this.setData({ | 316 | this.setData({ |
246 | imglogo: this.data.panorama[0].product_thumbnail, | 317 | imglogo: this.data.panorama[0].product_thumbnail, |
247 | videoimg: this.data.panorama[0].product_url | 318 | videoimg: this.data.panorama[0].product_url |
248 | }) | 319 | }) |
249 | 320 | ||
250 | wx.setStorageSync("quanurl", this.data.panorama[0].product_url) | 321 | wx.setStorageSync("quanurl", this.data.panorama[0].product_url) |
251 | - }else if(kind==1){ | 322 | + } else if (kind == 1) { |
252 | this.setData({ | 323 | this.setData({ |
253 | imglogo: this.data.panorama[1].product_thumbnail, | 324 | imglogo: this.data.panorama[1].product_thumbnail, |
254 | videoimg: this.data.panorama[1].product_url | 325 | videoimg: this.data.panorama[1].product_url |
255 | }) | 326 | }) |
256 | wx.setStorageSync("quanurl", this.data.panorama[1].product_url) | 327 | wx.setStorageSync("quanurl", this.data.panorama[1].product_url) |
257 | - }else { | 328 | + } else { |
258 | this.setData({ | 329 | this.setData({ |
259 | imglogo: this.data.panorama[2].product_thumbnail, | 330 | imglogo: this.data.panorama[2].product_thumbnail, |
260 | videoimg: this.data.panorama[2].product_url | 331 | videoimg: this.data.panorama[2].product_url |
@@ -263,10 +334,10 @@ Page({ | @@ -263,10 +334,10 @@ Page({ | ||
263 | wx.setStorageSync("quanurl", this.data.panorama[2].product_url) | 334 | wx.setStorageSync("quanurl", this.data.panorama[2].product_url) |
264 | } | 335 | } |
265 | }, | 336 | }, |
266 | - entervideo(e){ | 337 | + entervideo(e) { |
267 | console.log(e) | 338 | console.log(e) |
268 | - let url=e.currentTarget.dataset.url; | ||
269 | - wx.setStorageSync('quanurl', url) | 339 | + let url = e.currentTarget.dataset.url; |
340 | + wx.setStorageSync('quanurl', url) | ||
270 | wx.navigateTo({ | 341 | wx.navigateTo({ |
271 | url: '/pages/homeblock/bofangexample/bofangexample', | 342 | url: '/pages/homeblock/bofangexample/bofangexample', |
272 | }) | 343 | }) |
@@ -275,35 +346,35 @@ Page({ | @@ -275,35 +346,35 @@ Page({ | ||
275 | console.log(e) | 346 | console.log(e) |
276 | this.setData({ | 347 | this.setData({ |
277 | current: e.currentTarget.dataset.idx, | 348 | current: e.currentTarget.dataset.idx, |
278 | - selectid:e.currentTarget.dataset.id | 349 | + selectid: e.currentTarget.dataset.id |
279 | }) | 350 | }) |
280 | console.log(this.data.selectid) | 351 | console.log(this.data.selectid) |
281 | }, | 352 | }, |
282 | - selectpic(e){ | 353 | + selectpic(e) { |
283 | let pic = e.currentTarget.dataset.pic | 354 | let pic = e.currentTarget.dataset.pic |
284 | this.setData({ | 355 | this.setData({ |
285 | - picindex:e.currentTarget.dataset.pic | 356 | + picindex: e.currentTarget.dataset.pic |
286 | }) | 357 | }) |
287 | 358 | ||
288 | - if (pic==1){ | 359 | + if (pic == 1) { |
289 | wx.navigateTo({ | 360 | wx.navigateTo({ |
290 | - url: '/pages/homeblock/guanimg/guanimg?wineid='+this.data.id, | 361 | + url: '/pages/homeblock/guanimg/guanimg?wineid=' + this.data.id, |
291 | }) | 362 | }) |
292 | - }else if(pic==2){ | 363 | + } else if (pic == 2) { |
293 | wx.navigateTo({ | 364 | wx.navigateTo({ |
294 | - url: '/pages/homeblock/shipaiimg/shipaiimg?wineid='+this.data.id, | 365 | + url: '/pages/homeblock/shipaiimg/shipaiimg?wineid=' + this.data.id, |
295 | }) | 366 | }) |
296 | - }else if(pic==3){ | 367 | + } else if (pic == 3) { |
297 | wx.navigateTo({ | 368 | wx.navigateTo({ |
298 | - url: '/pages/homeblock/shortvideo/shortvideo?wineid='+this.data.id, | 369 | + url: '/pages/homeblock/shortvideo/shortvideo?wineid=' + this.data.id, |
299 | }) | 370 | }) |
300 | - }else if(pic==0){ | 371 | + } else if (pic == 0) { |
301 | wx.navigateTo({ | 372 | wx.navigateTo({ |
302 | url: '/pages/homeblock/bofangexample/bofangexample', | 373 | url: '/pages/homeblock/bofangexample/bofangexample', |
303 | }) | 374 | }) |
304 | } | 375 | } |
305 | 376 | ||
306 | - | 377 | + |
307 | }, | 378 | }, |
308 | 379 | ||
309 | showinfo(e) { | 380 | showinfo(e) { |
@@ -320,7 +391,7 @@ Page({ | @@ -320,7 +391,7 @@ Page({ | ||
320 | }) | 391 | }) |
321 | }, | 392 | }, |
322 | 393 | ||
323 | - showjiushi(e){ | 394 | + showjiushi(e) { |
324 | let idx = e.currentTarget.dataset.idx; | 395 | let idx = e.currentTarget.dataset.idx; |
325 | console.log(idx) | 396 | console.log(idx) |
326 | let newjiushiarr = this.data.jiushiarr; | 397 | let newjiushiarr = this.data.jiushiarr; |
@@ -334,7 +405,7 @@ Page({ | @@ -334,7 +405,7 @@ Page({ | ||
334 | }) | 405 | }) |
335 | }, | 406 | }, |
336 | 407 | ||
337 | - showzhuanye(e){ | 408 | + showzhuanye(e) { |
338 | let idx = e.currentTarget.dataset.idx; | 409 | let idx = e.currentTarget.dataset.idx; |
339 | console.log(idx) | 410 | console.log(idx) |
340 | let newzhuanye = this.data.zhuanye; | 411 | let newzhuanye = this.data.zhuanye; |
@@ -349,14 +420,14 @@ Page({ | @@ -349,14 +420,14 @@ Page({ | ||
349 | }, | 420 | }, |
350 | 421 | ||
351 | //评价页面 | 422 | //评价页面 |
352 | - evalute(){ | ||
353 | - | 423 | + evalute() { |
424 | + | ||
354 | wx.navigateTo({ | 425 | wx.navigateTo({ |
355 | - url: '/pages/homeblock/evalutecontent/evalutecontent?wineid='+this.data.id, | 426 | + url: '/pages/homeblock/evalutecontent/evalutecontent?wineid=' + this.data.id, |
356 | }) | 427 | }) |
357 | }, | 428 | }, |
358 | //进入属性页面 | 429 | //进入属性页面 |
359 | - entershu(){ | 430 | + entershu() { |
360 | wx.navigateTo({ | 431 | wx.navigateTo({ |
361 | url: '/pages/homeblock/shuxing/shuxing', | 432 | url: '/pages/homeblock/shuxing/shuxing', |
362 | }) | 433 | }) |
@@ -365,63 +436,73 @@ Page({ | @@ -365,63 +436,73 @@ Page({ | ||
365 | /** | 436 | /** |
366 | * 生命周期函数--监听页面初次渲染完成 | 437 | * 生命周期函数--监听页面初次渲染完成 |
367 | */ | 438 | */ |
368 | - onReady: function () { | 439 | + onReady: function() { |
369 | 440 | ||
370 | }, | 441 | }, |
371 | 442 | ||
372 | /** | 443 | /** |
373 | * 生命周期函数--监听页面显示 | 444 | * 生命周期函数--监听页面显示 |
374 | */ | 445 | */ |
375 | - onShow: function () { | ||
376 | - | 446 | + onShow: function() { |
447 | + this.getwinedetail(); | ||
377 | }, | 448 | }, |
378 | 449 | ||
379 | /** | 450 | /** |
380 | * 生命周期函数--监听页面隐藏 | 451 | * 生命周期函数--监听页面隐藏 |
381 | */ | 452 | */ |
382 | - onHide: function () { | 453 | + onHide: function() { |
383 | 454 | ||
384 | }, | 455 | }, |
385 | 456 | ||
386 | /** | 457 | /** |
387 | * 生命周期函数--监听页面卸载 | 458 | * 生命周期函数--监听页面卸载 |
388 | */ | 459 | */ |
389 | - onUnload: function () { | 460 | + onUnload: function() { |
390 | 461 | ||
391 | }, | 462 | }, |
392 | 463 | ||
393 | /** | 464 | /** |
394 | * 页面相关事件处理函数--监听用户下拉动作 | 465 | * 页面相关事件处理函数--监听用户下拉动作 |
395 | */ | 466 | */ |
396 | - onPullDownRefresh: function () { | 467 | + onPullDownRefresh: function() { |
397 | 468 | ||
398 | }, | 469 | }, |
399 | 470 | ||
400 | /** | 471 | /** |
401 | * 页面上拉触底事件的处理函数 | 472 | * 页面上拉触底事件的处理函数 |
402 | */ | 473 | */ |
403 | - onReachBottom: function () { | 474 | + onReachBottom: function() { |
404 | 475 | ||
405 | }, | 476 | }, |
406 | 477 | ||
407 | /** | 478 | /** |
408 | * 用户点击右上角分享 | 479 | * 用户点击右上角分享 |
409 | */ | 480 | */ |
410 | - onShareAppMessage: function () { | 481 | + onShareAppMessage: function(e) { |
411 | let that = this; | 482 | let that = this; |
483 | + let id = e.target.dataset.id; | ||
484 | + | ||
485 | + let type = e.target.dataset.type; | ||
486 | + let url='' | ||
487 | + | ||
488 | + if (type == 3) { | ||
489 | + url = '/pages/homeblock/niangjiuteacher/niangjiuteacher?id=' + id | ||
490 | + } else { | ||
491 | + url = '/pages/homeblock/jiuzidian/jiuzidian?id=' + that.data.id | ||
492 | + } | ||
493 | + | ||
412 | 494 | ||
413 | - let url = '/pages/homeblock/jiuzidian/jiuzidian?id=' + that.data.id | ||
414 | return { | 495 | return { |
415 | title: '发现', // 转发后 所显示的title | 496 | title: '发现', // 转发后 所显示的title |
416 | // path: '/pages/home/buildtextdetail/buildtextdetail?buildid='+buildid+'&gettoken='+newtoken, // 相对的路径 | 497 | // path: '/pages/home/buildtextdetail/buildtextdetail?buildid='+buildid+'&gettoken='+newtoken, // 相对的路径 |
417 | 498 | ||
418 | - path: url,//建档攻略分享1 | 499 | + path: url, //建档攻略分享1 |
419 | // path:'', | 500 | // path:'', |
420 | - success: (res) => { // 成功后要做的事情 | 501 | + success: (res) => { // 成功后要做的事情 |
421 | console.log(res) | 502 | console.log(res) |
422 | 503 | ||
423 | }, | 504 | }, |
424 | - fail: function (res) { | 505 | + fail: function(res) { |
425 | // 分享失败 | 506 | // 分享失败 |
426 | console.log(res) | 507 | console.log(res) |
427 | } | 508 | } |
@@ -85,11 +85,17 @@ | @@ -85,11 +85,17 @@ | ||
85 | 85 | ||
86 | <!-- 基本参数 --> | 86 | <!-- 基本参数 --> |
87 | <view class="jibencanshu" wx:if="{{selectid==-1}}"> | 87 | <view class="jibencanshu" wx:if="{{selectid==-1}}"> |
88 | - <view class="canshuitem" wx:for='{{canshu}}' wx:key=""> | ||
89 | - <view class="canleft">{{item.name}}</view> | ||
90 | - <view class='cantext'>{{item.content}}</view> | 88 | + |
89 | + <view class="cannodataimg" wx:if="{{canshu.length==0}}"> | ||
90 | + <image src="/img/wushuju.png"></image> | ||
91 | </view> | 91 | </view> |
92 | 92 | ||
93 | + <block wx:else> | ||
94 | + <view class="canshuitem" wx:for='{{canshu}}' wx:key=""> | ||
95 | + <view class="canleft">{{item.name}}</view> | ||
96 | + <view class='cantext'>{{item.content}}</view> | ||
97 | + </view> | ||
98 | + </block> | ||
93 | </view> | 99 | </view> |
94 | 100 | ||
95 | <!-- 生产企业 --> | 101 | <!-- 生产企业 --> |
@@ -108,30 +114,53 @@ | @@ -108,30 +114,53 @@ | ||
108 | 114 | ||
109 | </view> | 115 | </view> |
110 | 116 | ||
117 | + <view class="swiper_image"> | ||
118 | + <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" class="swiper_item_img" bindchange="swiperChange" circular="true"> | ||
119 | + <block wx:for="{{qiyearr.banner}}" wx:key="doct"> | ||
120 | + <swiper-item> | ||
121 | + <image src="{{item.url}}" data-index='{{index}}' class="slide-image" width="355" height="150" /> | ||
122 | + </swiper-item> | ||
123 | + </block> | ||
124 | + </swiper> | ||
125 | + | ||
126 | + <view class="dots"> | ||
127 | + <block wx:for="{{qiyearr.banner}}" wx:key=""> | ||
128 | + <view class="dot{{index == currentSwiper ? ' active' : ''}}"></view> | ||
129 | + </block> | ||
130 | + </view> | ||
131 | + | ||
132 | + </view> | ||
133 | + | ||
111 | <view class="brandbox"> | 134 | <view class="brandbox"> |
112 | - <view class="brandboxitem" wx:for="{{qiye}}" wx:key='' wx:for-index="idxs"> | ||
113 | - <view class="boxtop"> | ||
114 | - <view class="boxtopleft"> | ||
115 | - {{item.name}} | ||
116 | - </view> | ||
117 | - <view class="boxright" bindtap="showinfo" data-idx="{{idxs}}"> | ||
118 | - <image src="{{url}}aicon_53x.png" wx:if="{{item.show}}"></image> | ||
119 | - <image src="{{url}}aicon_52x.png" wx:else></image> | 135 | + |
136 | + <view class="cannodataimg" wx:if="{{qiye.length==0}}"> | ||
137 | + <image src="/img/wushuju.png"></image> | ||
138 | + </view> | ||
139 | + | ||
140 | + <block wx:else> | ||
141 | + <view class="brandboxitem" wx:for="{{qiye}}" wx:key='' wx:for-index="idxs"> | ||
142 | + <view class="boxtop" bindtap="showinfo" data-idx="{{idxs}}"> | ||
143 | + <view class="boxtopleft"> | ||
144 | + {{item.name}} | ||
145 | + </view> | ||
146 | + <view class="boxright"> | ||
147 | + <image src="{{url}}aicon_53x.png" wx:if="{{item.show}}"></image> | ||
148 | + <image src="{{url}}aicon_52x.png" wx:else></image> | ||
149 | + </view> | ||
120 | </view> | 150 | </view> |
121 | - </view> | ||
122 | 151 | ||
123 | - <view class="brandtext" wx:if="{{item.show}}"> | ||
124 | - <block wx:for="{{artileList}}" wx:for-item="item" wx:for-index="idx" wx:key=''> | ||
125 | - <block wx:if="{{idxs==idx}}"> | ||
126 | - <template is="wxParse" data="{{wxParseData:item}}" /> | 152 | + <view class="brandtext" wx:if="{{item.show}}"> |
153 | + <block wx:for="{{artileList}}" wx:for-item="item" wx:for-index="idx" wx:key=''> | ||
154 | + <block wx:if="{{idxs==idx}}"> | ||
155 | + <template is="wxParse" data="{{wxParseData:item}}" /> | ||
156 | + </block> | ||
127 | </block> | 157 | </block> |
128 | - </block> | ||
129 | - </view> | ||
130 | - | 158 | + </view> |
131 | 159 | ||
132 | 160 | ||
133 | - </view> | ||
134 | 161 | ||
162 | + </view> | ||
163 | + </block> | ||
135 | 164 | ||
136 | 165 | ||
137 | </view> | 166 | </view> |
@@ -162,6 +191,33 @@ | @@ -162,6 +191,33 @@ | ||
162 | </view> | 191 | </view> |
163 | </view> | 192 | </view> |
164 | 193 | ||
194 | + <view class="winebottonright"> | ||
195 | + | ||
196 | + <view class="winerighttou"> | ||
197 | + <view class="winerighttouimg" catchtap='dianzan' data-id="{{jiushi.id}}" > | ||
198 | + <image src="{{url}}aicon_71x.png" wx:if="{{jiushi.is_good==1}}"></image> | ||
199 | + <image src="{{url}}aicon_66x.png" wx:else></image> | ||
200 | + | ||
201 | + </view> | ||
202 | + <view class="winezan">{{jiushi.good_count}}</view> | ||
203 | + </view> | ||
204 | + <view class="winerighttou" bindtap="ping" data-id="{{jiushi.id}}" > | ||
205 | + <view class="winerighttouimg"> | ||
206 | + <image src="{{url}}aicon_67x.png"></image> | ||
207 | + </view> | ||
208 | + <view class="winezan">{{jiushi.comment_count}}</view> | ||
209 | + </view> | ||
210 | + | ||
211 | + <view class="winerighttou"> | ||
212 | + <view class="winerighttouimg" catchtap='share'> | ||
213 | + <image src="{{url}}aicon_68x.png"></image> | ||
214 | + <button class="lj_share" open-type='share' data-id="{{jiushi.id}}" data-type="3"></button> | ||
215 | + </view> | ||
216 | + | ||
217 | + | ||
218 | + </view> | ||
219 | + </view> | ||
220 | + | ||
165 | <view class="wineimg"> | 221 | <view class="wineimg"> |
166 | <image src="{{jiushi.thumb}}"></image> | 222 | <image src="{{jiushi.thumb}}"></image> |
167 | </view> | 223 | </view> |
@@ -169,11 +225,11 @@ | @@ -169,11 +225,11 @@ | ||
169 | <view class="niangjiubox"> | 225 | <view class="niangjiubox"> |
170 | 226 | ||
171 | <view class="brandboxitem"> | 227 | <view class="brandboxitem"> |
172 | - <view class="boxtop"> | 228 | + <view class="boxtop" bindtap="jiushinfoshow"> |
173 | <view class="boxtopleft"> | 229 | <view class="boxtopleft"> |
174 | 基本信息 | 230 | 基本信息 |
175 | </view> | 231 | </view> |
176 | - <view class="boxright" bindtap="jiushinfoshow"> | 232 | + <view class="boxright"> |
177 | <image src="{{url}}aicon_53x.png" wx:if="{{jiushishow}}"></image> | 233 | <image src="{{url}}aicon_53x.png" wx:if="{{jiushishow}}"></image> |
178 | <image src="{{url}}aicon_52x.png" wx:else></image> | 234 | <image src="{{url}}aicon_52x.png" wx:else></image> |
179 | </view> | 235 | </view> |
@@ -197,32 +253,32 @@ | @@ -197,32 +253,32 @@ | ||
197 | 253 | ||
198 | 254 | ||
199 | </view> | 255 | </view> |
200 | - <view class="brandboxitem" wx:for="{{jiushiarr}}" wx:key='' wx:for-index="idxs"> | ||
201 | - <view class="boxtop"> | ||
202 | - <view class="boxtopleft"> | ||
203 | - {{item.name}} | ||
204 | - </view> | ||
205 | - <view class="boxright" bindtap="showjiushi" data-idx="{{idxs}}"> | ||
206 | - <image src="{{url}}aicon_53x.png" wx:if="{{item.show}}"></image> | ||
207 | - <image src="{{url}}aicon_52x.png" wx:else></image> | ||
208 | - </view> | ||
209 | - </view> | ||
210 | - | ||
211 | - <view class="brandtext" wx:if="{{item.show}}"> | ||
212 | - | ||
213 | - <block wx:for="{{artileList1}}" wx:for-item="item" wx:for-index="idx" wx:key=''> | ||
214 | - <block wx:if="{{idxs==idx}}"> | ||
215 | - <template is="wxParse" data="{{wxParseData:item}}" /> | ||
216 | - </block> | ||
217 | - </block> | ||
218 | - | ||
219 | 256 | ||
257 | + <view class="cannodataimg" wx:if="{{jiushiarr.length==0}}"> | ||
258 | + <image src="/img/wushuju.png"></image> | ||
259 | + </view> | ||
220 | 260 | ||
261 | + <block wx:else> | ||
262 | + <view class="brandboxitem" wx:for="{{jiushiarr}}" wx:key='' wx:for-index="idxs"> | ||
263 | + <view class="boxtop" bindtap="showjiushi" data-idx="{{idxs}}"> | ||
264 | + <view class="boxtopleft"> | ||
265 | + {{item.name}} | ||
266 | + </view> | ||
267 | + <view class="boxright"> | ||
268 | + <image src="{{url}}aicon_53x.png" wx:if="{{item.show}}"></image> | ||
269 | + <image src="{{url}}aicon_52x.png" wx:else></image> | ||
270 | + </view> | ||
271 | + </view> | ||
221 | 272 | ||
273 | + <view class="brandtext" wx:if="{{item.show}}"> | ||
274 | + <block wx:for="{{artileList1}}" wx:for-item="item" wx:for-index="idx" wx:key=''> | ||
275 | + <block wx:if="{{idxs==idx}}"> | ||
276 | + <template is="wxParse" data="{{wxParseData:item}}" /> | ||
277 | + </block> | ||
278 | + </block> | ||
279 | + </view> | ||
222 | </view> | 280 | </view> |
223 | - | ||
224 | - | ||
225 | - </view> | 281 | + </block> |
226 | 282 | ||
227 | 283 | ||
228 | 284 | ||
@@ -231,30 +287,36 @@ | @@ -231,30 +287,36 @@ | ||
231 | <!-- 专业品评 --> | 287 | <!-- 专业品评 --> |
232 | <view class="jiuqiye" wx:elif="{{selectid==-4}}"> | 288 | <view class="jiuqiye" wx:elif="{{selectid==-4}}"> |
233 | <view class="brandbox"> | 289 | <view class="brandbox"> |
234 | - <view class="brandboxitem" wx:for="{{zhuanye}}" wx:key='' wx:for-index="idxs"> | ||
235 | - <view class="boxtop"> | ||
236 | - <view class="boxtopleft"> | ||
237 | - {{item.title}} | ||
238 | - </view> | ||
239 | - <view class="boxright" bindtap="showzhuanye" data-idx="{{idxs}}"> | ||
240 | - <image src="{{url}}aicon_53x.png" wx:if="{{item.show}}"></image> | ||
241 | - <image src="{{url}}aicon_52x.png" wx:else></image> | 290 | + |
291 | + <view class="cannodataimg" wx:if="{{zhuanye.length==0}}"> | ||
292 | + <image src="/img/wushuju.png"></image> | ||
293 | + </view> | ||
294 | + | ||
295 | + <block wx:else> | ||
296 | + <view class="brandboxitem" wx:for="{{zhuanye}}" wx:key='' wx:for-index="idxs"> | ||
297 | + <view class="boxtop" bindtap="showzhuanye" data-idx="{{idxs}}"> | ||
298 | + <view class="boxtopleft"> | ||
299 | + {{item.title}} | ||
300 | + </view> | ||
301 | + <view class="boxright"> | ||
302 | + <image src="{{url}}aicon_53x.png" wx:if="{{item.show}}"></image> | ||
303 | + <image src="{{url}}aicon_52x.png" wx:else></image> | ||
304 | + </view> | ||
242 | </view> | 305 | </view> |
243 | - </view> | ||
244 | 306 | ||
245 | - <view class="brandtext" wx:if="{{item.show}}"> | ||
246 | - <block wx:for="{{artileList2}}" wx:for-item="item" wx:for-index="idx" wx:key=''> | ||
247 | - <block wx:if="{{idxs==idx}}"> | ||
248 | - <template is="wxParse" data="{{wxParseData:item}}" /> | 307 | + <view class="brandtext" wx:if="{{item.show}}"> |
308 | + <block wx:for="{{artileList2}}" wx:for-item="item" wx:for-index="idx" wx:key=''> | ||
309 | + <block wx:if="{{idxs==idx}}"> | ||
310 | + <template is="wxParse" data="{{wxParseData:item}}" /> | ||
311 | + </block> | ||
249 | </block> | 312 | </block> |
250 | - </block> | ||
251 | - </view> | ||
252 | - | 313 | + </view> |
253 | 314 | ||
254 | 315 | ||
255 | - </view> | ||
256 | 316 | ||
317 | + </view> | ||
257 | 318 | ||
319 | + </block> | ||
258 | 320 | ||
259 | </view> | 321 | </view> |
260 | 322 | ||
@@ -263,14 +325,23 @@ | @@ -263,14 +325,23 @@ | ||
263 | <!-- 关键词 --> | 325 | <!-- 关键词 --> |
264 | 326 | ||
265 | <view class="keyword" wx:elif="{{selectid==-5}}"> | 327 | <view class="keyword" wx:elif="{{selectid==-5}}"> |
266 | - <view class="keyworditem" wx:for="{{jiben}}" wx:key="">{{item.content}}</view> | ||
267 | - | 328 | + <view class="cannodataimg" wx:if="{{jiben.length==0}}"> |
329 | + <image src="/img/wushuju.png"></image> | ||
330 | + </view> | ||
331 | + <block wx:else> | ||
332 | + <view class="keyworditem" wx:for="{{jiben}}" wx:key="">{{item.content}}</view> | ||
333 | + </block> | ||
268 | </view> | 334 | </view> |
269 | 335 | ||
270 | <view wx:else> | 336 | <view wx:else> |
271 | <view class="brandbox"> | 337 | <view class="brandbox"> |
272 | - <view class="brandboxitem" wx:for="{{othercontent}}" wx:key='' wx:for-index="idxs"> | ||
273 | - <!-- <view class="boxtop"> | 338 | + <view class="cannodataimg" wx:if="{{othercontent.length==0}}"> |
339 | + <image src="/img/wushuju.png"></image> | ||
340 | + </view> | ||
341 | + | ||
342 | + <block wx:else> | ||
343 | + <view class="brandboxitem" wx:for="{{othercontent}}" wx:key='' wx:for-index="idxs"> | ||
344 | + <!-- <view class="boxtop"> | ||
274 | <view class="boxtopleft"> | 345 | <view class="boxtopleft"> |
275 | {{item.name}} | 346 | {{item.name}} |
276 | </view> | 347 | </view> |
@@ -280,26 +351,23 @@ | @@ -280,26 +351,23 @@ | ||
280 | </view> | 351 | </view> |
281 | </view> --> | 352 | </view> --> |
282 | 353 | ||
283 | - <view class="brandtext" wx:if="{{item.show}}"> | ||
284 | - <block wx:for="{{artileList4}}" wx:for-item="item" wx:for-index="idx" wx:key=''> | ||
285 | - <block wx:if="{{idxs==idx}}"> | ||
286 | - <template is="wxParse" data="{{wxParseData:item}}" /> | 354 | + <view class="brandtext" wx:if="{{item.show}}"> |
355 | + <block wx:for="{{artileList4}}" wx:for-item="item" wx:for-index="idx" wx:key=''> | ||
356 | + <block wx:if="{{idxs==idx}}"> | ||
357 | + <template is="wxParse" data="{{wxParseData:item}}" /> | ||
358 | + </block> | ||
287 | </block> | 359 | </block> |
288 | - </block> | ||
289 | - </view> | ||
290 | - | ||
291 | - | ||
292 | - | ||
293 | - </view> | 360 | + </view> |
294 | 361 | ||
295 | 362 | ||
296 | 363 | ||
364 | + </view> | ||
365 | + </block> | ||
297 | </view> | 366 | </view> |
298 | - | ||
299 | </view> | 367 | </view> |
300 | 368 | ||
301 | <view class='pingjia' bindtap="evalute"> | 369 | <view class='pingjia' bindtap="evalute"> |
302 | - <image src="/img/aicon_29@2x.png"></image> | 370 | + <image src="/img/pingjia.png"></image> |
303 | 371 | ||
304 | <view class="pingcount">{{wineinfo.comment_count}}</view> | 372 | <view class="pingcount">{{wineinfo.comment_count}}</view> |
305 | <view class="pingname">评价</view> | 373 | <view class="pingname">评价</view> |
@@ -158,15 +158,15 @@ page{ | @@ -158,15 +158,15 @@ page{ | ||
158 | color:#FFFFFF; | 158 | color:#FFFFFF; |
159 | font-size:24rpx; | 159 | font-size:24rpx; |
160 | position: fixed; | 160 | position: fixed; |
161 | - bottom:113rpx; | 161 | + bottom:118rpx; |
162 | right:67rpx; | 162 | right:67rpx; |
163 | } | 163 | } |
164 | .pingname{ | 164 | .pingname{ |
165 | color:#FFFFFF; | 165 | color:#FFFFFF; |
166 | font-size:24rpx; | 166 | font-size:24rpx; |
167 | position: fixed; | 167 | position: fixed; |
168 | - bottom:81rpx; | ||
169 | - right:56rpx; | 168 | + bottom:89rpx; |
169 | + right:60rpx; | ||
170 | 170 | ||
171 | } | 171 | } |
172 | .page-section{ | 172 | .page-section{ |
@@ -177,4 +177,126 @@ page{ | @@ -177,4 +177,126 @@ page{ | ||
177 | } | 177 | } |
178 | .heig{ | 178 | .heig{ |
179 | height:100rpx; | 179 | height:100rpx; |
180 | +} | ||
181 | + | ||
182 | + .swiper_image{ | ||
183 | + width:750rpx; | ||
184 | + height:300rpx; | ||
185 | + font-size: 0; | ||
186 | + position: relative | ||
187 | + | ||
188 | + | ||
189 | +} | ||
190 | +.swiper_item_img{ | ||
191 | + | ||
192 | + height:300rpx; | ||
193 | +} | ||
194 | +.swiper_image image{ | ||
195 | + width:100%; | ||
196 | + height:100%; | ||
197 | + /* box-shadow:0px -1px 6px 0px rgba(212,137,96,0.11); */ | ||
198 | + /* border-radius:10px; */ | ||
199 | +} | ||
200 | +.swiper_item_img swiper-item{ | ||
201 | + width:750rpx; | ||
202 | + height:300rpx; | ||
203 | + | ||
204 | + | ||
205 | + | ||
206 | +} | ||
207 | +.swiper_item_img swiper-item image{ | ||
208 | + width:100%; | ||
209 | + height:100%; | ||
210 | + | ||
211 | +} | ||
212 | + | ||
213 | + | ||
214 | +.dots{ | ||
215 | + /* width: 156rpx; */ | ||
216 | + height: 36rpx; | ||
217 | + display: flex; | ||
218 | + flex-direction: row; | ||
219 | + position: absolute; | ||
220 | + justify-content: center; | ||
221 | + align-items: center; | ||
222 | + left: 0; | ||
223 | + right:0; | ||
224 | + bottom: 20rpx; | ||
225 | +} | ||
226 | +/*未选中时的小圆点样式 */ | ||
227 | +.dot{ | ||
228 | + width: 10rpx; | ||
229 | + height: 10rpx; | ||
230 | + border-radius: 50%; | ||
231 | + margin-right: 26rpx; | ||
232 | + background-color:#000000 | ||
233 | +} | ||
234 | +/*选中以后的小圆点样式 */ | ||
235 | +.active{ | ||
236 | + width: 10rpx; | ||
237 | + height: 10rpx; | ||
238 | + border-radius:50%; | ||
239 | + background-color: #E81825; | ||
240 | + | ||
241 | + | ||
242 | +} | ||
243 | + | ||
244 | +.winebottonright{ | ||
245 | + /* width:345rpx; */ | ||
246 | + display:flex; | ||
247 | + align-items: center; | ||
248 | + justify-content: space-between; | ||
249 | + padding: 0 32rpx; | ||
250 | + box-sizing: border-box | ||
251 | +} | ||
252 | +.winerighttouimg{ | ||
253 | + width:60rpx; | ||
254 | + height:28rpx; | ||
255 | + font-size: 0; | ||
256 | + position:relative; | ||
257 | + text-align: center | ||
258 | +} | ||
259 | +.winerighttouimg image{ | ||
260 | + width:30rpx; | ||
261 | + margin:0 auto; | ||
262 | +} | ||
263 | +.lj_share{ | ||
264 | + width:60rpx; | ||
265 | + height:40rpx; | ||
266 | + border:none; | ||
267 | + position: absolute; | ||
268 | + right:0; | ||
269 | + top:0; | ||
270 | + background: transparent | ||
271 | + | ||
272 | +} | ||
273 | +button::after{ | ||
274 | + border:none; | ||
275 | + background: transparent | ||
276 | +} | ||
277 | +.winerighttou{ | ||
278 | + display:flex; | ||
279 | + align-items: center | ||
280 | +} | ||
281 | +.wineeng{ | ||
282 | + color:#666666; | ||
283 | + font-size: 28rpx; | ||
284 | + margin-left: 20rpx; | ||
285 | +} | ||
286 | +.winezan{ | ||
287 | + color:#666666; | ||
288 | + font-size:28rpx; | ||
289 | + margin-left:10rpx; | ||
290 | + /* height:28rpx; | ||
291 | + line-height:28rpx; */ | ||
292 | + margin-top:1rpx; | ||
293 | +} | ||
294 | +.wineblock{ | ||
295 | + border-bottom: 14rpx solid #F2F2F2; | ||
296 | + padding-bottom: 30rpx; | ||
297 | +} | ||
298 | +.pin{ | ||
299 | + width:16rpx; | ||
300 | + height:32rpx; | ||
301 | + font-size: 0 | ||
180 | } | 302 | } |
@@ -9,7 +9,8 @@ Page({ | @@ -9,7 +9,8 @@ Page({ | ||
9 | data: { | 9 | data: { |
10 | url:'', | 10 | url:'', |
11 | id:'', | 11 | id:'', |
12 | - page:1 | 12 | + page:1, |
13 | + jiushishow:true | ||
13 | }, | 14 | }, |
14 | 15 | ||
15 | /** | 16 | /** |
@@ -168,6 +169,12 @@ Page({ | @@ -168,6 +169,12 @@ Page({ | ||
168 | url: '/pages/myblock/pingjia/pingjia?winemaker_id='+id+'&type='+3, | 169 | url: '/pages/myblock/pingjia/pingjia?winemaker_id='+id+'&type='+3, |
169 | }) | 170 | }) |
170 | }, | 171 | }, |
172 | + | ||
173 | + jiushinfoshow() { | ||
174 | + this.setData({ | ||
175 | + jiushishow: !this.data.jiushishow | ||
176 | + }) | ||
177 | + }, | ||
171 | /** | 178 | /** |
172 | * 生命周期函数--监听页面初次渲染完成 | 179 | * 生命周期函数--监听页面初次渲染完成 |
173 | */ | 180 | */ |
@@ -193,7 +200,7 @@ Page({ | @@ -193,7 +200,7 @@ Page({ | ||
193 | * 生命周期函数--监听页面卸载 | 200 | * 生命周期函数--监听页面卸载 |
194 | */ | 201 | */ |
195 | onUnload: function () { | 202 | onUnload: function () { |
196 | - | 203 | + wx.setStorageSync("guantype", 1) |
197 | }, | 204 | }, |
198 | 205 | ||
199 | /** | 206 | /** |
@@ -37,21 +37,83 @@ | @@ -37,21 +37,83 @@ | ||
37 | 37 | ||
38 | <view class="lastimg"> | 38 | <view class="lastimg"> |
39 | 39 | ||
40 | - <view class="jiuright"> | ||
41 | - <image src="{{url}}/aicon_68x.png"></image> | ||
42 | - <button class="lj_share" catchtap="buildshare" open-type='share'></button> | ||
43 | - </view> | ||
44 | - <view class="tiao">分享</view> | ||
45 | - | 40 | + <view class="jiuright"> |
41 | + <image src="{{url}}/aicon_68x.png"></image> | ||
42 | + <button class="lj_share" catchtap="buildshare" open-type='share'></button> | ||
43 | + </view> | ||
44 | + <view class="tiao">分享</view> | ||
45 | + | ||
46 | </view> | 46 | </view> |
47 | 47 | ||
48 | - | 48 | + |
49 | </view> | 49 | </view> |
50 | 50 | ||
51 | <view class="wineimg"> | 51 | <view class="wineimg"> |
52 | <image src="{{info.thumb}}"></image> | 52 | <image src="{{info.thumb}}"></image> |
53 | </view> | 53 | </view> |
54 | 54 | ||
55 | +<view class="niangjiubox"> | ||
56 | + | ||
57 | + <view class="brandboxitem"> | ||
58 | + <view class="boxtop" bindtap="jiushinfoshow"> | ||
59 | + <view class="boxtopleft"> | ||
60 | + 基本信息 | ||
61 | + </view> | ||
62 | + <view class="boxright"> | ||
63 | + <image src="{{url}}aicon_53x.png" wx:if="{{jiushishow}}"></image> | ||
64 | + <image src="{{url}}aicon_52x.png" wx:else></image> | ||
65 | + </view> | ||
66 | + </view> | ||
67 | + | ||
68 | + <view class="brandtext" wx:if="{{jiushishow}}"> | ||
69 | + <view class="baisinfo"> | ||
70 | + <view class="basinfoleft">性别</view> | ||
71 | + <view class="baisinforight" wx:if="{{info.sex==1}}">男</view> | ||
72 | + <view class="baisinforight" wx:if="{{info.sex==2}}">女</view> | ||
73 | + </view> | ||
74 | + <view class="baisinfo"> | ||
75 | + <view class="basinfoleft">年龄</view> | ||
76 | + <view class="baisinforight">{{info.age}}</view> | ||
77 | + </view> | ||
78 | + <view class="baisinfo"> | ||
79 | + <view class="basinfoleft">所属酒厂</view> | ||
80 | + <view class="baisinforight">{{info.company_name}}</view> | ||
81 | + </view> | ||
82 | + </view> | ||
83 | + | ||
84 | + | ||
85 | + </view> | ||
86 | + | ||
87 | + <view class="cannodataimg" wx:if="{{jiushiarr.length==0}}"> | ||
88 | + <image src="/img/wushuju.png"></image> | ||
89 | + </view> | ||
90 | + | ||
91 | + <block wx:else> | ||
92 | + <view class="brandboxitem" wx:for="{{jiushiarr}}" wx:key='' wx:for-index="idxs"> | ||
93 | + <view class="boxtop" bindtap="showjiushi" data-idx="{{idxs}}"> | ||
94 | + <view class="boxtopleft"> | ||
95 | + {{item.name}} | ||
96 | + </view> | ||
97 | + <view class="boxright"> | ||
98 | + <image src="{{url}}aicon_53x.png" wx:if="{{item.show}}"></image> | ||
99 | + <image src="{{url}}aicon_52x.png" wx:else></image> | ||
100 | + </view> | ||
101 | + </view> | ||
102 | + | ||
103 | + <view class="brandtext" wx:if="{{item.show}}"> | ||
104 | + <block wx:for="{{artileList1}}" wx:for-item="item" wx:for-index="idx" wx:key=''> | ||
105 | + <block wx:if="{{idxs==idx}}"> | ||
106 | + <template is="wxParse" data="{{wxParseData:item}}" /> | ||
107 | + </block> | ||
108 | + </block> | ||
109 | + </view> | ||
110 | + </view> | ||
111 | + </block> | ||
112 | + | ||
113 | + | ||
114 | + | ||
115 | +</view> | ||
116 | + | ||
55 | 117 | ||
56 | <view class="niangjiubox"> | 118 | <view class="niangjiubox"> |
57 | 119 |
1 | @import '../brandpage/brandpage.wxss'; | 1 | @import '../brandpage/brandpage.wxss'; |
2 | +/* @import '../jiuzidian/jiuzidian.wxss'; */ | ||
2 | 3 | ||
3 | image{ | 4 | image{ |
4 | width:100%; | 5 | width:100%; |
@@ -127,11 +128,11 @@ image{ | @@ -127,11 +128,11 @@ image{ | ||
127 | align-items: center | 128 | align-items: center |
128 | } | 129 | } |
129 | .lj_share{ | 130 | .lj_share{ |
130 | - width:20rpx; | 131 | + width:101rpx; |
131 | height:30rpx; | 132 | height:30rpx; |
132 | border:none; | 133 | border:none; |
133 | position: absolute; | 134 | position: absolute; |
134 | - right:0; | 135 | + right:-52rpx; |
135 | top:0; | 136 | top:0; |
136 | background: transparent | 137 | background: transparent |
137 | 138 | ||
@@ -139,4 +140,7 @@ image{ | @@ -139,4 +140,7 @@ image{ | ||
139 | button::after{ | 140 | button::after{ |
140 | border:none; | 141 | border:none; |
141 | outline:none; | 142 | outline:none; |
143 | +} | ||
144 | +.brandboxitem:first-child{ | ||
145 | + padding-bottom: 20rpx; | ||
142 | } | 146 | } |
@@ -79,7 +79,9 @@ Page({ | @@ -79,7 +79,9 @@ Page({ | ||
79 | select:e.currentTarget.dataset.id, | 79 | select:e.currentTarget.dataset.id, |
80 | searchshow: false, | 80 | searchshow: false, |
81 | recordshow: true, | 81 | recordshow: true, |
82 | - searchlist:false | 82 | + searchlist:false, |
83 | + page:1, | ||
84 | + searchlistarr:[] | ||
83 | }) | 85 | }) |
84 | 86 | ||
85 | this.getsearchtext() | 87 | this.getsearchtext() |
@@ -88,7 +90,10 @@ Page({ | @@ -88,7 +90,10 @@ Page({ | ||
88 | searchlist(){ | 90 | searchlist(){ |
89 | this.setData({ | 91 | this.setData({ |
90 | searchlist:true, | 92 | searchlist:true, |
91 | - searchshow:false | 93 | + searchshow:false, |
94 | + page:1, | ||
95 | + searchlistarr:[] | ||
96 | + | ||
92 | }) | 97 | }) |
93 | this.getlist() | 98 | this.getlist() |
94 | }, | 99 | }, |
@@ -103,7 +108,7 @@ Page({ | @@ -103,7 +108,7 @@ Page({ | ||
103 | app.post(url, params).then((res) => { | 108 | app.post(url, params).then((res) => { |
104 | console.log(res); | 109 | console.log(res); |
105 | that.setData({ | 110 | that.setData({ |
106 | - searchlistarr:res.list | 111 | + searchlistarr: that.data.searchlistarr.concat(res.list) |
107 | }) | 112 | }) |
108 | 113 | ||
109 | // let newsearchlistarr = that.data.searchlistarr; | 114 | // let newsearchlistarr = that.data.searchlistarr; |
@@ -181,13 +186,10 @@ Page({ | @@ -181,13 +186,10 @@ Page({ | ||
181 | } | 186 | } |
182 | } | 187 | } |
183 | } | 188 | } |
184 | - | ||
185 | that.setData({ | 189 | that.setData({ |
186 | searchlistarr: newsearchlistarr | 190 | searchlistarr: newsearchlistarr |
187 | }) | 191 | }) |
188 | 192 | ||
189 | - | ||
190 | - | ||
191 | }).catch((err) => { | 193 | }).catch((err) => { |
192 | 194 | ||
193 | }) | 195 | }) |
@@ -206,9 +208,6 @@ Page({ | @@ -206,9 +208,6 @@ Page({ | ||
206 | that.setData({ | 208 | that.setData({ |
207 | searchlist:res.list | 209 | searchlist:res.list |
208 | }) | 210 | }) |
209 | - | ||
210 | - | ||
211 | - | ||
212 | }).catch((err) => { | 211 | }).catch((err) => { |
213 | this.setData({ | 212 | this.setData({ |
214 | searchshow: false, | 213 | searchshow: false, |
@@ -229,7 +228,21 @@ Page({ | @@ -229,7 +228,21 @@ Page({ | ||
229 | keyword:e.detail.value | 228 | keyword:e.detail.value |
230 | }) | 229 | }) |
231 | 230 | ||
232 | - this.getkeyword() | 231 | + |
232 | + | ||
233 | + if (this.data.keyword!=''){ | ||
234 | + this.getkeyword() | ||
235 | + }else{ | ||
236 | + this.setData({ | ||
237 | + searchshow: false, | ||
238 | + recordshow: true, | ||
239 | + searchlist: false, | ||
240 | + keyword: e.detail.value | ||
241 | + }) | ||
242 | + | ||
243 | + } | ||
244 | + | ||
245 | + | ||
233 | }, | 246 | }, |
234 | 247 | ||
235 | searchhistory(e){ | 248 | searchhistory(e){ |
@@ -285,7 +298,7 @@ Page({ | @@ -285,7 +298,7 @@ Page({ | ||
285 | * 生命周期函数--监听页面显示 | 298 | * 生命周期函数--监听页面显示 |
286 | */ | 299 | */ |
287 | onShow: function () { | 300 | onShow: function () { |
288 | - this.getlist() | 301 | + // this.getlist() |
289 | 302 | ||
290 | }, | 303 | }, |
291 | 304 | ||
@@ -314,7 +327,13 @@ Page({ | @@ -314,7 +327,13 @@ Page({ | ||
314 | * 页面上拉触底事件的处理函数 | 327 | * 页面上拉触底事件的处理函数 |
315 | */ | 328 | */ |
316 | onReachBottom: function () { | 329 | onReachBottom: function () { |
330 | + let page=this.data.page; | ||
331 | + page++; | ||
332 | + this.setData({ | ||
333 | + page:page | ||
334 | + }) | ||
317 | 335 | ||
336 | + this.getlist() | ||
318 | }, | 337 | }, |
319 | 338 | ||
320 | /** | 339 | /** |
@@ -48,8 +48,8 @@ | @@ -48,8 +48,8 @@ | ||
48 | <view class="seahead"> | 48 | <view class="seahead"> |
49 | 49 | ||
50 | <view class="searword" wx:for="{{list}}" wx:key="" bindtap="enterwine" data-id="{{item.id}}" wx:if="{{select==1}}">{{item.name}}</view> | 50 | <view class="searword" wx:for="{{list}}" wx:key="" bindtap="enterwine" data-id="{{item.id}}" wx:if="{{select==1}}">{{item.name}}</view> |
51 | - <view class="searword" wx:for="{{list}}" wx:key="" bindtap="enterpinpai" data-id="{{item.id}}" wx:if="{{select==2}}">{{item.name}}</view> | ||
52 | - <view class="searword" wx:for="{{list}}" wx:key="" bindtap="enterjiuqi" data-id="{{item.id}}" wx:if="{{select==3}}">{{item.name}}</view> | 51 | + <view class="searword" wx:for="{{list}}" wx:key="" bindtap="enterpinpai" data-id="{{item.id}}" wx:if="{{select==2}}">{{item.name}}</view> |
52 | + <view class="searword" wx:for="{{list}}" wx:key="" bindtap="enterjiuqi" data-id="{{item.id}}" wx:if="{{select==3}}">{{item.name}}</view> | ||
53 | 53 | ||
54 | </view> | 54 | </view> |
55 | 55 | ||
@@ -76,8 +76,8 @@ | @@ -76,8 +76,8 @@ | ||
76 | 76 | ||
77 | <view class="seahead"> | 77 | <view class="seahead"> |
78 | <view class="searword" wx:for="{{favorite}}" wx:key='' wx:key="" bindtap="enterwine" data-id="{{item.id}}" wx:if="{{select==1}}">{{item.name}}</view> | 78 | <view class="searword" wx:for="{{favorite}}" wx:key='' wx:key="" bindtap="enterwine" data-id="{{item.id}}" wx:if="{{select==1}}">{{item.name}}</view> |
79 | - <view class="searword" wx:for="{{favorite}}" wx:key='' wx:key="" bindtap="enterpinpai" data-id="{{item.id}}" wx:if="{{select==2}}">{{item.name}}</view> | ||
80 | - <view class="searword" wx:for="{{favorite}}" wx:key='' wx:key="" bindtap="enterjiuqi" data-id="{{item.id}}" wx:if="{{select==3}}">{{item.name}}</view> | 79 | + <view class="searword" wx:for="{{favorite}}" wx:key='' wx:key="" bindtap="enterpinpai" data-id="{{item.id}}" wx:if="{{select==2}}">{{item.name}}</view> |
80 | + <view class="searword" wx:for="{{favorite}}" wx:key='' wx:key="" bindtap="enterjiuqi" data-id="{{item.id}}" wx:if="{{select==3}}">{{item.name}}</view> | ||
81 | 81 | ||
82 | </view> | 82 | </view> |
83 | 83 | ||
@@ -88,87 +88,105 @@ | @@ -88,87 +88,105 @@ | ||
88 | 88 | ||
89 | <view class="jiupin" wx:if="{{select==1}}"> | 89 | <view class="jiupin" wx:if="{{select==1}}"> |
90 | 90 | ||
91 | - <view class="searchitem" wx:for="{{searchlistarr}}" wx:key='' bindtap="jumpbrand" data-id="{{item.id}}"> | ||
92 | - <view class="searchitemleft"> | ||
93 | - <view class="itemleftimg"> | ||
94 | - <image src="{{item.logo}}"></image> | ||
95 | - </view> | 91 | + <view class="nodataimg" wx:if="{{searchlistarr.length==0}}"> |
92 | + <image src="/img/wushuju.png"></image> | ||
93 | + </view> | ||
94 | + <block wx:else> | ||
96 | 95 | ||
97 | - <view class="itemiddle"> | ||
98 | - <view class="itemidelename">{{item.name}}</view> | ||
99 | - <view class="nambottom"> | ||
100 | - <text class="namebottomitem">{{item.degree_name}}</text> | ||
101 | - <text class="namebottomitem">{{item.odor_name}}</text> | ||
102 | - <text class="namebottomitem">{{item.price}}</text> | ||
103 | - <text class="namebottomitem">{{item.ml}}</text> | 96 | + <view class="searchitem" wx:for="{{searchlistarr}}" wx:key='' bindtap="jumpbrand" data-id="{{item.id}}"> |
97 | + <view class="searchitemleft"> | ||
98 | + <view class="itemleftimg"> | ||
99 | + <image src="{{item.logo}}"></image> | ||
104 | </view> | 100 | </view> |
105 | - </view> | ||
106 | - </view> | ||
107 | 101 | ||
108 | - <view class="starimg" catchtap="collect" data-id="{{item.id}}"> | ||
109 | - <image src="{{url}}aicon_10x.png" wx:if="{{item.is_favorite==1}}"></image> | ||
110 | - <image src="{{url}}aicon_09x.png" wx:else></image> | 102 | + <view class="itemiddle"> |
103 | + <view class="itemidelename">{{item.name}}</view> | ||
104 | + <view class="nambottom"> | ||
105 | + <text class="namebottomitem">{{item.degree_name}}</text> | ||
106 | + <text class="namebottomitem">{{item.odor_name}}</text> | ||
107 | + <text class="namebottomitem">{{item.price}}</text> | ||
108 | + <text class="namebottomitem">{{item.ml}}</text> | ||
109 | + </view> | ||
110 | + </view> | ||
111 | + </view> | ||
111 | 112 | ||
112 | - </view> | 113 | + <view class="starimg" catchtap="collect" data-id="{{item.id}}"> |
114 | + <image src="{{url}}aicon_10x.png" wx:if="{{item.is_favorite==1}}"></image> | ||
115 | + <image src="{{url}}aicon_09x.png" wx:else></image> | ||
113 | 116 | ||
114 | - </view> | 117 | + </view> |
115 | 118 | ||
119 | + </view> | ||
120 | + </block> | ||
116 | </view> | 121 | </view> |
117 | 122 | ||
118 | <view class="brand" wx:if="{{select==2}}"> | 123 | <view class="brand" wx:if="{{select==2}}"> |
119 | 124 | ||
120 | - <view class="searchitem" wx:for="{{searchlistarr}}" wx:key='' bindtap="jumpbrand" data-id="{{item.id}}"> | ||
121 | - <view class="searchitemleft"> | ||
122 | - <view class="branditemleftimg"> | ||
123 | - <image src="{{url}}aicon_12@2x.png"></image> | ||
124 | - </view> | 125 | + <view class="nodataimg" wx:if="{{searchlistarr.length==0}}"> |
126 | + <image src="/img/wushuju.png"></image> | ||
127 | + </view> | ||
128 | + | ||
129 | + <block wx:else> | ||
125 | 130 | ||
126 | - <view class="itemiddle"> | ||
127 | - <view class="itemidelename">{{item.name}}</view> | ||
128 | - <view class="nambottom"> | ||
129 | - <text class="namebottomitem">{{item.sort_name}}</text> | ||
130 | - <text class="namebottomitem">{{item.country}}</text> | ||
131 | - <text class="namebottomitem">{{item.city}}</text> | ||
132 | - <text class="namebottomitem">{{item.odor_name}}</text> | 131 | + <view class="searchitem" wx:for="{{searchlistarr}}" wx:key='' bindtap="jumpbrand" data-id="{{item.id}}"> |
132 | + <view class="searchitemleft"> | ||
133 | + <view class="branditemleftimg"> | ||
134 | + <image src="{{url}}aicon_12@2x.png"></image> | ||
135 | + </view> | ||
136 | + | ||
137 | + <view class="itemiddle"> | ||
138 | + <view class="itemidelename">{{item.name}}</view> | ||
139 | + <view class="nambottom"> | ||
140 | + <text class="namebottomitem">{{item.sort_name}}</text> | ||
141 | + <text class="namebottomitem">{{item.country}}</text> | ||
142 | + <text class="namebottomitem">{{item.city}}</text> | ||
143 | + <text class="namebottomitem">{{item.odor_name}}</text> | ||
144 | + </view> | ||
133 | </view> | 145 | </view> |
134 | </view> | 146 | </view> |
135 | - </view> | ||
136 | 147 | ||
137 | - <view class="starimg" catchtap="collect" data-id="{{item.id}}"> | 148 | + <view class="starimg" catchtap="collect" data-id="{{item.id}}"> |
138 | 149 | ||
139 | 150 | ||
140 | - <image src="{{url}}aicon_10x.png" wx:if="{{item.is_favorite==1}}"></image> | ||
141 | - <image src="{{url}}aicon_09x.png" wx:else></image> | 151 | + <image src="{{url}}aicon_10x.png" wx:if="{{item.is_favorite==1}}"></image> |
152 | + <image src="{{url}}aicon_09x.png" wx:else></image> | ||
153 | + </view> | ||
154 | + | ||
142 | </view> | 155 | </view> |
143 | 156 | ||
144 | - </view> | 157 | + </block> |
145 | 158 | ||
146 | </view> | 159 | </view> |
147 | 160 | ||
148 | <view class="brand" wx:if="{{select==3}}"> | 161 | <view class="brand" wx:if="{{select==3}}"> |
162 | + <view class="nodataimg" wx:if="{{searchlistarr.length==0}}"> | ||
163 | + <image src="/img/wushuju.png"></image> | ||
164 | + </view> | ||
149 | 165 | ||
150 | - <view class="searchitem" wx:for="{{searchlistarr}}" wx:key='' bindtap="jumpcompany" data-id="{{item.id}}"> | ||
151 | - <view class="searchitemleft"> | ||
152 | - <view class="jiuqiimg"> | ||
153 | - <image src="{{url}}aicon_13@2x.png"></image> | ||
154 | - </view> | 166 | + <block> |
155 | 167 | ||
156 | - <view class="itemiddle"> | ||
157 | - <view class="itemidelename">{{item.name}}</view> | ||
158 | - <view class="nambottom"> | ||
159 | - <text class="namebottomitem">{{item.country}}</text> | ||
160 | - <text class="namebottomitem">{{item.city}}</text> | ||
161 | - <text class="namebottomitem">{{item.sort_name}}</text> | ||
162 | - <text class="namebottomitem">{{item.concern_count}}关注</text> | 168 | + <view class="searchitem" wx:for="{{searchlistarr}}" wx:key='' bindtap="jumpcompany" data-id="{{item.id}}"> |
169 | + <view class="searchitemleft"> | ||
170 | + <view class="jiuqiimg"> | ||
171 | + <image src="{{item.logo}}"></image> | ||
163 | </view> | 172 | </view> |
164 | - </view> | ||
165 | - </view> | ||
166 | 173 | ||
167 | - <view class="atten" wx:if="{{item.is_concern==1}}" data-id="{{item.id}}" catchtap="attention">取消关注</view> | ||
168 | - <view class="atten" data-id="{{item.id}}" wx:else catchtap="attention">关注</view> | 174 | + <view class="itemiddle"> |
175 | + <view class="itemidelename">{{item.name}}</view> | ||
176 | + <view class="nambottom"> | ||
177 | + <text class="namebottomitem">{{item.country}}</text> | ||
178 | + <text class="namebottomitem">{{item.city}}</text> | ||
179 | + <text class="namebottomitem">{{item.sort_name}}</text> | ||
180 | + <text class="namebottomitem">{{item.concern_count}}关注</text> | ||
181 | + </view> | ||
182 | + </view> | ||
183 | + </view> | ||
169 | 184 | ||
170 | - </view> | 185 | + <view class="atten" wx:if="{{item.is_concern==1}}" data-id="{{item.id}}" catchtap="attention">取消关注</view> |
186 | + <view class="atten" data-id="{{item.id}}" wx:else catchtap="attention">关注</view> | ||
171 | 187 | ||
188 | + </view> | ||
189 | + </block> | ||
172 | </view> | 190 | </view> |
173 | 191 | ||
174 | </view> | 192 | </view> |
1 | <view class="containerbox"> | 1 | <view class="containerbox"> |
2 | + | ||
3 | +<view class="nodataimg" wx:if="{{shipaiarr.length==0}}"> | ||
4 | + <image src="/img/wushuju.png"></image> | ||
5 | + </view> | ||
6 | + <block wx:else> | ||
2 | <view class="boxitem" wx:for="{{shipaiarr}}" wx:key='' > | 7 | <view class="boxitem" wx:for="{{shipaiarr}}" wx:key='' > |
3 | - <view class="itemimg" bindtap='viewImg' data-index="{{index}}"> | ||
4 | - <image src="{{item.url}}"></image> | 8 | + <view class="itemimg" bindtap='viewImg' data-index="{{index}}" > |
9 | + <image src="{{item.url}}" ></image> | ||
5 | </view> | 10 | </view> |
6 | 11 | ||
7 | <view class="itembottom"> | 12 | <view class="itembottom"> |
@@ -21,5 +26,5 @@ | @@ -21,5 +26,5 @@ | ||
21 | 26 | ||
22 | </view> | 27 | </view> |
23 | </view> | 28 | </view> |
24 | - | 29 | + </block> |
25 | </view> | 30 | </view> |
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | <image src="{{video.video_image}}"></image> | 4 | <image src="{{video.video_image}}"></image> |
5 | 5 | ||
6 | <view class="boimg"> | 6 | <view class="boimg"> |
7 | - <image src="{{url}}/aicon_70x.png"></image> | 7 | + <image src="{{url}}/aicon_70x.png"></image> |
8 | </view> | 8 | </view> |
9 | </view> | 9 | </view> |
10 | 10 | ||
@@ -21,22 +21,39 @@ | @@ -21,22 +21,39 @@ | ||
21 | 21 | ||
22 | <view class="biaozhuantitle xiaovideo">小视频</view> | 22 | <view class="biaozhuantitle xiaovideo">小视频</view> |
23 | <view class="shortvideobox"> | 23 | <view class="shortvideobox"> |
24 | - <view class="videoitem" wx:for='{{list}}' wx:key=''> | ||
25 | 24 | ||
26 | - <view class="itemvid" bindtap="shortentervideo" data-url="{{item.video}}" data-id="{{item.id}}"> | ||
27 | - <image src="{{item.video_image}}"></image> | ||
28 | - <view class="boimg"> | ||
29 | - <image src="{{url}}/aicon_70x.png"></image> | ||
30 | - </view> | 25 | +<view class="nodataimg" wx:if="{{list.length==0}}"> |
26 | + <image src="/img/wushuju.png"></image> | ||
31 | </view> | 27 | </view> |
28 | + <block wx:else> | ||
29 | + <view class="videoitem" wx:for='{{list}}' wx:key=''> | ||
30 | + | ||
31 | + <view class="itemvid" bindtap="shortentervideo" data-url="{{item.video}}" data-id="{{item.id}}"> | ||
32 | + <image src="{{item.video_image}}"></image> | ||
33 | + <view class="boimg"> | ||
34 | + <image src="{{url}}/aicon_70x.png"></image> | ||
35 | + </view> | ||
36 | + </view> | ||
32 | <!-- <video src="{{item.video}}" class="itemvid" controls object-fit="fill"></video> --> | 37 | <!-- <video src="{{item.video}}" class="itemvid" controls object-fit="fill"></video> --> |
33 | 38 | ||
34 | <view class="videoittitle">{{item.content}}</view> | 39 | <view class="videoittitle">{{item.content}}</view> |
40 | + <view class="bofanglist"> | ||
41 | + <view class="bofangleft"> | ||
42 | + {{item.video_count}}次播放 | ||
43 | + </view> | ||
44 | + <view class="bofangright"> | ||
45 | + <view class="bofangrightimg"> | ||
46 | + <image src="/img/zan.png"></image> | ||
47 | + </view> | ||
48 | + | ||
49 | + <view class="zanshu">{{item.good_count}}</view> | ||
50 | + </view> | ||
51 | + </view> | ||
35 | <view class=""> | 52 | <view class=""> |
36 | 53 | ||
37 | </view> | 54 | </view> |
38 | </view> | 55 | </view> |
39 | - | 56 | +</block> |
40 | 57 | ||
41 | 58 | ||
42 | 59 |
@@ -75,4 +75,33 @@ page{ | @@ -75,4 +75,33 @@ page{ | ||
75 | top:50%; | 75 | top:50%; |
76 | left:50%; | 76 | left:50%; |
77 | transform: translate(-50%,-50%) | 77 | transform: translate(-50%,-50%) |
78 | +} | ||
79 | +.bofanglist{ | ||
80 | + width:338rpx; | ||
81 | + margin:0 auto; | ||
82 | + padding: 0 12rpx; | ||
83 | + box-sizing: border-box; | ||
84 | + display:flex; | ||
85 | + justify-content: space-between; | ||
86 | + align-items: center; | ||
87 | + position: absolute; | ||
88 | + bottom:14rpx; | ||
89 | +} | ||
90 | +.bofangrightimg{ | ||
91 | + width:30rpx; | ||
92 | + height:30rpx; | ||
93 | + font-size:0 | ||
94 | +} | ||
95 | +.bofangright{ | ||
96 | + display:flex; | ||
97 | + align-items: cnter | ||
98 | +} | ||
99 | +.zanshu{ | ||
100 | + color:#FFFFFF; | ||
101 | + font-size: 28rpx; | ||
102 | + margin-left:10rpx; | ||
103 | +} | ||
104 | +.nodataimg { | ||
105 | + margin:200rpx auto 0; | ||
106 | + | ||
78 | } | 107 | } |
@@ -9,7 +9,7 @@ Page({ | @@ -9,7 +9,7 @@ Page({ | ||
9 | url: '', | 9 | url: '', |
10 | user_list: [], | 10 | user_list: [], |
11 | list: [], | 11 | list: [], |
12 | - type: 1, | 12 | + type: 2, |
13 | arr: [] | 13 | arr: [] |
14 | }, | 14 | }, |
15 | 15 | ||
@@ -150,6 +150,18 @@ Page({ | @@ -150,6 +150,18 @@ Page({ | ||
150 | user_list: newuser_list | 150 | user_list: newuser_list |
151 | }) | 151 | }) |
152 | }, | 152 | }, |
153 | + //长按显示叉号 | ||
154 | + xianshicha(){ | ||
155 | + this.setData({ | ||
156 | + type:3 | ||
157 | + }) | ||
158 | + }, | ||
159 | + //编辑事件 | ||
160 | + edit(){ | ||
161 | + this.setData({ | ||
162 | + type:3 | ||
163 | + }) | ||
164 | + }, | ||
153 | 165 | ||
154 | //完成事件 | 166 | //完成事件 |
155 | finish() { | 167 | finish() { |
@@ -200,8 +212,11 @@ Page({ | @@ -200,8 +212,11 @@ Page({ | ||
200 | }) | 212 | }) |
201 | 213 | ||
202 | setTimeout(function() { | 214 | setTimeout(function() { |
203 | - wx.navigateBack({ | ||
204 | - checked: true | 215 | + // wx.navigateBack({ |
216 | + // checked: true | ||
217 | + // }) | ||
218 | + that.setData({ | ||
219 | + type:2 | ||
205 | }) | 220 | }) |
206 | }, 1500) | 221 | }, 1500) |
207 | 222 |
1 | -<view class="clear" wx:if="{{type==1}}" bindtap="qingchu">清除</view> | ||
2 | -<view class="clear" wx:if="{{type==2}}">编辑</view> | 1 | +<!-- <view class="clear" wx:if="{{type==1}}" bindtap="qingchu">清除</view> --> |
2 | +<view class="clear" wx:if="{{type==2}}" bindtap="edit">编辑</view> | ||
3 | <view class="clear" wx:if="{{type==3}}" bindtap="finish">完成</view> | 3 | <view class="clear" wx:if="{{type==3}}" bindtap="finish">完成</view> |
4 | 4 | ||
5 | <view class="morenshu"> | 5 | <view class="morenshu"> |
@@ -7,11 +7,11 @@ | @@ -7,11 +7,11 @@ | ||
7 | <view class="longan">长按可拖动排序</view> | 7 | <view class="longan">长按可拖动排序</view> |
8 | </view> | 8 | </view> |
9 | 9 | ||
10 | -<view class="shubox"> | ||
11 | - <view class="shuitem" wx:for="{{user_list}}" wx:key=""> | 10 | +<view class="shubox" > |
11 | + <view class="shuitem" wx:for="{{user_list}}" wx:key="" bindlongpress="xianshicha"> | ||
12 | {{item.name}} | 12 | {{item.name}} |
13 | 13 | ||
14 | - <view class="cancelmg" wx:if="{{type!=1}}" bindtap="shanchu" data-id="{{item.id}}"> | 14 | + <view class="cancelmg" wx:if="{{type!=2&&item.id>0}}" bindtap="shanchu" data-id="{{item.id}}"> |
15 | <image src="{{url}}/bicon_09x.png"></image> | 15 | <image src="{{url}}/bicon_09x.png"></image> |
16 | </view> | 16 | </view> |
17 | </view> | 17 | </view> |
@@ -3,6 +3,7 @@ const app = getApp() | @@ -3,6 +3,7 @@ const app = getApp() | ||
3 | Page({ | 3 | Page({ |
4 | 4 | ||
5 | /** | 5 | /** |
6 | + * | ||
6 | * 页面的初始数据 | 7 | * 页面的初始数据 |
7 | */ | 8 | */ |
8 | data: { | 9 | data: { |
@@ -43,6 +44,8 @@ Page({ | @@ -43,6 +44,8 @@ Page({ | ||
43 | zhinengwrap: false, | 44 | zhinengwrap: false, |
44 | citychose: false, | 45 | citychose: false, |
45 | pricechose:false, | 46 | pricechose:false, |
47 | + morechose:false, | ||
48 | + fenchose:false, | ||
46 | use_id: '', | 49 | use_id: '', |
47 | odor_id: '', | 50 | odor_id: '', |
48 | package_id: '', | 51 | package_id: '', |
@@ -55,7 +58,47 @@ Page({ | @@ -55,7 +58,47 @@ Page({ | ||
55 | zhinenglist: [], | 58 | zhinenglist: [], |
56 | page:1, | 59 | page:1, |
57 | priceyuan:'0元', | 60 | priceyuan:'0元', |
58 | - pricevalue:0 | 61 | + pricevalue:'', |
62 | + | ||
63 | + | ||
64 | + leftMin: '', //左边滑块最小值 | ||
65 | + rightMax:'', //右边滑块最大值 | ||
66 | + leftValue: '', //左边滑块默认值 | ||
67 | + rightValue: '', //右边滑块默认值 | ||
68 | + min:'', | ||
69 | + max:'', | ||
70 | + morelist:[], | ||
71 | + morecan:[], | ||
72 | + conetentarr:[], | ||
73 | + low: 0, | ||
74 | + heigh: 100, | ||
75 | + number:'', | ||
76 | + fenleftMin:'', | ||
77 | + fenrightMax:'', | ||
78 | + fenmin:'', | ||
79 | + fenmax:'', | ||
80 | + fennumber:'', | ||
81 | + score:'', | ||
82 | + pricezhi:'', | ||
83 | + selectinfo:'', | ||
84 | + | ||
85 | + // 智能筛选默认值 | ||
86 | + min: 0, | ||
87 | + rmax: 100, | ||
88 | + leftValue: 0, | ||
89 | + rightValue: 100, | ||
90 | + ppvalue: 100, | ||
91 | + ppleft: 0, | ||
92 | + totalLength: 0, | ||
93 | + bigLength: 0, | ||
94 | + ratio: 0.5, | ||
95 | + sliderLength: 20, | ||
96 | + containerLeft: 0, //标识整个组件,距离屏幕左边的距离 | ||
97 | + hideOption: '', //初始状态为显示组件 | ||
98 | + maxValue:0 | ||
99 | + | ||
100 | + | ||
101 | + | ||
59 | }, | 102 | }, |
60 | 103 | ||
61 | /** | 104 | /** |
@@ -68,10 +111,572 @@ Page({ | @@ -68,10 +111,572 @@ Page({ | ||
68 | }) | 111 | }) |
69 | 112 | ||
70 | 113 | ||
71 | - this.getshaicontent() | 114 | + // this.getshaicontent(); |
72 | this.getmorenconetent(); | 115 | this.getmorenconetent(); |
73 | 116 | ||
117 | + // this.propertyLeftValueChange(); | ||
118 | + | ||
119 | + | ||
120 | + | ||
121 | + }, | ||
122 | + | ||
123 | + _propertyLeftValueChange: function () { | ||
124 | + console.log(this.data.minValue); | ||
125 | + console.log(this.data.max); | ||
126 | + console.log(this.data.bigLength) | ||
127 | + | ||
128 | + let minValue = this.data.minValue / this.data.max * this.data.bigLength; | ||
129 | + console.log(minValue) | ||
130 | + let min = this.data.min / this.data.max * this.data.bigLength; | ||
131 | + console.log(min) | ||
132 | + this.setData({ | ||
133 | + leftValue: minValue - min, | ||
134 | + ppleft: minValue - min | ||
135 | + }) | ||
136 | + | ||
137 | + console.log(this.data.ppleft) | ||
138 | + }, | ||
139 | + | ||
140 | + /** | ||
141 | + * 设置右边滑块的值 | ||
142 | + */ | ||
143 | + _propertyRightValueChange: function () { | ||
144 | + let right = this.data.maxValue / this.data.max * this.data.bigLength + this.data.sliderLength | ||
145 | + this.setData({ | ||
146 | + rightValue: right, | ||
147 | + ppvalue: right | ||
148 | + }) | ||
149 | + | ||
150 | + console.log(this.data.rightValue) | ||
151 | + }, | ||
152 | + | ||
153 | + | ||
154 | + | ||
155 | + | ||
156 | + //获取筛选内容 | ||
157 | + getshaicontent() { | ||
158 | + let that = this; | ||
159 | + let url = 'index/Filter/filter', | ||
160 | + params = { | ||
161 | + | ||
162 | + } | ||
163 | + app.post(url, params).then((res) => { | ||
164 | + console.log(res); | ||
165 | + that.setData({ | ||
166 | + selectinfo: res | ||
167 | + }) | ||
168 | + let newselectinfo=that.data.selectinfo | ||
169 | + newselectinfo.price[0].realmin = newselectinfo.price[0].min; | ||
170 | + newselectinfo.price[0].realmax = newselectinfo.price[0].max; | ||
171 | + newselectinfo.score_list[0].realmin = newselectinfo.score_list[0].min; | ||
172 | + newselectinfo.score_list[0].realmax = newselectinfo.score_list[0].max | ||
173 | + | ||
174 | + that.setData({ | ||
175 | + selectinfo: newselectinfo | ||
176 | + }) | ||
177 | + console.log(that.data.selectinfo) | ||
178 | + | ||
179 | + | ||
180 | + | ||
181 | + | ||
182 | + | ||
183 | + | ||
184 | + | ||
185 | + // that._propertyLeftValueChange() | ||
186 | + // that._propertyRightValueChange() | ||
187 | + | ||
188 | + }).catch((err) => { | ||
189 | + | ||
190 | + }) | ||
191 | + }, | ||
192 | + //显示更多选项 | ||
193 | + | ||
194 | + mores(){ | ||
195 | + let that=this; | ||
196 | + this.setData({ | ||
197 | + morechose:true, | ||
198 | + citychose: false, | ||
199 | + zhinengwrap: false, | ||
200 | + pricechose: false, | ||
201 | + conetentarr:[], | ||
202 | + page:1, | ||
203 | + zhinenglist:[] | ||
204 | + }) | ||
205 | + | ||
206 | + let newmorelist = that.data.morelist; | ||
207 | + for (var obj of newmorelist) { | ||
208 | + obj.sel = false; | ||
209 | + obj.contentarr = [] | ||
210 | + if (obj.basic_sort == 1) { | ||
211 | + for (var p of obj.value_list) { | ||
212 | + p.twsel = false; | ||
213 | + | ||
214 | + } | ||
215 | + } else if (obj.basic_sort == 2) { | ||
216 | + | ||
217 | + obj.zmin = parseInt(obj.min) - parseInt(obj.number); | ||
218 | + obj.zmax = parseInt(obj.max) + parseInt(obj.number); | ||
219 | + obj.between = obj.realmin + '-' + obj.realmax + obj.unit; | ||
220 | + | ||
221 | + } | ||
222 | + } | ||
223 | + that.setData({ | ||
224 | + morelist: newmorelist | ||
225 | + }) | ||
226 | + console.log(that.data.morelist) | ||
227 | + | ||
228 | + | ||
229 | + | ||
230 | + // this.getmorecan() | ||
231 | + }, | ||
232 | + //隐藏更多选项 | ||
233 | + hidemorechose(){ | ||
234 | + this.setData({ | ||
235 | + morechose: false, | ||
236 | + citychose: false, | ||
237 | + zhinengwrap: false, | ||
238 | + pricechose: false, | ||
239 | + fenchose: false | ||
240 | + }) | ||
241 | + | ||
242 | + let newnavarr = this.data.navarr; | ||
243 | + for (var obj of newnavarr) { | ||
244 | + obj.sel = false | ||
245 | + } | ||
246 | + | ||
247 | + this.setData({ | ||
248 | + navarr: newnavarr | ||
249 | + }) | ||
250 | + | ||
251 | + this.getmorenconetent() | ||
252 | + }, | ||
253 | + | ||
254 | + //隐藏评分 | ||
255 | + hidefen(){ | ||
256 | + this.setData({ | ||
257 | + morechose: false, | ||
258 | + citychose: false, | ||
259 | + zhinengwrap: false, | ||
260 | + pricechose: false, | ||
261 | + fenchose:false, | ||
262 | + page: 1, | ||
263 | + zhinenglist: [] | ||
264 | + }) | ||
265 | + console.log(9099090) | ||
266 | + console.log(this.data.zhinenglist) | ||
267 | + | ||
268 | + let newnavarr = this.data.navarr; | ||
269 | + newnavarr[5].name = this.data.score | ||
270 | + for (var obj of newnavarr) { | ||
271 | + obj.sel = false | ||
272 | + } | ||
273 | + | ||
274 | + this.setData({ | ||
275 | + navarr: newnavarr, | ||
276 | + | ||
277 | + }) | ||
278 | + | ||
279 | + this.getmorenconetent() | ||
280 | + }, | ||
281 | + | ||
282 | + //获取更多参数 | ||
283 | + getmorecan(){ | ||
284 | + let that = this; | ||
285 | + let url = 'index/Filter/more', params = { | ||
286 | + | ||
287 | + | ||
288 | + } | ||
289 | + app.post(url, params).then((res) => { | ||
290 | + console.log(res); | ||
291 | + that.setData({ | ||
292 | + morelist:res.list | ||
293 | + }) | ||
294 | + | ||
295 | + let newmorelist = that.data.morelist; | ||
296 | + for (var obj of newmorelist) { | ||
297 | + obj.sel = false; | ||
298 | + obj.contentarr = [] | ||
299 | + if (obj.basic_sort == 1) { | ||
300 | + for (var p of obj.value_list) { | ||
301 | + p.twsel = false; | ||
302 | + | ||
303 | + } | ||
304 | + } else if (obj.basic_sort == 2) { | ||
305 | + obj.realmin = obj.min; | ||
306 | + obj.realmax = obj.max; | ||
307 | + obj.zmin = parseInt(obj.min) - parseInt(obj.number); | ||
308 | + obj.zmax = parseInt(obj.max) + parseInt(obj.number); | ||
309 | + obj.between = obj.realmin + '-' + obj.realmax + obj.unit; | ||
310 | + | ||
311 | + } | ||
312 | + } | ||
313 | + that.setData({ | ||
314 | + morelist: newmorelist | ||
315 | + }) | ||
316 | + | ||
317 | + | ||
318 | + }).catch((err) => { | ||
319 | + | ||
320 | + }) | ||
74 | }, | 321 | }, |
322 | + | ||
323 | + //更多参数向左滑动效果 | ||
324 | + lowValueChangeAction1(e){ | ||
325 | + let that = this; | ||
326 | + let index = e.currentTarget.dataset.parindex; | ||
327 | + console.log(index) | ||
328 | + let id=e.currentTarget.dataset.id; | ||
329 | + let basic_sort = e.currentTarget.dataset.basic_sort; | ||
330 | + | ||
331 | + | ||
332 | + let newmorelist=that.data.morelist; | ||
333 | + // newmorelist[index].min = e.detail.lowValue; | ||
334 | + newmorelist[index].realmin = e.detail.lowValue | ||
335 | + | ||
336 | + | ||
337 | + | ||
338 | + | ||
339 | + if (e.detail.lowValue < newmorelist[index].zmin + newmorelist[index].number && newmorelist[index].max <= newmorelist[index].zmax - newmorelist[index].number) { | ||
340 | + | ||
341 | + newmorelist[index].between = '<' + newmorelist[index].realmax + newmorelist[index].unit; | ||
342 | + newmorelist[index].chuanbetween = 0 + '-' + newmorelist[index].realmax | ||
343 | + | ||
344 | + | ||
345 | + } else if (e.detail.lowValue < newmorelist[index].zmin + newmorelist[index].number && newmorelist[index].max > newmorelist[index].zmax - newmorelist[index].number) { | ||
346 | + newmorelist[index].between = '不限'; | ||
347 | + newmorelist[index].chuanbetween = 0 + '-' +0 | ||
348 | + | ||
349 | + } else if (e.detail.lowValue >= newmorelist[index].zmin + newmorelist[index].number && newmorelist[index].max <= newmorelist[index].zmax - newmorelist[index].number) { | ||
350 | + | ||
351 | + newmorelist[index].between = newmorelist[index].realmin + newmorelist[index].unit + '-' + newmorelist[index].realmax + newmorelist[index].unit | ||
352 | + newmorelist[index].chuanbetween = newmorelist[index].realmin + '-' + newmorelist[index].realmax | ||
353 | + | ||
354 | + | ||
355 | + } else if (e.detail.lowValue >= newmorelist[index].zmin + newmorelist[index].number && newmorelist[index].max > newmorelist[index].zmax - newmorelist[index].number) { | ||
356 | + | ||
357 | + newmorelist[index].between = ">" + newmorelist[index].realmin + newmorelist[index].unit; | ||
358 | + newmorelist[index].chuanbetween = newmorelist[index].realmax + '-'+0 | ||
359 | + | ||
360 | + | ||
361 | + } | ||
362 | + | ||
363 | + this.setData({ | ||
364 | + morelist: newmorelist | ||
365 | + }) | ||
366 | + | ||
367 | + | ||
368 | + | ||
369 | + let chuanobj = {}; | ||
370 | + let chuancontent = newmorelist[index].chuanbetween; | ||
371 | + | ||
372 | + chuanobj.id = id; | ||
373 | + chuanobj.basic_sort = basic_sort; | ||
374 | + chuanobj.content = chuancontent; | ||
375 | + let newmorecan = this.data.morecan; | ||
376 | + newmorecan[index] = chuanobj; | ||
377 | + // for (var i = 0; i < newmorecan.length;i++){ | ||
378 | + // if (newmorecan[i]==undefined){ | ||
379 | + // newmorecan.splice(i,1) | ||
380 | + // } | ||
381 | + | ||
382 | + // } | ||
383 | + that.setData({ | ||
384 | + morecan: newmorecan | ||
385 | + }) | ||
386 | + | ||
387 | + console.log(that.data.morecan) | ||
388 | + | ||
389 | + | ||
390 | + | ||
391 | + }, | ||
392 | + | ||
393 | + //更多参数向右滑动 | ||
394 | + heighValueChangeAction1(e){ | ||
395 | + let that=this; | ||
396 | + let index = e.currentTarget.dataset.parindex; | ||
397 | + console.log(index) | ||
398 | + let id = e.currentTarget.dataset.id; | ||
399 | + let basic_sort = e.currentTarget.dataset.basic_sort; | ||
400 | + console.log(index) | ||
401 | + let newmorelist = that.data.morelist; | ||
402 | + newmorelist[index].realmax = e.detail.heighValue | ||
403 | + | ||
404 | + if (newmorelist[index].min < newmorelist[index].zmin + newmorelist[index].number && e.detail.heighValue <= newmorelist[index].zmax - newmorelist[index].number) { | ||
405 | + | ||
406 | + newmorelist[index].between = '<' + newmorelist[index].realmax + newmorelist[index].unit; | ||
407 | + newmorelist[index].chuanbetween = 0 + '-' + newmorelist[index].realmax | ||
408 | + | ||
409 | + } else if (newmorelist[index].min < newmorelist[index].zmin + newmorelist[index].number && e.detail.heighValue > newmorelist[index].zmax - newmorelist[index].number) { | ||
410 | + | ||
411 | + newmorelist[index].between = '不限'; | ||
412 | + newmorelist[index].chuanbetween = 0 + '-' + 0 | ||
413 | + | ||
414 | + } else if (newmorelist[index].min >= newmorelist[index].zmin + newmorelist[index].number && e.detail.heighValue <= newmorelist[index].zmax - newmorelist[index].number) { | ||
415 | + newmorelist[index].between = newmorelist[index].realmin + newmorelist[index].unit + '-' + newmorelist[index].realmax + newmorelist[index].unit; | ||
416 | + newmorelist[index].chuanbetween = newmorelist[index].realmin + '-' + newmorelist[index].realmax | ||
417 | + | ||
418 | + } else if (newmorelist[index].min >= newmorelist[index].zmin + newmorelist[index].number && e.detail.heighValue > newmorelist[index].zmax - newmorelist[index].number) { | ||
419 | + newmorelist[index].between = ">" + newmorelist[index].realmin + newmorelist[index].unit, | ||
420 | + newmorelist[index].chuanbetween = newmorelist[index].realmin + '-' + 0 | ||
421 | + } | ||
422 | + | ||
423 | + that.setData({ | ||
424 | + morelist:newmorelist | ||
425 | + }) | ||
426 | + | ||
427 | + | ||
428 | + let chuanobj = {}; | ||
429 | + let chuancontent = newmorelist[index].chuanbetween; | ||
430 | + | ||
431 | + chuanobj.id = id; | ||
432 | + chuanobj.basic_sort = basic_sort; | ||
433 | + chuanobj.content = chuancontent; | ||
434 | + let newmorecan = this.data.morecan; | ||
435 | + newmorecan[index] = chuanobj; | ||
436 | + that.setData({ | ||
437 | + morecan: newmorecan | ||
438 | + }) | ||
439 | + console.log(that.data.morecan.length) | ||
440 | + }, | ||
441 | + | ||
442 | + //获取更多参数的文字 | ||
443 | + selectmoreitem(e){ | ||
444 | + console.log(e) | ||
445 | + let id=e.currentTarget.dataset.id; | ||
446 | + let basic_sort = e.currentTarget.dataset.basic_sort; | ||
447 | + let content=e.currentTarget.dataset.content; | ||
448 | + let parentindex = e.currentTarget.dataset.parindex; | ||
449 | + let childindex = e.currentTarget.dataset.childindex; | ||
450 | + | ||
451 | + let conetentarr = this.data.conetentarr; | ||
452 | + let newmorelist=this.data.morelist; | ||
453 | + // let conetentarr = newmorelist[parentindex].contentarr; | ||
454 | + console.log(conetentarr) | ||
455 | + newmorelist[parentindex].value_list[childindex].twsel = !newmorelist[parentindex].value_list[childindex].twsel | ||
456 | + this.setData({ | ||
457 | + morelist:newmorelist | ||
458 | + }) | ||
459 | + | ||
460 | + if (newmorelist[parentindex].value_list[childindex].twsel==true){ | ||
461 | + conetentarr.push(content); | ||
462 | + let newlsit = newmorelist[parentindex].value_list; | ||
463 | + | ||
464 | + newmorelist[parentindex].contentarr.push(content); | ||
465 | + | ||
466 | + // for (var i = 0; i < newlsit.length;i++){ | ||
467 | + // for (var j = 0; j < conetentarr.length;j++){ | ||
468 | + // if (newlsit[i].content != conetentarr[j]){ | ||
469 | + // conetentarr.splice(j,1) | ||
470 | + // } | ||
471 | + // } | ||
472 | + // } | ||
473 | + }else{ | ||
474 | + console.log(334) | ||
475 | + let newconetentarr = this.data.conetentarr; | ||
476 | + console.log(childindex) | ||
477 | + for (var i = 0; i < newmorelist[parentindex].contentarr.length;i++){ | ||
478 | + if (newmorelist[parentindex].value_list[childindex].content == newmorelist[parentindex].contentarr[i]){ | ||
479 | + newmorelist[parentindex].contentarr.splice(i, 1) | ||
480 | + } | ||
481 | + } | ||
482 | + | ||
483 | + // this.setData({ | ||
484 | + // conetentarr: newconetentarr | ||
485 | + // }) | ||
486 | + | ||
487 | + // console.log(this.data.conetentarr) | ||
488 | + } | ||
489 | + | ||
490 | + let chuancontent = ''; | ||
491 | + if (newmorelist[parentindex].contentarr.length>0){ | ||
492 | + | ||
493 | + newmorelist[parentindex].sel=true, | ||
494 | + chuancontent = newmorelist[parentindex].contentarr.join(",") | ||
495 | + | ||
496 | + }else{ | ||
497 | + chuancontent='' | ||
498 | + newmorelist[parentindex].sel = false; | ||
499 | + | ||
500 | + } | ||
501 | + this.setData({ | ||
502 | + morelist: newmorelist | ||
503 | + }) | ||
504 | + | ||
505 | + console.log(this.data.morelist) | ||
506 | + let chuanobj={}; | ||
507 | + | ||
508 | + chuanobj.id=id; | ||
509 | + chuanobj.basic_sort = basic_sort; | ||
510 | + chuanobj.content = chuancontent; | ||
511 | + let newmorecan=this.data.morecan; | ||
512 | + newmorecan[parentindex] = chuanobj; | ||
513 | + | ||
514 | + if (chuancontent==''){ | ||
515 | + console.log(newmorecan) | ||
516 | + for (var i = 0; i < newmorecan.length;i++){ | ||
517 | + console.log(newmorecan[i]) | ||
518 | + if (newmorecan[i]!=undefined){ | ||
519 | + if (newmorecan[i].id == id) { | ||
520 | + newmorecan.splice(i, 1) | ||
521 | + } | ||
522 | + } | ||
523 | + | ||
524 | + } | ||
525 | + } | ||
526 | + | ||
527 | + this.setData({ | ||
528 | + morecan: newmorecan | ||
529 | + }) | ||
530 | + console.log(this.data.morecan); | ||
531 | + | ||
532 | + | ||
533 | + }, | ||
534 | + | ||
535 | + | ||
536 | + | ||
537 | + //向左移动 | ||
538 | + | ||
539 | + lowValueChangeAction: function (e) { | ||
540 | + | ||
541 | + let newselectinfo=this.data.selectinfo | ||
542 | + newselectinfo.price[0].realmin = e.detail.lowValue | ||
543 | + let that=this; | ||
544 | + this.setData({ | ||
545 | + leftMin: e.detail.lowValue, | ||
546 | + selectinfo: newselectinfo | ||
547 | + }) | ||
548 | + | ||
549 | + if (e.detail.lowValue < that.data.min + that.data.number && that.data.rightMax <= that.data.max - that.data.number) { | ||
550 | + that.setData({ | ||
551 | + priceyuan: '<' + that.data.rightMax + '元', | ||
552 | + pricevalue: 0 + '-' + that.data.rightMax | ||
553 | + }) | ||
554 | + } else if (e.detail.lowValue < that.data.min + that.data.number && that.data.rightMax > that.data.max - that.data.number) { | ||
555 | + that.setData({ | ||
556 | + priceyuan: '不限', | ||
557 | + pricevalue: 0 + '-' + 0 | ||
558 | + }) | ||
559 | + } else if (e.detail.lowValue >= that.data.min + that.data.number && that.data.rightMax <= that.data.max - that.data.number) { | ||
560 | + that.setData({ | ||
561 | + priceyuan: that.data.leftMin + '元' + '-' + that.data.rightMax + '元', | ||
562 | + pricevalue: that.data.leftMin + '-' + that.data.rightMax | ||
563 | + }) | ||
564 | + } else if (e.detail.lowValue >= that.data.min + that.data.number && that.data.rightMax > that.data.max - that.data.number) { | ||
565 | + that.setData({ | ||
566 | + priceyuan: ">" + that.data.leftMin + '元', | ||
567 | + pricevalue: that.data.rightMax + '-' + 0 | ||
568 | + }) | ||
569 | + } | ||
570 | + | ||
571 | + | ||
572 | + }, | ||
573 | +//向右移动 | ||
574 | + heighValueChangeAction: function (e) { | ||
575 | + let that=this; | ||
576 | + let newselectinfo = this.data.selectinfo | ||
577 | + newselectinfo.price[0].realmax = e.detail.heighValue | ||
578 | + this.setData({ | ||
579 | + rightMax: e.detail.heighValue, | ||
580 | + selectinfo:newselectinfo | ||
581 | + }) | ||
582 | + | ||
583 | + console.log(e.detail.heighValue); | ||
584 | + console.log(that.data.min + that.data.number); | ||
585 | + console.log(that.data.max - that.data.number) | ||
586 | + if (that.data.leftMin < that.data.min + that.data.number && e.detail.heighValue <= that.data.max-that.data.number) { | ||
587 | + that.setData({ | ||
588 | + priceyuan: '<' + that.data.rightMax + '元', | ||
589 | + pricevalue: 0 + '-' + that.data.rightMax | ||
590 | + }) | ||
591 | + } else if (that.data.leftMin < that.data.min + that.data.number && e.detail.heighValue > that.data.max-that.data.number) { | ||
592 | + that.setData({ | ||
593 | + priceyuan: '不限', | ||
594 | + pricevalue: 0 + '-' + 0 | ||
595 | + }) | ||
596 | + } else if (that.data.leftMin >= that.data.min + that.data.number && e.detail.heighValue <= that.data.max-that.data.number) { | ||
597 | + that.setData({ | ||
598 | + priceyuan: that.data.leftMin + '元' + '-' + that.data.rightMax + '元', | ||
599 | + pricevalue: that.data.leftMin + '-' + that.data.rightMax | ||
600 | + }) | ||
601 | + } else if (that.data.leftMin >= that.data.min + that.data.number && e.detail.heighValue > that.data.max-that.data.number) { | ||
602 | + that.setData({ | ||
603 | + priceyuan: ">" + that.data.leftMin + '元', | ||
604 | + pricevalue: that.data.leftMin + '-' + 0 | ||
605 | + }) | ||
606 | + } | ||
607 | + }, | ||
608 | + | ||
609 | + //评分向左移动 | ||
610 | + fenlowValueChangeAction(e){ | ||
611 | + let that = this; | ||
612 | + let newselectinfo = that.data.selectinfo | ||
613 | + newselectinfo.score_list[0].realmin = e.detail.lowValue | ||
614 | + that.setData({ | ||
615 | + fenleftMin: e.detail.lowValue, | ||
616 | + selectinfo:newselectinfo | ||
617 | + }) | ||
618 | + | ||
619 | + | ||
620 | + if (e.detail.lowValue < that.data.fenmin + that.data.fennumber && that.data.fenrightMax <= that.data.fenmax - that.data.fennumber) { | ||
621 | + that.setData({ | ||
622 | + score: '<' + that.data.fenrightMax + '分', | ||
623 | + chuanscore: 0 + '-' + that.data.fenrightMax | ||
624 | + }) | ||
625 | + } else if (e.detail.lowValue < that.data.fenmin + that.data.fennumber && that.data.fenrightMax > that.data.fenmax - that.data.fennumber) { | ||
626 | + that.setData({ | ||
627 | + score: '不限', | ||
628 | + chuanscore: 0 + '-' + 0 | ||
629 | + }) | ||
630 | + } else if (e.detail.lowValue >= that.data.fenmin + that.data.fennumber && that.data.fenrightMax <= that.data.fenmax - that.data.fennumber) { | ||
631 | + that.setData({ | ||
632 | + score: that.data.fenleftMin + '分' + '-' + that.data.fenrightMax + '分', | ||
633 | + chuanscore: that.data.fenleftMin + '-' + that.data.fenrightMax | ||
634 | + }) | ||
635 | + } else if (e.detail.lowValue >= that.data.fenmin + that.data.fennumber && that.data.fenrightMax > that.data.fenmax - that.data.fennumber) { | ||
636 | + that.setData({ | ||
637 | + score: ">" + that.data.fenleftMin + '分', | ||
638 | + chuanscore: that.data.fenrightMax + '-' + 0 | ||
639 | + }) | ||
640 | + } | ||
641 | + }, | ||
642 | + | ||
643 | + //评分向右移动 | ||
644 | + fenheighValueChangeAction: function (e) { | ||
645 | + let that = this; | ||
646 | + | ||
647 | + let newselectinfo = that.data.selectinfo | ||
648 | + newselectinfo.score_list[0].realmax = e.detail.heighValue | ||
649 | + this.setData({ | ||
650 | + fenrightMax: e.detail.heighValue, | ||
651 | + selectinfo:newselectinfo | ||
652 | + }) | ||
653 | + | ||
654 | + | ||
655 | + | ||
656 | + if (that.data.fenleftMin < that.data.fenmin + that.data.fennumber && e.detail.fenheighValue <= that.data.fenmax - that.data.fennumber) { | ||
657 | + that.setData({ | ||
658 | + score: '<' + that.data.fenrightMax + '分', | ||
659 | + chuanscore: 0 + '-' + that.data.fenrightMax | ||
660 | + }) | ||
661 | + } else if (that.data.fenleftMin < that.data.fenmin + that.data.fennumber && e.detail.heighValue > that.data.fenmax - that.data.fennumber) { | ||
662 | + | ||
663 | + that.setData({ | ||
664 | + score: '不限', | ||
665 | + chuanscore: 0 + '-' + 0 | ||
666 | + }) | ||
667 | + } else if (that.data.fenleftMin >= that.data.fenmin + that.data.fennumber && e.detail.heighValue <= that.data.fenmax - that.data.fennumber) { | ||
668 | + that.setData({ | ||
669 | + score: that.data.fenleftMin + '分' + '-' + that.data.fenrightMax + '分', | ||
670 | + chuanscore: that.data.fenleftMin + '-' + that.data.fenrightMax | ||
671 | + }) | ||
672 | + } else if (that.data.fenleftMin >= that.data.fenmin + that.data.fennumber && e.detail.heighValue > that.data.fenmax - that.data.fennumber) { | ||
673 | + that.setData({ | ||
674 | + score: ">" + that.data.fenleftMin + '分', | ||
675 | + chuanscore: that.data.fenleftMin + '-' + 0 | ||
676 | + }) | ||
677 | + } | ||
678 | + }, | ||
679 | + | ||
75 | select(e) { | 680 | select(e) { |
76 | 681 | ||
77 | let that = this; | 682 | let that = this; |
@@ -80,11 +685,16 @@ Page({ | @@ -80,11 +685,16 @@ Page({ | ||
80 | let type = e.currentTarget.dataset.type; | 685 | let type = e.currentTarget.dataset.type; |
81 | this.setData({ | 686 | this.setData({ |
82 | type: type, | 687 | type: type, |
688 | + // page:1, | ||
689 | + // zhinenglist:[] | ||
83 | 690 | ||
84 | }) | 691 | }) |
85 | 692 | ||
693 | + console.log(that.data.zhinenglist) | ||
694 | + | ||
86 | 695 | ||
87 | let newnavarr = this.data.navarr; | 696 | let newnavarr = this.data.navarr; |
697 | + | ||
88 | for (var i = 0; i < newnavarr.length; i++) { | 698 | for (var i = 0; i < newnavarr.length; i++) { |
89 | if (i == index) { | 699 | if (i == index) { |
90 | newnavarr[i].sel = !newnavarr[i].sel; | 700 | newnavarr[i].sel = !newnavarr[i].sel; |
@@ -95,25 +705,56 @@ Page({ | @@ -95,25 +705,56 @@ Page({ | ||
95 | this.setData({ | 705 | this.setData({ |
96 | citychose: true, | 706 | citychose: true, |
97 | zhinengwrap: false, | 707 | zhinengwrap: false, |
98 | - pricechose: false | 708 | + pricechose: false, |
709 | + morechose:false, | ||
710 | + fenchose:false | ||
99 | }) | 711 | }) |
100 | 712 | ||
101 | } else { | 713 | } else { |
102 | this.setData({ | 714 | this.setData({ |
103 | citychose: false, | 715 | citychose: false, |
104 | zhinengwrap: false, | 716 | zhinengwrap: false, |
105 | - pricechose: false | 717 | + pricechose: false, |
718 | + morechose: false, | ||
719 | + fenchose: false | ||
106 | 720 | ||
107 | 721 | ||
108 | }) | 722 | }) |
109 | } | 723 | } |
110 | }else if(type==2){ | 724 | }else if(type==2){ |
111 | if (newnavarr[i].sel == true) { | 725 | if (newnavarr[i].sel == true) { |
726 | + | ||
727 | + this.setData({ | ||
728 | + citychose: false, | ||
729 | + zhinengwrap: false, | ||
730 | + pricechose:true, | ||
731 | + morechose: false, | ||
732 | + fenchose: false | ||
733 | + | ||
734 | + }) | ||
735 | + | ||
736 | + } else { | ||
737 | + this.setData({ | ||
738 | + citychose: false, | ||
739 | + zhinengwrap: false, | ||
740 | + pricechose:false, | ||
741 | + morechose: false, | ||
742 | + fenchose: false | ||
743 | + | ||
744 | + }) | ||
745 | + } | ||
746 | + | ||
747 | + | ||
748 | + | ||
749 | + }else if(type==6){ | ||
750 | + if (newnavarr[i].sel == true) { | ||
112 | console.log(999) | 751 | console.log(999) |
113 | this.setData({ | 752 | this.setData({ |
114 | citychose: false, | 753 | citychose: false, |
115 | zhinengwrap: false, | 754 | zhinengwrap: false, |
116 | - pricechose:true | 755 | + pricechose: false, |
756 | + morechose: false, | ||
757 | + fenchose: true | ||
117 | 758 | ||
118 | }) | 759 | }) |
119 | 760 | ||
@@ -121,7 +762,9 @@ Page({ | @@ -121,7 +762,9 @@ Page({ | ||
121 | this.setData({ | 762 | this.setData({ |
122 | citychose: false, | 763 | citychose: false, |
123 | zhinengwrap: false, | 764 | zhinengwrap: false, |
124 | - pricechose:false | 765 | + pricechose: false, |
766 | + morechose: false, | ||
767 | + fenchose: false | ||
125 | 768 | ||
126 | }) | 769 | }) |
127 | } | 770 | } |
@@ -131,7 +774,9 @@ Page({ | @@ -131,7 +774,9 @@ Page({ | ||
131 | this.setData({ | 774 | this.setData({ |
132 | citychose: false, | 775 | citychose: false, |
133 | zhinengwrap: true, | 776 | zhinengwrap: true, |
134 | - pricechose: false | 777 | + pricechose: false, |
778 | + morechose: false, | ||
779 | + fenchose: false | ||
135 | 780 | ||
136 | 781 | ||
137 | }) | 782 | }) |
@@ -140,7 +785,9 @@ Page({ | @@ -140,7 +785,9 @@ Page({ | ||
140 | this.setData({ | 785 | this.setData({ |
141 | citychose: false, | 786 | citychose: false, |
142 | zhinengwrap: false, | 787 | zhinengwrap: false, |
143 | - pricechose: false | 788 | + pricechose: false, |
789 | + morechose: false, | ||
790 | + fenchose: false | ||
144 | 791 | ||
145 | 792 | ||
146 | }) | 793 | }) |
@@ -159,244 +806,242 @@ Page({ | @@ -159,244 +806,242 @@ Page({ | ||
159 | }) | 806 | }) |
160 | 807 | ||
161 | 808 | ||
809 | + //筛选 | ||
162 | 810 | ||
163 | - this.getshaicontent(); | ||
164 | - this.getmorenconetent(); | 811 | + console.log(that.data.selectinfo) |
812 | + | ||
165 | 813 | ||
166 | - let newzhinengarr1 = that.data.zhinengarr; | ||
167 | - console.log(342347) | ||
168 | - console.log(that.data.type); | ||
169 | - console.log(newzhinengarr1) | ||
170 | - // for (var obj of newzhinengarr1) { | ||
171 | - // if (that.data.type == 1) { | ||
172 | - // console.log(this.data.use_id) | ||
173 | - // if (obj.id = this.data.use_id) { | ||
174 | - // obj.sel = true | ||
175 | - // } | ||
176 | - // this.setData({ | ||
177 | - // zhinengarr: newzhinengarr1 | ||
178 | - // }) | ||
179 | - // } else if (that.data.type == 3) { | ||
180 | - // if (obj.id = this.data.package_id) { | ||
181 | - // obj.sel = true | ||
182 | - // } | ||
183 | - // this.setData({ | ||
184 | - // zhinengarr: newzhinengarr1 | ||
185 | - // }) | ||
186 | - // } else if (that.data.type == 4) { | ||
187 | - // if (obj.city = this.data.city) { | ||
188 | - // obj.sel = true | ||
189 | - // } | ||
190 | - // this.setData({ | ||
191 | - // zhinengarr: newzhinengarr1 | ||
192 | - // }) | ||
193 | - // } else if (that.data.type == 5) { | ||
194 | - // if (obj.id = this.data.odor_id) { | ||
195 | - // obj.sel = true | ||
196 | - // } | ||
197 | - // this.setData({ | ||
198 | - // zhinengarr: newzhinengarr1 | ||
199 | - // }) | ||
200 | - // } | ||
201 | - // } | 814 | + if (that.data.type == 1) { |
815 | + that.setData({ | ||
816 | + zhinengarr:that.data.selectinfo.use | ||
817 | + }) | ||
202 | 818 | ||
203 | - }, | ||
204 | - //隐藏智能筛选 | ||
205 | - hidezhineng() { | ||
206 | - this.setData({ | ||
207 | - zhinengwrap: false | ||
208 | - }) | 819 | + let newzhinengarr = that.data.zhinengarr; |
820 | + for (var obj of newzhinengarr) { | ||
821 | + obj.sel = false | ||
822 | + } | ||
209 | 823 | ||
210 | - let newnavarr = this.data.navarr; | ||
211 | - for (var obj of newnavarr) { | ||
212 | - obj.sel = false | ||
213 | - } | 824 | + that.setData({ |
825 | + zhinengarr: newzhinengarr | ||
826 | + }) | ||
214 | 827 | ||
215 | - this.setData({ | ||
216 | - navarr: newnavarr | ||
217 | - }) | 828 | + let newzhinengarr1 = that.data.zhinengarr; |
829 | + for (var obj of newzhinengarr1) { | ||
830 | + if (obj.id == that.data.use_id) { | ||
831 | + obj.sel = true | ||
832 | + } | ||
833 | + } | ||
218 | 834 | ||
219 | - }, | ||
220 | - hide() { | ||
221 | - this.setData({ | ||
222 | - citychose: false | ||
223 | - }) | ||
224 | 835 | ||
225 | - let newnavarr = this.data.navarr; | ||
226 | - for (var obj of newnavarr) { | ||
227 | - obj.sel = false | ||
228 | - } | 836 | + that.setData({ |
837 | + zhinengarr: newzhinengarr1 | ||
838 | + }) | ||
229 | 839 | ||
230 | - this.setData({ | ||
231 | - navarr: newnavarr | ||
232 | - }) | ||
233 | - }, | ||
234 | - //获取筛选内容 | ||
235 | - getshaicontent() { | ||
236 | - let that = this; | ||
237 | - let url = 'index/Filter/filter', | ||
238 | - params = { | ||
239 | 840 | ||
240 | - } | ||
241 | - app.post(url, params).then((res) => { | ||
242 | - console.log(res); | 841 | + } else if (that.data.type == 2) { |
842 | + console.log(that.data.selectinfo) | ||
243 | 843 | ||
244 | - | ||
245 | - if (that.data.type == 1) { | ||
246 | - that.setData({ | 844 | + let middlevalue = ''; |
247 | 845 | ||
248 | - zhinengarr: res.use | ||
249 | - }) | ||
250 | 846 | ||
251 | - let newzhinengarr = that.data.zhinengarr; | ||
252 | - for (var obj of newzhinengarr) { | ||
253 | - obj.sel = false | ||
254 | - } | ||
255 | 847 | ||
256 | - that.setData({ | ||
257 | - zhinengarr: newzhinengarr | ||
258 | - }) | 848 | + that.setData({ |
259 | 849 | ||
260 | - let newzhinengarr1 = that.data.zhinengarr; | ||
261 | - for (var obj of newzhinengarr1) { | ||
262 | - if (obj.id == that.data.use_id) { | ||
263 | - obj.sel = true | ||
264 | - } | ||
265 | - } | 850 | + leftMin: parseInt(that.data.selectinfo.price[0].realmin), |
851 | + rightMax: parseInt(that.data.selectinfo.price[0].realmax), | ||
266 | 852 | ||
853 | + min: parseInt(that.data.selectinfo.price[0].min) - parseInt(that.data.selectinfo.price[0].number), | ||
854 | + max: parseInt(that.data.selectinfo.price[0].max) + parseInt(that.data.selectinfo.price[0].number), | ||
855 | + priceyuan: that.data.selectinfo.price[0].realmin + '元' + '-' + that.data.selectinfo.price[0].realmax + '元', | ||
856 | + pricevalue: that.data.selectinfo.price[0].realmin + '-' + that.data.selectinfo.price[0].realmax, | ||
857 | + number: that.data.selectinfo.price[0].number | ||
858 | + }) | ||
859 | + console.log(909080807070) | ||
267 | 860 | ||
268 | - that.setData({ | ||
269 | - zhinengarr: newzhinengarr1 | ||
270 | - }) | 861 | + console.log(that.data.leftMin); |
862 | + console.log(that.data.rightMax); | ||
863 | + console.log(that.data.min) | ||
864 | + console.log(that.data.max) | ||
271 | 865 | ||
272 | - | ||
273 | - } else if (that.data.type == 2) { | ||
274 | - that.setData({ | ||
275 | - zhinengarr: res.price | ||
276 | - }) | ||
277 | - | ||
278 | - let newzhinengarr = that.data.zhinengarr; | ||
279 | - for (var obj of newzhinengarr) { | ||
280 | - obj.sel = false | ||
281 | - } | 866 | + that.setData({ |
867 | + zhinengarr: that.data.selectinfo.price | ||
868 | + }) | ||
282 | 869 | ||
283 | - that.setData({ | ||
284 | - zhinengarr: newzhinengarr | ||
285 | - }) | 870 | + let newzhinengarr = that.data.zhinengarr; |
871 | + for (var obj of newzhinengarr) { | ||
872 | + obj.sel = false | ||
873 | + } | ||
286 | 874 | ||
287 | - | 875 | + that.setData({ |
876 | + zhinengarr: newzhinengarr | ||
877 | + }) | ||
288 | 878 | ||
879 | + } else if (that.data.type == 3) { | ||
880 | + that.setData({ | ||
289 | 881 | ||
290 | - } else if (that.data.type == 3) { | ||
291 | - that.setData({ | ||
292 | - | ||
293 | - zhinengarr: res.packages | ||
294 | - }) | 882 | + zhinengarr: that.data.selectinfo.packages |
883 | + }) | ||
295 | 884 | ||
296 | - let newzhinengarr = that.data.zhinengarr; | ||
297 | - for (var obj of newzhinengarr) { | ||
298 | - obj.sel = false | ||
299 | - } | 885 | + let newzhinengarr = that.data.zhinengarr; |
886 | + for (var obj of newzhinengarr) { | ||
887 | + obj.sel = false | ||
888 | + } | ||
300 | 889 | ||
301 | - that.setData({ | ||
302 | - zhinengarr: newzhinengarr | ||
303 | - }) | 890 | + that.setData({ |
891 | + zhinengarr: newzhinengarr | ||
892 | + }) | ||
304 | 893 | ||
305 | 894 | ||
306 | - let newzhinengarr1 = that.data.zhinengarr; | ||
307 | - for (var obj of newzhinengarr1) { | ||
308 | - if (obj.id == that.data.package_id) { | ||
309 | - obj.sel = true | ||
310 | - } | 895 | + let newzhinengarr1 = that.data.zhinengarr; |
896 | + for (var obj of newzhinengarr1) { | ||
897 | + if (obj.id == that.data.package_id) { | ||
898 | + obj.sel = true | ||
311 | } | 899 | } |
900 | + } | ||
312 | 901 | ||
313 | 902 | ||
314 | - that.setData({ | ||
315 | - zhinengarr: newzhinengarr1 | ||
316 | - }) | ||
317 | - } else if (that.data.type == 4) { | ||
318 | - that.setData({ | ||
319 | - zhinengarr: res.city | ||
320 | - }) | 903 | + that.setData({ |
904 | + zhinengarr: newzhinengarr1 | ||
905 | + }) | ||
906 | + } else if (that.data.type == 4) { | ||
907 | + | ||
908 | + that.setData({ | ||
909 | + zhinengarr: that.data.selectinfo.city | ||
910 | + }) | ||
321 | 911 | ||
322 | 912 | ||
323 | - let newzhinengarr = that.data.zhinengarr; | ||
324 | - for (var obj of newzhinengarr) { | ||
325 | - obj.sel = false | ||
326 | - } | 913 | + let newzhinengarr = that.data.zhinengarr; |
914 | + for (var obj of newzhinengarr) { | ||
915 | + obj.sel = false | ||
916 | + } | ||
327 | 917 | ||
328 | - that.setData({ | ||
329 | - zhinengarr: newzhinengarr | ||
330 | - }) | 918 | + that.setData({ |
919 | + zhinengarr: newzhinengarr | ||
920 | + }) | ||
331 | 921 | ||
332 | 922 | ||
333 | - let newzhinengarr1 = that.data.zhinengarr; | ||
334 | - for (var obj of newzhinengarr1) { | ||
335 | - if (obj.city == that.data.city) { | ||
336 | - obj.sel = true | ||
337 | - } | 923 | + let newzhinengarr1 = that.data.zhinengarr; |
924 | + for (var obj of newzhinengarr1) { | ||
925 | + if (obj.city == that.data.city) { | ||
926 | + obj.sel = true | ||
338 | } | 927 | } |
928 | + } | ||
339 | 929 | ||
340 | 930 | ||
341 | - that.setData({ | ||
342 | - zhinengarr: newzhinengarr1 | ||
343 | - }) | 931 | + that.setData({ |
932 | + zhinengarr: newzhinengarr1 | ||
933 | + }) | ||
344 | 934 | ||
345 | 935 | ||
346 | - } else if (that.data.type == 5) { | ||
347 | - that.setData({ | ||
348 | - | ||
349 | - zhinengarr: res.odor | ||
350 | - }) | ||
351 | 936 | ||
352 | - let newzhinengarr = that.data.zhinengarr; | ||
353 | - for (var obj of newzhinengarr) { | ||
354 | - obj.sel = false | ||
355 | - } | ||
356 | 937 | ||
357 | - that.setData({ | ||
358 | - zhinengarr: newzhinengarr | ||
359 | - }) | 938 | + } else if (that.data.type == 5) { |
939 | + that.setData({ | ||
940 | + | ||
941 | + zhinengarr: that.data.selectinfo.odor | ||
942 | + }) | ||
360 | 943 | ||
944 | + let newzhinengarr = that.data.zhinengarr; | ||
945 | + for (var obj of newzhinengarr) { | ||
946 | + obj.sel = false | ||
947 | + } | ||
361 | 948 | ||
362 | - let newzhinengarr1 = that.data.zhinengarr; | ||
363 | - for (var obj of newzhinengarr1) { | ||
364 | - if (obj.id == that.data.odor_id) { | ||
365 | - obj.sel = true | ||
366 | - } | 949 | + that.setData({ |
950 | + zhinengarr: newzhinengarr | ||
951 | + }) | ||
952 | + | ||
953 | + | ||
954 | + let newzhinengarr1 = that.data.zhinengarr; | ||
955 | + for (var obj of newzhinengarr1) { | ||
956 | + if (obj.id == that.data.odor_id) { | ||
957 | + obj.sel = true | ||
367 | } | 958 | } |
959 | + } | ||
368 | 960 | ||
369 | 961 | ||
370 | - that.setData({ | ||
371 | - zhinengarr: newzhinengarr1 | ||
372 | - }) | 962 | + that.setData({ |
963 | + zhinengarr: newzhinengarr1 | ||
964 | + }) | ||
373 | 965 | ||
374 | - } else if (that.data.type == 6) { | ||
375 | - that.setData({ | ||
376 | - | ||
377 | - zhinengarr: res.score_list | ||
378 | - }) | ||
379 | - } | 966 | + } else if (that.data.type == 6) { |
967 | + console.log(that.data.selectinfo) | ||
380 | 968 | ||
381 | - | 969 | + that.setData({ |
970 | + zhinengarr: that.data.selectinfo.score_list | ||
971 | + }) | ||
382 | 972 | ||
383 | 973 | ||
974 | + that.setData({ | ||
384 | 975 | ||
976 | + fenleftMin: parseInt(that.data.selectinfo.score_list[0].realmin), | ||
977 | + fenrightMax: parseInt(that.data.selectinfo.score_list[0].realmax), | ||
385 | 978 | ||
979 | + fenmin: parseInt(that.data.selectinfo.score_list[0].min) - parseInt(that.data.selectinfo.score_list[0].number), | ||
980 | + fenmax: parseInt(that.data.selectinfo.score_list[0].max) + parseInt(that.data.selectinfo.score_list[0].number), | ||
981 | + score: that.data.selectinfo.score_list[0].realmin + that.data.selectinfo.score_list[0].unit + '-' + that.data.selectinfo.score_list[0].realmax + that.data.selectinfo.score_list[0].unit, | ||
982 | + chuanscore: that.data.selectinfo.score_list[0].realmin + '-' + that.data.selectinfo.score_list[0].realmax, | ||
983 | + fennumber: that.data.selectinfo.score_list[0].number | ||
984 | + }) | ||
386 | 985 | ||
986 | + console.log(that.data.fenmax) | ||
387 | 987 | ||
988 | + console.log(that.data.fenleftMin); | ||
989 | + console.log(that.data.fenrightMax) | ||
990 | + } | ||
388 | 991 | ||
389 | 992 | ||
390 | - }).catch((err) => { | ||
391 | 993 | ||
994 | + this._propertyLeftValueChange(); | ||
995 | + this._propertyRightValueChange() | ||
996 | + // that.getshaicontent(); | ||
997 | + | ||
998 | + | ||
999 | + // this.getmorenconetent(); | ||
1000 | + | ||
1001 | + // let newzhinengarr1 = that.data.zhinengarr; | ||
1002 | + }, | ||
1003 | + //隐藏智能筛选 | ||
1004 | + hidezhineng() { | ||
1005 | + this.setData({ | ||
1006 | + zhinengwrap: false | ||
1007 | + }) | ||
1008 | + | ||
1009 | + let newnavarr = this.data.navarr; | ||
1010 | + for (var obj of newnavarr) { | ||
1011 | + obj.sel = false | ||
1012 | + } | ||
1013 | + | ||
1014 | + this.setData({ | ||
1015 | + navarr: newnavarr | ||
1016 | + }) | ||
1017 | + | ||
1018 | + }, | ||
1019 | + hide() { | ||
1020 | + this.setData({ | ||
1021 | + citychose: false | ||
1022 | + }) | ||
1023 | + | ||
1024 | + let newnavarr = this.data.navarr; | ||
1025 | + for (var obj of newnavarr) { | ||
1026 | + obj.sel = false | ||
1027 | + } | ||
1028 | + | ||
1029 | + this.setData({ | ||
1030 | + navarr: newnavarr, | ||
1031 | + // page:1, | ||
1032 | + // zhinenglist:[] | ||
392 | }) | 1033 | }) |
393 | }, | 1034 | }, |
1035 | + | ||
394 | //选择种类 | 1036 | //选择种类 |
395 | shosekind(e) { | 1037 | shosekind(e) { |
396 | let id = e.currentTarget.dataset.id; | 1038 | let id = e.currentTarget.dataset.id; |
397 | console.log(this.data.type) | 1039 | console.log(this.data.type) |
398 | 1040 | ||
399 | - | 1041 | + this.setData({ |
1042 | + zhinenglist:[], | ||
1043 | + page:1 | ||
1044 | + }) | ||
400 | 1045 | ||
401 | let newzhinengarr = this.data.zhinengarr; | 1046 | let newzhinengarr = this.data.zhinengarr; |
402 | for (var obj of newzhinengarr) { | 1047 | for (var obj of newzhinengarr) { |
@@ -404,6 +1049,7 @@ Page({ | @@ -404,6 +1049,7 @@ Page({ | ||
404 | 1049 | ||
405 | 1050 | ||
406 | if (this.data.type == 1) { | 1051 | if (this.data.type == 1) { |
1052 | + console.log(111) | ||
407 | obj.sel = !obj.sel; | 1053 | obj.sel = !obj.sel; |
408 | if (obj.sel == true) { | 1054 | if (obj.sel == true) { |
409 | this.setData({ | 1055 | this.setData({ |
@@ -419,10 +1065,17 @@ Page({ | @@ -419,10 +1065,17 @@ Page({ | ||
419 | this.setData({ | 1065 | this.setData({ |
420 | use_id: '' | 1066 | use_id: '' |
421 | }) | 1067 | }) |
1068 | + | ||
1069 | + let newnavarr = this.data.navarr; | ||
1070 | + newnavarr[0].name = '用途'; | ||
1071 | + this.setData({ | ||
1072 | + navarr: newnavarr | ||
1073 | + }) | ||
422 | } | 1074 | } |
423 | 1075 | ||
424 | - this.getmorenconetent() | 1076 | + |
425 | } else if (this.data.type == 3) { | 1077 | } else if (this.data.type == 3) { |
1078 | + console.log(333) | ||
426 | obj.sel = !obj.sel; | 1079 | obj.sel = !obj.sel; |
427 | if (obj.sel == true) { | 1080 | if (obj.sel == true) { |
428 | this.setData({ | 1081 | this.setData({ |
@@ -438,10 +1091,17 @@ Page({ | @@ -438,10 +1091,17 @@ Page({ | ||
438 | this.setData({ | 1091 | this.setData({ |
439 | package_id: '' | 1092 | package_id: '' |
440 | }) | 1093 | }) |
1094 | + | ||
1095 | + let newnavarr = this.data.navarr; | ||
1096 | + newnavarr[2].name = '包装'; | ||
1097 | + this.setData({ | ||
1098 | + navarr: newnavarr | ||
1099 | + }) | ||
441 | } | 1100 | } |
442 | 1101 | ||
443 | - this.getmorenconetent() | 1102 | + |
444 | } else if (this.data.type == 5) { | 1103 | } else if (this.data.type == 5) { |
1104 | + console.log(555) | ||
445 | obj.sel = !obj.sel; | 1105 | obj.sel = !obj.sel; |
446 | if (obj.sel == true) { | 1106 | if (obj.sel == true) { |
447 | this.setData({ | 1107 | this.setData({ |
@@ -457,48 +1117,62 @@ Page({ | @@ -457,48 +1117,62 @@ Page({ | ||
457 | this.setData({ | 1117 | this.setData({ |
458 | odor_id: '' | 1118 | odor_id: '' |
459 | }) | 1119 | }) |
1120 | + let newnavarr = this.data.navarr; | ||
1121 | + newnavarr[4].name = '香型'; | ||
1122 | + this.setData({ | ||
1123 | + navarr: newnavarr | ||
1124 | + }) | ||
460 | } | 1125 | } |
461 | 1126 | ||
462 | - this.getmorenconetent() | ||
463 | - } | 1127 | + |
1128 | + } else if (this.data.type == 4) { | ||
1129 | + console.log(444) | ||
1130 | + let cityname = e.currentTarget.dataset.name; | ||
464 | 1131 | ||
465 | 1132 | ||
466 | - } else { | ||
467 | - obj.sel = false | ||
468 | - } | ||
469 | 1133 | ||
470 | - if (this.data.type == 4) { | ||
471 | - let cityname = e.currentTarget.dataset.name; | 1134 | + if (obj.city == cityname) { |
1135 | + obj.sel = !obj.sel | ||
1136 | + if (obj.sel == true) { | ||
1137 | + this.setData({ | ||
1138 | + city: obj.city, | ||
472 | 1139 | ||
1140 | + }) | ||
473 | 1141 | ||
1142 | + let newnavarr = this.data.navarr; | ||
1143 | + newnavarr[3].name = obj.city; | ||
1144 | + this.setData({ | ||
1145 | + navarr: newnavarr | ||
1146 | + }) | ||
1147 | + } else { | ||
1148 | + this.setData({ | ||
1149 | + city: '' | ||
1150 | + }) | ||
474 | 1151 | ||
475 | - if (obj.city == cityname) { | ||
476 | - obj.sel = !obj.sel | ||
477 | - if (obj.sel == true) { | ||
478 | - this.setData({ | ||
479 | - city: obj.city, | 1152 | + let newnavarr = this.data.navarr; |
1153 | + newnavarr[3].name = '产区'; | ||
1154 | + this.setData({ | ||
1155 | + navarr: newnavarr | ||
1156 | + }) | ||
480 | 1157 | ||
481 | - }) | ||
482 | - | ||
483 | - let newnavarr = this.data.navarr; | ||
484 | - newnavarr[3].name = obj.city; | ||
485 | - this.setData({ | ||
486 | - navarr: newnavarr | ||
487 | - }) | 1158 | + } |
488 | } else { | 1159 | } else { |
489 | - this.setData({ | ||
490 | - city: '' | ||
491 | - }) | ||
492 | - | 1160 | + obj.sel = false |
493 | } | 1161 | } |
494 | - } else { | ||
495 | - obj.sel = false | ||
496 | - } | ||
497 | 1162 | ||
498 | - this.getmorenconetent() | 1163 | + |
1164 | + } | ||
1165 | + | ||
1166 | + | ||
1167 | + } else { | ||
1168 | + obj.sel = false | ||
499 | } | 1169 | } |
1170 | + | ||
1171 | + | ||
500 | } | 1172 | } |
501 | 1173 | ||
1174 | + this.getmorenconetent() | ||
1175 | + | ||
502 | this.setData({ | 1176 | this.setData({ |
503 | zhinengarr: newzhinengarr | 1177 | zhinengarr: newzhinengarr |
504 | }) | 1178 | }) |
@@ -507,33 +1181,55 @@ Page({ | @@ -507,33 +1181,55 @@ Page({ | ||
507 | }, | 1181 | }, |
508 | //获取默认数据 | 1182 | //获取默认数据 |
509 | getmorenconetent() { | 1183 | getmorenconetent() { |
1184 | + | ||
510 | let that = this; | 1185 | let that = this; |
511 | - console.log(that.data.pricevalues) | 1186 | + |
1187 | + let nemore=''; | ||
1188 | + let canarr=[]; | ||
1189 | + if(that.data.morecan.length==0){ | ||
1190 | + console.log(99000) | ||
1191 | + nemore='' | ||
1192 | + }else{ | ||
1193 | + console.log(98000) | ||
1194 | + let pp = that.data.morecan | ||
1195 | + | ||
1196 | + // console.log(nemore.length) | ||
1197 | + for (var i = 0; i < pp.length;i++){ | ||
1198 | + console.log(typeof (pp[i])) | ||
1199 | + if (typeof (pp[i]) == 'object'){ | ||
1200 | + canarr.push(pp[i]) | ||
1201 | + // nemore.splice(i,1) | ||
1202 | + } | ||
1203 | + } | ||
1204 | + nemore = canarr | ||
1205 | + | ||
1206 | + } | ||
1207 | + console.log(nemore) | ||
1208 | + | ||
512 | let url = 'index/Filter/index', | 1209 | let url = 'index/Filter/index', |
513 | params = { | 1210 | params = { |
514 | use_id: that.data.use_id, | 1211 | use_id: that.data.use_id, |
515 | odor_id: that.data.odor_id, | 1212 | odor_id: that.data.odor_id, |
516 | - price: that.data.pricevalues, | 1213 | + price: that.data.pricevalue, |
517 | package_id: that.data.package_id, | 1214 | package_id: that.data.package_id, |
518 | city: that.data.city, | 1215 | city: that.data.city, |
519 | - score: that.data.score, | ||
520 | - more: that.data.more, | 1216 | + score: that.data.chuanscore, |
1217 | + more: nemore, | ||
521 | page: that.data.page | 1218 | page: that.data.page |
522 | 1219 | ||
523 | } | 1220 | } |
524 | app.post(url, params).then((res) => { | 1221 | app.post(url, params).then((res) => { |
525 | console.log(res); | 1222 | console.log(res); |
526 | that.setData({ | 1223 | that.setData({ |
527 | - zhinenglist: res.list | 1224 | + zhinenglist: this.data.zhinenglist.concat(res.list) |
528 | }) | 1225 | }) |
529 | - | ||
530 | - | ||
531 | - | 1226 | + |
532 | }).catch((err) => { | 1227 | }).catch((err) => { |
533 | 1228 | ||
534 | }) | 1229 | }) |
535 | }, | 1230 | }, |
536 | 1231 | ||
1232 | + | ||
537 | //收藏 | 1233 | //收藏 |
538 | collect(e) { | 1234 | collect(e) { |
539 | let that = this; | 1235 | let that = this; |
@@ -543,7 +1239,6 @@ Page({ | @@ -543,7 +1239,6 @@ Page({ | ||
543 | params = { | 1239 | params = { |
544 | sort: 1, | 1240 | sort: 1, |
545 | id: id | 1241 | id: id |
546 | - | ||
547 | } | 1242 | } |
548 | app.post(url, params).then((res) => { | 1243 | app.post(url, params).then((res) => { |
549 | 1244 | ||
@@ -551,7 +1246,22 @@ Page({ | @@ -551,7 +1246,22 @@ Page({ | ||
551 | title: res, | 1246 | title: res, |
552 | icon: 'none' | 1247 | icon: 'none' |
553 | }) | 1248 | }) |
554 | - that.getmorenconetent() | 1249 | + |
1250 | + let newzhinenglist = that.data.zhinenglist; | ||
1251 | + for(var obj of newzhinenglist){ | ||
1252 | + if(obj.id==id){ | ||
1253 | + if (obj.is_favorite==0){ | ||
1254 | + obj.is_favorite=1 | ||
1255 | + }else{ | ||
1256 | + obj.is_favorite = 0 | ||
1257 | + } | ||
1258 | + } | ||
1259 | + } | ||
1260 | + | ||
1261 | + that.setData({ | ||
1262 | + zhinenglist:newzhinenglist | ||
1263 | + }) | ||
1264 | + // that.getmorenconetent() | ||
555 | 1265 | ||
556 | 1266 | ||
557 | }).catch((err) => { | 1267 | }).catch((err) => { |
@@ -559,7 +1269,7 @@ Page({ | @@ -559,7 +1269,7 @@ Page({ | ||
559 | }) | 1269 | }) |
560 | }, | 1270 | }, |
561 | changing(e){ | 1271 | changing(e){ |
562 | - console.log(e); | 1272 | + |
563 | this.setData({ | 1273 | this.setData({ |
564 | priceyuan:e.detail.value+'元', | 1274 | priceyuan:e.detail.value+'元', |
565 | pricevalue:e.detail.value | 1275 | pricevalue:e.detail.value |
@@ -568,7 +1278,9 @@ Page({ | @@ -568,7 +1278,9 @@ Page({ | ||
568 | 1278 | ||
569 | hideprice(){ | 1279 | hideprice(){ |
570 | this.setData({ | 1280 | this.setData({ |
571 | - pricechose:false | 1281 | + pricechose:false, |
1282 | + page:1, | ||
1283 | + zhinenglist:[] | ||
572 | }) | 1284 | }) |
573 | let newnavarr = this.data.navarr; | 1285 | let newnavarr = this.data.navarr; |
574 | for (var obj of newnavarr) { | 1286 | for (var obj of newnavarr) { |
@@ -581,6 +1293,14 @@ Page({ | @@ -581,6 +1293,14 @@ Page({ | ||
581 | 1293 | ||
582 | this.getmorenconetent() | 1294 | this.getmorenconetent() |
583 | }, | 1295 | }, |
1296 | + | ||
1297 | + jumpbrand(e) { | ||
1298 | + let id = e.currentTarget.dataset.id | ||
1299 | + wx.navigateTo({ | ||
1300 | + url: '/pages/homeblock/jiuzidian/jiuzidian?id=' + id, | ||
1301 | + }) | ||
1302 | + | ||
1303 | + }, | ||
584 | /** | 1304 | /** |
585 | * 生命周期函数--监听页面初次渲染完成 | 1305 | * 生命周期函数--监听页面初次渲染完成 |
586 | */ | 1306 | */ |
@@ -592,6 +1312,9 @@ Page({ | @@ -592,6 +1312,9 @@ Page({ | ||
592 | * 生命周期函数--监听页面显示 | 1312 | * 生命周期函数--监听页面显示 |
593 | */ | 1313 | */ |
594 | onShow: function() { | 1314 | onShow: function() { |
1315 | + this.getshaicontent() | ||
1316 | + this.getmorecan() | ||
1317 | + // this.getshaicontent(); | ||
595 | 1318 | ||
596 | }, | 1319 | }, |
597 | 1320 | ||
@@ -620,7 +1343,12 @@ Page({ | @@ -620,7 +1343,12 @@ Page({ | ||
620 | * 页面上拉触底事件的处理函数 | 1343 | * 页面上拉触底事件的处理函数 |
621 | */ | 1344 | */ |
622 | onReachBottom: function() { | 1345 | onReachBottom: function() { |
623 | - | 1346 | + let page=this.data.page; |
1347 | + page++; | ||
1348 | + this.setData({ | ||
1349 | + page:page | ||
1350 | + }) | ||
1351 | + this.getmorenconetent() | ||
624 | }, | 1352 | }, |
625 | 1353 | ||
626 | /** | 1354 | /** |
1 | <!-- 筛选内容 --> | 1 | <!-- 筛选内容 --> |
2 | 2 | ||
3 | -<view class="register" wx:if="{{zhinengwrap}}" bindtap="hidezhineng"> | 3 | +<view class="register" wx:if="{{zhinengwrap}}" bindtap="hidezhineng" catchtouchmove='true'> |
4 | <view class="registerwrap" catchtap=""> | 4 | <view class="registerwrap" catchtap=""> |
5 | <view class="registeritem {{item.sel==true?'choseactive':''}}" wx:if="{{type==1}}" wx:for="{{zhinengarr}}" wx:key="" catchtap="shosekind" data-id="{{item.id}}">{{item.use_name}}</view> | 5 | <view class="registeritem {{item.sel==true?'choseactive':''}}" wx:if="{{type==1}}" wx:for="{{zhinengarr}}" wx:key="" catchtap="shosekind" data-id="{{item.id}}">{{item.use_name}}</view> |
6 | - <view class="registeritem" wx:if="{{type==2}}" wx:for="{{zhinengarr}}" wx:key="">浓香型</view> | 6 | + |
7 | <view class="registeritem {{item.sel==true?'choseactive':''}}" wx:if="{{type==3}}" wx:for="{{zhinengarr}}" wx:key="" catchtap="shosekind" data-id="{{item.id}}">{{item.package_name}}</view> | 7 | <view class="registeritem {{item.sel==true?'choseactive':''}}" wx:if="{{type==3}}" wx:for="{{zhinengarr}}" wx:key="" catchtap="shosekind" data-id="{{item.id}}">{{item.package_name}}</view> |
8 | 8 | ||
9 | <view class="registeritem {{item.sel==true?'choseactive':''}}" wx:if="{{type==5}}" wx:for="{{zhinengarr}}" wx:key="" catchtap="shosekind" data-id="{{item.id}}">{{item.odor_name}}</view> | 9 | <view class="registeritem {{item.sel==true?'choseactive':''}}" wx:if="{{type==5}}" wx:for="{{zhinengarr}}" wx:key="" catchtap="shosekind" data-id="{{item.id}}">{{item.odor_name}}</view> |
10 | - <view class="registeritem" wx:if="{{type==6}}" wx:for="{{zhinengarr}}" wx:key="">浓香型</view> | 10 | + |
11 | 11 | ||
12 | </view> | 12 | </view> |
13 | </view> | 13 | </view> |
14 | <!-- 城市筛选 --> | 14 | <!-- 城市筛选 --> |
15 | -<view class="register" wx:if="{{citychose}}" bindtap="hide"> | 15 | +<view class="register" wx:if="{{citychose}}" bindtap="hide" catchtouchmove='true'> |
16 | <view class="registerwrap"> | 16 | <view class="registerwrap"> |
17 | <view class="citylist" catchtap="shosekind" data-id="{{item.id}}" wx:for="{{zhinengarr}}" wx:key="" data-name="{{item.city}}"> | 17 | <view class="citylist" catchtap="shosekind" data-id="{{item.id}}" wx:for="{{zhinengarr}}" wx:key="" data-name="{{item.city}}"> |
18 | <view class="cityitem">{{item.city}}</view> | 18 | <view class="cityitem">{{item.city}}</view> |
@@ -24,21 +24,95 @@ | @@ -24,21 +24,95 @@ | ||
24 | </view> | 24 | </view> |
25 | </view> | 25 | </view> |
26 | <!-- 价格 --> | 26 | <!-- 价格 --> |
27 | -<view class="register" wx:if="{{pricechose}}" bindtap="hideprice"> | ||
28 | - <view class="registerwrap"> | ||
29 | - | ||
30 | - <view class="section section_gap"> | 27 | +<view class="register" wx:if="{{pricechose}}" bindtap="hideprice" catchtouchmove='true'> |
28 | + <view class="pregisterwrap"> | ||
31 | 29 | ||
32 | <view class="pyuan">{{priceyuan}}</view> | 30 | <view class="pyuan">{{priceyuan}}</view> |
33 | 31 | ||
34 | - <view class="body-view"> | ||
35 | - <slider bindchange="slider2change" step="5" backgroundColor="#f5f5f5" activeColor="red" block-size="8" step="1" bindchanging="changing" value="{{pricevalue}}" max="{{zhinengarr[0].max}}" min="{{zhinengarr[0].min}}"/> | 32 | + <view class="zy-slider" catchtap='pingbi'> |
33 | + <zy-slider id="zy-slider1" minValue="{{leftMin}}" maxValue="{{rightMax}}" min="{{min}}" max="{{max}}" blockColor="#0099FF" backgroundColor="#B0C4DE" selectedColor="#FF1493" bind:lowValueChange="lowValueChangeAction" bind:heighValueChange="heighValueChangeAction" | ||
34 | + /> | ||
35 | +<!-- style="left:{{ppleft}}rpx; width:{{ppvalue-ppleft}}rpx" --> | ||
36 | + <view class="pp" style="width:95%;background:red;height:10rpx;margin:50rpx auto 0"> | ||
37 | + <view class="ppitem"></view> | ||
38 | + <view class="ppitem"></view> | ||
39 | + <view class="ppitem"></view> | ||
40 | + <view class="ppitem"></view> | ||
36 | </view> | 41 | </view> |
42 | + | ||
43 | + | ||
44 | + | ||
45 | + | ||
46 | + | ||
47 | + | ||
48 | + | ||
49 | + | ||
37 | </view> | 50 | </view> |
38 | 51 | ||
52 | + | ||
53 | + | ||
54 | + | ||
39 | </view> | 55 | </view> |
40 | </view> | 56 | </view> |
41 | 57 | ||
58 | +<!-- 评分 --> | ||
59 | +<view class="register" wx:if="{{fenchose}}" bindtap="hidefen" catchtouchmove='true'> | ||
60 | + <view class="pregisterwrap"> | ||
61 | + <view class="pyuan">{{score}}</view> | ||
62 | + | ||
63 | + <view class="zy-slider"> | ||
64 | + <zy-slider id="zy-slider1" minValue="{{fenleftMin}}" maxValue="{{fenrightMax}}" min="{{fenmin}}" max="{{fenmax}}" blockColor="#0099FF" backgroundColor="#B0C4DE" selectedColor="#FF1493" bind:lowValueChange="fenlowValueChangeAction" bind:heighValueChange="fenheighValueChangeAction" | ||
65 | + /> | ||
66 | + </view> | ||
67 | + | ||
68 | + </view> | ||
69 | +</view> | ||
70 | + | ||
71 | +<!-- 更多筛选 --> | ||
72 | +<view class="register" wx:if="{{morechose}}" bindtap="hidemorechose"> | ||
73 | + <view class="moreregisterwrap"> | ||
74 | + | ||
75 | + | ||
76 | + <view wx:for="{{morelist}}" wx:key="" wx:for-index="par"> | ||
77 | + | ||
78 | + <view class="selectbox" wx:if="{{item.basic_sort==1}}"> | ||
79 | + <view class="selecttop"> | ||
80 | + <view class="selectopname {{item.sel==true?'selactive':''}}">{{item.name}}</view> | ||
81 | + <view class="selectrow"> | ||
82 | + <image src="{{url}}/aicon_16@2x.png" wx:if="{{item.sel==true}}"></image> | ||
83 | + <image src="{{url}}/aicon_14x.png" wx:else></image> | ||
84 | + </view> | ||
85 | + </view> | ||
86 | + <view class="valuebox"> | ||
87 | + <view class="registeritem {{itema.twsel==true?'actitem':''}}" wx:for="{{item.value_list}}" wx:for-item="itema" wx:key="" catchtap='selectmoreitem' data-childindex="{{child}}" wx:for-index="child" data-parindex="{{par}}" data-id="{{item.id}}" data-basic_sort="{{item.basic_sort}}" | ||
88 | + data-content="{{itema.content}}">{{itema.content}}</view> | ||
89 | + </view> | ||
90 | + | ||
91 | + </view> | ||
92 | + | ||
93 | + <view class='sliderHCon' wx:if="{{item.basic_sort==2}}"> | ||
94 | + <view class='tiaohead'> | ||
95 | + <view class="tiaoleft">{{item.name}}</view> | ||
96 | + <view class="tiaoright">{{item.between}}</view> | ||
97 | + </view> | ||
98 | + <!-- <view class='twoSlider'> | ||
99 | + <slider min='{{leftMin}}' max='{{leftMax}}' value='{{leftValue}}' activeColor='#cecacb' backgroundColor='#E81825' block-size='8' step='1' style='width:{{leftWidth}}%;margin-right:0rpx;' bindchange="leftChange" /> | ||
100 | + <slider min='{{rightMin}}' max='{{rightMax}}' value='{{rightValue}}' activeColor='#E81825' backgroundColor='#cecacb' block-size='8' step='1' style='width:{{rightWidth}}%;margin-left:0rpx;' bindchange="rightChange" /> | ||
101 | + </view> --> | ||
102 | + | ||
103 | + <view class="zy-slider"> | ||
104 | + <zy-slider id="zy-slider1" minValue="{{item.realmin}}" maxValue="{{item.realmax}}" min="{{item.zmin}}" max="{{item.zmax}}" blockColor="#0099FF" backgroundColor="#B0C4DE" selectedColor="#FF1493" bind:lowValueChange="lowValueChangeAction1" data-id="{{item.id}}" | ||
105 | + data-basic_sort="{{item.basic_sort}}" bind:heighValueChange="heighValueChangeAction1" data-parindex="{{par}}" /> | ||
106 | + </view> | ||
107 | + </view> | ||
108 | + | ||
109 | + </view> | ||
110 | + | ||
111 | + | ||
112 | + | ||
113 | + | ||
114 | + </view> | ||
115 | +</view> | ||
42 | <view class="shaisel"> | 116 | <view class="shaisel"> |
43 | <view class="kind"> | 117 | <view class="kind"> |
44 | <view class="shaikind" wx:for="{{navarr}}" wx:key='' bindtap="select" data-idx="{{index}}" data-type="{{item.type}}"> | 118 | <view class="shaikind" wx:for="{{navarr}}" wx:key='' bindtap="select" data-idx="{{index}}" data-type="{{item.type}}"> |
@@ -49,17 +123,20 @@ | @@ -49,17 +123,20 @@ | ||
49 | </view> | 123 | </view> |
50 | 124 | ||
51 | </view> | 125 | </view> |
52 | - <view class="more"> | 126 | + <view class="more" bindtap="mores"> |
53 | <image src="{{url}}aicon_15x.png"></image> | 127 | <image src="{{url}}aicon_15x.png"></image> |
54 | </view> | 128 | </view> |
55 | 129 | ||
56 | </view> | 130 | </view> |
57 | 131 | ||
58 | <view class="zhinengbox"> | 132 | <view class="zhinengbox"> |
133 | + <view class="nodataimg" wx:if="{{zhinenglist.length==0}}"> | ||
134 | + <image src="/img/wushuju.png"></image> | ||
135 | + </view> | ||
136 | + | ||
59 | 137 | ||
60 | - <view class="nodata" wx:if="{{zhinenglist.length==0}}">暂无数据</view> | ||
61 | <block wx:else> | 138 | <block wx:else> |
62 | - <view class="searchitem" wx:for="{{zhinenglist}}" wx:key=""> | 139 | + <view class="searchitem" wx:for="{{zhinenglist}}" wx:key="" bindtap="jumpbrand" data-id="{{item.id}}"> |
63 | <view class="searchitemleft"> | 140 | <view class="searchitemleft"> |
64 | <view class="itemleftimg"> | 141 | <view class="itemleftimg"> |
65 | <image src="{{item.logo}}"></image> | 142 | <image src="{{item.logo}}"></image> |
@@ -87,4 +164,6 @@ | @@ -87,4 +164,6 @@ | ||
87 | </view> | 164 | </view> |
88 | </block> | 165 | </block> |
89 | 166 | ||
167 | + | ||
168 | + | ||
90 | </view> | 169 | </view> |
-
请 注册 或 登录 后发表评论