tanyanfei 4 rokov pred
rodič
commit
40c1017045

+ 36 - 29
app.js

@@ -1,40 +1,47 @@
 //app.js
 App({
   onLaunch: function () {
-    // 展示本地存储能力
-    var logs = wx.getStorageSync('logs') || []
-    logs.unshift(Date.now())
-    wx.setStorageSync('logs', logs)
-
-    // 登录
-    wx.login({
-      success: res => {
-        // 发送 res.code 到后台换取 openId, sessionKey, unionId
-      }
-    })
-    // 获取用户信息
-    wx.getSetting({
-      success: res => {
-        if (res.authSetting['scope.userInfo']) {
-          // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
-          wx.getUserInfo({
-            success: res => {
-              // 可以将 res 发送给后台解码出 unionId
-              this.globalData.userInfo = res.userInfo
-
-              // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
-              // 所以此处加入 callback 以防止这种情况
-              if (this.userInfoReadyCallback) {
-                this.userInfoReadyCallback(res)
+    this.getOpenid();
+  },
+  getOpenid: function () {
+    var openid;
+    var _this = this;
+    wx.getStorage({
+      key: 'openid',
+      success: function (res) {
+        openid = res.data
+        _this.globalData.openid = openid
+      },
+      fail: res => {
+        // 登录
+        wx.login({
+          success: res => {
+            console.log(res)
+            // 发送 res.code 到后台换取 openId, sessionKey, unionId
+            wx.request({
+              url: 'https://test.scxjc.club/api/openid',
+              method: 'GET',
+              data: {
+                code: res.code
+              },
+              success: res => {
+                if (res.data.data.openid) {
+                  _this.globalData.openid = res.data.data.openid
+                  wx.setStorage({
+                    key: 'openid',
+                    data: res.data.data.openid,
+                  })
+                }
               }
-            }
-          })
-        }
+            })
+          }
+        })
       }
     })
   },
   globalData: {
     userInfo: null,
-    host:'https://test.scxjc.club'
+    host:'https://test.scxjc.club',
+    openid: ''
   }
 })

+ 6 - 1
app.json

@@ -1,8 +1,13 @@
 {
   "pages": [
-    "pages/actDetail/actDetail",
     "pages/knowledge/knowledge",
     "pages/index/index",
+    "pages/list/list",
+    
+    "pages/search/search",
+    "pages/actDetail/actDetail",
+    
+    "pages/jInfo/jInfo",
     "pages/eventDetail/eventDetail",
     "pages/journalDetail/journalDetail",
     "pages/learning/learning",

+ 48 - 1
app.wxss

@@ -18,7 +18,7 @@ page{
   display: block;
   height: 64rpx;
   background: #fff;
-  border-radius: 18rpx;
+  border-radius: 15rpx;
   width: 100%;
   padding: 0 24rpx;
 }
@@ -29,4 +29,51 @@ page{
   top: 0;
   bottom: 0;
   margin: auto;
+}
+
+.login{
+  position: fixed;
+  width: 100%;
+  height: 100vh;
+  z-index: 10;
+  background: rgba(0, 0, 0, .5);
+  left: 0;
+  top: 0;
+}
+.login>view{
+  width: 90%;
+  background: #fff;
+  border-radius: 4px;
+  text-align: center;
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  margin: auto;
+  height: 400rpx;
+  padding: 40rpx;
+}
+.login .xx{
+  display: block;
+  padding: 0px 20px 20px;
+}
+.login button{
+  width: 100% !important;
+  height: 80rpx;
+  color: #fff;
+  background-color: #3780CD;
+  border-radius: 18rpx;
+  padding: 0;
+  line-height: 80rpx;
+}
+image{
+  max-height: 100%;
+}
+.login image{
+  width: 300rpx;
+  max-height: 100rpx;
+}
+.xx{
+  margin: 30rpx 0 40rpx;
 }

BIN
pages/images/logo.png


+ 42 - 1
pages/index/index.js

@@ -15,13 +15,47 @@ Page({
     act:0,
     journals:[],
     organizers:[],
-    subjects:[]
+    subjects:[],
+    show:1
   },
 
 
   onLoad: function () {
+    this.setData({
+      openid: app.globalData.openid
+    })
+    wx.getStorage({
+      key: 'userInfo',
+      success: res => {
+        if (res.data) {
+          this.setData({ show: 0 })
+        }
+      },
+    })
     this.getData();
   },
+  onGotUserInfo: function (e) {
+    wx.setStorage({
+      key: 'userInfo',
+      data: e.detail.userInfo,
+    })
+    wx.request({
+      url: host + '/api/auth',
+      method: 'POST',
+      data: {
+        nickname: e.detail.userInfo.nickName,
+        avatar: e.detail.userInfo.avatarUrl,
+        openid: app.globalData.openid,
+      },
+      success: res => {
+        console.log(res)
+        app.globalData.uid=res.data.data.uid
+        this.setData({
+          show: 0
+        })
+      }
+    })
+  },
   //获取所有数据
   getData:function(){
     wx.showLoading({
@@ -35,6 +69,13 @@ Page({
           that.setData({
             lb: res.data.data.banners
           })
+      },
+      fail: function () {
+        wx.hideLoading();
+        wx.showToast({
+          title: '服务器开小差啦!',
+          icon: 'none'
+        })
       }
     })
     // 全刊

+ 29 - 46
pages/index/index.wxml

@@ -22,34 +22,6 @@
     <text bindtap="tab" data-id='3' class="{{act == 3?'active':''}}">传播指数</text>
 </view>
 
-<!-- <view class="zm">
-          <view data-id='a' bindtap="scroll">A</view>
-          <view data-id='b' bindtap="scroll">B</view>
-          <view data-id='c' bindtap="scroll">C</view>
-          <view data-id='d' bindtap="scroll">D</view>
-          <view data-id='e' bindtap="scroll">E</view>
-          <view data-id='f' bindtap="scroll">F</view>
-          <view data-id='g' bindtap="scroll">G</view>
-          <view data-id='h' bindtap="scroll">H</view>
-          <view data-id='i' bindtap="scroll">I</view>
-          <view data-id='j' bindtap="scroll">J</view>
-          <view data-id='k' bindtap="scroll">K</view>
-          <view data-id='l' bindtap="scroll">L</view>
-          <view data-id='m' bindtap="scroll">M</view>
-          <view data-id='n' bindtap="scroll">N</view>
-          <view data-id='o' bindtap="scroll">O</view>
-          <view data-id='p' bindtap="scroll">P</view>
-          <view data-id='q' bindtap="scroll">Q</view>
-          <view data-id='r' bindtap="scroll">R</view>
-          <view data-id='s' bindtap="scroll">S</view>
-          <view data-id='t' bindtap="scroll">T</view>
-          <view data-id='u' bindtap="scroll">U</view>
-          <view data-id='v' bindtap="scroll">V</view>
-          <view data-id='w' bindtap="scroll">W</view>
-          <view data-id='x' bindtap="scroll">X</view>
-          <view data-id='y' bindtap="scroll">Y</view>
-          <view data-id='z' bindtap="scroll">Z</view>                            
-</view> -->
 <view  wx:if='{{act==0}}' id='nav' class="nav {{touchmove == 1?'touchmove':''}}" bindtouchstart="touchstart" bindtouchmove="touchmove" bindtouchend="touchend">
   <view id="nav_item" wx:for="{{zimu_list}}" wx:key="" data-index="{{index}}" 
         data-id='{{item}}'      bindtap="scroll">
@@ -58,11 +30,12 @@
 </view>
 
 <swiper circular="{{true}}" style="height:60vh;" bindchange='swchange' current='{{act}}' autoplay="{{false}}">
+<!-- 全刊 -->
   <swiper-item>
     <scroll-view scroll-y="true" scroll-into-view="{{scroll}}" class="content">
         <view wx:for='{{journals}}'>
           <view id="{{item.name}}" class="tt">{{item.name}}</view>
-          <navigator url="../journalDetail/journalDetail" class="list" wx:for='{{item.journals}}' wx:key="journals{{index}}">
+          <navigator url="../journalDetail/journalDetail?id={{item.id}}" class="list" wx:for='{{item.journals}}' wx:key="journals{{index}}">
               <image  mode="widthFix" src="{{item.img}}"></image>
               <view>
                   <view class="title">{{item.name}}</view>
@@ -74,36 +47,35 @@
         </view>
     </scroll-view>
   </swiper-item>
+  <!-- 主办单位 -->
   <swiper-item>
       <scroll-view  scroll-y="true">
           <view class="dw" wx:for='{{organizers}}' wx:key="organizers{{index}}">
-              <view class="dw_title">{{item.name}}
-              <image mode="widthFix"  src="../images/left.png"></image><text>12 </text> </view>
+              <navigator class="dw_title" url="../list/list?id={{item.id}}">
+                <view>{{item.name}}</view>
+                <image mode="widthFix"  src="../images/left.png"></image><text wx:if='{{item.total_journal>0}}'>{{item.total_journal}} </text>
+               </navigator>
               <view class="dw_list">
-                    <navigator>
-                        <view>《数学学报》</view>
-                        <text>华罗庚“典型域上的多元复变数函数论”</text>
-                    </navigator>
-                    <navigator>
-                        <view>《数学学报》</view>
-                        <text>华罗庚“典型域上的多元复变数函数论”</text>
-                    </navigator>
-                    <navigator>
-                        <view>《数学学报》</view>
-                        <text>华罗庚“典型域上的多元复变数函数论”</text>
+                    <navigator wx:for='{{item.journals}}' url="../journalDetail/journalDetail?id={{item.id}}"  wx:key="*this" wx:for-item='jour'>
+                        <view>{{jour.name}}</view>
+                        <text>{{jour.desc}}</text>
                     </navigator>
-                    <view class="top cancel">取消置顶</view>
+                    <view wx:if='{{index==0}}' bindtap="cancel_top" class="top cancel">取消置顶</view>
+                    <view wx:else bindtap="top" data-id='{{item.id}}' class="top">置顶</view>
               </view>
           </view>
       </scroll-view>
   </swiper-item>
+  <!-- 领域期刊 -->
   <swiper-item>
       <scroll-view scroll-y="true">
           <view class="dw" wx:for='{{subjects}}' wx:key="*this">
-              <view class="dw_title">{{item.name}}  
-              <image mode="widthFix"  src="../images/left.png"></image><text>12 </text> </view>
+              <navigator class="dw_title" url="../list/list?id={{item.id}}"><view>{{item.name}}</view>
+              <image mode="widthFix"  src="../images/left.png"></image>
+              <text wx:if='{{item.total_journal>0}}'>{{item.total_journal}} </text> 
+              </navigator>
               <view class="dw_list">
-                    <navigator wx:for='{{item.journals}}' wx:key="*this" wx:for-item='jour'>
+                    <navigator wx:for='{{item.journals}}' url="../journalDetail/journalDetail?id={{item.id}}"  wx:key="*this" wx:for-item='jour'>
                         <view>{{jour.ename}}</view>
                         <text>{{jour.desc}}</text>
                     </navigator>
@@ -151,3 +123,14 @@
 </swiper>
 <!-- 当前选择字母提示框 -->
 <view class="hint_bok" hidden="{{hiddenn}}">{{nav_text}}</view>
+
+
+<view class="login" wx:if='{{show}}'>
+    <view>
+        <view>
+          <image src="../images/logo.png" mode="widthFix"></image>
+        </view>
+        <text class="xx">申请获取您的用户信息(头像、昵称等)</text>
+        <button bindgetuserinfo="onGotUserInfo" open-type="getUserInfo">确定</button>
+    </view>
+</view>

+ 27 - 4
pages/index/index.wxss

@@ -160,10 +160,23 @@ scroll-view{
   padding: 20rpx 30rpx;
   font-size: 32rpx;
   color: #666;
+  position: relative;
+}
+.dw_title view{
+  display: inline-block;
+  width: 90%;
+  font-size: 32rpx;
+  color: #666;
 }
 .dw_title text{
-  float: right;
+  position: absolute;
   font-size: 30rpx;
+  right: 50rpx;
+  top: 0;
+  bottom: 0;
+  margin: auto;
+  height: 44rpx;
+  /* line-height: 50rpx; */
 }
 .dw_list{
   background: #fff;
@@ -179,8 +192,15 @@ scroll-view{
   margin-bottom: 15rpx;
 }
 .dw_list text{
+  display: block;
   font-size: 26rpx;
   color: #999;
+   overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
+    white-space: normal;
 }
 .top{
   color: #666;
@@ -193,9 +213,12 @@ scroll-view{
 }
 .dw_title image{
   width: 20rpx;
-  float: right;
-  position: relative;
-  top: 12rpx;
+  height: 20rpx;
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  right: 30rpx;
+  margin: auto;
 }
 
 .thead{

+ 92 - 0
pages/jInfo/jInfo.js

@@ -0,0 +1,92 @@
+// pages/journalDetail/journalDetail.js
+const app = getApp()
+var host = app.globalData.host;
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    info: {}
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    var that = this;
+    wx.showLoading({
+      title: '加载中',
+    })
+    wx.request({
+      url: host + '/api/detail',
+      method: 'GET',
+      data: {
+        type: 'journal',
+        id: options.id
+      },
+      success: function (res) {
+        wx.hideLoading();
+        that.setData({
+          info: res.data.data
+        })
+      },
+      fail: function () {
+        wx.hideLoading();
+        wx.showToast({
+          title: '服务器开小差啦!',
+          icon: 'none'
+        })
+      }
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/jInfo/jInfo.json

@@ -0,0 +1,3 @@
+{
+ "navigationBarTitleText": "期刊简介"
+}

+ 36 - 0
pages/jInfo/jInfo.wxml

@@ -0,0 +1,36 @@
+<!--pages/journalDetail/journalDetail.wxml-->
+<view class="container" wx:if='{{info.id}}'>
+  <view class="baseinfo">
+    <view class="faceimg">
+      <image src="{{info.img}}"></image>
+    </view>
+    <view class="tweo">
+      <view class="title">{{info.name}}</view>
+      <view>微信号:{{info.wxcode}}</view>
+      <view>主编:{{info.editor}}</view>
+      <view>主办单位:{{info.publishingUnit}}</view>
+    </view>
+    <button class="gzgzh">关注公众账号</button>
+  </view>
+  <view class="intro">
+    <text>期刊简介:</text>
+    <view class="desc">
+      {{info.desc}}
+    </view>
+  </view>
+  <view class="content">
+    <view>基本信息:</view>
+    <view>中文名称:{{info.name}}</view>
+    <view>外文名称:{{info.ename}}</view>
+    <view>语种:{{info.languages}}</view>
+    <view>主编:{{info.editor}}</view>
+    <view>主管单位:{{info.corganizers}}</view>
+    <view>办刊单位:{{info.publishingUnit}}</view>
+    <view>创刊时间:{{info.publishingTime}}</view>
+    <view>出版周期:{{info.editor}}</view>
+    <view>国内刊号:{{info.issn}}</view>
+    <view>国际刊号:{{info.domestic}}</view>
+    <view>期刊官网:{{info.website}}</view>
+    <view>编辑部地址:{{info.editorialAddress}}</view>
+  </view>
+</view>

+ 69 - 0
pages/jInfo/jInfo.wxss

@@ -0,0 +1,69 @@
+/* pages/journalDetail/journalDetail.wxss */
+.container{
+  /* margin:30rpx; */
+  background: #fff;
+  border-radius: 10rpx;
+  padding:20rpx;
+}
+.baseinfo{
+  display: flex;
+  margin-bottom:30rpx;
+  position: relative;
+}
+.baseinfo .faceimg{
+  margin-right: 20rpx;
+}
+.baseinfo .faceimg image{
+  width:170rpx;
+  height: 236rpx;
+  box-shadow: 2px 2px 10rpx 1px rgba(0, 0, 0, 0.2);
+}
+
+.baseinfo .tweo view{
+  margin-bottom:24rpx;
+  font-size: 24rpx;
+  color: #999999;
+}
+.baseinfo .tweo .title{
+  font-size: 32rpx;
+  color:#333333;
+  margin-bottom:40rpx;
+  padding-right: 136rpx;
+}
+.baseinfo .gzgzh{
+  position: absolute;
+  width: 136rpx;
+  height: 48rpx;
+  background: #298EF9;
+  border-radius: 8rpx;
+  font-size:20rpx;
+  color:#ffffff;
+  right: 20rpx;
+  padding:0px;
+  line-height: 48rpx;
+}
+
+.intro text{
+  font-size: 28rpx;
+  color: #333333;
+  font-weight: 500;
+}
+.intro .desc{
+  margin-top:30rpx;
+  color: #666666;
+  line-height: 45rpx;
+}
+.content{
+  margin-top:48rpx;
+}
+.content view{
+  margin-bottom:28rpx;
+  color: #333333;
+}
+
+.more{
+  color: #298EF9;
+  display: block;
+  text-align: center;
+  margin-top: 50rpx;
+}

+ 29 - 2
pages/journalDetail/journalDetail.js

@@ -1,18 +1,45 @@
 // pages/journalDetail/journalDetail.js
+const app = getApp()
+var host = app.globalData.host;
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-
+    info:{}
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-
+    // options.id=353;
+    var that = this;
+    wx.showLoading({
+      title: '加载中',
+    })
+    wx.request({
+      url: host + '/api/detail',
+      method: 'GET',
+      data:{
+        type:'journal',
+        id: options.id
+      },
+      success: function (res) {
+        wx.hideLoading();
+        that.setData({
+          info:res.data.data
+        })
+      },
+      fail: function () {
+        wx.hideLoading();
+        wx.showToast({
+          title: '服务器开小差啦!',
+          icon:'none'
+        })
+      }
+    })
   },
 
   /**

+ 1 - 1
pages/journalDetail/journalDetail.json

@@ -1,3 +1,3 @@
 {
-  "usingComponents": {}
+  "navigationBarTitleText": "期刊详情"
 }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 50 - 22
pages/journalDetail/journalDetail.wxml


+ 78 - 1
pages/journalDetail/journalDetail.wxss

@@ -14,8 +14,9 @@
   margin-right: 20rpx;
 }
 .baseinfo .faceimg image{
-  width:180rpx;
+  width:170rpx;
   height: 236rpx;
+  box-shadow: 2px 2px 10rpx 1px rgba(0, 0, 0, 0.2);
 }
 
 .baseinfo .tweo view{
@@ -27,6 +28,7 @@
   font-size: 32rpx;
   color:#333333;
   margin-bottom:40rpx;
+  padding-right: 136rpx;
 }
 .baseinfo .gzgzh{
   position: absolute;
@@ -57,4 +59,79 @@
 .content view{
   margin-bottom:28rpx;
   color: #333333;
+}
+
+.more{
+  color: #298EF9;
+  display: block;
+  text-align: center;
+  margin-top: 50rpx;
+}
+
+
+.part{
+  background: #fff;
+  border-radius: 10rpx;
+  margin-top: 30rpx;
+  padding: 24rpx;
+}
+.title{
+  font-size: 32rpx;
+  color: #333;
+  margin-bottom: 28rpx;
+}
+.title navigator{
+  float: right;
+  color: #3780CD;
+  font-size: 26rpx;
+}
+.list{
+  display: flex;
+  border-bottom: 1px solid #F0F0F0;
+  padding: 28rpx 0;
+  
+}
+.list image{
+  width: 20%;
+  height: 160rpx;
+}
+.hd .list image{
+  width: 30%;
+  height: 140rpx;
+}
+.list>view{
+  width: 80%;
+  vertical-align: middle;
+  padding-left: 20rpx;  
+}
+.hd .list>view{
+  width: 70%;
+}
+.list .tt{
+  margin-bottom: 28rpx;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+  font-size: 26rpx;
+}
+.list text{
+  color: #999;
+  display: block;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+  font-size: 24rpx;
+}
+.list .ly{
+  font-size: 24rpx;
+  color: #333;
+  margin-bottom: 40rpx;
+}
+.hd .list .ly{
+  color: #999;
+  font-size: 24rpx;
+  margin-bottom: 30rpx;
+}
+.hd .tt{
+  margin-bottom: 16rpx;
 }

+ 21 - 2
pages/knowledge/knowledge.js

@@ -6,10 +6,12 @@ Page({
    * 页面的初始数据
    */
   data: {
-    array:['转发量','转发量','发布时间'],
+    array:['阅读量','转发量','发布时间'],
+    val: ['read_num', 'forward_num','publish_time'],
     index:0,
     act:0,
-    list:[]
+    list:[],
+    show:0
   },
 
   /**
@@ -18,15 +20,32 @@ Page({
   onLoad: function (options) {
     this.getData()
   },
+  showmenu:function(){
+    this.setData({
+      show:!this.data.show
+    })
+  },
+  check:function(e){
+    this.setData({
+      show: 0,
+      index:e.target.dataset.id
+    })
+    this.getData();
+  },
   //获取所有数据
   getData: function () {
     wx.showLoading({
       title: '加载中',
     })
     var that = this;
+    var index=this.data.index;
     wx.request({
       url: host + '/api/article/list',
       method: 'GET',
+      data:{
+        order_by:this.data.val[index],
+        keyword:''
+      },
       success: function (res) {
         wx.hideLoading();
         that.setData({

+ 11 - 6
pages/knowledge/knowledge.wxml

@@ -4,11 +4,16 @@
     <image  mode="widthFix" src="../images/search.png"></image>
 </view>
 
-<picker  bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
-      <view class="picker">
-          {{array[index]}}
-      </view>
-</picker>
+<view class="menu">
+    <view class="picker" bindtap="showmenu">
+        {{array[index]}} <text class="up"></text>
+    </view>
+    <view class="drop_menu" wx:if='{{show}}'>
+        <text wx:for='{{array}}' bindtap="check" data-id='{{index}}'>{{item}}</text>
+    </view>
+</view>
+
+
 
 <view class="tab">
     <text bindtap="tab" data-id='0' class="{{act == 0?'active':''}}">精品导读</text>
@@ -21,7 +26,7 @@
   <swiper-item>
       <scroll-view scroll-y="true" scroll-into-view="{{scroll}}" class="content">
           <navigator url="../journalDetail/journalDetail" class="list" wx:for='{{list}}' wx:key="journals{{index}}">
-              <image  mode="widthFix" src="{{item.img}}"></image>
+              <image   src="{{item.img}}"></image>
               <view>
                   <view class="title">{{item.name}}</view>
                   <view class="ly"> 

+ 43 - 9
pages/knowledge/knowledge.wxss

@@ -2,21 +2,26 @@
 .search{
   width: 70%;
   display: inline-block;
+  margin-bottom: 20rpx;
 }
-picker{
+.menu{
   width: 28%;
   background: #fff;
   display: inline-block;
   line-height: 64rpx;
-  border-radius: 18rpx;
+  border-radius: 15rpx;
   margin-left: 2%;
   vertical-align: top;
-  text-align: center;
+  position: relative;
 }
 .picker{
+  
+  text-align: center;
   color: #999;
   font-size: 26rpx;
+  
 }
+
 .tab{
   display: flex;
   /* justify-content: space-between; */
@@ -42,11 +47,11 @@ picker{
   
 }
 .list image{
-  width: 20%;
-  max-height: 100px;
+  width: 25%;
+  height: 210rpx;
 }
 .list>view{
-  width: 80%;
+  width: 75%;
   padding-left: 20rpx;
   vertical-align: middle;
 }
@@ -59,13 +64,16 @@ picker{
 .list text{
   color: #999;
   display: block;
-  text-overflow: ellipsis;
   overflow: hidden;
-  white-space: nowrap;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
+    white-space: normal;
   font-size: 26rpx;
 }
 .ly{
-  margin-bottom: 28rpx;
+  margin-bottom: 20rpx;
 }
 .ly text{
   display: block;
@@ -84,4 +92,30 @@ scroll-view{
   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;
 }

+ 84 - 0
pages/list/list.js

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

+ 3 - 0
pages/list/list.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 14 - 0
pages/list/list.wxml

@@ -0,0 +1,14 @@
+<view class="search">
+    <input placeholder-style='color:#C8C8C8;' placeholder="输入名称/关键字搜索"></input>
+    <image  mode="widthFix" src="../images/search.png"></image>
+</view>
+
+<navigator url="../journalDetail/journalDetail?id={{item.id}}" class="list" wx:for='{{list}}' wx:key="journals{{index}}">
+              <image  mode="widthFix" src="{{item.img}}"></image>
+              <view>
+                  <view class="title">{{item.name}}</view>
+                  <text>微信号:{{item.wxcode}}</text>
+                  <text>主编:{{item.editor}}</text>
+                  <text class="">主办单位:{{item.publishingUnit}}</text>
+              </view>
+</navigator>

+ 38 - 0
pages/list/list.wxss

@@ -0,0 +1,38 @@
+/* pages/list/list.wxss */
+.search input{
+  background: #fff;
+}
+
+.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: 20rpx 0;
+  background: #fff;
+}
+.list image{
+  width: 20%;
+  max-height: 100px;
+}
+.list>view{
+  width: 80%;
+  padding-left: 30rpx;
+  vertical-align: middle;
+}
+.list .title{
+  margin-bottom: 20rpx;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+}
+.list text{
+  color: #999;
+  display: block;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+  font-size: 26rpx;
+  line-height: 44rpx;
+}

+ 11 - 2
pages/mine/mine.js

@@ -5,14 +5,23 @@ Page({
    * 页面的初始数据
    */
   data: {
-
+    userinfo:{}
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-
+    wx.getStorage({
+      key: 'userInfo',
+      success: res => {
+        if (res.data) {
+          this.setData({
+            userinfo: res.data
+          })
+        }
+      },
+    })
   },
 
   /**

+ 6 - 3
pages/mine/mine.wxml

@@ -1,12 +1,15 @@
 <!--pages/mine/mine.wxml-->
-<view class="avatar">
+<view class="avatar" wx:if='{{userinfo.avatarUrl}}'>
   <view>
-    <image src="../images/avatar.jpg"></image>
+    <image src="{{userinfo.avatarUrl}}"></image>
   </view>
   <view class="nickname">
-    <text>我好我的祖国</text>
+    <text>{{userinfo.nickName}}</text>
   </view>
 </view>
+<view wx:else  style="margin:50rpx 0;"> 
+    <button bindgetuserinfo="onGotUserInfo" open-type="getUserInfo">登录</button>
+</view>
 <view class="list">
   <view class="list-item">
     <text>我的报名</text>

+ 66 - 0
pages/search/search.js

@@ -0,0 +1,66 @@
+// pages/search/search.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/search/search.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "搜索"
+}

+ 23 - 0
pages/search/search.wxml

@@ -0,0 +1,23 @@
+<view class="search">
+    <input placeholder-style='color:#C8C8C8;' placeholder="输入名称/关键字搜索"></input>
+    <image  mode="widthFix" src="../images/search.png"></image>
+</view>
+<view class="part">
+    <view class="title">搜索指定内容</view>
+    <text>主办单位</text><text>文章</text>
+    <text>学术会议</text><text>期刊</text>
+    <text>学科</text>
+</view>
+<view class="part">
+    <view class="title">搜索记录</view>
+    <navigator>高科技</navigator><navigator>物理</navigator>
+</view>
+<view class="part">
+    <view class="title">冷词</view>
+    <navigator>高科技</navigator><navigator>物理</navigator>
+</view>
+<view class="part">
+    <view class="title">热词</view>
+    <navigator>高科技</navigator><navigator>物理</navigator>
+    <navigator>高科技</navigator><navigator>物理</navigator>
+</view>

+ 35 - 0
pages/search/search.wxss

@@ -0,0 +1,35 @@
+/* pages/search/search.wxss */
+page{
+  background: #fff;
+}
+.search input{
+  background: #F1F1F1;
+  height: 80rpx;
+  border-radius: 10rpx;
+}
+.part{
+  border-top: 1px solid #F1F1F1;
+  padding: 40rpx 0;
+  display: flex;
+  justify-content: space-between;
+  flex-wrap: wrap;
+}
+.title{
+  color: #999;
+  width: 100%;
+  margin-bottom: 40rpx;
+}
+.part navigator{
+  width: 49%;
+  text-align: center;
+  margin-bottom: 40rpx;
+}
+.part navigator:nth-child(odd){
+  border-left: 1px solid #D8D8D8;
+}
+.part text{
+  width: 50%;
+  color: #3780CD;
+  margin-bottom: 40rpx;
+  text-align: center;
+}