diff --git a/src/components/Container.vue b/src/components/Container.vue
index 258f895..f5e4bf0 100644
--- a/src/components/Container.vue
+++ b/src/components/Container.vue
@@ -3,6 +3,7 @@ import { ref, onMounted } from "vue";
import AppBackground from "@/components/AppBackground.vue";
import Header from "@/components/Header.vue";
import ScreenHint from "@/components/ScreenHint.vue";
+import { getCurrentGameAPI } from "@/apis";
defineProps({
title: {
type: String,
@@ -27,16 +28,21 @@ defineProps({
});
const isIos = ref(true);
const showHint = ref(false);
-const hintMessage = ref("");
+const hintType = ref(0);
onMounted(() => {
const deviceInfo = uni.getDeviceInfo();
isIos.value = deviceInfo.osName === "ios";
});
-const showGlobalHint = (message) => {
- hintMessage.value = message;
+const showGlobalHint = (type) => {
+ hintType.value = type;
showHint.value = true;
};
uni.$showHint = showGlobalHint;
+
+const backToGame = async () => {
+ const result = await getCurrentGameAPI();
+ console.log(111, result);
+};
@@ -45,12 +51,23 @@ uni.$showHint = showGlobalHint;
-
- {{ hintMessage }}
+
+
+ 您还有正在进行中的对局,是否进入
+
+
+
+
+
@@ -66,4 +83,32 @@ uni.$showHint = showGlobalHint;
justify-content: space-between;
overflow-x: hidden;
}
+.back-to-game {
+ flex-direction: column;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: #fff;
+ width: 100%;
+ font-size: 14px;
+}
+.back-to-game > view {
+ display: flex;
+ align-items: center;
+ justify-content: space-around;
+ margin-top: 50rpx;
+ width: 100%;
+}
+.back-to-game > view > button {
+ padding: 12px;
+ border-radius: 20px;
+ background-color: #fff6;
+ color: #fff;
+ width: 45%;
+ font-size: 16px;
+}
+.back-to-game > view > button:first-child {
+ background-color: #fed847;
+ color: #000;
+}
diff --git a/src/components/ScreenHint.vue b/src/components/ScreenHint.vue
index 85b0896..4098c48 100644
--- a/src/components/ScreenHint.vue
+++ b/src/components/ScreenHint.vue
@@ -8,20 +8,30 @@ const props = defineProps({
},
onClose: {
type: Function,
- default: () => {},
+ default: null,
},
mode: {
type: String,
default: "normal",
},
});
+const getContentHeight = () => {
+ if (props.mode === "tall") return "47vw";
+ if (props.mode === "square") return "74vw";
+ return '36vw'
+};
-
+
+
@@ -38,6 +48,7 @@ const props = defineProps({
view:first-child > image {
position: absolute;
width: 80vw;
left: -7%;
- bottom: -20vw;
+ bottom: -18vw;
z-index: -1;
transform: translateY(-75px);
}
diff --git a/src/pages/my-device.vue b/src/pages/my-device.vue
index aa94323..3a6e593 100644
--- a/src/pages/my-device.vue
+++ b/src/pages/my-device.vue
@@ -212,7 +212,6 @@ const backToHome = () => {
display: flex;
flex-direction: column;
font-size: 14px;
- transform: translateX(10px) translateY(-10px);
}
.scan-tips > text {
margin-bottom: 2px;
diff --git a/src/pages/ranking.vue b/src/pages/ranking.vue
index f5e06d0..464451e 100644
--- a/src/pages/ranking.vue
+++ b/src/pages/ranking.vue
@@ -136,15 +136,15 @@ const toRankListPage = () => {
赛季平均环数
- {{ user.avg_ring || "-" }}环
+ {{
+ user.avg_ring ? user.avg_ring + "环" : "-"
+ }}
赛季胜率
- {{ user.avg_win || "-" }}%
+ {{
+ user.avg_win ? user.avg_win + "%" : "-"
+ }}
diff --git a/src/static/screen-hint-bg.png b/src/static/screen-hint-bg.png
new file mode 100644
index 0000000..abff953
Binary files /dev/null and b/src/static/screen-hint-bg.png differ