正在显示
11 个修改的文件
包含
195 行增加
和
34 行删除
@@ -33,7 +33,12 @@ | @@ -33,7 +33,12 @@ | ||
33 | "pages/myblock/niangjiulist/niangjiulist", | 33 | "pages/myblock/niangjiulist/niangjiulist", |
34 | "pages/myblock/shezhimima/shezhimima", | 34 | "pages/myblock/shezhimima/shezhimima", |
35 | "pages/homeblock/video/video", | 35 | "pages/homeblock/video/video", |
36 | - "pages/homeblock/shuxing/shuxing" | 36 | + "pages/homeblock/shuxing/shuxing", |
37 | + "pages/homeblock/selectcity/selectcity", | ||
38 | + "pages/findblock/zhuanjiapinjiu/zhuanjiapinjiu", | ||
39 | + "pages/findblock/zhuanjiapinjiudetail/zhuanjiapinjiudetail", | ||
40 | + "pages/findblock/niangjiushi/niangjiushi", | ||
41 | + "pages/findblock/jiudandetail/jiudandetail" | ||
37 | ], | 42 | ], |
38 | "window": { | 43 | "window": { |
39 | "backgroundTextStyle": "light", | 44 | "backgroundTextStyle": "light", |
@@ -14,6 +14,9 @@ Page({ | @@ -14,6 +14,9 @@ Page({ | ||
14 | interval: 2000, | 14 | interval: 2000, |
15 | duration: 1000, | 15 | duration: 1000, |
16 | currentSwiper: 0, | 16 | currentSwiper: 0, |
17 | + banner:[], | ||
18 | + list:[], | ||
19 | + news: [] | ||
17 | }, | 20 | }, |
18 | 21 | ||
19 | /** | 22 | /** |
@@ -23,6 +26,35 @@ Page({ | @@ -23,6 +26,35 @@ Page({ | ||
23 | this.setData({ | 26 | this.setData({ |
24 | url: app.globalData.url | 27 | url: app.globalData.url |
25 | }) | 28 | }) |
29 | + | ||
30 | + | ||
31 | + }, | ||
32 | + | ||
33 | + //获取发现列表 | ||
34 | + getfindlist(){ | ||
35 | + | ||
36 | + let that = this; | ||
37 | + let url = 'index/Find/index', params = { | ||
38 | + | ||
39 | + | ||
40 | + } | ||
41 | + app.post(url, params).then((res) => { | ||
42 | + console.log(res); | ||
43 | + that.setData({ | ||
44 | + imgUrls:res.banner, | ||
45 | + list:res.list, | ||
46 | + news:res.news | ||
47 | + }) | ||
48 | + | ||
49 | + console.log(that.data.news) | ||
50 | + console.log(that.data.list) | ||
51 | + | ||
52 | + | ||
53 | + | ||
54 | + }).catch((err) => { | ||
55 | + | ||
56 | + }) | ||
57 | + | ||
26 | }, | 58 | }, |
27 | swiperChange: function (e) { | 59 | swiperChange: function (e) { |
28 | this.setData({ | 60 | this.setData({ |
@@ -41,7 +73,7 @@ Page({ | @@ -41,7 +73,7 @@ Page({ | ||
41 | * 生命周期函数--监听页面显示 | 73 | * 生命周期函数--监听页面显示 |
42 | */ | 74 | */ |
43 | onShow: function () { | 75 | onShow: function () { |
44 | - | 76 | + this.getfindlist() |
45 | }, | 77 | }, |
46 | 78 | ||
47 | /** | 79 | /** |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
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"> |
3 | <block wx:for="{{imgUrls}}" wx:key="doct"> | 3 | <block wx:for="{{imgUrls}}" wx:key="doct"> |
4 | <swiper-item style="border-radius:10px;"> | 4 | <swiper-item style="border-radius:10px;"> |
5 | - <image src="{{item}}" data-index='{{index}}' class="slide-image" bindtap='viewImg' width="355" height="150" /> | 5 | + <image src="{{item.image}}" data-index='{{index}}' class="slide-image" bindtap='viewImg' width="355" height="150" /> |
6 | </swiper-item> | 6 | </swiper-item> |
7 | </block> | 7 | </block> |
8 | </swiper> | 8 | </swiper> |
@@ -34,26 +34,26 @@ | @@ -34,26 +34,26 @@ | ||
34 | 34 | ||
35 | </view> | 35 | </view> |
36 | 36 | ||
37 | -<view class="tast"> | 37 | +<view class="tast" wx:for="{{news}}" wx:key=''> |
38 | <view class="tastimg"> | 38 | <view class="tastimg"> |
39 | - <image src="{{url}}aicon_25@2x.png"></image> | 39 | + <image src="{{item.thumb}}"></image> |
40 | </view> | 40 | </view> |
41 | 41 | ||
42 | <view class="tastcontent"> | 42 | <view class="tastcontent"> |
43 | - <view class="tasttitle">石库门·海上繁华</view> | ||
44 | - <view class="tasttext">海派风味:开坛飘香,入口爽滑</view> | 43 | + <view class="tasttitle">{{item.title}}</view> |
44 | + <view class="tasttext">{{item.description}}</view> | ||
45 | </view> | 45 | </view> |
46 | 46 | ||
47 | </view> | 47 | </view> |
48 | 48 | ||
49 | -<view class="wineblock"> | 49 | +<view class="wineblock" wx:for="{{list}}" wx:key=""> |
50 | <view class="middlehead"> | 50 | <view class="middlehead"> |
51 | <view class="rilihead"> | 51 | <view class="rilihead"> |
52 | <view class="rili"> | 52 | <view class="rili"> |
53 | - <image src="{{url}}aicon_46x.png"></image> | 53 | + <image src="{{item.icon}}"></image> |
54 | </view> | 54 | </view> |
55 | <view class="jiudan"> | 55 | <view class="jiudan"> |
56 | - 酒单推荐 | 56 | + {{item.name}} |
57 | </view> | 57 | </view> |
58 | </view> | 58 | </view> |
59 | 59 | ||
@@ -65,7 +65,7 @@ | @@ -65,7 +65,7 @@ | ||
65 | </view> | 65 | </view> |
66 | 66 | ||
67 | </view> | 67 | </view> |
68 | - <view class="winetitle">年轻人生日party必备酒单</view> | 68 | + <view class="winetitle">{{item.article.share_content}}</view> |
69 | 69 | ||
70 | <view class="wineimg"> | 70 | <view class="wineimg"> |
71 | <image src="{{url}}aicon_64.png"></image> | 71 | <image src="{{url}}aicon_64.png"></image> |
@@ -84,13 +84,13 @@ | @@ -84,13 +84,13 @@ | ||
84 | <view class="winerighttouimg"> | 84 | <view class="winerighttouimg"> |
85 | <image src="{{url}}aicon_66x.png"></image> | 85 | <image src="{{url}}aicon_66x.png"></image> |
86 | </view> | 86 | </view> |
87 | - <view class="winezan">18</view> | 87 | + <view class="winezan">{{item.article.good_count}}</view> |
88 | </view> | 88 | </view> |
89 | <view class="winerighttou"> | 89 | <view class="winerighttou"> |
90 | <view class="winerighttouimg"> | 90 | <view class="winerighttouimg"> |
91 | <image src="{{url}}aicon_67x.png"></image> | 91 | <image src="{{url}}aicon_67x.png"></image> |
92 | </view> | 92 | </view> |
93 | - <view class="winezan">54</view> | 93 | + <view class="winezan">{{item.article.comment_count}}</view> |
94 | </view> | 94 | </view> |
95 | 95 | ||
96 | <view class="winerighttou"> | 96 | <view class="winerighttou"> |
@@ -104,7 +104,7 @@ | @@ -104,7 +104,7 @@ | ||
104 | </view> | 104 | </view> |
105 | 105 | ||
106 | </view> | 106 | </view> |
107 | -<view class="wineblock"> | 107 | +<!-- <view class="wineblock"> |
108 | <view class="middlehead"> | 108 | <view class="middlehead"> |
109 | <view class="rilihead"> | 109 | <view class="rilihead"> |
110 | <view class="pin"> | 110 | <view class="pin"> |
@@ -220,4 +220,4 @@ | @@ -220,4 +220,4 @@ | ||
220 | 220 | ||
221 | </view> | 221 | </view> |
222 | 222 | ||
223 | -</view> | ||
223 | +</view> --> |
@@ -654,6 +654,12 @@ Page({ | @@ -654,6 +654,12 @@ Page({ | ||
654 | // this.gethomeindex() | 654 | // this.gethomeindex() |
655 | }, | 655 | }, |
656 | 656 | ||
657 | + choseaddress(){ | ||
658 | + wx.navigateTo({ | ||
659 | + url: '/pages/homeblock/selectcity/selectcity', | ||
660 | + }) | ||
661 | + }, | ||
662 | + | ||
657 | 663 | ||
658 | /** | 664 | /** |
659 | * 生命周期函数--监听页面初次渲染完成 | 665 | * 生命周期函数--监听页面初次渲染完成 |
@@ -666,6 +672,13 @@ Page({ | @@ -666,6 +672,13 @@ Page({ | ||
666 | * 生命周期函数--监听页面显示 | 672 | * 生命周期函数--监听页面显示 |
667 | */ | 673 | */ |
668 | onShow: function() { | 674 | onShow: function() { |
675 | + let city = wx.getStorageSync("cityname"); | ||
676 | + console.log(city) | ||
677 | + if(city!=''){ | ||
678 | + this.setData({ | ||
679 | + currentCity: city | ||
680 | + }) | ||
681 | + } | ||
669 | // this.getshailist() | 682 | // this.getshailist() |
670 | }, | 683 | }, |
671 | 684 |
@@ -64,7 +64,7 @@ | @@ -64,7 +64,7 @@ | ||
64 | </view> | 64 | </view> |
65 | <view class="heatop"> | 65 | <view class="heatop"> |
66 | <view class="head"> | 66 | <view class="head"> |
67 | - <view class="address"> | 67 | + <view class="address" bindtap="choseaddress"> |
68 | <view class="addressimg"> | 68 | <view class="addressimg"> |
69 | <image src='{{url}}bicon_01x.png'></image> | 69 | <image src='{{url}}bicon_01x.png'></image> |
70 | </view> | 70 | </view> |
@@ -304,6 +304,12 @@ Page({ | @@ -304,6 +304,12 @@ Page({ | ||
304 | url: '/pages/homeblock/evalutecontent/evalutecontent?wineid='+this.data.id, | 304 | url: '/pages/homeblock/evalutecontent/evalutecontent?wineid='+this.data.id, |
305 | }) | 305 | }) |
306 | }, | 306 | }, |
307 | + //进入属性页面 | ||
308 | + entershu(){ | ||
309 | + wx.navigateTo({ | ||
310 | + url: '/pages/homeblock/shuxing/shuxing', | ||
311 | + }) | ||
312 | + }, | ||
307 | 313 | ||
308 | /** | 314 | /** |
309 | * 生命周期函数--监听页面初次渲染完成 | 315 | * 生命周期函数--监听页面初次渲染完成 |
@@ -10,7 +10,8 @@ Page({ | @@ -10,7 +10,8 @@ Page({ | ||
10 | page:1, | 10 | page:1, |
11 | list:[], | 11 | list:[], |
12 | video:'', | 12 | video:'', |
13 | - date:'' | 13 | + date:'', |
14 | + url:'' | ||
14 | }, | 15 | }, |
15 | 16 | ||
16 | /** | 17 | /** |
@@ -18,10 +19,11 @@ Page({ | @@ -18,10 +19,11 @@ Page({ | ||
18 | */ | 19 | */ |
19 | onLoad: function (options) { | 20 | onLoad: function (options) { |
20 | this.setData({ | 21 | this.setData({ |
21 | - id:options.wineid | 22 | + id:options.wineid, |
23 | + url: app.globalData.url, | ||
22 | }) | 24 | }) |
23 | 25 | ||
24 | - this.getshortvideo() | 26 | + |
25 | }, | 27 | }, |
26 | //获取短视频 | 28 | //获取短视频 |
27 | getshortvideo(){ | 29 | getshortvideo(){ |
@@ -50,7 +52,51 @@ Page({ | @@ -50,7 +52,51 @@ Page({ | ||
50 | 52 | ||
51 | }) | 53 | }) |
52 | }, | 54 | }, |
55 | +//进入视频 | ||
56 | + entervideo(e){ | ||
57 | + let that = this; | ||
58 | + let vurl=e.currentTarget.dataset.url; | ||
59 | + | ||
60 | + | ||
61 | + | ||
62 | + let url = 'index/Wine/wine_video_view', params = { | ||
63 | + wine_id: that.data.id | ||
64 | + | ||
65 | + } | ||
66 | + app.post(url, params).then((res) => { | ||
67 | + console.log(res); | ||
68 | + | ||
69 | + | ||
70 | + | ||
71 | + }).catch((err) => { | ||
72 | + | ||
73 | + }) | ||
74 | + | ||
75 | + wx.navigateTo({ | ||
76 | + url: '/pages/homeblock/video/video?url='+vurl, | ||
77 | + }) | ||
78 | + }, | ||
79 | + | ||
80 | + shortentervideo(e){ | ||
81 | + let that=this; | ||
82 | + let id=e.currentTarget.dataset.id | ||
83 | + let vurl = e.currentTarget.dataset.url; | ||
84 | + let url = 'index/Wine/comment_video_view', params = { | ||
85 | + wine_id: that.data.id, | ||
86 | + comment_id:id | ||
87 | + } | ||
88 | + app.post(url, params).then((res) => { | ||
89 | + console.log(res); | ||
90 | + | ||
91 | + | ||
53 | 92 | ||
93 | + }).catch((err) => { | ||
94 | + | ||
95 | + }) | ||
96 | + wx.navigateTo({ | ||
97 | + url: '/pages/homeblock/video/video?url=' + vurl, | ||
98 | + }) | ||
99 | + }, | ||
54 | 100 | ||
55 | formatDate(datetime) { | 101 | formatDate(datetime) { |
56 | // 获取年月日时分秒值 slice(-2)过滤掉大于10日期前面的0 | 102 | // 获取年月日时分秒值 slice(-2)过滤掉大于10日期前面的0 |
@@ -81,7 +127,7 @@ Page({ | @@ -81,7 +127,7 @@ Page({ | ||
81 | * 生命周期函数--监听页面显示 | 127 | * 生命周期函数--监听页面显示 |
82 | */ | 128 | */ |
83 | onShow: function () { | 129 | onShow: function () { |
84 | - | 130 | + this.getshortvideo() |
85 | }, | 131 | }, |
86 | 132 | ||
87 | /** | 133 | /** |
1 | <view class="biaozhuantitle">{{video.name}}</view> | 1 | <view class="biaozhuantitle">{{video.name}}</view> |
2 | 2 | ||
3 | +<view class="guangimg" bindtap="entervideo" data-url="{{video.url}}"> | ||
4 | + <image src="{{video.video_image}}"></image> | ||
5 | + | ||
6 | + <view class="boimg"> | ||
7 | + <image src="{{url}}/aicon_70x.png"></image> | ||
8 | + </view> | ||
9 | +</view> | ||
10 | + | ||
11 | + | ||
12 | +<!-- <video src="{{video.url}}" controls class="video" object-fit="fill"></video> --> | ||
3 | 13 | ||
4 | -<video src="{{video.url}}" controls class="video" object-fit="fill"></video> | ||
5 | <view class="bofangnum"> | 14 | <view class="bofangnum"> |
6 | <view class="bofangleft"> | 15 | <view class="bofangleft"> |
7 | {{video.times}}次播放 | 16 | {{video.times}}次播放 |
@@ -13,22 +22,21 @@ | @@ -13,22 +22,21 @@ | ||
13 | <view class="biaozhuantitle xiaovideo">小视频</view> | 22 | <view class="biaozhuantitle xiaovideo">小视频</view> |
14 | <view class="shortvideobox"> | 23 | <view class="shortvideobox"> |
15 | <view class="videoitem" wx:for='{{list}}' wx:key=''> | 24 | <view class="videoitem" wx:for='{{list}}' wx:key=''> |
16 | - <video src="{{item.video}}" class="itemvid" controls object-fit="fill"></video> | 25 | + |
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> | ||
31 | + </view> | ||
32 | + <!-- <video src="{{item.video}}" class="itemvid" controls object-fit="fill"></video> --> | ||
17 | 33 | ||
18 | <view class="videoittitle">{{item.content}}</view> | 34 | <view class="videoittitle">{{item.content}}</view> |
19 | <view class=""> | 35 | <view class=""> |
20 | - | 36 | + |
21 | </view> | 37 | </view> |
22 | </view> | 38 | </view> |
23 | - <!-- <view class="videoitem"> | ||
24 | - <video src="/video/vi.mp4" class="itemvid" controls object-fit="fill"></video> | ||
25 | - </view> | ||
26 | - <view class="videoitem"> | ||
27 | - <video src="/video/vi.mp4" class="itemvid" controls object-fit="fill"></video> | ||
28 | - </view> | ||
29 | - <view class="videoitem"> | ||
30 | - <video src="/video/vi.mp4" class="itemvid" controls object-fit="fill"></video> | ||
31 | - </view> --> | 39 | + |
32 | 40 | ||
33 | 41 | ||
34 | 42 |
@@ -59,4 +59,20 @@ page{ | @@ -59,4 +59,20 @@ page{ | ||
59 | margin:0 auto; | 59 | margin:0 auto; |
60 | 60 | ||
61 | 61 | ||
62 | +} | ||
63 | +.guangimg{ | ||
64 | + width:686rpx; | ||
65 | + height:300rpx; | ||
66 | + margin:32rpx auto 0; | ||
67 | + position: relative; | ||
68 | + | ||
69 | +} | ||
70 | +.boimg{ | ||
71 | + width:100rpx; | ||
72 | + height:100rpx; | ||
73 | + font-size: 0; | ||
74 | + position: absolute; | ||
75 | + top:50%; | ||
76 | + left:50%; | ||
77 | + transform: translate(-50%,-50%) | ||
62 | } | 78 | } |
@@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
49 | "list": [] | 49 | "list": [] |
50 | }, | 50 | }, |
51 | "miniprogram": { | 51 | "miniprogram": { |
52 | - "current": 30, | 52 | + "current": 35, |
53 | "list": [ | 53 | "list": [ |
54 | { | 54 | { |
55 | "id": -1, | 55 | "id": -1, |
@@ -265,6 +265,41 @@ | @@ -265,6 +265,41 @@ | ||
265 | "id": -1, | 265 | "id": -1, |
266 | "name": "属性", | 266 | "name": "属性", |
267 | "pathName": "pages/homeblock/shuxing/shuxing", | 267 | "pathName": "pages/homeblock/shuxing/shuxing", |
268 | + "query": "", | ||
269 | + "scene": null | ||
270 | + }, | ||
271 | + { | ||
272 | + "id": -1, | ||
273 | + "name": "选择城市", | ||
274 | + "pathName": "pages/homeblock/selectcity/selectcity", | ||
275 | + "query": "", | ||
276 | + "scene": null | ||
277 | + }, | ||
278 | + { | ||
279 | + "id": -1, | ||
280 | + "name": "专家酒品", | ||
281 | + "pathName": "pages/findblock/zhuanjiapinjiu/zhuanjiapinjiu", | ||
282 | + "query": "", | ||
283 | + "scene": null | ||
284 | + }, | ||
285 | + { | ||
286 | + "id": -1, | ||
287 | + "name": "专家酒品详情", | ||
288 | + "pathName": "pages/findblock/zhuanjiapinjiudetail/zhuanjiapinjiudetail", | ||
289 | + "query": "", | ||
290 | + "scene": null | ||
291 | + }, | ||
292 | + { | ||
293 | + "id": -1, | ||
294 | + "name": "酿酒师", | ||
295 | + "pathName": "pages/findblock/niangjiushi/niangjiushi", | ||
296 | + "query": "", | ||
297 | + "scene": null | ||
298 | + }, | ||
299 | + { | ||
300 | + "id": -1, | ||
301 | + "name": "酒单详情", | ||
302 | + "pathName": "pages/findblock/jiudandetail/jiudandetail", | ||
268 | "scene": null | 303 | "scene": null |
269 | } | 304 | } |
270 | ] | 305 | ] |
-
请 注册 或 登录 后发表评论