提交 31feb6e2 authored 作者: matian's avatar matian

updates

上级 08f3f29a
import httpRequest from '@/utils/axios' import httpRequest from '@/utils/axios'
// 查询名片 // 查询名片
export function getBussinessCard(params: unknown) { export function getBussinessCard(params: {email: string;address: string}) {
return httpRequest.get('/api/psp/v1/welfare/get-card',{params}) return httpRequest.get('/api/psp/v1/welfare/get-card',{params})
} }
// 获取验证码 // 获取验证码
export function getPhoneCode(params: unknown) { export function getPhoneCode(params: {phone:string;}) {
return httpRequest.get('/api/psp/v1/welfare/send-code',{params}) return httpRequest.get('/api/psp/v1/welfare/send-code',{params})
} }
// 查询证书 // 查询证书
export function getCertificate(params: unknown) { export function getCertificate(params: {phone:string;code:string}) {
return httpRequest.get('/api/psp/v1/welfare/get-certificate',{params}) return httpRequest.get('/api/psp/v1/welfare/get-certificate',{params})
} }
// 持证人权益-持证人列表 // 持证人权益-持证人列表
......
...@@ -30,7 +30,7 @@ function getUserInfo() { ...@@ -30,7 +30,7 @@ function getUserInfo() {
} }
// 查询名片 // 查询名片
function handleSubmit() { function handleSubmit() {
const params: unknown = { const params = {
email: FormInfo.email, email: FormInfo.email,
address: FormInfo.address address: FormInfo.address
} }
......
...@@ -14,18 +14,16 @@ const time = ref(60) ...@@ -14,18 +14,16 @@ const time = ref(60)
const isDisposed = ref(false) const isDisposed = ref(false)
const isShowForm = ref(false) const isShowForm = ref(false)
function getCode() { function getCode() {
console.log('00000', FormInfo.phone)
if (FormInfo.phone === '') { if (FormInfo.phone === '') {
Toast('请输入手机号') Toast('请输入手机号')
return return
} }
const params: unknown = { const params = {
phone: FormInfo.phone phone: FormInfo.phone
} }
api.getPhoneCode(params).then(res => { api.getPhoneCode(params).then(res => {
console.log('获取验证码结果', res) console.log('获取验证码结果', res)
console.log('验证码发送成功!')
isDisposed.value = true isDisposed.value = true
handleTimeChange() handleTimeChange()
}) })
...@@ -44,13 +42,12 @@ const handleTimeChange = () => { ...@@ -44,13 +42,12 @@ const handleTimeChange = () => {
} }
// 查询名片 // 查询名片
function handleQuery() { function handleQuery() {
const params: unknown = { const params = {
phone: FormInfo.phone, phone: FormInfo.phone,
code: FormInfo.code code: FormInfo.code
} }
api.getCertificate(params).then(res => { api.getCertificate(params).then(res => {
url.value = res.data.url url.value = res.data.url
console.log(res.data.url, 'res.data.url')
FormInfo.phone = '' FormInfo.phone = ''
FormInfo.code = '' FormInfo.code = ''
isDisposed.value = false isDisposed.value = false
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论