Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
ztx_wx_admin
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
0983d505
authored
2023-10-09 13:08:28 +0800
by
杨炀
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
no message
1 parent
4c11fc3e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
145 additions
and
69 deletions
common/api.js
config.js
pages/personalVip/addVip.vue
common/api.js
View file @
0983d50
...
...
@@ -32,6 +32,16 @@ function carUrl(data, type) {
params
:
data
})
}
// 添加会员信息
function
addPersonToMyDept
(
data
)
{
return
request
({
url
:
'/person/info/addPersonToMyDept'
,
method
:
'post'
,
params
:
data
})
}
// 图片上传
function
uploadImg
(
e
){
const
tempFilePaths
=
e
.
tempFilePaths
;
...
...
@@ -50,7 +60,12 @@ function uploadImg(e){
uni
.
hideLoading
();
});
}
function
getInfo
(
perId
)
{
return
request
({
url
:
'/person/info/'
+
perId
,
method
:
'get'
})
}
function
getOwnMemberInfo
()
{
...
...
@@ -264,7 +279,7 @@ function miniappData(params) {
export
{
getMessage
,
reader
,
regionsList
,
carUrl
,
uploadImg
,
getMessage
,
reader
,
regionsList
,
carUrl
,
uploadImg
,
addPersonToMyDept
,
getInfo
,
getOwnMemberInfo
,
getSiteList
,
...
...
config.js
View file @
0983d50
...
...
@@ -3,8 +3,8 @@
// staging
const
baseUrl_api
=
"http://192.168.1.
11
:8787"
;
const
baseUrl_api
=
"http://192.168.1.
96
:8787"
;
export
default
{
baseUrl_api
}
\ No newline at end of file
};
\ No newline at end of file
...
...
pages/personalVip/addVip.vue
View file @
0983d50
...
...
@@ -17,9 +17,8 @@
</uni-forms-item>
<uni-forms-item
label=
"证件照"
required
name=
"picUrl"
v-show=
"current === 1"
>
<view
class=
"upCard"
>
<uni-file-picker
:class=
"baseFormData.card?'':'op0'"
v-model=
"baseFormData.cardObj"
@
delete=
"delimgFont"
return-type=
"object"
limit=
"1"
@
select=
"upIdCardImgFront"
<uni-file-picker
:class=
"baseFormData.card?'':'op0'"
v-model=
"baseFormData.cardObj"
@
delete=
"delimgFont"
return-type=
"object"
limit=
"1"
@
select=
"upIdCardImgFront"
:image-styles=
"imageStylesZJ"
></uni-file-picker>
<image
v-if=
"!baseFormData.card"
class=
"sfz"
src=
"@/static/login/sfz.png"
>
</image>
...
...
@@ -54,9 +53,8 @@
placeholder=
"请输入详细地址"
/></uni-forms-item>
<uni-forms-item
label=
"头像"
required
name=
"photo"
>
<uni-file-picker
v-model=
"baseFormData.photoObj"
@
delete=
"delPhoto"
return-type=
"object"
limit=
"1"
@
select=
"upPhoto"
:image-styles=
"imageStylesTx"
></uni-file-picker>
<uni-file-picker
v-model=
"baseFormData.photoObj"
@
delete=
"delPhoto"
return-type=
"object"
limit=
"1"
@
select=
"upPhoto"
:image-styles=
"imageStylesTx"
></uni-file-picker>
</uni-forms-item>
...
...
@@ -110,17 +108,18 @@
<
script
setup
>
import
{
onMounted
,
onMounted
,
ref
}
from
'vue'
import
*
as
api
from
'@/common/api.js'
}
from
'vue'
import
*
as
api
from
'@/common/api.js'
const
current
=
ref
(
0
)
const
popup
=
ref
(
null
)
const
agree
=
ref
(
false
)
const
agree
=
ref
(
false
)
const
perId
=
ref
()
const
regionsList
=
ref
([])
const
baseFormData
=
ref
({
sex
:
'0'
,
idcType
:
'0'
sex
:
'0'
,
idcType
:
'0'
})
const
baseFormData2
=
ref
({})
const
items
=
ref
([
'手动录入'
,
'自动录入'
])
...
...
@@ -150,8 +149,8 @@
}])
const
placeholderStyle
=
ref
(
'text-align: right;font-size:30rpx'
)
const
inputstyle
=
ref
({
borderColor
:
'#fff'
,
fontSize
:
'30rpx'
borderColor
:
'#fff'
,
fontSize
:
'30rpx'
})
const
imageStylesTx
=
ref
({
width
:
'210rpx'
,
...
...
@@ -168,51 +167,54 @@
width
:
'500rpx'
,
height
:
'316rpx'
});
onMounted
(()
=>
{
getRegionsList
()
})
function
getRegionsList
()
{
api
.
regionsList
().
then
(
res
=>
{
regionsList
.
value
=
res
.
data
})
}
onMounted
(()
=>
{
getRegionsList
()
})
function
getRegionsList
()
{
api
.
regionsList
().
then
(
res
=>
{
regionsList
.
value
=
res
.
data
})
}
function
onClickItem
(
e
)
{
if
(
current
.
value
!=
e
.
currentIndex
)
{
current
.
value
=
e
.
currentIndex
}
}
function
changeAgree
(
item
)
{
if
(
agree
.
value
){
agree
.
value
=
false
}
else
{
agree
.
value
=
true
}
function
changeAgree
(
item
)
{
if
(
agree
.
value
)
{
agree
.
value
=
false
}
else
{
agree
.
value
=
true
}
// item = !item
}
//身份证识别
function
upIdCardImgFront
(
e
)
{
baseFormData
.
value
.
card
=
e
.
tempFiles
;
console
.
log
(
e
.
tempFiles
[
0
].
file
)
const
formData
=
new
FormData
()
formData
.
append
(
'pic'
,
e
.
tempFiles
[
0
].
file
)
api
.
carUrl
(
formData
,
baseFormData
.
value
.
idcType
).
then
(
res
=>
{
baseFormData
.
value
.
idcUrl
=
res
.
data
.
url
baseFormData
.
value
.
sex
=
res
.
data
.
sex
baseFormData
.
value
.
birth
=
res
.
data
.
birth
baseFormData
.
value
.
idcCode
=
res
.
data
.
code
baseFormDatabaseFormData
.
value
.
cityId
=
res
.
data
.
cityId
baseFormData
.
value
.
address
=
res
.
data
.
address
baseFormData
.
value
.
photo
=
res
.
data
.
photo
baseFormData
.
value
.
name
=
res
.
data
.
name
baseFormData
.
value
.
picUUid
=
res
.
data
.
picUUid
function
upIdCardImgFront
(
e
)
{
baseFormData
.
value
.
card
=
e
.
tempFiles
;
console
.
log
(
e
.
tempFiles
[
0
].
file
)
const
formData
=
new
FormData
()
formData
.
append
(
'pic'
,
e
.
tempFiles
[
0
].
file
)
api
.
carUrl
(
formData
,
baseFormData
.
value
.
idcType
).
then
(
res
=>
{
baseFormData
.
value
.
idcUrl
=
res
.
data
.
url
baseFormData
.
value
.
sex
=
res
.
data
.
sex
baseFormData
.
value
.
birth
=
res
.
data
.
birth
baseFormData
.
value
.
idcCode
=
res
.
data
.
code
baseFormDatabaseFormData
.
value
.
cityId
=
res
.
data
.
cityId
baseFormData
.
value
.
address
=
res
.
data
.
address
baseFormData
.
value
.
photo
=
res
.
data
.
photo
baseFormData
.
value
.
name
=
res
.
data
.
name
baseFormData
.
value
.
picUUid
=
res
.
data
.
picUUid
})
// api.uploadImg(e).then(data => {
// baseFormData.value.card = data.data;
// });
}
}
function
upPhoto
(
e
)
{
// api.uploadImg(e).then(data => {
// baseFormData.value.photo = data.data;
...
...
@@ -222,7 +224,7 @@ function getRegionsList() {
function
delimgFont
(
n
)
{
baseFormData
.
value
.
card
=
''
;
}
function
delPhoto
(
n
)
{
baseFormData
.
value
.
photo
=
''
;
}
...
...
@@ -271,33 +273,87 @@ function getRegionsList() {
popup
.
value
.
open
()
}
function
closepopup
()
{
function
closepopup
()
{
agree
.
value
=
true
popup
.
value
.
close
()
}
function
goSubmit
()
{
if
(
!
agree
.
value
){
uni
.
showToast
({
icon
:
'none'
,
title
:
'请阅知入会须知'
,
duration
:
2000
});
if
(
!
agree
.
value
)
{
uni
.
showToast
({
icon
:
'none'
,
title
:
'请阅知入会须知'
,
duration
:
2000
});
return
}
// 验证必填项
//信息确认弹出
uni
.
showModal
({
content
:
'确认信息正确'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
api
.
addPersonToMyDept
().
then
(
res
=>
{
if
(
res
.
data
==
0
)
{
let
msg
=
'该成员,实名认证未通过,注册失败!'
resultDialog
.
value
=
true
return
}
if
(
res
.
data
*
1
<
0
)
{
// 会员调入弹出
perId
.
value
=
res
.
data
.
slice
(
1
)
getUserInfo
()
return
}
let
msg
=
'操作成功,您可以去列表中查看'
form
.
value
=
{
perType
:
1
,
idcType
:
'0'
}
}).
catch
(()
=>
{
let
msg
=
'您已注册该会员,请不要重复注册!'
})
}
}
});
}
function
getUserInfo
()
{
api
.
getInfo
(
perId
.
value
).
then
(
res
=>
{
forms
.
value
=
res
.
data
if
(
forms
.
areaAssName
)
forms
.
ancestorNameList
=
forms
.
value
.
ancestorNameList
.
join
(
','
).
replaceAll
(
','
,
'/'
)
})
}
</
script
>
<
style
lang=
"scss"
scoped
>
:deep
(
.segmented-control
)
{
height
:
100
rpx
;}
:deep
(
.segmented-control__text
)
{
line-height
:
2
;
font-size
:
30
rpx
;}
.tt
{
text-align
:
center
;
font-size
:
30
rpx
;
padding
:
40
rpx
0
0
;}
<
style
lang=
"scss"
scoped
>
:deep
(
.segmented-control
)
{
height
:
100
rpx
;
}
:deep
(
.segmented-control__text
)
{
line-height
:
2
;
font-size
:
30
rpx
;
}
.tt
{
text-align
:
center
;
font-size
:
30
rpx
;
padding
:
40
rpx
0
0
;
}
.popBody
{
font-size
:
28
rpx
;
line-height
:
1.5
;
font-family
:
华文仿宋
;
height
:
80vh
;
overflow
:
auto
;
padding
:
30
rpx
;
.btn-red{
margin
:
50
rpx
0
30
rpx
;}
overflow
:
auto
;
padding
:
30
rpx
;
.btn-red
{
margin
:
50
rpx
0
30
rpx
;
}
}
.agreeline
{
...
...
@@ -335,9 +391,14 @@ function getRegionsList() {
.op0
{
opacity
:
0
;
}
:deep
(
.item-text-overflow
)
{
text-align
:
left
;}
:deep
(
.selected-list
)
{
justify-content
:
end
;}
}
:deep
(
.item-text-overflow
)
{
text-align
:
left
;
}
:deep
(
.selected-list
)
{
justify-content
:
end
;
}
</
style
>
\ No newline at end of file
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment