After Width: | Height: | Size: 262 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 116 KiB |
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
<!--pages/course/course.wxml-->
|
||||
<text>pages/course/course.wxml</text>
|
||||
|
||||
|
||||
<!--pages/index/index.wxml-->
|
||||
<view class="farther_box">
|
||||
<!-- 头部 -->
|
||||
<view class="header_box">
|
||||
<view class="header_item" style="font-weight: bold;font-size: 29rpx;margin-top: 10rpx;">
|
||||
<view>10</view>
|
||||
<view>月</view>
|
||||
</view>
|
||||
<block wx:for="{{allOver}}" wx:key="id">
|
||||
<view class="header_item">
|
||||
<view style="font-weight: bold;margin-bottom: 15rpx;">{{item.week}}</view>
|
||||
<view style="color: #b2b2b2;">{{item.date}}</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 下划线 -->
|
||||
<view style="width: 100%;height: 1rpx;background-color:#ccc ;margin: 8rpx 0;"></view>
|
||||
|
||||
<!-- 表体 -->
|
||||
<view class="content_box">
|
||||
<!-- 左 -->
|
||||
<view class="content_left">
|
||||
<view class="content_left_item" wx:for="{{8}}" wx:key="*this">
|
||||
{{index+1}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 右 -->
|
||||
<view class="content_right">
|
||||
<!-- 课表内容 -->
|
||||
<view class="content_right_week_item" wx:for="{{courseInfo}}" wx:for-item="item1" wx:for-index="index1" wx:key="id">
|
||||
<view class="content_right_course_item">
|
||||
<view class="course_box" wx:for="{{4}}" wx:for-item="item2" wx:for-index="index2" wx:key="*this">
|
||||
<!-- 根据每个课表的存在属性来判断是否显示 -->
|
||||
<block wx:if="{{item1.courseList[index2].ifexist}}">
|
||||
<view class="course_item">
|
||||
<view style="font-size: small;text-align: center;padding: 5rpx;">
|
||||
{{item1.courseList[index2].courseRoom}}
|
||||
</view>
|
||||
<view style="padding-top: 5rpx;">
|
||||
{{item1.courseList[index2].courseName}}
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 背景网格线 -->
|
||||
<view style="position: absolute;width: 100%;height: 100%;z-index: 1;" >
|
||||
<view class="gildLines">
|
||||
<view style="flex: 1;border-bottom: 1rpx dashed #ccc;"wx:for="{{8}}" wx:key="*this"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -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;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
<!--index.wxml-->
|
||||
<view class="container">
|
||||
<view class="userinfo">
|
||||
<block wx:if="{{canIUseOpenData}}">
|
||||
<view class="userinfo-avatar" bindtap="bindViewTap">
|
||||
<open-data type="userAvatarUrl"></open-data>
|
||||
</view>
|
||||
<open-data type="userNickName"></open-data>
|
||||
</block>
|
||||
<block wx:elif="{{!hasUserInfo}}">
|
||||
<button wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile"> 获取头像昵称 </button>
|
||||
<button wx:elif="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button>
|
||||
<view wx:else> 请使用1.4.4及以上版本基础库 </view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<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>
|
||||
</view>
|
@ -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;
|
||||
}
|
@ -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'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBartitleText": "登录"
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<view class="container">
|
||||
<view class="header">
|
||||
<image src="/asset/imgs/登录界面1.jpg" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="login">
|
||||
<view class="form-item">
|
||||
<image src="/asset/imgs/登录1.jpg" mode="aspectFill"></image>
|
||||
<input type="text" model:value="{{stuId}}" placeholder="请输入学号" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<image src="/asset/imgs/登录2.jpg" mode="aspectFill"></image>
|
||||
<input type="password" model:value="{{password}}" placeholder="请输入密码"/>
|
||||
</view>
|
||||
<button bindtap="login">登录</button>
|
||||
</view>
|
||||
</view>
|
@ -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;
|
||||
}
|
@ -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
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "查看启动日志",
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
<!--logs.wxml-->
|
||||
<view class="container log-list">
|
||||
<block wx:for="{{logs}}" wx:key="timeStamp" wx:for-item="log">
|
||||
<text class="log-item">{{index + 1}}. {{log.date}}</text>
|
||||
</block>
|
||||
</view>
|
@ -0,0 +1,8 @@
|
||||
.log-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 40rpx;
|
||||
}
|
||||
.log-item {
|
||||
margin: 10rpx;
|
||||
}
|
@ -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
|
||||
}
|
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 32 KiB |