tanyanfei 4 年之前
父節點
當前提交
cecd4f47be

+ 4 - 3
app.json

@@ -1,11 +1,12 @@
 {
   "pages": [
-    
+    "pages/knowledge/knowledge",
+    "pages/mine/mine",
     "pages/index/index",
     "pages/learning/learning",
     "pages/number/number",
-    "pages/mine/mine",
-    "pages/knowledge/knowledge",
+    
+    
     "pages/search/search",
     "pages/conference/conference",
     "pages/order/order",

+ 17 - 9
pages/actDetail/actDetail.wxss

@@ -4,41 +4,46 @@ page{
   padding: 40rpx 30rpx;
 }
 .title{
-  font-size: 32rpx;
+  font-size: 38rpx;
   text-align: center;
   margin-bottom: 30rpx;
+  font-weight: 500;
 }
 .baseinfo{
   display: flex;
   margin-bottom: 20rpx;
 }
 .faceimg{
-  width: 20%;
-  height: 180rpx;
+  width: 25%;
+  height: 220rpx;
   /* padding-right: 20rpx; */
 }
 .faceimg image{
   width: 100%;
-  /* height: 200rpx; */
+  height: 220rpx;
 }
 .tweo{
-  width: 80%;
+  width: 75%;
 }
 .tweo view{
   color: #999;
-  font-size: 26rpx;
-  padding-left: 30rpx;
-  margin-bottom: 10rpx;
+  font-size: 28rpx;
+  padding-left: 35rpx;
+  margin-bottom: 14rpx;
 }
 .intro text{
   color: #666;
   display: block;
   margin-bottom: 10rpx;
+  line-height: 56rpx;
+  letter-spacing: 3rpx;
+  font-size: 32rpx;
 }
 .intro view{
   color: #333;
   margin-bottom: 20rpx;
   font-weight: bolder;
+  font-size: 36rpx;
 }
 .content{
   line-height: 50rpx;
@@ -51,5 +56,8 @@ page{
   border-radius: 8rpx;
 }
 rich-text{
-  font-size: 28rpx;
+  font-size: 32rpx;
+  line-height: 56rpx;
+  letter-spacing: 3rpx;
+  color: #666;
 }

+ 24 - 21
pages/collect/collect.wxml

@@ -1,23 +1,26 @@
-<navigator url="../actDetail/actDetail?id={{item.id}}" class="list" wx:for='{{list}}' wx:key="journals{{index}}" wx:if='{{item.target_type== "article"}}'>
-              <image   src="{{item.img}}"></image>
-              <view>
-                  <view class="title">{{item.name}}</view>
-                  <view class="ly"> 
-                              <view>
-                                  <text>2018.5.28</text>
-                              </view>
-                              <text class="nowrap">作者:{{item.author}}</text>
-                              <text>{{}}</text> 
-                  </view>
-                  <text class="">{{item.desc}}</text>
-              </view>
-</navigator>
+<block wx:for='{{list}}'>
+  <navigator url="../actDetail/actDetail?id={{item.id}}" class="list"  wx:key="journals{{index}}" wx:if='{{item.target_type== "article"}}'>
+                <image   src="{{item.img}}"></image>
+                <view>
+                    <view class="title">{{item.name}}</view>
+                    <view class="ly"> 
+                                <view>
+                                    <text>{{item.publish_time}}</text>
+                                </view>
+                                <text class="nowrap">作者:{{item.author}}</text>
+                    </view>
+                    <text class="">{{item.desc}}</text>
+                </view>
+  </navigator>
 
-<!-- <navigator class="list" wx:for='{{list}}' wx:key="conference{{index}}">
-                      <image  mode="widthFix" src="{{item.img}}"></image>
+<navigator class="list" url="../eventDetail/eventDetail?id={{item.id}}"  wx:key="conference{{index}}" wx:if='{{item.target_type== "conference"}}'>
+                      <image  src="{{item.img}}"></image>
                       <view>
-                          <view class="tt">{{item.name}}  </view>
-                          <text class="hd_ly">来源 :地球化学研究所 <text>{{item.publish_time}}</text></text>
-                          <text>{{item.desc}}</text>
-                      </view>
-</navigator>  -->
+                    <view class="title">{{item.name}}</view>
+                        <view class="ly"> 
+                            <text>{{item.begin_time}}</text>
+                        </view>
+                        <text class="">{{item.desc}}</text>
+                    </view>
+</navigator> 
+</block>

+ 2 - 2
pages/collect/collect.wxss

@@ -68,10 +68,10 @@
   text-align: right;
 }
 .ly view text{
-  font-size: 18rpx;
+  /* font-size: 18rpx; */
 }
 .list .title{
-  margin-bottom: 20rpx;
+  margin-bottom: 10rpx;
   text-overflow: ellipsis;
   overflow: hidden;
   white-space: nowrap;

+ 1 - 1
pages/conference/conference.wxml

@@ -1,5 +1,5 @@
 <view class="{{show?'fixed':''}}">
-<image class='banner'  mode="widthFix" src="{{info.img}}"></image>
+<image class='banner'   src="{{info.img}}"></image>
 <view class='name'>{{info.name}}</view>
 <view class="info">
   <text>发布单位:{{info.publish_unit}}</text>

+ 1 - 0
pages/conference/conference.wxss

@@ -5,6 +5,7 @@ page{
 }
 .banner{
   width: 100%;
+  height: 300rpx;
   border-radius: 18rpx;
 }
 .name{

+ 37 - 0
pages/eventDetail/eventDetail.js

@@ -32,6 +32,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    // options.id=35
     if (options.apply_id){
       this.setData({
         page: 3,
@@ -134,6 +135,42 @@ Page({
     })
       .exec()
   },
+  collect: function (e) {
+    var that = this, info = this.data.info;
+    var data = {
+      type: 'conference',
+      id: this.data.info.id,
+      uid: this.data.user_id
+    }
+    if (e.target.dataset.id) {
+      data.action = 'cancel'
+    }
+    wx.request({
+      url: host + '/api/collect',
+      data: data,
+      success: function (res) {
+        if (res.data.code == 0) {
+          if (data.action) {
+            wx.showToast({
+              title: '已取消',
+              icon: 'none'
+            })
+            info.is_collected = 0
+          } else {
+            wx.showToast({
+              title: '已收藏',
+              icon: 'none'
+            })
+            info.is_collected = 1
+          }
+
+          that.setData({
+            info: info
+          })
+        }
+      }
+    })
+  },
   upload:function(){
     wx.chooseImage({
       count:0,

+ 5 - 2
pages/eventDetail/eventDetail.wxml

@@ -1,8 +1,11 @@
 <wxs src="../../utils/util.wxs" module="tools" />
 <view class="{{show?'fixed':''}}">
-<image class='banner'  mode="widthFix" src="{{info.img}}"></image>
+<image class='banner'  src="{{info.img}}"></image>
 <view class="info">
-    <view>{{info.name}}</view>
+    <view>{{info.name}}
+    <text wx:if='{{info.is_collected}}' class="collect" data-id='1' bindtap="collect">取消收藏</text>
+      <text wx:else class="collect" bindtap="collect">收藏</text>
+    </view>
     <text>主办单位:{{info.organizer_info.name}}</text>
     <text>主讲人:{{info.speaker}}</text>
     <text>时间:{{info.begin_time}}—{{info.end_time}} </text>

+ 8 - 0
pages/eventDetail/eventDetail.wxss

@@ -6,6 +6,7 @@ page{
 .banner{
   width: 100%;
   border-radius: 18rpx;
+  height: 300rpx;
 }
 .info{
   border-bottom: 1px solid #F0F0F0;
@@ -274,3 +275,10 @@ page{
   float: right;
   color: green;
 }
+.info .collect{
+  float: right;
+  background: #F2F2F2;
+  font-size: 24rpx;
+  padding:10rpx 20rpx;
+  border-radius: 8rpx;
+}

+ 1 - 1
pages/index/index.js

@@ -284,7 +284,7 @@ Page({
         if (res.data.code == 0) {
           const list = res.data.data.list;
           list.unshift({
-            name:'请选择领域',
+            name:'全部学科',
             id:''
           })
           this.setData({

+ 1 - 1
pages/jInfo/jInfo.wxss

@@ -53,7 +53,7 @@
   color: #777;
   line-height: 60rpx;
   font-size: 32rpx;
-  letter-spacing: 4rpx;
+  letter-spacing: 3rpx;
 }
 .content{
   margin-top:48rpx;

+ 2 - 2
pages/journalDetail/journalDetail.wxml

@@ -43,8 +43,8 @@
                       <image   src="{{item.img}}"></image>
                       <view>
                           <view class="tt">{{item.name}}  </view>
-                          <text class="ly">{{item.publish_time}}</text>
-                          <text>{{item.desc}}</text>
+                          <text class="ly">{{item.begin_time}}-{{item.end_time}}</text>
+                          <text class="desc">{{item.desc}}</text>
                       </view>
                   </navigator> 
               </view>

+ 14 - 6
pages/journalDetail/journalDetail.wxss

@@ -53,7 +53,7 @@
   color: #777;
   line-height: 60rpx;
   font-size: 32rpx;
-  letter-spacing: 4rpx;
+  letter-spacing: 3rpx;
 }
 .content{
   margin-top:48rpx;
@@ -99,7 +99,7 @@
 }
 .hd .list image{
   width: 30%;
-  height: 140rpx;
+  height: 160rpx;
 }
 .list>view{
   width: 80%;
@@ -110,7 +110,7 @@
   width: 70%;
 }
 .list .tt{
-  margin-bottom: 28rpx;
+  /* margin-bottom: 10rpx; */
   text-overflow: ellipsis;
   overflow: hidden;
   white-space: nowrap;
@@ -126,16 +126,16 @@
 }
 .list .ly{
   font-size: 24rpx;
-  color: #333;
+  color: #666;
   margin-bottom: 40rpx;
 }
 .hd .list .ly{
-  color: #999;
+  color: #666;
   font-size: 24rpx;
   margin-bottom: 30rpx;
 }
 .hd .tt{
-  margin-bottom: 16rpx;
+  /* margin-bottom: 16rpx; */
 }
 
 .ewm{
@@ -189,4 +189,12 @@
   display: block;
   text-align: center;
   color: #999;
+}
+.list .desc{
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
+    white-space: normal;
 }

+ 4 - 3
pages/knowledge/knowledge.wxss

@@ -56,8 +56,9 @@
   vertical-align: middle;
 }
 .list .title{
-  margin-bottom: 20rpx;
+  margin-bottom: 5rpx;
   width: 90%;
+  font-size: 30rpx;
   /* text-overflow: ellipsis;
   overflow: hidden;
   white-space: nowrap; */
@@ -81,13 +82,13 @@
   font-size: 26rpx;
 }
 .ly{
-  margin-bottom: 10rpx;
+  margin-bottom: 18rpx;
 }
 .ly text{
   display: block;
   color: #666;
   font-size: 24rpx;
-  padding: 5rpx 0;
+  padding: 3rpx 0;
 }
 .ly view{
   float: right;

+ 2 - 2
pages/learning/learning.wxml

@@ -147,7 +147,7 @@
   <swiper-item>
       <scroll-view class="content" scroll-y="true" bindscrolltolower='next_1'>
                 <navigator class="list" wx:for='{{pre}}' wx:key="pre{{index}}" url="../conference/conference?id={{item.id}}" >
-                      <image  mode="widthFix" src="{{item.img}}"></image>
+                      <image   src="{{item.img}}"></image>
                       <view>
                           <view class="tt">{{item.name}}  </view>
                           <view class="ly"> 
@@ -171,7 +171,7 @@
   <swiper-item>
       <scroll-view class="content" scroll-y="true" bindscrolltolower='next_2'>
                 <navigator class="list" wx:for='{{over}}' wx:key="over{{index}}" url="../conference/conference?id={{item.id}}" >
-                      <image  mode="widthFix" src="{{item.img}}"></image>
+                      <image   src="{{item.img}}"></image>
                       <view>
                           <view class="tt">{{item.name}}  </view>
                           <view class="ly"> 

+ 6 - 5
pages/learning/learning.wxss

@@ -8,6 +8,7 @@
   display: flex;
   justify-content: space-between;
   margin: 20rpx 0;
+  padding: 0 40rpx;
 }
 .tab text{
   font-size: 30rpx;
@@ -89,13 +90,13 @@ scroll-view{
   
 }
 .list image{
-  width: 20%;
-  height: 50px;
+  width: 25%;
+  height: 60px;
 }
 .list>view{
-  width: 80%;
-  vertical-align: middle;
-  padding-left: 20rpx;  
+  width: 75%;
+  vertical-align: top;
+  padding-left: 25rpx;  
 }
 .list .tt{
   margin-bottom: 5rpx;

+ 1 - 1
pages/list/list.wxml

@@ -5,7 +5,7 @@
 
 <block  wx:for='{{list}}' >
 <navigator wx:if='{{item.wxcode}}' url="../journalDetail/journalDetail?id={{item.id}}" class="list" wx:key="journals{{index}}">
-              <image  mode="widthFix" src="{{item.img}}"></image>
+              <image   src="{{item.img}}"></image>
               <view>
                   <view class="title">{{item.name}}</view>
                   <text>微信号:{{item.wxcode}}</text>

+ 5 - 4
pages/list/list.wxss

@@ -13,11 +13,11 @@
   background: #fff;
 }
 .list image{
-  width: 20%;
-  max-height: 100px;
+  width: 25%;
+  height: 200rpx;
 }
 .list>view{
-  width: 80%;
+  width: 75%;
   padding-left: 30rpx;
   vertical-align: middle;
 }
@@ -34,5 +34,6 @@
   overflow: hidden;
   white-space: nowrap;
   font-size: 26rpx;
-  line-height: 44rpx;
+  padding: 10rpx 0;
+  /* line-height: 44rpx; */
 }