Commit a9c06ed4 authored by hewenhao's avatar hewenhao

feat: update

parent 3a2aebd2
{ {
"noun": ["白菜", "西瓜", "萝卜"], "noun": [
"adj": ["快乐的", "英勇的", "奋斗的"] "欧拉",
"苏公",
"伽利略",
"费马",
"牛顿",
"莱布尼茨",
"狄利克雷",
"高斯",
"柯西",
"希尔伯特",
"庞加莱",
"黎曼",
"菲涅耳",
"傅里叶",
"爱因斯坦",
"梅涅劳斯",
"瑞利",
"泊松",
"伯努利",
"拉格朗日",
"卡尔丹",
"埃尔米特",
"康托尔",
"摩比乌斯",
"祖基",
"塞缪尔森",
"卡诺",
"伊藤",
"梅森",
"阿贝尔",
"卢瑟福",
"瑞士人",
"费米",
"费曼",
"罗斯",
"瑞克",
"阿克曼",
"亚当斯",
"布朗",
"贝克",
"罗伯特",
"瑞安",
"克莱因",
"艾瑞克森",
"阿尔库塞",
"阿莫斯",
"瑞兹",
"瑞奇",
"瑞克斯",
"贝瑞",
"伯恩斯",
"贝萨",
"布里克斯",
"瑞兹曼",
"克拉克",
"卡勒尔",
"康科德",
"瑞克特",
"瑞尔",
"瑞克里",
"瑞本",
"瑞德",
"瑞迪",
"瑞蒂",
"瑞茨",
"瑞曼",
"瑞威",
"瑞奇",
"瑞维",
"丹尼尔",
"大卫",
"约翰",
"亚历山大",
"亚伯拉罕",
"海因里希",
"费德里科",
"伊萨克",
"乔治",
"罗伯特",
"亨利",
"威廉",
"乔纳森",
"卡尔",
"拉尔斯",
"汉斯",
"欧文",
"马克思",
"基斯特",
"霍华德",
"凯瑟琳",
"安德鲁",
"休谟",
"萨缪尔",
"乔治娅",
"莎拉",
"亚当",
"飞鸟",
"白雪",
"冰儿",
"飞燕",
"风筝",
"紫薇",
"翠翠",
"梦儿",
"小蝶",
"梦幻",
"梦香",
"梦露",
"风铃",
"晨光",
"青莲",
"荷花",
"柳叶",
"雪儿",
"梦想",
"晴天",
"花落",
"蛋糕",
"小妮",
"水晶",
"晴空",
"天籁",
"星星",
"香蕉",
"小兔",
"蜜蜂",
"小猪",
"柚子",
"月亮",
"青草",
"香橙",
"葡萄",
"小虎",
"海豚",
"雷霆",
"云彩",
"小龙",
"小鸟",
"火烈鸟",
"雪花",
"红梅",
"风雨",
"彩虹",
"紫罗兰",
"蓝天",
"太阳",
"草莓",
"红豆",
"红枫",
"银杏",
"铃铛",
"小蚂蚁",
"小绵羊",
"蝴蝶",
"蜻蜓",
"飞龙",
"狐狸",
"猫咪",
"熊猫",
"小熊",
"大象",
"猴子",
"熊孩子",
"魔法",
"神仙",
"雷电",
"火焰",
"冰霜",
"草原",
"山川",
"沙漠",
"海洋",
"天空",
"舞蹈",
"唱歌",
"钢琴",
"小提琴",
"电吉他",
"萨克斯",
"二胡",
"笛子",
"鼓手",
"魔术师",
"小鹿",
"演员",
"导演",
"歌手",
"画家",
"雕刻家",
"瑞雪"
],
"adj": [
"美丽的",
"幸福的",
"快乐的",
"自由的",
"坚强的",
"勇敢的",
"温暖的",
"清新的",
"活力的",
"活泼的",
"青春的",
"智慧的",
"聪明的",
"热情的",
"真诚的",
"诚实的",
"安静的",
"优雅的",
"舒适的",
"轻松的",
"愉悦的",
"满足的",
"安心的",
"放松的",
"有趣的",
"充实的",
"丰富的",
"平静的",
"融洽的",
"美好的",
"纯真的",
"温馨的",
"亲切的",
"体贴的",
"善良的",
"慷慨的",
"宽容的",
"灵活的",
"灵敏的",
"灵感的",
"机智的",
"洞察的",
"求知的",
"独立的",
"坦率的",
"无畏的",
"勤奋的",
"拼搏的",
"奋斗的",
"努力的",
"好学的",
"有爱的",
"心善的",
"谦虚的",
"低调的",
"好客的",
"热心的",
"敬业的",
"专注的",
"睿智的",
"天才的",
"创新的",
"匠心的",
"有趣的",
"幽默的",
"可爱的",
"动人的",
"高尚的",
"现代的",
"前卫的",
"时尚的",
"独特的",
"初心的",
"好看的",
"优美的",
"精致的",
"细腻的",
"优秀的",
"卓越的",
"杰出的",
"无敌的",
"顶尖的",
"强大的",
"不败的",
"无限的",
"神奇的",
"无比的",
"神圣的",
"神秘的",
"神速的",
"惊人的",
"惊喜的",
"惊艳的",
"惊奇的"
]
} }
...@@ -18,6 +18,15 @@ ...@@ -18,6 +18,15 @@
.em { .em {
color: #1786F7; color: #1786F7;
} }
.select {
background: #F0F2F9;
border-radius: 24px;
font-size: 28px;
font-weight: 500;
color: rgba(70,81,100,0.5);
line-height: 40px;
padding: 2px 12px;
}
.option { .option {
padding: 64px 32px 0 32px; padding: 64px 32px 0 32px;
......
...@@ -35,7 +35,7 @@ const Scene5 = (props: Scene5Props) => { ...@@ -35,7 +35,7 @@ const Scene5 = (props: Scene5Props) => {
<View className={classNames(cs.sprite, cs.step_static)} style={{ paddingTop: `${spriteTop}px` }}> <View className={classNames(cs.sprite, cs.step_static)} style={{ paddingTop: `${spriteTop}px` }}>
<Image src="https://cdn.jkwljy.com/pk-math/2G8dDyjuzbMbZ94UhwCpn7zUpw7V/300x300" className={cs.cat} /> <Image src="https://cdn.jkwljy.com/pk-math/2G8dDyjuzbMbZ94UhwCpn7zUpw7V/300x300" className={cs.cat} />
<View className={styles.modal_4} style={{ marginTop: `${spriteTop}px` }}> <View className={styles.modal_4} style={{ marginTop: `${spriteTop}px` }}>
<Text>请问同学有哪些<Text className={styles.em}>计算问题</Text>需要提高呢?</Text> <Text>请问同学有哪些<Text className={styles.em}>计算问题</Text>需要提高呢?<Text className={styles.select}>多选</Text></Text>
</View> </View>
{isSubmit && ( {isSubmit && (
<View> <View>
......
...@@ -23,6 +23,7 @@ const Scene6 = (props: Scene6Props) => { ...@@ -23,6 +23,7 @@ const Scene6 = (props: Scene6Props) => {
const { spriteTop, onNext } = props const { spriteTop, onNext } = props
const [name, setName] = useState('') const [name, setName] = useState('')
const dataRef = useRef<NickNameWord>({ noun: [], adj: [] }) const dataRef = useRef<NickNameWord>({ noun: [], adj: [] })
const timerRef = useRef<NodeJS.Timer | null>(null)
const [isGenerating, genActions] = useBoolean(false) const [isGenerating, genActions] = useBoolean(false)
const genName = useCallback(() => { const genName = useCallback(() => {
...@@ -34,15 +35,24 @@ const Scene6 = (props: Scene6Props) => { ...@@ -34,15 +35,24 @@ const Scene6 = (props: Scene6Props) => {
const updateNickNameAndPhone = useStoreActions(actions => actions.userModel.updateNickNameAndPhone) const updateNickNameAndPhone = useStoreActions(actions => actions.userModel.updateNickNameAndPhone)
const handleGetPhone = useCallback<CommonEventFunction<ButtonProps.onGetPhoneNumberEventDetail>>((e) => { const handleGetPhone = useCallback<CommonEventFunction<ButtonProps.onGetPhoneNumberEventDetail>>((e) => {
if (!e.detail.code) {
console.log(e.detail.errMsg)
return
}
updateNickNameAndPhone({ code: e.detail.code!, name }) updateNickNameAndPhone({ code: e.detail.code!, name })
.then(() => onNext()) .then(() => onNext())
}, [updateNickNameAndPhone, onNext, name]) }, [updateNickNameAndPhone, onNext, name])
const handleGen = useCallback(async () => { const handleGen = useCallback(() => {
genActions.setTrue() genActions.setTrue()
genName() genName()
await new Promise(resolve => setTimeout(resolve, 1000)) if (timerRef.current) {
clearTimeout(timerRef.current)
}
timerRef.current = setTimeout(() => {
genActions.setFalse() genActions.setFalse()
timerRef.current = null
}, 1000)
}, [genName, genActions]) }, [genName, genActions])
useEffect(() => { useEffect(() => {
......
...@@ -31,6 +31,9 @@ const userModel: UserModel = { ...@@ -31,6 +31,9 @@ const userModel: UserModel = {
updateNickNameAndPhone: thunk(async (actions, payload, helpers) => { updateNickNameAndPhone: thunk(async (actions, payload, helpers) => {
try { try {
if (!payload.code) {
throw new Error('')
}
await Promise.all([ await Promise.all([
updateUserPhone(payload.code), updateUserPhone(payload.code),
updateUserInfo(payload.name), updateUserInfo(payload.name),
...@@ -42,8 +45,15 @@ const userModel: UserModel = { ...@@ -42,8 +45,15 @@ const userModel: UserModel = {
userInfo: current userInfo: current
}) })
} catch (err) { } catch (err) {
if (err.message) {
showModal({
title: '提示',
content: err.message,
showCancel: false
})
console.log(err) console.log(err)
} }
}
}), }),
getSetting: thunk(async (actions) => { getSetting: thunk(async (actions) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment