作者 朱振飞

Merge branch 'master' of http://114.215.101.231:8099/miniprogram/jiuzidian into Branch_zhu

# Conflicts:
#	app.json
#	pages/homeblock/shuxing/shuxing.js
#	pages/homeblock/shuxing/shuxing.json
#	pages/homeblock/shuxing/shuxing.wxml
#	pages/homeblock/shuxing/shuxing.wxss
#	pages/homeblock/video/video.js
#	pages/homeblock/video/video.wxml
#	pages/homeblock/video/video.wxss
#	pages/myblock/jifenjilu/jifenjilu.json
#	pages/myblock/jifenjilu/jifenjilu.wxml
#	pages/myblock/jifenjilu/jifenjilu.wxss
#	pages/myblock/niangjiulist/niangjiulist.js
#	pages/myblock/niangjiulist/niangjiulist.json
#	pages/myblock/niangjiulist/niangjiulist.wxml
#	pages/myblock/niangjiulist/niangjiulist.wxss
#	pages/myblock/pingjia/pingjia.js
#	pages/myblock/pingjia/pingjia.json
#	pages/myblock/pingjia/pingjia.wxml
#	pages/myblock/pingjia/pingjia.wxss
#	pages/myblock/shezhimima/shezhimima.js
#	pages/myblock/shezhimima/shezhimima.json
#	pages/myblock/shezhimima/shezhimima.wxml
#	pages/myblock/shezhimima/shezhimima.wxss
正在显示 57 个修改的文件 包含 2914 行增加72 行删除

要显示太多修改。

为保证性能只显示 57 of 57+ 个文件。

