添加页面逻辑;设置并绘制页面;
@ -20,3 +20,13 @@ export const searchDocument = (userRole, documentCode) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export const bindDocument = (documentCode) => {
|
||||
return request({
|
||||
url: "/document/bind",
|
||||
method: "post",
|
||||
data: {
|
||||
documentCode
|
||||
}
|
||||
})
|
||||
}
|
10
api/user.js
@ -33,3 +33,13 @@ export const getProfile = () => {
|
||||
data: {}
|
||||
})
|
||||
}
|
||||
|
||||
export const attachRole = (userRole) => {
|
||||
return request({
|
||||
url: "/permission/role/user/",
|
||||
method: "post",
|
||||
data: {
|
||||
userRole
|
||||
}
|
||||
})
|
||||
}
|
1
app.js
@ -12,6 +12,7 @@ App({
|
||||
globalData: {
|
||||
userInfo: null,
|
||||
userBaseInfo: null,
|
||||
userDocument: null,
|
||||
loginTime: null,
|
||||
login: false,
|
||||
loginCallback: null,
|
||||
|
13
app.json
@ -3,13 +3,20 @@
|
||||
"pages/index/index",
|
||||
"pages/logs/logs",
|
||||
"pages/bind-document/bind-document",
|
||||
"pages/get-user-info/get-user-info"
|
||||
"pages/get-user-info/get-user-info",
|
||||
"pages/account-doc-info/account-doc-info",
|
||||
"pages/account-relation-info/account-relation-info",
|
||||
"pages/my-grade/my-grade",
|
||||
"pages/child-supervisor/child-supervisor",
|
||||
"pages/announcement/announcement",
|
||||
"pages/message/message"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTitleText": "全员育人小程序",
|
||||
"navigationBarTextStyle": "black"
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarBackgroundColor": "#EDEDED",
|
||||
"backgroundColor": "#EDEDED"
|
||||
},
|
||||
"useExtendedLib": {
|
||||
"weui": true
|
||||
|
4
images/base64.js
Normal file
@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
icon20: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAMAAABgZ9sFAAAAVFBMVEXx8fHMzMzr6+vn5+fv7+/t7e3d3d2+vr7W1tbHx8eysrKdnZ3p6enk5OTR0dG7u7u3t7ejo6PY2Njh4eHf39/T09PExMSvr6+goKCqqqqnp6e4uLgcLY/OAAAAnklEQVRIx+3RSRLDIAxE0QYhAbGZPNu5/z0zrXHiqiz5W72FqhqtVuuXAl3iOV7iPV/iSsAqZa9BS7YOmMXnNNX4TWGxRMn3R6SxRNgy0bzXOW8EBO8SAClsPdB3psqlvG+Lw7ONXg/pTld52BjgSSkA3PV2OOemjIDcZQWgVvONw60q7sIpR38EnHPSMDQ4MjDjLPozhAkGrVbr/z0ANjAF4AcbXmYAAAAASUVORK5CYII=",
|
||||
icon60: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAMAAAAOusbgAAAAeFBMVEUAwAD///+U5ZTc9twOww7G8MYwzDCH4YcfyR9x23Hw+/DY9dhm2WZG0kbT9NP0/PTL8sux7LFe115T1VM+zz7i+OIXxhes6qxr2mvA8MCe6J6M4oz6/frr+us5zjn2/fa67rqB4IF13XWn6ad83nxa1loqyirn+eccHxx4AAAC/klEQVRo3u2W2ZKiQBBF8wpCNSCyLwri7v//4bRIFVXoTBBB+DAReV5sG6lTXDITiGEYhmEYhmEYhmEYhmEY5v9i5fsZGRx9PyGDne8f6K9cfd+mKXe1yNG/0CcqYE86AkBMBh66f20deBc7wA/1WFiTwvSEpBMA2JJOBsSLxe/4QEEaJRrASP8EVF8Q74GbmevKg0saa0B8QbwBdjRyADYxIhqxAZ++IKYtciPXLQVG+imw+oo4Bu56rjEJ4GYsvPmKOAB+xlz7L5aevqUXuePWVhvWJ4eWiwUQ67mK51qPj4dFDMlRLBZTqF3SDvmr4BwtkECu5gHWPkmDfQh02WLxXuvbvC8ku8F57GsI5e0CmUwLz1kq3kD17R1In5816rGvQ5VMk5FEtIiWislTffuDpl/k/PzscdQsv8r9qWq4LRWX6tQYtTxvI3XyrwdyQxChXioOngH3dLgOFjk0all56XRi/wDFQrGQU3Os5t0wJu1GNtNKHdPqYaGYQuRDfbfDf26AGLYSyGS3ZAK4S8XuoAlxGSdYMKwqZKM9XJMtyqXi7HX/CiAZS6d8bSVUz5J36mEMFDTlAFQzxOT1dzLRljjB6+++ejFqka+mXIe6F59mw22OuOw1F4T6lg/9VjL1rLDoI9Xzl1MSYDNHnPQnt3D1EE7PrXjye/3pVpr1Z45hMUdcACc5NVQI0bOdS1WA0wuz73e7/5TNqBPhQXPEFGJNV2zNqWI7QKBd2Gn6AiBko02zuAOXeWIXjV0jNqdKegaE/kJQ6Bfs4aju04lMLkA2T5wBSYPKDGF3RKhFYEa6A1L1LG2yacmsaZ6YPOSAMKNsO+N5dNTfkc5Aqe26uxHpx7ZirvgCwJpWq/lmX1hA7LyabQ34tt5RiJKXSwQ+0KU0V5xg+hZrd4Bn1n4EID+WkQdgLfRNtvil9SPfwy+WQ7PFBWQz6dGWZBLkeJFXZGCfLUjCgGgqXo5TuSu3cugdcTv/HjqnBTEMwzAMwzAMwzAMwzAMw/zf/AFbXiOA6frlMAAAAABJRU5ErkJggg=="
|
||||
};
|
1
images/icon_del.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'> <path fill-opacity='.9' fill-rule='evenodd' d='M6.21 5.867l.744 12.51c.023.387.344.69.732.69h6.628a.733.733 0 0 0 .732-.69l.745-12.51H6.209zm10.683 0l-.749 12.575a1.833 1.833 0 0 1-1.83 1.725H7.686c-.97 0-1.773-.756-1.83-1.725L5.107 5.867H3.208v-.642c0-.253.206-.458.459-.458h14.666c.253 0 .459.205.459.458v.642h-1.9zm-4.06-3.117c.253 0 .459.205.459.458v.642H8.708v-.642c0-.253.206-.458.459-.458h3.666zm-4.125 5.5h1.1l.459 8.25h-1.1l-.459-8.25zm3.484 0h1.1l-.459 8.25h-1.1l.459-8.25z'/></svg>
|
After Width: | Height: | Size: 576 B |
BIN
images/icon_footer.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
images/icon_footer_link.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
images/icon_intro.png
Normal file
After Width: | Height: | Size: 748 B |
1
images/icon_love.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'> <path fill-opacity='.9' fill-rule='evenodd' d='M17.678 11.591a3.483 3.483 0 0 0-4.964-4.887c-.177.176-.4.391-.672.648l-.754.71-.755-.71a32.337 32.337 0 0 1-.671-.648 3.483 3.483 0 0 0-4.927 0 3.481 3.481 0 0 0-.05 4.876l6.403 6.402 6.39-6.39zM4.158 5.926a4.583 4.583 0 0 1 6.481 0c.168.167.384.376.649.625.264-.25.48-.458.648-.625a4.583 4.583 0 0 1 6.531 6.431l-6.531 6.532a.917.917 0 0 1-1.297 0l-6.531-6.531a4.584 4.584 0 0 1 .05-6.432z'/></svg>
|
After Width: | Height: | Size: 531 B |
BIN
images/icon_nav_feedback.png
Normal file
After Width: | Height: | Size: 924 B |
BIN
images/icon_nav_form.png
Normal file
After Width: | Height: | Size: 200 B |
BIN
images/icon_nav_layout.png
Normal file
After Width: | Height: | Size: 357 B |
BIN
images/icon_nav_nav.png
Normal file
After Width: | Height: | Size: 579 B |
BIN
images/icon_nav_search.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
images/icon_nav_special.png
Normal file
After Width: | Height: | Size: 495 B |
BIN
images/icon_nav_z-index.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
1
images/icon_star.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'> <path fill-opacity='.9' fill-rule='evenodd' d='M14.613 13.09l3.613-3.521-4.993-.726L11 4.32 8.767 8.843l-4.993.726 3.613 3.522-.853 4.972L11 15.716l4.466 2.347-.853-4.972zM11 16.959L6.717 19.21a.917.917 0 0 1-1.33-.966l.818-4.77-3.465-3.377a.917.917 0 0 1 .508-1.563l4.789-.696 2.141-4.34a.917.917 0 0 1 1.644 0l2.141 4.34 4.789.696a.917.917 0 0 1 .508 1.563l-3.465 3.378.818 4.769a.917.917 0 0 1-1.33.966L11 16.958z'/></svg>
|
After Width: | Height: | Size: 509 B |
BIN
images/icon_tabbar.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/layers/content.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
images/layers/navigation.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
images/layers/popout.png
Normal file
After Width: | Height: | Size: 9.0 KiB |
BIN
images/layers/transparent.gif
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
images/logo.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
images/pic_160.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
images/pic_article.png
Normal file
After Width: | Height: | Size: 816 B |
BIN
images/vcode.jpg
Normal file
After Width: | Height: | Size: 2.7 KiB |
106
pages/account-doc-info/account-doc-info.js
Normal file
@ -0,0 +1,106 @@
|
||||
// pages/account-doc-info/account-doc-info.js
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
hasUserInfo: false,
|
||||
hasUserDocument: false,
|
||||
userInfo: null,
|
||||
userDocuement: null,
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
if(app.globalData.userInfo){
|
||||
let userInfo = app.globalData.userInfo
|
||||
|
||||
this.setData({
|
||||
hasUserInfo: true,
|
||||
userInfo: userInfo
|
||||
})
|
||||
}
|
||||
if(app.globalData.userDocument){
|
||||
let userDocument = app.globalData.userDocument
|
||||
switch(userDocument.gender) {
|
||||
case 'F':
|
||||
userDocument.gender = '女'
|
||||
break;
|
||||
case 'M':
|
||||
userDocument.gender = '男'
|
||||
break;
|
||||
case 'U':
|
||||
userDocument.gender = '未知'
|
||||
break;
|
||||
}
|
||||
switch(userDocument.role) {
|
||||
case 'ROLE_STUDENT':
|
||||
userDocument.role = '学生'
|
||||
break;
|
||||
case 'ROLE_PARENT':
|
||||
userDocument.role = '家长'
|
||||
break;
|
||||
case 'ROLE_SUPERVISOR':
|
||||
userDocument.role = '辅导员'
|
||||
break;
|
||||
}
|
||||
this.setData({
|
||||
hasUserDocument: true,
|
||||
userDocument: userDocument
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
3
pages/account-doc-info/account-doc-info.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
79
pages/account-doc-info/account-doc-info.wxml
Normal file
@ -0,0 +1,79 @@
|
||||
<!--pages/account-doc-info/account-doc-info.wxml-->
|
||||
<view class="page" data-weui-theme="{{theme}}">
|
||||
<view class="page__hd">
|
||||
<view class="page__title">账号与档案信息</view>
|
||||
<view class="page__desc">小程序账号与绑定的档案信息</view>
|
||||
</view>
|
||||
<view class="page__bd">
|
||||
<view class="weui-form-preview" wx:if="{{hasUserInfo}}">
|
||||
<view class="weui-form-preview__hd">
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">昵称</label>
|
||||
<em class="weui-form-preview__value">{{userInfo.nickName}}</em>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-form-preview__bd">
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">所在省份</label>
|
||||
<text class="weui-form-preview__value">{{userInfo.province}}</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">所在城市</label>
|
||||
<text class="weui-form-preview__value">{{userInfo.city}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-form-preview__ft">
|
||||
<a class="weui-form-preview__btn weui-form-preview__btn_primary">修改</a>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page__bd">
|
||||
<view class="weui-form-preview" wx:if="{{hasUserDocument}}">
|
||||
<view class="weui-form-preview__hd">
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">真实姓名</label>
|
||||
<em class="weui-form-preview__value">{{userDocument.realName}}</em>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-form-preview__bd">
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">性别</label>
|
||||
<text class="weui-form-preview__value">{{userDocument.gender}}</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">角色</label>
|
||||
<text class="weui-form-preview__value">{{userDocument.role}}</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">行政班号</label>
|
||||
<text class="weui-form-preview__value">{{userDocument.className}}</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">入学年份</label>
|
||||
<text class="weui-form-preview__value">{{userDocument.gradeYear}}</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item" wx:for="{{userDocument.major}}" wx:key="name">
|
||||
<label class="weui-form-preview__label">专业或大类</label>
|
||||
<text class="weui-form-preview__value">{{item}}</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">学院</label>
|
||||
<text class="weui-form-preview__value">{{userDocument.college}}</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">民族</label>
|
||||
<text class="weui-form-preview__value">{{userDocument.ethnic}}</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">政治面貌</label>
|
||||
<text class="weui-form-preview__value">{{userDocument.politicalStatus}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-form-preview__ft">
|
||||
<a class="weui-form-preview__btn weui-form-preview__btn_primary">反映问题</a>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
1
pages/account-doc-info/account-doc-info.wxss
Normal file
@ -0,0 +1 @@
|
||||
/* pages/account-doc-info/account-doc-info.wxss */
|
66
pages/account-relation-info/account-relation-info.js
Normal file
@ -0,0 +1,66 @@
|
||||
// pages/account-relation-info/account-relation-info.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
3
pages/account-relation-info/account-relation-info.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
109
pages/account-relation-info/account-relation-info.wxml
Normal file
@ -0,0 +1,109 @@
|
||||
<!--pages/account-relation-info/account-relation-info.wxml-->
|
||||
<view class="page" data-weui-theme="{{theme}}">
|
||||
<view class="page__hd">
|
||||
<view class="page__title">关系信息</view>
|
||||
<view class="page__desc">我与其他账号的关系</view>
|
||||
</view>
|
||||
<view class="page__bd">
|
||||
<view class="weui-form-preview">
|
||||
<view class="weui-form-preview__hd">
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">孩子名称</label>
|
||||
<em class="weui-form-preview__value">李xx</em>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-form-preview__bd">
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">性别</label>
|
||||
<text class="weui-form-preview__value">女</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">入学年份</label>
|
||||
<text class="weui-form-preview__value">2018</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">专业或大类</label>
|
||||
<text class="weui-form-preview__value">软件工程</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">学院</label>
|
||||
<text class="weui-form-preview__value">软件学院</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">账号绑定状态</label>
|
||||
<text class="weui-form-preview__value">已绑定</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-form-preview__ft">
|
||||
<a class="weui-form-preview__btn weui-form-preview__btn_primary">反映问题</a>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page__bd">
|
||||
<view class="weui-form-preview">
|
||||
<view class="weui-form-preview__hd">
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">家长名称</label>
|
||||
<em class="weui-form-preview__value">李ok</em>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-form-preview__bd">
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">性别</label>
|
||||
<text class="weui-form-preview__value">男</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">所在城市</label>
|
||||
<text class="weui-form-preview__value">Guangdong</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">所在省份</label>
|
||||
<text class="weui-form-preview__value">Shenzhen</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">联系电话</label>
|
||||
<text class="weui-form-preview__value">13600000000</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">账号绑定状态</label>
|
||||
<text class="weui-form-preview__value">已绑定</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-form-preview__ft">
|
||||
<a class="weui-form-preview__btn weui-form-preview__btn_primary">反映问题</a>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page__bd">
|
||||
<view class="weui-form-preview">
|
||||
<view class="weui-form-preview__hd">
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">辅导员名称</label>
|
||||
<em class="weui-form-preview__value">高xy</em>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-form-preview__bd">
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">性别</label>
|
||||
<text class="weui-form-preview__value">女</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">邮箱</label>
|
||||
<text class="weui-form-preview__value">supervisor@nwpu.edu.cn</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">联系电话</label>
|
||||
<text class="weui-form-preview__value">13600000000</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">账号绑定状态</label>
|
||||
<text class="weui-form-preview__value">已绑定</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-form-preview__ft">
|
||||
<a class="weui-form-preview__btn weui-form-preview__btn_primary">反映问题</a>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
1
pages/account-relation-info/account-relation-info.wxss
Normal file
@ -0,0 +1 @@
|
||||
/* pages/account-relation-info/account-relation-info.wxss */
|
66
pages/announcement/announcement.js
Normal file
@ -0,0 +1,66 @@
|
||||
// pages/announcement/announcement.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
3
pages/announcement/announcement.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
42
pages/announcement/announcement.wxml
Normal file
@ -0,0 +1,42 @@
|
||||
<!--pages/announcement/announcement.wxml-->
|
||||
<view class="page" data-weui-theme="{{theme}}">
|
||||
<view class="page__hd" wx:if="{{false}}">
|
||||
<view class="page__title">通知公告</view>
|
||||
<view class="page__desc">我需要注意的一些事情</view>
|
||||
</view>
|
||||
<view class="page__hd" wx:else>
|
||||
<view class="page__title">教育办通知</view>
|
||||
<view class="page__desc">蔡老师 2020-9-15</view>
|
||||
</view>
|
||||
<view class="page__bd" wx:if="{{false}}">
|
||||
<view class="weui-panel">
|
||||
<view class="weui-panel__hd">通知公告列表</view>
|
||||
<view class="weui-panel__bd">
|
||||
<view class="weui-media-box weui-media-box_text">
|
||||
<h4 class="weui-media-box__title">教育办通知</h4>
|
||||
<view class="weui-media-box__desc">为深入学习贯彻习近平总书记在党史学习教育动员大会上的重要讲话精神,引导高校师生以昂扬的状态迎接中国共产党建党100周年,教育部、国家语委、中央广播电视总台联合开展《全国大学生党史知识竞答大会》。节目除百名现场竞答选手外,还设置“千校学生云答题”环节。答题时间为3月18日(彩排)、3月20日、3月22日、3月24日、3月26日、3月28日、3月30日、4月1日、4月3日、4月5日、4月7日,每天的14:00至15:30,共计11场。其中陕西省:14:00至14:30集中进行答题。请各位同学积极参与(相关参与方式请查看答题须知)</view>
|
||||
<view class="weui-media-box__info">
|
||||
<view class="weui-media-box__info__meta">日期 2020-9-15</view>
|
||||
<view class="weui-media-box__info__meta">发布人 蔡老师</view>
|
||||
<view class="weui-media-box__info__meta weui-media-box__info__meta_extra">状态 已确认</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:else>
|
||||
<view class="page__bd">
|
||||
<view class="weui-article">
|
||||
<view class="weui-article__section">
|
||||
<view class="weui-article__section">
|
||||
<view class="weui-article__p">
|
||||
为深入学习贯彻习近平总书记在党史学习教育动员大会上的重要讲话精神,引导高校师生以昂扬的状态迎接中国共产党建党100周年,教育部、国家语委、中央广播电视总台联合开展《全国大学生党史知识竞答大会》。节目除百名现场竞答选手外,还设置“千校学生云答题”环节。答题时间为3月18日(彩排)、3月20日、3月22日、3月24日、3月26日、3月28日、3月30日、4月1日、4月3日、4月5日、4月7日,每天的14:00至15:30,共计11场。其中陕西省:14:00至14:30集中进行答题。请各位同学积极参与(相关参与方式请查看答题须知)
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<a class="weui-btn weui-btn_primary">留言</a>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
7
pages/announcement/announcement.wxss
Normal file
@ -0,0 +1,7 @@
|
||||
/* pages/announcement/announcement.wxss */
|
||||
/*!
|
||||
* WeUI v2.4.3 (https://github.com/weui/weui-wxss)
|
||||
* Copyright 2021 Tencent, Inc.
|
||||
* Licensed under the MIT license
|
||||
*/
|
||||
.page{background-color:var(--weui-BG-2)}image{margin:4px 0}
|
@ -1,6 +1,7 @@
|
||||
// pages/bind-document.js
|
||||
|
||||
import {searchDocument} from '../../api/document'
|
||||
import {searchDocument, bindDocument} from '../../api/document'
|
||||
import {attachRole} from '../../api/user'
|
||||
|
||||
Page({
|
||||
|
||||
@ -18,8 +19,11 @@ Page({
|
||||
currentValue: '',
|
||||
document: null,
|
||||
showDocument: false,
|
||||
toast: false,
|
||||
hideToast: true,
|
||||
warnToast: false,
|
||||
hideWarnToast: true
|
||||
hideWarnToast: true,
|
||||
warnText: '',
|
||||
},
|
||||
|
||||
/**
|
||||
@ -99,7 +103,64 @@ Page({
|
||||
},
|
||||
|
||||
onBind() {
|
||||
let userRoleName;
|
||||
let documentCode = this.data.currentValue
|
||||
switch(this.data.userRoleType) {
|
||||
case '1':
|
||||
userRoleName = 'Student'
|
||||
break;
|
||||
case '2':
|
||||
userRoleName = 'Parent'
|
||||
break;
|
||||
case '3':
|
||||
userRoleName = 'Supervisor'
|
||||
break;
|
||||
}
|
||||
// 设置用户角色
|
||||
attachRole(userRoleName).then(res => {
|
||||
console.log(res)
|
||||
}).then(() => {
|
||||
// 执行绑定操作
|
||||
return bindDocument(documentCode)
|
||||
}).then(res => {
|
||||
app.globalData.userDocument = res
|
||||
this.setData({
|
||||
toast: true
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.setData({
|
||||
hideToast: true
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.setData({
|
||||
toast: false,
|
||||
hideToast: false,
|
||||
});
|
||||
// 绑定成功后,跳转进入小程序首页
|
||||
wx.navigateTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}, 300);
|
||||
}, 2000);
|
||||
|
||||
}).catch(err =>{
|
||||
console.log(err)
|
||||
this.setData({
|
||||
warnToast: true,
|
||||
warnText: '绑定失败'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.setData({
|
||||
hidewarnToast: true,
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.setData({
|
||||
warnToast: false,
|
||||
hidewarnToast: false,
|
||||
});
|
||||
}, 300);
|
||||
}, 3000);
|
||||
})
|
||||
},
|
||||
|
||||
onConfirm() {
|
||||
@ -154,18 +215,19 @@ Page({
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
this.setData({
|
||||
warnToast: true
|
||||
warnToast: true,
|
||||
warnText: '未找到对应档案'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.setData({
|
||||
hidewarnToast: true
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.setData({
|
||||
warnToast: false,
|
||||
hidewarnToast: false,
|
||||
});
|
||||
}, 300);
|
||||
this.setData({
|
||||
hidewarnToast: true,
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.setData({
|
||||
warnToast: false,
|
||||
hidewarnToast: false,
|
||||
});
|
||||
}, 300);
|
||||
}, 3000);
|
||||
})
|
||||
}
|
||||
|
@ -108,14 +108,22 @@
|
||||
</view>
|
||||
<view wx:if="{{showDocument}}">
|
||||
<a class="weui-btn weui-btn_disabled weui-btn_default" bindtap="onReset">重新查询</a>
|
||||
<a class="weui-btn weui-btn_primary" bindtap="onConfirm">绑定</a>
|
||||
<a class="weui-btn weui-btn_primary" bindtap="onBind">绑定</a>
|
||||
</view>
|
||||
|
||||
<view class="fadeIn {{hideWarnToast ? 'fadeOut' : ''}}" wx:if="{{warnToast}}">
|
||||
<view class="weui-mask_transparent"></view>
|
||||
<view class="weui-toast">
|
||||
<i class="weui-icon-warn weui-icon_toast"></i>
|
||||
<view class="weui-toast__content">未找到对应档案</view>
|
||||
<view class="weui-toast__content">{{warnText}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="fadeIn {{hideToast ? 'fadeOut' : ''}}" wx:if="{{toast}}">
|
||||
<view class="weui-mask_transparent"></view>
|
||||
<view class="weui-toast">
|
||||
<i class="weui-icon-success-no-circle weui-icon_toast"></i>
|
||||
<view class="weui-toast__content">已完成</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
66
pages/child-supervisor/child-supervisor.js
Normal file
@ -0,0 +1,66 @@
|
||||
// pages/child-supervisor/child-supervisor.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
3
pages/child-supervisor/child-supervisor.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
25
pages/child-supervisor/child-supervisor.wxml
Normal file
@ -0,0 +1,25 @@
|
||||
<view class="page" data-weui-theme="{{theme}}">
|
||||
<view class="weui-form">
|
||||
<view class="weui-form__text-area">
|
||||
<h2 class="weui-form__title">给辅导员留言</h2>
|
||||
<view class="weui-form__desc">您的留言将发到辅导员老师账户,辅导员会在合适的时候回复您</view>
|
||||
</view>
|
||||
<view class="weui-form__control-area">
|
||||
<view class="weui-cells__group weui-cells__group_form">
|
||||
<view class="weui-cells__title">给辅导员老师留言</view>
|
||||
<view class="weui-cells weui-cells_form">
|
||||
<view class="weui-cell">
|
||||
<view class="weui-cell__bd">
|
||||
<textarea class="weui-textarea" placeholder="请描述你所发生的问题" placeholder-class="weui-input__placeholder" rows="3"></textarea>
|
||||
<view class="weui-textarea-counter"><span>0</span>/200</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-form__opr-area">
|
||||
<a class="weui-btn weui-btn_primary">发送</a>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
1
pages/child-supervisor/child-supervisor.wxss
Normal file
@ -0,0 +1 @@
|
||||
/* pages/child-supervisor/child-supervisor.wxss */
|
@ -10,12 +10,14 @@ Page({
|
||||
data: {
|
||||
motto: 'Hello World',
|
||||
userInfo: {},
|
||||
userDocument: {},
|
||||
hasUserInfo: false,
|
||||
canIUse: true,
|
||||
loading: true,
|
||||
unrecoverable: false,
|
||||
refresh: false,
|
||||
unrecoverableInfo: '',
|
||||
|
||||
},
|
||||
handleLogin() {
|
||||
return new Promise((resolve, reject) => {
|
||||
@ -145,7 +147,6 @@ Page({
|
||||
return Promise.resolve(this.data.hasUserInfo)
|
||||
|
||||
}).then((res) => {
|
||||
console.log(app.globalData)
|
||||
// 获取与用户关联的档案
|
||||
return getDocument(app.globalData.userBaseInfo.openid).then(res => {
|
||||
console.log(res)
|
||||
@ -153,6 +154,11 @@ Page({
|
||||
wx.navigateTo({
|
||||
url: '../bind-document/bind-document'
|
||||
})
|
||||
} else {
|
||||
app.globalData.userDocument = res
|
||||
this.setData({
|
||||
userDocument: app.globalData.userDocument
|
||||
})
|
||||
}
|
||||
})
|
||||
}).catch(err => {
|
||||
@ -194,5 +200,41 @@ Page({
|
||||
userInfo: e.detail.userInfo,
|
||||
hasUserInfo: true
|
||||
})
|
||||
}
|
||||
},
|
||||
bindAccountDocInfo() {
|
||||
// 跳转
|
||||
wx.navigateTo({
|
||||
url: '/pages/account-doc-info/account-doc-info'
|
||||
})
|
||||
},
|
||||
bindAccountRelationInfo() {
|
||||
// 跳转
|
||||
wx.navigateTo({
|
||||
url: '/pages/account-relation-info/account-relation-info'
|
||||
})
|
||||
},
|
||||
bindMyGrade() {
|
||||
// 跳转
|
||||
wx.navigateTo({
|
||||
url: '/pages/my-grade/my-grade'
|
||||
})
|
||||
},
|
||||
bindChildSupervisor() {
|
||||
// 跳转
|
||||
wx.navigateTo({
|
||||
url: '/pages/child-supervisor/child-supervisor'
|
||||
})
|
||||
},
|
||||
bindAnnouncement() {
|
||||
// 跳转
|
||||
wx.navigateTo({
|
||||
url: '/pages/announcement/announcement'
|
||||
})
|
||||
},
|
||||
bindMessage() {
|
||||
// 跳转
|
||||
wx.navigateTo({
|
||||
url: '/pages/message/message'
|
||||
})
|
||||
},
|
||||
})
|
||||
|
@ -1,15 +1,118 @@
|
||||
<!--index.wxml-->
|
||||
<view class="container">
|
||||
<view class="page" data-weui-theme="{{theme}}">
|
||||
<view class="page__hd">
|
||||
<view class="page__title">您好,{{userDocument.realName}}</view>
|
||||
<view class="page__desc">欢迎来到全员育人管理系统</view>
|
||||
</view>
|
||||
<view class="userinfo">
|
||||
<button wx:if="{{!hasUserInfo && canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button>
|
||||
<block wx:else>
|
||||
<block wx:if="{{hasUserInfo && canIUse}}">
|
||||
<image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
|
||||
<text class="userinfo-nickname">{{userInfo.nickName}}</text>
|
||||
</block>
|
||||
</view>
|
||||
<view class="usermotto">
|
||||
<text class="user-motto">{{motto}}</text>
|
||||
|
||||
<view class="page__bd">
|
||||
<view class="weui-cells__title">个人信息</view>
|
||||
<view class="weui-cells">
|
||||
<view class="weui-cell weui-cell_active weui-cell_access" bindtap="bindAccountDocInfo">
|
||||
<view class="weui-cell__bd">我的账号与档案信息</view>
|
||||
<view class="weui-cell__ft" style="font-size: 0;">
|
||||
<text class="demo_badge_tips">详细信息</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-cell weui-cell_active weui-cell_access" bindtap="bindAccountRelationInfo">
|
||||
<view class="weui-cell__bd">我的关系信息</view>
|
||||
<view class="weui-cell__ft" style="font-size: 0;">
|
||||
<text class="demo_badge_tips">详细信息</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-cells__title">功能</view>
|
||||
<view class="weui-cells demo_badge_cells">
|
||||
<view class="weui-cell weui-cell_active">
|
||||
<view class="weui-cell__hd">
|
||||
<image src="../../images/pic_160.png"></image>
|
||||
<text class="weui-badge">8</text>
|
||||
</view>
|
||||
<view class="weui-cell__bd">
|
||||
<view>我的孩子</view>
|
||||
<view class="demo_badge_desc">摘要信息</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-cell weui-cell_active" bindtap="bindChildSupervisor">
|
||||
<view class="weui-cell__hd">
|
||||
<image src="../../images/pic_160.png"></image>
|
||||
<text class="weui-badge">8</text>
|
||||
</view>
|
||||
<view class="weui-cell__bd">
|
||||
<view>孩子的辅导员</view>
|
||||
<view class="demo_badge_desc">摘要信息</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-cell weui-cell_active weui-cell_access" bindtap="bindAnnouncement">
|
||||
<view class="weui-cell__bd">
|
||||
<text class="demo_badge_title">公告通知</text>
|
||||
<text class="weui-badge">4</text>
|
||||
</view>
|
||||
<view class="weui-cell__ft"></view>
|
||||
</view>
|
||||
<view class="weui-cell weui-cell_active weui-cell_access" bindtap="bindMessage">
|
||||
<view class="weui-cell__bd">
|
||||
<text class="demo_badge_title">收到的消息</text>
|
||||
<text class="weui-badge">32</text>
|
||||
</view>
|
||||
<view class="weui-cell__ft"></view>
|
||||
</view>
|
||||
<view class="weui-cell weui-cell_active weui-cell_access">
|
||||
<view class="weui-cell__bd">
|
||||
<text class="demo_badge_title">问答机器人</text>
|
||||
<text class="weui-badge">8</text>
|
||||
</view>
|
||||
<view class="weui-cell__ft">详细信息</view>
|
||||
</view>
|
||||
<view class="weui-cell weui-cell_active weui-cell_access" bindtap="bindMyGrade">
|
||||
<view class="weui-cell__bd">
|
||||
<text class="demo_badge_title">我的成绩</text>
|
||||
<text class="weui-badge">New</text>
|
||||
</view>
|
||||
<view class="weui-cell__ft"></view>
|
||||
</view>
|
||||
<view class="weui-cell weui-cell_active weui-cell_access">
|
||||
<view class="weui-cell__bd">
|
||||
<text class="demo_badge_title">我的荣誉</text>
|
||||
<text class="weui-badge">New</text>
|
||||
</view>
|
||||
<view class="weui-cell__ft"></view>
|
||||
</view>
|
||||
<view class="weui-cell weui-cell_active weui-cell_access">
|
||||
<view class="weui-cell__bd">
|
||||
<text class="demo_badge_title">我的健康</text>
|
||||
<text class="weui-badge">New</text>
|
||||
</view>
|
||||
<view class="weui-cell__ft"></view>
|
||||
</view>
|
||||
<view class="weui-cell weui-cell_active weui-cell_access">
|
||||
<view class="weui-cell__bd">
|
||||
<text class="demo_badge_title">我的学生</text>
|
||||
<text class="weui-badge">New</text>
|
||||
</view>
|
||||
<view class="weui-cell__ft"></view>
|
||||
</view>
|
||||
<view class="weui-cell weui-cell_active weui-cell_access">
|
||||
<view class="weui-cell__bd">
|
||||
<text class="demo_badge_title">学生的成绩</text>
|
||||
<text class="weui-badge">New</text>
|
||||
</view>
|
||||
<view class="weui-cell__ft"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="weui-footer">
|
||||
<view class="weui-footer__text">Copyright © 2019-2022 codesdream.com</view>
|
||||
</view>
|
||||
|
||||
<i-spin size="large" fix wx:if="{{ loading }}"></i-spin>
|
||||
<i-spin size="large" fix wx:if="{{ unrecoverable }}" custom><view>您的账号已被封禁</view></i-spin>
|
||||
|
||||
</view>
|
||||
|
@ -19,3 +19,10 @@
|
||||
.usermotto {
|
||||
margin-top: 200px;
|
||||
}
|
||||
|
||||
/*!
|
||||
* WeUI v2.4.3 (https://github.com/weui/weui-wxss)
|
||||
* Copyright 2021 Tencent, Inc.
|
||||
* Licensed under the MIT license
|
||||
*/
|
||||
image{height:50px}.demo_badge_cells .weui-cell__hd{position:relative;margin-right:10px}.demo_badge_cells .weui-cell__hd image{width:50px;display:block}.demo_badge_cells .weui-cell__hd .weui-badge{position:absolute;top:-.4em;right:-.4em}.demo_badge_cells .weui-cell__bd .demo_badge_title{vertical-align:middle}.demo_badge_cells .weui-cell__bd .demo_badge_title+.weui-badge{margin-left:5px}.demo_badge_cells .weui-cell__bd .demo_badge_desc{font-size:13px;color:#888}
|
66
pages/message/message.js
Normal file
@ -0,0 +1,66 @@
|
||||
// pages/message/message.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
3
pages/message/message.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
23
pages/message/message.wxml
Normal file
@ -0,0 +1,23 @@
|
||||
<view class="page" data-weui-theme="{{theme}}">
|
||||
<view class="page__hd" wx:if="{{true}}">
|
||||
<view class="page__title">收到的消息</view>
|
||||
<view class="page__desc">一些发给我的消息</view>
|
||||
</view>
|
||||
<view class="page__bd" wx:if="{{true}}">
|
||||
<view class="weui-panel">
|
||||
<view class="weui-panel__hd">消息列表</view>
|
||||
<view class="weui-panel__bd">
|
||||
<view class="weui-media-box weui-media-box_text">
|
||||
<h4 class="weui-media-box__title">学业警告通知</h4>
|
||||
<view class="weui-media-box__desc">在2029-2020年秋季学期,你所修的学分总数低于15分。</view>
|
||||
<view class="weui-media-box__info">
|
||||
<view class="weui-media-box__info__meta">日期 2020-3-12</view>
|
||||
<view class="weui-media-box__info__meta">发布人 教学办</view>
|
||||
<view class="weui-media-box__info__meta weui-media-box__info__meta_extra">状态 已确认</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
1
pages/message/message.wxss
Normal file
@ -0,0 +1 @@
|
||||
/* pages/message/message.wxss */
|
66
pages/my-grade/my-grade.js
Normal file
@ -0,0 +1,66 @@
|
||||
// pages/my-grade/my-grade.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
3
pages/my-grade/my-grade.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
119
pages/my-grade/my-grade.wxml
Normal file
@ -0,0 +1,119 @@
|
||||
<!--pages/my-grade/my-grade.wxml-->
|
||||
<view class="page" data-weui-theme="{{theme}}">
|
||||
<view class="page__hd" wx:if="{{false}}">
|
||||
<view class="page__title">我的成绩</view>
|
||||
<view class="page__desc">我在学校学习生活的概况</view>
|
||||
</view>
|
||||
<view class="page__hd" wx:else>
|
||||
<view class="page__title">2020-2021学年秋季学期</view>
|
||||
<view class="page__desc">该学期的学习生活概况</view>
|
||||
</view>
|
||||
<view wx:if="{{false}}">
|
||||
<view class="page__bd">
|
||||
<view class="weui-form-preview">
|
||||
<view class="weui-form-preview__hd">
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">姓名</label>
|
||||
<em class="weui-form-preview__value">李xx</em>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-form-preview__bd">
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">所修学分</label>
|
||||
<text class="weui-form-preview__value">135.5</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">修完的课程数</label>
|
||||
<text class="weui-form-preview__value">62</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">未通过课程数</label>
|
||||
<text class="weui-form-preview__value">0</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">总学分积</label>
|
||||
<text class="weui-form-preview__value">89.67</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">总绩点</label>
|
||||
<text class="weui-form-preview__value">3.85</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">学期数</label>
|
||||
<text class="weui-form-preview__value">5</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-form-preview__ft">
|
||||
<a class="weui-form-preview__btn weui-form-preview__btn_primary">反映问题</a>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="page__bd">
|
||||
<view class="weui-cells__title">每个学期的情况</view>
|
||||
<view class="weui-cells demo_badge_cells">
|
||||
<view class="weui-cell weui-cell_active weui-cell_access">
|
||||
<view class="weui-cell__bd">
|
||||
<text class="demo_badge_title">2021-2022学年 秋季学期</text>
|
||||
</view>
|
||||
<view class="weui-cell__ft"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:else>
|
||||
<view class="page__bd">
|
||||
<view class="weui-form-preview">
|
||||
<view class="weui-form-preview__hd">
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">姓名</label>
|
||||
<em class="weui-form-preview__value">李xx</em>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-form-preview__bd">
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">所修学分</label>
|
||||
<text class="weui-form-preview__value">32.5</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">修完的课程数</label>
|
||||
<text class="weui-form-preview__value">10</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">未通过课程数</label>
|
||||
<text class="weui-form-preview__value">0</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">学期学分积</label>
|
||||
<text class="weui-form-preview__value">92.85</text>
|
||||
</view>
|
||||
<view class="weui-form-preview__item">
|
||||
<label class="weui-form-preview__label">学期绩点</label>
|
||||
<text class="weui-form-preview__value">3.95</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-form-preview__ft">
|
||||
<a class="weui-form-preview__btn weui-form-preview__btn_primary">反映问题</a>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page__bd">
|
||||
<view class="weui-panel">
|
||||
<view class="weui-panel__hd">各课程情况</view>
|
||||
<view class="weui-panel__bd">
|
||||
<view class="weui-media-box weui-media-box_text">
|
||||
<h4 class="weui-media-box__title">计算机网络</h4>
|
||||
<view class="weui-media-box__desc">专业核心课程</view>
|
||||
<view class="weui-media-box__info">
|
||||
<view class="weui-media-box__info__meta">最终成绩 92.5</view>
|
||||
<view class="weui-media-box__info__meta">2 学分</view>
|
||||
<view class="weui-media-box__info__meta weui-media-box__info__meta_extra">绩点 3.9</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
1
pages/my-grade/my-grade.wxss
Normal file
@ -0,0 +1 @@
|
||||
/* pages/my-grade/my-grade.wxss */
|