Commit 0bba6b9b authored by raca's avatar raca

feat: 更新引导页 积分兑换 显示数量

parent 366c0f2d
......@@ -67,6 +67,8 @@ export type SettintType = {
joinGroupPoint?: number;
personalPkLosePoint?: number;
personalPkWinPoint?: number;
newUserPoint?: number;
createNamePoint?: number;
}
export function getSetting () {
......
import { View, RootPortal, Image, Text } from '@tarojs/components'
import { useEffect } from 'react'
import { useDidShow } from '@tarojs/taro'
import tutorialAssets from '@/assets/oss/assets-tutorial'
import classNames from 'classnames'
import { useStoreState, useStoreActions } from '@/store/hooks'
......@@ -13,6 +14,12 @@ const ModalAuthPhoneBefore = (props: ModalAuthPhoneBeforeProps) => {
const { onConfirm } = props
const userInfo = useStoreState(state => state.userModel.userInfo)
const nextStoreGuide = useStoreActions(actions => actions.guideModel.nextStoreGuide)
const getSetting = useStoreActions(actions => actions.userModel.getSetting)
const setting = useStoreState((state) => state.userModel.setting)
useDidShow(() => {
getSetting()
})
useEffect(() => {
if (userInfo.authPhone === 'Y') {
......@@ -35,7 +42,7 @@ const ModalAuthPhoneBefore = (props: ModalAuthPhoneBeforeProps) => {
为了让阿喵老师能给你发放礼品,需要你进行授权哦。
<View>
<Text className={styles.em}>授权成功后,</Text>还可以
<Text className={styles.em}>获得20水晶</Text>奖励哦!
<Text className={styles.em}>获得{setting.newUserPoint}水晶</Text>奖励哦!
</View>
</View>
<View className={styles.continue}>
......
import { View, RootPortal, Image, Button, CommonEventFunction, ButtonProps } from '@tarojs/components'
import { showToast } from '@tarojs/taro'
import { showToast, useDidShow } from '@tarojs/taro'
import { useBoolean } from '@/hooks'
import { receivePoint } from '@/api'
import { useStoreState, useStoreActions } from '@/store/hooks'
......@@ -19,6 +19,8 @@ const ModalReceivePoint = (props: ReceivePointProps) => {
const completeStoreGuide = useStoreActions(actions => actions.guideModel.completeStoreGuide)
const updateNickNameAndPhone = useStoreActions(actions => actions.userModel.updateNickNameAndPhone)
const [fail, failActions] = useBoolean(false)
const getSetting = useStoreActions((state) => state.userModel.getSetting)
const setting = useStoreState((state) => state.userModel.setting)
const updatePhoneAndReceive = async (code: string) => {
if (loading) return
......@@ -66,6 +68,10 @@ const ModalReceivePoint = (props: ReceivePointProps) => {
completeStoreGuide()
}
useDidShow(() => {
getSetting()
})
const renderModal = () => {
if (fail) {
return (
......@@ -98,7 +104,7 @@ const ModalReceivePoint = (props: ReceivePointProps) => {
return (
<View className={styles.modal} catchMove>
<Image src={giftAssets['point-receive.png'].u} className={styles.icon}></Image>
<View className={styles.count}>水晶 +20</View>
<View className={styles.count}>水晶 +{setting.newUserPoint}</View>
<View className={styles.tips}>阿喵老师的奖励,继续加油哦~</View>
{useInfo.authPhone === 'Y'
? (
......
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