作者 朱振飞

页面修改

{
"pages": [
"pages/homeblock/search/search",
"pages/find/find",
"pages/login/login",
"pages/homapage/homepage",
"pages/homeblock/search/search",
"pages/find/find",
"pages/index/index",
"pages/logs/logs",
"pages/mine/mine",
"pages/myblock/personpage/personpage",
"pages/homeblock/brandlist/brandlist",
"pages/homeblock/brandpage/brandpage",
"pages/homeblock/companyintro/companyintro",
... ... @@ -27,12 +24,12 @@
"pages/myblock/huanbangshouji/huanbangshouji",
"pages/myblock/guanzhu/guanzhu",
"pages/myblock/pinglun/pinglun",
"pages/enteryanzheng/enteryanzheng",
"pages/forgetmima/forgetmima",
"pages/wanshangeren/wanshangeren",
"pages/peopleinfo/peopleinfo"
"pages/peopleinfo/peopleinfo",
"pages/myblock/history/history",
"pages/jiudan/jiudan"
],
"window": {
"backgroundTextStyle": "light",
... ...
... ... @@ -90,3 +90,4 @@ image{
color: #999;
justify-content: center;
}
\ No newline at end of file
... ...
<!-- 种类的遮罩层 -->
<view class="register" wx:if="{{shai}}" bindtap="hideregister">
<view class="registerwrap">
<view class="registeritem {{item.sel==true?'selact':''}}" wx:for="{{shaikind}}" wx:key="" wx:if="{{type==1}}" data-id="{{item.id}}" catchtap='selectkind'>{{item.sort_name}}</view>
<view class="registeritem {{item.sel==true?'selact':''}}" wx:for="{{shaikind}}" wx:key="" wx:if="{{type==2}}" data-id="{{item.id}}" catchtap='selectkind'>{{item.country_name}}</view>
<view class="registeritem {{item.sel==true?'selact':''}}" wx:for="{{shaikind}}" wx:key="" wx:if="{{type==3}}" data-id="{{item.id}}" catchtap='selectkind'>{{item.region_name}}</view>
<view class="registeritem {{item.sel==true?'selact':''}}" wx:for="{{shaikind}}" wx:key="" wx:if="{{type==4}}" data-id="{{item.id}}" catchtap='selectkind'>{{item.odor_name}}</view>
</view>
</view>
<!-- 国家遮罩层 -->
<view class="cregister" wx:if="{{showcountry}}">
<view class="quehead">
<view class="backrow"></view>
<view class="selcoun">选择国别</view>
<view class="cqueding" bindtap="countrysure">确定</view>
</view>
<view class="countryitem" wx:for="{{countrylist}}" wx:key="" data-name="{{item.country_name}}" bindtap="selectcountry" data-id="{{item.id}}">
<view class="selcounitem">{{item.country_name}}</view>
<view class="gouimg" wx:if="{{item.sel==true}}">
<image src="{{url}}/aicon_18x.png"></image>
</view>
</view>
</view>
<!-- 城市遮罩层 -->
<view class="cregister" wx:if="{{showcity}}">
<view class="quehead">
<view class="backrow"></view>
<view class="selcoun">选择城市</view>
<view class="cqueding" bindtap="citysure">确定</view>
</view>
<view class="nodata" wx:if="{{citylist.length==0}}">暂无数据</view>
<block wx:else>
<view class="countryitem" wx:for="{{citylist}}" wx:key="" data-name="{{item.country_name}}" bindtap="selectcity" data-index="{{index}}">
<view class="selcounitem">{{item.city}}</view>
<!-- <view class="gouimg" wx:if="{{item.sel==true}}">
<image src="{{url}}/aicon_18x.png"></image>
</view> -->
</view>
</block>
</view>
<!-- 区域选择 -->
<view class="cregister" wx:if="{{showregin}}">
<view class="quehead">
<view class="backrow"></view>
<view class="selcoun">选择区</view>
<view class="cqueding" bindtap="sureregin">确定</view>
</view>
<view class="countryitem" wx:for="{{reginlist}}" wx:key="" data-name="{{item.name}}" bindtap="selectregin" data-index="{{index}}">
<view class="selcounitem">{{item.name}}</view>
<view class="gouimg" wx:if="{{item.sel==true}}">
<image src="{{url}}/aicon_18x.png"></image>
</view>
</view>
</view>
<view class="heatop">
<view class="head">
<view class="address">
<view class="addressimg">
<image src='{{url}}bicon_01x.png'></image>
</view>
<view class="addressname">{{currentCity}}</view>
</view>
<view class="headmiddle" bindtap="entersearch">
<view class="searchimg">
<image src="{{url}}aicon_04@2x.png"></image>
</view>
<view class="searchinput">
<input placeholder='已收录298653款酒品' placeholder-class='seachenter' value="{{record}}" />
</view>
<view class="saoma">
<image src="{{url}}bicon_04@2x.png"></image>
</view>
</view>
<view class="address" bindtap="shai">
<view class="shaixuan">
<image src='{{url}}bicon_02@2x.png'></image>
</view>
<view class="addressname shai">筛选</view>
</view>
</view>
<!-- 筛选 -->
<view class="shaisel">
<view class="shaikind" bindtap="shaikind" data-type="{{item.type}}" wx:for="{{kindlist}}" wx:key="">
<view class="shaikindname">{{item.name}}</view>
<view class="shaikindimg">
<image src="{{url}}bicon_06x.png" wx:if="{{item.sel==true}}"></image>
<image src="{{url}}bicon_05x.png" wx:else></image>
</view>
</view>
</view>
<!-- <view class="hot">
<view class="hotimg">
<image src="{{url}}bicon_08@2x.png"></image>
</view>
<view class="hotzi">
<image src="{{url}}bicon_07@2x.png"></image>
</view>
</view> -->
</view>
<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="hot">
<view class="hotimg">
<image src="{{url}}bicon_08@2x.png"></image>
</view>
<view class="hotzi">
<image src="{{url}}bicon_07@2x.png"></image>
</view>
</view>
<view class='new_city'>
<view class='new_city_box'>
<view class='new_city_text' wx:for='{{newcity}}' wx:key='this' data-types='new' catchtap='cityTap' data-val='{{item}}'>
<view class="hotgood">
<view class="imgleft">
<image src="{{item.logo}}" mode='widthFix'></image>
</view>
<view class="contentright">
<view class="contenttop">{{item.name}}</view>
<view class="contenbottom">
<text class="textname">{{item.sort_name}}</text>
<text class="textname">{{item.country}}</text>
<text class="textname">{{item.city}}</text>
<text class="textname">{{item.odor_name}}</text>
</view>
</view>
</view>
</view>
</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.name}}'>{{letterItem.name}}</view>
<!-- {{item.cityName}} -->
<view class='city_name' wx:for='{{letterItem.list}}' id='{{letterItem.name}}' wx:key='this' data-types='list' catchtap='cityTap' data-index='{{index}}' data-val='{{item}}'>
<view class="imgleft">
<image src="{{item.logo}}"></image>
</view>
<view class="contentright">
<view class="contenttop">{{item.name}}</view>
<view class="contenbottom">
<text class="textname">{{item.sort_name}}</text>
<text class="textname">{{item.country}}</text>
<text class="textname"> {{item.city}} </text>
<text class="textname">{{item.odor_name}}</text> </view>
</view>
</view>
</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
... ... @@ -177,4 +177,7 @@ image{
width:80rpx;
height:80rpx;
}
.nambottom .namebottomitem:first-child{
padding-left: 0;
}
 
