Переглянути джерело

会议分享,合并会议封面页和议程安排页

xyg 3 роки тому
батько
коміт
389242b100

+ 4 - 0
light-application-wx/pages/index/index.js

@@ -218,6 +218,10 @@ Page({
      */
     meetingCover: function () {
         util.toast('功能暂未开放');
+
+        wx.navigateTo({
+            url: '../meeting-list/meeting-list',
+        });
     },
 
     /**

+ 116 - 8
light-application-wx/pages/meeting-cover/meeting-cover.js

@@ -1,6 +1,7 @@
 // pages/meeting-cover/meeting-cover.js
 const app = getApp();
 const util = require('../../utils/util.js');
+
 Page({
 
     /**
@@ -11,18 +12,36 @@ Page({
         location: '重庆市城市管理局会议厅1楼105会议室',
         title: '',
         receptionTime: '',
-        item: {}
+        item: {},
+        showBack: true,
+        showPart1: true,
+        showPart2: false,
     },
 
     /**
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
-        let item = JSON.parse(options.item);
-        this.setData({
-            item: item,
-            title: item.title,
-            receptionTime: util.formatDate(item.receptionTime, 'yyyy年MM月dd日 HH:mm'),
+        let that = this;
+        console.info(options)
+        if (options) {
+            that.setData({
+                id: options.id
+            });
+        }
+        util.get({
+            url: '/api/meeting/info/getByIdNotAuth?id=' + options.id,
+            success: (res) => {
+                wx.hideLoading();
+                console.info('res', res);
+                // util.toast(JSON.stringify(res))
+                let datas = res.data.data;
+                that.setData({
+                    title: datas.title,
+                    receptionTime: util.formatDate(datas.receptionTime, 'yyyy年MM月dd日 HH:mm'),
+                    receptionContent: datas.receptionContent
+                });
+            }
         });
     },
 
@@ -72,7 +91,21 @@ Page({
      * 用户点击右上角分享
      */
     onShareAppMessage: function () {
-
+        util.toast('点击分享');
+        let that = this;
+        that.setData({
+            showBack: false
+        });
+        setTimeout(() => {
+            that.setData({
+                showBack: true
+            });
+        }, 10000);
+        return {
+            title: '分享测试',
+            path: '/pages/meeting-cover/meeting-cover?id=' + that.data.id,
+            // imageUrl: '/images/call2x.png'
+        }
     },
 
     /**
@@ -91,6 +124,81 @@ Page({
         wx.navigateBack({
             delta: -1,
         });
-    }
+    },
+
+    /**
+     * 触摸开始事件
+     */
+    touchStart: function (e) {
+        this.setData({
+            moveFlag: true,
+            startY: e.touches[0].pageY,
+        });
+    },
+
+    /**
+     * 触摸移动事件
+     */
+    touchMove: function (e) {
+        let that = this;
+        let endY = e.touches[0].pageY;
+        let startY = that.data.startY;
+        if (that.data.moveFlag) {
+            // 下滑
+            if (endY - startY > 50) {
+                console.log("pullDown")
+                that.setData({
+                    moveFlag: false,
+                });
+                if (!that.data.showPart1 && that.data.showPart2) {
+                    let ani = wx.createAnimation({
+                        delay: 0,
+                        duration: 1000,
+                    });
+                    ani.opacity(0.5).step();
+                    that.setData({
+                        showPart1: true,
+                        showPart2: false,
+                        ani: ani.export()
+                    });
+                    ani.opacity(1).step();
+                    that.setData({
+                        ani: ani.export()
+                    });
+                }
+            }
+            // 上滑
+            if (startY - endY > 50) {
+                console.log("pullup")
+                that.setData({
+                    moveFlag: false,
+                });
+                if (that.data.showPart1 && !that.data.showPart2) {
+                    let ani = wx.createAnimation({
+                        delay: 0,
+                        duration: 1000,
+                    });
+                    ani.opacity(0.5).step();
+                    that.setData({
+                        showPart1: false,
+                        showPart2: true,
+                        ani: ani.export()
+                    });
+                    ani.opacity(1).step();
+                    that.setData({
+                        ani: ani.export()
+                    });
+                }
+            }
+        }
+    },
 
+    /**
+     * 触摸结束事件
+     */
+    touchEnd: function (e) {
+        this.setData({
+            moveFlag: true,
+        });
+    },
 })

+ 15 - 2
light-application-wx/pages/meeting-cover/meeting-cover.wxml

@@ -1,6 +1,6 @@
 <!--pages/meeting-cover/meeting-cover.wxml-->
-<view class="body" style="background-image: url({{imgPath}}/meeting-cover-bg.png);">
-    <image class="backBtn" src="{{imgPath}}/icon-back-white.png" bindtap="backTap"></image>
+<view class="body" style="background-image: url({{imgPath}}/meeting-cover-bg.png);" wx:if="{{showPart1}}" bindtouchstart="touchStart" bindtouchmove="touchMove" bindtouchend="touchEnd" animation="{{ani}}">
+    <!-- <image class="backBtn" src="{{imgPath}}/icon-back-white.png" bindtap="backTap" wx:if="{{showBack}}"></image> -->
     <view class="welcome">诚挚邀您参加</view>
     <view class="topic" bindtap="meetingAgenda">{{title}}</view>
     <view class="line"></view>
