Commit f77f1ff6 by tangjiale

修复bug

parent 70cd1325
var API = require("../../../utils/request.js");
var nowTime = require("../../../utils/time")
Component({
/**
......@@ -20,16 +21,22 @@ Component({
{name:'爸爸',value:1},{name:'妈妈',value:2},{name:'其他',value:3}
],
gxIndex:'',
endPinkTime:''
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
methods:{
checkUserChild(){
let userInfo = wx.getStorageSync("userInfo")
let nottime = nowTime.getNowFormatDate()
this.setData({endPinkTime:nottime})
if(userInfo.stuId && !userInfo.height){
this.data.stuinfo.stuId = userInfo.stuId
this.data.stuinfo.name = userInfo.stuName
......@@ -37,7 +44,11 @@ Component({
this.data.stuinfo.birthday = userInfo.birthday
this.data.stuinfo.relationShip = userInfo.relation
let idx = this.data.gxList.findIndex(v => v.value == userInfo.relation)
this.setData({stuinfo:this.data.stuinfo,gxIndex:idx,randerIdx:userInfo.stuGender==1?0:1})
this.setData({
stuinfo:this.data.stuinfo,
gxIndex:idx,
randerIdx:userInfo.stuGender==1?0:1,
})
}
},
inputText(e){
......
......@@ -31,7 +31,7 @@
<view class="input-item">
<view class="input-t">出生日期</view>
<view class="input-bg">
<picker class="name" disabled="{{stuinfo.stuId}}" mode="date" bindchange="pinkerDate">
<picker class="name" disabled="{{stuinfo.stuId}}" mode="date" bindchange="pinkerDate" end="{{endPinkTime}}">
<view class="flex-s">
<view class="sex {{!stuinfo.birthday ? 'placeholder-c':''}}">{{stuinfo.birthday || '请选择出孩子出生日期'}}</view>
<xb-icon type="icon-icon_pull-down" class="change-icon" size="32" color="#000000"></xb-icon>
......
......@@ -3,7 +3,7 @@
* @eMail: 932055106@qq.com
* @Date: 2022-06-06 16:44:43
* @LastEditors: tangjiale
* @LastEditTime: 2022-07-01 10:14:48
* @LastEditTime: 2022-07-04 10:10:15
*/
var app = getApp();
var API = require("../../utils/request.js");
......@@ -45,7 +45,7 @@ Page({
icon:'/images/course/bm-icon.png'
},{
title:'消课记录',event:'sales',
icon:'/images/course/sf-icon.png'
icon:'/images/course/xf-icon.png'
},{
title:'我的收藏',event:'collect',
icon:'/images/course/collect-icon.png'
......
......@@ -3,7 +3,7 @@
* @eMail: 932055106@qq.com
* @Date: 2022-06-06 16:45:35
* @LastEditors: tangjiale
* @LastEditTime: 2022-06-28 10:49:54
* @LastEditTime: 2022-07-04 10:34:51
*/
var API = require("../../utils/request");
var App = getApp();
......
......@@ -5,7 +5,7 @@
"include": []
},
"setting": {
"urlCheck": false,
"urlCheck": true,
"es6": false,
"enhance": true,
"postcss": true,
......
......@@ -37,6 +37,13 @@
"name": "",
"pathName": "subPages/organ/course-list/course-list",
"query": "courseType=1",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "subPages/sport/ai-fwc-sport/ai-fwc-sport",
"query": "sportTime=60",
"scene": null,
"launchMode": "default"
}
......
......@@ -3,7 +3,7 @@
* @eMail: 932055106@qq.com
* @Date: 2022-06-13 08:57:51
* @LastEditors: tangjiale
* @LastEditTime: 2022-06-23 16:36:25
* @LastEditTime: 2022-07-04 10:50:11
*/
var API = require("../../../utils/request.js");
Page({
......@@ -12,6 +12,7 @@ Page({
* 页面的初始数据
*/
data: {
userInfo:{},
detail:{},
showAll:false,
......@@ -40,6 +41,12 @@ Page({
//收藏/取消收藏
courseCollect(){
if(!this.data.userInfo.peopleType){
wx.reLaunch({
url:'/subPages/login/login/index'
})
return
}
let that = this
API.getData('/px/course/collectCancelCourse', {
id:that.data.detail.id,
......@@ -58,8 +65,11 @@ Page({
this.setData({schoolActive:e.detail.value})
},
queryCourseDetail(id){
let userInfo = wx.getStorageSync("userInfo")
this.setData({userInfo:userInfo})
let queryUrl = !userInfo.peopleType ? '/px/course/getMobileCourseInfoNoLogin' : '/px/course/getMobileCourseInfo'
let that = this
API.getData('/px/course/getMobileCourseInfo', {
API.getData(queryUrl, {
id:id,
}, (res) => {
if(res.data && res.data.detail){
......@@ -79,6 +89,12 @@ Page({
})
},
gotoPay(){
if(!this.data.userInfo.peopleType){
wx.reLaunch({
url:'/subPages/login/login/index'
})
return
}
wx.navigateTo({
url: '/subPages/course/pay-order/pay-order?id=' + this.data.detail.id,
})
......
......@@ -29,8 +29,8 @@
<view>分享</view>
</button>
<view class="icon-text" bindtap="courseCollect" wx:if="{{peopleType!='employ'}}">
<image wx:if="{{detail.hadCollect==2}}" class="detail-icon" src="/images/course/collect-icon.png"></image>
<image wx:if="{{detail.hadCollect==1}}" class="detail-icon" src="/images/course/collected-icon.png"></image>
<image wx:else class="detail-icon" src="/images/course/collect-icon.png"></image>
<view>收藏</view>
</view>
</view>
......
......@@ -26,7 +26,7 @@ Page({
phoneType:'', //ios android
showCamera:true,
cameraFront:true, //镜头是否前置
cameraFront:false, //镜头是否前置
src: '',//实时播报的路径
videoSrc:'',
fileCosFilePath:'',//截取视频
......@@ -58,7 +58,7 @@ Page({
that.data.innerAudioContext.obeyMuteSwitch = false;
that.data.innerAudioContext2.obeyMuteSwitch = false;
// that.loadMoveNet();
that.loadMoveNet();
})
......@@ -93,6 +93,7 @@ Page({
},that.data.sportTime * 100 + 500)
that.canvasInit();
that.cameraFrame();
that.palyLocal('/images/ai/clues.mp3');
}else{
wx.showLoading({
mask:true,
......
......@@ -30,7 +30,7 @@ Page({
phoneType:'', //ios android
showCamera:true,
cameraFront:true, //镜头是否前置
cameraFront:false, //镜头是否前置
src: '',//实时播报的路径
videoSrc:'',
fileCosFilePath:'',//截取视频
......@@ -96,6 +96,7 @@ Page({
},that.data.sportTime * 100 + 500)
that.canvasInit();
that.cameraFrame();
that.palyLocal('/images/ai/clues.mp3');
}else{
wx.showLoading({
mask:true,
......
......@@ -29,7 +29,7 @@ Page({
phoneType:'', //ios android
showCamera:true,
cameraFront:true, //镜头是否前置
cameraFront:false, //镜头是否前置
src: '',//实时播报的路径
videoSrc:'',
fileCosFilePath:'',//截取视频
......@@ -95,6 +95,7 @@ Page({
},that.data.sportTime * 100 + 500)
that.canvasInit();
that.cameraFrame();
that.palyLocal('/images/ai/clues.mp3');
}else{
wx.showLoading({
mask:true,
......
......@@ -3,7 +3,7 @@
* @eMail: 932055106@qq.com
* @Date: 2022-05-11 09:53:47
* @LastEditors: tangjiale
* @LastEditTime: 2022-06-10 10:37:45
* @LastEditTime: 2022-07-04 15:56:25
*/
var API = require("../../../utils/request");
......@@ -30,7 +30,6 @@ module.exports = Behavior({
methods:{
actionSend(object,app){ // 识别点
var that = this;
//console.log('app.globalData.movenet',app.globalData.movenet)
app.globalData.movenet.estimatePoses(object).then(function (res) {
var ctx = that.ctx,
keypoimts = res[0].keypoints
......
......@@ -3,7 +3,7 @@
* @eMail: 932055106@qq.com
* @Date: 2022-05-11 09:53:47
* @LastEditors: tangjiale
* @LastEditTime: 2022-06-10 10:37:59
* @LastEditTime: 2022-07-04 16:22:31
*/
var API = require("../../../utils/request");
// 拐踢毽子计算配置
......@@ -53,13 +53,12 @@ module.exports = Behavior({
}
//计算开合跳脚部关键点
angle_foot = that.angle(keypoimts[11],keypoimts[15],keypoimts[16]);
var nowPoint = (keypoimts[11].y + keypoimts[2].y) / 2;//每个的基准点
angle_knee = that.angle(keypoimts[13],keypoimts[11],keypoimts[15]);
var pointfoot = keypoimts[16];
var pointfoot_l = keypoimts[15];
hanld = that.angle(keypoimts[8],keypoimts[6],keypoimts[10]);
hanld_a = that.angle(keypoimts[7],keypoimts[5],keypoimts[9]);
p = pointfoot.y;
......@@ -94,7 +93,7 @@ module.exports = Behavior({
if(prey == 0){
prey = p
}else{
if(p > prey + 2 && hanld >= 120){
if(p > prey + 2 && hanld >= 95){
if(dir == 1){
count = count + 0.5;
dir = 0;
......@@ -106,7 +105,7 @@ module.exports = Behavior({
})
}
}
if(p < prey - 2 && hanld >= 120 && (hanld <= 170 || hanld_a <= 170)){
if(p < prey - 2 && hanld >= 95 && (hanld <= 170 || hanld_a <= 170)){
if(dir == 0){
count = count + 0.5;
dir = 1;
......@@ -128,9 +127,9 @@ module.exports = Behavior({
if(prey == 0){
prey = p
}else{
if(p > prey + 2 && hanld >= 120){
if(p >= prey + 2 && hanld >= 95 ){
if(dir == 1){
count = count + 1;
count = count + 0.9;
dir = 0;
if(count > that.data.sportTime *5 + 20){
count = that.data.sportTime *5 + 20
......@@ -140,9 +139,9 @@ module.exports = Behavior({
})
}
}
if(p < prey - 2 && hanld >= 120 && (hanld <= 170 || hanld_a <= 170)){
if(p < prey - 2 && hanld >= 95 && (hanld <= 170 || hanld_a <= 170) ){
if(dir == 0){
count = count + 1;
count = count + 0.9;
dir = 1;
if(count > that.data.sportTime *5 + 20){
count = that.data.sportTime *5 + 20
......
......@@ -29,7 +29,7 @@ Page({
phoneType:'', //ios android
showCamera:true,
cameraFront:true, //镜头是否前置
cameraFront:false, //镜头是否前置
src: '',//实时播报的路径
videoSrc:'',
fileCosFilePath:'',//截取视频
......@@ -95,6 +95,7 @@ Page({
},that.data.sportTime * 100 + 500)
that.canvasInit();
that.cameraFrame();
that.palyLocal('/images/ai/clues.mp3');
}else{
wx.showLoading({
mask:true,
......
......@@ -29,7 +29,7 @@ Page({
phoneType:'', //ios android
showCamera:true,
cameraFront:true, //镜头是否前置
cameraFront:false, //镜头是否前置
src: '',//实时播报的路径
videoSrc:'',
fileCosFilePath:'',//截取视频
......@@ -95,6 +95,7 @@ Page({
},that.data.sportTime * 100 + 500)
that.canvasInit();
that.cameraFrame();
that.palyLocal('/images/ai/clues.mp3');
}else{
wx.showLoading({
mask:true,
......
......@@ -29,7 +29,7 @@ Page({
phoneType:'', //ios android
showCamera:true,
cameraFront:true, //镜头是否前置
cameraFront:false, //镜头是否前置
src: '',//实时播报的路径
videoSrc:'',
fileCosFilePath:'',//截取视频
......@@ -38,7 +38,7 @@ Page({
levelfontsize:'',
sportTime:60, //运动时长
skipType:1, //当前跳绳模式 0两者都行 1 双脚 2 单双脚交替
skipType:2, //当前跳绳模式 0两者都行 1 双脚 2 单双脚交替
},
onLoad: function (options) {
......@@ -49,7 +49,7 @@ Page({
//运动时长(秒)
if(options.sportTime){
// 30/60/120/180
this.setData({sportTime:options.sportTime,skipType:options.type})
this.setData({sportTime:options.sportTime,skipType:options.type || 2})
}
// 音频/语音交互相关
......@@ -95,6 +95,7 @@ Page({
},that.data.sportTime * 100 + 500)
that.canvasInit();
that.cameraFrame();
that.palyLocal('/images/ai/clues.mp3');
}else{
wx.showLoading({
mask:true,
......
......@@ -29,7 +29,7 @@ Page({
phoneType:'', //ios android
showCamera:true,
cameraFront:true, //镜头是否前置
cameraFront:false, //镜头是否前置
src: '',//实时播报的路径
videoSrc:'',
fileCosFilePath:'',//截取视频
......@@ -95,6 +95,7 @@ Page({
},that.data.sportTime * 100 + 500)
that.canvasInit();
that.cameraFrame();
that.palyLocal('/images/ai/clues.mp3');
}else{
wx.showLoading({
mask:true,
......
......@@ -29,7 +29,7 @@ Page({
phoneType:'', //ios android
showCamera:true,
cameraFront:true, //镜头是否前置
cameraFront:false, //镜头是否前置
src: '',//实时播报的路径
videoSrc:'',
fileCosFilePath:'',//截取视频
......@@ -95,6 +95,7 @@ Page({
},that.data.sportTime * 100 + 500)
that.canvasInit();
that.cameraFrame();
that.palyLocal('/images/ai/clues.mp3');
}else{
wx.showLoading({
mask:true,
......
......@@ -26,7 +26,7 @@ Page({
phoneType:'', //ios android
showCamera:true,
cameraFront:true, //镜头是否前置
cameraFront:false, //镜头是否前置
src: '',//实时播报的路径
videoSrc:'',
fileCosFilePath:'',//截取视频
......@@ -91,6 +91,7 @@ Page({
},that.data.sportTime * 100 + 500)
that.canvasInit();
that.cameraFrame();
that.palyLocal('/images/ai/clues.mp3');
}else{
wx.showLoading({
mask:true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment