|
@@ -6,12 +6,15 @@ import NavBarNormal from "@/components/nav-bar-normal/index";
|
|
import WemetaInput from "@/components/wemeta-input/index";
|
|
import WemetaInput from "@/components/wemeta-input/index";
|
|
import WemetaTextarea from "@/components/wemeta-textarea";
|
|
import WemetaTextarea from "@/components/wemeta-textarea";
|
|
import FormItem from '@/components/form/FormItem'
|
|
import FormItem from '@/components/form/FormItem'
|
|
-import Taro, { useUnload } from "@tarojs/taro";
|
|
|
|
-import { useCharacterStore } from "@/store/characterStore";
|
|
|
|
-import { useComponentStore } from "@/store/componentStore";
|
|
|
|
|
|
+
|
|
import PickerSingleColumn from "@/components/Picker/PickerSingleColumn";
|
|
import PickerSingleColumn from "@/components/Picker/PickerSingleColumn";
|
|
import IconArrowDownRounded from '@/components/icon/IconArrowDownRounded';
|
|
import IconArrowDownRounded from '@/components/icon/IconArrowDownRounded';
|
|
|
|
|
|
|
|
+import { saveMyContact } from '@/service/user'
|
|
|
|
+import BottomBar from "@/components/BottomBar";
|
|
|
|
+import { isSuccess } from "@/utils";
|
|
|
|
+import Taro from "@tarojs/taro";
|
|
|
|
+
|
|
export default function Index() {
|
|
export default function Index() {
|
|
|
|
|
|
|
|
|
|
@@ -28,9 +31,11 @@ export default function Index() {
|
|
}
|
|
}
|
|
|
|
|
|
const [value, setValue] = useState({
|
|
const [value, setValue] = useState({
|
|
- job: "",
|
|
|
|
- department: "",
|
|
|
|
- company: "",
|
|
|
|
|
|
+ entName: "",
|
|
|
|
+ mobileOrWechat: "",
|
|
|
|
+ name: "",
|
|
|
|
+ position: selected,
|
|
|
|
+ reqDetail: ""
|
|
});
|
|
});
|
|
|
|
|
|
const onChange = (key: string, v: string) => {
|
|
const onChange = (key: string, v: string) => {
|
|
@@ -40,30 +45,16 @@ export default function Index() {
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
|
|
- const handleSave = async () => {
|
|
|
|
- if (
|
|
|
|
- !value.job?.length &&
|
|
|
|
- !value.department?.length &&
|
|
|
|
- !value.company?.length
|
|
|
|
- ) {
|
|
|
|
- return;
|
|
|
|
|
|
+ const handleSubmit = async () => {
|
|
|
|
+ const result = await saveMyContact(value);
|
|
|
|
+ if(isSuccess(result.status)){
|
|
|
|
+ Taro.showToast({
|
|
|
|
+ title: '提交成功'
|
|
|
|
+ })
|
|
|
|
+ setTimeout(()=> {
|
|
|
|
+ Taro.navigateBack()
|
|
|
|
+ }, 2000)
|
|
}
|
|
}
|
|
-
|
|
|
|
- // const c = {
|
|
|
|
- // data: {
|
|
|
|
- // job: value.job,
|
|
|
|
- // department: value.department,
|
|
|
|
- // company: value.company,
|
|
|
|
- // },
|
|
|
|
- // enabled: currentComponent?.enabled ?? true,
|
|
|
|
- // id: currentComponent?.id,
|
|
|
|
- // name: currentComponent?.name ?? "商务名片",
|
|
|
|
- // characterProfileId:
|
|
|
|
- // currentComponent?.characterProfileId ?? character?.profileId,
|
|
|
|
- // type: "businessCard",
|
|
|
|
- // };
|
|
|
|
-
|
|
|
|
- // await saveComponent(c);
|
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
@@ -76,22 +67,22 @@ export default function Index() {
|
|
<View className="flex flex-col items-center w-full gap-16 p-16 pb-140">
|
|
<View className="flex flex-col items-center w-full gap-16 p-16 pb-140">
|
|
<FormItem labelText="您的姓名" required>
|
|
<FormItem labelText="您的姓名" required>
|
|
<WemetaInput
|
|
<WemetaInput
|
|
- value={value.job}
|
|
|
|
- onInput={(value: string) => onChange("job", value)}
|
|
|
|
|
|
+ value={value.name}
|
|
|
|
+ onInput={(value: string) => onChange("name", value)}
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
/>
|
|
/>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem labelText="联系方式" required>
|
|
<FormItem labelText="联系方式" required>
|
|
<WemetaInput
|
|
<WemetaInput
|
|
- value={value.job}
|
|
|
|
- onInput={(value: string) => onChange("job", value)}
|
|
|
|
|
|
+ value={value.mobileOrWechat}
|
|
|
|
+ onInput={(value: string) => onChange("mobileOrWechat", value)}
|
|
placeholder="请输入您的手机号/微信号"
|
|
placeholder="请输入您的手机号/微信号"
|
|
/>
|
|
/>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem labelText="公司信息" required>
|
|
<FormItem labelText="公司信息" required>
|
|
<WemetaInput
|
|
<WemetaInput
|
|
- value={value.job}
|
|
|
|
- onInput={(value: string) => onChange("job", value)}
|
|
|
|
|
|
+ value={value.entName}
|
|
|
|
+ onInput={(value: string) => onChange("entName", value)}
|
|
placeholder="请输入公司名称"
|
|
placeholder="请输入公司名称"
|
|
/>
|
|
/>
|
|
</FormItem>
|
|
</FormItem>
|
|
@@ -107,18 +98,21 @@ export default function Index() {
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem labelText="需求详情">
|
|
<FormItem labelText="需求详情">
|
|
<WemetaTextarea
|
|
<WemetaTextarea
|
|
- value={value.job}
|
|
|
|
- onInput={(value: string) => onChange("job", value)}
|
|
|
|
|
|
+ value={value.reqDetail}
|
|
|
|
+ onInput={(value: string) => onChange("reqDetail", value)}
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
/>
|
|
/>
|
|
</FormItem>
|
|
</FormItem>
|
|
|
|
|
|
</View>
|
|
</View>
|
|
- <View className="bottom-bar">
|
|
|
|
- <View className="pt-12 px-20">
|
|
|
|
- <View className={`button-rounded button-primary`}>保存</View>
|
|
|
|
|
|
+ <BottomBar>
|
|
|
|
+ <View
|
|
|
|
+ className="button-rounded button-primary w-full"
|
|
|
|
+ onClick={handleSubmit}
|
|
|
|
+ >
|
|
|
|
+ 提 交
|
|
</View>
|
|
</View>
|
|
- </View>
|
|
|
|
|
|
+ </BottomBar>
|
|
</PageCustom>
|
|
</PageCustom>
|
|
);
|
|
);
|
|
}
|
|
}
|