Commit 52995e22 by sunerhu

认证--上传个人信息接口对接

parent d6a098d5
...@@ -249,8 +249,12 @@ export default { ...@@ -249,8 +249,12 @@ export default {
uploadFile(params){ uploadFile(params){
return request(`${cffpURL}/api/file/upload`, "POST", params) return request(`${cffpURL}/api/file/upload`, "POST", params)
}, },
// 上传计划书 // 认证--查询个人信息
querySignUpInfo(params){
return request(`${cffpURL}/user/querySignUpInfo`, "POST", params)
},
// 认证--上传就个人信息
uploadSignUpUserInfo(params){ uploadSignUpUserInfo(params){
return request(`${cffpURL}/api/cffp/user/uploadSignUpUserInfo`, "POST", params) return request(`${cffpURL}/user/uploadSignUpUserInfo`, "POST", params)
}, },
} }
...@@ -88,12 +88,14 @@ ...@@ -88,12 +88,14 @@
return { return {
certificateInfo:{}, certificateInfo:{},
userId:'1', userId:'1',
status:"" status:"",
userSignupId:""
}; };
}, },
onLoad(options) { onLoad(options) {
this.status = options.status this.status = options.status
this.queryCertificateInfo(options.certificateId,options.userSignupId) this.userSignupId = options.userSignupId
this.queryCertificateInfo(options.certificateId,this.userSignupId)
}, },
methods:{ methods:{
queryCertificateInfo(certificateId,userSignupId){ queryCertificateInfo(certificateId,userSignupId){
...@@ -109,7 +111,6 @@ ...@@ -109,7 +111,6 @@
}) })
}, },
getDetail(){ getDetail(){
console.log(this.status, 788584)
if(this.status != 1 && this.status != 3 &&this.status !== null){ if(this.status != 1 && this.status != 3 &&this.status !== null){
this.registerNow() this.registerNow()
}else { }else {
...@@ -118,7 +119,7 @@ ...@@ -118,7 +119,7 @@
}, },
uploadinfo(){ uploadinfo(){
uni.navigateTo({ uni.navigateTo({
url:`/pages/certifyDetail/uploadinformation` url:`/pages/certifyDetail/uploadinformation?userSignupId=${this.userSignupId}`
}) })
}, },
// 去立即报名页面 // 去立即报名页面
......
...@@ -19,12 +19,13 @@ ...@@ -19,12 +19,13 @@
<text>证件类型</text> <text>证件类型</text>
<!-- <input v-model="openForm.userIdType" class="user-input" maxlength="10" type="text" <!-- <input v-model="openForm.userIdType" class="user-input" maxlength="10" type="text"
placeholder="请输入证件类型" /> --> placeholder="请输入证件类型" /> -->
<!-- <picker mode="" :range="" @change=""> <!-- <picker mode="" :range="" @change="">
<view>{{erplizeList[index]}}</view> <view>{{erplizeList[index]}}</view>
</picker> --> </picker> -->
<picker v-if="erplizeList " @change="bindPickerChange" :value="index" :range="erplizeList" range-key="name"> <picker v-if="erplizeList " @change="bindPickerChange($event,erplizeList)" :value="index"
<view style="background-color: white;">{{ erplizeList[index].name }}</view> :range="erplizeList" range-key="name">
</picker> <view style="background-color: white;">{{ erplizeList[index].name }}</view>
</picker>
</view> </view>
<view class="contentItem"> <view class="contentItem">
<text>证件号</text> <text>证件号</text>
...@@ -33,11 +34,11 @@ ...@@ -33,11 +34,11 @@
<view class="" style="margin-top: 20rpx;"> <view class="" style="margin-top: 20rpx;">
<text>上传计划书</text> <text>上传计划书</text>
</view> </view>
<view class="" style="display: flex;margin-top: 20rpx;" v-if="openForm.name"> <view class="" style="display: flex;margin-top: 20rpx;" v-if="openForm.fileName">
<view class="" style="width: 20px;height: 30px;"> <view class="" style="width: 20px;height: 30px;">
<image class="imagegh" src="../../static/myteam/Pdf.png" mode=""></image> <image class="imagegh" src="../../static/myteam/Pdf.png" mode=""></image>
</view> </view>
<text style="margin-left: 10rpx;">{{openForm.name}}</text> <text style="margin-left: 10rpx;">{{openForm.fileName}}</text>
</view> </view>
<view class="uploadpdf" @click="uploadFile()"> <view class="uploadpdf" @click="uploadFile()">
<view class="uploadimg"> <view class="uploadimg">
...@@ -74,33 +75,63 @@ ...@@ -74,33 +75,63 @@
targetSeq: "0" targetSeq: "0"
}, },
openForm: { openForm: {
userTel:'183****9247' signupId: '',
userTel: '183****9247',
userIdType: '1'
}, },
index: 0, index: 0,
loading: false, loading: false,
fileList: [], fileList: [],
fileForm: {}, fileForm: {},
erplizeList:null erplizeList: null,
} }
}, },
onLoad(option) {
this.openForm.signupId = option.userSignupId
this.getquerySignUpInfo()
},
onShow() { onShow() {
this.geterpInitialize() this.geterpInitialize()
}, },
methods: { methods: {
async getquerySignUpInfo() {
let UserSignUpInfoQueryRequestVO = {
userSignUpId:this.openForm.signupId
}
let res = await api.querySignUpInfo(UserSignUpInfoQueryRequestVO)
this.openForm = res.data
this.openForm.signupId = res.data.id
},
// 获取证件类型 // 获取证件类型
async geterpInitialize(){ async geterpInitialize() {
let res = await api.erpInitialize() let res = await api.erpInitialize()
this.erplizeList = res.data.idTypes this.erplizeList = res.data.idTypes
console.log(this.erplizeList, 444) console.log(this.erplizeList, 444)
}, },
bindPickerChange(e){ bindPickerChange(e, storage) {
this.index = e.detail.value; this.openForm.userIdType = storage[e.detail.value].id
this.index = e.detail.value;
}, },
onsubmit() { onsubmit() {
this.loading = true this.loading = true
api.uploadSignUpUserInfo(this.openForm).then(res => { let requestVo = this.openForm
console.log(res, 555458) // header:{
// 'content-type': 'application/json',
// },
api.uploadSignUpUserInfo(requestVo).then(res => {
if(res['success']){
//
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
});
setTimeout(()=>{
uni.navigateBack(1)
},500)
this.getquerySignUpInfo()
}
this.loading = false this.loading = false
}) })
}, },
...@@ -115,8 +146,8 @@ ...@@ -115,8 +146,8 @@
// name: res.name, // name: res.name,
// filePath: res.data.filePath // filePath: res.data.filePath
// } // }
this.openForm.name = res.name this.openForm.fileName = res.name
this.openForm.filePath = res.data.filePath this.openForm.planBookPdfUrl = res.data.filePath
}) })
}, },
} }
...@@ -127,14 +158,17 @@ ...@@ -127,14 +158,17 @@
.content { .content {
width: 100vw; width: 100vw;
} }
.signfile{
display: flex;
} .signfile {
display: flex;
}
.imagegh { .imagegh {
width: 30rpx; width: 30rpx;
height: 30rpx; height: 30rpx;
} }
.user-input { .user-input {
text-align: right; text-align: right;
} }
......
...@@ -3,74 +3,116 @@ ...@@ -3,74 +3,116 @@
<view class="input-row"> <view class="input-row">
<text>183****9247</text> <text>183****9247</text>
</view> </view>
<view class="input-row" > <view class="input-row">
<view style="width: 65%;"><input maxlength="11" type="text" v-model="code" placeholder="请输入验证码" /></view> <input maxlength="11" type="text" v-model="form.password" placeholder="请输入新密码" />
<view style="width: 30%;"><text v-if="codetimecode == false" style="font-size: 26upx;color: #3971E2;" @click="getCode()">获取验证码</text> </view>
<text v-else style="font-size: 26upx;margin-right: 20upx;color: #3971E2;" >{{countdown}}秒后重新获取</text></view> <view class="input-row">
<view style="width: 65%;"><input maxlength="11" type="text" v-model="form.code" placeholder="请输入验证码" /></view>
<view style="width: 30%;"><text v-if="codetimecode == false" style="font-size: 26upx;color: #3971E2;"
@click="sendMessage()">获取验证码</text>
<text v-else style="font-size: 26upx;margin-right: 20upx;color: #3971E2;">{{countdown}}秒后重新获取</text>
</view>
</view> </view>
<view class="forgetpsd"><button class="primary log-btn" @click="registerck">修改密码</button></view> <view class="forgetpsd"><button class="primary log-btn" @click="resetPassword()">修改密码</button></view>
</view> </view>
</template> </template>
<script> <script>
import common from '../../../common/common';
import api from "@/api/api";
export default { export default {
data() { data() {
return { return {
account:'', form:{
password:'', mobile: "18335619247",
newpassword:'', code:'',
code:'', password:'',
},
code: '',
countdown: '60', countdown: '60',
timer: null, timer: null,
codetimecode: false codetimecode: false
} }
}, },
methods:{ methods: {
getCode() { sendMessage() {
const data = { const params = {
phone: this.account, mobileNo: this.form.mobile,
codetype: '1' type: "1"
}; }
api.code( data).then(res => { if (common.mobileNoValid(this.form.mobile)) {
console.log(res, 'asok') api.verificationCode(params).then((res) => {
if(res.code == 0){ console.log(res, 7788888)
this.sendCode() if (res['success']) {
this.codetimecode = true this.sendCode()
this.codetimecode = true
uni.showToast({
title:'发送成功',
icon:'none'
})
}
})
} else {
common.errorDialog(2, '手机号校验错误')
}
},
resetPassword(){
const params = {
...this.form
}
console.log(params)
api.resetPassword(params).then((res)=>{
if(res['success']){
uni.showToast({ uni.showToast({
title:'发送成功', title: '密码重置成功,请重新登录',
icon:'none' duration: 5000,
icon: 'none'
}) })
}else { uni.removeStorageSync('isLogin')
uni.reLaunch({
url:'/components/login/login'
})
//重置密码后需要密码登录
this.form = {
mobile:null,
code:null,
password:null,
}
}else{
uni.showToast({ uni.showToast({
title: res.msg, title: res['message'],
icon:'none' duration: 2000,
icon: 'none'
}) })
} }
}) })
}, },
sendCode(){ sendCode() {
this.loading(); //启动定时器 this.loading(); //启动定时器
this.timer = setInterval(() =>{ this.timer = setInterval(() => {
//创建定时器 //创建定时器
if(this.countdown === 1){ if (this.countdown === 1) {
this.clearTimer(); //关闭定时器 this.clearTimer(); //关闭定时器
this.skipStep(); this.skipStep();
}else{ } else {
this.loading(); this.loading();
} }
},1000); }, 1000);
},
loading() {
//启动定时器
this.countdown--; //定时器减1
},
clearTimer() {
//清除定时器
clearInterval(this.timer);
this.timer = null;
this.codetimecode = false
}, },
loading(){
//启动定时器
this.countdown--; //定时器减1
},
clearTimer(){
//清除定时器
clearInterval(this.timer);
this.timer = null;
this.codetimecode = false
},
} }
...@@ -97,7 +139,8 @@ ...@@ -97,7 +139,8 @@
background: #FFFFFF; background: #FFFFFF;
border-bottom: 1upx solid #C8C7CC; border-bottom: 1upx solid #C8C7CC;
} }
.input-row-password{
.input-row-password {
height: 100upx; height: 100upx;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
...@@ -106,15 +149,16 @@ ...@@ -106,15 +149,16 @@
padding-left: 20upx; padding-left: 20upx;
background: #FFFFFF; background: #FFFFFF;
} }
.forgetpsd{
.forgetpsd {
margin: 40upx 20upx; margin: 40upx 20upx;
} }
.log-btn { .log-btn {
border-radius: 10upx; border-radius: 10upx;
font-size: 34upx; font-size: 34upx;
color: #FFFFFF; color: #FFFFFF;
background: #20269B; background: #20269B;
box-shadow: 0px 16upx 32upx 0px rgba(2, 168, 244, 0.24); box-shadow: 0px 16upx 32upx 0px rgba(2, 168, 244, 0.24);
} }
</style> </style>
<template> <template>
<view> <view style="display: flex;flex-direction: column;">
<menu-list :menuList="minorMenuLists"></menu-list> <view class="">
<menu-list :menuList="minorMenuLists"></menu-list>
</view>
<view class="footer">
<view class="foter-btn">
<button class="btn" @click="outLing()">退出登录</button>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
import MenuList from "./menulist.vue" import MenuList from "./menulist.vue"
export default { export default {
components:{ components:{
MenuList MenuList
}, },
data() { data() {
return { return {
minorMenuLists: [{ minorMenuLists: [
{
title: '手机号绑定', title: '手机号绑定',
icon: '', icon: '',
link: '/pages/personalCenter/accountoperation/phonebinding', link: null,
contentType:"183****9247",
isOpen: true, isOpen: true,
isShow: true, isShow: true,
isType: false, isType: false,
...@@ -38,9 +50,44 @@ ...@@ -38,9 +50,44 @@
} }
] ]
} }
},
methods:{
outLing(){
uni.showModal({
title: '退出登录',
content: '确定要退出登录吗?',
showCancel: true,
success: function(res) {
if (res.confirm) {
uni.removeStorageSync('isLogin')
uni.reLaunch({
url:'/components/login/login'
})
uni.showToast({
title: '操作成功',
icon: 'none'
});
} else {
console.log('已取消')
}
}
});
},
} }
} }
</script> </script>
<style> <style scoped>
.footer{
width: 100vw;
position: fixed;
bottom: 40rpx;
}
.foter-btn{
padding: 0 20rpx;
}
.btn{
background: #20269B;
border-radius: 40rpx;
}
</style> </style>
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