diff --git a/210340090 邹国涛-实践总结报告.docx b/210340090 邹国涛-实践总结报告.docx new file mode 100644 index 0000000..e149355 Binary files /dev/null and b/210340090 邹国涛-实践总结报告.docx differ diff --git a/zgt_src/asset/imgs/R-C.jpg b/zgt_src/asset/imgs/R-C.jpg new file mode 100644 index 0000000..007a8d3 Binary files /dev/null and b/zgt_src/asset/imgs/R-C.jpg differ diff --git a/zgt_src/asset/imgs/登录1.jpg b/zgt_src/asset/imgs/登录1.jpg new file mode 100644 index 0000000..e9fdc8c Binary files /dev/null and b/zgt_src/asset/imgs/登录1.jpg differ diff --git a/zgt_src/asset/imgs/登录2.jpg b/zgt_src/asset/imgs/登录2.jpg new file mode 100644 index 0000000..8ad2a68 Binary files /dev/null and b/zgt_src/asset/imgs/登录2.jpg differ diff --git a/zgt_src/asset/imgs/登录界面1.jpg b/zgt_src/asset/imgs/登录界面1.jpg new file mode 100644 index 0000000..3b51a48 Binary files /dev/null and b/zgt_src/asset/imgs/登录界面1.jpg differ diff --git a/zgt_src/course/course.js b/zgt_src/course/course.js new file mode 100644 index 0000000..30d0818 --- /dev/null +++ b/zgt_src/course/course.js @@ -0,0 +1,270 @@ +// pages/course/course.js +/*Page({ + + /** + * 页面的初始数据 + + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + + onShareAppMessage() { + + } +})*/ + +// pages/index/index.js +Page({ + + data: { + mounth:"11", // 显示月份 + // 头部数据 (数据也可以存储在数据库中读取出来,这样代码可以减少许多) + allOver:[{ + id:0, // ID + week:"日", // 周 + date:"23" // 日 + },{ + id:1, + week:"一", + date:"24" + },{ + id:2, + week:"二", + date:"25" + },{ + id:3, + week:"三", + date:"26" + },{ + id:4, + week:"四", + date:"27" + },{ + id:5, + week:"五", + date:"28" + },{ + id:6, + week:"六", + date:"29" + }], + // 课程数据 (如果要从数据库取数据,需要进行排序) + courseInfo:[{ + id:0, + week:"星期日", + // 代表当天拥有的课程 + courseList:[ + // 同理也需要排序,可以根据position来进行定位 + { + id:0, + position:1, + ifexist:false, + },{ + id:1, + position:2, + ifexist:true, // 存在与否属性 + courseName:"高等数学", // 课程名称 + courseRoom:"A-201" // 课程教室 + },{ + id:2, + position:3, + ifexist:false, + },{ + id:3, + position:4, + ifexist:false, + }] + },{ + id:1, + week:"星期一", + courseList:[{ + id:0, + position:1, + ifexist:true, + courseName:"线性代数", + courseRoom:"B-301", + },{ + id:1, + position:2, + ifexist:true, + courseName:"计算机导论", + courseRoom:"N25-101" + },{ + id:2, + position:3, + ifexist:false, + },{ + id:3, + position:4, + ifexist:false, + }] + },{ + id:2, + week:"星期二", + courseList:[{ + id:0, + position:1, + ifexist:false + },{ + id:1, + position:2, + ifexist:true, + courseName:"数据结构", + courseRoom:"S3-201" + },{ + id:2, + position:3, + ifexist:false, + },{ + id:3, + position:4, + ifexist:false, + }] + },{ + id:3, + week:"星期三", + courseList:[{ + id:0, + position:1, + ifexist:false, + },{ + id:1, + position:2, + ifexist:false, + },{ + id:2, + position:3, + ifexist:true, + courseName:"互联网开发", + courseRoom:"N18-214" + },{ + id:3, + position:4, + ifexist:false, + }] + },{ + id:4, + week:"星期四", + courseList:[{ + id:0, + position:1, + ifexist:true, + courseName:"程序设计基础", + courseRoom:"N25-333" + },{ + id:1, + position:2, + ifexist:false, + },{ + id:2, + position:3, + ifexist:false, + },{ + id:3, + position:4, + ifexist:false, + }] + },{ + id:5, + week:"星期五", + courseList:[{ + id:0, + position:1, + ifexist:true, + courseName:"接口技术", + courseRoom:"N25-331" + },{ + id:1, + position:2, + ifexist:false, + },{ + id:2, + position:3, + ifexist:false, + },{ + id:3, + position:4, + ifexist:false, + }] + },{ + id:6, + week:"星期六", + courseList:[{ + id:0, + position:1, + ifexist:true, + courseName:"Java程序设计", + courseRoom:"S5-101" + },{ + id:1, + position:2, + ifexist:false, + },{ + id:2, + position:3, + ifexist:false, + },{ + id:3, + position:4, + ifexist:false, + }] + }] + }, + + onLoad(options) { + + }, + +}) \ No newline at end of file diff --git a/zgt_src/course/course.json b/zgt_src/course/course.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/zgt_src/course/course.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/zgt_src/course/course.wxml b/zgt_src/course/course.wxml new file mode 100644 index 0000000..189a020 --- /dev/null +++ b/zgt_src/course/course.wxml @@ -0,0 +1,64 @@ + +pages/course/course.wxml + + + + + + + + 10 + + + + + {{item.week}} + {{item.date}} + + + + + + + + + + + + + + {{index+1}} + + + + + + + + + + + + + {{item1.courseList[index2].courseRoom}} + + + {{item1.courseList[index2].courseName}} + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zgt_src/course/course.wxss b/zgt_src/course/course.wxss new file mode 100644 index 0000000..0090358 --- /dev/null +++ b/zgt_src/course/course.wxss @@ -0,0 +1,77 @@ +/* pages/course/course.wxss */ + + +page{ + width: 100%; + height: 100%; +} + +.farther_box{ + width: 100%; + height: 100%; + display: flex; + flex-direction: column; +} +/* 头部样式 */ +.header_box{ + width: 100%; + display: flex; +} +.header_item{ + flex: 5; + text-align: center; + /*border: 1rpx solid black;*/ + margin-left: 10rpx; + margin-right: 10rpx; +} + +/* 表体样式 */ +.content_box{ + display: flex; + height: 100%; +} +/* 左边 */ +.content_left{ + flex: 1; + text-align: center; + display: flex; + padding-top: 50rpx; + flex-direction: column; +} +.content_left_item{ + flex: 1; +} +/* 右边 */ +.content_right{ + flex: 8; + display: flex; + position: relative; +} +.content_right_week_item{ + height: 100%; + flex: 1; + z-index: 99; +} +.content_right_course_item{ + display: flex; + flex-direction: column; + height: 100%; +} +.course_box{ + flex: 1; + margin:8rpx 2rpx; +} +.course_item{ + width: 100%; + height: 100%; + background-color: #9afffa; + border-radius: 15rpx; +} +.block{ + flex: 1; +} +.gildLines{ + display: flex; + height: 100%; + flex-direction: column; +} \ No newline at end of file diff --git a/zgt_src/pages/index/index.js b/zgt_src/pages/index/index.js new file mode 100644 index 0000000..0bc1771 --- /dev/null +++ b/zgt_src/pages/index/index.js @@ -0,0 +1,48 @@ +// index.js +// 获取应用实例 +const app = getApp() + +Page({ + data: { + motto: 'Hello World', + userInfo: {}, + hasUserInfo: false, + canIUse: wx.canIUse('button.open-type.getUserInfo'), + canIUseGetUserProfile: false, + canIUseOpenData: wx.canIUse('open-data.type.userAvatarUrl') && wx.canIUse('open-data.type.userNickName') // 如需尝试获取用户信息可改为false + }, + // 事件处理函数 + bindViewTap() { + wx.navigateTo({ + url: '../logs/logs' + }) + }, + onLoad() { + if (wx.getUserProfile) { + this.setData({ + canIUseGetUserProfile: true + }) + } + }, + getUserProfile(e) { + // 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认,开发者妥善保管用户快速填写的头像昵称,避免重复弹窗 + wx.getUserProfile({ + desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 + success: (res) => { + console.log(res) + this.setData({ + userInfo: res.userInfo, + hasUserInfo: true + }) + } + }) + }, + getUserInfo(e) { + // 不推荐使用getUserInfo获取用户信息,预计自2021年4月13日起,getUserInfo将不再弹出弹窗,并直接返回匿名的用户个人信息 + console.log(e) + this.setData({ + userInfo: e.detail.userInfo, + hasUserInfo: true + }) + } +}) diff --git a/zgt_src/pages/index/index.json b/zgt_src/pages/index/index.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/zgt_src/pages/index/index.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/zgt_src/pages/index/index.wxml b/zgt_src/pages/index/index.wxml new file mode 100644 index 0000000..f00d294 --- /dev/null +++ b/zgt_src/pages/index/index.wxml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + 请使用1.4.4及以上版本基础库 + + + + {{userInfo.nickName}} + + + + {{motto}} + + diff --git a/zgt_src/pages/index/index.wxss b/zgt_src/pages/index/index.wxss new file mode 100644 index 0000000..eb64203 --- /dev/null +++ b/zgt_src/pages/index/index.wxss @@ -0,0 +1,19 @@ +/**index.wxss**/ +.userinfo { + display: flex; + flex-direction: column; + align-items: center; + color: #aaa; +} + +.userinfo-avatar { + overflow: hidden; + width: 128rpx; + height: 128rpx; + margin: 20rpx; + border-radius: 50%; +} + +.usermotto { + margin-top: 200px; +} \ No newline at end of file diff --git a/zgt_src/pages/login/index.js b/zgt_src/pages/login/index.js new file mode 100644 index 0000000..c05b912 --- /dev/null +++ b/zgt_src/pages/login/index.js @@ -0,0 +1,45 @@ +// pages/login/index.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + stuId: '', //学号 + password: '' //密码 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + login(){ + const postData = { + stuId: this.data.stuId, + password: this.data.password + } + wx.request({ + url: 'http://localhost:3000/login', + data:postData, + method: 'POST', + success(res){ + console.log(res) + if (res.data.code == -1){ + wx.showToast({ + title: res.data.msg, + icon: 'none' + }) + return + } + wx.setStorageSync('token',res.data.data.cookie) + wx.showToast({ + title: '登录成功', + icon: 'success' + }) + } + }) + } +}) \ No newline at end of file diff --git a/zgt_src/pages/login/index.json b/zgt_src/pages/login/index.json new file mode 100644 index 0000000..2970c22 --- /dev/null +++ b/zgt_src/pages/login/index.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBartitleText": "登录" +} \ No newline at end of file diff --git a/zgt_src/pages/login/index.wxml b/zgt_src/pages/login/index.wxml new file mode 100644 index 0000000..71aea59 --- /dev/null +++ b/zgt_src/pages/login/index.wxml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zgt_src/pages/login/index.wxss b/zgt_src/pages/login/index.wxss new file mode 100644 index 0000000..12196a3 --- /dev/null +++ b/zgt_src/pages/login/index.wxss @@ -0,0 +1,53 @@ +page{ + background: rgba(250,250,250,1) +} + +.login { + padding:30rpx; + margin-top:60rpx; +} + +.form-item input { +} + +.form-item image { + width: 32rpx; + height: 32rpx; + margin-right: 32rpx; +} +.login button{ + width: 100%; + border-radius: 60rpx; + background: linear-gradient( + 90deg, + rgba(193,239,245,0.9) 0%, + rgba(10,232,240,1) 1%, + rgba(136,242,223,1) 100% + ); + box-shadow: 0rpx 0rpx 12rpx 0rpx rgba(0,0,0,0.1); + color: #fff; + margin-top: 100rpx; +} + +.header { + display: flex; + justify-content: center; + margin-top: 106rpx; +} + +.header image { + width: 600rpx; + height: 300rpx; +} + +.form-item { + height: 98rpx; + border-radius: 60rpx; + background: rgba(255,255,255,1); + border: 1rpx solid rgba(232,232,232,0.86); + box-shadow: 0rpx 0rpx 2rpx -4rpx rgba(0,0,0,0.1); + display: flex; + align-items: center; + padding: 0 30rpx; + margin-bottom: 40rpx; +} \ No newline at end of file diff --git a/zgt_src/pages/logs/logs.js b/zgt_src/pages/logs/logs.js new file mode 100644 index 0000000..85f6aac --- /dev/null +++ b/zgt_src/pages/logs/logs.js @@ -0,0 +1,18 @@ +// logs.js +const util = require('../../utils/util.js') + +Page({ + data: { + logs: [] + }, + onLoad() { + this.setData({ + logs: (wx.getStorageSync('logs') || []).map(log => { + return { + date: util.formatTime(new Date(log)), + timeStamp: log + } + }) + }) + } +}) diff --git a/zgt_src/pages/logs/logs.json b/zgt_src/pages/logs/logs.json new file mode 100644 index 0000000..3ee76c1 --- /dev/null +++ b/zgt_src/pages/logs/logs.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "查看启动日志", + "usingComponents": {} +} \ No newline at end of file diff --git a/zgt_src/pages/logs/logs.wxml b/zgt_src/pages/logs/logs.wxml new file mode 100644 index 0000000..0b6b645 --- /dev/null +++ b/zgt_src/pages/logs/logs.wxml @@ -0,0 +1,6 @@ + + + + {{index + 1}}. {{log.date}} + + diff --git a/zgt_src/pages/logs/logs.wxss b/zgt_src/pages/logs/logs.wxss new file mode 100644 index 0000000..94d4b88 --- /dev/null +++ b/zgt_src/pages/logs/logs.wxss @@ -0,0 +1,8 @@ +.log-list { + display: flex; + flex-direction: column; + padding: 40rpx; +} +.log-item { + margin: 10rpx; +} diff --git a/zgt_src/utils/util.js b/zgt_src/utils/util.js new file mode 100644 index 0000000..764bc2c --- /dev/null +++ b/zgt_src/utils/util.js @@ -0,0 +1,19 @@ +const formatTime = date => { + const year = date.getFullYear() + const month = date.getMonth() + 1 + const day = date.getDate() + const hour = date.getHours() + const minute = date.getMinutes() + const second = date.getSeconds() + + return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}` +} + +const formatNumber = n => { + n = n.toString() + return n[1] ? n : `0${n}` +} + +module.exports = { + formatTime +} diff --git a/信息查询_分析类图.png b/信息查询_分析类图.png new file mode 100644 index 0000000..8a9b05d Binary files /dev/null and b/信息查询_分析类图.png differ diff --git a/信息查询_分析顺序图 .png b/信息查询_分析顺序图 .png new file mode 100644 index 0000000..b1cc4d3 Binary files /dev/null and b/信息查询_分析顺序图 .png differ diff --git a/信息查询_界面跳转图 (1).png b/信息查询_界面跳转图 (1).png new file mode 100644 index 0000000..b50ccaf Binary files /dev/null and b/信息查询_界面跳转图 (1).png differ diff --git a/信息查询_设计顺序图 (1) (1).png b/信息查询_设计顺序图 (1) (1).png new file mode 100644 index 0000000..85da71d Binary files /dev/null and b/信息查询_设计顺序图 (1) (1).png differ diff --git a/信息查询功能_界面设计.png b/信息查询功能_界面设计.png new file mode 100644 index 0000000..5542230 Binary files /dev/null and b/信息查询功能_界面设计.png differ diff --git a/信息查询功能_界面设计类图 (1).png b/信息查询功能_界面设计类图 (1).png new file mode 100644 index 0000000..91d5532 Binary files /dev/null and b/信息查询功能_界面设计类图 (1).png differ diff --git a/信息查询功能_设计类图 (2).png b/信息查询功能_设计类图 (2).png new file mode 100644 index 0000000..e495454 Binary files /dev/null and b/信息查询功能_设计类图 (2).png differ diff --git a/航大云新生报到系统_代码质量分析报告.xlsx b/航大云新生报到系统_代码质量分析报告.xlsx new file mode 100644 index 0000000..a0a11f1 Binary files /dev/null and b/航大云新生报到系统_代码质量分析报告.xlsx differ