|
@@ -3,28 +3,23 @@
|
|
<Header :showClose="false" :showTool="true" logoClass="logo2"></Header>
|
|
<Header :showClose="false" :showTool="true" logoClass="logo2"></Header>
|
|
<div class="menu">
|
|
<div class="menu">
|
|
<div class="left">
|
|
<div class="left">
|
|
- <div class="li" @click="getJump('/train', '自助锻炼')"><img src="@/assets/images/home/train.png" />
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div class="li" @click="getJump('/train', '自助锻炼')"><img src="@/assets/images/home/train.png" /></div>
|
|
</div>
|
|
</div>
|
|
<div class="right">
|
|
<div class="right">
|
|
<div class="right-top">
|
|
<div class="right-top">
|
|
- <div class="li" @click="getJump('/test', '测试')"><img src="@/assets/images/home/test.png" />
|
|
|
|
|
|
+ <div class="li" @click="getJump('/test', '测试')">
|
|
|
|
+ <img src="@/assets/images/home/test.png" />
|
|
<i></i>
|
|
<i></i>
|
|
</div>
|
|
</div>
|
|
- <div class="li" @click="getJump('/ranking', '排行榜')"><img src="@/assets/images/home/ranking.png" />
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div class="li" @click="getJump('/ranking', '排行榜')"><img src="@/assets/images/home/ranking.png" /></div>
|
|
</div>
|
|
</div>
|
|
<div class="right-bottom">
|
|
<div class="right-bottom">
|
|
- <div class="li" @click="getJump('/gesture', '竞赛')"><img src="@/assets/images/home/competition.png" />
|
|
|
|
- </div>
|
|
|
|
- <div class="li" @click="getJump('/course', '课程')"><img src="@/assets/images/home/course.png" />
|
|
|
|
- </div>
|
|
|
|
- <div class="li" @click="getJump('/set', '设置')"><img src="@/assets/images/home/set.png" />
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div class="li" @click="getJump('/gesture', '竞赛')"><img src="@/assets/images/home/competition.png" /></div>
|
|
|
|
+ <div class="li" @click="getJump('/course', '课程')"><img src="@/assets/images/home/course.png" /></div>
|
|
|
|
+ <div class="li" @click="getJump('/set', '设置')"><img src="@/assets/images/home/set.png" /></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -43,43 +38,57 @@ const getJump = (url: string, name: string) => {
|
|
proxy?.$modal.msgSuccess('测试环境免密进入设置');
|
|
proxy?.$modal.msgSuccess('测试环境免密进入设置');
|
|
router.push({ path: url });
|
|
router.push({ path: url });
|
|
} else {
|
|
} else {
|
|
- let myInfo: any = localStorage.getItem("userInfo");
|
|
|
|
|
|
+ let myInfo: any = localStorage.getItem('userInfo');
|
|
let userInfo = JSON.parse(myInfo);
|
|
let userInfo = JSON.parse(myInfo);
|
|
- proxy?.$modal.prompt(`【${userInfo.login_name}】,请输入密码`, 'password').then((e: any) => {
|
|
|
|
|
|
+ proxy?.$modal
|
|
|
|
+ .prompt(`【${userInfo.login_name}】,请输入密码`, 'password')
|
|
|
|
+ .then((e: any) => {
|
|
|
|
+ // console.log("e", e)
|
|
|
|
+ if (e.action == 'confirm' && e.value) {
|
|
|
|
+ let params = {
|
|
|
|
+ password: e.value
|
|
|
|
+ };
|
|
|
|
+ proxy?.$http.common.checkPassword(params).then((res: any) => {
|
|
|
|
+ if (res.status === 200 || res.status === 1) {
|
|
|
|
+ router.push({ path: url });
|
|
|
|
+ } else {
|
|
|
|
+ proxy?.$modal.msgError(res.message);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .finally(() => {});
|
|
|
|
+ }
|
|
|
|
+ } else if (url == '/test') {
|
|
|
|
+ proxy?.$modal
|
|
|
|
+ .prompt('请输入密码')
|
|
|
|
+ .then((e: any) => {
|
|
// console.log("e", e)
|
|
// console.log("e", e)
|
|
- if (e.action == 'confirm' && e.value) {
|
|
|
|
- let params = {
|
|
|
|
- password: e.value
|
|
|
|
- };
|
|
|
|
- proxy?.$http.common.checkPassword(params).then((res: any) => {
|
|
|
|
- if (res.status === 200 || res.status === 1) {
|
|
|
|
- router.push({ path: url });
|
|
|
|
- } else {
|
|
|
|
- proxy?.$modal.msgError(res.message);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ if (e.action == 'confirm' && e.value == '160713') {
|
|
|
|
+ let deviceid = e.value;
|
|
|
|
+ localStorage.setItem('deviceid', deviceid);
|
|
|
|
+ router.push({ path: url });
|
|
}
|
|
}
|
|
- }).finally(() => {
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ })
|
|
|
|
+ .finally(() => {});
|
|
} else if (url == '/gesture') {
|
|
} else if (url == '/gesture') {
|
|
- proxy?.$modal.prompt('请输入设备码').then((e: any) => {
|
|
|
|
- // console.log("e", e)
|
|
|
|
- if (e.action == 'confirm' && e.value) {
|
|
|
|
- let deviceid = e.value;
|
|
|
|
- localStorage.setItem("deviceid", deviceid);
|
|
|
|
- router.push({ path: url });
|
|
|
|
- }
|
|
|
|
- }).finally(() => {
|
|
|
|
- });
|
|
|
|
|
|
+ proxy?.$modal
|
|
|
|
+ .prompt('请输入设备码')
|
|
|
|
+ .then((e: any) => {
|
|
|
|
+ // console.log("e", e)
|
|
|
|
+ if (e.action == 'confirm' && e.value) {
|
|
|
|
+ let deviceid = e.value;
|
|
|
|
+ localStorage.setItem('deviceid', deviceid);
|
|
|
|
+ router.push({ path: url });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .finally(() => {});
|
|
} else {
|
|
} else {
|
|
router.push({ path: url });
|
|
router.push({ path: url });
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
-onMounted(() => {
|
|
|
|
-
|
|
|
|
-})
|
|
|
|
|
|
+onMounted(() => {});
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -102,20 +111,16 @@ $waiPadding: 6.51rem;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
|
|
|
&:hover {
|
|
&:hover {
|
|
-
|
|
|
|
img,
|
|
img,
|
|
i {
|
|
i {
|
|
transform: scale(1.06);
|
|
transform: scale(1.06);
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
img {
|
|
img {
|
|
width: 100%;
|
|
width: 100%;
|
|
transition: all 0.5s;
|
|
transition: all 0.5s;
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
.left {
|
|
.left {
|
|
@@ -137,7 +142,7 @@ $waiPadding: 6.51rem;
|
|
margin-bottom: $myPadding;
|
|
margin-bottom: $myPadding;
|
|
|
|
|
|
.li {
|
|
.li {
|
|
- width: calc(50% - $myPadding /2);
|
|
|
|
|
|
+ width: calc(50% - $myPadding / 2);
|
|
}
|
|
}
|
|
|
|
|
|
.li:nth-child(1) {
|
|
.li:nth-child(1) {
|
|
@@ -151,7 +156,7 @@ $waiPadding: 6.51rem;
|
|
top: calc(6vw / -6.4);
|
|
top: calc(6vw / -6.4);
|
|
left: 50%;
|
|
left: 50%;
|
|
margin-left: calc(6vw * -0.15);
|
|
margin-left: calc(6vw * -0.15);
|
|
- background-image: url("@/assets/images/home/test_icon.png");
|
|
|
|
|
|
+ background-image: url('@/assets/images/home/test_icon.png');
|
|
background-position: center;
|
|
background-position: center;
|
|
background-repeat: no-repeat;
|
|
background-repeat: no-repeat;
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
@@ -159,28 +164,25 @@ $waiPadding: 6.51rem;
|
|
transition: all 0.5s;
|
|
transition: all 0.5s;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
.right-bottom {
|
|
.right-bottom {
|
|
-
|
|
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
padding-left: $myPadding;
|
|
padding-left: $myPadding;
|
|
|
|
|
|
.li:nth-child(1) {
|
|
.li:nth-child(1) {
|
|
- width: calc(50% - $myPadding /2);
|
|
|
|
|
|
+ width: calc(50% - $myPadding / 2);
|
|
}
|
|
}
|
|
|
|
|
|
.li:nth-child(2) {
|
|
.li:nth-child(2) {
|
|
- width: calc((50% - $myPadding /2)/2 - $myPadding /2 + 0.05rem);
|
|
|
|
|
|
+ width: calc((50% - $myPadding / 2) / 2 - $myPadding / 2 + 0.05rem);
|
|
}
|
|
}
|
|
|
|
|
|
.li:nth-child(3) {
|
|
.li:nth-child(3) {
|
|
- width: calc((50% - $myPadding /2)/2 - $myPadding /2 - 0.05rem);
|
|
|
|
|
|
+ width: calc((50% - $myPadding / 2) / 2 - $myPadding / 2 - 0.05rem);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|