业务逻辑完善
This commit is contained in:
@@ -31,6 +31,7 @@ watch(
|
||||
);
|
||||
|
||||
const onClick = async () => {
|
||||
if (!user.value.id) return;
|
||||
if (user.value.id === props.data.id) {
|
||||
return uni.navigateTo({
|
||||
url: "/pages/my-like-list",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -46,9 +46,13 @@ const canvasVisible = ref(false); // 控制canvas显示状态
|
||||
const strength = ref(0);
|
||||
|
||||
const toRecordPage = () => {
|
||||
if (user.value.id) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/point-book-list",
|
||||
});
|
||||
} else {
|
||||
showModal.value = true;
|
||||
}
|
||||
};
|
||||
|
||||
const toRankPage = () => {
|
||||
|
||||
Reference in New Issue
Block a user