Commit a76af8e1 authored by 石建新(贵阳日报)'s avatar 石建新(贵阳日报)
parents b2c5e4fc 75c0201a
...@@ -4,6 +4,12 @@ ...@@ -4,6 +4,12 @@
手机号 手机号
<input type="text" v-model="phone" /> <input type="text" v-model="phone" />
</p> </p>
<button @click="getSmsCodeFn">获取验证码</button>
<p>
验证码
<input type="text" v-model="code" />
</p>
<button @tap="login">登录</button> <button @tap="login">登录</button>
</div> </div>
</template> </template>
...@@ -11,14 +17,17 @@ ...@@ -11,14 +17,17 @@
<script setup> <script setup>
import { testLogin, getSmsCode, getLoginUserApi } from "@/api/user"; import { testLogin, getSmsCode, getLoginUserApi } from "@/api/user";
import { setToken, removeToken } from "@/utils/token"; import { setToken, removeToken } from "@/utils/token";
getLoginUserApi;
const phone = ref(""); const phone = ref("");
const code = ref("");
const getSmsCodeFn = () => {
const a = getSmsCode({ username: phone.value });
};
const login = async () => { const login = async () => {
removeToken(); removeToken();
const a = await getSmsCode({ username: phone.value });
const loginRes = await testLogin({ const loginRes = await testLogin({
username: phone.value, username: phone.value,
code: "000000" code: code.value,
userType: "business"
}); });
if (loginRes.code === 200) { if (loginRes.code === 200) {
setToken(loginRes.data); setToken(loginRes.data);
......
...@@ -20,7 +20,10 @@ ...@@ -20,7 +20,10 @@
} }
.content { .content {
flex-grow: 1; flex-grow: 1;
height: 200rpx;
padding: 32rpx; padding: 32rpx;
padding-bottom: 100rpx;
overflow-y: auto;
.form-item { .form-item {
padding-top: 0; padding-top: 0;
padding-bottom: 16rpx; padding-bottom: 16rpx;
......
...@@ -344,7 +344,13 @@ const next = () => { ...@@ -344,7 +344,13 @@ const next = () => {
if (certificateInputValue.value && certificateSelectValue.value) if (certificateInputValue.value && certificateSelectValue.value)
pinias.formData.professionalCertificates = certificateInputValue.value + "-" + certificateSelectValue.value; pinias.formData.professionalCertificates = certificateInputValue.value + "-" + certificateSelectValue.value;
console.log(pinias.formData); console.log(pinias.formData);
if (validateForm(pinias.formData, ["identityRequirement", "educationRequirement"], "post")) { if (
validateForm(
pinias.formData,
["identityRequirement", "educationRequirement", "maxAgeRequirement", "majorRequirement"],
"post"
)
) {
/* uni.redirectTo({ /* uni.redirectTo({
url: "/pages/recommend/releasePostion/step5" url: "/pages/recommend/releasePostion/step5"
}); */ }); */
......
...@@ -95,6 +95,7 @@ export const validateForm = (formData, requiredFields, type) => { ...@@ -95,6 +95,7 @@ export const validateForm = (formData, requiredFields, type) => {
jobType: "职位类型", jobType: "职位类型",
position: "职位", position: "职位",
name: "名字", name: "名字",
majorRequirement: "专业",
positionalTitle: "专业技术职称", positionalTitle: "专业技术职称",
professionalCertificates: "职业等级证书", professionalCertificates: "职业等级证书",
specialCertificates: "特种作业证书", specialCertificates: "特种作业证书",
......
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