新增分享页,以及BUG修复
This commit is contained in:
@@ -93,8 +93,7 @@ const shareImage = async () => {
|
||||
|
||||
onLoad(async (options) => {
|
||||
if (options.id) {
|
||||
const result = await getPointBookDetailAPI(options.id || 194);
|
||||
console.log(result);
|
||||
const result = await getPointBookDetailAPI(options.id || 195);
|
||||
record.value = result;
|
||||
notes.value = result.remark || "";
|
||||
const config = uni.getStorageSync("point-book-config");
|
||||
@@ -112,7 +111,7 @@ onLoad(async (options) => {
|
||||
});
|
||||
|
||||
onShareAppMessage(async () => {
|
||||
const imageUrl = await generateShareCardImage(
|
||||
const imageUrl = await generateShareCard(
|
||||
"shareCardCanvas",
|
||||
record.value.recordDate,
|
||||
data.value.userTotalRing,
|
||||
@@ -120,12 +119,12 @@ onShareAppMessage(async () => {
|
||||
);
|
||||
return {
|
||||
title: "射箭打卡,今日又精进了一些~",
|
||||
path: "/pages/point-book-detail?id=" + record.value.id,
|
||||
path: "/pages/point-book-detail-share?id=" + record.value.id,
|
||||
imageUrl,
|
||||
};
|
||||
});
|
||||
onShareTimeline(async () => {
|
||||
const imageUrl = await generateShareCardImage(
|
||||
const imageUrl = await generateShareCard(
|
||||
"shareCardCanvas",
|
||||
record.value.recordDate,
|
||||
data.value.userTotalRing,
|
||||
@@ -252,9 +251,7 @@ onShareTimeline(async () => {
|
||||
<view v-for="(item, index) in record.groups" :key="index">
|
||||
<view v-if="selectedIndex === 0 && index !== 0">
|
||||
<text>{{ index }}:</text>
|
||||
<text>{{
|
||||
item.list.reduce((acc, cur) => acc + cur.ring, 0)
|
||||
}}</text>
|
||||
<text>{{ item.userTotalRing }}</text>
|
||||
<text>环</text>
|
||||
</view>
|
||||
<view
|
||||
@@ -447,6 +444,7 @@ onShareTimeline(async () => {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: #000;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tip-content > text {
|
||||
width: 100%;
|
||||
@@ -499,6 +497,7 @@ onShareTimeline(async () => {
|
||||
justify-content: center;
|
||||
}
|
||||
.ring-text-groups > view > view:first-child:nth-last-child(2) {
|
||||
margin-left: 20rpx;
|
||||
width: 90rpx;
|
||||
text-align: center;
|
||||
font-size: 20rpx;
|
||||
@@ -528,9 +527,12 @@ onShareTimeline(async () => {
|
||||
width: 1fr;
|
||||
text-align: center;
|
||||
margin-bottom: 10rpx;
|
||||
font-weight: 500;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.notes-input {
|
||||
width: calc(100% - 40rpx);
|
||||
min-width: calc(100% - 40rpx);
|
||||
margin: 25rpx 0;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 5px;
|
||||
|
||||
Reference in New Issue
Block a user