From 228e5b8e9e7ffbdd6758964673d6f088d3ec0c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=9D=B0?= Date: Mon, 1 Sep 2025 14:31:46 +0800 Subject: [PATCH 1/3] feat: userinfo --- src/app.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.config.ts b/src/app.config.ts index e12e2bd..ec9c555 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -1,7 +1,7 @@ export default defineAppConfig({ pages: [ 'pages/list/index', - // 'pages/userInfo/myself/index', + 'pages/userInfo/myself/index', 'pages/login/index/index', 'pages/login/verification/index', 'pages/login/terms/index', From d500d362368256c0bfc1d1e8fee54fbd8321fe92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=9D=B0?= Date: Mon, 1 Sep 2025 14:31:46 +0800 Subject: [PATCH 2/3] feat: userinfo --- src/app.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.config.ts b/src/app.config.ts index 1cd60c5..81a0747 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -4,11 +4,11 @@ export default defineAppConfig({ 'pages/list/index', // 列表页 'pages/search/index', // 搜索页 'pages/searchResult/index', // 搜索结果页面 - // 'pages/userInfo/myself/index', + 'pages/list/index', + 'pages/userInfo/myself/index', 'pages/login/index/index', 'pages/login/verification/index', 'pages/login/terms/index', - // 'pages/mapDisplay/index', 'pages/detail/index', 'pages/message/index', From 66c85d6586de8faef154de04e9b658147d7b0f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=9D=B0?= Date: Mon, 1 Sep 2025 14:50:14 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E6=B5=81=E7=A8=8B=E4=B8=B2?= =?UTF-8?q?=E9=80=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.config.ts | 1 - src/components/ListCard/index.tsx | 1 + src/pages/detail/index.tsx | 11 ++++++++--- src/pages/orderCheck/index.tsx | 21 ++++++++++++++++++++- 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/app.config.ts b/src/app.config.ts index 81a0747..eee34b8 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -4,7 +4,6 @@ export default defineAppConfig({ 'pages/list/index', // 列表页 'pages/search/index', // 搜索页 'pages/searchResult/index', // 搜索结果页面 - 'pages/list/index', 'pages/userInfo/myself/index', 'pages/login/index/index', 'pages/login/verification/index', diff --git a/src/components/ListCard/index.tsx b/src/components/ListCard/index.tsx index df80400..3fb3538 100644 --- a/src/components/ListCard/index.tsx +++ b/src/components/ListCard/index.tsx @@ -22,6 +22,7 @@ const ListCard: React.FC = ({ }; const handleViewDetail = () => { + console.log('id', id) Taro.navigateTo({ url: `/pages/detail/index?id=${id || 1}&from=list&autoShare=0`, }); diff --git a/src/pages/detail/index.tsx b/src/pages/detail/index.tsx index b1e1626..5565e69 100644 --- a/src/pages/detail/index.tsx +++ b/src/pages/detail/index.tsx @@ -1,7 +1,7 @@ import React, { useState, useEffect, useRef, useImperativeHandle, forwardRef } from 'react' import { View, Text, Button, Swiper, SwiperItem, Image, Map, ScrollView } from '@tarojs/components' import { Cell, Avatar, Progress, Popover } from '@nutui/nutui-react-taro' -import Taro, { useRouter, useShareAppMessage, useShareTimeline } from '@tarojs/taro' +import Taro, { useRouter, useShareAppMessage, useShareTimeline, useDidShow } from '@tarojs/taro' // 导入API服务 import DetailService from '../../services/detailService' import { @@ -106,10 +106,15 @@ function Index() { const sharePopupRef = useRef(null) // 页面加载时获取数据 - useEffect(() => { + // useEffect(() => { + // fetchDetail() + // calcBgMainColors() + // }, []) + + useDidShow(() => { fetchDetail() calcBgMainColors() - }, []) + }) const fetchDetail = async () => { const res = await DetailService.getDetail(Number(id)) diff --git a/src/pages/orderCheck/index.tsx b/src/pages/orderCheck/index.tsx index 8165946..7a32e62 100644 --- a/src/pages/orderCheck/index.tsx +++ b/src/pages/orderCheck/index.tsx @@ -1,10 +1,29 @@ import React from 'react' -import { View, Text } from '@tarojs/components' +import { View, Text, Button } from '@tarojs/components' +import Taro from '@tarojs/taro' +import { delay } from '@/utils' const OrderCheck = () => { + const handlePay = async () => { + Taro.showLoading({ + title: '支付中...', + mask: true + }) + await delay(2000) + Taro.hideLoading() + Taro.showToast({ + title: '支付成功', + icon: 'success' + }) + await delay(1000) + Taro.navigateBack({ + delta: 1 + }) + } return ( OrderCheck + ) }