|
@@ -3,10 +3,13 @@
|
|
|
class="home"
|
|
class="home"
|
|
|
>
|
|
>
|
|
|
<div
|
|
<div
|
|
|
- v-if="store.state.loginStatus === 0"
|
|
|
|
|
|
|
+ v-if="!store.state.loginStatus"
|
|
|
class="for-visitor"
|
|
class="for-visitor"
|
|
|
>
|
|
>
|
|
|
- <button class="login">
|
|
|
|
|
|
|
+ <button
|
|
|
|
|
+ class="login"
|
|
|
|
|
+ @click="onClickLogin"
|
|
|
|
|
+ >
|
|
|
<img
|
|
<img
|
|
|
class=""
|
|
class=""
|
|
|
src="@/assets/images/btn-login-bg.png"
|
|
src="@/assets/images/btn-login-bg.png"
|
|
@@ -34,22 +37,29 @@
|
|
|
>
|
|
>
|
|
|
<img
|
|
<img
|
|
|
class="avatar"
|
|
class="avatar"
|
|
|
- src="@/assets/images/btn-login-bg.png"
|
|
|
|
|
|
|
+ src="@/assets/images/avatar.png"
|
|
|
alt=""
|
|
alt=""
|
|
|
draggable="false"
|
|
draggable="false"
|
|
|
>
|
|
>
|
|
|
<div class="info-wrap">
|
|
<div class="info-wrap">
|
|
|
<div class="user-id">
|
|
<div class="user-id">
|
|
|
- <span class="title">用户ID:</span><span
|
|
|
|
|
|
|
+ <span class="title">用户ID:</span>
|
|
|
|
|
+ <span
|
|
|
class="value"
|
|
class="value"
|
|
|
- :title="store.state.userName"
|
|
|
|
|
- >{{ store.state.userName }}</span>
|
|
|
|
|
|
|
+ :title="store.state.userInfo.userName"
|
|
|
|
|
+ >{{ store.state.userInfo.userName }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="point-bonus">
|
|
<div class="point-bonus">
|
|
|
- <span class="title">当前积分:</span><span class="value">{{ store.state.bonusPoint }}</span>
|
|
|
|
|
|
|
+ <span class="title">当前积分:</span>
|
|
|
|
|
+ <span class="value">{{ store.state.userInfo.score }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <button class="change-password">
|
|
|
|
|
|
|
+ <button
|
|
|
|
|
+ class="change-password"
|
|
|
|
|
+ @click="router.push({
|
|
|
|
|
+ name: 'ChangePassword',
|
|
|
|
|
+ })"
|
|
|
|
|
+ >
|
|
|
<img
|
|
<img
|
|
|
class=""
|
|
class=""
|
|
|
src="@/assets/images/icon-password.png"
|
|
src="@/assets/images/icon-password.png"
|
|
@@ -57,7 +67,10 @@
|
|
|
draggable="false"
|
|
draggable="false"
|
|
|
>
|
|
>
|
|
|
</button>
|
|
</button>
|
|
|
- <button class="log-out">
|
|
|
|
|
|
|
+ <button
|
|
|
|
|
+ class="logout"
|
|
|
|
|
+ @click="onClickLogout"
|
|
|
|
|
+ >
|
|
|
<img
|
|
<img
|
|
|
class=""
|
|
class=""
|
|
|
src="@/assets/images/icon-exit.png"
|
|
src="@/assets/images/icon-exit.png"
|
|
@@ -67,7 +80,13 @@
|
|
|
</button>
|
|
</button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="entry-list">
|
|
<div class="entry-list">
|
|
|
- <button class="game-entry plant-tree-entry">
|
|
|
|
|
|
|
+ <!-- 乡村林场 -->
|
|
|
|
|
+ <button
|
|
|
|
|
+ class="game-entry plant-tree-entry"
|
|
|
|
|
+ @click="router.push({
|
|
|
|
|
+ name: 'PlantTree',
|
|
|
|
|
+ })"
|
|
|
|
|
+ >
|
|
|
<img
|
|
<img
|
|
|
class=""
|
|
class=""
|
|
|
src="@/assets/images/plant-tree-entry.png"
|
|
src="@/assets/images/plant-tree-entry.png"
|
|
@@ -75,7 +94,13 @@
|
|
|
draggable="false"
|
|
draggable="false"
|
|
|
>
|
|
>
|
|
|
</button>
|
|
</button>
|
|
|
- <button class="game-entry exam-paper-entry">
|
|
|
|
|
|
|
+ <!-- 助农课堂 -->
|
|
|
|
|
+ <button
|
|
|
|
|
+ class="game-entry exam-paper-entry"
|
|
|
|
|
+ @click="router.push({
|
|
|
|
|
+ name: 'ExamPaper1',
|
|
|
|
|
+ })"
|
|
|
|
|
+ >
|
|
|
<img
|
|
<img
|
|
|
class=""
|
|
class=""
|
|
|
src="@/assets/images/exam-paper-entry.png"
|
|
src="@/assets/images/exam-paper-entry.png"
|
|
@@ -83,7 +108,13 @@
|
|
|
draggable="false"
|
|
draggable="false"
|
|
|
>
|
|
>
|
|
|
</button>
|
|
</button>
|
|
|
- <button class="game-entry pair-up-entry">
|
|
|
|
|
|
|
+ <!-- 企业翻翻看 -->
|
|
|
|
|
+ <button
|
|
|
|
|
+ class="game-entry pair-up-entry"
|
|
|
|
|
+ @click="router.push({
|
|
|
|
|
+ name: 'PairUp',
|
|
|
|
|
+ })"
|
|
|
|
|
+ >
|
|
|
<img
|
|
<img
|
|
|
class=""
|
|
class=""
|
|
|
src="@/assets/images/pair-up-entry.png"
|
|
src="@/assets/images/pair-up-entry.png"
|
|
@@ -91,6 +122,7 @@
|
|
|
draggable="false"
|
|
draggable="false"
|
|
|
>
|
|
>
|
|
|
</button>
|
|
</button>
|
|
|
|
|
+ <!-- 抗体大作战 -->
|
|
|
<button class="game-entry antibody-battle-entry">
|
|
<button class="game-entry antibody-battle-entry">
|
|
|
<img
|
|
<img
|
|
|
class=""
|
|
class=""
|
|
@@ -99,7 +131,16 @@
|
|
|
draggable="false"
|
|
draggable="false"
|
|
|
>
|
|
>
|
|
|
</button>
|
|
</button>
|
|
|
- <button class="game-entry disaster-relief-entry">
|
|
|
|
|
|
|
+ <!-- 应急救灾 -->
|
|
|
|
|
+ <button
|
|
|
|
|
+ class="game-entry disaster-relief-entry"
|
|
|
|
|
+ @click="router.push({
|
|
|
|
|
+ name: 'GameByUnity',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ gameName: 'DisasterRelief'
|
|
|
|
|
+ },
|
|
|
|
|
+ })"
|
|
|
|
|
+ >
|
|
|
<img
|
|
<img
|
|
|
class=""
|
|
class=""
|
|
|
src="@/assets/images/disaster-relief-entry.png"
|
|
src="@/assets/images/disaster-relief-entry.png"
|
|
@@ -107,6 +148,7 @@
|
|
|
draggable="false"
|
|
draggable="false"
|
|
|
>
|
|
>
|
|
|
</button>
|
|
</button>
|
|
|
|
|
+ <!-- 生态保护 -->
|
|
|
<button class="game-entry enviroment-protection">
|
|
<button class="game-entry enviroment-protection">
|
|
|
<img
|
|
<img
|
|
|
class=""
|
|
class=""
|
|
@@ -115,6 +157,7 @@
|
|
|
draggable="false"
|
|
draggable="false"
|
|
|
>
|
|
>
|
|
|
</button>
|
|
</button>
|
|
|
|
|
+ <!-- 找回走失儿童 -->
|
|
|
<button class="game-entry lost-children-entry">
|
|
<button class="game-entry lost-children-entry">
|
|
|
<img
|
|
<img
|
|
|
class=""
|
|
class=""
|
|
@@ -128,7 +171,7 @@
|
|
|
<!-- 悬浮按钮 -->
|
|
<!-- 悬浮按钮 -->
|
|
|
<div class="floating-btn-group">
|
|
<div class="floating-btn-group">
|
|
|
<button
|
|
<button
|
|
|
- v-if="store.state.loginStatus === 1"
|
|
|
|
|
|
|
+ v-if="store.state.loginStatus"
|
|
|
class="redeem"
|
|
class="redeem"
|
|
|
>
|
|
>
|
|
|
<img
|
|
<img
|
|
@@ -159,6 +202,7 @@ import { useRoute, useRouter } from "vue-router"
|
|
|
import { useStore } from "vuex"
|
|
import { useStore } from "vuex"
|
|
|
import ClipboardJS from 'clipboard'
|
|
import ClipboardJS from 'clipboard'
|
|
|
import { showDialog } from 'vant'
|
|
import { showDialog } from 'vant'
|
|
|
|
|
+import { logout } from '@/api.js'
|
|
|
|
|
|
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
@@ -169,12 +213,22 @@ const {
|
|
|
windowSizeWhenDesignForRef,
|
|
windowSizeWhenDesignForRef,
|
|
|
} = useSizeAdapt(390, 752)
|
|
} = useSizeAdapt(390, 752)
|
|
|
|
|
|
|
|
|
|
+function onClickLogin() {
|
|
|
|
|
+ router.push({
|
|
|
|
|
+ name: 'LoginView',
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function onClickSignUp() {
|
|
function onClickSignUp() {
|
|
|
router.push({
|
|
router.push({
|
|
|
name: 'SignUp',
|
|
name: 'SignUp',
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function onClickLogout() {
|
|
|
|
|
+ logout()
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const shareText = location.href
|
|
const shareText = location.href
|
|
|
const clipboard = new ClipboardJS('button.share')
|
|
const clipboard = new ClipboardJS('button.share')
|
|
|
clipboard.on('success', function(e) {
|
|
clipboard.on('success', function(e) {
|
|
@@ -228,24 +282,26 @@ onUnmounted(() => {
|
|
|
}
|
|
}
|
|
|
>.after-login{
|
|
>.after-login{
|
|
|
margin-top: calc(25 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
margin-top: calc(25 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
- width: 100%;
|
|
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- padding-left: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
- padding-right: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
|
|
+ padding-left: calc(12 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
+ padding-right: calc(12 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
padding-top: calc(13 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
padding-top: calc(13 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
padding-bottom: calc(13 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
padding-bottom: calc(13 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
background: rgba(226, 201, 163, 0.5);
|
|
background: rgba(226, 201, 163, 0.5);
|
|
|
box-shadow: inset -1px -2px 1px 0px #E2C9A3;
|
|
box-shadow: inset -1px -2px 1px 0px #E2C9A3;
|
|
|
border-radius: calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
border-radius: calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
+ margin-left: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
+ margin-right: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
>img.avatar{
|
|
>img.avatar{
|
|
|
|
|
+ flex: 0 0 auto;
|
|
|
width: calc(54 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
width: calc(54 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
height: calc(54 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
height: calc(54 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
border-radius: calc(27 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
border-radius: calc(27 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
- margin-left: calc(13 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
object-fit: cover;
|
|
object-fit: cover;
|
|
|
}
|
|
}
|
|
|
>.info-wrap{
|
|
>.info-wrap{
|
|
|
|
|
+ flex: 0 0 auto;
|
|
|
margin-left: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
margin-left: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
font-size: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
font-size: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
font-family: Source Han Sans SC, Source Han Sans SC;
|
|
font-family: Source Han Sans SC, Source Han Sans SC;
|
|
@@ -258,7 +314,7 @@ onUnmounted(() => {
|
|
|
vertical-align: middle;
|
|
vertical-align: middle;
|
|
|
display: inline-block;
|
|
display: inline-block;
|
|
|
width: calc(69 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
width: calc(69 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
- letter-spacing: calc(3 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
|
|
+ letter-spacing: calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
margin-right: calc(10 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
margin-right: calc(10 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
}
|
|
}
|
|
|
>.value{
|
|
>.value{
|
|
@@ -267,7 +323,7 @@ onUnmounted(() => {
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
white-space: pre;
|
|
white-space: pre;
|
|
|
text-overflow: ellipsis;
|
|
text-overflow: ellipsis;
|
|
|
- width: calc(100 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
|
|
+ width: calc(80 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
>.point-bonus{
|
|
>.point-bonus{
|
|
@@ -283,27 +339,25 @@ onUnmounted(() => {
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
white-space: pre;
|
|
white-space: pre;
|
|
|
text-overflow: ellipsis;
|
|
text-overflow: ellipsis;
|
|
|
- width: calc(100 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
|
|
+ width: calc(80 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
>button.change-password{
|
|
>button.change-password{
|
|
|
- width: calc(30 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
- height: calc(30 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
- margin-left: calc(19 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
|
|
+ flex: 0 0 auto;
|
|
|
|
|
+ width: calc(32 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
+ margin-left: calc(12 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
>img{
|
|
>img{
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- height: 100%;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- >button.log-out{
|
|
|
|
|
- width: calc(30 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
- height: calc(30 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
- margin-left: calc(19 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
|
|
+ >button.logout{
|
|
|
|
|
+ flex: 0 0 auto;
|
|
|
|
|
+ width: calc(32 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
|
+ margin-left: calc(12 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
>img{
|
|
>img{
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- height: 100%;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|