feat: maidian
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
{
|
||||
"path": "pages/make/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "讨论",
|
||||
"navigationBarTitleText": "制作祝福卡",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
:key="item.id"
|
||||
class="grid-item"
|
||||
:class="{ active: currentAvatar?.id === item.id }"
|
||||
@tap="currentAvatar = item"
|
||||
@tap="toggleAvatar(item)"
|
||||
>
|
||||
<image :src="item.imageUrl" class="grid-img" mode="aspectFill" />
|
||||
<view v-if="currentAvatar?.id === item.id" class="check">✓</view>
|
||||
@@ -377,6 +377,10 @@ onLoad((options) => {
|
||||
shareToken.value = options.shareToken;
|
||||
saveViewRequest("avatar_download", options.shareToken);
|
||||
}
|
||||
trackRecord({
|
||||
eventName: "avatar_page_visit",
|
||||
eventType: `visit`,
|
||||
});
|
||||
});
|
||||
|
||||
onReachBottom(() => {
|
||||
@@ -387,13 +391,32 @@ onReachBottom(() => {
|
||||
} else if (activeTool.value === "decor") {
|
||||
loadDecors();
|
||||
}
|
||||
trackRecord({
|
||||
eventName: "avatar_load_more",
|
||||
eventType: `load_more`,
|
||||
elementId: activeTool.value,
|
||||
});
|
||||
});
|
||||
|
||||
const goBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
const toggleAvatar = (avatar) => {
|
||||
currentAvatar.value = avatar;
|
||||
trackRecord({
|
||||
eventName: "avatar_click",
|
||||
eventType: `select`,
|
||||
elementId: avatar?.id || "",
|
||||
});
|
||||
};
|
||||
|
||||
const toggleFrame = (frame) => {
|
||||
trackRecord({
|
||||
eventName: "avatar_frame_click",
|
||||
eventType: `select`,
|
||||
elementId: frame?.id || "",
|
||||
});
|
||||
if (selectedFrame.value === frame) {
|
||||
selectedFrame.value = null;
|
||||
} else {
|
||||
@@ -402,6 +425,11 @@ const toggleFrame = (frame) => {
|
||||
};
|
||||
|
||||
const toggleDecor = (decor) => {
|
||||
trackRecord({
|
||||
eventName: "avatar_decor_click",
|
||||
eventType: `select`,
|
||||
elementId: decor?.id || "",
|
||||
});
|
||||
if (selectedDecor.value === decor) {
|
||||
selectedDecor.value = null;
|
||||
} else {
|
||||
|
||||
@@ -135,6 +135,7 @@ import {
|
||||
saveRemoteImageToLocal,
|
||||
saveRecordRequest,
|
||||
saveViewRequest,
|
||||
trackRecord,
|
||||
} from "@/utils/common.js";
|
||||
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||
|
||||
@@ -166,6 +167,10 @@ onLoad((options) => {
|
||||
shareToken.value = options.shareToken;
|
||||
saveViewRequest(options.shareToken, "fortune_draw");
|
||||
}
|
||||
trackRecord({
|
||||
eventName: "fortune_page_visit",
|
||||
eventType: `visit`,
|
||||
});
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
@@ -198,9 +203,6 @@ onShareTimeline(async () => {
|
||||
});
|
||||
|
||||
const handleLogind = async () => {
|
||||
if (shareToken.value) {
|
||||
console.log(11111111, shareToken.value);
|
||||
}
|
||||
checkDrawStatus();
|
||||
};
|
||||
|
||||
|
||||
@@ -89,6 +89,8 @@ import { onLoad } from "@dcloudio/uni-app";
|
||||
import { getList } from "@/api/fortune.js";
|
||||
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||
import { formatDate } from "@/utils/date.js";
|
||||
import { trackRecord } from "@/utils/common.js";
|
||||
|
||||
// 状态管理
|
||||
const records = ref([]);
|
||||
const page = ref(1);
|
||||
@@ -160,6 +162,10 @@ const loadData = async () => {
|
||||
|
||||
const loadMore = () => {
|
||||
loadData();
|
||||
trackRecord({
|
||||
eventName: "fortune_record_page_visit",
|
||||
eventType: `visit`,
|
||||
});
|
||||
};
|
||||
|
||||
const goDetail = (item) => {
|
||||
|
||||
@@ -138,7 +138,7 @@ import {
|
||||
} from "@dcloudio/uni-app";
|
||||
import { getBavBarHeight } from "@/utils/system";
|
||||
import { getRecommendList, getRandomGreeting, getTipsList } from "@/api/system";
|
||||
import { getShareToken, saveViewRequest } from "@/utils/common.js";
|
||||
import { getShareToken, saveViewRequest, trackRecord } from "@/utils/common.js";
|
||||
|
||||
const countdownText = ref("");
|
||||
const recommendList = ref([]);
|
||||
@@ -194,7 +194,10 @@ onLoad((options) => {
|
||||
// updateCountdown();
|
||||
getRandomGreetingText();
|
||||
fetchRecommendList();
|
||||
|
||||
trackRecord({
|
||||
eventName: "index_page_visit",
|
||||
eventType: `visit`,
|
||||
});
|
||||
// Daily Inspiration Logic
|
||||
// const startOfYear = new Date(date.getFullYear(), 0, 0);
|
||||
// const diff = date - startOfYear;
|
||||
@@ -237,6 +240,11 @@ const getRandomGreetingText = async () => {
|
||||
};
|
||||
|
||||
const useGreeting = () => {
|
||||
trackRecord({
|
||||
eventName: "index_goto_make",
|
||||
eventType: "jump",
|
||||
elementId: dailyGreeting.value,
|
||||
});
|
||||
uni.setStorageSync("TEMP_BLESSING_TEXT", dailyGreeting.value);
|
||||
uni.switchTab({
|
||||
url: "/pages/make/index",
|
||||
@@ -345,6 +353,11 @@ const getCtaText = (type) => {
|
||||
|
||||
const onCardClick = (card) => {
|
||||
// 构造传递的数据
|
||||
trackRecord({
|
||||
eventName: "index_recommend_click",
|
||||
eventType: `jump_${card.type}`,
|
||||
elementId: card?.recommendId || "",
|
||||
});
|
||||
const query = `recommendId=${card.recommendId || ""}&type=${card.type || ""}&imageUrl=${encodeURIComponent(card.imageUrl || "")}`;
|
||||
|
||||
if (
|
||||
@@ -377,6 +390,11 @@ const onCardClick = (card) => {
|
||||
};
|
||||
|
||||
const onFeatureTap = (item) => {
|
||||
trackRecord({
|
||||
eventName: "index_function_select",
|
||||
eventType: "jump",
|
||||
elementId: item.type,
|
||||
});
|
||||
if (item.type === "fortune") {
|
||||
uni.navigateTo({ url: "/pages/fortune/index" });
|
||||
return;
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
@touchmove.stop="handleBubbleTouchMove"
|
||||
@touchend.stop="handleBubbleTouchEnd"
|
||||
:style="{
|
||||
marginTop: 230 + bubbleOffsetY + 'rpx',
|
||||
marginTop: 140 + bubbleOffsetY + 'rpx',
|
||||
maxWidth: bubbleMaxWidth + 80 + 'rpx',
|
||||
}"
|
||||
>
|
||||
@@ -767,8 +767,8 @@ const handleTitleTouchMove = (e) => {
|
||||
}
|
||||
};
|
||||
|
||||
const targetName = ref("祝您");
|
||||
const oldTargetName = ref("祝您");
|
||||
const targetName = ref("");
|
||||
const oldTargetName = ref("");
|
||||
const signatureName = ref(userStore?.userInfo?.nickName || "xxx");
|
||||
const oldSignatureName = ref(userStore?.userInfo?.nickName || "xxx");
|
||||
|
||||
@@ -898,6 +898,10 @@ onLoad((options) => {
|
||||
if (options.shareToken) {
|
||||
shareToken.value = options.shareToken;
|
||||
}
|
||||
trackRecord({
|
||||
eventName: "make_page_visit",
|
||||
eventType: `visit`,
|
||||
});
|
||||
});
|
||||
|
||||
const syncUserInfo = () => {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/>
|
||||
</view>
|
||||
<view class="status-info">
|
||||
<view class="status-title">当前正在使用</view>
|
||||
<view class="status-title">头像效果预览</view>
|
||||
<view class="decor-name">
|
||||
<text class="star-icon">✪</text>
|
||||
<text>{{ currentAvatar.decorName || "金马贺岁挂饰" }}</text>
|
||||
@@ -93,6 +93,7 @@ import { onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
|
||||
import { getMyAvatar, userAvatarChange } from "@/api/mine.js";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||
import { trackRecord } from "@/utils/common.js";
|
||||
|
||||
const userStore = useUserStore();
|
||||
const list = ref([]);
|
||||
@@ -115,6 +116,10 @@ const names = [
|
||||
|
||||
onMounted(() => {
|
||||
fetchList(true);
|
||||
trackRecord({
|
||||
eventName: "avatar_record_page_visit",
|
||||
eventType: `visit`,
|
||||
});
|
||||
});
|
||||
|
||||
onPullDownRefresh(() => {
|
||||
@@ -174,6 +179,7 @@ const changeUserAvatar = async (imageUrl) => {
|
||||
title: "头像更换成功",
|
||||
icon: "success",
|
||||
});
|
||||
// userStore.fetchUserInfo();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ import {
|
||||
} from "@dcloudio/uni-app";
|
||||
import { getMyCard } from "@/api/mine.js";
|
||||
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||
import { getShareToken } from "@/utils/common.js";
|
||||
import { getShareToken, trackRecord } from "@/utils/common.js";
|
||||
|
||||
const list = ref([]);
|
||||
const page = ref(1);
|
||||
@@ -112,6 +112,10 @@ const totalCount = ref(0);
|
||||
|
||||
onMounted(() => {
|
||||
fetchList(true);
|
||||
trackRecord({
|
||||
eventName: "greeting_page_visit",
|
||||
eventType: `visit`,
|
||||
});
|
||||
});
|
||||
|
||||
onPullDownRefresh(() => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="help-page" >
|
||||
<view class="help-page">
|
||||
<NavBar title="帮助中心" />
|
||||
|
||||
<!-- Search Bar -->
|
||||
@@ -133,6 +133,14 @@
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||
import { trackRecord } from "@/utils/common.js";
|
||||
|
||||
onMounted(() => {
|
||||
trackRecord({
|
||||
eventName: "help_page_visit",
|
||||
eventType: `visit`,
|
||||
});
|
||||
});
|
||||
|
||||
const faqList = ref([
|
||||
{
|
||||
@@ -157,7 +165,7 @@ const faqList = ref([
|
||||
items: [
|
||||
{
|
||||
q: "如何更换新的头像",
|
||||
a: "在头像定制页面,首先选择地图是微信头像或者系统头像,左边选择您喜欢的边框样式,右边选择头像挂饰,可移动位置,缩放大小,点击保存即可。",
|
||||
a: "在头像定制页面,首先选择上传头像或系统头像,左边选择您喜欢的边框样式,右边选择头像挂饰,可移动位置,缩放大小,点击保存即可。",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
import { ref, computed, onMounted } from "vue";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import { onShareAppMessage } from "@dcloudio/uni-app";
|
||||
import { getShareToken } from "@/utils/common";
|
||||
import { getShareToken, trackRecord } from "@/utils/common";
|
||||
import LoginPopup from "@/components/LoginPopup/LoginPopup.vue";
|
||||
|
||||
const userStore = useUserStore();
|
||||
@@ -166,6 +166,10 @@ onMounted(() => {
|
||||
navBarTop.value = sysInfo.statusBarHeight;
|
||||
// Assuming standard nav bar height
|
||||
navBarHeight.value = 44;
|
||||
trackRecord({
|
||||
eventName: "mine_page_visit",
|
||||
eventType: `visit`,
|
||||
});
|
||||
});
|
||||
|
||||
onShareAppMessage(async () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="wallpaper-page" >
|
||||
<view class="wallpaper-page">
|
||||
<NavBar title="我的壁纸" />
|
||||
|
||||
<!-- Header Stats -->
|
||||
@@ -24,7 +24,12 @@
|
||||
<!-- List Section -->
|
||||
<view class="list-section">
|
||||
<view class="list-container">
|
||||
<view v-for="item in list" :key="item.id" class="grid-item" @tap="onPreview(item)">
|
||||
<view
|
||||
v-for="item in list"
|
||||
:key="item.id"
|
||||
class="grid-item"
|
||||
@tap="onPreview(item)"
|
||||
>
|
||||
<image :src="item.imageUrl" mode="aspectFill" class="wallpaper-img" />
|
||||
<view class="date-badge">
|
||||
<text>{{ formatDate(item.createdAt) }}</text>
|
||||
@@ -51,6 +56,7 @@ import { ref, onMounted } from "vue";
|
||||
import { onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
|
||||
import { getMyWallpaper } from "@/api/mine.js";
|
||||
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||
import { trackRecord } from "@/utils/common.js";
|
||||
|
||||
const list = ref([]);
|
||||
const page = ref(1);
|
||||
@@ -61,6 +67,10 @@ const totalCount = ref(0);
|
||||
|
||||
onMounted(() => {
|
||||
fetchList(true);
|
||||
trackRecord({
|
||||
eventName: "wallpaper_record_page_visit",
|
||||
eventType: `visit`,
|
||||
});
|
||||
});
|
||||
|
||||
onPullDownRefresh(() => {
|
||||
@@ -125,7 +135,7 @@ const formatDate = (dateStr) => {
|
||||
const onPreview = (item) => {
|
||||
uni.previewImage({
|
||||
urls: [item.imageUrl],
|
||||
current: item.imageUrl
|
||||
current: item.imageUrl,
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -93,7 +93,7 @@ import {
|
||||
import { onShareAppMessage, onShareTimeline, onLoad } from "@dcloudio/uni-app";
|
||||
import { getShareReward, abilityCheck } from "@/api/system.js";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import { saveViewRequest } from "@/utils/common.js";
|
||||
import { saveViewRequest, trackRecord } from "@/utils/common.js";
|
||||
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||
|
||||
const userStore = useUserStore();
|
||||
@@ -156,6 +156,10 @@ onLoad((options) => {
|
||||
shareToken.value = options.shareToken;
|
||||
saveViewRequest(options.shareToken, "wallpaper_download");
|
||||
}
|
||||
trackRecord({
|
||||
eventName: "wallpaper_page_visit",
|
||||
eventType: `visit`,
|
||||
});
|
||||
});
|
||||
|
||||
const getThumbUrl = (url) => {
|
||||
@@ -181,6 +185,11 @@ const switchCategory = (id) => {
|
||||
if (currentCategoryId.value === id) return;
|
||||
currentCategoryId.value = id;
|
||||
loadWallpapers(true);
|
||||
trackRecord({
|
||||
eventName: "wallpaper_category_click",
|
||||
eventType: `select`,
|
||||
elementId: id || "",
|
||||
});
|
||||
};
|
||||
|
||||
const loadWallpapers = async (reset = false) => {
|
||||
@@ -230,14 +239,25 @@ const onRefresh = () => {
|
||||
};
|
||||
|
||||
const previewImage = (index) => {
|
||||
const urls = wallpapers.value.map((item) => item.url);
|
||||
uni.previewImage({
|
||||
urls,
|
||||
current: index,
|
||||
// const urls = wallpapers.value.map((item) => item.url);
|
||||
// uni.previewImage({
|
||||
// urls,
|
||||
// current: index,
|
||||
// });
|
||||
const item = wallpapers.value[index];
|
||||
trackRecord({
|
||||
eventName: "wallpaper_preview_click",
|
||||
eventType: `select`,
|
||||
elementId: item?.id || "",
|
||||
});
|
||||
};
|
||||
|
||||
const downloadWallpaper = async (item) => {
|
||||
trackRecord({
|
||||
eventName: "wallpaper_download_click",
|
||||
eventType: `click`,
|
||||
elementId: item?.id || "",
|
||||
});
|
||||
if (!isLoggedIn.value) {
|
||||
loginPopupRef.value.open();
|
||||
return;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// const BASE_URL = "https://api.ai-meng.com";
|
||||
const BASE_URL = "https://api.ai-meng.com";
|
||||
// const BASE_URL = 'http://127.0.0.1:3999'
|
||||
const BASE_URL = "http://192.168.1.3:3999";
|
||||
// const BASE_URL = "http://192.168.1.3:3999";
|
||||
// const BASE_URL = "http://192.168.31.253:3999";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import { getPlatform } from "./system.js";
|
||||
|
||||
Reference in New Issue
Block a user