Commit f77f1ff6 by tangjiale

修复bug

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