添加射箭前校准提示
This commit is contained in:
@@ -24,6 +24,7 @@ const { updateConfig, updateUser, updateDevice, updateRank, getLvlName } =
|
||||
const { user, device, rankData } = storeToRefs(store);
|
||||
const showModal = ref(false);
|
||||
const showGuide = ref(false);
|
||||
const calibration = ref(false);
|
||||
|
||||
const toPage = (path) => {
|
||||
if (!user.value.id) {
|
||||
@@ -39,6 +40,9 @@ const toPage = (path) => {
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
if (!calibration.value) {
|
||||
return uni.$showHint(4);
|
||||
}
|
||||
if ("/pages/first-try".indexOf(path) === -1 && !user.value.trio) {
|
||||
return uni.showToast({
|
||||
title: "请先完成新手试炼",
|
||||
@@ -99,12 +103,9 @@ onMounted(async () => {
|
||||
console.log("全局配置:", config);
|
||||
});
|
||||
|
||||
const comingSoon = () => {
|
||||
uni.showToast({
|
||||
title: "敬请期待",
|
||||
icon: "none",
|
||||
});
|
||||
};
|
||||
onShow(() => {
|
||||
calibration.value = uni.getStorageSync("calibration");
|
||||
});
|
||||
|
||||
onShareAppMessage(() => {
|
||||
return {
|
||||
@@ -234,59 +235,6 @@ onShareTimeline(() => {
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="region-stats">
|
||||
<view
|
||||
v-for="(region, index) in [
|
||||
{ name: '广东', score: 4291 },
|
||||
{ name: '湖南', score: 3095 },
|
||||
{ name: '内蒙', score: 2342 },
|
||||
{ name: '海南', score: 1812 },
|
||||
{ name: '四川', score: 1293 },
|
||||
]"
|
||||
:key="index"
|
||||
class="region-item"
|
||||
@click="comingSoon"
|
||||
>
|
||||
<image src="../static/region-bg.png" mode="widthFix" />
|
||||
<image
|
||||
v-if="index === 0"
|
||||
src="../static/region-1.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<image
|
||||
v-if="index === 1"
|
||||
src="../static/region-2.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<image
|
||||
v-if="index === 2"
|
||||
src="../static/region-3.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<image
|
||||
v-if="index === 3"
|
||||
src="../static/region-4.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<image
|
||||
v-if="index === 4"
|
||||
src="../static/region-5.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<text>{{ region.name }}</text>
|
||||
<view>
|
||||
<text :style="{ color: '#fff', marginRight: '2px' }">{{
|
||||
region.score
|
||||
}}</text>
|
||||
<text>分</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="region-more" @click="comingSoon">
|
||||
<image src="../static/region-more.png" mode="widthFix" />
|
||||
<text>...</text>
|
||||
<text>更多</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<SModal :show="showModal" :onClose="() => (showModal = false)">
|
||||
@@ -439,60 +387,6 @@ onShareTimeline(() => {
|
||||
margin-left: 2px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.region-stats {
|
||||
display: flex;
|
||||
grid-template-columns: repeat(6, 1fr);
|
||||
margin-top: 20px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.region-item,
|
||||
.region-more {
|
||||
border-radius: 10px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
width: 13vw;
|
||||
height: 13vw;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #c5c5c5;
|
||||
font-size: 12px;
|
||||
}
|
||||
.region-item > text {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.region-more {
|
||||
width: 8vw;
|
||||
height: 13vw;
|
||||
}
|
||||
.region-item > image:first-child,
|
||||
.region-more > image:first-child {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: -1;
|
||||
}
|
||||
.region-item > image:nth-of-type(2) {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 18px;
|
||||
}
|
||||
.region-item > view:last-child {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-size: 10px;
|
||||
}
|
||||
.region-more > text:first-of-type {
|
||||
font-size: 30px;
|
||||
line-height: 20px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.my-data {
|
||||
display: flex;
|
||||
margin-top: 20px;
|
||||
|
||||
@@ -26,6 +26,7 @@ const seasonData = ref([]);
|
||||
const rankData = ref({ user: {} });
|
||||
const showSeasonList = ref(false);
|
||||
const currentSeasonData = ref(defaultSeasonData);
|
||||
const calibration = ref(false);
|
||||
|
||||
const handleSelect = (index) => {
|
||||
selectedIndex.value = index;
|
||||
@@ -47,6 +48,9 @@ const toMatchPage = async (gameType, teamSize) => {
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
if (!calibration.value) {
|
||||
return uni.$showHint(4);
|
||||
}
|
||||
if (!user.value.trio) {
|
||||
return uni.showToast({
|
||||
title: "请先完成新手试炼",
|
||||
@@ -117,6 +121,7 @@ const updateData = () => {
|
||||
}
|
||||
};
|
||||
onShow(async () => {
|
||||
calibration.value = uni.getStorageSync("calibration");
|
||||
const result = await getHomeData();
|
||||
rankData.value = result;
|
||||
handleSelect(selectedIndex.value);
|
||||
|
||||
Reference in New Issue
Block a user