作者 lihongjuan

酒字典

... ... @@ -33,7 +33,12 @@
"pages/myblock/niangjiulist/niangjiulist",
"pages/myblock/shezhimima/shezhimima",
"pages/homeblock/video/video",
"pages/homeblock/shuxing/shuxing"
"pages/homeblock/shuxing/shuxing",
"pages/homeblock/selectcity/selectcity",
"pages/findblock/zhuanjiapinjiu/zhuanjiapinjiu",
"pages/findblock/zhuanjiapinjiudetail/zhuanjiapinjiudetail",
"pages/findblock/niangjiushi/niangjiushi",
"pages/findblock/jiudandetail/jiudandetail"
],
"window": {
"backgroundTextStyle": "light",
... ...
... ... @@ -14,6 +14,9 @@ Page({
interval: 2000,
duration: 1000,
currentSwiper: 0,
banner:[],
list:[],
news: []
},
/**
... ... @@ -23,6 +26,35 @@ Page({
this.setData({
url: app.globalData.url
})
},
//获取发现列表
getfindlist(){
let that = this;
let url = 'index/Find/index', params = {
}
app.post(url, params).then((res) => {
console.log(res);
that.setData({
imgUrls:res.banner,
list:res.list,
news:res.news
})
console.log(that.data.news)
console.log(that.data.list)
}).catch((err) => {
})
},
swiperChange: function (e) {
this.setData({
... ... @@ -41,7 +73,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getfindlist()
},
/**
... ...
... ... @@ -2,7 +2,7 @@
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" class="swiper_item_img" bindchange="swiperChange">
<block wx:for="{{imgUrls}}" wx:key="doct">
<swiper-item style="border-radius:10px;">
<image src="{{item}}" data-index='{{index}}' class="slide-image" bindtap='viewImg' width="355" height="150" />
<image src="{{item.image}}" data-index='{{index}}' class="slide-image" bindtap='viewImg' width="355" height="150" />
</swiper-item>
</block>
</swiper>
... ... @@ -34,26 +34,26 @@
</view>
<view class="tast">
<view class="tast" wx:for="{{news}}" wx:key=''>
<view class="tastimg">
<image src="{{url}}aicon_25@2x.png"></image>
<image src="{{item.thumb}}"></image>
</view>
<view class="tastcontent">
<view class="tasttitle">石库门·海上繁华</view>
<view class="tasttext">海派风味:开坛飘香,入口爽滑</view>
<view class="tasttitle">{{item.title}}</view>
<view class="tasttext">{{item.description}}</view>
</view>
</view>
<view class="wineblock">
<view class="wineblock" wx:for="{{list}}" wx:key="">
<view class="middlehead">
<view class="rilihead">
<view class="rili">
<image src="{{url}}aicon_46x.png"></image>
<image src="{{item.icon}}"></image>
</view>
<view class="jiudan">
酒单推荐
{{item.name}}
</view>
</view>
... ... @@ -65,7 +65,7 @@
</view>
</view>
<view class="winetitle">年轻人生日party必备酒单</view>
<view class="winetitle">{{item.article.share_content}}</view>
<view class="wineimg">
<image src="{{url}}aicon_64.png"></image>
... ... @@ -84,13 +84,13 @@
<view class="winerighttouimg">
<image src="{{url}}aicon_66x.png"></image>
</view>
<view class="winezan">18</view>
<view class="winezan">{{item.article.good_count}}</view>
</view>
<view class="winerighttou">
<view class="winerighttouimg">
<image src="{{url}}aicon_67x.png"></image>
</view>
<view class="winezan">54</view>
<view class="winezan">{{item.article.comment_count}}</view>
</view>
<view class="winerighttou">
... ... @@ -104,7 +104,7 @@
</view>
</view>
<view class="wineblock">
<!-- <view class="wineblock">
<view class="middlehead">
<view class="rilihead">
<view class="pin">
... ... @@ -220,4 +220,4 @@
</view>
</view>
\ No newline at end of file
</view> -->
\ No newline at end of file
... ...
... ... @@ -654,6 +654,12 @@ Page({
// this.gethomeindex()
},
choseaddress(){
wx.navigateTo({
url: '/pages/homeblock/selectcity/selectcity',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
... ... @@ -666,6 +672,13 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {
let city = wx.getStorageSync("cityname");
console.log(city)
if(city!=''){
this.setData({
currentCity: city
})
}
// this.getshailist()
},
... ...
... ... @@ -64,7 +64,7 @@
</view>
<view class="heatop">
<view class="head">
<view class="address">
<view class="address" bindtap="choseaddress">
<view class="addressimg">
<image src='{{url}}bicon_01x.png'></image>
</view>
... ...
... ... @@ -304,6 +304,12 @@ Page({
url: '/pages/homeblock/evalutecontent/evalutecontent?wineid='+this.data.id,
})
},
//进入属性页面
entershu(){
wx.navigateTo({
url: '/pages/homeblock/shuxing/shuxing',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
... ...
... ... @@ -71,7 +71,7 @@
<view class="more">
<view class="more" bindtap="entershu">
<image src="{{url}}aicon_15x.png"></image>
</view>
... ...
... ... @@ -10,7 +10,8 @@ Page({
page:1,
list:[],
video:'',
date:''
date:'',
url:''
},
/**
... ... @@ -18,10 +19,11 @@ Page({
*/
onLoad: function (options) {
this.setData({
id:options.wineid
id:options.wineid,
url: app.globalData.url,
})
this.getshortvideo()
},
//获取短视频
getshortvideo(){
... ... @@ -50,7 +52,51 @@ Page({
})
},
//进入视频
entervideo(e){
let that = this;
let vurl=e.currentTarget.dataset.url;
let url = 'index/Wine/wine_video_view', params = {
wine_id: that.data.id
}
app.post(url, params).then((res) => {
console.log(res);
}).catch((err) => {
})
wx.navigateTo({
url: '/pages/homeblock/video/video?url='+vurl,
})
},
shortentervideo(e){
let that=this;
let id=e.currentTarget.dataset.id
let vurl = e.currentTarget.dataset.url;
let url = 'index/Wine/comment_video_view', params = {
wine_id: that.data.id,
comment_id:id
}
app.post(url, params).then((res) => {
console.log(res);
}).catch((err) => {
})
wx.navigateTo({
url: '/pages/homeblock/video/video?url=' + vurl,
})
},
formatDate(datetime) {
// 获取年月日时分秒值 slice(-2)过滤掉大于10日期前面的0
... ... @@ -81,7 +127,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getshortvideo()
},
/**
... ...
<view class="biaozhuantitle">{{video.name}}</view>
<view class="guangimg" bindtap="entervideo" data-url="{{video.url}}">
<image src="{{video.video_image}}"></image>
<view class="boimg">
<image src="{{url}}/aicon_70x.png"></image>
</view>
</view>
<!-- <video src="{{video.url}}" controls class="video" object-fit="fill"></video> -->
<video src="{{video.url}}" controls class="video" object-fit="fill"></video>
<view class="bofangnum">
<view class="bofangleft">
{{video.times}}次播放
... ... @@ -13,22 +22,21 @@
<view class="biaozhuantitle xiaovideo">小视频</view>
<view class="shortvideobox">
<view class="videoitem" wx:for='{{list}}' wx:key=''>
<video src="{{item.video}}" class="itemvid" controls object-fit="fill"></video>
<view class="itemvid" bindtap="shortentervideo" data-url="{{item.video}}" data-id="{{item.id}}">
<image src="{{item.video_image}}"></image>
<view class="boimg">
<image src="{{url}}/aicon_70x.png"></image>
</view>
</view>
<!-- <video src="{{item.video}}" class="itemvid" controls object-fit="fill"></video> -->
<view class="videoittitle">{{item.content}}</view>
<view class="">
</view>
</view>
<!-- <view class="videoitem">
<video src="/video/vi.mp4" class="itemvid" controls object-fit="fill"></video>
</view>
<view class="videoitem">
<video src="/video/vi.mp4" class="itemvid" controls object-fit="fill"></video>
</view>
<view class="videoitem">
<video src="/video/vi.mp4" class="itemvid" controls object-fit="fill"></video>
</view> -->
... ...
... ... @@ -59,4 +59,20 @@ page{
margin:0 auto;
}
.guangimg{
width:686rpx;
height:300rpx;
margin:32rpx auto 0;
position: relative;
}
.boimg{
width:100rpx;
height:100rpx;
font-size: 0;
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%)
}
\ No newline at end of file
... ...
... ... @@ -49,7 +49,7 @@
"list": []
},
"miniprogram": {
"current": 30,
"current": 35,
"list": [
{
"id": -1,
... ... @@ -265,6 +265,41 @@
"id": -1,
"name": "属性",
"pathName": "pages/homeblock/shuxing/shuxing",
"query": "",
"scene": null
},
{
"id": -1,
"name": "选择城市",
"pathName": "pages/homeblock/selectcity/selectcity",
"query": "",
"scene": null
},
{
"id": -1,
"name": "专家酒品",
"pathName": "pages/findblock/zhuanjiapinjiu/zhuanjiapinjiu",
"query": "",
"scene": null
},
{
"id": -1,
"name": "专家酒品详情",
"pathName": "pages/findblock/zhuanjiapinjiudetail/zhuanjiapinjiudetail",
"query": "",
"scene": null
},
{
"id": -1,
"name": "酿酒师",
"pathName": "pages/findblock/niangjiushi/niangjiushi",
"query": "",
"scene": null
},
{
"id": -1,
"name": "酒单详情",
"pathName": "pages/findblock/jiudandetail/jiudandetail",
"scene": null
}
]
... ...