添加全局提示
This commit is contained in:
@@ -61,11 +61,12 @@ function handleTabClick(index) {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.footer {
|
.footer {
|
||||||
height: 90px;
|
height: 90px;
|
||||||
width: 100%;
|
width: 100vw;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-bg {
|
.footer-bg {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import AppBackground from "@/components/AppBackground.vue";
|
import AppBackground from "@/components/AppBackground.vue";
|
||||||
import Header from "@/components/Header.vue";
|
import Header from "@/components/Header.vue";
|
||||||
|
import ScreenHint from "@/components/ScreenHint.vue";
|
||||||
defineProps({
|
defineProps({
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -19,30 +20,45 @@ defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
default: "auto",
|
default: "auto",
|
||||||
},
|
},
|
||||||
|
isHome: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const isIos = ref(true);
|
const isIos = ref(true);
|
||||||
|
const showHint = ref(false);
|
||||||
|
const hintMessage = ref("");
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const deviceInfo = uni.getDeviceInfo();
|
const deviceInfo = uni.getDeviceInfo();
|
||||||
isIos.value = deviceInfo.osName === "ios";
|
isIos.value = deviceInfo.osName === "ios";
|
||||||
});
|
});
|
||||||
|
const showGlobalHint = (message) => {
|
||||||
|
hintMessage.value = message;
|
||||||
|
showHint.value = true;
|
||||||
|
};
|
||||||
|
uni.$showHint = showGlobalHint;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<AppBackground :type="bgType" />
|
<AppBackground :type="bgType" />
|
||||||
<Header :title="title" :onBack="onBack" />
|
<Header v-if="!isHome" :title="title" :onBack="onBack" />
|
||||||
<view
|
<view
|
||||||
class="content"
|
class="content"
|
||||||
:style="{ height: `calc(100vh - ${isIos ? 98 : 95}px)`, overflow }"
|
:style="{ height: isHome ? '100vh' : `calc(100vh - ${isIos ? 98 : 95}px)`, overflow }"
|
||||||
>
|
>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</view>
|
</view>
|
||||||
|
<ScreenHint :show="showHint" :onClose="() => (showHint = false)">
|
||||||
|
{{ hintMessage }}
|
||||||
|
</ScreenHint>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.content {
|
.content {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import AppBackground from "@/components/AppBackground.vue";
|
import Container from "@/components/Container.vue";
|
||||||
import Header from "@/components/Header.vue";
|
|
||||||
import Guide from "@/components/Guide.vue";
|
import Guide from "@/components/Guide.vue";
|
||||||
import SButton from "@/components/SButton.vue";
|
import SButton from "@/components/SButton.vue";
|
||||||
import SModal from "@/components/SModal.vue";
|
import SModal from "@/components/SModal.vue";
|
||||||
@@ -51,9 +50,8 @@ const onCreateRoom = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<Container title="好友约战">
|
||||||
<AppBackground />
|
<view :style="{ width: '100%' }">
|
||||||
<Header title="好友约战" />
|
|
||||||
<Guide>
|
<Guide>
|
||||||
<view class="guide-tips">
|
<view class="guide-tips">
|
||||||
<text>约上朋友开几局,欢乐多,不寂寞</text>
|
<text>约上朋友开几局,欢乐多,不寂寞</text>
|
||||||
@@ -93,6 +91,7 @@ const onCreateRoom = () => {
|
|||||||
<CreateRoom v-if="!warnning" :onConfirm="() => (showModal = false)" />
|
<CreateRoom v-if="!warnning" :onConfirm="() => (showModal = false)" />
|
||||||
</SModal>
|
</SModal>
|
||||||
</view>
|
</view>
|
||||||
|
</Container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
|
import Container from "@/components/Container.vue";
|
||||||
import AppFooter from "@/components/AppFooter.vue";
|
import AppFooter from "@/components/AppFooter.vue";
|
||||||
import AppBackground from "@/components/AppBackground.vue";
|
import AppBackground from "@/components/AppBackground.vue";
|
||||||
import UserHeader from "@/components/UserHeader.vue";
|
import UserHeader from "@/components/UserHeader.vue";
|
||||||
@@ -86,13 +87,10 @@ const comingSoon = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view
|
<Container :isHome="true">
|
||||||
class="root-container"
|
<view class="container" :style="{ paddingTop: isIos ? '100rpx' : '70rpx' }">
|
||||||
:style="{ paddingTop: isIos ? '100rpx' : '70rpx' }"
|
|
||||||
>
|
|
||||||
<AppBackground />
|
|
||||||
<UserHeader showRank :onSignin="() => (showModal = true)" />
|
<UserHeader showRank :onSignin="() => (showModal = true)" />
|
||||||
<view class="container">
|
<view :style="{ padding: '12px 10px' }">
|
||||||
<view class="feature-grid">
|
<view class="feature-grid">
|
||||||
<view class="bow-card">
|
<view class="bow-card">
|
||||||
<image
|
<image
|
||||||
@@ -100,9 +98,12 @@ const comingSoon = () => {
|
|||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
@click="() => toPage('/pages/my-device')"
|
@click="() => toPage('/pages/my-device')"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<text v-if="!user.id">我的弓箭</text>
|
<text v-if="!user.id">我的弓箭</text>
|
||||||
<text v-if="user.id && !device.deviceId">请绑定设备</text>
|
<text v-if="user.id && !device.deviceId">请绑定设备</text>
|
||||||
<text v-if="user.id && device.deviceId">{{ device.deviceName }}</text>
|
<text v-if="user.id && device.deviceId">{{
|
||||||
|
device.deviceName
|
||||||
|
}}</text>
|
||||||
<image
|
<image
|
||||||
src="../static/a2@2x.png"
|
src="../static/a2@2x.png"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
@@ -114,7 +115,10 @@ const comingSoon = () => {
|
|||||||
<image src="../static/a2@2x(1).png" mode="widthFix" />
|
<image src="../static/a2@2x(1).png" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="friend-card" @click="() => toPage('/pages/friend-battle')">
|
<view
|
||||||
|
class="friend-card"
|
||||||
|
@click="() => toPage('/pages/friend-battle')"
|
||||||
|
>
|
||||||
<image src="../static/a3@2x.png" mode="widthFix" />
|
<image src="../static/a3@2x.png" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -142,7 +146,10 @@ const comingSoon = () => {
|
|||||||
<image v-if="i === 2" src="../static/champ2.png" />
|
<image v-if="i === 2" src="../static/champ2.png" />
|
||||||
<image v-if="i === 3" src="../static/champ3.png" />
|
<image v-if="i === 3" src="../static/champ3.png" />
|
||||||
<view v-if="i > 3">{{ i }}</view>
|
<view v-if="i > 3">{{ i }}</view>
|
||||||
<image :src="rankData.rank[i - 1].avatar" mode="aspectFill" />
|
<image
|
||||||
|
:src="rankData.rank[i - 1].avatar"
|
||||||
|
mode="aspectFill"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</block>
|
</block>
|
||||||
@@ -153,7 +160,13 @@ const comingSoon = () => {
|
|||||||
</view>
|
</view>
|
||||||
<view class="region-stats">
|
<view class="region-stats">
|
||||||
<view
|
<view
|
||||||
v-for="(region, index) in ['广东', '湖南', '内蒙', '海南', '四川']"
|
v-for="(region, index) in [
|
||||||
|
'广东',
|
||||||
|
'湖南',
|
||||||
|
'内蒙',
|
||||||
|
'海南',
|
||||||
|
'四川',
|
||||||
|
]"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="region-item"
|
class="region-item"
|
||||||
@click="comingSoon"
|
@click="comingSoon"
|
||||||
@@ -198,22 +211,17 @@ const comingSoon = () => {
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<AppFooter :signin="() => (showModal = true)" />
|
|
||||||
<SModal :show="showModal" :onClose="() => (showModal = false)">
|
<SModal :show="showModal" :onClose="() => (showModal = false)">
|
||||||
<Signin :onClose="() => (showModal = false)" />
|
<Signin :onClose="() => (showModal = false)" />
|
||||||
</SModal>
|
</SModal>
|
||||||
</view>
|
</view>
|
||||||
|
<AppFooter :signin="() => (showModal = true)" />
|
||||||
|
</Container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.root-container {
|
|
||||||
color: white;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
height: calc(100vh - 210px);
|
width: 100%;
|
||||||
padding: 15px 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.feature-grid {
|
.feature-grid {
|
||||||
@@ -352,6 +360,7 @@ const comingSoon = () => {
|
|||||||
|
|
||||||
.more-players > text {
|
.more-players > text {
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.region-stats {
|
.region-stats {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import AppBackground from "@/components/AppBackground.vue";
|
import Container from "@/components/Container.vue";
|
||||||
import Header from "@/components/Header.vue";
|
|
||||||
import Guide from "@/components/Guide.vue";
|
import Guide from "@/components/Guide.vue";
|
||||||
|
|
||||||
const toPractiseOne = () => {
|
const toPractiseOne = () => {
|
||||||
@@ -17,9 +16,8 @@ const toPractiseTwo = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<Container title="个人练习">
|
||||||
<AppBackground />
|
<view :style="{ width: '100%' }">
|
||||||
<Header title="个人练习" />
|
|
||||||
<Guide>
|
<Guide>
|
||||||
<text :style="{ color: '#fed847' }"
|
<text :style="{ color: '#fed847' }"
|
||||||
>师傅领进门,修行靠自身,赶紧练起来吧。</text
|
>师傅领进门,修行靠自身,赶紧练起来吧。</text
|
||||||
@@ -35,7 +33,11 @@ const toPractiseTwo = () => {
|
|||||||
:style="{ marginTop: 0 }"
|
:style="{ marginTop: 0 }"
|
||||||
/>
|
/>
|
||||||
<view class="practise-btn" @click="toPractiseOne">
|
<view class="practise-btn" @click="toPractiseOne">
|
||||||
<image src="../static/practise1.png" class="practise1" mode="widthFix" />
|
<image
|
||||||
|
src="../static/practise1.png"
|
||||||
|
class="practise1"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<image
|
<image
|
||||||
src="../static/practise-bg.png"
|
src="../static/practise-bg.png"
|
||||||
@@ -43,7 +45,11 @@ const toPractiseTwo = () => {
|
|||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
/>
|
/>
|
||||||
<view class="practise-btn" @click="toPractiseTwo">
|
<view class="practise-btn" @click="toPractiseTwo">
|
||||||
<image src="../static/practise2.png" class="practise2" mode="widthFix" />
|
<image
|
||||||
|
src="../static/practise2.png"
|
||||||
|
class="practise2"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<image
|
<image
|
||||||
src="../static/practise-bg.png"
|
src="../static/practise-bg.png"
|
||||||
@@ -51,6 +57,7 @@ const toPractiseTwo = () => {
|
|||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
</Container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import AppBackground from "@/components/AppBackground.vue";
|
import Container from "@/components/Container.vue";
|
||||||
import Header from "@/components/Header.vue";
|
|
||||||
import UserHeader from "@/components/UserHeader.vue";
|
import UserHeader from "@/components/UserHeader.vue";
|
||||||
import UserItem from "@/components/UserItem.vue";
|
import UserItem from "@/components/UserItem.vue";
|
||||||
import Avatar from "@/components/Avatar.vue";
|
import Avatar from "@/components/Avatar.vue";
|
||||||
@@ -55,9 +54,8 @@ const logout = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<Container title="用户信息">
|
||||||
<AppBackground />
|
<view :style="{ width: '100%' }">
|
||||||
<Header title="用户信息" />
|
|
||||||
<UserHeader :user="user" />
|
<UserHeader :user="user" />
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<UserItem title="用户名">{{ user.nickName }}</UserItem>
|
<UserItem title="用户名">{{ user.nickName }}</UserItem>
|
||||||
@@ -78,7 +76,9 @@ const logout = () => {
|
|||||||
<text v-if="user.trio > 0" :style="{ color: '#259249' }">已完成</text>
|
<text v-if="user.trio > 0" :style="{ color: '#259249' }">已完成</text>
|
||||||
<text v-else :style="{ color: '#CC311F' }">未完成</text>
|
<text v-else :style="{ color: '#CC311F' }">未完成</text>
|
||||||
</UserItem>
|
</UserItem>
|
||||||
<UserItem title="会员" :onClick="toBeVipPage"> 已赠送6个月会员 </UserItem>
|
<UserItem title="会员" :onClick="toBeVipPage">
|
||||||
|
已赠送6个月会员
|
||||||
|
</UserItem>
|
||||||
<UserItem title="等级介绍" :onClick="toGradeIntroPage" />
|
<UserItem title="等级介绍" :onClick="toGradeIntroPage" />
|
||||||
<UserItem
|
<UserItem
|
||||||
title="段位介绍"
|
title="段位介绍"
|
||||||
@@ -93,6 +93,7 @@ const logout = () => {
|
|||||||
<UserItem title="退出登录(仅用于测试)" :onClick="logout" />
|
<UserItem title="退出登录(仅用于测试)" :onClick="logout" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</Container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user