作者 lihongjuan
@@ -90,4 +90,5 @@ image{ @@ -90,4 +90,5 @@ image{
90 font-size: 26rpx; 90 font-size: 26rpx;
91 color: #999; 91 color: #999;
92 justify-content: center; 92 justify-content: center;
93 - }  
  93 + }
  94 +
  1 +// pages/jiudan/jiudan.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 +
  9 + },
  10 +
  11 + /**
  12 + * 生命周期函数--监听页面加载
  13 + */
  14 + onLoad: function (options) {
  15 +
  16 + },
  17 +
  18 + /**
  19 + * 生命周期函数--监听页面初次渲染完成
  20 + */
  21 + onReady: function () {
  22 +
  23 + },
  24 +
  25 + /**
  26 + * 生命周期函数--监听页面显示
  27 + */
  28 + onShow: function () {
  29 +
  30 + },
  31 +
  32 + /**
  33 + * 生命周期函数--监听页面隐藏
  34 + */
  35 + onHide: function () {
  36 +
  37 + },
  38 +
  39 + /**
  40 + * 生命周期函数--监听页面卸载
  41 + */
  42 + onUnload: function () {
  43 +
  44 + },
  45 +
  46 + /**
  47 + * 页面相关事件处理函数--监听用户下拉动作
  48 + */
  49 + onPullDownRefresh: function () {
  50 +
  51 + },
  52 +
  53 + /**
  54 + * 页面上拉触底事件的处理函数
  55 + */
  56 + onReachBottom: function () {
  57 +
  58 + },
  59 +
  60 + /**
  61 + * 用户点击右上角分享
  62 + */
  63 + onShareAppMessage: function () {
  64 +
  65 + }
  66 +})
  1 +{
  2 + "usingComponents": {},
  3 + "navigationBarTitleText": "名人酒单"
  4 +}
  1 +<view class='wine_list'>
  2 + <view class='list_item'>
  3 + <view class='img_box'>
  4 + <image src='/img/aicon_65.png'></image>
  5 + </view>
  6 + <view class='wine_title'>万丈红尘一人醉</view>
  7 + <view class='wine_name'>唐国强</view>
  8 + <view class='wine_leavel'>lv12</view>
  9 + <view class='action_box'>
  10 + <view class='single_action'>
  11 + <view class='zan_icon'>
  12 + <image src='/img/aicon_47.png' mode='widthFix'></image>
  13 + </view>
  14 + 618
  15 + </view>
  16 + <view class='single_action'>
  17 + <view class='zan_icon'>
  18 + <image src='/img/aicon_67.png' mode='widthFix'></image>
  19 + </view>
  20 + 54
  21 + </view>
  22 + <view class='single_action {{item.choose?"active":""}}' bindtap='shareAction'>
  23 + <image src='/img/gengduo.png' mode='widthFix' class='moreIcon'></image>
  24 + <view class='min_action_box'>
  25 + <view class='action_btn'>收藏</view>
  26 + <view class='action_btn'>分享</view>
  27 + </view>
  28 + </view>
  29 + </view>
  30 + </view>
  31 +
  32 +</view>
  1 +/* pages/jiudan/jiudan.wxss */
  2 +page{
  3 + background: #F2F2F2;
  4 +}
  5 +.wine_list{
  6 + display: flex;
  7 + display: -webkit-flex;
  8 + flex-wrap: wrap;
  9 + overflow-x: hidden;
  10 +}
  11 +.list_item{
  12 + width: 366rpx;
  13 + height: 400rpx;
  14 + background: #FFF;
  15 + border-radius: 5rpx;
  16 + margin-left: 6rpx;
  17 + margin-top: 6rpx;
  18 + display: flex;
  19 + flex-flow: column;
  20 + font-size: 28rpx;
  21 + align-items: center;
  22 + box-sizing: border-box;
  23 + padding-top: 40rpx;
  24 +}
  25 +.img_box{
  26 + width: 120rpx;
  27 + height: 120rpx;
  28 + border-radius: 50%;
  29 + overflow: hidden;
  30 +}
  31 +.wine_title{
  32 + color: #1A1A1A;
  33 + font-weight: 500;
  34 + margin-top: 20rpx;
  35 + line-height: 1;
  36 +}
  37 +.wine_name{
  38 + font-size: 26rpx;
  39 + color: #666;
  40 + margin-top: 10rpx;
  41 +}
  42 +.wine_leavel{
  43 + width: 68rpx;
  44 + height: 24rpx;
  45 + border: 1rpx solid #E81825;
  46 + border-radius: 12rpx;
  47 + font-size: 20rpx;
  48 + color: #E81825;
  49 + display: flex;
  50 + align-items: center;
  51 + justify-content: center;
  52 + margin-top: 14rpx;
  53 +}
  54 +.action_box{
  55 + display: flex;
  56 + justify-content: space-around;
  57 + color: #999;
  58 + width: 100%;
  59 + margin-top: 40rpx;
  60 +}
  61 +.single_action{
  62 + padding: 0 10rpx;
  63 + display: flex;
  64 + align-items: center;
  65 + position: relative;
  66 +}
  67 +.zan_icon{
  68 + width: 30rpx;
  69 + margin-right: 10rpx;
  70 +}
  71 +.moreIcon{
  72 + width: 4rpx;
  73 +}
  74 +.min_action_box{
  75 + width: 134rpx;
  76 + height: 175rpx;
  77 + position: absolute;
  78 + background-color: #FFF;
  79 + z-index: 10;
  80 + left: -140rpx;
  81 + top: 0;
  82 + font-size: 30rpx;
  83 +
  84 + flex-flow: column;
  85 + box-sizing: border-box;
  86 + padding: 10rpx 0;
  87 + justify-content: space-around;
  88 + align-items: center;
  89 + color: #1A1A1A;
  90 + border-radius: 5rpx;
  91 + box-shadow:0px 8px 16px 0px rgba(44,49,63,0.1);
  92 + display: none;
  93 +}
  94 +.action_btn{
  95 + width: 100%;
  96 + text-align: center;
  97 + position: relative;
  98 +}
  99 +.action_btn.active{
  100 + color: #E81825;
  101 +}
  102 +.action_btn button{
  103 + position: absolute;
  104 + width: 100%;
  105 + height: 100%;
  106 + top: 0;
  107 + left: 0;
  108 + opacity: 0;
  109 +}
  110 +
  111 +
  112 +.single_action.active .min_action_box{
  113 + display: flex;
  114 +}
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 </view> 32 </view>
33 <view class="xintitle">评论</view> 33 <view class="xintitle">评论</view>
34 </navigator> 34 </navigator>
35 - <navigator class="xinitem" url='/pages/myblock/pinglun/pinglun'> 35 + <navigator class="xinitem" url='/pages/myblock/history/history'>
36 <view class="history"> 36 <view class="history">
37 <image src="{{url}}aicon_81x.png"></image> 37 <image src="{{url}}aicon_81x.png"></image>
38 </view> 38 </view>
@@ -27,7 +27,7 @@ Page({ @@ -27,7 +27,7 @@ Page({
27 }) 27 })
28 }, 28 },
29 getTeach() { 29 getTeach() {
30 - let url = '/user/Center/concern_company', params = { 30 + let url = '/user/Center/concern_winemaker ', params = {
31 page: this.data.page 31 page: this.data.page
32 }; 32 };
33 app.post(url, params).then(r => { 33 app.post(url, params).then(r => {
  1 +// pages/myblock/pinglun/pinglun.js
  2 +const app = getApp();
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + page: 1,
  10 + list: [],
  11 + noData: true,
  12 + noMore: !1,
  13 + edit: !1,
  14 + delId: [],
  15 + tabList: [{
  16 + name: '品牌',
  17 + url: 'history_brand'
  18 + }, {
  19 + name: '酒品',
  20 + url: 'history_wine'
  21 + }, {
  22 + name: '酒企',
  23 + url: 'history_company'
  24 + }, {
  25 + name: '酒单',
  26 + url: 'history_rec'
  27 + }, {
  28 + name: '专家品酒',
  29 + url: 'history_expert'
  30 + }, {
  31 + name: '酿酒师',
  32 + url: 'history_master'
  33 + }, {
  34 + name: '其他文章',
  35 + url: 'history_article'
  36 + }],
  37 + selectindex:0,
  38 + current:'history_brand'
  39 + },
  40 +
  41 + /**
  42 + * 生命周期函数--监听页面加载
  43 + */
  44 + onLoad: function (options) {
  45 + this.getList();
  46 + let that = this;
  47 + wx.getSystemInfo({
  48 + success: function (t) {
  49 + that.setData({
  50 + scrollHeight: t.windowHeight - 50,
  51 + windowWidth: t.windowWidth
  52 + });
  53 + }
  54 + });
  55 + },
  56 + shareAction(e){
  57 + let index = e.currentTarget.id;
  58 + index!=this.data.tempIndex?this.closeShareAction():'';
  59 + this.data.list[index].show = !this.data.list[index].show;
  60 + this.setData({
  61 + list: this.data.list,
  62 + tempIndex: index
  63 + })
  64 + },
  65 + closeShareAction(){
  66 + if(this.data.tempIndex){
  67 + let show = this.data.list[this.data.tempIndex].show;
  68 + if (show) {
  69 + this.data.list[this.data.tempIndex].show = false;
  70 + this.setData({
  71 + list: this.data.list
  72 + })
  73 + }
  74 + }
  75 +
  76 + },
  77 + tabCharge(e) {
  78 + let s = this, singleWidth = s.data.windowWidth / 6, cur = e.currentTarget.dataset.index + 1, current = e.currentTarget.dataset.current;
  79 + s.setData({
  80 + selectindex: e.currentTarget.dataset.index,
  81 + page: 1,
  82 + current: current,
  83 + navScrollLeft: (cur - 2) * singleWidth
  84 + })
  85 + this.getList();
  86 + },
  87 +
  88 + getList() {
  89 + let url = 'user/Center/'+this.data.current, params = {
  90 + page: this.data.page
  91 + };
  92 + app.post(url, params).then(r => {
  93 + var list = this.data.page == 1 ? r.list : this.data.list.concat(r.list);
  94 + this.setData({
  95 + list: list,
  96 + totalPage: r.total_page,
  97 + noData: list.length > 0 ? true : false,
  98 + noMore: r.totalPage == r.page ? !0 : !1
  99 + })
  100 + })
  101 + },
  102 + /**
  103 + * 生命周期函数--监听页面初次渲染完成
  104 + */
  105 + onReady: function () {
  106 +
  107 + },
  108 +
  109 + /**
  110 + * 生命周期函数--监听页面显示
  111 + */
  112 + onShow: function () {
  113 +
  114 + },
  115 +
  116 + /**
  117 + * 生命周期函数--监听页面隐藏
  118 + */
  119 + onHide: function () {
  120 +
  121 + },
  122 +
  123 + /**
  124 + * 生命周期函数--监听页面卸载
  125 + */
  126 + onUnload: function () {
  127 +
  128 + },
  129 +
  130 + /**
  131 + * 页面相关事件处理函数--监听用户下拉动作
  132 + */
  133 + onPullDownRefresh: function () {
  134 +
  135 + },
  136 +
  137 + /**
  138 + * 页面上拉触底事件的处理函数
  139 + */
  140 + onReachBottom: function () {
  141 +
  142 + },
  143 +
  144 + /**
  145 + * 用户点击右上角分享
  146 + */
  147 + onShareAppMessage: function () {
  148 +
  149 + }
  150 +})
  1 +{
  2 + "usingComponents": {},
  3 + "navigationBarTitleText": "历史"
  4 +}
  1 +<view class="pinglunlist">
  2 + <view class='top_tab'>
  3 + <scroll-view class='tab_box' scroll-left="{{navScrollLeft}}" scroll-x='true' scroll-with-animation='true'>
  4 + <block wx:for="{{tabList}}" wx:key=''>
  5 + <view class="tab_item {{selectindex == index?'active':''}}" data-current='{{item.url}}' bindtap='tabCharge' data-index='{{index}}' data-beau="0">{{item.name}}</view>
  6 + </block>
  7 + </scroll-view>
  8 + </view>
  9 + <view class='comment_list'>
  10 + <!-- <view class="pinglunitem" wx:for='{{list}}' wx:key=''>
  11 + <view class="pinglunitemleft">
  12 + <view class="leftimg">
  13 + <image src="{{item.avatar}}"></image>
  14 + </view>
  15 + <view class="pinglunright">
  16 + <view class="righttop">{{item.user_nickname}}</view>
  17 + <view class="rightbottom">{{item.create_time}}</view>
  18 + </view>
  19 + <view class='eidt {{item.checked?"choose":""}}' bindtap='choose' id='{{index}}' data-chooseId='{{item.id}}' wx:if='{{edit}}'>
  20 + <image src='/img/pinglun_xz.png'></image>
  21 + </view>
  22 + </view>
  23 + <view class="pinglunmiddle">
  24 + {{item.content}}
  25 + </view>
  26 + <view class="pinglunbottom">
  27 + <view class="pingbottomleft">
  28 + <image src="{{item.article.thumb}}"></image>
  29 + </view>
  30 + <view class='pingbottomright'>
  31 + <view class='xinxi'>{{item.article.title}}</view>
  32 + <view class="biangjiubottom">
  33 + <view class='rightbottomimg'>
  34 + <image src='{{item.article.avatar}}'></image>
  35 + </view>
  36 + <text class="niangjiutext">{{item.article.name}}</text>
  37 + </view>
  38 + </view>
  39 + </view>
  40 + </view> -->
  41 + <view class="zhinengbox" wx:if='{{selectindex==0}}'>
  42 + <view class="searchitem" wx:for='{{list}}' wx:key=''>
  43 + <view class="searchitemleft">
  44 + <view class="itemleftimg">
  45 + <image src="{{item.logo}}" mode='widthFix'></image>
  46 + </view>
  47 + <view class="itemiddle">
  48 + <view class="itemidelename">{{item.name}}</view>
  49 + <view class="nambottom">
  50 + <text class="namebottomitem">{{item.sort_name}}</text>
  51 + <text class="namebottomitem">{{item.country}}</text>
  52 + <text class="namebottomitem">{{item.city}}</text>
  53 + <text class="namebottomitem">{{item.odor_name}}</text>
  54 + </view>
  55 + </view>
  56 + </view>
  57 +
  58 + <view class="starimg">
  59 + <!-- aicon_010x.png -->
  60 + <image src="{{item.is_favorite==0?'/img/aicon_09.png':'/img/aicon_10.png'}}"></image>
  61 + </view>
  62 +
  63 + </view>
  64 + </view>
  65 + <view class="zhinengbox winebrand" wx:if='{{selectindex==1}}'>
  66 + <view class="searchitem" wx:for='{{list}}' wx:key=''>
  67 + <view class="searchitemleft">
  68 + <view class="itemleftimg">
  69 + <image src="{{item.logo}}"></image>
  70 + </view>
  71 + <view class="itemiddle">
  72 + <view class="itemidelename">{{item.name}}</view>
  73 + <view class="nambottom">
  74 + <text class="namebottomitem">{{item.degree_name}}</text>
  75 + <text class="namebottomitem">{{item.odor_name}}</text>
  76 + <text class="namebottomitem">{{item.price}}</text>
  77 + <text class="namebottomitem">{{item.ml}}</text>
  78 + </view>
  79 + </view>
  80 + </view>
  81 + <view class="starimg">
  82 + <!-- aicon_010x.png -->
  83 + <image src="{{item.is_favorite==0?'/img/aicon_09.png':'/img/aicon_10.png'}}"></image>
  84 + </view>
  85 + </view>
  86 + </view>
  87 + <!-- 酒企 -->
  88 + <view class="zhinengbox winebrand" wx:if='{{selectindex==2}}'>
  89 + <view class="searchitem" wx:for='{{list}}' wx:key=''>
  90 + <view class="searchitemleft">
  91 + <view class="itemleftimg">
  92 + <image src="{{item.logo}}"></image>
  93 + </view>
  94 + <view class="itemiddle">
  95 + <view class="itemidelename">{{item.name}}</view>
  96 + <view class="nambottom">
  97 + <text class="namebottomitem">{{item.country}}</text>
  98 + <text class="namebottomitem">{{item.city}}</text>
  99 + <text class="namebottomitem">{{item.sort_name}}</text>
  100 + <text class="namebottomitem">{{item.concern_count}}</text>
  101 + </view>
  102 + </view>
  103 + </view>
  104 + <!-- <view class="starimg"> -->
  105 + <!-- aicon_010x.png -->
  106 + <!-- <image src="{{item.is_favorite==0?'/img/aicon_09.png':'/img/aicon_10.png'}}"></image> -->
  107 + <view class='focus_btn {{item.is_concern==0?"":"active"}}'>
  108 + 已关注
  109 + </view>
  110 + <!-- </view> -->
  111 + </view>
  112 + </view>
  113 +
  114 + <view class='wine_list' wx:if='{{selectindex==3}}' bindtap='closeShareAction'>
  115 + <view class='list_item' wx:for='{{list}}' wx:key=''>
  116 + <view class='img_box'>
  117 + <image src='{{item.thumb}}' mode='widthFix'></image>
  118 + </view>
  119 + <view class='wine_title'>{{item.title}}</view>
  120 + <view class='wine_name'>{{item.user_nickname}}</view>
  121 + <view class='wine_leavel'>lv{{item.level}}</view>
  122 + <view class='action_box'>
  123 + <view class='single_action'>
  124 + <view class='zan_icon'>
  125 + <image src='{{!item.is_good?"/img/aicon_47.png":"/img/aicon_46.png"}}' mode='widthFix'></image>
  126 + </view>
  127 + {{item.good_count}}
  128 + </view>
  129 + <view class='single_action'>
  130 + <view class='zan_icon'>
  131 + <image src='/img/aicon_67.png' mode='widthFix'></image>
  132 + </view>
  133 + {{item.comment_count}}
  134 + </view>
  135 + <view class='single_action {{item.show?"active":""}}' catchtap='shareAction' id='{{index}}'>
  136 + <image src='/img/gengduo.png' mode='widthFix' class='moreIcon'></image>
  137 + <view class='min_action_box'>
  138 + <view class='action_btn {{item.is_favorite?"active":""}}'>{{!item.is_favorite?"收藏":"已收藏"}}</view>
  139 + <view class='action_btn'>分享 <button open-type='share'></button></view>
  140 + </view>
  141 + </view>
  142 + </view>
  143 + </view>
  144 + <!-- <view class='list_item'>
  145 + <view class='img_box'>
  146 + <image src='/img/aicon_65.png'></image>
  147 + </view>
  148 + <view class='wine_title'>万丈红尘一人醉</view>
  149 + <view class='wine_name'>唐国强</view>
  150 + <view class='wine_leavel'>lv12</view>
  151 + <view class='action_box'>
  152 + <view class='single_action'>
  153 + <view class='zan_icon'>
  154 + <image src='/img/aicon_47.png' mode='widthFix'></image>
  155 + </view>
  156 + 618
  157 + </view>
  158 + <view class='single_action'>
  159 + <view class='zan_icon'>
  160 + <image src='/img/aicon_67.png' mode='widthFix'></image>
  161 + </view>
  162 + 54
  163 + </view>
  164 + <view class='single_action'>
  165 + <image src='/img/gengduo.png' mode='widthFix' class='more'></image>
  166 +
  167 + </view>
  168 + </view>
  169 + </view> -->
  170 + </view>
  171 + <view class='showall' wx:if='{{noMore&&noData}}'>已显示全部内容</view>
  172 + </view>
  173 +</view>
  174 +
  175 +<view class='noData' wx:if='{{!noData}}'>
  176 + 暂无相关数据
  177 +</view>
  1 +@import '../../homeblock/zhinengselect/zhinengselect.wxss';
  2 +@import '../../jiudan/jiudan.wxss';
  3 +
  4 +page{
  5 + width: 100%;
  6 + height: 100%;
  7 +}
  8 +.pinglunitem {
  9 + margin: 41rpx 30rpx;
  10 + box-sizing: border-box;
  11 + border-bottom: 1rpx solid #f5f5f5;
  12 +}
  13 +
  14 +.pinglunitemleft {
  15 + display: flex;
  16 + align-items: center;
  17 +}
  18 +
  19 +.leftimg {
  20 + width: 60rpx;
  21 + height: 60rpx;
  22 + font-size: 0;
  23 + border-radius: 50%;
  24 +}
  25 +
  26 +.leftimg image {
  27 + border-radius: 50%;
  28 +}
  29 +
  30 +.righttop {
  31 + color: #666;
  32 + font-size: 28rpx;
  33 +}
  34 +
  35 +.rightbottom {
  36 + color: #999;
  37 + font-size: 24rpx;
  38 +}
  39 +
  40 +.pinglunmiddle {
  41 + color: #1a1a1a;
  42 + font-size: 28rpx;
  43 + margin-top: 34rpx;
  44 + margin-bottom: 34rpx;
  45 +}
  46 +
  47 +.pinglunbottom {
  48 + display: flex;
  49 + align-items: center;
  50 + padding-bottom: 40rpx;
  51 +}
  52 +
  53 +.pingbottomleft {
  54 + width: 260rpx;
  55 + height: 114rpx;
  56 + font-size: 0;
  57 +}
  58 +
  59 +.xinxi {
  60 + color: #1a1a1a;
  61 + font-size: 26rpx;
  62 + font-weight: bold;
  63 +}
  64 +
  65 +.rightbottomimg {
  66 + width: 36rpx;
  67 + height: 36rpx;
  68 + font-size: 0;
  69 + border-radius: 50%;
  70 +}
  71 +
  72 +.biangjiubottom {
  73 + display: flex;
  74 + align-items: center;
  75 + margin-top: 15rpx;
  76 +}
  77 +
  78 +.rightbottomimg image {
  79 + border-radius: 50%;
  80 +}
  81 +
  82 +.niangjiutext {
  83 + color: #666;
  84 + font-size: 28rpx;
  85 + margin-left: 16rpx;
  86 +}
  87 +
  88 +.showall {
  89 + color: #999;
  90 + font-size: 24rpx;
  91 + margin-top: 23rpx;
  92 + text-align: center;
  93 +}
  94 +
  95 +.btnbottom {
  96 + width:750rpx;
  97 + display: flex;
  98 + align-items: center;
  99 + justify-content: center;
  100 + position: fixed;
  101 + bottom:0;
  102 + left: 0;
  103 + background: #FFF;
  104 + padding-bottom: 32rpx;
  105 + padding-top: 30rpx;
  106 +}
  107 +
  108 +.btnleft {
  109 + width: 300rpx;
  110 + height: 80rpx;
  111 + border: 1px solid rgba(232, 24, 37, 1);
  112 + border-radius: 40rpx;
  113 + color: #e81825;
  114 + font-size: 28rpx;
  115 + text-align: center;
  116 + line-height: 80rpx;
  117 +}
  118 +
  119 +.btnright {
  120 + width: 300rpx;
  121 + height: 80rpx;
  122 + background: rgba(232, 24, 37, 1);
  123 + border-radius: 40rpx;
  124 + color:#fff;
  125 + font-size: 28rpx;
  126 + text-align: center;
  127 + line-height: 80rpx;
  128 + margin-left:55rpx;
  129 +}
  130 +.top_eidt{
  131 + display: flex;
  132 + align-items: center;
  133 + justify-content: center;
  134 + position: relative;
  135 + height: 88rpx;
  136 + border-bottom: 2rpx solid #f5f5f5;
  137 + border-top:2rpx solid #f5f5f5;
  138 + font-size: 26rpx;
  139 +}
  140 +
  141 +.action{
  142 + position: absolute;
  143 + top: 50%;
  144 + right: 40rpx;
  145 + transform: translateY(-50%);
  146 + color: #999;
  147 +}
  148 +.eidt{
  149 + border: 1rpx solid #999;
  150 + width: 36rpx;
  151 + height: 36rpx;
  152 + border-radius: 50%;
  153 + margin-left: auto;
  154 + -webkit-margin-start: auto;
  155 + display: flex;
  156 + align-items: center;
  157 + justify-content: center;
  158 +}
  159 +.eidt image{
  160 + display: none;
  161 +}
  162 +.eidt.choose image{
  163 + display: block;
  164 +}
  165 +.pinglunlist{
  166 + display: flex;
  167 + flex-flow: column;
  168 + height: 100%;
  169 + width: 100%;
  170 +}
  171 +.comment_list{
  172 + flex: 1;
  173 + overflow-y: auto;
  174 + padding-bottom: 32rpx;
  175 +}
  176 +.comment_list.del{
  177 + padding-bottom: 160rpx;
  178 +}
  179 +.pinglunright{
  180 + margin-left: 30rpx;
  181 +}
  182 +.pingbottomright{
  183 + height: 114rpx;
  184 + flex: 1;
  185 + background: #F7F7F7;
  186 + padding-left: 40rpx;
  187 + display: flex;
  188 + flex-direction: column;
  189 + justify-content: center;
  190 +}
  191 +.tab_box {
  192 + width: 100%;
  193 + height: 80rpx;
  194 + white-space: nowrap;
  195 + overflow: hidden;
  196 + line-height: 80rpx;
  197 + display:flex;
  198 + padding-left: 10rpx
  199 +}
  200 +.tab_item {
  201 + font-size: 26rpx;
  202 + color: #999;
  203 + display: inline-block;
  204 + position: relative;
  205 + padding: 0 35rpx;
  206 + height: 100%;
  207 + text-align: center;
  208 +}
  209 +
  210 +.tab_item.active {
  211 + color: #E81825;
  212 +}
  213 +
  214 +.tab_item.active::after {
  215 + content: "";
  216 + width: 62rpx;
  217 + height: 4rpx;
  218 + background: #169bd5;
  219 + position: absolute;
  220 + bottom: -30rpx;
  221 + left: 50%;
  222 + transform: translateX(-50%);
  223 +}
  224 +.top_tab{
  225 + border-top: 1rpx solid #ebebeb;
  226 + border-bottom: 1rpx solid #ebebeb;
  227 +}
  228 +.focus_btn{
  229 + display: inline-block;
  230 + font-size: 26rpx;
  231 + padding: 8rpx;
  232 + color: #999;
  233 + background-color: #ebebeb;
  234 +}
  235 +.focus_btn.active{
  236 + background: #E81825;
  237 + color: #FFF;
  238 +}
  239 +.img_box{
  240 + overflow: auto;
  241 + border-radius: 0;
  242 +}
  243 +.shareAction .more{
  244 + margin-right: 0!important;
  245 +}
@@ -10,7 +10,9 @@ Page({ @@ -10,7 +10,9 @@ Page({
10 list:[], 10 list:[],
11 noData: true, 11 noData: true,
12 noMore:!1, 12 noMore:!1,
13 - edit:!1 13 + edit:!1,
  14 + delId:[],
  15 +
14 }, 16 },
15 17
16 /** 18 /**
@@ -20,11 +22,20 @@ Page({ @@ -20,11 +22,20 @@ Page({
20 this.getList(); 22 this.getList();
21 }, 23 },
22 edit(){ 24 edit(){
23 - console.log(11)  
24 this.setData({ 25 this.setData({
25 edit:!this.data.edit 26 edit:!this.data.edit
26 }) 27 })
27 }, 28 },
  29 + choose(e){
  30 + console.log(e)
  31 + let checked = this.data.list[e.currentTarget.id].checked, id = e.currentTarget.dataset.chooseid,start;
  32 + this.data.list[e.currentTarget.id].checked = !this.data.list[e.currentTarget.id].checked;
  33 + checked ? (start = this.data.delId.indexOf(id), this.data.delId.splice(start, 1)) : this.data.delId.push(id);
  34 + this.setData({
  35 + list: this.data.list,
  36 + delId: this.data.delId
  37 + })
  38 + },
28 getList(){ 39 getList(){
29 let url = 'user/Center/my_comment', params = { 40 let url = 'user/Center/my_comment', params = {
30 page: this.data.page 41 page: this.data.page
@@ -39,6 +50,51 @@ Page({ @@ -39,6 +50,51 @@ Page({
39 }) 50 })
40 }) 51 })
41 }, 52 },
  53 + clearComment(){
  54 + let delId = [],that = this;
  55 + this.data.list.forEach(el=>{
  56 + delId.push(el.id)
  57 + });
  58 + wx.showModal({
  59 + title: '提示',
  60 + content: '确认清空所有评论?',
  61 + success: function(res){
  62 + if(res.confirm){
  63 + that.delComent(delId)
  64 + }
  65 + }
  66 + })
  67 +
  68 + },
  69 + delChoose(){
  70 + let that = this;
  71 + wx.showModal({
  72 + title: '提示',
  73 + content: '确认删除这些选择项',
  74 + success: function (res) {
  75 + if (res.confirm) {
  76 + that.delComent(that.data.delId)
  77 + }
  78 + }
  79 + })
  80 + },
  81 + delComent(obj){
  82 + let t = this, url = 'index/Common/comment_delete ',params={
  83 + ids:obj
  84 + };
  85 + app.post(url,params).then(r=>{
  86 + wx.showToast({
  87 + title: '删除成功',
  88 + icon:'none',
  89 + duration: 1300
  90 + })
  91 + this.setData({
  92 + edit: false,
  93 + page: 1
  94 + })
  95 + this.getList();
  96 + })
  97 + },
42 98
43 /** 99 /**
44 * 生命周期函数--监听页面初次渲染完成 100 * 生命周期函数--监听页面初次渲染完成
1 -<view class="pinglunlist" hidden='{{noData}}'> 1 +<view class="pinglunlist" hidden='{{!noData}}'>
2 <view class='top_eidt'> 2 <view class='top_eidt'>
3 我的评论 3 我的评论
4 <text class='action' bindtap='edit'>{{edit?'取消':'编辑'}}</text> 4 <text class='action' bindtap='edit'>{{edit?'取消':'编辑'}}</text>
5 </view> 5 </view>
6 - <view class="pinglunitem" wx:for='{{list}}' wx:key=''>  
7 - <view class="pinglunitemleft">  
8 - <view class="leftimg">  
9 - <image src="{{item.avatar}}"></image>  
10 - </view>  
11 - <view class="pinglunright">  
12 - <view class="righttop">{{item.user_nickname}}</view>  
13 - <view class="rightbottom">{{item.create_time}}</view>  
14 - </view>  
15 - <view class='eidt {{item.checked?"choose":""}}' bindtap='choose' id='{{index}}' wx:if='{{edit}}'>  
16 - <image src='/img/pinglun_xz.png'></image> 6 + <view class='comment_list {{edit?"del":""}}'>
  7 + <view class="pinglunitem" wx:for='{{list}}' wx:key=''>
  8 + <view class="pinglunitemleft">
  9 + <view class="leftimg">
  10 + <image src="{{item.avatar}}"></image>
  11 + </view>
  12 + <view class="pinglunright">
  13 + <view class="righttop">{{item.user_nickname}}</view>
  14 + <view class="rightbottom">{{item.create_time}}</view>
  15 + </view>
  16 + <view class='eidt {{item.checked?"choose":""}}' bindtap='choose' id='{{index}}' data-chooseId = '{{item.id}}' wx:if='{{edit}}'>
  17 + <image src='/img/pinglun_xz.png'></image>
  18 + </view>
17 </view> 19 </view>
18 - </view>  
19 - <view class="pinglunmiddle">  
20 - {{item.content}}  
21 - </view>  
22 - <view class="pinglunbottom">  
23 - <view class="pingbottomleft">  
24 - <image src="{{item.article.thumb}}"></image> 20 + <view class="pinglunmiddle">
  21 + {{item.content}}
25 </view> 22 </view>
26 - <view class='pingbottomright'>  
27 - <view class='xinxi'>{{item.article.title}}</view>  
28 - <view class="biangjiubottom">  
29 - <view class='rightbottomimg'>  
30 - <image src='{{item.article.logo}}'></image> 23 + <view class="pinglunbottom">
  24 + <view class="pingbottomleft">
  25 + <image src="{{item.article.thumb}}"></image>
  26 + </view>
  27 + <view class='pingbottomright'>
  28 + <view class='xinxi'>{{item.article.title}}</view>
  29 + <view class="biangjiubottom">
  30 + <view class='rightbottomimg'>
  31 + <image src='{{item.article.avatar}}'></image>
  32 + </view>
  33 + <text class="niangjiutext">{{item.article.name}}</text>
31 </view> 34 </view>
32 - <text class="niangjiutext">{{item.article.name}}</text>  
33 </view> 35 </view>
34 </view> 36 </view>
35 </view> 37 </view>
  38 + <view class='showall' wx:if='{{noMore&&noData}}'>已显示全部内容</view>
36 </view> 39 </view>
37 - <view class='showall' wx:if='{{noMore&&noData}}'>已显示全部内容</view>  
38 </view> 40 </view>
39 -  
40 -  
41 <view class="btnbottom" wx:if='{{edit}}'> 41 <view class="btnbottom" wx:if='{{edit}}'>
42 - <view class="btnleft">一键清空</view>  
43 - <view class="btnright">删除(1)</view> 42 + <view class="btnleft" bindtap='clearComment'>一键清空</view>
  43 + <view class="btnright" bindtap='delChoose'>删除({{delId.length||'0'}})</view>
44 </view> 44 </view>
45 -  
46 <view class='noData' wx:if='{{!noData}}'> 45 <view class='noData' wx:if='{{!noData}}'>
47 暂无相关数据 46 暂无相关数据
48 </view> 47 </view>
  1 +page{
  2 + width: 100%;
  3 + height: 100%;
  4 +}
1 .pinglunitem { 5 .pinglunitem {
2 margin: 41rpx 30rpx; 6 margin: 41rpx 30rpx;
3 box-sizing: border-box; 7 box-sizing: border-box;
@@ -34,11 +38,13 @@ @@ -34,11 +38,13 @@
34 color: #1a1a1a; 38 color: #1a1a1a;
35 font-size: 28rpx; 39 font-size: 28rpx;
36 margin-top: 34rpx; 40 margin-top: 34rpx;
  41 + margin-bottom: 34rpx;
37 } 42 }
38 43
39 .pinglunbottom { 44 .pinglunbottom {
40 display: flex; 45 display: flex;
41 align-items: center; 46 align-items: center;
  47 + padding-bottom: 40rpx;
42 } 48 }
43 49
44 .pingbottomleft { 50 .pingbottomleft {
@@ -73,6 +79,7 @@ @@ -73,6 +79,7 @@
73 .niangjiutext { 79 .niangjiutext {
74 color: #666; 80 color: #666;
75 font-size: 28rpx; 81 font-size: 28rpx;
  82 + margin-left: 16rpx;
76 } 83 }
77 84
78 .showall { 85 .showall {
@@ -88,7 +95,11 @@ @@ -88,7 +95,11 @@
88 align-items: center; 95 align-items: center;
89 justify-content: center; 96 justify-content: center;
90 position: fixed; 97 position: fixed;
91 - bottom:32rpx; 98 + bottom:0;
  99 + left: 0;
  100 + background: #FFF;
  101 + padding-bottom: 32rpx;
  102 + padding-top: 30rpx;
92 } 103 }
93 104
94 .btnleft { 105 .btnleft {
@@ -146,5 +157,31 @@ @@ -146,5 +157,31 @@
146 display: none; 157 display: none;
147 } 158 }
148 .eidt.choose image{ 159 .eidt.choose image{
149 - display: block  
150 -}  
  160 + display: block;
  161 +}
  162 +.pinglunlist{
  163 + display: flex;
  164 + flex-flow: column;
  165 + height: 100%;
  166 + width: 100%;
  167 +}
  168 +.comment_list{
  169 + flex: 1;
  170 + overflow-y: auto;
  171 + padding-bottom: 32rpx;
  172 +}
  173 +.comment_list.del{
  174 + padding-bottom: 160rpx;
  175 +}
  176 +.pinglunright{
  177 + margin-left: 30rpx;
  178 +}
  179 +.pingbottomright{
  180 + height: 114rpx;
  181 + flex: 1;
  182 + background: #F7F7F7;
  183 + padding-left: 40rpx;
  184 + display: flex;
  185 + flex-direction: column;
  186 + justify-content: center;
  187 +}