Sfoglia il codice sorgente

'完成收到和发出邀请列表页'

machinecat520 2 anni fa
parent
commit
9217b73d0e

+ 4 - 2
app.json

@@ -1,6 +1,10 @@
 
 {
     "pages": [
+        "pages/receivedInvitationList/receivedInvitationList",
+        "pages/receivedInvitation/receivedInvitation",
+        "pages/sendInvitationList/sendInvitationList",
+        "pages/sendInvitation/sendInvitation",
         "pages/authenticationDetail/authenticationDetail",
         "pages/myInfo/myInfo",
         "pages/mask/mask",
@@ -13,7 +17,6 @@
         "pages/manageComplaint/manageComplaint",
         "pages/manageOrderDetail/manageOrderDetail",
         "pages/manageOrder/manageOrder",
-        "pages/sendInvitation/sendInvitation",
         "pages/findStudent/findStudent",
         "pages/findTeacher/findTeacher",
         "pages/suggestList/suggestList",
@@ -30,7 +33,6 @@
         "pages/teacherList/teacherList",
         "pages/myOrder/myOrder",
         "pages/index/index",
-        "pages/receivedInvitation/receivedInvitation",
         "pages/stuList/stuList",
         "pages/teachAuthentication/teachAuthentication",
         "pages/stuCollectionTeach/stuCollectionTeach",

+ 87 - 0
pages/receivedInvitationList/receivedInvitationList.js

@@ -0,0 +1,87 @@
+// pages/receivedInvitationList/receivedInvitationList.js
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        read: false
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+
+    },
+
+    // 点击已读按钮
+    readYes() {
+        this.setData({
+            read: true
+        })
+    },
+
+    // 点击未读按钮
+    readNo() {
+        this.setData({
+            read: false
+        })
+    },
+
+    // 点击列表,跳转到邀请详情页
+    toReceivedInvitation() {
+        wx.navigateTo({
+            url: '/pages/receivedInvitation/receivedInvitation',
+        })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 4 - 0
pages/receivedInvitationList/receivedInvitationList.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "我收到的邀请"
+}

+ 58 - 0
pages/receivedInvitationList/receivedInvitationList.wxml

@@ -0,0 +1,58 @@
+<!--pages/receivedInvitationList/receivedInvitationList.wxml-->
+
+<!-- 顶部对方已读和未读按钮 -->
+<view class="read">
+    <text class="readDetail" bindtap="readYes">已读</text>
+    <text class="readDetail" bindtap="readNo">未读</text>
+</view>
+<!-- 发出的邀请列表 -->
+<view wx:if="{{read}}">
+    <view class="invitationWrapper" bindtap="toReceivedInvitation">
+        <view class="invitationTitle">
+            <view>
+                <text>邀请号</text>
+                <text class="invitatinDetail">xxx</text>
+            </view>
+            <view class="other">
+                <text>对方</text>
+                <text class="invitatinDetail">X教员</text>
+            </view>
+        </view>
+        <view class="invitationContent">
+            <text>邀请内容</text>
+            <text class="invitatinDetail">xxxxx</text>
+        </view>
+        <view class="invitationDateAndStatus">
+            <view>
+                <text>邀请日期</text>
+                <text class="invitatinDetail">xxx</text>
+            </view>
+            <view class="other">
+                <text>我方状态</text>
+                <text class="invitatinStatus">同意</text>
+            </view>
+        </view>
+    </view>    
+</view>
+<view wx:else>
+    <view class="invitationWrapper" bindtap="toReceivedInvitation">
+        <view class="invitationTitle">
+            <view>
+                <text>邀请号</text>
+                <text class="invitatinDetail">xxx</text>
+            </view>
+            <view class="other">
+                <text>对方</text>
+                <text class="invitatinDetail">X教员</text>
+            </view>
+        </view>
+        <view class="invitationContent">
+            <text>邀请内容</text>
+            <text class="invitatinDetail">xxxxx</text>
+        </view>
+        <view class="invitationDateAndStatus">
+            <text>邀请日期</text>
+            <text class="invitatinDetail">xxx</text>
+        </view>
+    </view>
+</view>

+ 56 - 0
pages/receivedInvitationList/receivedInvitationList.wxss

@@ -0,0 +1,56 @@
+/* pages/receivedInvitationList/receivedInvitationList.wxss */
+
+page{
+    padding: 20rpx;
+    height: 100%;
+    background-color: #E2F0D9;
+}
+
+/* 顶部对方已读和未读按钮 */
+.read{
+    display: flex;
+    justify-content: space-around;
+}
+.readDetail{
+    padding: 10rpx 40rpx;
+    border-radius: 30rpx;
+    background-color: #FFF2CC;
+    font-weight: bold;
+}
+
+/* 列表样式 */
+.invitationWrapper{
+    width: 93%;
+    padding: 10rpx;
+    margin-top: 20rpx;
+    border-radius: 20rpx;
+    background-color: #FFF2CC;
+}
+
+/* 邀请号和对方身份、邀请日期和对方状态 */
+.invitationTitle,
+.invitationDateAndStatus{
+    display: flex;
+    position: relative;
+}
+
+/* 对方身份 */
+.other{
+    position: absolute;
+    left: 60%;
+}
+/* 具体内容的样式 */
+.invitatinDetail,
+.invitatinStatus{
+    margin-left: 20rpx;
+    font-weight: bold;
+}
+/* 对方阅读状态详情 */
+.invitatinStatus{
+    color: red;
+}
+/* 邀请内容、邀请日期和对方状态 */
+.invitationContent,
+.invitationDateAndStatus{
+    margin-top: 10rpx;
+}

+ 87 - 0
pages/sendInvitationList/sendInvitationList.js

@@ -0,0 +1,87 @@
+// pages/sendInvitationList/sendInvitationList.js
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        read: true
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+
+    },
+
+    // 点击对方已读按钮
+    readYes() {
+        this.setData({
+            read: true
+        })
+    },
+
+    // 点击对方未读按钮
+    readNo() {
+        this.setData({
+            read: false
+        })
+    },
+
+    // 点击列表,跳转到邀请详情页
+    toSendInvitation(){
+        wx.navigateTo({
+          url: '/pages/sendInvitation/sendInvitation',
+        })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 4 - 0
pages/sendInvitationList/sendInvitationList.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "我发出的邀请"
+}

+ 58 - 0
pages/sendInvitationList/sendInvitationList.wxml

@@ -0,0 +1,58 @@
+<!--pages/sendInvitationList/sendInvitationList.wxml-->
+
+<!-- 顶部对方已读和未读按钮 -->
+<view class="read">
+    <text class="readDetail" bindtap="readYes">对方已读</text>
+    <text class="readDetail" bindtap="readNo">对方未读</text>
+</view>
+<!-- 发出的邀请列表 -->
+<view wx:if="{{read}}">
+    <view class="invitationWrapper" bindtap="toSendInvitation">
+        <view class="invitationTitle">
+            <view>
+                <text>邀请号</text>
+                <text class="invitatinDetail">xxx</text>
+            </view>
+            <view class="other">
+                <text>对方</text>
+                <text class="invitatinDetail">X教员</text>
+            </view>
+        </view>
+        <view class="invitationContent">
+            <text>邀请内容</text>
+            <text class="invitatinDetail">xxxxx</text>
+        </view>
+        <view class="invitationDateAndStatus">
+            <view>
+                <text>邀请日期</text>
+                <text class="invitatinDetail">xxx</text>
+            </view>
+            <view class="other">
+                <text>对方状态</text>
+                <text class="invitatinStatus">同意</text>
+            </view>
+        </view>
+    </view>    
+</view>
+<view wx:else>
+    <view class="invitationWrapper" bindtap="toSendInvitation">
+        <view class="invitationTitle">
+            <view>
+                <text>邀请号</text>
+                <text class="invitatinDetail">xxx</text>
+            </view>
+            <view class="other">
+                <text>对方</text>
+                <text class="invitatinDetail">X教员</text>
+            </view>
+        </view>
+        <view class="invitationContent">
+            <text>邀请内容</text>
+            <text class="invitatinDetail">xxxxx</text>
+        </view>
+        <view class="invitationDateAndStatus">
+            <text>邀请日期</text>
+            <text class="invitatinDetail">xxx</text>
+        </view>
+    </view>
+</view>

+ 57 - 0
pages/sendInvitationList/sendInvitationList.wxss

@@ -0,0 +1,57 @@
+/* pages/sendInvitationList/sendInvitationList.wxss */
+
+page{
+    padding: 20rpx;
+    height: 100%;
+    background-color: #E2F0D9;
+}
+
+/* 顶部对方已读和未读按钮 */
+.read{
+    display: flex;
+    justify-content: space-around;
+}
+.readDetail{
+    /* border: 1rpx solid gray; */
+    padding: 10rpx 20rpx;
+    border-radius: 30rpx;
+    background-color: #FFF2CC;
+    font-weight: bold;
+}
+
+/* 列表样式 */
+.invitationWrapper{
+    width: 93%;
+    padding: 10rpx;
+    margin-top: 20rpx;
+    border-radius: 20rpx;
+    background-color: #FFF2CC;
+}
+
+/* 邀请号和对方身份、邀请日期和对方状态 */
+.invitationTitle,
+.invitationDateAndStatus{
+    display: flex;
+    position: relative;
+}
+
+/* 对方身份 */
+.other{
+    position: absolute;
+    left: 60%;
+}
+/* 具体内容的样式 */
+.invitatinDetail,
+.invitatinStatus{
+    margin-left: 20rpx;
+    font-weight: bold;
+}
+/* 对方阅读状态详情 */
+.invitatinStatus{
+    color: red;
+}
+/* 邀请内容、邀请日期和对方状态 */
+.invitationContent,
+.invitationDateAndStatus{
+    margin-top: 10rpx;
+}