提交 bc6c0b4f 编写于 作者: R Renic1

后台运行运动功能

上级 c76ed1b7
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
"type" : "uniCloud" "type" : "uniCloud"
}, },
{ {
"playground" : "custom", "playground" : "standard",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
} }
] ]
......
...@@ -21,11 +21,32 @@ ...@@ -21,11 +21,32 @@
<script> <script>
export default { export default {
onShow(option) {
if(this.load==true) {
clearInterval(this.timer);
this.timer = null;
this.run()
this.load=false;
}
},
onLoad(option) { onLoad(option) {
this.run()
this.info.startTime = this.getTime() this.info.startTime = this.getTime()
this.info.type = option.type this.info.type = option.type
}, },
onHide(option){
if(this.load==false&&this.is) {
clearInterval(this.timer);
this.timer = null;
this.run()
this.load=true;
}
}
,
// onLoad(option) {
// this.run()
// this.info.startTime = this.getTime()
// this.info.type = option.type
// },
data() { data() {
return { return {
info: { info: {
...@@ -43,7 +64,7 @@ ...@@ -43,7 +64,7 @@
dottedLine: true dottedLine: true
}] }]
}, },
load:true,
timer: null, //定时器 timer: null, //定时器
is: true, is: true,
start: '/static/sport/start.png', start: '/static/sport/start.png',
...@@ -92,6 +113,7 @@ ...@@ -92,6 +113,7 @@
} }
}) })
.then(res => { .then(res => {
console.log(this.info)
this.info.id = res.result.data.id this.info.id = res.result.data.id
if (res.result.code === 200) { if (res.result.code === 200) {
uni.showToast({ uni.showToast({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册