tanyanfei 3 年 前
コミット
0a5597dd23

+ 3 - 2
app.json

@@ -1,12 +1,13 @@
 {
   "pages": [
+    
     "pages/index/index",
     "pages/search/search",
     "pages/searchList/searchList",
-    
+    "pages/wenzhang/wenzhang",
     "pages/mine/mine",
     "pages/hotel/hotel",
-    
+    "pages/huodong/huodong",
     "pages/order/order",
     "pages/eventDetail/eventDetail",
     "pages/order/hotel",

+ 115 - 0
pages/huodong/huodong.js

@@ -0,0 +1,115 @@
+// pages/huodong/huodong.js
+const app = getApp()
+var host = app.globalData.host;
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    id:''
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    this.setData({
+      id: options.id,
+      type: options.type
+    })
+    if(options.type == 'pre'){
+        wx.setNavigationBarTitle({
+          title: '活动预告',
+        })
+    }
+    this.getData()
+  },
+  getData: function () {
+    var that = this;
+    wx.showNavigationBarLoading()
+  
+    //活动预告
+    wx.request({
+      url: host + '/api/activity/list',
+      data: {
+        type: this.data.type,
+        journal_id: this.data.id
+      },
+      success: function (res) {
+        wx.hideNavigationBarLoading()
+        if (!res.data) {
+          return
+        }
+        that.setData({
+          pre: res.data.data.list
+        })
+      }
+    })
+    //活动回顾
+    // wx.request({
+    //   url: host + '/api/activity/list',
+    //   data: {
+    //     type: 'over',
+    //     order_by: order_by,
+    //     keyword: this.data.keyword
+    //   },
+    //   success: function (res) {
+    //     if (!res.data) {
+    //       return
+    //     }
+    //     that.setData({
+    //       over: res.data.data.list
+    //     })
+    //   }
+    // })
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/huodong/huodong.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "活动回顾"
+}

+ 16 - 0
pages/huodong/huodong.wxml

@@ -0,0 +1,16 @@
+<scroll-view class="content" scroll-y="true">
+                <navigator class="list" wx:for='{{pre}}' wx:key="pre{{index}}" url="../conference/conference?id={{item.id}}" >
+                      <image  mode="widthFix" src="{{item.img}}"></image>
+                      <view>
+                          <view class="tt">{{item.name}}  </view>
+                          <view class="ly"> 
+                              <view>
+                                  <text>{{item.begin_time}}</text>
+                              </view>
+                              <text>主讲人:{{item.speaker}}</text>
+                              <text>{{item.publish_unit}}</text> 
+                          </view>
+                          <text>{{item.desc}}</text>
+                      </view>
+                  </navigator> 
+</scroll-view>

+ 68 - 0
pages/huodong/huodong.wxss

@@ -0,0 +1,68 @@
+/* pages/huodong/huodong.wxss */
+.list{
+  /* box-shadow: 0px 2rpx 9rpx 0px rgba(0, 0, 0, 0.2); */
+  /* border-radius: 20rpx; */
+  display: flex;
+  /* padding: 20rpx; */
+  /* box-shadow: 0 0 15rpx 0px rgba(0, 0, 0, 0.2); */
+  /* margin: 0 20rpx 40rpx; */
+  border-bottom: 1px solid #F0F0F0;
+  padding: 28rpx 0;
+  
+}
+.list image{
+  width: 20%;
+  height: 50px;
+}
+.list>view{
+  width: 80%;
+  vertical-align: middle;
+  padding-left: 20rpx;  
+}
+.list .tt{
+  margin-bottom: 20rpx;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+  font-size: 28rpx;
+}
+.list text{
+  color: #999;
+  display: block;
+  overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
+    white-space: normal;
+    font-size: 26rpx;
+}
+.list .hd_ly{
+  margin-bottom: 40rpx;
+  color: #666;
+}
+.hd_ly text{
+  font-size: 18rpx;
+  float: right;
+  margin-top: 5rpx;
+}
+.content{
+  background: #fff;
+  border-radius: 18rpx;
+  padding: 20rpx;
+}
+.ly{
+  margin-bottom: 28rpx;
+}
+.ly text{
+  display: block;
+  color: #666;
+  font-size: 22rpx;
+}
+.ly view{
+  float: right;
+  text-align: right;
+}
+.ly view text{
+  font-size: 18rpx;
+}

+ 8 - 7
pages/journalDetail/journalDetail.wxml

@@ -21,10 +21,11 @@
   <navigator class="more" url="../jInfo/jInfo?id={{info.id}}" >查看详情</navigator>
 </view>
 
-<view class="part">
-              <view class="title">精品文章   <navigator>查看更多</navigator></view>
+<view class="part" wx:if='{{info.articles.length>0}}'>
+              <view class="title">精品文章  
+               <navigator   url='../wenzhang/wenzhang?id={{info.id}}'>查看更多</navigator></view>
               <view>
-                <navigator class="list" wx:for='{{info.articles}}' wx:key="articles{{index}}">
+                <navigator class="list" wx:for='{{info.articles}}' wx:key="articles{{index}}"  url="../actDetail/actDetail?id={{item.id}}">
                       <image   src="{{item.img}}"></image>
                       <view>
                           <view class="tt">{{item.name}}  </view>
@@ -35,8 +36,8 @@
               </view>
 </view>
 
-<view class="part">
-              <view class="title">活动回顾   <navigator>查看更多</navigator></view>
+<view class="part" wx:if='{{info.over_activitys.length>0}}'>
+              <view class="title">活动回顾   <navigator  url='../huodong/huodong?id={{info.id}}&type=over'>查看更多</navigator></view>
               <view class="hd">
                 <navigator class="list" wx:for='{{info.over_activitys}}' wx:key="over_activitys{{index}}">
                       <image   src="{{item.img}}"></image>
@@ -49,8 +50,8 @@
               </view>
 </view>
 
-<view class="part">
-              <view class="title">活动预告   <navigator>查看更多</navigator></view>
+<view class="part" wx:if='{{info.pre_activitys.length>0}}'>
+              <view class="title">活动预告   <navigator url='../huodong/huodong?id={{info.id}}&type=pre'>查看更多</navigator></view>
               <view class="hd">
                 <navigator class="list" wx:for='{{info.pre_activitys}}' wx:key="pre_activitys{{index}}">
                       <image  src="{{item.img}}"></image>

+ 0 - 1
pages/knowledge/knowledge.js

@@ -22,7 +22,6 @@ Page({
     this.getData()
   },
   search:function(e){
-    console.log(e.detail)
     this.setData({
       keyword: e.detail.value
     })

+ 1 - 1
pages/knowledge/knowledge.wxml

@@ -39,7 +39,7 @@
                   <text class="">主办单位:{{item.desc}}</text>
               </view>
           </navigator>
-    </scroll-view>
+      </scroll-view>
   </swiper-item>
 
   <swiper-item>

+ 96 - 0
pages/wenzhang/wenzhang.js

@@ -0,0 +1,96 @@
+// pages/wenzhang/wenzhang.js
+const app = getApp()
+var host = app.globalData.host;
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    keyword:'',
+    id:''
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    this.setData({
+      id:options.id
+    })
+    this.getData()
+  },
+  search: function (e) {
+    this.setData({
+      keyword: e.detail.value
+    })
+    this.getData();
+  },
+  getData: function () {
+    wx.showNavigationBarLoading()
+    var that = this;
+    wx.request({
+      url: host + '/api/article/list',
+      method: 'GET',
+      data: {
+        journal_id:this.data.id,
+        keyword: this.data.keyword
+      },
+      success: function (res) {
+        wx.hideNavigationBarLoading()
+        that.setData({
+          list: res.data.data.list
+        })
+      }
+    })
+  }, 
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/wenzhang/wenzhang.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "文章列表"
+}

+ 21 - 0
pages/wenzhang/wenzhang.wxml

@@ -0,0 +1,21 @@
+<view class="search">
+    <input bindinput="search" placeholder-style='color:#C8C8C8;' value="{{keyword}}" placeholder="输入名称/关键字搜索"></input>
+    <image bindtap="search"  mode="widthFix" src="../images/search.png"></image>
+</view>
+
+<scroll-view wx:if='{{list.length>0}}' scroll-y="true" scroll-into-view="{{scroll}}" class="content">
+          <navigator url="../actDetail/actDetail?id={{item.id}}" class="list" wx:for='{{list}}' wx:key="journals{{index}}">
+              <image   src="{{item.img}}"></image>
+              <view>
+                  <view class="title">{{item.name}}</view>
+                  <view class="ly"> 
+                              <view>
+                                  <text>2018.5.28</text>
+                              </view>
+                              <text>作者:</text>
+                              <text></text> 
+                  </view>
+                  <text class="">主办单位:{{item.desc}}</text>
+              </view>
+          </navigator>
+</scroll-view>

+ 110 - 0
pages/wenzhang/wenzhang.wxss

@@ -0,0 +1,110 @@
+/* pages/wenzhang/wenzhang.wxss */
+.search{
+  margin-bottom: 20rpx;
+}
+.menu{
+  width: 28%;
+  background: #fff;
+  display: inline-block;
+  line-height: 64rpx;
+  border-radius: 15rpx;
+  margin-left: 2%;
+  vertical-align: top;
+  position: relative;
+}
+.picker{
+  
+  text-align: center;
+  color: #999;
+  font-size: 26rpx;
+  
+}
+
+
+.list{
+  /* box-shadow: 0px 2rpx 9rpx 0px rgba(0, 0, 0, 0.2); */
+  /* border-radius: 20rpx; */
+  display: flex;
+  /* padding: 20rpx; */
+  /* box-shadow: 0 0 15rpx 0px rgba(0, 0, 0, 0.2); */
+  /* margin: 0 20rpx 40rpx; */
+  border-bottom: 1px solid #F0F0F0;
+  padding: 28rpx 0;
+  
+}
+.list image{
+  width: 25%;
+  height: 210rpx;
+}
+.list>view{
+  width: 75%;
+  padding-left: 20rpx;
+  vertical-align: middle;
+}
+.list .title{
+  margin-bottom: 20rpx;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+}
+.list text{
+  color: #999;
+  display: block;
+  overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
+    white-space: normal;
+  font-size: 26rpx;
+}
+.ly{
+  margin-bottom: 20rpx;
+}
+.ly text{
+  display: block;
+  color: #666;
+  font-size: 22rpx;
+}
+.ly view{
+  float: right;
+  text-align: right;
+}
+.ly view text{
+  font-size: 18rpx;
+}
+scroll-view{
+  background: #fff;
+  padding: 0 20rpx;
+  border-radius: 18rpx;
+  height: 100%;
+}
+.up{
+    width: 0;
+    height: 0;
+    border: 10rpx solid transparent;
+    border-top: 12rpx solid #999;
+    display: inline-block;
+    position: relative;
+    top: 3px;
+}
+
+.drop_menu{
+  background: #fff;
+  box-shadow: 2px 2px 10rpx 1px rgba(0, 0, 0, 0.2);
+  position: absolute;
+  width: 100%;
+  right: 0;
+  border-radius: 15rpx;
+  z-index: 9;
+  top: 70rpx;
+}
+.drop_menu text{
+  display: block;
+  line-height: 60rpx;
+  text-align: center;
+  color: #999;
+}
+.content{
+  height: calc(100vh - 104rpx);
+}