diff --git a/pages/bd/bd.json b/pages/bd/bd.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/bd/bd.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/bd/bd.ts b/pages/bd/bd.ts
new file mode 100644
index 0000000..bd1f96a
--- /dev/null
+++ b/pages/bd/bd.ts
@@ -0,0 +1,135 @@
+// const app = getApp()
+Page({
+ data: {
+ realName: '',
+ number: '',
+ isDisabled: true //表示页面加载完成时disabled为禁用状态
+ },
+
+ onLoad: function(options) {
+ let number = options.number
+ let realName = options.realName
+ this.setData({
+ number,
+ realName
+ })
+ },
+
+ save: function() {
+ let realName = this.data.realName;
+ let number=this.data.number
+ let skey = wx.getStorageSync('skey')
+ wx.request({
+ url: 'http://192.168.58.210:81/save',
+ method: 'GET',
+
+ data: {
+ skey:skey,
+ number:number,
+ realName:realName
+ },
+ success: function(res :any) {
+ if (res.data.error == true) {
+ wx.showToast({
+ title: res.data.message,
+ icon: 'none',
+ duration: 2000
+ })
+ } else {
+ wx.showToast({
+ title: res.data.message,
+ icon: 'success',
+ duration: 5000
+ })
+ wx.removeStorageSync('info')
+ wx.navigateBack({
+ delta: 2
+ })
+
+ }
+ }
+ })
+ },
+
+ inputRealName: function(e :any) {
+ var realName = e.detail.value
+ this.setData({
+ realName
+ })
+ console.log(realName)
+ if (realName !== '') {
+ this.setData({
+ isDisabled: false
+ })
+ } else {
+ this.setData({
+ isDisabled: true
+ })
+ }
+
+ },
+ inputNumber: function(e :any) {
+ var number = e.detail.value
+ this.setData({
+ number
+ })
+ // console.log()
+ if (number !== '') {
+ this.setData({
+ isDisabled: false
+ })
+ } else {
+ this.setData({
+ isDisabled: true
+ })
+ }
+
+ },
+
+ onReady: function() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function() {
+
+ }
+ })
+
\ No newline at end of file
diff --git a/pages/bd/bd.wxml b/pages/bd/bd.wxml
new file mode 100644
index 0000000..f4e001b
--- /dev/null
+++ b/pages/bd/bd.wxml
@@ -0,0 +1,15 @@
+
+
+
+
+ 姓名
+
+
+
+ 学号
+
+
+
+
+
+
diff --git a/pages/bd/bd.wxss b/pages/bd/bd.wxss
new file mode 100644
index 0000000..159e3cd
--- /dev/null
+++ b/pages/bd/bd.wxss
@@ -0,0 +1,30 @@
+/* pages/bd/bd.wxss */
+.binding-item {
+ margin: 40rpx;
+ padding-top: 20rpx;
+ padding-bottom: 40rpx;
+ display: flex;
+ font-size: 32rpx;
+ /* 在模拟器为iphone 6 时,1px=2rpx ,这里设置32rpx,即16px */
+ border-bottom: 1rpx solid #dedede;
+}
+
+.binding-item input {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 100%;
+ padding-left: 20rpx;
+}
+
+.binding-btn{
+ background-color:#19be6b;
+ padding: 28rpx;
+ margin: 40rpx;
+ color: pink;
+ text-align: center;
+}
+.button{
+ margin-top: 30rpx;
+ margin-bottom: 30rpx;
+}
\ No newline at end of file
diff --git a/pages/index/index.json b/pages/index/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/index/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/index/index.ts b/pages/index/index.ts
new file mode 100644
index 0000000..80900c7
--- /dev/null
+++ b/pages/index/index.ts
@@ -0,0 +1,24 @@
+// index.ts
+// 获取应用实例
+const app = getApp()
+Page({
+ data: {
+ taskList: [],
+ motto: 'Hello World',
+ },
+ onShow() {
+ // let list = [
+ // { id: 1, title: "任务一", startTime: "2022-10-01", endTime: "1020-20-22", end: "40" },
+ // { id: 2, title: "任务二", startTime: "2022-10-01", endTime: "1020-20-22", end: "40" },
+ // { id: 3, title: "任务三", startTime: "2022-10-01", endTime: "1020-20-22", end: "40" }
+ // ]
+ this.setData({
+ taskList: wx.getStorageSync("taskList") || []
+ });
+ },
+ onLoad() {
+ this.setData({
+ taskList: wx.getStorageSync("taskList") || []
+ });
+ },
+})
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
new file mode 100644
index 0000000..11f6846
--- /dev/null
+++ b/pages/index/index.wxml
@@ -0,0 +1,33 @@
+
+
+
+
+ 公告栏
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.title}}:
+
+ 开始时间:{{item.startTime}}
+ 截止时间:{{item.endTime}}
+
+
+
+
+
+ 暂无数据
+
+
\ No newline at end of file
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
new file mode 100644
index 0000000..8af355b
--- /dev/null
+++ b/pages/index/index.wxss
@@ -0,0 +1,43 @@
+.wrip-view {
+ height: 100%;
+}
+
+.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);
+}
+
+.task {
+ padding: 8px;
+}
+
+.task-item {
+ padding: 8px 4px 10px 4px;
+ margin: 10px 0;
+ border-radius: 10px;
+ background-color: #fff;
+}
+
+.task-item-title {
+ font-family: "楷体";
+ font-size: 18px;
+ margin-bottom: 6px;
+}
+
+.task-item-text {
+ font-size: 10px;
+ color: rgb(146, 146, 146);
+}
+.error{
+ text-align: center;
+ padding: 20px;
+}
\ No newline at end of file
diff --git a/pages/list/list.json b/pages/list/list.json
new file mode 100644
index 0000000..318f00f
--- /dev/null
+++ b/pages/list/list.json
@@ -0,0 +1,3 @@
+{
+ "navigationBarTitleText": "任务信息列表"
+}
\ No newline at end of file
diff --git a/pages/list/list.ts b/pages/list/list.ts
new file mode 100644
index 0000000..e3c11a6
--- /dev/null
+++ b/pages/list/list.ts
@@ -0,0 +1,137 @@
+// pages/list/list.js
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ list:[]
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ * 与加载的区别,若是返回页面,则不需要加载,而是调用Show方法
+ */
+ onShow: function () {
+ //这里的this是指窗口而在request中this是指onShow方法(因为是页面调用onShow,onShow调用request),所以要先定义
+ var that = this;
+ wx.request({
+ //后端接口提供的url
+ url: 'http://localhost:8080/task/taskList',
+ method:'GET',
+ //需要传入的参数
+ data:{},
+ success:function(res :any){
+ var list = res.data.data;
+ if(list == null){
+ //如果获取数据失败,提示使用者
+ var toastText = '获取数据失败' + res.data.msg;
+ wx.showToast({
+ title: toastText,
+
+ //显示时长为2s
+ duration:2000
+ })
+ }else{
+ that.setData({
+ list:list
+ })
+ }
+ }
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ },
+
+ addTask: function(){
+ wx.navigateTo({
+ url: '../operation/operation',
+ })
+ },
+
+ //e表示响应的控件
+ delTask: function(e :any){
+ var that = this;
+ //相当于confirm窗口
+ wx.showModal({
+ title: '提示',
+ //这里的变量名需要与响应控件的data-后面的变量名相同
+ content: '确认要删除['+e.target.dataset.name+']吗?',
+ success:function(sm){
+ if(sm.confirm){
+ wx.request({
+ url: 'http://localhost:8080/task/delete',
+ data: {'id':e.target.dataset.id},
+ header: {
+ //默认是 'content-type': 'application/json',要传post的参数必须写成这样,要传delete参数则为null
+ "content-type": "application/x-www-form-urlencoded"
+ },
+ method: 'DELETE',
+ success: function(res:any) {
+ var result = res.data.success;
+ var toastText='删除成功';
+ if(result == true){
+ that.data.list.splice(e.target.dataset.index,1);
+ that.setData({
+ list:that.data.list
+ });
+ }else{
+ toastText = '删除失败';
+ }
+ wx.showToast({
+ title: toastText,
+ duration:2000
+ })
+ },
+ })
+ }
+ }
+ })
+ }
+})
\ No newline at end of file
diff --git a/pages/list/list.wxml b/pages/list/list.wxml
new file mode 100644
index 0000000..18393da
--- /dev/null
+++ b/pages/list/list.wxml
@@ -0,0 +1,27 @@
+
+
+
+ ID
+ 名字
+ 信息
+ 时间
+ 操作
+
+
+
+
+
+ {{item.id}}
+ {{item.name}}
+ {{item.property}}
+ {{item.deadtime}}
+
+ 编辑|
+ 删除
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/list/list.wxss b/pages/list/list.wxss
new file mode 100644
index 0000000..a10454d
--- /dev/null
+++ b/pages/list/list.wxss
@@ -0,0 +1,37 @@
+/* pages/list/list.wxss */
+.container{
+ height: 100%;
+ display: table;
+ align-items: center;
+ justify-content: space-between;
+ box-sizing: border-box;
+ padding-top: 10rpx;
+ padding-bottom: 10rpx;
+ text-align: center;
+}
+
+.widget{
+ position: relative;
+ margin-top: 5rpx;
+ margin-bottom: 5rpx;
+ padding-top: 10rpx;
+ padding-bottom: 10rpx;
+ padding-left: 40rpx;
+ padding-right: 40rpx;
+ border: #ddd 1px solid;
+}
+
+.column{
+ width: 4rem;
+ display: table-cell;
+}
+
+.link-column{
+ width: 6rem;
+ display: table-cell;
+}
+
+.link{
+ color: blue;
+ display: inline-table;
+}
\ No newline at end of file
diff --git a/pages/menu/menu.json b/pages/menu/menu.json
new file mode 100644
index 0000000..7a73a41
--- /dev/null
+++ b/pages/menu/menu.json
@@ -0,0 +1,2 @@
+{
+}
\ No newline at end of file
diff --git a/pages/menu/menu.ts b/pages/menu/menu.ts
new file mode 100644
index 0000000..ac1b0f1
--- /dev/null
+++ b/pages/menu/menu.ts
@@ -0,0 +1,99 @@
+// logs.ts
+// const util = require('../../utils/util.js')
+import { formatTime } from '../../utils/util'
+
+Page({
+ data: {
+ logs: [],
+ taskList: [],
+ taskFlag: false,
+ releaseFlag: false,
+ 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") || []
+ });
+ },
+ atReleaseFlag() {
+ const user = wx.getStorageSync("userInfo");
+ console.log(user)
+ if (user!=null) {
+ wx.showToast({
+ title: "请先登录",
+ icon: 'error',
+ });
+ return;
+ }
+ this.setData({ releaseFlag: !this.data.releaseFlag })
+ },
+ atTaskFlag() {
+ this.setData({ taskFlag: !this.data.taskFlag })
+ },
+ onShow() {
+ this.setData({
+ taskList: wx.getStorageSync("taskList") || []
+ });
+ },
+ onLoad() {
+ this.setData({
+ taskList: wx.getStorageSync("taskList") || []
+ });
+ // this.setData({
+ // logs: (wx.getStorageSync('logs') || []).map((log: string) => {
+ // return {
+ // date: formatTime(new Date(log)),
+ // timeStamp: log
+ // }
+ // }),
+ // })
+ },
+})
diff --git a/pages/menu/menu.wxml b/pages/menu/menu.wxml
new file mode 100644
index 0000000..05a0c98
--- /dev/null
+++ b/pages/menu/menu.wxml
@@ -0,0 +1,50 @@
+
+
+
+ 发布任务
+
+
+
+
+
+
+ 发布接龙
+
+
+ 查看任务进度
+
+
+
+
+ {{item.title}}:
+
+ 完成进度:{{item.end}}
+
+
+
+
+
+
+ 暂无任务
+
+
+
+
\ No newline at end of file
diff --git a/pages/menu/menu.wxss b/pages/menu/menu.wxss
new file mode 100644
index 0000000..f805158
--- /dev/null
+++ b/pages/menu/menu.wxss
@@ -0,0 +1,78 @@
+.wrip-view {
+ height: 100%;
+ padding: 0 12px;
+}
+
+.task {
+ padding: 8px;
+ background-color: #fff;
+ border-radius: 4px;
+}
+
+.task-item {
+ padding: 4px 0;
+ margin: 10px 0;
+ border-radius: 10px;
+ position: relative;
+ z-index: 100;
+ background-color: #fff;
+ overflow: hidden;
+}
+
+.task-item-backg {
+ position: absolute;
+ top: 0;
+ background: #77bef0;
+ height: 100%;
+ width: 100%;
+ z-index: -1;
+ border-radius: 10px 0 0 10px;
+}
+
+.task-item-title {
+ font-family: "楷体";
+ font-size: 18px;
+ margin-bottom: 6px;
+ margin-left: 10px;
+}
+
+.task-item-text {
+ text-align: right;
+ font-family: "楷体";
+ font-size: 14px;
+ margin-right: 10px;
+}
+
+
+.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;
+}
\ No newline at end of file
diff --git a/pages/my/my.json b/pages/my/my.json
new file mode 100644
index 0000000..7a73a41
--- /dev/null
+++ b/pages/my/my.json
@@ -0,0 +1,2 @@
+{
+}
\ No newline at end of file
diff --git a/pages/my/my.ts b/pages/my/my.ts
new file mode 100644
index 0000000..3f390be
--- /dev/null
+++ b/pages/my/my.ts
@@ -0,0 +1,77 @@
+// logs.ts
+// const util = require('../../utils/util.js')
+// import { formatTime } from '../../utils/util'
+
+Page({
+ data: {
+ userInfo: {},
+ key:{},
+ },
+ atLogin() {
+ wx.getUserProfile({
+ desc: '展示用户信息',
+ success: (res) => {
+ this.setData({
+ userInfo: res.userInfo,
+ })
+ // wx.setStorageSync("userInfo", res.userInfo);
+ wx.setStorage({
+ key:"userInfo",
+ data:this.data.userInfo,
+ // userInfo:res.userInfo,
+ encrypt: true, // 若开启加密存储,setStorage 和 getStorage 需要同时声明 encrypt 的值为 true
+ success() {
+ wx.getStorage({
+ key: "key",
+ encrypt: true, // 若开启加密存储,setStorage 和 getStorage 需要同时声明 encrypt 的值为 true
+ success(res) {
+ console.log(res.data)
+ }
+ })
+ }
+ })
+ wx.login({
+ success: function(login_res){
+ if(login_res.code){
+ wx.request({
+ url:'http://192.168.58.210:81/atlogin',
+ method:'GET',
+ data:{
+ code:login_res.code,
+ },
+ success:function(res :any){
+ console.log(res)
+ let skey=res.data.skey
+ console.log(skey)
+ wx.setStorageSync('skey',skey)
+
+ }
+
+ })
+ }else{
+ console.log('登录失败!'+login_res.errMsg)
+ }
+ }
+ })
+ }
+ })
+ },
+ onShow() {
+ const userInfo = wx.getStorageSync("userInfo");
+ if (userInfo!=null) return;
+ this.setData({
+ userInfo: userInfo,
+ })
+
+
+
+ },
+ onLoad() {
+ const userInfo = wx.getStorageSync("userInfo");
+ if (userInfo!=null) return;
+ this.setData({
+ userInfo: userInfo,
+ })
+ },
+ })
+
\ No newline at end of file
diff --git a/pages/my/my.wxml b/pages/my/my.wxml
new file mode 100644
index 0000000..f13d23b
--- /dev/null
+++ b/pages/my/my.wxml
@@ -0,0 +1,23 @@
+
+
+
+
+
+ 登录
+
+
+
+
+
+
+
+
+
+
+
+ 已绑定,点击可重新绑定
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/my/my.wxss b/pages/my/my.wxss
new file mode 100644
index 0000000..d89efd2
--- /dev/null
+++ b/pages/my/my.wxss
@@ -0,0 +1,58 @@
+.wrip {
+ padding: 10px;
+}
+
+.log-list {
+ display: flex;
+ flex-direction: column;
+ padding: 40rpx;
+}
+
+.log-item {
+ margin: 10rpx;
+}
+
+.my-head {
+ margin: 0 0 10px 0;
+}
+
+.my-head-box {
+ height: 160px;
+ background: white;
+ border-radius: 5px;
+ position: relative;
+ background-image: linear-gradient(to right top, #d16ba5, #c777b9, #ba83ca, #aa8fd8, #9a9ae1, #8aa7ec, #79b3f4, #69bff8, #52cffe, #41dfff, #46eefa, #5ffbf1);
+}
+
+.my-box {
+ height: 140px;
+ background-image: linear-gradient(to right top, #051937, #004d7a, #008793, #00bf72, #a8eb12);
+ border-radius: 5px;
+}
+
+.head-box-child {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ width: 80px;
+ height: 80px;
+ border-radius: 50%;
+ text-align: center;
+ border: 1px #ccc solid;
+ color: rgb(255, 255, 255);
+ line-height: 80px;
+ overflow: hidden;
+}
+
+.head-box-child image {
+ width: 100%;
+ height: 80px;
+}
+
+.my-top {
+ padding: 4px;
+ color: white;
+ box-shadow: rgba(116, 116, 116, 0.521) 0 0 10px ;
+ background: rgba(204, 204, 204, 0.384);
+}
\ No newline at end of file
diff --git a/pages/operation/operation.json b/pages/operation/operation.json
new file mode 100644
index 0000000..cf3126e
--- /dev/null
+++ b/pages/operation/operation.json
@@ -0,0 +1,3 @@
+{
+ "navigationBarTitleText": "任务信息表单"
+}
\ No newline at end of file
diff --git a/pages/operation/operation.ts b/pages/operation/operation.ts
new file mode 100644
index 0000000..896bf1d
--- /dev/null
+++ b/pages/operation/operation.ts
@@ -0,0 +1,129 @@
+// 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:8080/task/addTask',
+ updateUrl:'http://localhost:8080/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() {
+ this.setData({
+ taskList: wx.getStorageSync("taskList") || []
+ });
+ // this.setData({
+ // logs: (wx.getStorageSync('logs') || []).map((log: string) => {
+ // return {
+ // date: formatTime(new Date(log)),
+ // timeStamp: log
+ // }
+ // }),
+ // })
+ },
+})
diff --git a/pages/operation/operation.wxml b/pages/operation/operation.wxml
new file mode 100644
index 0000000..fa4abc7
--- /dev/null
+++ b/pages/operation/operation.wxml
@@ -0,0 +1,19 @@
+
+
+
diff --git a/pages/operation/operation.wxss b/pages/operation/operation.wxss
new file mode 100644
index 0000000..1a718b3
--- /dev/null
+++ b/pages/operation/operation.wxss
@@ -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;
+}
\ No newline at end of file
diff --git a/pages/uploadfile/uploadfile.json b/pages/uploadfile/uploadfile.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/uploadfile/uploadfile.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/uploadfile/uploadfile.ts b/pages/uploadfile/uploadfile.ts
new file mode 100644
index 0000000..f97b428
--- /dev/null
+++ b/pages/uploadfile/uploadfile.ts
@@ -0,0 +1,66 @@
+// pages/uploadfile/uploadfile.ts
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/uploadfile/uploadfile.wxml b/pages/uploadfile/uploadfile.wxml
new file mode 100644
index 0000000..243352b
--- /dev/null
+++ b/pages/uploadfile/uploadfile.wxml
@@ -0,0 +1,2 @@
+
+文件提交
diff --git a/pages/uploadfile/uploadfile.wxss b/pages/uploadfile/uploadfile.wxss
new file mode 100644
index 0000000..a3f9fbc
--- /dev/null
+++ b/pages/uploadfile/uploadfile.wxss
@@ -0,0 +1 @@
+/* pages/uploadfile/uploadfile.wxss */
\ No newline at end of file