Commit 1573166a authored by 李明环(东信)'s avatar 李明环(东信)
parents 373a242f b7ccf839
import instance from "@/utils/request";
// 测试登录
export const testLogin = params => instance.post("/user/appUser/smsLogin", params);
export const getSmsCode = params => instance.postForm("/company/user/getSmsCode", params);
export const testLogin = params => instance.post("/user/smsLogin", params);
export const getSmsCode = params => instance.postForm("/user/getSmsCode", params);
// 新华登录
export const xinhuaMpLogin = params => instance.post("/user/appUser/xinhua/mpLogin", params);
// B端-获取登录用户
export const getLoginUserApi = params => instance.post("/company/user/getLoginUser", params);
export const getLoginUserApi = params => instance.post("/b/user/getLoginUser", params);
// 保存用户信息
export const saveBasicInfoApi = params => instance.post("/company/user/saveBasicInfo", params);
......
......@@ -35,7 +35,7 @@ const login = () => {
duration: 2000
});
}
setToken(data.data.token);
setToken(data.data);
getLoginUserApi().then(el => {
if (el.data && el.data.status !== 0) {
uni.switchTab({
......
......@@ -20,11 +20,11 @@ const login = async () => {
code: "000000"
});
if (loginRes.code === 200) {
setToken(loginRes.data.token);
setToken(loginRes.data);
const userInfoRes = await getLoginUserApi();
// 已经判断是否注册过企业
if (userInfoRes.data.status !== 0) {
if (userInfoRes.data) {
uni.switchTab({
url: "/pages/user/index"
});
......@@ -33,7 +33,6 @@ const login = async () => {
url: "/pages/user/businessLicense/fillIn"
});
}
console.log(userInfoRes);
} else {
uni.showToast({
title: loginRes.message
......
......@@ -16,9 +16,9 @@
<image src="@/static/image/businessLicense/hi.png"></image>
</view>
<view class="content">
<view class="name" v-if="step === 1">
<view v-if="step === 1">
<view class="t1">个人信息</view>
<div class="content">
<div class="content1">
<div class="item flex-between">
<p class="label">头像</p>
<div class="flex-align-center" @click="chooseImage">
......@@ -33,15 +33,16 @@
</div>
</div>
<div class="item">
<p class="label">姓名</p>
<p class="label">姓名<text class="red">*</text></p>
<input type="text" v-model="params.realName" placeholder="请输入姓名" />
</div>
<div class="item">
<p class="label">职位</p>
<p class="label">职位<text class="red">*</text></p>
<input type="text" v-model="params.position" placeholder="请输入职位" />
</div>
<div class="item">
<p class="label">电话</p>
<p class="label">电话<text class="red">*</text></p>
<input type="number" v-model="params.phone" placeholder="请输入电话" />
</div>
</div>
......@@ -109,12 +110,12 @@ const params = reactive({
onLoad(() => {
console.log(uni);
});
const step = ref(1);
const step = ref(0);
const name = ref("");
const showPopout = ref(false);
const showPopout = ref(true);
onShow(() => {
step.value = 1;
step.value = 0;
// getLoginUserApiFn();
});
function ocrLicenseFn(uri) {
......@@ -191,36 +192,6 @@ const chooseImage = sourceType => {
// padding-top: 54rpx;
background-color: #1f86ff;
.content {
flex: 1;
padding: 0 16px;
.item {
display: flex;
align-items: center;
// justify-content: space-between;
padding: 16px 0;
border-bottom: 1px solid #f3f4f8;
.label {
flex: 0 0 100px;
font-size: 12px;
font-weight: 500;
line-height: 18px;
color: #77818f;
}
input {
font-size: 14px;
font-weight: normal;
line-height: 18px;
color: #1b2026;
}
image {
width: 28px;
height: 28px;
border-radius: 50%;
}
}
}
}
.welcome {
padding: 54rpx 80rpx 0 66rpx;
......@@ -247,6 +218,35 @@ const chooseImage = sourceType => {
background-color: #ffffff;
border-top-left-radius: 80rpx;
border-top-right-radius: 80rpx;
.item {
display: flex;
align-items: center;
// justify-content: space-between;
padding: 16px 0;
border-bottom: 1px solid #f3f4f8;
.label {
flex: 0 0 100px;
font-size: 12px;
font-weight: 500;
line-height: 18px;
color: #77818f;
.red {
color: red;
}
}
input {
font-size: 14px;
font-weight: normal;
line-height: 18px;
color: #1b2026;
}
image {
width: 28px;
height: 28px;
border-radius: 50%;
}
}
.t1 {
font-size: 32rpx;
line-height: 54rpx;
......
......@@ -18,7 +18,7 @@
{{ formData.creditCode }}
</view>
</view>
<view class="item">
<!-- <view class="item">
<view class="label"> 有效期 </view>
<view class="content">
<wd-radio-group v-model="radio" shape="dot" inline>
......@@ -43,7 +43,7 @@
}}
</view>
</wd-calendar>
</view>
</view> -->
</view>
<view class="btn-wrap">
......
import axios from "axios";
import { getToken,removeToken } from "@/utils/token";
// const baseURL = "https://lygsh-api.wjzpgz.com/";
const baseURL = "http://192.168.11.61:8080/";
const baseURL = "http://192.168.11.48:8080/";
// 创建一个 axios 实例
const instance = axios.create({
baseURL, // 设置基础 URL
......
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