-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
135 changed files
with
3,377 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Windows | ||
[Dd]esktop.ini | ||
Thumbs.db | ||
$RECYCLE.BIN/ | ||
|
||
# macOS | ||
.DS_Store | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
|
||
# Node.js | ||
node_modules/ |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//app.js | ||
App({ | ||
onLaunch: function () { | ||
console.log('app onlaunch'); | ||
var myDate = new Date(); | ||
var currentDate = myDate.getFullYear() + "-" + (myDate.getMonth() + 1) + "-" + myDate.getDate(); | ||
var currentTime = myDate.getHours() + ":" + myDate.getMinutes(); //获取当前分钟数(0-59) | ||
console.log(currentDate); | ||
console.log(currentTime); | ||
this.globalData.currentDate = currentDate; | ||
this.globalData.currentTime = currentTime; | ||
}, | ||
|
||
globalData: {} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"pages": [ | ||
"pages/login/login", | ||
"pages/timeline/timeline", | ||
"pages/logs/logs", | ||
"pages/add/countdown/countdown", | ||
"pages/add/mail/mail", | ||
"pages/add/diary/diary", | ||
"pages/mime/mime", | ||
"pages/myPlan/myPlan", | ||
"pages/myDiary/myDiary", | ||
"pages/myLetter/myLetter", | ||
"pages/myDiaryDetail/myDiaryDetail", | ||
"pages/myLetterDetail/myLetterDetail", | ||
"pages/plan/plan", | ||
"pages/addPlan/addPlan" | ||
], | ||
"window": { | ||
"navigationBarBackgroundColor": "#60C0FF", | ||
"navigationBarTitleText": "规时", | ||
"navigationBarTextStyle": "white", | ||
"backgroundTextStyle": "light" | ||
}, | ||
"tabBar": { | ||
"color": "#333333", | ||
"selectedColor": "#5B80AA", | ||
"borderStyle": "black", | ||
"list": [ | ||
{ | ||
"selectedIconPath": "image/icon/沙漏-click.png", | ||
"iconPath": "image/icon/沙漏.png", | ||
"pagePath": "pages/timeline/timeline", | ||
"text": "倒计时" | ||
}, | ||
{ | ||
"selectedIconPath": "image/icon/时间.png", | ||
"iconPath": "image/icon/时间-click.png", | ||
"pagePath": "pages/plan/plan", | ||
"text": "日计划" | ||
}, | ||
{ | ||
"selectedIconPath": "image/icon/我的-click.png", | ||
"iconPath": "image/icon/我的.png", | ||
"pagePath": "pages/mime/mime", | ||
"text": "MINE" | ||
} | ||
] | ||
}, | ||
"permission": { | ||
"scope.userLocation": { | ||
"desc": "你的位置信息将用于小程序位置接口的效果展示" | ||
} | ||
}, | ||
"sitemapLocation": "sitemap.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/**app.wxss**/ | ||
.container { | ||
display: flex; | ||
padding: 40rpx; | ||
align-items: center; | ||
flex-direction: column; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// 服务器域名 | ||
const baseUrl = 'https://www.qianyucc.xyz/wxapp/'; | ||
// const baseUrl = 'https://localhost:8083/wxapp/'; | ||
// 用户登录 | ||
const loginUrl = baseUrl + 'api/user/login'; | ||
// 添加信息 | ||
const addUrl = baseUrl + 'api/add'; | ||
// 获取倒计时 | ||
const getCountDownUrl = baseUrl + 'api/getCountDown'; | ||
// 获取计划 | ||
const getPlanUrl = baseUrl + 'api/getPlan'; | ||
// 获取信件 | ||
const getLetterUrl = baseUrl + 'api/getLetter'; | ||
// 获取日记 | ||
const getDiaryUrl = baseUrl + 'api/getDiary'; | ||
// 删除数据 | ||
const deleteUrl = baseUrl + 'api/delete'; | ||
// 更新数据 | ||
const updateUrl = baseUrl + 'api/update'; | ||
// 获取完成和未完成的计划数量 | ||
const getPlanCountUrl = baseUrl + 'api/getPlanCount'; | ||
// 获取按照日期分组的计划 | ||
const getPlanGroupByDate = baseUrl + 'api/getPlanGroupByDate'; | ||
|
||
module.exports = { | ||
loginUrl:loginUrl, | ||
addUrl:addUrl, | ||
getCountDownUrl:getCountDownUrl, | ||
getPlanUrl:getPlanUrl, | ||
getLetterUrl:getLetterUrl, | ||
getDiaryUrl:getDiaryUrl, | ||
deleteUrl:deleteUrl, | ||
updateUrl:updateUrl, | ||
getPlanCountUrl: getPlanCountUrl, | ||
getPlanGroupByDate: getPlanGroupByDate | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
const api = require('../../../config/config.js') | ||
|
||
const app = getApp(); | ||
|
||
Page({ | ||
data: { | ||
update:false, | ||
event: '', | ||
enddate: app.globalData.currentDate, | ||
}, | ||
|
||
onLoad: function (options){ | ||
let countDown = {}; | ||
for (let key in options) { | ||
countDown[key] = decodeURIComponent(options[key]); | ||
} | ||
console.log(countDown); | ||
if (JSON.stringify(countDown) != "{}"){ | ||
this.setData({ | ||
update:true, | ||
enddate: countDown.enddate, | ||
input: countDown.event, | ||
countDown:countDown | ||
}); | ||
} | ||
}, | ||
|
||
setevent:function(e){ | ||
console.log('事件发送选择改变,携带值为', e.detail.value) | ||
this.setData({ | ||
event: e.detail.value | ||
}); | ||
}, | ||
|
||
bindDateChange: function (e) { | ||
console.log('picker发送选择改变,携带值为', e.detail.value) | ||
this.setData({ | ||
enddate: e.detail.value | ||
}); | ||
|
||
}, | ||
|
||
formSubmit: function (e) { | ||
let that = this; | ||
console.log('form发生了timelien-submit事件,携带数据为:', e.detail.value); | ||
var event=e.detail.value.input; | ||
var enddate=e.detail.value.data; | ||
if(that.data.update){ | ||
wx.request({ | ||
url: api.updateUrl, | ||
method: "POST", | ||
data: { | ||
type: "countDown", | ||
id: that.data.countDown.id, | ||
data: { | ||
event: event, | ||
endTime: enddate, | ||
} | ||
}, | ||
success: function (res) { | ||
console.log(res.data); | ||
} | ||
}); | ||
} else { | ||
wx.request({ | ||
url: api.addUrl, | ||
method: "POST", | ||
data: { | ||
type: "countDown", | ||
data: { | ||
uid: app.globalData.userInfo.uid, | ||
event: event, | ||
endTime: enddate, | ||
} | ||
}, | ||
success: function (res) { | ||
console.log(res.data); | ||
} | ||
}); | ||
} | ||
wx.navigateBack({ | ||
delta: 1 | ||
}) | ||
}, | ||
|
||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"navigationBarBackgroundColor": "#7AA3CC", | ||
"navigationBarTextStyle": "white", | ||
"backgroundTextStyle": "light", | ||
"navigationBarTitleText": "倒计时" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<view class='container'> | ||
<form bindsubmit="formSubmit" > | ||
<view class="workname"> | ||
|
||
<text>事件名称: </text> | ||
<input value="{{ input }}" name="input" bindchange='setevent' placeholder=" 例如:六级考试..." /> | ||
</view> | ||
<view class="workname"> | ||
<picker mode="date" name="data" value="{{enddate}}" start="2019-01-01" end="2030-09-01" bindchange="bindDateChange"> | ||
<text>截止日期:</text> | ||
<text style='padding:80rpx;color:gray;padding-left:20rpx;'> {{enddate}}</text> | ||
</picker> | ||
</view> | ||
<view style='padding:50rpx;'> | ||
<button form-type="submit" class="submit">完成</button> | ||
</view> | ||
</form> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.container{ | ||
background: linear-gradient(rgb(122, 163, 204), white); | ||
} | ||
.workname{ | ||
padding-top: 80rpx; | ||
padding-left: 80rpx; | ||
text-align: center; | ||
display: flex; | ||
flex-direction: row; | ||
} | ||
|
||
.submit{ | ||
margin-top: 60rpx; | ||
background-color:#7AA3CC; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
var util = require('../../../utils/util.js') | ||
var bmap = require('../../libs/bmap-wx.min.js') | ||
const api = require('../../../config/config.js') | ||
|
||
const app = getApp(); | ||
|
||
|
||
Page({ | ||
|
||
data: { | ||
intput: '', | ||
weatherData: '', | ||
weekData: '', | ||
dayData: '', | ||
timedata: '', | ||
}, | ||
formSubmit: function(e, ) { | ||
console.log('form发生了submit事件,携带数据为:', e.detail.value), | ||
console.log('timedata:', this.data.timedata), | ||
console.log('时间,天气,记录:', this.data.weatherData) | ||
wx.request({ | ||
url: api.addUrl, | ||
method: "POST", | ||
data: { | ||
type: "diary", | ||
data: { | ||
uid: app.globalData.userInfo.uid, | ||
time: this.data.timedata, | ||
weather: this.data.weatherData.weatherDesc, | ||
week: this.data.weekData, | ||
content: e.detail.value.input, | ||
} | ||
}, | ||
success: function(res) { | ||
console.log(res.data); | ||
wx.showToast({ | ||
title: '添加成功!', | ||
icon: 'success', | ||
duration: 1500, | ||
mask: true | ||
}); | ||
}, | ||
}); | ||
wx.navigateBack({ | ||
delta: 1 | ||
}) | ||
}, | ||
|
||
|
||
onLoad: function() { | ||
var data = util.formatData(new Date()); | ||
this.setData({ | ||
timedata: data, | ||
}); | ||
var that = this; | ||
var BMap = new bmap.BMapWX({ | ||
ak: 'HFTil24AyGBWDrCzbKsxOoKl2OmL2T4O' | ||
}); | ||
var fail = function(data) { | ||
console.log('fail!!!!') | ||
console.log(data); | ||
}; | ||
var success = function(data) { | ||
console.log('success!!!'); | ||
var weatherData = data.currentWeather[0]; | ||
that.setData({ | ||
weatherData: weatherData, | ||
weekData: weatherData.date.substring(0, 2), | ||
dayData: weatherData.date.substring(3, 9), | ||
}); | ||
} | ||
BMap.weather({ | ||
fail: fail, | ||
success: success | ||
}); | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
|
||
"navigationBarBackgroundColor": "#489B81", | ||
"navigationBarTextStyle": "white", | ||
"backgroundTextStyle": "light", | ||
"navigationBarTitleText": "日记" | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<form bindsubmit="formSubmit"> | ||
|
||
<view class='container'> | ||
<text class="weather">{{dayData}}</text> | ||
<text class="weather">{{weekData}}</text> | ||
<text class="weather">{{weatherData.temperature}}</text> | ||
<text class="weather">{{weatherData.weatherDesc}}</text> | ||
</view> | ||
|
||
<view class="section"> | ||
<textarea maxlength='2000' name="input" placeholder="请输入日记内容......"></textarea> | ||
</view> | ||
|
||
<view style='padding:50rpx;'> | ||
<button form-type="submit" class="submit">完成</button> | ||
</view> | ||
</form> |
Oops, something went wrong.