\ No newline at end of file
... ...
... ... @@ -36,11 +36,9 @@
<view class="bottomxia">
<view class="xiaimg">
<image src="{{url}}aicon_47x.png"></image>
</view>
<text class="zannum">6.2k</text>
</view>
</view>
</view>
<view class="boxitem">
... ...
// pages/jiudan/jiudan.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "名人酒单"
}
\ No newline at end of file
... ...
<view class='wine_list'>
<view class='list_item'>
<view class='img_box'>
<image src='/img/aicon_65.png'></image>
</view>
<view class='wine_title'>万丈红尘一人醉</view>
<view class='wine_name'>唐国强</view>
<view class='wine_leavel'>lv12</view>
<view class='action_box'>
<view class='single_action'>
<view class='zan_icon'>
<image src='/img/aicon_47.png' mode='widthFix'></image>
</view>
618
</view>
<view class='single_action'>
<view class='zan_icon'>
<image src='/img/aicon_67.png' mode='widthFix'></image>
</view>
54
</view>
<view class='single_action {{item.choose?"active":""}}' bindtap='shareAction'>
<image src='/img/gengduo.png' mode='widthFix' class='moreIcon'></image>
<view class='min_action_box'>
<view class='action_btn'>收藏</view>
<view class='action_btn'>分享</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
/* pages/jiudan/jiudan.wxss */
page{
background: #F2F2F2;
}
.wine_list{
display: flex;
display: -webkit-flex;
flex-wrap: wrap;
overflow-x: hidden;
}
.list_item{
width: 366rpx;
height: 400rpx;
background: #FFF;
border-radius: 5rpx;
margin-left: 6rpx;
margin-top: 6rpx;
display: flex;
flex-flow: column;
font-size: 28rpx;
align-items: center;
box-sizing: border-box;
padding-top: 40rpx;
}
.img_box{
width: 120rpx;
height: 120rpx;
border-radius: 50%;
overflow: hidden;
}
.wine_title{
color: #1A1A1A;
font-weight: 500;
margin-top: 20rpx;
line-height: 1;
}
.wine_name{
font-size: 26rpx;
color: #666;
margin-top: 10rpx;
}
.wine_leavel{
width: 68rpx;
height: 24rpx;
border: 1rpx solid #E81825;
border-radius: 12rpx;
font-size: 20rpx;
color: #E81825;
display: flex;
align-items: center;
justify-content: center;
margin-top: 14rpx;
}
.action_box{
display: flex;
justify-content: space-around;
color: #999;
width: 100%;
margin-top: 40rpx;
}
.single_action{
padding: 0 10rpx;
display: flex;
align-items: center;
position: relative;
}
.zan_icon{
width: 30rpx;
margin-right: 10rpx;
}
.moreIcon{
width: 4rpx;
}
.min_action_box{
width: 134rpx;
height: 175rpx;
position: absolute;
background-color: #FFF;
z-index: 10;
left: -140rpx;
top: 0;
font-size: 30rpx;
flex-flow: column;
box-sizing: border-box;
padding: 10rpx 0;
justify-content: space-around;
align-items: center;
color: #1A1A1A;
border-radius: 5rpx;
box-shadow:0px 8px 16px 0px rgba(44,49,63,0.1);
display: none;
}
.action_btn{
width: 100%;
text-align: center;
position: relative;
}
.action_btn.active{
color: #E81825;
}
.action_btn button{
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
opacity: 0;
}
.single_action.active .min_action_box{
display: flex;
}
\ No newline at end of file
... ...
... ... @@ -32,7 +32,7 @@
</view>
<view class="xintitle">评论</view>
</navigator>
<navigator class="xinitem" url='/pages/myblock/pinglun/pinglun'>
<navigator class="xinitem" url='/pages/myblock/history/history'>
<view class="history">
<image src="{{url}}aicon_81x.png"></image>
</view>
... ...
... ... @@ -27,7 +27,7 @@ Page({
})
},
getTeach() {
let url = '/user/Center/concern_company', params = {
let url = '/user/Center/concern_winemaker ', params = {
page: this.data.page
};
app.post(url, params).then(r => {
... ...
// pages/myblock/pinglun/pinglun.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
page: 1,
list: [],
noData: true,
noMore: !1,
edit: !1,
delId: [],
tabList: [{
name: '品牌',
url: 'history_brand'
}, {
name: '酒品',
url: 'history_wine'
}, {
name: '酒企',
url: 'history_company'
}, {
name: '酒单',
url: 'history_rec'
}, {
name: '专家品酒',
url: 'history_expert'
}, {
name: '酿酒师',
url: 'history_master'
}, {
name: '其他文章',
url: 'history_article'
}],
selectindex:0,
current:'history_brand'
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getList();
let that = this;
wx.getSystemInfo({
success: function (t) {
that.setData({
scrollHeight: t.windowHeight - 50,
windowWidth: t.windowWidth
});
}
});
},
shareAction(e){
let index = e.currentTarget.id;
index!=this.data.tempIndex?this.closeShareAction():'';
this.data.list[index].show = !this.data.list[index].show;
this.setData({
list: this.data.list,
tempIndex: index
})
},
closeShareAction(){
if(this.data.tempIndex){
let show = this.data.list[this.data.tempIndex].show;
if (show) {
this.data.list[this.data.tempIndex].show = false;
this.setData({
list: this.data.list
})
}
}
},
tabCharge(e) {
let s = this, singleWidth = s.data.windowWidth / 6, cur = e.currentTarget.dataset.index + 1, current = e.currentTarget.dataset.current;
s.setData({
selectindex: e.currentTarget.dataset.index,
page: 1,
current: current,
navScrollLeft: (cur - 2) * singleWidth
})
this.getList();
},
getList() {
let url = 'user/Center/'+this.data.current, params = {
page: this.data.page
};
app.post(url, params).then(r => {
var list = this.data.page == 1 ? r.list : this.data.list.concat(r.list);
this.setData({
list: list,
totalPage: r.total_page,
noData: list.length > 0 ? true : false,
noMore: r.totalPage == r.page ? !0 : !1
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "历史"
}
\ No newline at end of file
... ...
<view class="pinglunlist">
<view class='top_tab'>
<scroll-view class='tab_box' scroll-left="{{navScrollLeft}}" scroll-x='true' scroll-with-animation='true'>
<block wx:for="{{tabList}}" wx:key=''>
<view class="tab_item {{selectindex == index?'active':''}}" data-current='{{item.url}}' bindtap='tabCharge' data-index='{{index}}' data-beau="0">{{item.name}}</view>
</block>
</scroll-view>
</view>
<view class='comment_list'>
<!-- <view class="pinglunitem" wx:for='{{list}}' wx:key=''>
<view class="pinglunitemleft">
<view class="leftimg">
<image src="{{item.avatar}}"></image>
</view>
<view class="pinglunright">
<view class="righttop">{{item.user_nickname}}</view>
<view class="rightbottom">{{item.create_time}}</view>
</view>
<view class='eidt {{item.checked?"choose":""}}' bindtap='choose' id='{{index}}' data-chooseId='{{item.id}}' wx:if='{{edit}}'>
<image src='/img/pinglun_xz.png'></image>
</view>
</view>
<view class="pinglunmiddle">
{{item.content}}
</view>
<view class="pinglunbottom">
<view class="pingbottomleft">
<image src="{{item.article.thumb}}"></image>
</view>
<view class='pingbottomright'>
<view class='xinxi'>{{item.article.title}}</view>
<view class="biangjiubottom">
<view class='rightbottomimg'>
<image src='{{item.article.avatar}}'></image>
</view>
<text class="niangjiutext">{{item.article.name}}</text>
</view>
</view>
</view>
</view> -->
<view class="zhinengbox" wx:if='{{selectindex==0}}'>
<view class="searchitem" wx:for='{{list}}' wx:key=''>
<view class="searchitemleft">
<view class="itemleftimg">
<image src="{{item.logo}}" mode='widthFix'></image>
</view>
<view class="itemiddle">
<view class="itemidelename">{{item.name}}</view>
<view class="nambottom">
<text class="namebottomitem">{{item.sort_name}}</text>
<text class="namebottomitem">{{item.country}}</text>
<text class="namebottomitem">{{item.city}}</text>
<text class="namebottomitem">{{item.odor_name}}</text>
</view>
</view>
</view>
<view class="starimg">
<!-- aicon_010x.png -->
<image src="{{item.is_favorite==0?'/img/aicon_09.png':'/img/aicon_10.png'}}"></image>
</view>
</view>
</view>
<view class="zhinengbox winebrand" wx:if='{{selectindex==1}}'>
<view class="searchitem" wx:for='{{list}}' wx:key=''>
<view class="searchitemleft">
<view class="itemleftimg">
<image src="{{item.logo}}"></image>
</view>
<view class="itemiddle">
<view class="itemidelename">{{item.name}}</view>
<view class="nambottom">
<text class="namebottomitem">{{item.degree_name}}</text>
<text class="namebottomitem">{{item.odor_name}}</text>
<text class="namebottomitem">{{item.price}}</text>
<text class="namebottomitem">{{item.ml}}</text>
</view>
</view>
</view>
<view class="starimg">
<!-- aicon_010x.png -->
<image src="{{item.is_favorite==0?'/img/aicon_09.png':'/img/aicon_10.png'}}"></image>
</view>
</view>
</view>
<!-- 酒企 -->
<view class="zhinengbox winebrand" wx:if='{{selectindex==2}}'>
<view class="searchitem" wx:for='{{list}}' wx:key=''>
<view class="searchitemleft">
<view class="itemleftimg">
<image src="{{item.logo}}"></image>
</view>
<view class="itemiddle">
<view class="itemidelename">{{item.name}}</view>
<view class="nambottom">
<text class="namebottomitem">{{item.country}}</text>
<text class="namebottomitem">{{item.city}}</text>
<text class="namebottomitem">{{item.sort_name}}</text>
<text class="namebottomitem">{{item.concern_count}}</text>
</view>
</view>
</view>
<!-- <view class="starimg"> -->
<!-- aicon_010x.png -->
<!-- <image src="{{item.is_favorite==0?'/img/aicon_09.png':'/img/aicon_10.png'}}"></image> -->
<view class='focus_btn {{item.is_concern==0?"":"active"}}'>
已关注
</view>
<!-- </view> -->
</view>
</view>
<view class='wine_list' wx:if='{{selectindex==3}}' bindtap='closeShareAction'>
<view class='list_item' wx:for='{{list}}' wx:key=''>
<view class='img_box'>
<image src='{{item.thumb}}' mode='widthFix'></image>
</view>
<view class='wine_title'>{{item.title}}</view>
<view class='wine_name'>{{item.user_nickname}}</view>
<view class='wine_leavel'>lv{{item.level}}</view>
<view class='action_box'>
<view class='single_action'>
<view class='zan_icon'>
<image src='{{!item.is_good?"/img/aicon_47.png":"/img/aicon_46.png"}}' mode='widthFix'></image>
</view>
{{item.good_count}}
</view>
<view class='single_action'>
<view class='zan_icon'>
<image src='/img/aicon_67.png' mode='widthFix'></image>
</view>
{{item.comment_count}}
</view>
<view class='single_action {{item.show?"active":""}}' catchtap='shareAction' id='{{index}}'>
<image src='/img/gengduo.png' mode='widthFix' class='moreIcon'></image>
<view class='min_action_box'>
<view class='action_btn {{item.is_favorite?"active":""}}'>{{!item.is_favorite?"收藏":"已收藏"}}</view>
<view class='action_btn'>分享 <button open-type='share'></button></view>
</view>
</view>
</view>
</view>
<!-- <view class='list_item'>
<view class='img_box'>
<image src='/img/aicon_65.png'></image>
</view>
<view class='wine_title'>万丈红尘一人醉</view>
<view class='wine_name'>唐国强</view>
<view class='wine_leavel'>lv12</view>
<view class='action_box'>
<view class='single_action'>
<view class='zan_icon'>
<image src='/img/aicon_47.png' mode='widthFix'></image>
</view>
618
</view>
<view class='single_action'>
<view class='zan_icon'>
<image src='/img/aicon_67.png' mode='widthFix'></image>
</view>
54
</view>
<view class='single_action'>
<image src='/img/gengduo.png' mode='widthFix' class='more'></image>
</view>
</view>
</view> -->
</view>
<view class='showall' wx:if='{{noMore&&noData}}'>已显示全部内容</view>
</view>
</view>
<view class='noData' wx:if='{{!noData}}'>
暂无相关数据
</view>
\ No newline at end of file
... ...
@import '../../homeblock/zhinengselect/zhinengselect.wxss';
@import '../../jiudan/jiudan.wxss';
page{
width: 100%;
height: 100%;
}
.pinglunitem {
margin: 41rpx 30rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #f5f5f5;
}
.pinglunitemleft {
display: flex;
align-items: center;
}
.leftimg {
width: 60rpx;
height: 60rpx;
font-size: 0;
border-radius: 50%;
}
.leftimg image {
border-radius: 50%;
}
.righttop {
color: #666;
font-size: 28rpx;
}
.rightbottom {
color: #999;
font-size: 24rpx;
}
.pinglunmiddle {
color: #1a1a1a;
font-size: 28rpx;
margin-top: 34rpx;
margin-bottom: 34rpx;
}
.pinglunbottom {
display: flex;
align-items: center;
padding-bottom: 40rpx;
}
.pingbottomleft {
width: 260rpx;
height: 114rpx;
font-size: 0;
}
.xinxi {
color: #1a1a1a;
font-size: 26rpx;
font-weight: bold;
}
.rightbottomimg {
width: 36rpx;
height: 36rpx;
font-size: 0;
border-radius: 50%;
}
.biangjiubottom {
display: flex;
align-items: center;
margin-top: 15rpx;
}
.rightbottomimg image {
border-radius: 50%;
}
.niangjiutext {
color: #666;
font-size: 28rpx;
margin-left: 16rpx;
}
.showall {
color: #999;
font-size: 24rpx;
margin-top: 23rpx;
text-align: center;
}
.btnbottom {
width:750rpx;
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom:0;
left: 0;
background: #FFF;
padding-bottom: 32rpx;
padding-top: 30rpx;
}
.btnleft {
width: 300rpx;
height: 80rpx;
border: 1px solid rgba(232, 24, 37, 1);
border-radius: 40rpx;
color: #e81825;
font-size: 28rpx;
text-align: center;
line-height: 80rpx;
}
.btnright {
width: 300rpx;
height: 80rpx;
background: rgba(232, 24, 37, 1);
border-radius: 40rpx;
color:#fff;
font-size: 28rpx;
text-align: center;
line-height: 80rpx;
margin-left:55rpx;
}
.top_eidt{
display: flex;
align-items: center;
justify-content: center;
position: relative;
height: 88rpx;
border-bottom: 2rpx solid #f5f5f5;
border-top:2rpx solid #f5f5f5;
font-size: 26rpx;
}
.action{
position: absolute;
top: 50%;
right: 40rpx;
transform: translateY(-50%);
color: #999;
}
.eidt{
border: 1rpx solid #999;
width: 36rpx;
height: 36rpx;
border-radius: 50%;
margin-left: auto;
-webkit-margin-start: auto;
display: flex;
align-items: center;
justify-content: center;
}
.eidt image{
display: none;
}
.eidt.choose image{
display: block;
}
.pinglunlist{
display: flex;
flex-flow: column;
height: 100%;
width: 100%;
}
.comment_list{
flex: 1;
overflow-y: auto;
padding-bottom: 32rpx;
}
.comment_list.del{
padding-bottom: 160rpx;
}
.pinglunright{
margin-left: 30rpx;
}
.pingbottomright{
height: 114rpx;
flex: 1;
background: #F7F7F7;
padding-left: 40rpx;
display: flex;
flex-direction: column;
justify-content: center;
}
.tab_box {
width: 100%;
height: 80rpx;
white-space: nowrap;
overflow: hidden;
line-height: 80rpx;
display:flex;
padding-left: 10rpx
}
.tab_item {
font-size: 26rpx;
color: #999;
display: inline-block;
position: relative;
padding: 0 35rpx;
height: 100%;
text-align: center;
}
.tab_item.active {
color: #E81825;
}
.tab_item.active::after {
content: "";
width: 62rpx;
height: 4rpx;
background: #169bd5;
position: absolute;
bottom: -30rpx;
left: 50%;
transform: translateX(-50%);
}
.top_tab{
border-top: 1rpx solid #ebebeb;
border-bottom: 1rpx solid #ebebeb;
}
.focus_btn{
display: inline-block;
font-size: 26rpx;
padding: 8rpx;
color: #999;
background-color: #ebebeb;
}
.focus_btn.active{
background: #E81825;
color: #FFF;
}
.img_box{
overflow: auto;
border-radius: 0;
}
.shareAction .more{
margin-right: 0!important;
}
\ No newline at end of file
... ...
... ... @@ -10,7 +10,9 @@ Page({
list:[],
noData: true,
noMore:!1,
edit:!1
edit:!1,
delId:[],
},
/**
... ... @@ -20,11 +22,20 @@ Page({
this.getList();
},
edit(){
console.log(11)
this.setData({
edit:!this.data.edit
})
},
choose(e){
console.log(e)
let checked = this.data.list[e.currentTarget.id].checked, id = e.currentTarget.dataset.chooseid,start;
this.data.list[e.currentTarget.id].checked = !this.data.list[e.currentTarget.id].checked;
checked ? (start = this.data.delId.indexOf(id), this.data.delId.splice(start, 1)) : this.data.delId.push(id);
this.setData({
list: this.data.list,
delId: this.data.delId
})
},
getList(){
let url = 'user/Center/my_comment', params = {
page: this.data.page
... ... @@ -39,6 +50,51 @@ Page({
})
})
},
clearComment(){
let delId = [],that = this;
this.data.list.forEach(el=>{
delId.push(el.id)
});
wx.showModal({
title: '提示',
content: '确认清空所有评论?',
success: function(res){
if(res.confirm){
that.delComent(delId)
}
}
})
},
delChoose(){
let that = this;
wx.showModal({
title: '提示',
content: '确认删除这些选择项',
success: function (res) {
if (res.confirm) {
that.delComent(that.data.delId)
}
}
})
},
delComent(obj){
let t = this, url = 'index/Common/comment_delete ',params={
ids:obj
};
app.post(url,params).then(r=>{
wx.showToast({
title: '删除成功',
icon:'none',
duration: 1300
})
this.setData({
edit: false,
page: 1
})
this.getList();
})
},
/**
* 生命周期函数--监听页面初次渲染完成
... ...
<view class="pinglunlist" hidden='{{noData}}'>
<view class="pinglunlist" hidden='{{!noData}}'>
<view class='top_eidt'>
我的评论
<text class='action' bindtap='edit'>{{edit?'取消':'编辑'}}</text>
</view>
<view class='comment_list {{edit?"del":""}}'>
<view class="pinglunitem" wx:for='{{list}}' wx:key=''>
<view class="pinglunitemleft">
<view class="leftimg">
... ... @@ -12,7 +13,7 @@
<view class="righttop">{{item.user_nickname}}</view>
<view class="rightbottom">{{item.create_time}}</view>
</view>
<view class='eidt {{item.checked?"choose":""}}' bindtap='choose' id='{{index}}' wx:if='{{edit}}'>
<view class='eidt {{item.checked?"choose":""}}' bindtap='choose' id='{{index}}' data-chooseId = '{{item.id}}' wx:if='{{edit}}'>
<image src='/img/pinglun_xz.png'></image>
</view>
</view>
... ... @@ -27,7 +28,7 @@
<view class='xinxi'>{{item.article.title}}</view>
<view class="biangjiubottom">
<view class='rightbottomimg'>
<image src='{{item.article.logo}}'></image>
<image src='{{item.article.avatar}}'></image>
</view>
<text class="niangjiutext">{{item.article.name}}</text>
</view>
... ... @@ -35,14 +36,12 @@
</view>
</view>
<view class='showall' wx:if='{{noMore&&noData}}'>已显示全部内容</view>
</view>
</view>
<view class="btnbottom" wx:if='{{edit}}'>
<view class="btnleft">一键清空</view>
<view class="btnright">删除(1)</view>
<view class="btnleft" bindtap='clearComment'>一键清空</view>
<view class="btnright" bindtap='delChoose'>删除({{delId.length||'0'}})</view>
</view>
<view class='noData' wx:if='{{!noData}}'>
暂无相关数据
</view>
\ No newline at end of file
... ...
page{
width: 100%;
height: 100%;
}
.pinglunitem {
margin: 41rpx 30rpx;
box-sizing: border-box;
... ... @@ -34,11 +38,13 @@
color: #1a1a1a;
font-size: 28rpx;
margin-top: 34rpx;
margin-bottom: 34rpx;
}
.pinglunbottom {
display: flex;
align-items: center;
padding-bottom: 40rpx;
}
.pingbottomleft {
... ... @@ -73,6 +79,7 @@
.niangjiutext {
color: #666;
font-size: 28rpx;
margin-left: 16rpx;
}
.showall {
... ... @@ -88,7 +95,11 @@
align-items: center;
justify-content: center;
position: fixed;
bottom:32rpx;
bottom:0;
left: 0;
background: #FFF;
padding-bottom: 32rpx;
padding-top: 30rpx;
}
.btnleft {
... ... @@ -146,5 +157,31 @@
display: none;
}
.eidt.choose image{
display: block
display: block;
}
.pinglunlist{
display: flex;
flex-flow: column;
height: 100%;
width: 100%;
}
.comment_list{
flex: 1;
overflow-y: auto;
padding-bottom: 32rpx;
}
.comment_list.del{
padding-bottom: 160rpx;
}
.pinglunright{
margin-left: 30rpx;
}
.pingbottomright{
height: 114rpx;
flex: 1;
background: #F7F7F7;
padding-left: 40rpx;
display: flex;
flex-direction: column;
justify-content: center;
}
\ No newline at end of file
... ...
... ... @@ -49,7 +49,7 @@
"list": []
},
"miniprogram": {
"current": 25,
"current": 29,
"list": [
{
"id": -1,
... ... @@ -230,6 +230,35 @@
"id": -1,
"name": "我的评论",
"pathName": "pages/myblock/pinglun/pinglun",
"query": "",
"scene": null
},
{
"id": -1,
"name": "我的评论",
"pathName": "pages/myblock/pinglun/pinglun",
"query": "",
"scene": null
},
{
"id": -1,
"name": "历史",
"pathName": "pages/myblock/history/history",
"query": "",
"scene": null
},
{
"id": -1,
"name": "历史品牌",
"pathName": "pages/homeblock/zhinengselect/zhinengselect",
"query": "",
"scene": null
},
{
"id": 29,
"name": "酒单",
"pathName": "pages/jiudan/jiudan",
"query": "",
"scene": null
}
]
... ...