更改
This commit is contained in:
+6
-6
@@ -76,12 +76,12 @@ public class FitnessWalkStepManageController {
|
||||
/*DateTime activityStartDate = DateUtil.date(start_time);
|
||||
DateTime activityEndDate = DateUtil.date(end_time);*/
|
||||
|
||||
// FitnessWalkActivity activity = fitnessWalkCommonService.getActivity(activityId);
|
||||
//
|
||||
// Date startDate = DateUtil.parse(DateUtil.format(DateUtil.date(activity.getStartTime()), "yyyy-MM-dd"), "yyyy-MM-dd");
|
||||
// Date endDate = DateUtil.parse(DateUtil.format(DateUtil.date(activity.getEndTime()), "yyyy-MM-dd"), "yyyy-MM-dd");
|
||||
Date startDate = DateUtil.parse("2025-04-01 00:00:00", "yyyy-MM-dd HH:mm:ss");
|
||||
Date endDate = DateUtil.parse("2025-05-06 23:59:59", "yyyy-MM-dd HH:mm:ss");
|
||||
FitnessWalkActivity activity = fitnessWalkCommonService.getActivity(activityId);
|
||||
|
||||
Date startDate = DateUtil.parse(DateUtil.format(DateUtil.date(activity.getStartTime()), "yyyy-MM-dd"), "yyyy-MM-dd");
|
||||
Date endDate = DateUtil.parse(DateUtil.format(DateUtil.date(activity.getEndTime()), "yyyy-MM-dd"), "yyyy-MM-dd");
|
||||
// Date startDate = DateUtil.parse("2025-04-01 00:00:00", "yyyy-MM-dd HH:mm:ss");
|
||||
// Date endDate = DateUtil.parse("2025-05-06 23:59:59", "yyyy-MM-dd HH:mm:ss");
|
||||
if (!DateUtil.isIn(DateUtil.date(), startDate, endDate)) {
|
||||
return Result.error("已过活动时间,无法上传步数");
|
||||
}
|
||||
|
||||
+1
-1
@@ -448,7 +448,7 @@ public class FitnessWalkCommonServiceImpl extends ViServiceImpl implements Fitne
|
||||
userId
|
||||
) AS over3k ON u.id = over3k.userId
|
||||
$condition
|
||||
""").setParam("activityId",activityId).setParam("step",6000);
|
||||
""").setParam("activityId",activityId).setParam("step",4000);
|
||||
|
||||
if ("today".equals(mode)) {
|
||||
sql.setVar("dateSql",new Static("DATE(applyDate) = '"+DateUtil.today()+"'"));
|
||||
|
||||
@@ -490,6 +490,7 @@ layout("/mobile/platform.html"){
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
|
||||
<script src="https://res.wx.qq.com/open/js/cloudbase/1.1.0/cloud.js"></script>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
@@ -539,7 +540,7 @@ layout("/mobile/platform.html"){
|
||||
const {data} = await $.post('/platform/sys/appMenu/appMenus')
|
||||
this.moduleMenus = data
|
||||
},
|
||||
menuClick(menu) {
|
||||
async menuClick(menu, menuName = '') {
|
||||
/* if (menu.url === '/mobile/member/apply') {
|
||||
const values = this.dict.type.memberApplyPersonType.map(v => v.value)
|
||||
const personType = "${@shiro.getPrincipalProperty('personType')}"
|
||||
@@ -549,7 +550,38 @@ layout("/mobile/platform.html"){
|
||||
return
|
||||
}
|
||||
}*/
|
||||
pjaxReplace(menu)
|
||||
if (menu === 'fitnessWalk' || menuName === '健步走') {
|
||||
const toast = this.$toast.loading({
|
||||
message: '跳转中...',
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
})
|
||||
const loginName = "${@shiro.getPrincipalProperty('loginname')}"
|
||||
const userName = "${@shiro.getPrincipalProperty('username')}"
|
||||
const query = 'loginName=' + encodeURIComponent(loginName) + '&userName=' + encodeURIComponent(userName)
|
||||
let cloud = new window.cloud.Cloud({
|
||||
identityless: true, // true表示是未登录模式
|
||||
resourceAppid: 'wx6820cc6ed157a9b5', // 小程序AppID
|
||||
resourceEnv: 'cloud1-6ghjohj8f589452c', // 云环境环境ID
|
||||
})
|
||||
await cloud.init(); // 云函数初始化
|
||||
const res = await cloud.callFunction({
|
||||
name: 'urllink', //提供UrlScheme服务的云函数名称
|
||||
data: {
|
||||
path: '/pages/login/index', // 想跳转的小程序路径
|
||||
query: query, // 地址栏query参数,可在微信 onLoad: function (options) {}生命周期里options接收这些参数
|
||||
} //向这个云函数中传入的自定义参数,注意:path地址前后/不能多加或者少加,query参数里不能有转义字符如果有需要解码
|
||||
});
|
||||
console.log(res, '云函数返回数据');
|
||||
if (res && res.result.errCode === 0) {
|
||||
toast.clear()
|
||||
location.href = res.result.urlLink
|
||||
} else {
|
||||
console.log(res.errMsg);
|
||||
}
|
||||
} else {
|
||||
pjaxReplace(menu)
|
||||
}
|
||||
},
|
||||
tabbrChange(o) {
|
||||
console.log(o)
|
||||
|
||||
Reference in New Issue
Block a user