Compare commits
6 Commits
88f06d0b42
...
02c3fe1b12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02c3fe1b12 | ||
|
|
c43433848e | ||
|
|
36ff1fb988 | ||
|
|
e4f81b3dc9 | ||
|
|
cee6ef9f91 | ||
|
|
99aa89a5c2 |
@@ -2,30 +2,79 @@
|
||||
<view>
|
||||
<uni-popup ref="popupRef" type="bottom" :safe-area="false">
|
||||
<view class="popup-container">
|
||||
<view class="drag-handle"></view>
|
||||
<view class="popup-header">
|
||||
<text class="popup-title">登录授权</text>
|
||||
<text class="popup-title">授权登录</text>
|
||||
<view class="close-btn" @tap="close">
|
||||
<uni-icons type="closeempty" size="20" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="avatar-nickname">
|
||||
<view class="avatar-section">
|
||||
<button
|
||||
open-type="chooseAvatar"
|
||||
@chooseavatar="onChooseAvatar"
|
||||
class="avatar-selector custom-button"
|
||||
>
|
||||
<view class="avatar-wrapper">
|
||||
<image v-if="avatarUrl" :src="avatarUrl" class="avatar-preview" />
|
||||
<text v-else>点击获取头像</text>
|
||||
<image
|
||||
v-else
|
||||
src="/static/images/default-avatar.png"
|
||||
class="avatar-preview"
|
||||
/>
|
||||
<view class="camera-icon">
|
||||
<uni-icons
|
||||
type="camera-filled"
|
||||
size="14"
|
||||
color="#fff"
|
||||
></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<text class="upload-tip">点击上传头像</text>
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view class="form-section">
|
||||
<view class="input-group">
|
||||
<text class="label">昵称</text>
|
||||
<input
|
||||
class="nickname-input"
|
||||
type="nickname"
|
||||
v-model="nickname"
|
||||
placeholder="请输入昵称"
|
||||
placeholder="请输入或点击获取昵称"
|
||||
placeholder-class="placeholder"
|
||||
/>
|
||||
<!-- <text class="get-nickname-btn">获取微信昵称</text> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="action-section">
|
||||
<button class="confirm-btn custom-button" @tap="confirmLogin">
|
||||
确认登录
|
||||
一键登录
|
||||
</button>
|
||||
|
||||
<!-- <view class="agreement-row" @tap="toggleAgreement">
|
||||
<view class="checkbox" :class="{ checked: isAgreed }">
|
||||
<uni-icons
|
||||
v-if="isAgreed"
|
||||
type="checkmarkempty"
|
||||
size="12"
|
||||
color="#fff"
|
||||
></uni-icons>
|
||||
</view>
|
||||
<view class="agreement-text">
|
||||
登录即代表您同意
|
||||
<text class="link" @tap.stop="openAgreement('user')"
|
||||
>《用户协议》</text
|
||||
>
|
||||
及
|
||||
<text class="link" @tap.stop="openAgreement('privacy')"
|
||||
>《隐私政策》</text
|
||||
>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
@@ -97,10 +146,8 @@ const getFestivalName = () => {
|
||||
};
|
||||
|
||||
const open = async () => {
|
||||
console.log(22223333);
|
||||
// #ifdef MP-WEIXIN
|
||||
const isAgreed = await privacyRef.value.check();
|
||||
console.log(1111, isAgreed);
|
||||
if (isAgreed) {
|
||||
popupRef.value.open();
|
||||
}
|
||||
@@ -124,6 +171,10 @@ const onChooseAvatar = (e) => {
|
||||
};
|
||||
|
||||
const confirmLogin = async () => {
|
||||
// if (!isAgreed.value) {
|
||||
// uni.showToast({ title: "请先同意用户协议和隐私政策", icon: "none" });
|
||||
// return;
|
||||
// }
|
||||
try {
|
||||
const platform = getPlatformProvider();
|
||||
if (platform === "mp-weixin") {
|
||||
@@ -181,61 +232,175 @@ defineExpose({ open, close });
|
||||
}
|
||||
.popup-container {
|
||||
background-color: #fff;
|
||||
padding: 40rpx 30rpx 60rpx;
|
||||
border-top-left-radius: 30rpx;
|
||||
border-top-right-radius: 30rpx;
|
||||
padding: 20rpx 40rpx 60rpx;
|
||||
border-top-left-radius: 48rpx;
|
||||
border-top-right-radius: 48rpx;
|
||||
position: relative;
|
||||
|
||||
.drag-handle {
|
||||
width: 64rpx;
|
||||
height: 8rpx;
|
||||
background: #e5e5e5;
|
||||
border-radius: 4rpx;
|
||||
margin: 0 auto 30rpx;
|
||||
}
|
||||
|
||||
.popup-header {
|
||||
text-align: center;
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-bottom: 60rpx;
|
||||
position: relative;
|
||||
|
||||
.popup-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
.close-btn {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
padding: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.avatar-nickname {
|
||||
.avatar-section {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 80rpx;
|
||||
|
||||
.avatar-selector {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.avatar-selector {
|
||||
width: 145rpx;
|
||||
height: 145rpx;
|
||||
border-radius: 50%;
|
||||
font-size: 26rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 20rpx;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.avatar-wrapper {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
background: #f5f5f5;
|
||||
border-radius: 50%;
|
||||
position: relative;
|
||||
margin-bottom: 20rpx;
|
||||
border: 4rpx solid #fff;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
.avatar-preview {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.nickname-input {
|
||||
width: 80%;
|
||||
border: 1rpx solid #ccc;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
font-size: 26rpx;
|
||||
text-align: center;
|
||||
.camera-icon {
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
bottom: 10rpx;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
background: #ff4d4f;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 4rpx solid #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.confirm-btn {
|
||||
background-color: #07c160;
|
||||
color: white;
|
||||
.upload-tip {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.form-section {
|
||||
margin-bottom: 80rpx;
|
||||
|
||||
.input-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 30rpx 0;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
|
||||
.label {
|
||||
font-size: 30rpx;
|
||||
color: #1a1a1a;
|
||||
font-weight: 500;
|
||||
width: 100rpx;
|
||||
}
|
||||
|
||||
.nickname-input {
|
||||
flex: 1;
|
||||
font-size: 30rpx;
|
||||
color: #1a1a1a;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.get-nickname-btn {
|
||||
font-size: 26rpx;
|
||||
color: #576b95;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.action-section {
|
||||
.confirm-btn {
|
||||
background: #ff4d4f;
|
||||
color: #fff;
|
||||
font-size: 34rpx;
|
||||
font-weight: 600;
|
||||
height: 100rpx;
|
||||
border-radius: 50rpx;
|
||||
padding: 20rpx 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 40rpx;
|
||||
box-shadow: 0 12rpx 24rpx rgba(255, 77, 79, 0.3);
|
||||
|
||||
&:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
.agreement-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.checkbox {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
border: 2rpx solid #ccc;
|
||||
border-radius: 50%;
|
||||
margin-right: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s;
|
||||
|
||||
&.checked {
|
||||
background: #ff4d4f;
|
||||
border-color: #ff4d4f;
|
||||
}
|
||||
}
|
||||
|
||||
.agreement-text {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
|
||||
.link {
|
||||
color: #576b95;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -591,7 +591,7 @@ const saveAndUse = async () => {
|
||||
abilityRes?.message === "分享可继续"
|
||||
) {
|
||||
uni.showToast({
|
||||
title: "分享到群聊可继续使用",
|
||||
title: "分享给好友可继续使用",
|
||||
icon: "none",
|
||||
});
|
||||
return;
|
||||
@@ -675,6 +675,8 @@ onShareAppMessage(async () => {
|
||||
return {
|
||||
title: "新春祝福",
|
||||
path: `/pages/index/index?shareToken=${shareToken}`,
|
||||
imageUrl:
|
||||
"https://file.lihailezzc.com/resource/cfed2edbfa19250b836a87a4bbf0d5ad.png",
|
||||
};
|
||||
}
|
||||
uni.showLoading({ title: "分享中...", mask: true });
|
||||
|
||||
@@ -1,23 +1,29 @@
|
||||
<template>
|
||||
<view class="fortune-detail-page">
|
||||
<view
|
||||
class="fortune-detail-page"
|
||||
:style="{ paddingTop: navHeight + 10 + 'px' }"
|
||||
>
|
||||
<NavBar title="" :transparent="true" color="#ffd700" />
|
||||
|
||||
<!-- 顶部提示条 -->
|
||||
<!-- <view class="top-banner" v-if="inviterName">
|
||||
<view class="top-banner">
|
||||
<view class="banner-left">
|
||||
<image
|
||||
class="avatar-icon"
|
||||
v-if="inviterAvatar"
|
||||
v-if="inviterName && inviterAvatar"
|
||||
:src="inviterAvatar"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<text class="banner-text"
|
||||
>你的好友 {{ inviterName }} 正在测试2026新年运势</text
|
||||
<text class="banner-icon" v-else-if="!inviterName">✨</text>
|
||||
<text class="banner-text" v-if="inviterName"
|
||||
>你的好友 {{ inviterName }} 正在抽取2026新年运势</text
|
||||
>
|
||||
<text class="banner-text" v-else>2026 灵马贺岁 · 开启你的新年好运</text>
|
||||
</view>
|
||||
<view class="mini-btn" @click="goTest">
|
||||
我也要测 <text class="mini-arrow">↗</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="top-banner" v-else>
|
||||
<text class="banner-icon">✨</text>
|
||||
<text class="banner-text">2026 灵马贺岁 · 开启你的新年好运</text>
|
||||
</view> -->
|
||||
|
||||
<!-- 页面标题 -->
|
||||
<view class="page-header">
|
||||
@@ -73,22 +79,26 @@
|
||||
<view class="qr-placeholder"></view>
|
||||
</view> -->
|
||||
<view class="footer-text">2026 灵马贺岁 · 测出你的新年锦鲤关键词</view>
|
||||
<view class="footer-sub"
|
||||
>LONG-PRESS TO SAVE OR SCAN TO JOIN THE RITUAL</view
|
||||
>
|
||||
<view class="footer-sub">2026 HAPPY NEW YEAR</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { ref, onMounted } from "vue";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { getPageDetail } from "@/api/system.js";
|
||||
import { saveViewRequest } from "@/utils/common.js";
|
||||
import NavBar from "@/components/NavBar/NavBar.vue";
|
||||
import { getBavBarHeight } from "@/utils/system.js";
|
||||
|
||||
const inviterName = ref("");
|
||||
const inviterAvatar = ref("");
|
||||
const navHeight = ref(88);
|
||||
|
||||
onMounted(() => {
|
||||
navHeight.value = getBavBarHeight();
|
||||
});
|
||||
|
||||
const fortuneData = ref({
|
||||
imageUrl: "",
|
||||
@@ -161,7 +171,7 @@ const saveCard = () => {
|
||||
.fortune-detail-page {
|
||||
min-height: 100vh;
|
||||
background-color: #2c1e1c;
|
||||
padding: 44px 20px 40px;
|
||||
padding: 0 20px 40px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
@@ -169,28 +179,57 @@ const saveCard = () => {
|
||||
}
|
||||
|
||||
.top-banner {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
background: rgba(255, 215, 0, 0.1);
|
||||
border: 1px solid rgba(255, 215, 0, 0.2);
|
||||
border-radius: 20px;
|
||||
padding: 6px 16px;
|
||||
border-radius: 30px;
|
||||
padding: 6px 6px 6px 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 24px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.banner-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
.banner-icon {
|
||||
margin-right: 6px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.avatar-icon {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 50%;
|
||||
margin-right: 6px;
|
||||
margin-right: 8px;
|
||||
border: 1px solid rgba(255, 215, 0, 0.3);
|
||||
}
|
||||
.banner-text {
|
||||
font-size: 12px;
|
||||
color: #ffd700;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.mini-btn {
|
||||
background: linear-gradient(90deg, #ffd700 0%, #ffa500 100%);
|
||||
color: #333;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
padding: 6px 12px;
|
||||
border-radius: 20px;
|
||||
margin-left: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.mini-arrow {
|
||||
margin-left: 2px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
|
||||
@@ -115,7 +115,6 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, onUnmounted, computed } from "vue";
|
||||
import { getDeviceInfo } from "@/utils/system";
|
||||
import { onLoad, onShow, onShareAppMessage } from "@dcloudio/uni-app";
|
||||
import { abilityCheck } from "@/api/system.js";
|
||||
import { drawFortune } from "@/api/fortune.js";
|
||||
@@ -166,7 +165,7 @@ onShareAppMessage(async () => {
|
||||
getRewardByShare();
|
||||
return {
|
||||
title: "马年运势我已经抽过了,你的会是什么?",
|
||||
path: `${cardId.value ? `/pages/fortune/detail?shareToken=${shareToken}` : `/pages/fortune/index?shareToken=${shareTokenRes.shareToken}`}`,
|
||||
path: `${cardId.value ? `/pages/fortune/detail?shareToken=${shareToken}` : `/pages/fortune/index?shareToken=${shareToken}`}`,
|
||||
imageUrl:
|
||||
"https://file.lihailezzc.com/resource/cfed2edbfa19250b836a87a4bbf0d5ad.png",
|
||||
};
|
||||
|
||||
@@ -100,12 +100,13 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import { ref } from "vue";
|
||||
import {
|
||||
onPullDownRefresh,
|
||||
onShareAppMessage,
|
||||
onReachBottom,
|
||||
onLoad,
|
||||
onShow,
|
||||
} from "@dcloudio/uni-app";
|
||||
import { getBavBarHeight } from "@/utils/system";
|
||||
import { getRecommendList, getRandomGreeting } from "@/api/system";
|
||||
@@ -148,16 +149,19 @@ const updateCountdown = () => {
|
||||
const todayDate = ref("");
|
||||
const dailyGreeting = ref("");
|
||||
|
||||
onShow(() => {
|
||||
updateCountdown();
|
||||
const date = new Date();
|
||||
todayDate.value = `${date.getMonth() + 1}月${date.getDate()}日`;
|
||||
});
|
||||
|
||||
onLoad((options) => {
|
||||
if (options.shareToken) saveViewRequest(options.shareToken, "index");
|
||||
|
||||
updateCountdown();
|
||||
// updateCountdown();
|
||||
getRandomGreetingText();
|
||||
fetchRecommendList();
|
||||
|
||||
const date = new Date();
|
||||
todayDate.value = `${date.getMonth() + 1}月${date.getDate()}日`;
|
||||
|
||||
// Daily Inspiration Logic
|
||||
// const startOfYear = new Date(date.getFullYear(), 0, 0);
|
||||
// const diff = date - startOfYear;
|
||||
@@ -171,7 +175,7 @@ onLoad((options) => {
|
||||
onShareAppMessage(async () => {
|
||||
const shareToken = await getShareToken("index");
|
||||
return {
|
||||
title: "新春祝福",
|
||||
title: "新年好运已送达 🎊|祝福卡·头像·壁纸",
|
||||
path: `/pages/index/index?shareToken=${shareToken}`,
|
||||
imageUrl:
|
||||
"https://file.lihailezzc.com/resource/cfed2edbfa19250b836a87a4bbf0d5ad.png",
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
<!-- 文字编辑 -->
|
||||
<view v-if="activeTool === 'text'" class="section text-edit-section">
|
||||
<view class="form-item">
|
||||
<text class="label">祝福对象</text>
|
||||
<text class="label">祝福对象(可不填)</text>
|
||||
<input
|
||||
class="input-box"
|
||||
v-model="targetName"
|
||||
@@ -219,7 +219,7 @@
|
||||
|
||||
<!-- 署名 -->
|
||||
<view class="form-item">
|
||||
<text class="label">署名</text>
|
||||
<text class="label">署名(可不填)</text>
|
||||
<view class="input-wrapper">
|
||||
<input
|
||||
class="input-box"
|
||||
@@ -957,19 +957,16 @@ onShareAppMessage(async (options) => {
|
||||
getShareReward({ scene: "card_generate" });
|
||||
if (options.from === "button") {
|
||||
if (!isLoggedIn.value) {
|
||||
const shareToken = await getShareToken("card_generate_not_login", "");
|
||||
return {
|
||||
title: "新春祝福",
|
||||
path: "/pages/index/index",
|
||||
path: "/pages/index/index?shareToken=" + shareToken,
|
||||
imageUrl:
|
||||
"https://file.lihailezzc.com/resource/cfed2edbfa19250b836a87a4bbf0d5ad.png",
|
||||
};
|
||||
}
|
||||
// 1. 确保有 cardId (如果内容有变动,最好是新建)
|
||||
const id = createCard();
|
||||
if (!id) {
|
||||
return {
|
||||
title: "新春祝福",
|
||||
path: "/pages/index/index",
|
||||
};
|
||||
}
|
||||
|
||||
const shareToken = await getShareToken("card_generate", id);
|
||||
shareOrSave(id);
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<text class="vip-title">祥瑞会员中心</text>
|
||||
<view class="diamond-tag">DIAMOND</view>
|
||||
</view>
|
||||
<text class="vip-subtitle">开通永久会员解锁全部特权</text>
|
||||
<text class="vip-subtitle">开通会员解锁全部特权</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="vip-right">
|
||||
@@ -171,6 +171,8 @@ onShareAppMessage(() => {
|
||||
return {
|
||||
title: "新年好运已送达 🎊|祝福卡·头像·壁纸",
|
||||
path: "/pages/index/index",
|
||||
imageUrl:
|
||||
"https://file.lihailezzc.com/resource/cfed2edbfa19250b836a87a4bbf0d5ad.png",
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="wallpaper-page">
|
||||
<NavBar title="新春精美壁纸" />
|
||||
<NavBar title="精美壁纸" />
|
||||
|
||||
<!-- Category Tabs -->
|
||||
<view class="category-tabs">
|
||||
@@ -115,7 +115,7 @@ onShareAppMessage(async (options) => {
|
||||
path: `/pages/wallpaper/detail?shareToken=${shareToken}`,
|
||||
};
|
||||
} else {
|
||||
const shareToken = await getShareToken("wallpaper_download", "");
|
||||
const shareToken = await getShareToken("wallpaper_download_index", "");
|
||||
return {
|
||||
title: "新春祝福",
|
||||
path: `/pages/index/index?shareToken=${shareToken}`,
|
||||
|
||||
BIN
static/images/default-avatar.png
Normal file
BIN
static/images/default-avatar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.6 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://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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user