feat: 分包 除了list

This commit is contained in:
2025-09-12 15:30:49 +08:00
parent bd628f2b5c
commit 859ffec852
26 changed files with 33 additions and 20 deletions

View File

@@ -0,0 +1,53 @@
import { useState, useEffect } from "react";
import { View, Text, Image, Button } from "@tarojs/components";
import Taro, { useRouter } from "@tarojs/taro";
import { withAuth } from "@/components";
import evaluateService from "@/services/evaluateService";
import { useUserActions } from "@/store/userStore";
import { delay } from "@/utils";
import styles from "./index.module.scss";
function NtrpEvaluate() {
const { updateUserInfo } = useUserActions();
const { params } = useRouter();
const { redirect } = params;
useEffect(() => {
evaluateService.getEvaluateQuestions().then((data) => {
console.log(data);
});
}, []);
async function handleUpdateNtrp() {
await updateUserInfo({
ntrp_level: "4.0",
});
Taro.showToast({
title: "更新成功",
icon: "success",
duration: 2000,
});
await delay(2000);
if (redirect) {
Taro.redirectTo({ url: decodeURIComponent(redirect) });
}
}
return (
<View className={styles.container}>
<View className={styles.title}>NTRP评分</View>
<View className={styles.content}>
<Image
className={styles.image}
src="https://img.yzcdn.cn/vant/cat.jpeg"
/>
<Text className={styles.description}>NTRP评分是 4.0 </Text>
</View>
<Button className={styles.button} onClick={handleUpdateNtrp}>
</Button>
</View>
);
}
export default withAuth(NtrpEvaluate);