diff --git a/app.js b/app.js
index c567dc6..059aec5 100644
--- a/app.js
+++ b/app.js
@@ -44,9 +44,10 @@ App({
view.onShareAppMessage = function () {
//你的分享配置
return {
- title: name + '推荐大家都在用的升学大数据宝典',
+ title: name + '推荐您 一起开始自主学习之旅',
path: '/pages/index/index',
- imageUrl: 'https://proxy.shunzhi.net:51315/mp_share2.jpg',
+ // imageUrl: 'https://proxy.shunzhi.net:51315/mp_share2.jpg',
+ imageUrl: 'https://szyundisk.oss-cn-hangzhou.aliyuncs.com/AdmissionsManageSys/37317060-9e67-41e1-9731-b722c83cff8a.jpg',
};
}
}
diff --git a/pages/index/achievement/achievement.js b/pages/index/achievement/achievement.js
index f50e196..3bf6d8f 100644
--- a/pages/index/achievement/achievement.js
+++ b/pages/index/achievement/achievement.js
@@ -28,6 +28,8 @@ Page({
taskVo: {
allowRepairCard: 0,
hasData: 0,
+ statisticsUnit: "",
+ submitCondition: "",
id: 0,
releaseTime: "",
signTotal: 0,
@@ -46,7 +48,7 @@ Page({
taskStatisticsParam: ""
}, //成果数据当天
recordVoShow: false,
- dayMoment: 0 , //数据月份
+ dayMoment: 0, //数据月份
},
/**
* 选择日期后执行的事件
@@ -57,21 +59,21 @@ Page({
// let year = e.detail.year
let recordVo = this.data.resData.eventDetails[date - 1].recordVo
if (recordVo != null) {
- console.log('复制',recordVo)
+ console.log('复制', recordVo)
this.setData({
recordVo: recordVo
})
this.setData({
recordVoShow: true
})
- }else {
+ } else {
this.setData({
recordVoShow: false
})
}
},
//获取信息
- getInfo(doday,isOne=0) {
+ getInfo(doday, isOne = 0) {
request({
url: `/wx/task/getSignRecord`,
method: 'get',
@@ -86,7 +88,7 @@ Page({
resData: res.data
})
this.getV2(res.data)
- if(isOne ==1) {
+ if (isOne == 1) {
let e = {
detail: {
date: moment().date(),
@@ -143,6 +145,6 @@ Page({
*/
onReady() {
this.initialize()
- this.getInfo(moment(new Date().getTime()).format('YYYY-MM-DD'),1)
+ this.getInfo(moment(new Date().getTime()).format('YYYY-MM-DD'), 1)
},
})
\ No newline at end of file
diff --git a/pages/index/achievement/achievement.wxml b/pages/index/achievement/achievement.wxml
index 05f58f3..7bbef34 100644
--- a/pages/index/achievement/achievement.wxml
+++ b/pages/index/achievement/achievement.wxml
@@ -8,7 +8,7 @@
已进行 {{taskVo.signTotal +' / ' +taskVo.taskCycle}} 天
打卡频次 : {{taskVo.taskFrequency}}
- {{taskVo.hasData == 1 ?'允许补卡': '不允许补卡'}}
+ {{taskVo.allowRepairCard == 1 ?'允许补卡': '不允许补卡'}}
{{taskVo.taskDesc}}
@@ -20,7 +20,7 @@
打卡成果
- 本次打卡坚持了{{recordVo.taskStatisticsParam}}分钟
+ 本次打卡坚持了{{recordVo.taskStatisticsParam}}{{taskVo.statisticsUnit}}
"{{recordVo.taskRecordDesc}}"
diff --git a/pages/index/index.js b/pages/index/index.js
index e667c84..1407dd1 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -56,8 +56,9 @@ Page({
},
// 去打卡
handleDetail(e){
+ let eData = e.currentTarget.dataset
wx.navigateTo({
- url: '/pages/index/punchDetail/punchDetail?valueId='+e.currentTarget.dataset.valueid ,
+ url: '/pages/index/punchDetail/punchDetail?valueId='+eData.valueid ,
})
},
/**
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 602d10f..37f32a0 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -36,7 +36,7 @@
打卡要求:
- {{'需要' + value.submitCondition}}
+ {{ value.submitCondition == '无限制' ? '无限制': '需要 '+value.submitCondition}}
其他:
diff --git a/pages/index/newPunch/newPunch.js b/pages/index/newPunch/newPunch.js
index d43cde3..c952716 100644
--- a/pages/index/newPunch/newPunch.js
+++ b/pages/index/newPunch/newPunch.js
@@ -11,8 +11,8 @@ Page({
form: {
taskTitle: '', //任务标题
taskDesc: '', //任务描述内容
- allowRepairCard: false, //是否允许补卡 1是 2否
- hasData: false, //是否需要提交数据 1是 2否
+ allowRepairCard: 2, //是否允许补卡 1是 2否
+ hasData: 2, //是否需要提交数据 1是 2否
// id: '', // 任务ID
lackNum: '', // 缺卡次数
remindTime: '', // 打卡提醒时间点
@@ -45,7 +45,13 @@ Page({
},
//打卡周期
clockCycleShow: false,
- columnsClockCycle: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'],
+ columnsClockCycle: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10','11', '12', '13', '14', '15', '16', '17', '18', '19', '20','21', '22', '23', '24', '25', '26', '27', '28', '29', '30','31',
+ '32', '33', '34', '35', '36', '37', '38', '39', '40','41',
+ '42', '43', '44', '45', '46', '47', '48', '49', '40','51',
+ '52', '53', '54', '55', '56', '57', '58', '59', '60','61',
+ '62', '63', '64', '65', '66', '67', '68', '69', '70','71',
+ '72', '73', '74', '75', '76', '77', '78', '79', '80','81',
+ '82', '83', '84', '85', '86', '87', '88', '89', '90'],
//打卡频次
clockRateShow: false,
columnsClockRate: ['每天', '7天', '一个月'],
@@ -53,7 +59,7 @@ Page({
clockRemindShow: false,
columnsClockRemind: [
{
- values: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
+ values: ['每天','周一', '周二', '周三', '周四', '周五', '周六', '周日'],
defaultIndex: 2,
},
// 第二列
@@ -205,6 +211,9 @@ Page({
//创建
createTask() {
console.log(this.data.form)
+ if(this.data.form.hasData == 1 && !this.data.form.statisticsUnit) {
+ return wx.showToast({title: '请选择统计单位',icon: 'none',})
+ }
request({
url: `/wx/task/addCardTask`,
method: 'post',
diff --git a/pages/index/newPunch/newPunch.wxml b/pages/index/newPunch/newPunch.wxml
index edfbd4b..e05df48 100644
--- a/pages/index/newPunch/newPunch.wxml
+++ b/pages/index/newPunch/newPunch.wxml
@@ -36,7 +36,7 @@
-
+
允许补卡
diff --git a/pages/index/punchDetail/punchDetail.js b/pages/index/punchDetail/punchDetail.js
index 43031a8..4f5617e 100644
--- a/pages/index/punchDetail/punchDetail.js
+++ b/pages/index/punchDetail/punchDetail.js
@@ -37,6 +37,8 @@ Page({
taskVo: {
allowRepairCard: 0,
hasData: 0,
+ statisticsUnit: "",
+ submitCondition: "",
id: 0,
releaseTime: "",
signTotal: 0,
@@ -56,17 +58,36 @@ Page({
}, //成果数据当天
recordVoShow: false,
isToday:true,//是否是今天
+ isLarge:false, //是否大于今天
+ repairText: ''
},
/**
* 选择日期后执行的事件
*/
afterTapDate(e) {
let date = e.detail.date
- let isToday = e.detail.isToday
this.setData({
- isToday
+ isToday:e.detail.isToday
+ })
+ //选择的年月日
+ let checkDay = e.detail.year +'-' + e.detail.month +'-' + e.detail.date
+ let checktimeDate= new Date(moment(checkDay).format('YYYY-MM-DD')).getTime()
+ //选择的日期是否大于今天
+ if(checktimeDate > new Date().getTime()) {
+ console.log('ff')
+ this.setData({
+ isLarge: true
+ })
+ }else {
+ this.setData({
+ isLarge: false
+ })
+ }
+ this.setData({
+ repairText: e.detail.todoText
})
let recordVo = this.data.resData.eventDetails[date - 1].recordVo
+ //匹配数据
if (recordVo != null) {
console.log('复制',recordVo)
this.setData({
@@ -136,10 +157,22 @@ Page({
},
//唤起 打卡
toClock() {
+ this.setData({
+ clockShow: true
+ })
+ },
+ //唤起补卡
+ toRepairClock() {
let selectData = this.data.calendar.getSelectedDates()
let doday = selectData[0].year + '-' + selectData[0].month + '-' + selectData[0].date
console.log(doday)
-
+ let repairDate= moment(doday).format('YYYY-MM-DD')
+ this.setData({
+ 'form.isRepair':2
+ })
+ this.setData({
+ 'form.repairDate':repairDate
+ })
this.setData({
clockShow: true
})
@@ -152,7 +185,14 @@ Page({
this.setData({
'form.userId': wx.getStorageSync('userInfo_id')
})
- console.log(this.data.form)
+ if(this.data.taskVo.submitCondition=='图片') {
+ if(this.data.form.taskFileUrl.length == 0) {
+ return wx.showToast({
+ title: '请上传图片',
+ icon: 'none'
+ })
+ }
+ }
request({
url: `/wx/task/commitCardTask`,
method: 'post',
@@ -164,6 +204,7 @@ Page({
icon: 'none'
})
this.closeClockShow()
+ this.getInfo(moment(new Date().getTime()).format('YYYY-MM-DD'))
} else {
wx.showToast({
title: res.msg,
@@ -255,6 +296,9 @@ Page({
},
//关闭
closeClockShow() {
+ this.setData({
+ clockShow: false
+ })
let form = {
id: '', //任务ID
isRepair: 1, //是否补卡1立即打卡2补卡
@@ -267,8 +311,5 @@ Page({
this.setData({
form: form
})
- this.setData({
- clockShow: false
- })
}
})
\ No newline at end of file
diff --git a/pages/index/punchDetail/punchDetail.wxml b/pages/index/punchDetail/punchDetail.wxml
index 4e5fc98..dadfbda 100644
--- a/pages/index/punchDetail/punchDetail.wxml
+++ b/pages/index/punchDetail/punchDetail.wxml
@@ -8,7 +8,7 @@
已进行 {{taskVo.signTotal +' / ' +taskVo.taskCycle}} 天
打卡频次 : {{taskVo.taskFrequency}}
- {{taskVo.hasData == 1 ?'允许补卡': '不允许补卡'}}
+ {{taskVo.allowRepairCard == 1 ?'允许补卡': '不允许补卡'}}
{{taskVo.taskDesc}}
@@ -17,14 +17,15 @@
- 我的成果
- 立即打卡
+ 我 的 成 果
+ 立 即 打 卡
+ 补 卡
- 提交打卡成果
-
+ {{form.isRepair == 2? '补交打卡成果' : '提交打卡成果'}}
+
提交数据
@@ -32,10 +33,10 @@
- 分钟
+ {{taskVo.statisticsUnit}}
-
+
@@ -45,7 +46,7 @@
- 提 交
+ 提 交
\ No newline at end of file
diff --git a/pages/index/rank/rank.js b/pages/index/rank/rank.js
index fe46980..19e828a 100644
--- a/pages/index/rank/rank.js
+++ b/pages/index/rank/rank.js
@@ -83,6 +83,13 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
+
+ },
+ // 统一返回
+ handleBack() {
+ wx.navigateBack()
+ },
+ onShow() {
this.setData({
'user': wx.getStorageSync('userInfo')
})
@@ -91,9 +98,5 @@ Page({
})
this.getSelf()
this.getRankList()
- },
- // 统一返回
- handleBack() {
- wx.navigateBack()
- },
+ }
})
\ No newline at end of file
diff --git a/pages/index/rank/rank.wxss b/pages/index/rank/rank.wxss
index b5744bc..3bf174d 100644
--- a/pages/index/rank/rank.wxss
+++ b/pages/index/rank/rank.wxss
@@ -16,7 +16,7 @@
}
.white_box{
width: 90vw;
- min-height: 70vh;
+ min-height: 72vh;
margin-top: 40px;
background-color: #fff;
border-radius: 4vw;
diff --git a/pages/login/loginNew/loginNew.js b/pages/login/loginNew/loginNew.js
index acd860d..4cb9fbe 100644
--- a/pages/login/loginNew/loginNew.js
+++ b/pages/login/loginNew/loginNew.js
@@ -78,9 +78,15 @@ Page({
}, () => {
wx.setStorageSync('userInfo', res.data)
wx.setStorageSync('userInfo_id', res.data.id)
- wx.switchTab({
- url: '/pages/mine/index',
- })
+ if(res.data.hasRecord == 1) {
+ wx.switchTab({
+ url: '/pages/index/rank/rank',
+ })
+ }else {
+ wx.switchTab({
+ url: '/pages/mine/index',
+ })
+ }
})
} else {
wx.showToast({
diff --git a/pages/login/loginNew/loginNew.wxml b/pages/login/loginNew/loginNew.wxml
index 2b22702..cb90b92 100644
--- a/pages/login/loginNew/loginNew.wxml
+++ b/pages/login/loginNew/loginNew.wxml
@@ -13,7 +13,9 @@
- 已同意 用户协议 和 隐私协议
+
+ 已同意 用户协议 和 隐私协议
+
diff --git a/pages/login/loginNew/loginNew.wxss b/pages/login/loginNew/loginNew.wxss
index 467ff22..57c1ed6 100644
--- a/pages/login/loginNew/loginNew.wxss
+++ b/pages/login/loginNew/loginNew.wxss
@@ -37,6 +37,9 @@
font-size: 12px;
margin: 10px 0 0;
}
+.small_font_tip {
+ display: flex;
+}
.blue_font {
color: #3578F9;
text-decoration:underline;
diff --git a/pages/login/policy/policy.json b/pages/login/policy/policy.json
index 8835af0..de26904 100644
--- a/pages/login/policy/policy.json
+++ b/pages/login/policy/policy.json
@@ -1,3 +1,4 @@
{
- "usingComponents": {}
+ "usingComponents": {},
+ "navigationBarTitleText": "隐私协议"
}
\ No newline at end of file
diff --git a/pages/login/protocol/protocol.json b/pages/login/protocol/protocol.json
index 8835af0..fc7767a 100644
--- a/pages/login/protocol/protocol.json
+++ b/pages/login/protocol/protocol.json
@@ -1,3 +1,4 @@
{
- "usingComponents": {}
+ "usingComponents": {},
+ "navigationBarTitleText": "用户协议"
}
\ No newline at end of file
diff --git a/pages/mine/record/record.js b/pages/mine/record/record.js
index e5acf71..c3f059e 100644
--- a/pages/mine/record/record.js
+++ b/pages/mine/record/record.js
@@ -23,7 +23,7 @@ Page({
url: `/wx/task/cardTaskList`,
method: 'post',
data: {
- "oneselfFlag": this.data.tabindex + 1 ,
+ "oneselfFlag": this.data.tabindex + 1,
"page": 1,
"pageSize": 999,
"userId": wx.getStorageSync("userInfo_id")
@@ -80,7 +80,7 @@ Page({
//选择模板
toPunch(e) {
let obj = e.currentTarget.dataset
- let id = obj.value ? obj.value.id :0
+ let id = obj.value ? obj.value.id : 0
wx.navigateTo({
url: `../../index/newPunch/newPunch?tempId=${id}`
})
@@ -101,13 +101,14 @@ Page({
// 打卡成果
handleAchievement(e) {
wx.navigateTo({
- url: '/pages/index/achievement/achievement?valueId='+e.currentTarget.dataset.valueid ,
+ url: '/pages/index/achievement/achievement?valueId=' + e.currentTarget.dataset.valueid,
})
},
// 去打卡
handleDetail(e) {
+ let eData = e.currentTarget.dataset
wx.navigateTo({
- url: '/pages/index/punchDetail/punchDetail?valueId='+e.currentTarget.dataset.valueid ,
+ url: '/pages/index/punchDetail/punchDetail?valueId=' + eData.valueid,
})
},
// 统一返回
diff --git a/pages/mine/record/record.wxml b/pages/mine/record/record.wxml
index 5d6ba7c..9d3678d 100644
--- a/pages/mine/record/record.wxml
+++ b/pages/mine/record/record.wxml
@@ -31,7 +31,7 @@
打卡要求:
- {{'需要' + value.submitCondition}}
+ {{ value.submitCondition == '无限制' ? '无限制': '需要 '+value.submitCondition}}
其他:
diff --git a/pages/mine/record/record.wxss b/pages/mine/record/record.wxss
index 8051e47..e2b12fc 100644
--- a/pages/mine/record/record.wxss
+++ b/pages/mine/record/record.wxss
@@ -12,6 +12,7 @@
}
.grey_font {
+ width: 100%;
color: #999;
font-size: 14px;
margin-bottom: 15px;
@@ -53,11 +54,11 @@
font-size: 4.6vw;
}
-.grey_font {
+/* .grey_font {
width: 100%;
color: #999;
font-size: 3.8vw;
-}
+} */
.day_font {
margin: 10px 0 20px;
--
libgit2 0.21.0