tanyanfei 4 years ago
parent
commit
ec2fb70f76
5 changed files with 40 additions and 10 deletions
  1. 14 2
      pages/message/message.js
  2. 3 8
      pages/message/message.wxml
  3. 6 0
      pages/plan/plan.wxss
  4. 1 0
      pages/post/post.js
  5. 16 0
      pages/upload/upload.js

+ 14 - 2
pages/message/message.js

@@ -1,4 +1,6 @@
 // pages/message/message.js
+const app = getApp()
+const host = app.globalData.host;
 Page({
 
   /**
@@ -12,9 +14,19 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-
+    this.getData()
+  },  
+  getData:function(){
+    wx.request({
+      url: host+'/api/wx/notice',
+      success:res=>{
+        console.log(res.data)
+        this.setData({
+          list:res.data.data
+        })
+      }
+    })
   },
-
   /**
    * 生命周期函数--监听页面初次渲染完成
    */

+ 3 - 8
pages/message/message.wxml

@@ -1,11 +1,6 @@
 <view class="content">
-    <navigator url="../showMsg/showMsg" class="list">
-        <view>报名信息审核通过</view>
-        <text>你的报名信息已经审核通过,请尽快去缴费…</text>
-    </navigator>
-
-    <navigator class="list">
-        <view>报名信息审核通过</view>
-        <text>你的报名信息已经审核通过,请尽快去缴费…</text>
+    <navigator wx:for="{{list}}" class="list">
+        <view>{{item.title}}</view>
+        <text>{{item.content}}</text>
     </navigator>
 </view>

+ 6 - 0
pages/plan/plan.wxss

@@ -7,6 +7,11 @@ page{
   justify-content: space-between;
   padding: 12px;
   background: #fff;
+  position: fixed;
+  left: 0;
+  top: 0;
+  z-index: 99;
+  width: 100%;
 }
 .section picker{
   width: 33%;
@@ -30,6 +35,7 @@ page{
 
 .content{
   padding: 12px;
+  padding-top: 60px;
 }
 .list{
   background: #fff;

+ 1 - 0
pages/post/post.js

@@ -39,6 +39,7 @@ Page({
       type: options.type
     })
     var sub_list=[],user={}
+    //获取用户信息
     wx.request({
       url: host + '/api/wx/authinfo',
       header: {

+ 16 - 0
pages/upload/upload.js

@@ -34,6 +34,22 @@ Page({
           halfbody_img: res.data.data.halfbody_img, //半身照
           education_img: res.data.data.education_img, //学历照
         })
+        if (!res.data.data.idnoimg_face){
+          wx.request({
+            url: host + '/api/wx/authinfo',
+            header: {
+              openid: app.globalData.openid
+            },
+            success: res => {
+              this.setData({
+                idnoimg_face: res.data.data.idnoimg_face, //正面照
+                idnoimg_back: res.data.data.idnoimg_back, //反面照
+                halfbody_img: res.data.data.halfbody_img, //半身照
+                education_img: res.data.data.education_img, //学历照
+              })
+            }
+          })
+        }
       }
     })