|
@@ -3,11 +3,15 @@ import style from "./index.module.less";
|
|
|
import IconPlusBig from "@/components/icon/icon-plus-big";
|
|
|
import Taro from "@tarojs/taro";
|
|
|
import { uploadAndNavToGenNewAvatar } from "@/utils/avatar";
|
|
|
+import WemetaRadio from '@/components/WemetaRadio'
|
|
|
import { useAgentStore } from "@/store/agentStore";
|
|
|
|
|
|
export default () => {
|
|
|
const {agent} = useAgentStore()
|
|
|
- const handleChange = () => {};
|
|
|
+
|
|
|
+ const handleChange = (checked: boolean)=> {
|
|
|
+
|
|
|
+ }
|
|
|
const handleClick = () => {
|
|
|
if (agent?.avatarUrl) {
|
|
|
return;
|
|
@@ -29,7 +33,15 @@ export default () => {
|
|
|
}
|
|
|
|
|
|
return (
|
|
|
- <Image src={agent.avatarUrl} mode="widthFix" className={style.card} />
|
|
|
+ <View className="relative">
|
|
|
+ <Image src={agent.avatarUrl} mode="widthFix" className={style.card} />
|
|
|
+ <View className={style.changeButton} onClick={()=> {
|
|
|
+ Taro.navigateTo({url: '/pages/agent-avatars/index'})
|
|
|
+ }}>
|
|
|
+ 更换形象
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+
|
|
|
);
|
|
|
};
|
|
|
|
|
@@ -38,12 +50,10 @@ export default () => {
|
|
|
<View className={style.card} onClick={handleClick}>
|
|
|
{renderContent()}
|
|
|
</View>
|
|
|
- <View className="w-full flex-center pt-16" onClick={handleChange}>
|
|
|
- <View className="flex-center w-80 h-28 rounded-20 bg-white text-12 text-gray-85 font-medium leading-20 text-center" onClick={()=> {
|
|
|
- Taro.navigateTo({url: '/pages/agent-avatars/index'})
|
|
|
- }}>
|
|
|
- 更换形象
|
|
|
- </View>
|
|
|
+ <View className="w-full flex-center pt-24 gap-6" onClick={()=> handleChange(!!agent?.enabledChatBg)}>
|
|
|
+ {/* ={agent?.enabledChatBg} */}
|
|
|
+ <WemetaRadio checkbox checked></WemetaRadio>
|
|
|
+ <View className="font-medium text-14 text-black">启用聊天背景</View>
|
|
|
</View>
|
|
|
</View>
|
|
|
);
|