业务逻辑完善

This commit is contained in:
kron
2026-01-09 14:10:23 +08:00
parent ddf0dafe08
commit 937fce1a35
3 changed files with 19 additions and 11 deletions

View File

@@ -7,6 +7,10 @@ import { capsuleHeight } from "@/util";
import { wxShare } from "@/util";
import { sharePointData } from "@/canvas";
import useStore from "@/store";
import { storeToRefs } from "pinia";
const { user } = storeToRefs(useStore());
const list = ref([]);
const mine = ref({
averageRing: 0,
@@ -28,12 +32,6 @@ const shareImage = async () => {
await wxShare("shareCanvas");
loading.value = false;
};
// onMounted(() => {
// setTimeout(() => {
// shareImage();
// }, 1000);
// });
</script>
<template>
@@ -80,7 +78,7 @@ const shareImage = async () => {
<text>本周箭数</text>
<text>消耗</text>
</view>
<view class="data-list" :style="{ marginBottom: '20rpx' }">
<view class="data-list" :style="{ marginBottom: '20rpx' }" v-if="user.id">
<PointRankItem :data="mine" :borderWidth="0" />
</view>
<view
@@ -95,7 +93,12 @@ const shareImage = async () => {
<PointRankItem v-for="item in list" :key="item.id" :data="item" />
</ScrollList>
</view>
<button hover-class="none" class="share-btn" @click="shareImage">
<button
hover-class="none"
class="share-btn"
@click="shareImage"
v-if="user.id"
>
<image src="../static/share-icon.png" mode="widthFix" />
</button>
<canvas