... ... @@ -34,6 +34,11 @@
"pages/myblock/shezhimima/shezhimima",
"pages/homeblock/video/video",
"pages/homeblock/shuxing/shuxing",
"pages/homeblock/selectcity/selectcity",
"pages/findblock/zhuanjiapinjiu/zhuanjiapinjiu",
"pages/findblock/zhuanjiapinjiudetail/zhuanjiapinjiudetail",
"pages/findblock/niangjiushi/niangjiushi",
"pages/findblock/jiudandetail/jiudandetail",
"pages/myblock/history/history"
],
"window": {
... ...
... ... @@ -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
... ...
// pages/findblock/jiudandetail/jiudandetail.js
const app=getApp()
Page({
/**
* 页面的初始数据
*/
data: {
url:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
url: app.globalData.url
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "发现"
}
\ No newline at end of file
... ...
<view class="jiudandetailhead">
<view class="edtaileft">
<view class="edtaileftimg">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="editmiddle">
<view class="middletop">万丈红尘一人醉</view>
<view class="middlebottom">lv12</view>
</view>
</view>
<view class="atten">关注</view>
</view>
\ No newline at end of file
... ...
.jiudandetailhead{
display:flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
box-sizing: border-box;
}
.edtaileftimg{
width:96rpx;
height:96rpx;
font-size: 0
}
image{
width:100%;
height:100%;
}
.edtaileft{
display:flex;
align-items: center;
}
.editmiddle{
margin-let:
}
\ No newline at end of file
... ...
// pages/findblock/niangjiushi/niangjiushi.js
const app=getApp()
Page({
/**
* 页面的初始数据
*/
data: {
url:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
url: app.globalData.url
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "酿酒师"
}
\ No newline at end of file
... ...
<view class="niangjiulist">
<view class="niangjiuitem">
<view class="teachimg">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="jiuname">徐强</view>
<view class="atten">关注</view>
<view class="jiubottom">
<view class="jiuleft">
<view class="jiuleftimg">
<image src="{{url}}/aicon_66x.png"></image>
</view>
<view class="jiuzan">618</view>
</view>
<view class="jiumiddle">
<view class="middleimg">
<image src="{{url}}/aicon_67x.png"></image>
</view>
<view class="tiao">54</view>
</view>
<view class="jiuright">
<image src="{{url}}/aicon_68x.png"></image>
</view>
</view>
</view>
<view class="niangjiuitem">
<view class="teachimg">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="jiuname">徐强</view>
<view class="atten">关注</view>
<view class="jiubottom">
<view class="jiuleft">
<view class="jiuleftimg">
<image src="{{url}}/aicon_66x.png"></image>
</view>
<view class="jiuzan">618</view>
</view>
<view class="jiumiddle">
<view class="middleimg">
<image src="{{url}}/aicon_67x.png"></image>
</view>
<view class="tiao">54</view>
</view>
<view class="jiuright">
<image src="{{url}}/aicon_68x.png"></image>
</view>
</view>
</view>
<view class="niangjiuitem">
<view class="teachimg">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="jiuname">徐强</view>
<view class="atten">关注</view>
<view class="jiubottom">
<view class="jiuleft">
<view class="jiuleftimg">
<image src="{{url}}/aicon_66x.png"></image>
</view>
<view class="jiuzan">618</view>
</view>
<view class="jiumiddle">
<view class="middleimg">
<image src="{{url}}/aicon_67x.png"></image>
</view>
<view class="tiao">54</view>
</view>
<view class="jiuright">
<image src="{{url}}/aicon_68x.png"></image>
</view>
</view>
</view>
<view class="niangjiuitem">
<view class="teachimg">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="jiuname">徐强</view>
<view class="atten">关注</view>
<view class="jiubottom">
<view class="jiuleft">
<view class="jiuleftimg">
<image src="{{url}}/aicon_66x.png"></image>
</view>
<view class="jiuzan">618</view>
</view>
<view class="jiumiddle">
<view class="middleimg">
<image src="{{url}}/aicon_67x.png"></image>
</view>
<view class="tiao">54</view>
</view>
<view class="jiuright">
<image src="{{url}}/aicon_68x.png"></image>
</view>
</view>
</view>
<view class="niangjiuitem">
<view class="teachimg">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="jiuname">徐强</view>
<view class="atten">关注</view>
<view class="jiubottom">
<view class="jiuleft">
<view class="jiuleftimg">
<image src="{{url}}/aicon_66x.png"></image>
</view>
<view class="jiuzan">618</view>
</view>
<view class="jiumiddle">
<view class="middleimg">
<image src="{{url}}/aicon_67x.png"></image>
</view>
<view class="tiao">54</view>
</view>
<view class="jiuright">
<image src="{{url}}/aicon_68x.png"></image>
</view>
</view>
</view>
</view>
... ...
.niangjiulist{
display:flex;
flex-wrap:wrap;
}
.teachimg{
width:120rpx;
height:120rpx;
font-size: 0;
border-radius:50%;
margin:40rpx auto 0;
}
.teachimg image{
width:100%;
height:100%;
border-radius:50%;
}
.niangjiuitem{
width:366rpx;
height:386rpx;
border-bottom: 1rpx solid #f5f5f5;
}
.niangjiuitem:nth-child(n){
border-right:1rpx solid #f5f5f5
}
.jiuname{
color:#1A1A1A;
font-size: 28rpx;
text-align: center;
margin-top:14rpx;
}
.atten{
width:100rpx;
margin:20rpx auto 0;
}
.jiubottom{
display:flex;
align-items: center;
justify-content: space-around;
margin-top:23rpx;
}
.jiuleft{
display:flex;
align-items: center
}
.jiumiddle{
display:flex;
align-items: center
}
.jiuleftimg{
width:30rpx;
height:28rpx;
font-size: 0
}
image{
width:100%;
height:100%;
}
.jiuzan{
color:#666666;
font-size: 28rpx;
margin-left:16rpx;
}
.middleimg{
width:29rpx;
height:27rpx;
font-size: 0
}
.tiao{
color:#666666;
font-size: 28rpx;
margin-left:16rpx;
}
.jiuright{
width:26rpx;
height:26rpx;
font-size: 0
}
\ No newline at end of file
... ...
// pages/findblock/zhuanjiapinjiu/zhuanjiapinjiu.js
const app=getApp()
Page({
/**
* 页面的初始数据
*/
data: {
url:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
url: app.globalData.url
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "发现"
}
\ No newline at end of file
... ...
<view class="wineblock">
<view class="winetitle">浓香酒酿酒大师:沈才宏</view>
<view class="wineimg">
<image src="{{url}}aicon_64.png"></image>
</view>
<view class="winebottom">
<view class="winebottomleft">
<view class="winebottomleftimg">
<image src="{{url}}aicon_65x.png"></image>
</view>
<view class="wineeng">WinesBook</view>
</view>
<view class="winebottonright">
<view class="winerighttou">
<view class="winerighttouimg">
<image src="{{url}}aicon_66x.png"></image>
</view>
<view class="winezan">18</view>
</view>
<view class="winerighttou">
<view class="winerighttouimg">
<image src="{{url}}aicon_67x.png"></image>
</view>
<view class="winezan">54</view>
</view>
<view class="winerighttou">
<view class="winerighttouimg">
<image src="{{url}}aicon_68x.png"></image>
</view>
</view>
</view>
</view>
</view>
<view class="wineblock">
<view class="winetitle">浓香酒酿酒大师:沈才宏</view>
<view class="wineimg">
<image src="{{url}}aicon_64.png"></image>
</view>
<view class="winebottom">
<view class="winebottomleft">
<view class="winebottomleftimg">
<image src="{{url}}aicon_65x.png"></image>
</view>
<view class="wineeng">WinesBook</view>
</view>
<view class="winebottonright">
<view class="winerighttou">
<view class="winerighttouimg">
<image src="{{url}}aicon_66x.png"></image>
</view>
<view class="winezan">18</view>
</view>
<view class="winerighttou">
<view class="winerighttouimg">
<image src="{{url}}aicon_67x.png"></image>
</view>
<view class="winezan">54</view>
</view>
<view class="winerighttou">
<view class="winerighttouimg">
<image src="{{url}}aicon_68x.png"></image>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
.winetitle{
color:#1A1A1A;
font-size: 28rpx;
margin-left:36rpx;
font-weight: bold
}
.wineimg{
width:686rpx;
height:300rpx;
margin:30rpx auto 0;
}
.winebottom{
display:flex;
justify-content: space-between;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
margin-top:30rpx;
}
.winebottomleftimg{
width:60rpx;
height:60rpx;
font-size: 0
}
.winebottomleft{
display:flex;
align-items: center
}
.winebottonright{
width:345rpx;
display:flex;
align-items: center;
justify-content: space-around
}
.winerighttouimg{
width:30rpx;
height:28rpx;
font-size: 0
}
.winerighttou{
display:flex;
align-items: center
}
.wineeng{
color:#666666;
font-size: 28rpx;
margin-left: 20rpx;
}
.winezan{
color:#666666;
font-size:28rpx;
margin-left:5rpx;
}
.wineblock{
border-bottom: 1rpx solid #f5f5f5;
padding-bottom: 30rpx;
margin-top:33rpx;
}
.pin{
width:16rpx;
height:32rpx;
font-size: 0
}
... ...
// pages/findblock/zhuanjiapinjiudetail/zhuanjiapinjiudetail.js
const app=getApp()
Page({
/**
* 页面的初始数据
*/
data: {
url:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
url: app.globalData.url
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<view class="detailhead">
<view class="liuliang">播放将消耗7.72MB流量,是否需要在WIFI环境下播放</view>
<view class="goon">继续播放</view>
</view>
<view class="winebottom">
<view class="winebottomleft">
<view class="winebottomleftimg">
<image src="{{url}}aicon_65x.png"></image>
</view>
<view class="wineeng">WinesBook</view>
</view>
<view class="winebottonright">
<view class="winerighttou zantou">
<view class="winerighttouimg">
<image src="{{url}}aicon_66x.png"></image>
</view>
<view class="winezan">12</view>
</view>
<view class="winerighttou">
<view class="winerighttouimg">
<image src="{{url}}aicon_68x.png"></image>
</view>
</view>
</view>
</view>
<view class="commentlist">
<view class="commentitem">
<view class="commentleft">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="commentright">
<view class="rightname">小叶子</view>
<view class="rightdate">2019年11月5日</view>
<view class="righttext">我怎么这么好看</view>
</view>
</view>
<view class="commentitem">
<view class="commentleft">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="commentright">
<view class="rightname">小叶子</view>
<view class="rightdate">2019年11月5日</view>
<view class="righttext">我怎么这么好看</view>
</view>
</view>
<view class="commentitem">
<view class="commentleft">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="commentright">
<view class="rightname">小叶子</view>
<view class="rightdate">2019年11月5日</view>
<view class="righttext">我怎么这么好看</view>
</view>
</view>
<view class="commentitem">
<view class="commentleft">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="commentright">
<view class="rightname">小叶子</view>
<view class="rightdate">2019年11月5日</view>
<view class="righttext">我怎么这么好看</view>
</view>
</view>
<view class="commentitem">
<view class="commentleft">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="commentright">
<view class="rightname">小叶子</view>
<view class="rightdate">2019年11月5日</view>
<view class="righttext">我怎么这么好看</view>
</view>
</view>
<view class="commentitem">
<view class="commentleft">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="commentright">
<view class="rightname">小叶子</view>
<view class="rightdate">2019年11月5日</view>
<view class="righttext">我怎么这么好看</view>
</view>
</view>
<view class="commentitem">
<view class="commentleft">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="commentright">
<view class="rightname">小叶子</view>
<view class="rightdate">2019年11月5日</view>
<view class="righttext">我怎么这么好看</view>
</view>
</view>
<view class="commentitem">
<view class="commentleft">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="commentright">
<view class="rightname">小叶子</view>
<view class="rightdate">2019年11月5日</view>
<view class="righttext">我怎么这么好看</view>
</view>
</view>
</view>
<view class="pingjiabottom">
<view class="pbleft">
<input placeholder='输入评论的内容' placeholder-class='enterping' />
</view>
<view class="pbright">发送</view>
</view>
\ No newline at end of file
... ...
.detailhead {
width: 750rpx;
height: 483rpx;
background: #000;
overflow: hidden;
}
.liuliang {
color: #fff;
font-size: 24rpx;
text-align: center;
margin-top: 164rpx;
}
.goon {
width: 206rpx;
height: 64rpx;
background: rgba(52, 52, 52, 1);
border-radius: 4rpx;
color: #fff;
font-size: 26rpx;
text-align: center;
line-height: 64rpx;
margin: 26rpx auto 0;
}
.winebottom {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx 32rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #f5f5f5;
}
.winebottomleftimg {
width: 60rpx;
height: 60rpx;
font-size: 0;
}
.winebottomleft {
display: flex;
align-items: center;
}
.winebottonright {
width: 345rpx;
display: flex;
align-items: center;
justify-content: flex-end;
}
.winerighttouimg {
width: 30rpx;
height: 28rpx;
font-size: 0;
}
.winerighttou {
display: flex;
align-items: center;
}
.zantou {
margin-right: 50rpx;
}
.wineeng {
color: #666;
font-size: 28rpx;
margin-left: 20rpx;
}
.winezan {
color: #666;
font-size: 28rpx;
margin-left: 5rpx;
}
.wineblock {
border-bottom: 14rpx solid #f2f2f2;
padding-bottom: 30rpx;
}
.pin {
width: 16rpx;
height: 32rpx;
font-size: 0;
}
.commentlist {
padding: 0 30rpx;
box-sizing: border-box;
padding-bottom: 100rpx;
}
.commentitem {
display: flex;
padding: 40rpx 0;
box-sizing: border-box;
border-bottom: 1rpx solid #f5f5f5;
}
.commentleft {
width: 60rpx;
height: 60rpx;
font-size: 0;
border-radius: 50%;
}
image {
width: 100%;
height: 100%;
border-radius: 50%;
}
.commentright {
margin-left: 20rpx;
}
.rightname {
color: #666;
font-size: 28rpx;
}
.rightdate {
color: #999;
font-size: 24rpx;
margin-top: 14rpx;
}
.righttext {
color: #1a1a1a;
font-size: 28rpx;
margin-top: 23rpx;
}
.pingjiabottom {
width: 750rpx;
height: 86rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 16rpx 30rpx;
box-sizing: border-box;
position: fixed;
bottom: 0rpx;
background: #fff;
border-top: 1rpx solid #f5f5f5;
}
.pbleft {
width: 531rpx;
height: 60rpx;
background: rgba(242, 242, 242, 1);
border-radius: 5rpx;
color: #999;
font-size: 26rpx;
padding: 0 26rpx;
line-height: 60rpx;
box-sizing: border-box;
}
.pbleft input {
width: 531rpx;
height: 60rpx;
padding: 0 26rpx;
line-height: 60rpx;
box-sizing: border-box;
}
.enterping {
color: #999;
font-size: 2F6rpx;
}
.pbright {
width: 120rpx;
height: 60rpx;
background: rgba(232, 24, 37, 1);
border-radius: 30rpx;
color: #fff;
font-size: 26rpx;
text-align: center;
line-height: 60rpx;
}
... ...
... ... @@ -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>
... ...
// import qqmap from '../../utils/map.js';
const app = getApp()
Page({
data: {
//下面是字母排序
letter: ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"],
cityListId: '',
//下面是城市列表信息,这里只是模拟数据
citylist: [{ "letter": "A", "data": [{ "id": "v7", "cityName": "安徽" }] }, { "letter": "B", "data": [{ "id": "v10", "cityName": "巴中" }, { "id": "v4", "cityName": "包头" }, { "id": "v1", "cityName": "北京" }] }, { "letter": "C", "data": [{ "id": "v15", "cityName": "成都" }] }, { "letter": "D", "data": [{ "id": "v21", "cityName": "稻城" }] }, { "letter": "G", "data": [{ "id": "v17", "cityName": "广州" }, { "id": "v29", "cityName": "桂林" }] }, { "letter": "H", "data": [{ "id": "v9", "cityName": "海南" }, { "id": "v3", "cityName": "呼和浩特" }] }, { "letter": "L", "data": [{ "id": "v24", "cityName": "洛阳" }, { "id": "v20", "cityName": "拉萨" }, { "id": "v14", "cityName": "丽江" }] }, { "letter": "M", "data": [{ "id": "v13", "cityName": "眉山" }] }, { "letter": "N", "data": [{ "id": "v27", "cityName": "南京" }] }, { "letter": "S", "data": [{ "id": "v18", "cityName": "三亚" }, { "id": "v2", "cityName": "上海" }] }, { "letter": "T", "data": [{ "id": "v5", "cityName": "天津" }] }, { "letter": "W", "data": [{ "id": "v12", "cityName": "乌鲁木齐" }, { "id": "v25", "cityName": "武汉" }] }, { "letter": "X", "data": [{ "id": "v23", "cityName": "西安" }, { "id": "v28", "cityName": "香港" }, { "id": "v19", "cityName": "厦门" }] }, { "letter": "Z", "data": [{ "id": "v8", "cityName": "张家口" }] }],
//下面是热门城市数据,模拟数据
newcity: ['北京', '上海', '广州', '深圳', '成都', '杭州'],
// citySel: '全国',
locateCity: '',
currentCity:'',
history_list:[],
hot_list:[]
},
//获取用户当前位置
getcity() {
let that = this;
wx.getLocation({
type: 'gcj02',
success: function (res) {
// 经纬度
var latitude = res.latitude
var longitude = res.longitude
var aK = that.data.aK
wx.request({
url: 'https://api.map.baidu.com/geocoder/v2/?ak=y8jPDTMIuAnaVscUztce1RKfNx8v5sok&location=' + latitude + ',' + longitude + '&output=json',
data: {},
header: {
'content-type': 'application/json'
},
success: function (res) {
console.log('1234567890', res)
var province = res.data.result.addressComponent.province;
let district = res.data.result.addressComponent.district
that.setData({
currentCity: province
})
wx.setStorageSync('city', province)
wx.request({
// url: 'xxx' + city,
// data: {},
// header: {
// 'content-type': 'application/json'
// },
// success: function (res) {
// that.setData({
// county: res.data,
// })
// },
})
}
})
},
fail: function () {
wx.showToast({
title: '授权失败,请打开GPS重新进入页面授权',
icon: 'none',
duration: 2000
})
}
})
},
//点击城市
cityTap(e) {
console.log(e)
const val = e.currentTarget.dataset.val || '',
types = e.currentTarget.dataset.types || '',
Index = e.currentTarget.dataset.index || '',
that = this;
let city = this.data.citySel;
let newcity = e.currentTarget.dataset.val.cityName;
console.log(newcity)
if (newcity != undefined) {
wx.setStorageSync("cityname", newcity);
}
let url = 'index/Index/set_city', params = {
city: newcity,
}
app.post(url, params).then((res) => {
console.log(res);
}).catch((err) => {
})
wx.navigateBack({
checked:true
})
},
//点击热门城市
cityTaphot(e){
console.log(e)
let newcity = e.currentTarget.dataset.val;
console.log(newcity)
if (newcity != undefined) {
wx.setStorageSync("cityname", newcity);
}
let url = 'index/Index/set_city', params = {
city: newcity,
}
app.post(url, params).then((res) => {
console.log(res);
}).catch((err) => {
})
wx.navigateBack({
checked: true
})
},
//点击历史记录
cityTaphistory(e){
let newcity = e.currentTarget.dataset.val;
console.log(newcity)
if (newcity != undefined) {
wx.setStorageSync("cityname", newcity);
}
wx.navigateBack({
checked: true
})
},
//点击城市字母
letterTap(e) {
const Item = e.currentTarget.dataset.item;
this.setData({
cityListId: Item
});
console.log("..............." + this.data.cityListId);
},
//调用定位
//获取热门城市
gethotcity() {
let that = this;
var url = 'index/Index/get_city';
var params = {
}
app.post(url, params).then((res) => {
console.log(res);
that.setData({
hot_list: res.hot_city,
history_list: res.history_list
})
console.log(that.data.newcity)
}).catch((err) => {
})
},
onShow() {
console.log(getApp());
let that = this,
cityOrTime = wx.getStorageSync('locatecity') || {},
time = new Date().getTime(),
city = '';
if (!cityOrTime.time || (time - cityOrTime.time > 1800000)) {//每隔30分钟请求一次定位
} else {//如果未满30分钟,那么直接从本地缓存里取值
that.setData({
locateCity: cityOrTime.city
})
}
that.getcity()
that.gethotcity()
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<view class='city_box'>
<view class='city_left'>
<scroll-view scroll-y style='width:100%;height:100%;' scroll-with-animation scroll-into-view='{{cityListId}}'>
<view class='city_locate' data-types='locate' catchtap='cityTap'>
<!-- <text class='city_locate_title'>自动定位</text>
<text class='city_locate_text' style='{{!locateCity&&"color:#33b9ff;"}}'>{{locateCity||'点击定位'}}</text> -->
<view class="slecity">
<image src='{{url}}bicon_01x.png'></image>
</view>
<view>{{currentCity}}</view>
</view>
<!-- <view class='national' data-types='national' catchtap='cityTap'>全国</view> -->
<view class='new_city'>
<view class='new_city_title'>历史访问城市</view>
<view class='new_city_box'>
<view class="nodata" wx:if="{{history_list.length==0}}">暂无数据</view>
<block wx:else>
<text class='new_city_text' wx:for='{{history_list}}' wx:key='this' data-types='new' catchtap='cityTaphistory' data-val='{{item}}'>{{item}}</text>
</block>
</view>
</view>
<view class='new_city'>
<view class='new_city_title'>热门城市</view>
<view class='new_city_box'>
<text class='new_city_text' wx:for='{{hot_list}}' wx:key='this' data-types='new' catchtap='cityTaphot' data-val='{{item}}'>{{item}}</text>
</view>
</view>
<view class='city_list_box'>
<block wx:for='{{citylist}}' wx:key='this' wx:for-item='letterItem' wx:for-index='letterIndex'>
<view class='city_first_letter' id='{{letterItem.letter}}'>{{letterItem.letter}}</view>
<text class='city_name' wx:for='{{letterItem.data}}' wx:key='this' data-types='list' catchtap='cityTap' data-index='{{index}}' data-val='{{item}}'>{{item.cityName}}</text>
</block>
</view>
</scroll-view>
</view>
<view class='city_right'>
<text class='letter_item' wx:for='{{letter}}' wx:key='this' catchtap='letterTap' data-item='{{item}}'>{{item}}</text>
</view>
</view>
\ No newline at end of file
... ...
page{
height:100%
}
.city_box{
height:100%;
background: #fff;
display: flex;
}
.city_left{
flex: 1;
}
.city_right{
width: 60rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.letter_item{
flex: 1;
display: block;
font-size: 24rpx;
color: #33B9FF;
text-align: center;
}
.city_locate,.national{
height: 80rpx;
line-height: 80rpx;
border-bottom: 1px solid #efefef;
font-size: 28rpx;
color: #333;
padding-left: 25rpx;
}
.city_locate_title{
color: #999;
margin-right: 20rpx;
}
.new_city{
background: #efefef;
font-size: 28rpx;
}
.new_city_title{
line-height: 60rpx;
color: #999;
padding-left: 25rpx;
/* margin-bottom: 20rpx; */
}
.new_city_box{
display: flex;
flex-wrap: wrap;
background: #fff;
}
.new_city_text{
width: 200rpx;
text-align: center;
line-height: 70rpx;
background: #fff;
border-radius: 35rpx;
margin:0 0 22rpx 22rpx;
}
.city_first_letter{
line-height: 60rpx;
height: 60rpx;
padding-left: 25rpx;
font-size: 28rpx;
background: #eee;
color: #999;
}
.city_name{
display: block;
line-height: 80rpx;
height: 80rpx;
border-bottom: 1px solid #efefef;
font-size: 28rpx;
color: #333;
padding-left: 25rpx;
}
.city_locate{
display:flex;
align-items: center
}
.slecity{
width:20rpx;
height:24rpx;
font-size:0
}
.slecity image{
width:100%;
height:100%;
}
.nodata{
color:#999;
font-size: 30rpx;
text-align: center;
width:750rpx;
padding: 20rpx 0;
}
\ No newline at end of file
... ...
... ... @@ -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> -->
... ...
... ... @@ -60,3 +60,19 @@ page{
}
.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
... ...
// pages/homeblock/shuxing/shuxing.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
url: '',
user_list: [],
list: [],
type: 1,
arr: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function(options) {
this.setData({
url: app.globalData.url,
})
this.getcanshu()
},
qingchu() {
this.setData({
type: 2
})
},
//获取酒品参数
getcanshu() {
let that = this;
let url = 'index/Wine/wine_attr',
params = {
}
app.post(url, params).then((res) => {
console.log(res);
that.setData({
user_list: res.user_list,
list: res.list
})
let allarr = [];
let usearr = []
let newlist = that.data.list;
for (var obj of newlist) {
obj.sel = false,
allarr.push(obj.id)
}
that.setData({
list: newlist
})
let newuserlist = that.data.user_list;
for (var obj of newuserlist) {
obj.sel = false;
usearr.push(obj.id)
}
that.setData({
user_list: newuserlist
})
console.log(allarr)
console.log(usearr)
//判断所有属性里有没有默认属性
let newuserlist1 = that.data.user_list;
let newlist1 = that.data.list;
let arr = []
for (var i = 0; i < allarr.length; i++) {
if (usearr.indexOf(allarr[i]) == -1) {
arr.push(allarr[i])
}
}
for (var i = 0; i < newlist1.length; i++) {
for (var j = 0; j < arr.length; j++) {
if (newlist1[i].id == arr[j]) {
newlist1[i].sel=true
}
}
}
that.setData({
list:newlist1
})
}).catch((err) => {
})
},
//删除
shanchu(e) {
let id = e.currentTarget.dataset.id;
this.setData({
type: 3
})
let newuser_list = this.data.user_list;
for (var i = 0; i < newuser_list.length; i++) {
if (id == newuser_list[i].id) {
newuser_list.splice(i, 1)
}
}
this.setData({
user_list: newuser_list
})
let newlist = this.data.list;
for (var obj of newlist) {
if (id == obj.id) {
obj.sel = true
}
}
this.setData({
list: newlist
})
},
//长按事件
handleLongPress(e) {
this.setData({
type:3
})
let id = e.currentTarget.dataset.id;
let newlist = this.data.list;
let newuser_list = this.data.user_list
for (var obj of newlist) {
if (obj.id == id) {
if (obj.sel == true) {
obj.sel = false;
newuser_list.push(obj)
}
}
}
this.setData({
list: newlist,
user_list: newuser_list
})
},
//完成事件
finish() {
let that = this;
let arr = [];
let newuser_list = that.data.user_list;
for (var obj of newuser_list) {
arr.push(obj.id)
}
console.log(arr)
if (arr.indexOf(-1) == -1) {
wx.showToast({
title: '基本参数无法取消',
icon: 'none'
})
} else if (arr.indexOf(-2) == -1) {
wx.showToast({
title: '生产企业无法取消',
icon: 'none'
})
} else if (arr.indexOf(-3) == -1) {
wx.showToast({
title: '酿酒师无法取消',
icon: 'none'
})
} else if (arr.indexOf(-4) == -1) {
wx.showToast({
title: '专业品评无法取消',
icon: 'none'
})
} else if (arr.indexOf(-5) == -1) {
wx.showToast({
title: '独具匠心无法取消',
icon: 'none'
})
} else {
let url = 'index/Wine/change_attr_order',
params = {
attr_array: arr,
}
app.post(url, params).then((res) => {
console.log(res);
wx.showToast({
title: '修改成功',
icon:'none'
})
setTimeout(function() {
wx.navigateBack({
checked: true
})
}, 1500)
}).catch((err) => {
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
"navigationBarTitleText": "属性"
}
\ No newline at end of file
... ...
<!--pages/homeblock/shuxing/shuxing.wxml-->
<text>pages/homeblock/shuxing/shuxing.wxml</text>
<view class="clear" wx:if="{{type==1}}" bindtap="qingchu">清除</view>
<view class="clear" wx:if="{{type==2}}">编辑</view>
<view class="clear" wx:if="{{type==3}}" bindtap="finish">完成</view>
<view class="morenshu">
<view class="moren">默认属性</view>
<view class="longan">长按可拖动排序</view>
</view>
<view class="shubox">
<view class="shuitem" wx:for="{{user_list}}" wx:key="">
{{item.name}}
<view class="cancelmg" wx:if="{{type!=1}}" bindtap="shanchu" data-id="{{item.id}}">
<image src="{{url}}/bicon_09x.png"></image>
</view>
</view>
</view>
<view class="morenshu allshu">
<view class="moren">所有属性</view>
<view class="longan">长按可拖动排序</view>
</view>
<view class="shubox">
<view class="allshuitem {{item.sel==true?'selitem':''}}" wx:for="{{list}}" wx:key=""
bindlongpress="handleLongPress" data-id="{{item.id}}">{{item.name}}</view>
</view>
\ No newline at end of file
... ...
/* pages/homeblock/shuxing/shuxing.wxss */
\ No newline at end of file
page{
background: #F2F2F2;
padding: 0 33rpx;
box-sizing: border-box
}
.clear{
color:#E81825;
font-size: 28rpx;
display:flex;
justify-content: flex-end;
margin-top:20rpx;
}
.moren{
color:#1A1A1A;
font-size: 32rpx;
font-weight: bold
}
.morenshu{
display:flex;
align-items: center;
justify-content: space-between
}
.longan{
color:#999999;
font-size: 26rpx;
}
.shubox{
display:flex;
flex-wrap: wrap;
align-items: center;
margin-top:29rpx;
}
.shuitem{
margin-right:20rpx;
padding:10rpx 20rpx;
box-sizing: border-box;
background: #FAFAFA;
color:#666666;
font-size: 26rpx;
margin-top:16rpx;
position: relative
}
.allshuitem{
margin-right:20rpx;
padding:10rpx 20rpx;
box-sizing: border-box;
background: #EBEBEB;
color:#CCCCCC;
font-size: 26rpx;
margin-top:16rpx;
position: relative
}
.cancelmg{
width:22rpx;
height:22rpx;
font-size: 0;
border-radius:50%;
position: absolute;
right:-10rpx;
top:-10rpx;
}
.cancelmg image{
width:100%;
height:100%;
border-radius:50%;
}
.allshu{
margin-top:60rpx;
}
.selitem{
background: #fff;
color:#666666
}
\ No newline at end of file
... ...
... ... @@ -5,16 +5,23 @@ Page({
* 页面的初始数据
*/
data: {
videourl:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
videourl:options.url
})
},
end(){
console.log(43347889)
wx.navigateBack({
checked:true
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
... ...
<!--pages/homeblock/video/video.wxml-->
<text>pages/homeblock/video/video.wxml</text>
<view class="video">
<video src="{{videourl}}" autoplay="true" bindended="end"></video>
</view>
... ...
/* pages/homeblock/video/video.wxss */
\ No newline at end of file
page{
width:100%;
height:100%;
}
.video{
width:750rpx;
height:100%;
}
.video video{
width:100%;
height:100%;
}
\ No newline at end of file
... ...
{
"usingComponents": {}
"navigationBarTitleText": "积分记录"
}
\ No newline at end of file
... ...
<!--pages/myblock/jifenjilu/jifenjilu.wxml-->
<text>pages/myblock/jifenjilu/jifenjilu.wxml</text>
<view class="jilubox">
<view class="jiluitem">
<view class="jiluleft">
<view class="jilutext">评论</view>
<view class="jiludate">2019-02-28 11:23</view>
</view>
<view class="jiluright">
<view class="righttop">+100.00</view>
<view class="righttext">已成功</view>
</view>
</view>
<view class="jiluitem">
<view class="jiluleft">
<view class="jilutext">评论</view>
<view class="jiludate">2019-02-28 11:23</view>
</view>
<view class="jiluright">
<view class="righttop">+100.00</view>
<view class="righttext">已成功</view>
</view>
</view>
<view class="jiluitem">
<view class="jiluleft">
<view class="jilutext">评论</view>
<view class="jiludate">2019-02-28 11:23</view>
</view>
<view class="jiluright">
<view class="righttop">+100.00</view>
<view class="righttext">已成功</view>
</view>
</view>
<view class="jiluitem">
<view class="jiluleft">
<view class="jilutext">评论</view>
<view class="jiludate">2019-02-28 11:23</view>
</view>
<view class="jiluright">
<view class="righttop">+100.00</view>
<view class="righttext">已成功</view>
</view>
</view>
<view class="jiluitem">
<view class="jiluleft">
<view class="jilutext">评论</view>
<view class="jiludate">2019-02-28 11:23</view>
</view>
<view class="jiluright">
<view class="righttop">+100.00</view>
<view class="righttext">已成功</view>
</view>
</view>
<view class="jiluitem">
<view class="jiluleft">
<view class="jilutext">评论</view>
<view class="jiludate">2019-02-28 11:23</view>
</view>
<view class="jiluright">
<view class="righttop">+100.00</view>
<view class="righttext">已成功</view>
</view>
</view>
<view class="jiluitem">
<view class="jiluleft">
<view class="jilutext">评论</view>
<view class="jiludate">2019-02-28 11:23</view>
</view>
<view class="jiluright">
<view class="righttop">+100.00</view>
<view class="righttext">已成功</view>
</view>
</view>
</view>
... ...
/* pages/myblock/jifenjilu/jifenjilu.wxss */
\ No newline at end of file
.jilubox{
padding:0 35rpx;
box-sizing: border-box;
}
.jiluitem{
display:flex;
align-items: center;
justify-content: space-between;
}
.jilutext{
color:#1A1A1A;
font-size:32rpx;
}
.jiludate{
color:#999999;
font-size:24rpx;
margin-top:22rpx;
}
.righttop{
color:#FF5344;
font-size: 32rpx;
}
.righttext{
color:#666666;
font-size: 26rpx;
margin-top:22rpx;
text-align: center
}
.jiluitem{
padding: 42rpx 0;
box-sizing: border-box;
border-bottom:1rpx solid #f5f5f5;
}
\ No newline at end of file
... ...
// pages/myblock/niangjiulist/niangjiulist.js
const app=getApp()
Page({
/**
* 页面的初始数据
*/
data: {
url:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
url: app.globalData.url,
})
},
/**
... ...
{
"usingComponents": {}
"navigationBarTitleText": "酿酒师"
}
\ No newline at end of file
... ...
<!--pages/myblock/niangjiulist/niangjiulist.wxml-->
<text>pages/myblock/niangjiulist/niangjiulist.wxml</text>
<view class="niangjiulist">
<view class="niangjiuitem">
<view class="niangjiuleft">
<view class="njiuimg">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="leftname">徐强</view>
<view class="duigou" style="margin-left:20rpx;">
<image src="{{url}}aicon_20x.png"></image>
</view>
</view>
<view class="atten">关注</view>
</view>
<view class="niangjiuitem">
<view class="niangjiuleft">
<view class="njiuimg">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="leftname">徐强</view>
<view class="duigou" style="margin-left:20rpx;">
<image src="{{url}}aicon_20x.png"></image>
</view>
</view>
<view class="atten">关注</view>
</view>
<view class="niangjiuitem">
<view class="niangjiuleft">
<view class="njiuimg">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="leftname">徐强</view>
<view class="duigou" style="margin-left:20rpx;">
<image src="{{url}}aicon_20x.png"></image>
</view>
</view>
<view class="atten">关注</view>
</view>
<view class="niangjiuitem">
<view class="niangjiuleft">
<view class="njiuimg">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="leftname">徐强</view>
<view class="duigou" style="margin-left:20rpx;">
<image src="{{url}}aicon_20x.png"></image>
</view>
</view>
<view class="atten">关注</view>
</view>
<view class="niangjiuitem">
<view class="niangjiuleft">
<view class="njiuimg">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="leftname">徐强</view>
<view class="duigou" style="margin-left:20rpx;">
<image src="{{url}}aicon_20x.png"></image>
</view>
</view>
<view class="alatten">关注</view>
</view>
</view>
\ No newline at end of file
... ...
/* pages/myblock/niangjiulist/niangjiulist.wxss */
\ No newline at end of file
.niangjiuitem{
display:flex;
align-items: center;
justify-content: space-between;
padding: 32rpx 0;
box-sizing: border-box;
border-bottom:1rpx solid #f5f5f5;
}
.duigou{
width:24rpx;
height:24rpx;
font-size: 0;
margin-left:8rpx;
}
.niangjiulist{
padding: 0 32rpx;
}
.njiuimg{
width:60rpx;
height:60rpx;
font-size: 0;
border-radius: 50%
}
.njiuimg image{
border-radius:50%;
}
.niangjiuleft{
display:flex;
align-items: center;
}
.leftname{
color:#1A1A1A;
font-size: 28rpx;
margin-left:30rpx;
}
.alatten{
padding:0 20rpx;
height:50rpx;
background:#B3B3B3;
border-radius:2rpx;
font-size:26rpx;
color:#fff;
text-align:center;
line-height:50rpx;
}
\ No newline at end of file
... ...
// pages/myblock/pingjia/pingjia.js
const app=getApp();
Page({
/**
* 页面的初始数据
*/
data: {
url:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
url: app.globalData.url
})
},
/**
... ...
{
"usingComponents": {}
"navigationBarTitleText": "评价"
}
\ No newline at end of file
... ...
<!--pages/myblock/pingjia/pingjia.wxml-->
<text>pages/myblock/pingjia/pingjia.wxml</text>
<view class="commentlist">
<view class="commentitem">
<view class="commentleft">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="commentright">
<view class="rightname">小叶子</view>
<view class="rightdate">2019年11月5日</view>
<view class="righttext">我怎么这么好看</view>
</view>
</view>
<view class="commentitem">
<view class="commentleft">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="commentright">
<view class="rightname">小叶子</view>
<view class="rightdate">2019年11月5日</view>
<view class="righttext">我怎么这么好看</view>
</view>
</view>
<view class="commentitem">
<view class="commentleft">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="commentright">
<view class="rightname">小叶子</view>
<view class="rightdate">2019年11月5日</view>
<view class="righttext">我怎么这么好看</view>
</view>
</view>
<view class="commentitem">
<view class="commentleft">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="commentright">
<view class="rightname">小叶子</view>
<view class="rightdate">2019年11月5日</view>
<view class="righttext">我怎么这么好看</view>
</view>
</view>
<view class="commentitem">
<view class="commentleft">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="commentright">
<view class="rightname">小叶子</view>
<view class="rightdate">2019年11月5日</view>
<view class="righttext">我怎么这么好看</view>
</view>
</view>
<view class="commentitem">
<view class="commentleft">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="commentright">
<view class="rightname">小叶子</view>
<view class="rightdate">2019年11月5日</view>
<view class="righttext">我怎么这么好看</view>
</view>
</view>
<view class="commentitem">
<view class="commentleft">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="commentright">
<view class="rightname">小叶子</view>
<view class="rightdate">2019年11月5日</view>
<view class="righttext">我怎么这么好看</view>
</view>
</view>
<view class="commentitem">
<view class="commentleft">
<image src="{{url}}/aicon_77@2x.png"></image>
</view>
<view class="commentright">
<view class="rightname">小叶子</view>
<view class="rightdate">2019年11月5日</view>
<view class="righttext">我怎么这么好看</view>
</view>
</view>
</view>
<view class="pingjiabottom">
<view class="pbleft">
<input placeholder='输入评论的内容' placeholder-class='enterping' />
</view>
<view class="pbright">发送</view>
</view>
\ No newline at end of file
... ...
/* pages/myblock/pingjia/pingjia.wxss */
\ No newline at end of file
.commentlist{
padding: 0 30rpx;
box-sizing: border-box;
padding-bottom: 100rpx;
}
.commentitem{
display:flex;
padding: 40rpx 0;
box-sizing: border-box;
border-bottom:1rpx solid #f5f5f5;
}
.commentleft{
width:60rpx;
height:60rpx;
font-size: 0;
border-radius:50%;
}
image{
width:100%;
height:100%;
border-radius: 50%;
}
.commentright{
margin-left:20rpx;
}
.rightname{
color:#666666;
font-size: 28rpx;
}
.rightdate{
color:#999999;
font-size: 24rpx;
margin-top:14rpx;
}
.righttext{
color:#1A1A1A;
font-size: 28rpx;
margin-top:23rpx;
}
.pingjiabottom{
width:750rpx;
height:86rpx;
display:flex;
align-items: center;
justify-content: space-between;
padding: 16rpx 30rpx;
box-sizing: border-box;
position: fixed;
bottom:0rpx;
background: #fff;
border-top:1rpx solid #f5f5f5;
}
.pbleft{
width:531rpx;
height:60rpx;
background:rgba(242,242,242,1);
border-radius:5rpx;
color:#999999;
font-size: 26rpx;
padding: 0 26rpx;
line-height: 60rpx;
box-sizing: border-box
}
.pbleft input{
width:531rpx;
height:60rpx;
padding: 0 26rpx;
line-height: 60rpx;
box-sizing: border-box
}
.enterping{
color:#999999;
font-size: 26rpx
}
.pbright{
width:120rpx;
height:60rpx;
background:rgba(232,24,37,1);
border-radius:30rpx;
color:#fff;
font-size: 26rpx;
text-align: center;
line-height: 60rpx;
}
\ No newline at end of file
... ...
// pages/myblock/shezhimima/shezhimima.js
const app=getApp()
Page({
/**
* 页面的初始数据
*/
data: {
url:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
url: app.globalData.url
})
},
... ...
{
"usingComponents": {}
"navigationBarTitleText": "设置密码"
}
\ No newline at end of file
... ...
<!--pages/myblock/shezhimima/shezhimima.wxml-->
<text>pages/myblock/shezhimima/shezhimima.wxml</text>
<view class="setmima">
<view class="setmimaleft">
<input placeholder='设置密码' placeholder-class='shemi'/>
</view>
<view class="mimaeye">
<image src="{{url}}/bicon_14x.png"></image>
</view>
</view>
<view class="que">确认</view>
<view class="needmi">需要有6-20位数字、字母或符号组成,至少两种</view>
<view class="mimasuccess">密码设置成功</view>
... ...
/* pages/myblock/shezhimima/shezhimima.wxss */
\ No newline at end of file
page{
background: #F2F2F2
}
.setmima{
width:540rpx;
height:120rpx;
background:rgba(255,255,255,1);
border-radius:5rpx;
margin:206rpx auto 0;
display:flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx;
box-sizing: border-box
}
.setmimaleft{
width:420rpx;
color:#1A1A1A;
font-size: 30rpx;
}
.shemi{
color:#1A1A1A;
font-size: 30rpx;
}
.mimaeye{
width:34rpx;
height:16rpx;
font-size: 0
}
.que{
width:540rpx;
height:100rpx;
background:rgba(232,24,37,1);
border-radius:50rpx;
color:#fff;
font-size: 30rpx;
text-align: center;
line-height: 100rpx;
margin:90rpx auto 0;
}
.needmi{
color:#999999;
font-size: 24rpx;
text-align: center;
margin-top:32rpx;
}
.mimasuccess{
width:290rpx;
height:60rpx;
background:rgba(0,0,0,1);
opacity:0.8;
border-radius:10rpx;
color:#fff;
font-size: 24rpx;
text-align: center;
line-height: 60rpx;
margin:468rpx auto 0;
}
\ 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
}
]
... ...
/**
* html2Json 改造来自: https://github.com/Jxck/html2json
*
*
* author: Di (微信小程序开发工程师)
* organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
* 垂直微信小程序开发交流社区
*
* github地址: https://github.com/icindy/wxParse
*
* for: 微信小程序富文本解析
* detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
*/
var __placeImgeUrlHttps = "https";
var __emojisReg = '';
var __emojisBaseSrc = '';
var __emojis = {};
var wxDiscode = require('./wxDiscode.js');
var HTMLParser = require('./htmlparser.js');
// Empty Elements - HTML 5
var empty = makeMap("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr");
// Block Elements - HTML 5
var block = makeMap("br,a,code,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video");
// Inline Elements - HTML 5
var inline = makeMap("abbr,acronym,applet,b,basefont,bdo,big,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var");
// Elements that you can, intentionally, leave open
// (and which close themselves)
var closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");
// Attributes that have their values filled in disabled="disabled"
var fillAttrs = makeMap("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected");
// Special Elements (can contain anything)
var special = makeMap("wxxxcode-style,script,style,view,scroll-view,block");
function makeMap(str) {
var obj = {}, items = str.split(",");
for (var i = 0; i < items.length; i++)
obj[items[i]] = true;
return obj;
}
function q(v) {
return '"' + v + '"';
}
function removeDOCTYPE(html) {
return html
.replace(/<\?xml.*\?>\n/, '')
.replace(/<.*!doctype.*\>\n/, '')
.replace(/<.*!DOCTYPE.*\>\n/, '');
}
function trimHtml(html) {
return html
// .replace(/\r?\n+/g, '')
.replace(/<!--.*?-->/ig, '')
.replace(/\/\*.*?\*\//ig, '')
.replace(/[ ]+</ig, '<')
}
function html2json(html, bindName) {
//处理字符串
html = removeDOCTYPE(html);
// html = trimHtml(html);
// html = wxDiscode.strDiscode(html);
//生成node节点
var bufArray = [];
var results = {
node: bindName,
nodes: [],
images:[],
imageUrls:[]
};
var index = 0;
HTMLParser(html, {
start: function (tag, attrs, unary) {
//debug(tag, attrs, unary);
// node for this element
var node = {
node: 'element',
tag: tag,
};
if (bufArray.length === 0) {
node.index = index.toString()
index += 1
} else {
var parent = bufArray[0];
if (parent.nodes === undefined) {
parent.nodes = [];
}
node.index = parent.index + '.' + parent.nodes.length
}
if (block[tag]) {
node.tagType = "block";
} else if (inline[tag]) {
node.tagType = "inline";
} else if (closeSelf[tag]) {
node.tagType = "closeSelf";
}
if (attrs.length !== 0) {
node.attr = attrs.reduce(function (pre, attr) {
var name = attr.name;
var value = attr.value;
if (name == 'class') {
// console.dir(value);
// value = value.join("")
node.classStr = value;
}
// has multi attibutes
// make it array of attribute
if (name == 'style') {
// console.dir(value);
// value = value.join("")
node.styleStr = value;
}
if (value.match(/ /)) {
value = value.split(' ');
}
// if attr already exists
// merge it
if (pre[name]) {
if (Array.isArray(pre[name])) {
// already array, push to last
pre[name].push(value);
} else {
// single value, make it array
pre[name] = [pre[name], value];
}
} else {
// not exist, put it
pre[name] = value;
}
return pre;
}, {});
}
//对img添加额外数据
if (node.tag === 'img') {
node.imgIndex = results.images.length;
var imgUrl = node.attr.src;
if (imgUrl[0] == '') {
imgUrl.splice(0, 1);
}
imgUrl = wxDiscode.urlToHttpUrl(imgUrl, __placeImgeUrlHttps);
node.attr.src = imgUrl;
node.from = bindName;
results.images.push(node);
results.imageUrls.push(imgUrl);
}
// 处理font标签样式属性
if (node.tag === 'font') {
var fontSize = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', '-webkit-xxx-large'];
var styleAttrs = {
'color': 'color',
'face': 'font-family',
'size': 'font-size'
};
if (!node.attr.style) node.attr.style = [];
if (!node.styleStr) node.styleStr = '';
for (var key in styleAttrs) {
if (node.attr[key]) {
var value = key === 'size' ? fontSize[node.attr[key]-1] : node.attr[key];
node.attr.style.push(styleAttrs[key]);
node.attr.style.push(value);
node.styleStr += styleAttrs[key] + ': ' + value + ';';
}
}
}
//临时记录source资源
if(node.tag === 'source'){
results.source = node.attr.src;
}
if (unary) {
// if this tag doesn't have end tag
// like <img src="hoge.png"/>
// add to parents
var parent = bufArray[0] || results;
if (parent.nodes === undefined) {
parent.nodes = [];
}
parent.nodes.push(node);
} else {
bufArray.unshift(node);
}
},
end: function (tag) {
//debug(tag);
// merge into parent tag
var node = bufArray.shift();
if (node.tag !== tag) console.error('invalid state: mismatch end tag');
//当有缓存source资源时于于video补上src资源
if(node.tag === 'video' && results.source){
node.attr.src = results.source;
delete results.source;
}
if (bufArray.length === 0) {
results.nodes.push(node);
} else {
var parent = bufArray[0];
if (parent.nodes === undefined) {
parent.nodes = [];
}
parent.nodes.push(node);
}
},
chars: function (text) {
//debug(text);
var node = {
node: 'text',
text: text,
textArray:transEmojiStr(text)
};
if (bufArray.length === 0) {
node.index = index.toString()
index += 1
results.nodes.push(node);
} else {
var parent = bufArray[0];
if (parent.nodes === undefined) {
parent.nodes = [];
}
node.index = parent.index + '.' + parent.nodes.length
parent.nodes.push(node);
}
},
comment: function (text) {
//debug(text);
// var node = {
// node: 'comment',
// text: text,
// };
// var parent = bufArray[0];
// if (parent.nodes === undefined) {
// parent.nodes = [];
// }
// parent.nodes.push(node);
},
});
return results;
};
function transEmojiStr(str){
// var eReg = new RegExp("["+__reg+' '+"]");
// str = str.replace(/\[([^\[\]]+)\]/g,':$1:')
var emojiObjs = [];
//如果正则表达式为空
if(__emojisReg.length == 0 || !__emojis){
var emojiObj = {}
emojiObj.node = "text";
emojiObj.text = str;
array = [emojiObj];
return array;
}
//这个地方需要调整
str = str.replace(/\[([^\[\]]+)\]/g,':$1:')
var eReg = new RegExp("[:]");
var array = str.split(eReg);
for(var i = 0; i < array.length; i++){
var ele = array[i];
var emojiObj = {};
if(__emojis[ele]){
emojiObj.node = "element";
emojiObj.tag = "emoji";
emojiObj.text = __emojis[ele];
emojiObj.baseSrc= __emojisBaseSrc;
}else{
emojiObj.node = "text";
emojiObj.text = ele;
}
emojiObjs.push(emojiObj);
}
return emojiObjs;
}
function emojisInit(reg='',baseSrc="/wxParse/emojis/",emojis){
__emojisReg = reg;
__emojisBaseSrc=baseSrc;
__emojis=emojis;
}
module.exports = {
html2json: html2json,
emojisInit:emojisInit
};
... ...
/**
*
* htmlParser改造自: https://github.com/blowsie/Pure-JavaScript-HTML5-Parser
*
* author: Di (微信小程序开发工程师)
* organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
* 垂直微信小程序开发交流社区
*
* github地址: https://github.com/icindy/wxParse
*
* for: 微信小程序富文本解析
* detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
*/
// Regular Expressions for parsing tags and attributes
var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,
endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/,
attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;
// Empty Elements - HTML 5
var empty = makeMap("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr");
// Block Elements - HTML 5
var block = makeMap("a,address,code,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video");
// Inline Elements - HTML 5
var inline = makeMap("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var");
// Elements that you can, intentionally, leave open
// (and which close themselves)
var closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");
// Attributes that have their values filled in disabled="disabled"
var fillAttrs = makeMap("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected");
// Special Elements (can contain anything)
var special = makeMap("wxxxcode-style,script,style,view,scroll-view,block");
function HTMLParser(html, handler) {
var index, chars, match, stack = [], last = html;
stack.last = function () {
return this[this.length - 1];
};
while (html) {
chars = true;
// Make sure we're not in a script or style element
if (!stack.last() || !special[stack.last()]) {
// Comment
if (html.indexOf("<!--") == 0) {
index = html.indexOf("-->");
if (index >= 0) {
if (handler.comment)
handler.comment(html.substring(4, index));
html = html.substring(index + 3);
chars = false;
}
// end tag
} else if (html.indexOf("</") == 0) {
match = html.match(endTag);
if (match) {
html = html.substring(match[0].length);
match[0].replace(endTag, parseEndTag);
chars = false;
}
// start tag
} else if (html.indexOf("<") == 0) {
match = html.match(startTag);
if (match) {
html = html.substring(match[0].length);
match[0].replace(startTag, parseStartTag);
chars = false;
}
}
if (chars) {
index = html.indexOf("<");
var text = ''
while (index === 0) {
text += "<";
html = html.substring(1);
index = html.indexOf("<");
}
text += index < 0 ? html : html.substring(0, index);
html = index < 0 ? "" : html.substring(index);
if (handler.chars)
handler.chars(text);
}
} else {
html = html.replace(new RegExp("([\\s\\S]*?)<\/" + stack.last() + "[^>]*>"), function (all, text) {
text = text.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g, "$1$2");
if (handler.chars)
handler.chars(text);
return "";
});
parseEndTag("", stack.last());
}
if (html == last)
throw "Parse Error: " + html;
last = html;
}
// Clean up any remaining tags
parseEndTag();
function parseStartTag(tag, tagName, rest, unary) {
tagName = tagName.toLowerCase();
if (block[tagName]) {
while (stack.last() && inline[stack.last()]) {
parseEndTag("", stack.last());
}
}
if (closeSelf[tagName] && stack.last() == tagName) {
parseEndTag("", tagName);
}
unary = empty[tagName] || !!unary;
if (!unary)
stack.push(tagName);
if (handler.start) {
var attrs = [];
rest.replace(attr, function (match, name) {
var value = arguments[2] ? arguments[2] :
arguments[3] ? arguments[3] :
arguments[4] ? arguments[4] :
fillAttrs[name] ? name : "";
attrs.push({
name: name,
value: value,
escaped: value.replace(/(^|[^\\])"/g, '$1\\\"') //"
});
});
if (handler.start) {
handler.start(tagName, attrs, unary);
}
}
}
function parseEndTag(tag, tagName) {
// If no tag name is provided, clean shop
if (!tagName)
var pos = 0;
// Find the closest opened tag of the same type
else {
tagName = tagName.toLowerCase();
for (var pos = stack.length - 1; pos >= 0; pos--)
if (stack[pos] == tagName)
break;
}
if (pos >= 0) {
// Close all the open elements, up the stack
for (var i = stack.length - 1; i >= pos; i--)
if (handler.end)
handler.end(stack[i]);
// Remove the open elements from the stack
stack.length = pos;
}
}
};
function makeMap(str) {
var obj = {}, items = str.split(",");
for (var i = 0; i < items.length; i++)
obj[items[i]] = true;
return obj;
}
module.exports = HTMLParser;
... ...