Compare commits
27 Commits
34a06794f9
...
526e2aad70
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
526e2aad70 | ||
|
|
1ce775436d | ||
|
|
3f4fff3584 | ||
|
|
068f18a708 | ||
|
|
32b3605884 | ||
|
|
2bb675bc59 | ||
|
|
08befebe42 | ||
|
|
6bc0a2b85f | ||
|
|
9dfa72707a | ||
|
|
6112cb546e | ||
|
|
2e2a616512 | ||
|
|
8ba947834a | ||
|
|
3e2e4638c2 | ||
|
|
f9779908d9 | ||
|
|
ec48778ee1 | ||
|
|
790f0c19fb | ||
|
|
6f08363701 | ||
|
|
4f4a7792cb | ||
|
|
417195ff09 | ||
|
|
e6b22d608b | ||
|
|
f9453bae82 | ||
|
|
1c42598335 | ||
|
|
07809e4d3d | ||
|
|
a6ee0f8be6 | ||
|
|
3fed213c30 | ||
|
|
6fb39db309 | ||
|
|
ff0b6e5a10 |
@@ -29,3 +29,11 @@ export const getCardTemplateContentList = async () => {
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getCardTemplateTitleList = async (page = 1) => {
|
||||||
|
return request({
|
||||||
|
url: "/api/blessing/card/template-title/list?page=" + page,
|
||||||
|
method: "GET",
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
class="avatar-selector custom-button"
|
class="avatar-selector custom-button"
|
||||||
>
|
>
|
||||||
<image v-if="avatarUrl" :src="avatarUrl" class="avatar-preview" />
|
<image v-if="avatarUrl" :src="avatarUrl" class="avatar-preview" />
|
||||||
<text v-else>获取头像</text>
|
<text v-else>点击获取头像</text>
|
||||||
</button>
|
</button>
|
||||||
<input
|
<input
|
||||||
class="nickname-input"
|
class="nickname-input"
|
||||||
@@ -45,6 +45,19 @@ const userStore = useUserStore();
|
|||||||
|
|
||||||
const emit = defineEmits(["logind"]);
|
const emit = defineEmits(["logind"]);
|
||||||
|
|
||||||
|
const festivalNames = [
|
||||||
|
'春意','福星','小福','新禧','瑞雪','花灯','喜乐','元宝','春芽','年年',
|
||||||
|
'花灯','月圆','灯影','小灯','星灯','彩灯',
|
||||||
|
'清风','微风','小晴','碧波','流泉',
|
||||||
|
'月光','玉轮','桂香','秋叶','星河','小月','露华','秋水',
|
||||||
|
'雪落','冰晶','暖阳','小雪','冬影','雪花','松影'
|
||||||
|
];
|
||||||
|
|
||||||
|
const getFestivalName = () => {
|
||||||
|
const idx = Math.floor(Math.random() * festivalNames.length);
|
||||||
|
return festivalNames[idx];
|
||||||
|
}
|
||||||
|
|
||||||
const open = () => {
|
const open = () => {
|
||||||
popupRef.value.open();
|
popupRef.value.open();
|
||||||
};
|
};
|
||||||
@@ -62,11 +75,11 @@ const confirmLogin = async () => {
|
|||||||
const platform = getPlatformProvider();
|
const platform = getPlatformProvider();
|
||||||
if (platform === "mp-weixin") {
|
if (platform === "mp-weixin") {
|
||||||
const code = await wxLogin();
|
const code = await wxLogin();
|
||||||
const imageUrl = await uploadImage(avatarUrl.value);
|
const imageUrl = avatarUrl.value ? await uploadImage(avatarUrl.value) : "";
|
||||||
|
|
||||||
const loginRes = await apiLogin({
|
const loginRes = await apiLogin({
|
||||||
code,
|
code,
|
||||||
nickname: nickname.value,
|
nickname: nickname.value || getFestivalName(),
|
||||||
avatarUrl: imageUrl,
|
avatarUrl: imageUrl,
|
||||||
platform: "wx",
|
platform: "wx",
|
||||||
});
|
});
|
||||||
|
|||||||
124
components/NavBar/NavBar.vue
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<!-- Placeholder to occupy space if fixed -->
|
||||||
|
<view
|
||||||
|
v-if="fixed && placeholder && !transparent"
|
||||||
|
class="nav-placeholder"
|
||||||
|
:style="{ height: navBarHeight + 'px' }"
|
||||||
|
></view>
|
||||||
|
|
||||||
|
<!-- Actual Navbar -->
|
||||||
|
<view
|
||||||
|
class="nav-bar"
|
||||||
|
:class="{ fixed: fixed }"
|
||||||
|
:style="{
|
||||||
|
height: navBarHeight + 'px',
|
||||||
|
paddingTop: statusBarHeight + 'px',
|
||||||
|
backgroundColor: transparent ? 'transparent' : background,
|
||||||
|
color: color
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<view class="nav-content">
|
||||||
|
<view
|
||||||
|
v-if="back"
|
||||||
|
class="back"
|
||||||
|
@tap="goBack"
|
||||||
|
:style="{ color: color }"
|
||||||
|
>‹</view>
|
||||||
|
<text class="nav-title" :style="{ color: color }">{{ title }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } from "vue";
|
||||||
|
import { getBavBarHeight, getStatusBarHeight } from "@/utils/system";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
background: {
|
||||||
|
type: String,
|
||||||
|
default: "#ffffff",
|
||||||
|
},
|
||||||
|
color: {
|
||||||
|
type: String,
|
||||||
|
default: "#333333",
|
||||||
|
},
|
||||||
|
back: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
fixed: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
transparent: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const navBarHeight = ref(64);
|
||||||
|
const statusBarHeight = ref(20);
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
navBarHeight.value = getBavBarHeight();
|
||||||
|
statusBarHeight.value = getStatusBarHeight();
|
||||||
|
});
|
||||||
|
|
||||||
|
const goBack = () => {
|
||||||
|
const pages = getCurrentPages();
|
||||||
|
if (pages.length > 1) {
|
||||||
|
uni.navigateBack();
|
||||||
|
} else {
|
||||||
|
uni.switchTab({ url: "/pages/index/index" });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.nav-bar {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
z-index: 999;
|
||||||
|
|
||||||
|
&.fixed {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-content {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
|
padding: 0 24rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back {
|
||||||
|
font-size: 50rpx;
|
||||||
|
margin-right: 24rpx;
|
||||||
|
line-height: 1;
|
||||||
|
padding: 20rpx;
|
||||||
|
margin-left: -20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-title {
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
flex: 1;
|
||||||
|
text-align: center;
|
||||||
|
margin-right: 50rpx; /* Balance back button */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -54,7 +54,8 @@
|
|||||||
"setting": {
|
"setting": {
|
||||||
"urlCheck": false
|
"urlCheck": false
|
||||||
},
|
},
|
||||||
"usingComponents" : true
|
"usingComponents": true,
|
||||||
|
"lazyCodeLoading": "requiredComponents"
|
||||||
},
|
},
|
||||||
"mp-alipay": {
|
"mp-alipay": {
|
||||||
"usingComponents": true,
|
"usingComponents": true,
|
||||||
|
|||||||
@@ -178,10 +178,5 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"uniIdRouter": {},
|
"uniIdRouter": {}
|
||||||
"permission": {
|
|
||||||
"scope.userLocation": {
|
|
||||||
"desc": "用于获取您的当前位置,以显示附近景点和打卡功能"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="avatar-detail-page" :style="{ paddingTop: navBarHeight + 'px' }">
|
<view class="avatar-detail-page">
|
||||||
<!-- Custom Navbar -->
|
<NavBar title="专属头像" />
|
||||||
<view
|
|
||||||
class="nav-bar"
|
|
||||||
:style="{
|
|
||||||
height: navBarHeight + 'px',
|
|
||||||
paddingTop: statusBarHeight + 'px',
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<view class="nav-content">
|
|
||||||
<view class="back" @tap="goBack">‹</view>
|
|
||||||
<text class="nav-title">新春头像详情</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="content-wrap">
|
<view class="content-wrap">
|
||||||
<!-- User Info -->
|
<!-- User Info -->
|
||||||
@@ -138,10 +126,10 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import { getBavBarHeight } from "@/utils/system";
|
|
||||||
import { getPageDetail } from "@/api/system.js";
|
import { getPageDetail } from "@/api/system.js";
|
||||||
import { getAvatarRecommendList } from "@/api/avatar.js";
|
import { getAvatarRecommendList } from "@/api/avatar.js";
|
||||||
import { saveViewRequest } from "@/utils/common.js";
|
import { saveViewRequest } from "@/utils/common.js";
|
||||||
|
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||||
|
|
||||||
const defaultAvatar =
|
const defaultAvatar =
|
||||||
"https://file.lihailezzc.com/resource/d9b329082b32f8305101f708593a4882.png";
|
"https://file.lihailezzc.com/resource/d9b329082b32f8305101f708593a4882.png";
|
||||||
@@ -149,9 +137,6 @@ const detailData = ref(null);
|
|||||||
const frameList = ref([]);
|
const frameList = ref([]);
|
||||||
const shareToken = ref("");
|
const shareToken = ref("");
|
||||||
|
|
||||||
const navBarHeight = ref(64);
|
|
||||||
const statusBarHeight = ref(20);
|
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
if (options.shareToken) {
|
if (options.shareToken) {
|
||||||
shareToken.value = options.shareToken;
|
shareToken.value = options.shareToken;
|
||||||
@@ -160,22 +145,6 @@ onLoad((options) => {
|
|||||||
fetchFrames();
|
fetchFrames();
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
const sysInfo = uni.getSystemInfoSync();
|
|
||||||
statusBarHeight.value = sysInfo.statusBarHeight;
|
|
||||||
navBarHeight.value = getBavBarHeight();
|
|
||||||
});
|
|
||||||
|
|
||||||
const goBack = () => {
|
|
||||||
// Check if can go back, otherwise go home
|
|
||||||
const pages = getCurrentPages();
|
|
||||||
if (pages.length > 1) {
|
|
||||||
uni.navigateBack();
|
|
||||||
} else {
|
|
||||||
uni.switchTab({ url: "/pages/index/index" });
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const fetchDetail = async () => {
|
const fetchDetail = async () => {
|
||||||
try {
|
try {
|
||||||
// uni.showLoading({ title: "加载中..." });
|
// uni.showLoading({ title: "加载中..." });
|
||||||
@@ -239,39 +208,6 @@ const goToWallpaper = () => {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-bar {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
z-index: 100;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-content {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
height: 100%;
|
|
||||||
padding: 0 24rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.back {
|
|
||||||
font-size: 50rpx;
|
|
||||||
margin-right: 24rpx;
|
|
||||||
line-height: 1;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-title {
|
|
||||||
font-size: 34rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #333;
|
|
||||||
flex: 1;
|
|
||||||
text-align: center;
|
|
||||||
margin-right: 50rpx; /* Balance back button */
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-wrap {
|
.content-wrap {
|
||||||
padding: 30rpx 40rpx 60rpx;
|
padding: 30rpx 40rpx 60rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="avatar-page" :style="{ paddingTop: getBavBarHeight() + 'px' }">
|
<view class="avatar-page">
|
||||||
<view class="nav-bar">
|
<NavBar title="头像制作" />
|
||||||
<view class="back" @tap="goBack">‹</view>
|
|
||||||
<text class="nav-title-left">新春头像挂饰</text>
|
|
||||||
</view>
|
|
||||||
<view class="preview-card">
|
<view class="preview-card">
|
||||||
<view class="preview-square">
|
<view class="preview-square">
|
||||||
<image
|
<image
|
||||||
@@ -43,7 +40,7 @@
|
|||||||
|
|
||||||
<view class="section">
|
<view class="section">
|
||||||
<view class="section-header">
|
<view class="section-header">
|
||||||
<text class="section-title">选择底图</text>
|
<text class="section-title">选择头像</text>
|
||||||
<view class="more-btn" @tap="openMorePopup">
|
<view class="more-btn" @tap="openMorePopup">
|
||||||
<text>查看更多</text>
|
<text>查看更多</text>
|
||||||
<text class="arrow">›</text>
|
<text class="arrow">›</text>
|
||||||
@@ -107,7 +104,7 @@
|
|||||||
:key="i"
|
:key="i"
|
||||||
class="grid-item"
|
class="grid-item"
|
||||||
:class="{ active: selectedDecor === decor }"
|
:class="{ active: selectedDecor === decor }"
|
||||||
@tap="selectedDecor = decor"
|
@tap="toggleDecor(decor)"
|
||||||
>
|
>
|
||||||
<image :src="decor.imageUrl" class="grid-img" mode="aspectFit" />
|
<image :src="decor.imageUrl" class="grid-img" mode="aspectFit" />
|
||||||
<view v-if="selectedDecor === decor" class="check">✔</view>
|
<view v-if="selectedDecor === decor" class="check">✔</view>
|
||||||
@@ -160,7 +157,6 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
import { onShareAppMessage, onLoad, onReachBottom } from "@dcloudio/uni-app";
|
import { onShareAppMessage, onLoad, onReachBottom } from "@dcloudio/uni-app";
|
||||||
import { getBavBarHeight, getDeviceInfo } from "@/utils/system";
|
|
||||||
import { useUserStore } from "@/stores/user";
|
import { useUserStore } from "@/stores/user";
|
||||||
import {
|
import {
|
||||||
createShareToken,
|
createShareToken,
|
||||||
@@ -179,6 +175,7 @@ import {
|
|||||||
generateObjectId,
|
generateObjectId,
|
||||||
uploadImage,
|
uploadImage,
|
||||||
} from "@/utils/common.js";
|
} from "@/utils/common.js";
|
||||||
|
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const loginPopupRef = ref(null);
|
const loginPopupRef = ref(null);
|
||||||
@@ -381,6 +378,14 @@ const toggleFrame = (frame) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const toggleDecor = (decor) => {
|
||||||
|
if (selectedDecor.value === decor) {
|
||||||
|
selectedDecor.value = null;
|
||||||
|
} else {
|
||||||
|
selectedDecor.value = decor;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 挂饰状态
|
// 挂饰状态
|
||||||
const decorState = ref({
|
const decorState = ref({
|
||||||
x: 300, // 初始中心 X (rpx)
|
x: 300, // 初始中心 X (rpx)
|
||||||
@@ -596,7 +601,7 @@ const saveAndUse = async () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const tempPath = saveByCanvas(true);
|
const tempPath = await saveByCanvas(true);
|
||||||
const id = createAvatarId();
|
const id = createAvatarId();
|
||||||
saveRecordRequest(tempPath, id, "avatar_download");
|
saveRecordRequest(tempPath, id, "avatar_download");
|
||||||
completeCardInfo(id);
|
completeCardInfo(id);
|
||||||
@@ -658,6 +663,7 @@ const completeCardInfo = async (id) => {
|
|||||||
decorId: selectedDecor?.value?.id,
|
decorId: selectedDecor?.value?.id,
|
||||||
frameId: selectedFrame?.value?.id,
|
frameId: selectedFrame?.value?.id,
|
||||||
});
|
});
|
||||||
|
return imageUrl;
|
||||||
};
|
};
|
||||||
|
|
||||||
onShareAppMessage(async () => {
|
onShareAppMessage(async () => {
|
||||||
@@ -669,17 +675,18 @@ onShareAppMessage(async () => {
|
|||||||
path: `/pages/index/index?shareToken=${shareTokenRes.shareToken}`,
|
path: `/pages/index/index?shareToken=${shareTokenRes.shareToken}`,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
uni.showLoading({ title: "分享中...", mask: true });
|
||||||
const id = createAvatarId();
|
const id = createAvatarId();
|
||||||
// const shareTokenRes = {
|
// const shareTokenRes = {
|
||||||
// shareToken: "iFmK8WjRm6TK",
|
// shareToken: "iFmK8WjRm6TK",
|
||||||
// };
|
// };
|
||||||
const shareTokenRes = await getShareToken("avatar_download", id);
|
const shareTokenRes = await getShareToken("avatar_download", id);
|
||||||
completeCardInfo(id);
|
const imageUrl = await completeCardInfo(id);
|
||||||
|
uni.hideLoading();
|
||||||
return {
|
return {
|
||||||
title: "制作我的新春头像",
|
title: "我做了一个新头像,真的太好看了",
|
||||||
path: `/pages/avatar/detail?shareToken=${shareTokenRes.shareToken}`,
|
path: `/pages/avatar/detail?shareToken=${shareTokenRes.shareToken}`,
|
||||||
imageUrl:
|
imageUrl, // 使用默认封面或 popularCards 的封面
|
||||||
"https://file.lihailezzc.com/resource/b48c41054c2633c478463ac1b1f1ca23.png", // 使用默认封面或 popularCards 的封面
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -709,19 +716,6 @@ const loadImage = (url) => {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-bottom: env(safe-area-inset-bottom);
|
padding-bottom: env(safe-area-inset-bottom);
|
||||||
}
|
}
|
||||||
.nav-bar {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 16rpx 24rpx;
|
|
||||||
}
|
|
||||||
.back {
|
|
||||||
font-size: 40rpx;
|
|
||||||
margin-right: 12rpx;
|
|
||||||
}
|
|
||||||
.nav-title-left {
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
.preview-card {
|
.preview-card {
|
||||||
margin: 20rpx 24rpx;
|
margin: 20rpx 24rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|||||||
@@ -1,15 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="detail-page" :style="{ paddingTop: navBarHeight + 'px' }">
|
<view class="detail-page" >
|
||||||
<!-- Custom Navigation Bar -->
|
<NavBar title="祝福贺卡" />
|
||||||
<view
|
|
||||||
class="nav-bar"
|
|
||||||
:style="{
|
|
||||||
height: navBarHeight + 'px',
|
|
||||||
paddingTop: statusBarHeight + 'px',
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<text class="nav-title">新春祝福详情</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<scroll-view scroll-y class="content-scroll">
|
<scroll-view scroll-y class="content-scroll">
|
||||||
<view class="content-wrap">
|
<view class="content-wrap">
|
||||||
@@ -109,14 +100,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from "vue";
|
import { ref } from "vue";
|
||||||
import { getBavBarHeight } from "@/utils/system";
|
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import { getPageDetail } from "@/api/system.js";
|
import { getPageDetail } from "@/api/system.js";
|
||||||
import { saveViewRequest } from "@/utils/common.js";
|
import { saveViewRequest } from "@/utils/common.js";
|
||||||
|
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||||
const navBarHeight = ref(44);
|
|
||||||
const statusBarHeight = ref(20);
|
|
||||||
|
|
||||||
const cardId = ref("");
|
const cardId = ref("");
|
||||||
const cardDetail = ref({});
|
const cardDetail = ref({});
|
||||||
@@ -130,16 +118,6 @@ onLoad(async (options) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
const sysInfo = uni.getSystemInfoSync();
|
|
||||||
statusBarHeight.value = sysInfo.statusBarHeight;
|
|
||||||
navBarHeight.value = getBavBarHeight();
|
|
||||||
});
|
|
||||||
|
|
||||||
const goBack = () => {
|
|
||||||
uni.navigateBack();
|
|
||||||
};
|
|
||||||
|
|
||||||
const makeGreeting = () => {
|
const makeGreeting = () => {
|
||||||
uni.switchTab({ url: "/pages/make/index" });
|
uni.switchTab({ url: "/pages/make/index" });
|
||||||
};
|
};
|
||||||
@@ -202,28 +180,6 @@ const decorList = ref([
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-bar {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
z-index: 100;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding-left: 20rpx;
|
|
||||||
background: #fff6f6; /* Match page bg */
|
|
||||||
}
|
|
||||||
.nav-left {
|
|
||||||
padding: 10rpx 20rpx;
|
|
||||||
font-size: 48rpx;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
.nav-title {
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: 600;
|
|
||||||
margin-left: 10rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-scroll {
|
.content-scroll {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="feedback-page" :style="{ paddingTop: getBavBarHeight() + 'px' }">
|
<view class="feedback-page" >
|
||||||
<!-- Custom Navbar -->
|
<NavBar title="意见反馈" />
|
||||||
<view class="nav-bar">
|
|
||||||
<view class="back" @tap="goBack">‹</view>
|
|
||||||
<text class="nav-title">意见反馈</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="content-wrap">
|
<view class="content-wrap">
|
||||||
<!-- Type Selector -->
|
<!-- Type Selector -->
|
||||||
@@ -30,7 +26,7 @@
|
|||||||
<textarea
|
<textarea
|
||||||
v-model="formData.content"
|
v-model="formData.content"
|
||||||
class="textarea"
|
class="textarea"
|
||||||
placeholder="请输入您的反馈意见,我们将为您不断改进..."
|
placeholder="请输入您的反馈意见,我们将为您不断改进"
|
||||||
placeholder-class="placeholder"
|
placeholder-class="placeholder"
|
||||||
maxlength="200"
|
maxlength="200"
|
||||||
/>
|
/>
|
||||||
@@ -84,9 +80,10 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
import { getBavBarHeight, getDeviceInfo } from "@/utils/system";
|
import { getDeviceInfo } from "@/utils/system";
|
||||||
import { sendFeedback } from "@/api/mine.js";
|
import { sendFeedback } from "@/api/mine.js";
|
||||||
import { uploadImage } from "@/utils/common.js";
|
import { uploadImage } from "@/utils/common.js";
|
||||||
|
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||||
|
|
||||||
const feedbackTypes = [
|
const feedbackTypes = [
|
||||||
{ label: "功能建议", value: 1 },
|
{ label: "功能建议", value: 1 },
|
||||||
@@ -105,10 +102,6 @@ const isValid = computed(() => {
|
|||||||
return formData.value.content.trim().length > 0;
|
return formData.value.content.trim().length > 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
const goBack = () => {
|
|
||||||
uni.navigateBack();
|
|
||||||
};
|
|
||||||
|
|
||||||
const chooseImage = () => {
|
const chooseImage = () => {
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 3 - formData.value.images.length,
|
count: 3 - formData.value.images.length,
|
||||||
@@ -179,23 +172,31 @@ const submitFeedback = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.nav-bar {
|
.nav-bar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 100;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 16rpx 24rpx;
|
padding: 0 24rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 100;
|
|
||||||
}
|
}
|
||||||
.back {
|
.back {
|
||||||
font-size: 40rpx;
|
font-size: 50rpx;
|
||||||
margin-right: 24rpx;
|
margin-right: 24rpx;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
color: #333;
|
||||||
|
padding: 20rpx;
|
||||||
|
margin-left: -20rpx;
|
||||||
}
|
}
|
||||||
.nav-title {
|
.nav-title {
|
||||||
font-size: 32rpx;
|
font-size: 34rpx;
|
||||||
font-weight: 600;
|
font-weight: bold;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
flex: 1;
|
||||||
|
text-align: center;
|
||||||
|
margin-right: 50rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-wrap {
|
.content-wrap {
|
||||||
|
|||||||
@@ -1,14 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="fortune-detail-page">
|
<view class="fortune-detail-page">
|
||||||
<!-- 顶部导航栏 (透明) -->
|
<NavBar title="2026 灵马贺岁" :transparent="true"/>
|
||||||
<view class="nav-bar">
|
|
||||||
<view class="back-btn" @click="goHome">
|
|
||||||
<text class="uni-icons">🏠</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 顶部提示条 -->
|
<!-- 顶部提示条 -->
|
||||||
<view class="top-banner" v-if="inviterName">
|
<!-- <view class="top-banner" v-if="inviterName">
|
||||||
<image
|
<image
|
||||||
class="avatar-icon"
|
class="avatar-icon"
|
||||||
v-if="inviterAvatar"
|
v-if="inviterAvatar"
|
||||||
@@ -22,7 +17,7 @@
|
|||||||
<view class="top-banner" v-else>
|
<view class="top-banner" v-else>
|
||||||
<text class="banner-icon">✨</text>
|
<text class="banner-icon">✨</text>
|
||||||
<text class="banner-text">2026 灵马贺岁 · 开启你的新年好运</text>
|
<text class="banner-text">2026 灵马贺岁 · 开启你的新年好运</text>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<!-- 页面标题 -->
|
<!-- 页面标题 -->
|
||||||
<view class="page-header">
|
<view class="page-header">
|
||||||
@@ -38,9 +33,6 @@
|
|||||||
:src="fortuneData.imageUrl || defaultImage"
|
:src="fortuneData.imageUrl || defaultImage"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
/>
|
/>
|
||||||
<view class="tag-pill">
|
|
||||||
<text class="tag-text">马到成功</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="card-content">
|
<view class="card-content">
|
||||||
@@ -77,10 +69,9 @@
|
|||||||
|
|
||||||
<!-- 底部信息 -->
|
<!-- 底部信息 -->
|
||||||
<view class="footer-info">
|
<view class="footer-info">
|
||||||
<view class="qr-box">
|
<!-- <view class="qr-box">
|
||||||
<!-- 这里放二维码图片,实际项目中可以用 canvas 生成或后端返回 -->
|
|
||||||
<view class="qr-placeholder"></view>
|
<view class="qr-placeholder"></view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="footer-text">2026 灵马贺岁 · 测出你的新年锦鲤关键词</view>
|
<view class="footer-text">2026 灵马贺岁 · 测出你的新年锦鲤关键词</view>
|
||||||
<view class="footer-sub"
|
<view class="footer-sub"
|
||||||
>LONG-PRESS TO SAVE OR SCAN TO JOIN THE RITUAL</view
|
>LONG-PRESS TO SAVE OR SCAN TO JOIN THE RITUAL</view
|
||||||
@@ -94,6 +85,7 @@ import { ref } from "vue";
|
|||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import { getPageDetail } from "@/api/system.js";
|
import { getPageDetail } from "@/api/system.js";
|
||||||
import { saveViewRequest } from "@/utils/common.js";
|
import { saveViewRequest } from "@/utils/common.js";
|
||||||
|
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||||
|
|
||||||
const inviterName = ref("");
|
const inviterName = ref("");
|
||||||
const inviterAvatar = ref("");
|
const inviterAvatar = ref("");
|
||||||
@@ -176,28 +168,6 @@ const saveCard = () => {
|
|||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-bar {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 44px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding-left: 16px;
|
|
||||||
z-index: 100;
|
|
||||||
}
|
|
||||||
.back-btn {
|
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
background: rgba(0, 0, 0, 0.3);
|
|
||||||
border-radius: 50%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-banner {
|
.top-banner {
|
||||||
background: rgba(255, 215, 0, 0.1);
|
background: rgba(255, 215, 0, 0.1);
|
||||||
border: 1px solid rgba(255, 215, 0, 0.2);
|
border: 1px solid rgba(255, 215, 0, 0.2);
|
||||||
@@ -262,23 +232,6 @@ const saveCard = () => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
.tag-pill {
|
|
||||||
position: absolute;
|
|
||||||
top: 20px;
|
|
||||||
right: 20px;
|
|
||||||
background: #ffd700; /* 黄色背景 */
|
|
||||||
padding: 10px 6px;
|
|
||||||
border-radius: 20px;
|
|
||||||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
|
|
||||||
border: 2px solid #fff;
|
|
||||||
}
|
|
||||||
.tag-text {
|
|
||||||
writing-mode: vertical-rl;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #333;
|
|
||||||
letter-spacing: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-content {
|
.card-content {
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="fortune-page" :style="{ paddingTop: getBavBarHeight() + 'px' }">
|
<view class="fortune-page" >
|
||||||
<!-- 顶部导航 -->
|
<NavBar title="2026 新年运势" :transparent="true" color="#ffd700"/>
|
||||||
<view class="nav-bar">
|
|
||||||
<view class="back-btn" @tap="goBack">‹</view>
|
|
||||||
<text class="nav-title">2026 新年运势</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 初始状态:签筒 -->
|
<!-- 初始状态:签筒 -->
|
||||||
<view class="state-initial" v-if="status !== 'result'">
|
<view class="state-initial" v-if="status !== 'result'">
|
||||||
@@ -119,7 +115,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onUnmounted, computed } from "vue";
|
import { ref, onUnmounted, computed } from "vue";
|
||||||
import { getBavBarHeight, getDeviceInfo } from "@/utils/system";
|
import { getDeviceInfo } from "@/utils/system";
|
||||||
import { onLoad, onShow, onShareAppMessage } from "@dcloudio/uni-app";
|
import { onLoad, onShow, onShareAppMessage } from "@dcloudio/uni-app";
|
||||||
import { abilityCheck } from "@/api/system.js";
|
import { abilityCheck } from "@/api/system.js";
|
||||||
import { drawFortune } from "@/api/fortune.js";
|
import { drawFortune } from "@/api/fortune.js";
|
||||||
@@ -127,6 +123,7 @@ import { createShareToken, getShareReward } from "@/api/system.js";
|
|||||||
import LoginPopup from "@/components/LoginPopup/LoginPopup.vue";
|
import LoginPopup from "@/components/LoginPopup/LoginPopup.vue";
|
||||||
import { useUserStore } from "@/stores/user";
|
import { useUserStore } from "@/stores/user";
|
||||||
import { saveRemoteImageToLocal, saveRecordRequest } from "@/utils/common.js";
|
import { saveRemoteImageToLocal, saveRecordRequest } from "@/utils/common.js";
|
||||||
|
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const loginPopupRef = ref(null);
|
const loginPopupRef = ref(null);
|
||||||
@@ -199,14 +196,6 @@ const checkDrawStatus = async () => {
|
|||||||
const currentFortune = ref({});
|
const currentFortune = ref({});
|
||||||
const cardId = ref("");
|
const cardId = ref("");
|
||||||
|
|
||||||
const goBack = () => {
|
|
||||||
if (status.value === "result") {
|
|
||||||
status.value = "initial";
|
|
||||||
} else {
|
|
||||||
uni.navigateBack();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const goToRecord = () => {
|
const goToRecord = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/fortune/record",
|
url: "/pages/fortune/record",
|
||||||
@@ -391,30 +380,6 @@ const saveCard = () => {
|
|||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 导航栏 */
|
|
||||||
.nav-bar {
|
|
||||||
width: 100%;
|
|
||||||
height: 44px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0 16px;
|
|
||||||
z-index: 100;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.back-btn {
|
|
||||||
font-size: 28px;
|
|
||||||
color: #ffd700;
|
|
||||||
margin-right: 12px;
|
|
||||||
line-height: 1;
|
|
||||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
.nav-title {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #ffd700;
|
|
||||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 初始状态 */
|
/* 初始状态 */
|
||||||
.state-initial {
|
.state-initial {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -422,15 +387,16 @@ const saveCard = () => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: space-between;
|
||||||
padding-bottom: 80px;
|
padding-top: 130px;
|
||||||
|
padding-bottom: 40px;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-text {
|
.header-text {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 50px;
|
margin-bottom: 60px;
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
@@ -463,7 +429,7 @@ const saveCard = () => {
|
|||||||
|
|
||||||
/* 签筒动画 */
|
/* 签筒动画 */
|
||||||
.shaker-container {
|
.shaker-container {
|
||||||
margin-bottom: 70px;
|
margin-bottom: 50px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.shaker-body {
|
.shaker-body {
|
||||||
|
|||||||
@@ -1,14 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="record-page" :style="{ paddingTop: navBarHeight + 'px' }">
|
<view class="record-page">
|
||||||
<!-- 导航栏 -->
|
<NavBar title="我的运势记录" />
|
||||||
<view class="nav-bar" :style="{ height: navBarHeight + 'px' }">
|
|
||||||
<view class="nav-content" :style="{ paddingTop: statusBarHeight + 'px' }">
|
|
||||||
<view class="back-btn" @tap="goBack">
|
|
||||||
<text class="uni-icons">‹</text>
|
|
||||||
</view>
|
|
||||||
<text class="nav-title">我的运势记录</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<scroll-view
|
<scroll-view
|
||||||
scroll-y
|
scroll-y
|
||||||
@@ -95,12 +87,9 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
import { getBavBarHeight, getStatusBarHeight } from "@/utils/system";
|
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import { getList } from "@/api/fortune.js";
|
import { getList } from "@/api/fortune.js";
|
||||||
|
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||||
const navBarHeight = getBavBarHeight();
|
|
||||||
const statusBarHeight = getStatusBarHeight();
|
|
||||||
|
|
||||||
// 状态管理
|
// 状态管理
|
||||||
const records = ref([]);
|
const records = ref([]);
|
||||||
@@ -197,37 +186,6 @@ onLoad(() => {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-bar {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
background-color: #1a1a1a;
|
|
||||||
z-index: 100;
|
|
||||||
}
|
|
||||||
.nav-content {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0 16px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.back-btn {
|
|
||||||
font-size: 32px;
|
|
||||||
color: #fff;
|
|
||||||
margin-right: 12px;
|
|
||||||
line-height: 1;
|
|
||||||
padding: 0 10px;
|
|
||||||
}
|
|
||||||
.nav-title {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #fff;
|
|
||||||
position: absolute;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-scroll {
|
.content-scroll {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 0; /* Important for scroll-view in flex container */
|
height: 0; /* Important for scroll-view in flex container */
|
||||||
|
|||||||
@@ -50,9 +50,9 @@
|
|||||||
<text class="quote-mark right">”</text>
|
<text class="quote-mark right">”</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="daily-actions">
|
<view class="daily-actions">
|
||||||
<view class="action-btn copy" @tap="copyGreeting">
|
<!-- <view class="action-btn copy" @tap="copyGreeting">
|
||||||
<text class="icon">❐</text> 复制
|
<text class="icon">❐</text> 复制
|
||||||
</view>
|
</view> -->
|
||||||
<view class="action-btn use" @tap="useGreeting">
|
<view class="action-btn use" @tap="useGreeting">
|
||||||
<text class="icon">✎</text> 去制作
|
<text class="icon">✎</text> 去制作
|
||||||
</view>
|
</view>
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
<view class="section-header">
|
<view class="section-header">
|
||||||
<view class="section-bar"></view>
|
<view class="section-bar"></view>
|
||||||
<text class="section-title">大家都在用</text>
|
<text class="section-title">大家都在用</text>
|
||||||
<text class="section-more" @tap="onMore('use')">查看更多 ></text>
|
<!-- <text class="section-more" @tap="onMore('use')">查看更多 ></text> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="use-grid">
|
<view class="use-grid">
|
||||||
<view
|
<view
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="message-content">
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.message-content {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: 100vh;
|
|
||||||
background: linear-gradient(to bottom, #D6EDD8 0%, #F4E2D8 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@@ -1,20 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="avatar-page" :style="{ paddingTop: navBarTop + 'px' }">
|
<view class="avatar-page" >
|
||||||
<!-- Navbar -->
|
<!-- Navbar -->
|
||||||
<view
|
<NavBar title="我的头像制作" />
|
||||||
class="nav-bar"
|
|
||||||
:style="{ height: navBarHeight + 'px', paddingTop: navBarTop + 'px' }"
|
|
||||||
>
|
|
||||||
<view class="nav-content">
|
|
||||||
<view class="back-btn" @tap="goBack">
|
|
||||||
<text class="back-arrow">‹</text>
|
|
||||||
</view>
|
|
||||||
<view class="title-wrap">
|
|
||||||
<text class="title">我的制作记录</text>
|
|
||||||
<view class="more-btn">•••</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- Current Avatar Card -->
|
<!-- Current Avatar Card -->
|
||||||
<view class="current-card" v-if="currentAvatar">
|
<view class="current-card" v-if="currentAvatar">
|
||||||
@@ -105,10 +92,9 @@ import { ref, onMounted } from "vue";
|
|||||||
import { onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
|
import { onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
|
||||||
import { getMyAvatar, userAvatarChange } from "@/api/mine.js";
|
import { getMyAvatar, userAvatarChange } from "@/api/mine.js";
|
||||||
import { useUserStore } from "@/stores/user";
|
import { useUserStore } from "@/stores/user";
|
||||||
|
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const navBarTop = ref(0);
|
|
||||||
const navBarHeight = ref(44);
|
|
||||||
const list = ref([]);
|
const list = ref([]);
|
||||||
const page = ref(1);
|
const page = ref(1);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@@ -128,8 +114,6 @@ const names = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const sysInfo = uni.getSystemInfoSync();
|
|
||||||
navBarTop.value = sysInfo.statusBarHeight;
|
|
||||||
fetchList(true);
|
fetchList(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -247,59 +231,6 @@ const getDefaultName = (item) => {
|
|||||||
padding-bottom: 40px;
|
padding-bottom: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-bar {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
z-index: 100;
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
|
|
||||||
.nav-content {
|
|
||||||
height: 44px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between; // Changed to space-between
|
|
||||||
padding: 0 16px; // Added padding
|
|
||||||
|
|
||||||
.back-btn {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding-right: 20px;
|
|
||||||
|
|
||||||
.back-arrow {
|
|
||||||
font-size: 32px;
|
|
||||||
color: #333;
|
|
||||||
font-weight: 300;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.title-wrap {
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
position: relative;
|
|
||||||
margin-right: 32px; // Balance the back button space
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.more-btn {
|
|
||||||
position: absolute;
|
|
||||||
right: -20px;
|
|
||||||
font-size: 20px;
|
|
||||||
color: #333;
|
|
||||||
display: none; // Hide for now as per design mockup clean look
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.current-card {
|
.current-card {
|
||||||
margin: 60px 20px 20px;
|
margin: 60px 20px 20px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|||||||
@@ -1,17 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="greeting-page" :style="{ paddingTop: navBarTop + 'px' }">
|
<view class="greeting-page" >
|
||||||
<!-- Navbar -->
|
<NavBar title="我的祝福" />
|
||||||
<view
|
|
||||||
class="nav-bar"
|
|
||||||
:style="{ height: navBarHeight + 'px', paddingTop: navBarTop + 'px' }"
|
|
||||||
>
|
|
||||||
<view class="nav-content">
|
|
||||||
<view class="back-btn" @tap="goBack">
|
|
||||||
<text class="back-arrow">‹</text>
|
|
||||||
</view>
|
|
||||||
<text class="title">我的新春祝福</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- Header Stats -->
|
<!-- Header Stats -->
|
||||||
<view class="header-stats">
|
<view class="header-stats">
|
||||||
@@ -111,7 +100,7 @@
|
|||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
|
import { onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
|
||||||
import { getMyCard } from "@/api/mine.js";
|
import { getMyCard } from "@/api/mine.js";
|
||||||
import { getBavBarHeight } from "@/utils/system";
|
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||||
|
|
||||||
const navBarTop = ref(0);
|
const navBarTop = ref(0);
|
||||||
const navBarHeight = ref(44);
|
const navBarHeight = ref(44);
|
||||||
@@ -190,8 +179,6 @@ const onTouchEnd = (e, item) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const sysInfo = uni.getSystemInfoSync();
|
|
||||||
navBarTop.value = sysInfo.statusBarHeight;
|
|
||||||
fetchList(true);
|
fetchList(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -298,44 +285,6 @@ const onEdit = (item) => {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-bar {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
z-index: 100;
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
|
|
||||||
.nav-content {
|
|
||||||
height: 44px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.back-btn {
|
|
||||||
position: absolute;
|
|
||||||
left: 16px;
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0 10px;
|
|
||||||
|
|
||||||
.back-arrow {
|
|
||||||
font-size: 32px;
|
|
||||||
color: #333;
|
|
||||||
font-weight: 300;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-stats {
|
.header-stats {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
background: #f9f9f9;
|
background: #f9f9f9;
|
||||||
|
|||||||
@@ -1,26 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="help-page" :style="{ paddingTop: navBarHeight + 'px' }">
|
<view class="help-page" >
|
||||||
<!-- Custom Navbar -->
|
<NavBar title="帮助中心" />
|
||||||
<view
|
|
||||||
class="nav-bar"
|
|
||||||
:style="{
|
|
||||||
height: navBarHeight + 'px',
|
|
||||||
paddingTop: statusBarHeight + 'px',
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<view class="nav-left" @click="goBack">
|
|
||||||
<uni-icons type="left" size="24" color="#000" />
|
|
||||||
</view>
|
|
||||||
<text class="nav-title">帮助中心</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- Search Bar -->
|
<!-- Search Bar -->
|
||||||
<view class="search-box">
|
<!-- <view class="search-box">
|
||||||
<view class="search-input-box">
|
<view class="search-input-box">
|
||||||
<uni-icons type="search" size="18" color="#999" />
|
<uni-icons type="search" size="18" color="#999" />
|
||||||
<text class="placeholder">搜索你遇到的问题</text>
|
<text class="placeholder">搜索你遇到的问题</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<view class="content-scroll">
|
<view class="content-scroll">
|
||||||
<!-- Quick Start -->
|
<!-- Quick Start -->
|
||||||
@@ -115,10 +103,10 @@
|
|||||||
<uni-icons type="chatbubbles-filled" size="20" color="#fff" />
|
<uni-icons type="chatbubbles-filled" size="20" color="#fff" />
|
||||||
<text>在线客服</text>
|
<text>在线客服</text>
|
||||||
</button>
|
</button>
|
||||||
<button class="c-btn">
|
<!-- <button class="c-btn">
|
||||||
<uni-icons type="world-filled" size="20" color="#fff" />
|
<uni-icons type="world-filled" size="20" color="#fff" />
|
||||||
<text>官方公众号</text>
|
<text>官方公众号</text>
|
||||||
</button>
|
</button> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="bg-decor">
|
<view class="bg-decor">
|
||||||
<uni-icons
|
<uni-icons
|
||||||
@@ -144,14 +132,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { getBavBarHeight, getStatusBarHeight } from "@/utils/system";
|
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||||
|
|
||||||
const navBarHeight = getBavBarHeight();
|
|
||||||
const statusBarHeight = getStatusBarHeight();
|
|
||||||
|
|
||||||
const goBack = () => {
|
|
||||||
uni.navigateBack();
|
|
||||||
};
|
|
||||||
|
|
||||||
const faqList = ref([
|
const faqList = ref([
|
||||||
{
|
{
|
||||||
@@ -222,38 +203,6 @@ const toggleQuestion = (catIndex, itemIndex) => {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-bar {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
z-index: 100;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-left {
|
|
||||||
position: absolute;
|
|
||||||
left: 20rpx;
|
|
||||||
bottom: 0;
|
|
||||||
height: 44px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0 10rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-title {
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #000;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
height: 44px;
|
|
||||||
line-height: 44px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-box {
|
.search-box {
|
||||||
padding: 20rpx 30rpx;
|
padding: 20rpx 30rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|||||||
@@ -18,12 +18,12 @@
|
|||||||
<view class="user-card" @tap="handleUserClick">
|
<view class="user-card" @tap="handleUserClick">
|
||||||
<view class="avatar-box">
|
<view class="avatar-box">
|
||||||
<image :src="userInfo.avatarUrl" class="avatar" mode="aspectFill" />
|
<image :src="userInfo.avatarUrl" class="avatar" mode="aspectFill" />
|
||||||
<view class="red-badge"><text class="fire">🔥</text></view>
|
<!-- <view class="red-badge"><text class="fire">🔥</text></view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="user-info">
|
<view class="user-info">
|
||||||
<view class="row-1">
|
<view class="row-1">
|
||||||
<text class="nickname">{{ userInfo.nickName }}</text>
|
<text class="nickname">{{ userInfo.nickName }}</text>
|
||||||
<view class="vip-tag" v-if="isLoggedIn">
|
<view class="vip-tag" v-if="isLoggedIn && userInfo.isVip">
|
||||||
<text class="vip-text">VIP 祥瑞会员</text>
|
<text class="vip-text">VIP 祥瑞会员</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -135,11 +135,10 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onMounted } from "vue";
|
import { ref, computed, onMounted } from "vue";
|
||||||
import { wxLogin } from "@/utils/login.js";
|
|
||||||
import { getPlatformProvider, getBavBarHeight } from "@/utils/system";
|
|
||||||
import { useUserStore } from "@/stores/user";
|
import { useUserStore } from "@/stores/user";
|
||||||
import { apiLogin } from "@/api/auth.js";
|
import {
|
||||||
|
onShareAppMessage,
|
||||||
|
} from "@dcloudio/uni-app";
|
||||||
import LoginPopup from "@/components/LoginPopup/LoginPopup.vue";
|
import LoginPopup from "@/components/LoginPopup/LoginPopup.vue";
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
@@ -167,6 +166,13 @@ onMounted(() => {
|
|||||||
navBarHeight.value = 44;
|
navBarHeight.value = 44;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onShareAppMessage( () => {
|
||||||
|
return {
|
||||||
|
title: "新年好运已送达 🎊|祝福卡·头像·壁纸",
|
||||||
|
path: "/pages/index/index",
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
const handleUserClick = () => {
|
const handleUserClick = () => {
|
||||||
if (!isLoggedIn.value) {
|
if (!isLoggedIn.value) {
|
||||||
loginPopupRef.value.open();
|
loginPopupRef.value.open();
|
||||||
|
|||||||
@@ -1,18 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="profile-page" :style="{ paddingTop: navBarHeight + 'px' }">
|
<view class="profile-page" >
|
||||||
<!-- Custom Navbar -->
|
<NavBar title="个人信息" />
|
||||||
<view
|
|
||||||
class="nav-bar"
|
|
||||||
:style="{
|
|
||||||
height: navBarHeight + 'px',
|
|
||||||
paddingTop: statusBarHeight + 'px',
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<view class="nav-left" @click="goBack">
|
|
||||||
<uni-icons type="left" size="24" color="#000" />
|
|
||||||
</view>
|
|
||||||
<text class="nav-title">个人信息</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
<view class="content">
|
<view class="content">
|
||||||
@@ -43,20 +31,20 @@
|
|||||||
<uni-icons type="right" size="14" color="#ccc" />
|
<uni-icons type="right" size="14" color="#ccc" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-item" @click="handleEditGender">
|
<!-- <view class="info-item" @click="handleEditGender">
|
||||||
<text class="label">性别</text>
|
<text class="label">性别</text>
|
||||||
<view class="value-box">
|
<view class="value-box">
|
||||||
<text class="value">{{ genderText }}</text>
|
<text class="value">{{ genderText }}</text>
|
||||||
<uni-icons type="right" size="14" color="#ccc" />
|
<uni-icons type="right" size="14" color="#ccc" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="info-item" @click="handleEditManifesto">
|
<!-- <view class="info-item" @click="handleEditManifesto">
|
||||||
<text class="label">新春宣言</text>
|
<text class="label">新春宣言</text>
|
||||||
<view class="value-box">
|
<view class="value-box">
|
||||||
<text class="value red-text">{{ form.bio || "点击选择" }}</text>
|
<text class="value red-text">{{ form.bio || "点击选择" }}</text>
|
||||||
<uni-icons type="compose" size="16" color="#ccc" />
|
<uni-icons type="compose" size="16" color="#ccc" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- Account Binding -->
|
<!-- Account Binding -->
|
||||||
@@ -96,15 +84,10 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, watch } from "vue";
|
import { ref, computed, watch } from "vue";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
import {
|
|
||||||
getBavBarHeight,
|
|
||||||
getStatusBarHeight as getStatus,
|
|
||||||
} from "@/utils/system";
|
|
||||||
import { useUserStore } from "@/stores/user";
|
import { useUserStore } from "@/stores/user";
|
||||||
import { updateUserInfo } from "@/api/auth.js";
|
import { updateUserInfo } from "@/api/auth.js";
|
||||||
|
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||||
|
|
||||||
const navBarHeight = getBavBarHeight();
|
|
||||||
const statusBarHeight = getStatus();
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const { userInfo } = storeToRefs(userStore);
|
const { userInfo } = storeToRefs(userStore);
|
||||||
|
|
||||||
@@ -132,10 +115,6 @@ watch(
|
|||||||
{ immediate: true, deep: true },
|
{ immediate: true, deep: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
const goBack = () => {
|
|
||||||
uni.navigateBack();
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleAvatarClick = () => {
|
const handleAvatarClick = () => {
|
||||||
// Navigate to avatar page or open picker
|
// Navigate to avatar page or open picker
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -143,24 +122,33 @@ const handleAvatarClick = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleEditName = () => {
|
const showEditNameModal = (content) => {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "修改昵称",
|
title: "修改昵称",
|
||||||
editable: true,
|
editable: true,
|
||||||
placeholderText: "请输入昵称(最多5个字)",
|
placeholderText: "请输入昵称(最多5个字)",
|
||||||
content: form.value.nickName,
|
content: content,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
if (res.content.length > 5) {
|
if (res.content.length > 5) {
|
||||||
uni.showToast({ title: "昵称最多5个字", icon: "none" });
|
uni.showToast({ title: "昵称最多5个字", icon: "none" });
|
||||||
|
// 重新打开弹窗以模拟“不消失”,并保留用户输入
|
||||||
|
setTimeout(() => {
|
||||||
|
showEditNameModal(res.content);
|
||||||
|
}, 100);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
form.value.nickName = res.content;
|
form.value.nickName = res.content;
|
||||||
|
handleSave();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleEditName = () => {
|
||||||
|
showEditNameModal(form.value.nickName);
|
||||||
|
};
|
||||||
|
|
||||||
const handleEditGender = () => {
|
const handleEditGender = () => {
|
||||||
uni.showActionSheet({
|
uni.showActionSheet({
|
||||||
itemList: ["男", "女"],
|
itemList: ["男", "女"],
|
||||||
@@ -194,12 +182,16 @@ const handleSave = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uni.showLoading({ title: "保存中...", mask: true });
|
uni.showLoading({ title: "保存中...", mask: true });
|
||||||
|
// 保存当前值,以便失败时恢复
|
||||||
|
const originalForm = {
|
||||||
|
nickName: userInfo.value.nickName || "",
|
||||||
|
gender: userInfo.value.gender || 1,
|
||||||
|
bio: userInfo.value.bio || "万事如意,岁岁平安"
|
||||||
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await updateUserInfo({
|
const res = await updateUserInfo({
|
||||||
nickname: form.value.nickName, // Prompt said "nickname" lowercase, I used "nickName" in ref but need to check param name.
|
nickname: form.value.nickName,
|
||||||
// Prompt: "请求参数分别是nickname gender bio"
|
|
||||||
// Wait, prompt said "nickname", usually it is nickName in Uni-app userInfo.
|
|
||||||
// But I will follow prompt "nickname".
|
|
||||||
gender: form.value.gender,
|
gender: form.value.gender,
|
||||||
bio: form.value.bio,
|
bio: form.value.bio,
|
||||||
});
|
});
|
||||||
@@ -210,14 +202,14 @@ const handleSave = async () => {
|
|||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
uni.showToast({ title: "保存成功", icon: "success" });
|
uni.showToast({ title: "保存成功", icon: "success" });
|
||||||
} else {
|
} else {
|
||||||
|
// 恢复之前的内容
|
||||||
|
form.value = { ...originalForm };
|
||||||
|
uni.showToast({ title: res.message || '修改失败', icon: "none" });
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
// If res is not success but request didn't fail, maybe backend returns something else?
|
|
||||||
// Assuming request wrapper handles non-200 business codes by rejecting,
|
|
||||||
// so here we might just have data.
|
|
||||||
// If prompt says "returns { success: true }", then checking res.success is correct.
|
|
||||||
// If it fails, request throws error usually.
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
// 恢复之前的内容
|
||||||
|
form.value = { ...originalForm };
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
// Error is handled by request usually if showError is true.
|
// Error is handled by request usually if showError is true.
|
||||||
// But we can show toast too.
|
// But we can show toast too.
|
||||||
@@ -234,33 +226,6 @@ const handleSave = async () => {
|
|||||||
padding-bottom: 200rpx;
|
padding-bottom: 200rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-bar {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
background-color: #fcfcfc;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
z-index: 100;
|
|
||||||
|
|
||||||
.nav-left {
|
|
||||||
position: absolute;
|
|
||||||
left: 30rpx;
|
|
||||||
bottom: 0;
|
|
||||||
height: 44px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-title {
|
|
||||||
font-size: 34rpx;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="vip-page" :style="{ paddingTop: navBarHeight + 'px' }">
|
<view class="vip-page" >
|
||||||
<!-- Custom Navbar -->
|
<NavBar title="会员中心" />
|
||||||
<view
|
|
||||||
class="nav-bar"
|
|
||||||
:style="{
|
|
||||||
height: navBarHeight + 'px',
|
|
||||||
paddingTop: statusBarHeight + 'px',
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<view class="nav-left" @click="goBack">
|
|
||||||
<uni-icons type="left" size="24" color="#000" />
|
|
||||||
</view>
|
|
||||||
<text class="nav-title">会员中心</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
<view class="content">
|
<view class="content">
|
||||||
@@ -120,15 +108,10 @@
|
|||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
|
|
||||||
import {
|
|
||||||
getBavBarHeight,
|
|
||||||
getStatusBarHeight as getStatus,
|
|
||||||
} from "@/utils/system";
|
|
||||||
import { useUserStore } from "@/stores/user";
|
import { useUserStore } from "@/stores/user";
|
||||||
import { createOrder, getVipPlan } from "@/api/pay.js";
|
import { createOrder, getVipPlan } from "@/api/pay.js";
|
||||||
|
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||||
|
|
||||||
const navBarHeight = getBavBarHeight();
|
|
||||||
const statusBarHeight = getStatus();
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const { userInfo } = storeToRefs(userStore);
|
const { userInfo } = storeToRefs(userStore);
|
||||||
|
|
||||||
@@ -166,10 +149,6 @@ const getVipPlanList = async () => {
|
|||||||
plans.value = planRes;
|
plans.value = planRes;
|
||||||
};
|
};
|
||||||
|
|
||||||
const goBack = () => {
|
|
||||||
uni.navigateBack();
|
|
||||||
};
|
|
||||||
|
|
||||||
const selectPlan = (index) => {
|
const selectPlan = (index) => {
|
||||||
selectedPlanIndex.value = index;
|
selectedPlanIndex.value = index;
|
||||||
};
|
};
|
||||||
@@ -230,34 +209,6 @@ const handlePurchase = async () => {
|
|||||||
padding-bottom: 200rpx; // Space for bottom bar
|
padding-bottom: 200rpx; // Space for bottom bar
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-bar {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
background-color: #fff;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
z-index: 100;
|
|
||||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
|
||||||
|
|
||||||
.nav-left {
|
|
||||||
position: absolute;
|
|
||||||
left: 30rpx;
|
|
||||||
bottom: 0;
|
|
||||||
height: 44px; // Standard title bar height
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-title {
|
|
||||||
font-size: 34rpx;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="wallpaper-page" :style="{ paddingTop: navBarTop + 'px' }">
|
<view class="wallpaper-page" >
|
||||||
<!-- Navbar -->
|
<NavBar title="我的壁纸" />
|
||||||
<view
|
|
||||||
class="nav-bar"
|
|
||||||
:style="{ height: navBarHeight + 'px', paddingTop: navBarTop + 'px' }"
|
|
||||||
>
|
|
||||||
<view class="nav-content">
|
|
||||||
<view class="back-btn" @tap="goBack">
|
|
||||||
<text class="back-arrow">‹</text>
|
|
||||||
</view>
|
|
||||||
<text class="title">我的新春壁纸</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- Header Stats -->
|
<!-- Header Stats -->
|
||||||
<view class="header-stats">
|
<view class="header-stats">
|
||||||
@@ -61,9 +50,8 @@
|
|||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
|
import { onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
|
||||||
import { getMyWallpaper } from "@/api/mine.js";
|
import { getMyWallpaper } from "@/api/mine.js";
|
||||||
|
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||||
|
|
||||||
const navBarTop = ref(0);
|
|
||||||
const navBarHeight = ref(44);
|
|
||||||
const list = ref([]);
|
const list = ref([]);
|
||||||
const page = ref(1);
|
const page = ref(1);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@@ -72,8 +60,6 @@ const isRefreshing = ref(false);
|
|||||||
const totalCount = ref(0);
|
const totalCount = ref(0);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const sysInfo = uni.getSystemInfoSync();
|
|
||||||
navBarTop.value = sysInfo.statusBarHeight;
|
|
||||||
fetchList(true);
|
fetchList(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -128,10 +114,6 @@ const onRefresh = () => {
|
|||||||
fetchList(true);
|
fetchList(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
const goBack = () => {
|
|
||||||
uni.navigateBack();
|
|
||||||
};
|
|
||||||
|
|
||||||
const formatDate = (dateStr) => {
|
const formatDate = (dateStr) => {
|
||||||
if (!dateStr) return "";
|
if (!dateStr) return "";
|
||||||
const date = new Date(dateStr);
|
const date = new Date(dateStr);
|
||||||
@@ -157,44 +139,6 @@ const onPreview = (item) => {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-bar {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
z-index: 100;
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
|
|
||||||
.nav-content {
|
|
||||||
height: 44px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.back-btn {
|
|
||||||
position: absolute;
|
|
||||||
left: 16px;
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0 10px;
|
|
||||||
|
|
||||||
.back-arrow {
|
|
||||||
font-size: 32px;
|
|
||||||
color: #333;
|
|
||||||
font-weight: 300;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-stats {
|
.header-stats {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
background: #f9f9f9;
|
background: #f9f9f9;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<!-- More Wallpapers -->
|
<!-- More Wallpapers -->
|
||||||
<view class="more-section">
|
<view class="more-section">
|
||||||
<view class="section-header">
|
<view class="section-header">
|
||||||
<text class="section-title">更多精美新春壁纸</text>
|
<text class="section-title">我也要领新春壁纸</text>
|
||||||
<view class="more-link" @tap="goToIndex">
|
<view class="more-link" @tap="goToIndex">
|
||||||
<text>查看更多</text>
|
<text>查看更多</text>
|
||||||
<text class="arrow">›</text>
|
<text class="arrow">›</text>
|
||||||
@@ -238,28 +238,31 @@ const goToAvatar = () => {
|
|||||||
height: 44px; // Standard nav height
|
height: 44px; // Standard nav height
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
padding: 0 24rpx;
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.back {
|
.back {
|
||||||
position: absolute;
|
|
||||||
left: 16px;
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 10px;
|
margin-right: 24rpx;
|
||||||
|
/* 增大点击区域 */
|
||||||
|
padding: 20rpx;
|
||||||
|
margin-left: -20rpx;
|
||||||
|
|
||||||
.back-icon {
|
.back-icon {
|
||||||
font-size: 32px;
|
font-size: 50rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
|
line-height: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 18px;
|
font-size: 34rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
flex: 1;
|
||||||
|
text-align: center;
|
||||||
|
margin-right: 50rpx; /* Balance back button */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view
|
<view
|
||||||
class="wallpaper-page"
|
class="wallpaper-page"
|
||||||
:style="{ paddingTop: getBavBarHeight() + 'px' }"
|
|
||||||
>
|
>
|
||||||
<!-- Custom Navbar -->
|
<NavBar title="精美壁纸" />
|
||||||
<view class="nav-bar">
|
|
||||||
<view class="back" @tap="goBack">‹</view>
|
|
||||||
<text class="nav-title">新春精美壁纸</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- Category Tabs -->
|
<!-- Category Tabs -->
|
||||||
<view class="category-tabs">
|
<view class="category-tabs">
|
||||||
@@ -42,7 +37,7 @@
|
|||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<image
|
<image
|
||||||
:src="item.imageUrl"
|
:src="getThumbUrl(item.imageUrl)"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
class="wallpaper-img"
|
class="wallpaper-img"
|
||||||
@tap="previewImage(index)"
|
@tap="previewImage(index)"
|
||||||
@@ -97,12 +92,12 @@ import {
|
|||||||
import { onShareAppMessage } from "@dcloudio/uni-app";
|
import { onShareAppMessage } from "@dcloudio/uni-app";
|
||||||
import { getShareReward, abilityCheck } from "@/api/system.js";
|
import { getShareReward, abilityCheck } from "@/api/system.js";
|
||||||
import { useUserStore } from "@/stores/user";
|
import { useUserStore } from "@/stores/user";
|
||||||
|
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const loginPopupRef = ref(null);
|
const loginPopupRef = ref(null);
|
||||||
|
|
||||||
const isLoggedIn = computed(() => !!userStore.userInfo.nickName);
|
const isLoggedIn = computed(() => !!userStore.userInfo.nickName);
|
||||||
|
|
||||||
const categories = ref([]);
|
const categories = ref([]);
|
||||||
const currentCategoryId = ref(null);
|
const currentCategoryId = ref(null);
|
||||||
const wallpapers = ref([]);
|
const wallpapers = ref([]);
|
||||||
@@ -119,7 +114,7 @@ onShareAppMessage(async (options) => {
|
|||||||
options?.target?.dataset?.item?.id,
|
options?.target?.dataset?.item?.id,
|
||||||
);
|
);
|
||||||
return {
|
return {
|
||||||
title: "分享精美壁纸",
|
title: "快来挑选喜欢的新春壁纸吧",
|
||||||
path: `/pages/wallpaper/detail?shareToken=${shareTokenRes.shareToken}`,
|
path: `/pages/wallpaper/detail?shareToken=${shareTokenRes.shareToken}`,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
@@ -135,8 +130,8 @@ onMounted(async () => {
|
|||||||
await fetchCategories();
|
await fetchCategories();
|
||||||
});
|
});
|
||||||
|
|
||||||
const goBack = () => {
|
const getThumbUrl = (url) => {
|
||||||
uni.navigateBack();
|
return `${url}?imageView2/1/w/340/h/600/q/80`;
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchCategories = async () => {
|
const fetchCategories = async () => {
|
||||||
@@ -271,12 +266,18 @@ const shareWallpaper = (item) => {};
|
|||||||
margin-right: 24rpx;
|
margin-right: 24rpx;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
color: #ffd700; /* Gold */
|
color: #ffd700; /* Gold */
|
||||||
|
/* 增大点击区域 */
|
||||||
|
padding: 20rpx;
|
||||||
|
margin-left: -20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-title {
|
.nav-title {
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #ffd700; /* Gold */
|
color: #ffd700; /* Gold */
|
||||||
|
flex: 1;
|
||||||
|
text-align: center;
|
||||||
|
margin-right: 50rpx; /* Balance back button */
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-tabs {
|
.category-tabs {
|
||||||
|
|||||||
BIN
static/images/share.jpg
Normal file
|
After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
@@ -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://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";
|
// const BASE_URL = "http://192.168.31.253:3999";
|
||||||
import { useUserStore } from "@/stores/user";
|
import { useUserStore } from "@/stores/user";
|
||||||
|
|
||||||
|
|||||||