@ -1 +0,0 @@
|
||||
Subproject commit 97989f10ff0550c04566286966fcb0a8db53f446
|
@ -0,0 +1,47 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/menu/menu",
|
||||
"pages/my/my",
|
||||
"pages/bd/bd",
|
||||
"pages/uploadfile/uploadfile",
|
||||
"pages/list/list",
|
||||
"pages/operation/operation",
|
||||
"pages/list1/list1",
|
||||
"pages/operation1/operation1",
|
||||
"pages/mmm/mmm",
|
||||
"pages/submit/submit",
|
||||
"pages/dragon/dragon"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTitleText": "班级通",
|
||||
"navigationBarTextStyle": "black"
|
||||
},
|
||||
"tabBar": {
|
||||
"selectedColor": "#33a3dc",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"text": "首页",
|
||||
"iconPath": "/static/index/index.png",
|
||||
"selectedIconPath": "/static/index/index_active.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/menu/menu",
|
||||
"text": "菜单",
|
||||
"iconPath": "/static/menu/menu.png",
|
||||
"selectedIconPath": "/static/menu/menu_active.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/my/my",
|
||||
"text": "我的",
|
||||
"iconPath": "/static/my/my.png",
|
||||
"selectedIconPath": "/static/my/my_active.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
"style": "v2",
|
||||
"sitemapLocation": "sitemap.json"
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
// app.ts
|
||||
App<IAppOption>({
|
||||
globalData: {
|
||||
|
||||
},
|
||||
onLaunch() {
|
||||
// 展示本地存储能力
|
||||
// const logs = wx.getStorageSync('logs') || []
|
||||
// logs.unshift(Date.now())
|
||||
// wx.setStorageSync('logs', logs)
|
||||
|
||||
// 登录
|
||||
// wx.login({
|
||||
// success: res => {
|
||||
// console.log(res.code)
|
||||
// 发送 res.code 到后台换取 openId, sessionKey, unionId
|
||||
// },
|
||||
// })
|
||||
},
|
||||
})
|
@ -0,0 +1,6 @@
|
||||
/**app.wxss**/
|
||||
page {
|
||||
height: 100%;
|
||||
overflow-y: scroll;
|
||||
background: rgb(243, 243, 243);
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "任务信息列表"
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
/* pages/list/list.wxss */
|
||||
.container{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding-top: 10rpx;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.widget{
|
||||
position: relative;
|
||||
margin-top: 5rpx;
|
||||
margin-bottom: 5rpx;
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
padding-left: 5rpx;
|
||||
padding-right: 4rpx;
|
||||
border: rgb(16, 196, 157) 1px solid;
|
||||
}
|
||||
|
||||
.row{
|
||||
width: 3rem;
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
.form-box picker{
|
||||
margin: 30rpx 30rpx 0 0;
|
||||
color: rgb(187, 19, 19);
|
||||
}
|
||||
|
||||
.link-row{
|
||||
width: 5rem;
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
.link{
|
||||
color: blue;
|
||||
display: inline-table;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
// pages/mmm/mmm.ts
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
mmm:'',
|
||||
releaseFlag: false
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function () {
|
||||
|
||||
|
||||
},
|
||||
atbutton(){
|
||||
let skey = wx.getStorageSync('skey')
|
||||
var that = this
|
||||
wx.request({ //请求地址
|
||||
url: 'http://127.0.0.1:81/getrcode',
|
||||
method: 'GET',
|
||||
data:{
|
||||
skey:skey},
|
||||
header: { //请求头
|
||||
'content-type': 'application/json'
|
||||
// "Content-Type": "application/x-www-form-urlencoded"
|
||||
},
|
||||
|
||||
|
||||
success: function (res:any) {
|
||||
wx.showModal({
|
||||
title: '验证码',
|
||||
content: res.data
|
||||
})
|
||||
|
||||
if (res.confirm) {//这里是点击了确定以后
|
||||
console.log('用户点击确定')
|
||||
} else {//这里是点击了取消以后
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,6 @@
|
||||
<!--pages/mmm/mmm.wxml-->
|
||||
<view class="page-body">
|
||||
<view class="btn-area" id="buttonContainer" catchtap="atbutton">
|
||||
<button type="primary" >获取验证码</button>
|
||||
</view>
|
||||
</view>
|
@ -0,0 +1,5 @@
|
||||
/* pages/mmm/mmm.wxss */
|
||||
button{
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "任务信息表单"
|
||||
}
|
@ -0,0 +1,147 @@
|
||||
// logs.ts
|
||||
// const util = require('../../utils/util.js')
|
||||
import { formatTime } from '../../utils/util'
|
||||
|
||||
Page({
|
||||
data: {
|
||||
logs: [],
|
||||
taskList: [],
|
||||
taskFlag: false,
|
||||
releaseFlag: false,
|
||||
id:undefined,
|
||||
name:'',
|
||||
property:'',
|
||||
stuid:'',
|
||||
deadtime:'',
|
||||
addUrl:'http://localhost:81/task/addTask',
|
||||
updateUrl:'http://localhost:81/task/taskInfo',
|
||||
from: {
|
||||
taskName: "",
|
||||
end: ""
|
||||
}
|
||||
},
|
||||
|
||||
inputFrom(event:any) {
|
||||
if (event.currentTarget.dataset.gater == "from.end") {
|
||||
let num = event.detail.value;
|
||||
if (num.length == 4) num += "-";
|
||||
if (num.length == 7) num += "-";
|
||||
this.setData({ [`from.end`]: num })
|
||||
} else if(event.currentTarget.dataset.gater == "from.taskName"){
|
||||
this.setData({
|
||||
[`${event.currentTarget.dataset.gater}`]: event.detail.value
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
[`${event.currentTarget.dataset.gater}`]: event.detail.value
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
addSelect() {
|
||||
const { taskName, end } = this.data.from;
|
||||
if (end.length != 10) return;
|
||||
if (!taskName || !end) {
|
||||
wx.showToast({
|
||||
title: "请填写任务名称和任务进度",
|
||||
icon: 'error',
|
||||
});
|
||||
return;
|
||||
}
|
||||
const list = wx.getStorageSync("taskList") || [];
|
||||
const index = list.findIndex((item:any) => item.title == taskName);
|
||||
if (index >= 0) {
|
||||
wx.showToast({
|
||||
title: "任务名称重复",
|
||||
icon: 'error',
|
||||
});
|
||||
return;
|
||||
}
|
||||
const data = {
|
||||
id: list.length + 1,
|
||||
title: taskName,
|
||||
startTime: formatTime(new Date), endTime: end, end: '40',
|
||||
}
|
||||
list.push(data)
|
||||
wx.setStorageSync("taskList", list);
|
||||
wx.showToast({
|
||||
title: "发布成功",
|
||||
icon: 'success',
|
||||
});
|
||||
this.setData({
|
||||
taskList: wx.getStorageSync("taskList") || []
|
||||
});
|
||||
},
|
||||
formSubmit:function(e:any){
|
||||
var that = this;
|
||||
//获取表单值
|
||||
var formData = e.detail.value;
|
||||
var url = this.data.addUrl;
|
||||
if(this.data.id != undefined){
|
||||
//如果是编辑按钮跳转
|
||||
formData.id = this.data.id;
|
||||
url = this.data.updateUrl;
|
||||
}
|
||||
console.log(JSON.stringify(formData));
|
||||
wx.request({
|
||||
url: url,
|
||||
//将其转换成JSON
|
||||
data: JSON.stringify(formData),
|
||||
method: 'POST',
|
||||
success: function(res:any) {
|
||||
var result = res.data.success;
|
||||
var toastText = '请求成功';
|
||||
if(!result){
|
||||
toastText = '请求失败'+res.data.msg;
|
||||
}
|
||||
wx.showToast({
|
||||
title: toastText,
|
||||
duration: 2000,
|
||||
})
|
||||
if(result){
|
||||
wx.redirectTo({
|
||||
//操作结束后跳转回列表页
|
||||
url: '../list/list',
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
atTaskFlag() {
|
||||
this.setData({ taskFlag: !this.data.taskFlag })
|
||||
},
|
||||
onShow() {
|
||||
this.setData({
|
||||
taskList: wx.getStorageSync("taskList") || []
|
||||
});
|
||||
},
|
||||
onLoad: function (options:any) {
|
||||
//options为页面跳转带来的参数
|
||||
var that = this;
|
||||
if(options.id != undefined){
|
||||
//若是由编辑按钮跳转过来的
|
||||
that.setData({
|
||||
id:options.id
|
||||
});
|
||||
wx.request({
|
||||
url: 'http://localhost:81/task/one',
|
||||
data: {'id':options.id},
|
||||
method: 'GET',
|
||||
success: function(res:any) {
|
||||
var result = res.data.success;
|
||||
if(result){
|
||||
that.setData({
|
||||
areaName:res.data.data.name,
|
||||
priority: res.data.data.priority
|
||||
});
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: '请求失败'+res.data.msg,
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
@ -0,0 +1,19 @@
|
||||
<view class="release-view">
|
||||
<form bindsubmit='formSubmit' bindreset='formReset'>
|
||||
<label>任务名称
|
||||
<input type='text' name='name' placeholder='请输入任务名' value='{{name}}'></input>
|
||||
</label>
|
||||
<label>任务结束时间
|
||||
<input type="text" name="deadtime" value="{{deadtime}}" placeholder="输入任务结束时间" ></input>
|
||||
</label>
|
||||
<label>任务详情
|
||||
<input type="text" name="property" value="{{property}}" placeholder="输入任务详情" ></input>
|
||||
</label>
|
||||
|
||||
|
||||
<view class='row'>
|
||||
<button type='primary' form-type='submit' catchtap="addSelect">提交</button>
|
||||
<button type='primary' form-type='reset'>清空</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
@ -0,0 +1,69 @@
|
||||
/* pages/opration/opration.wxss */
|
||||
.row input {
|
||||
font-size: 0.7rem;
|
||||
flex-grow: 3;
|
||||
border: ipx solid #09c;
|
||||
display: inline-block;
|
||||
border-radius: 0.3rem;
|
||||
box-shadow: 0 0 0.15rem #aaa;
|
||||
padding: 0.3rem;
|
||||
}
|
||||
|
||||
.row button {
|
||||
padding: 0.3rem;
|
||||
margin: 3rem 1rem;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 1rem;
|
||||
font-size: 0.9rem;
|
||||
line-height: 1.5rem;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 0.8rem;
|
||||
}
|
||||
|
||||
.row text {
|
||||
flex-grow: 1.5;
|
||||
text-align: right;
|
||||
}
|
||||
.form-box picker{
|
||||
margin: 30rpx 30rpx 0 0;
|
||||
color: rgb(153, 153, 153);
|
||||
}
|
||||
|
||||
.title {
|
||||
background: #fff;
|
||||
display: inline-block;
|
||||
border-radius: 4px;
|
||||
padding: 4px;
|
||||
margin: 10px 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.title::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 100vw;
|
||||
height: 4px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.release-view{
|
||||
padding: 8px;
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.release-view input{
|
||||
border: 1px #ccc solid;
|
||||
border-radius: 4px;
|
||||
margin: 6px 0;
|
||||
padding: 4px;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "请完成任务提交"
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
/* pages/submit/submit.wxss */
|
||||
.wrip-view {
|
||||
height: 100%;
|
||||
}
|
||||
.image {
|
||||
height: 120%;
|
||||
position: relative;
|
||||
}
|
||||
.swip {
|
||||
background: rgb(243, 243, 243);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.swip-text {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
color: rgb(95, 95, 95);
|
||||
}
|
||||
.container{
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding-top: 10rpx;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.widget{
|
||||
position: relative;
|
||||
margin-top: 5rpx;
|
||||
margin-bottom: 5rpx;
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
padding-left: 5rpx;
|
||||
padding-right: 4rpx;
|
||||
border: rgb(16, 196, 157) 1px solid;
|
||||
}
|
||||
|
||||
.row{
|
||||
width: 3rem;
|
||||
font-size:larger;
|
||||
display: table-cell;
|
||||
}
|
||||
.column{
|
||||
font-size:larger;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.form-box picker{
|
||||
margin: 30rpx 30rpx 0 0;
|
||||
color: rgb(187, 19, 19);
|
||||
}
|
||||
|
||||
.link-row{
|
||||
width: 5rem;
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
.link{
|
||||
color: blue;
|
||||
display: inline-table;
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
|
||||
"rules": [{
|
||||
"action": "allow",
|
||||
"page": "*"
|
||||
}]
|
||||
}
|
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,19 @@
|
||||
export const formatTime = (date: 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: number) => {
|
||||
const s = n.toString()
|
||||
return s[1] ? s : '0' + s
|
||||
}
|