@@ -21,4 +21,17 @@
         <text>期·待·您·的·参·与</text>
         <view class="bottom-line"></view>
     </view>
+</view>
+
+<view class="container" style="background-image: url({{imgPath}}/meeting-arrangement-bg.png);" wx:if="{{showPart2}}" bindtouchstart="touchStart" bindtouchmove="touchMove" bindtouchend="touchEnd" animation="{{ani}}">
+    <!-- <image class="backBtn" src="{{imgPath}}/icon-back-white.png" bindtap="backTap" wx:if="{{showBack}}"></image> -->
+    <view class="agenda-title">{{title}}</view>
+    <view class="english-name">Agenda arrangement</view>
+    <view class="agenda-name">议程安排</view>
+    <view class="now-time">{{receptionTime}}</view>
+
+    <scroll-view class="arrangement-list" scroll-y="true" style="height: 70%;">
+        <!-- <textarea name="receptionContent" value="{{receptionContent}}" maxlength="5000" disabled="true"></textarea> -->
+        <text>{{receptionContent}}{{receptionContent}}{{receptionContent}}</text>
+    </scroll-view>
 </view>

+ 119 - 3
light-application-wx/pages/meeting-cover/meeting-cover.wxss

@@ -78,12 +78,128 @@
 .bottom-line {
     background-color: #5467A550;
     height: 1rpx;
-    width: 30%;
+    width: 25%;
 }
 
 .bottom text {
     color: #5467A5;
-    font-size: 28rpx;
-    /* width: 38%; */
+    font-size: 26rpx;
     margin: 0 28rpx;
+}
+
+/* pages/visit-agenda/visit-agenda.wxss */
+.container {
+    color: #ffffff;
+    padding: 30rpx;
+    display: block;
+    width: 100%;
+    height: 100%;
+    background-size: 100% 100%;
+}
+
+.backBtn {
+    width: 60rpx;
+    height: 60rpx;
+    margin-top: 40rpx;
+}
+
+.agenda-title {
+    font-size: 40rpx;
+    width: 95%;
+    margin-top: 90rpx;
+    margin-left: 10rpx;
+    border-bottom: solid 1rpx #ffffff50;
+    padding-bottom: 10rpx;
+}
+
+.english-name {
+    font-size: 22rpx;
+    color: #ffffff50;
+    text-align: left;
+    margin-top: 10rpx;
+}
+
+.agenda-name {
+    margin-top: 10rpx;
+    line-height: 60rpx;
+    font-size: 50rpx;
+    color: #2BFFE9;
+    border-bottom: solid 1rpx #ffffff50;
+    padding-bottom: 10rpx;
+    display: inline-flex;
+    letter-spacing: 8rpx;
+}
+
+.now-time {
+    margin-top: 30rpx;
+    font-size: 22rpx;
+}
+
+.arrangement-list {
+    /* height: 300rpx; */
+    margin-top: 60rpx;
+}
+
+.arrangement-list textarea {
+    width: 100%;
+    height: 800rpx;
+    word-break: break-all;
+}
+
+.item:nth-child(odd) {
+    background-image: var(--bg--);
+    color: white;
+    height: 120rpx;
+    line-height: 120rpx;
+    font-size: 28rpx;
+    width: 100%;
+    margin-top: 20rpx;
+    display: inline-flex;
+    background-size: 100% 100%;
+}
+
+.item:nth-child(even) {
+    background-color: #07309C;
+    color: white;
+    height: 120rpx;
+    line-height: 120rpx;
+    font-size: 28rpx;
+    width: 100%;
+    margin-top: 20rpx;
+    border-radius: 10rpx;
+    display: inline-flex;
+    background-image: none;
+    background-size: 100% 100%;
+}
+
+.item .time {
+    margin-left: 10rpx;
+    width: 25%;
+}
+
+.item .name {
+    width: 25%;
+}
+
+.item .vertical {
+    border-left: solid 1rpx #ffffff;
+    margin-right: 20rpx;
+    height: 80rpx;
+    margin-top: 20rpx;
+}
+
+.item .desc {
+    width: 40%;
+    line-height: 35rpx;
+    height: 70rpx;
+    font-size: 22rpx;
+    word-wrap: break-all;
+    margin-top: 30rpx;
+    color: #ffffff60;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    align-items: center;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
 }

+ 1 - 1
light-application-wx/pages/meeting-list/meeting-list.js

@@ -159,7 +159,7 @@ Page({
             }
         } else {
             wx.navigateTo({
-                url: '../meeting-cover/meeting-cover?item=' + JSON.stringify(item),
+                url: '../meeting-cover/meeting-cover?id=' + item.id,
             });
         }
     },