Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
f8e2afe3
Commit
f8e2afe3
authored
Nov 23, 2022
by
sunerhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改Bug
parent
475b22f7
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
350 additions
and
205 deletions
+350
-205
pages.json
+45
-0
pages/certifyDetail/certifyDetail.vue
+22
-2
pages/certifyDetail/uploadinformation.vue
+123
-0
pages/myCertify/myCertify.vue
+2
-2
pages/personalCenter/accountoperation/aboutcffp.vue
+32
-12
pages/personalCenter/system/accontsetting.vue
+1
-1
pages/personalCenter/system/menu.vue
+0
-56
pages/personalCenter/system/menulist.vue
+2
-2
pages/personalCenter/system/settings.vue
+14
-32
pages/personalCenter/user-information.vue
+87
-3
util/uploaderFile.ts
+22
-95
No files found.
pages.json
View file @
f8e2afe3
...
@@ -365,7 +365,52 @@
...
@@ -365,7 +365,52 @@
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
,{
"path"
:
"pages/personalCenter/system/accontsetting"
,
"style"
:
{
"navigationBarTitleText"
:
"账号绑定设置"
,
"enablePullDownRefresh"
:
false
}
},
,{
"path"
:
"pages/personalCenter/accountoperation/phonebinding"
,
"style"
:
{
"navigationBarTitleText"
:
"手机号绑定"
,
"enablePullDownRefresh"
:
false
}
}
},
,{
"path"
:
"pages/personalCenter/accountoperation/resetpassword"
,
"style"
:
{
"navigationBarTitleText"
:
"重置密码"
,
"enablePullDownRefresh"
:
false
}
},
,{
"path"
:
"pages/personalCenter/accountoperation/aboutcffp"
,
"style"
:
{
"navigationBarTitleText"
:
"关于我"
,
"enablePullDownRefresh"
:
false
}
},
,{
"path"
:
"pages/certifyDetail/uploadinformation"
,
"style"
:
{
"navigationBarTitleText"
:
"上传信息"
,
"enablePullDownRefresh"
:
false
}
},
],
],
//
"tabBar"
:
{
//
"tabBar"
:
{
//
"color"
:
"#7A7E83"
,
//
tab
上的文字默认颜色
//
"color"
:
"#7A7E83"
,
//
tab
上的文字默认颜色
...
...
pages/certifyDetail/certifyDetail.vue
View file @
f8e2afe3
...
@@ -70,7 +70,11 @@
...
@@ -70,7 +70,11 @@
<!-- 报名按钮区域 -->
<!-- 报名按钮区域 -->
<view
class=
"signBtnContent"
>
<view
class=
"signBtnContent"
>
<view
class=
"consultBtn"
>
咨询客服
</view>
<view
class=
"consultBtn"
>
咨询客服
</view>
<view
class=
"signBtn"
@
click=
"registerNow()"
>
立即报名
</view>
<view
class=
"signBtn"
@
click=
"getDetail()"
>
<text
v-if=
"status == '1'"
>
上传个人信息
</text>
<text
v-else-if=
"status == '3'"
>
查看
</text>
<text
v-else
>
立即报名
</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -83,10 +87,12 @@
...
@@ -83,10 +87,12 @@
data
()
{
data
()
{
return
{
return
{
certificateInfo
:{},
certificateInfo
:{},
userId
:
'1'
userId
:
'1'
,
status
:
""
};
};
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
this
.
status
=
options
.
status
this
.
queryCertificateInfo
(
options
.
certificateId
,
options
.
userSignupId
)
this
.
queryCertificateInfo
(
options
.
certificateId
,
options
.
userSignupId
)
},
},
methods
:{
methods
:{
...
@@ -102,6 +108,20 @@
...
@@ -102,6 +108,20 @@
}
}
})
})
},
},
getDetail
(){
console
.
log
(
this
.
status
,
788584
)
if
(
this
.
status
!=
1
&&
this
.
status
!=
3
&&
this
.
status
!==
null
){
this
.
registerNow
()
}
else
{
this
.
uploadinfo
()
}
},
uploadinfo
(){
uni
.
navigateTo
({
url
:
`/pages/certifyDetail/uploadinformation`
})
},
// 去立即报名页面
registerNow
(){
registerNow
(){
const
param
=
{
const
param
=
{
productType
:
'1'
,
productType
:
'1'
,
...
...
pages/certifyDetail/uploadinformation.vue
0 → 100644
View file @
f8e2afe3
<
template
>
<view
class=
"content"
>
<view
class=
"band"
>
<view
class=
"contentItem"
>
<text>
姓名:
</text>
<input
class=
"user-input"
type=
"text"
placeholder=
"请输入姓名"
/>
</view>
<view
class=
"contentItem"
>
<text>
英文名:
</text>
<input
class=
"user-input"
maxlength=
"10"
type=
"text"
placeholder=
"请输入英文名"
/>
</view>
<view
class=
"contentItem"
>
<text>
手机号
</text>
<input
class=
"user-input"
maxlength=
"10"
type=
"text"
placeholder=
"请输入手机号"
/>
</view>
<view
class=
"contentItem"
>
<text>
证件类型
</text>
<input
class=
"user-input"
maxlength=
"10"
type=
"text"
placeholder=
"请输入证件类型"
/>
</view>
<view
class=
"contentItem"
>
<text>
证件号
</text>
<input
class=
"user-input"
maxlength=
"10"
type=
"text"
placeholder=
"请输入证件号"
/>
</view>
<!--
<view
class=
"contentItem"
>
<text>
个人简介
</text>
<textarea
class=
"user-textarea"
></textarea>
</view>
-->
<view
class=
""
style=
"margin-top: 20rpx;"
>
<text
>
上传计划书
</text>
</view>
<view
class=
"uploadpdf"
@
click=
"uploadFile()"
>
</view>
</view>
<view
class=
"footer"
>
<button
class=
"user-button"
>
保存
</button>
</view>
</view>
</
template
>
<
script
>
import
{
uploadFilepdf
}
from
'@/util/uploaderFile'
export
default
{
data
()
{
return
{
}
},
methods
:{
uploadFile
(
event
)
{
// let that = this;
// uploadFilepdf()
// .then(res => {
// that.headUrl = res[0].url
// })
uni
.
uploadFile
({
url
:
'https://www.example.com/upload'
,
//仅为示例,非真实的接口地址
files
:
上边的
filelist
,
formData
:
{
//图片张数
'length'
:
上边的
filelist
.
length
},
success
:
(
res
)
=>
{
console
.
log
(
res
.
data
);
}
});
},
}
}
</
script
>
<
style
scoped
>
.content
{
width
:
100vw
;
}
.user-input
{
text-align
:
right
;
}
.user-textarea
{
border
:
1px
solid
#C7C7C7
;
width
:
540
rpx
;
height
:
270
rpx
;
border-radius
:
10
rpx
;
}
.band
{
margin
:
0
20
rpx
;
font-size
:
26
rpx
;
}
.uploadpdf
{
width
:
274px
;
height
:
160px
;
background
:
#F8F8F8
;
border-radius
:
2px
2px
2px
2px
;
opacity
:
1
;
border
:
1px
solid
#E3E3E3
;
margin
:
20px
auto
;
}
.headportrait
{
width
:
260
rpx
;
height
:
260
rpx
;
border
:
1
rpx
solid
aqua
;
border-radius
:
50%
;
}
.contentItem
{
margin-top
:
20
rpx
;
display
:
flex
;
justify-content
:
space-between
;
border-bottom
:
2
rpx
solid
#E4E4E4
;
padding
:
10
rpx
;
}
.footer
{
width
:
500
rpx
;
height
:
80
rpx
;
opacity
:
1
;
margin
:
80
rpx
auto
;
}
.user-button
{
color
:
#FFFFFF
;
background
:
#20269B
;
border-radius
:
80px
;
}
</
style
>
pages/myCertify/myCertify.vue
View file @
f8e2afe3
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
},
},
toDetail
(
item
){
toDetail
(
item
){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/certifyDetail/certifyDetail?userSignupId=
${
item
.
userSignupId
}
&certificateId=null`
url
:
`/pages/certifyDetail/certifyDetail?userSignupId=
${
item
.
userSignupId
}
&certificateId=null
&status=
${
item
.
status
}
`
})
})
},
},
dateFormat
(
val
){
dateFormat
(
val
){
...
@@ -109,7 +109,7 @@
...
@@ -109,7 +109,7 @@
}
else
if
(
val
==
2
){
}
else
if
(
val
==
2
){
statusInfo
.
statusTitle
=
'未通过'
;
statusInfo
.
statusTitle
=
'未通过'
;
statusInfo
.
statusClass
=
'fail'
statusInfo
.
statusClass
=
'fail'
}
else
if
(
val
==
=
3
){
}
else
if
(
val
==
3
){
statusInfo
.
statusTitle
=
'通过'
;
statusInfo
.
statusTitle
=
'通过'
;
statusInfo
.
statusClass
=
'success'
statusInfo
.
statusClass
=
'success'
}
else
{
}
else
{
...
...
pages/personalCenter/accountoperation/aboutcffp.vue
View file @
f8e2afe3
...
@@ -4,18 +4,27 @@
...
@@ -4,18 +4,27 @@
<view
class=
"header-box"
>
<view
class=
"header-box"
>
<view
class=
"header-box-img"
>
<view
class=
"header-box-img"
>
</view>
</view>
<text>
CFFP财富中心
</text>
<view
class=
""
style=
"text-align: center;"
>
<text>
V1.0.21
</text>
<p
style=
"font-size: 22px;font-weight: 500;"
>
CFFP财富中心
</p>
<p
style=
"margin-top: 20rpx;"
>
V1.0.21
</p>
</view>
</view>
<view
class=
"hand"
>
<text>
版本更新
</text>
<view
class=
"iconBox"
>
<i
class=
"iconfont icon-youjiantou"
></i>
</view>
</view>
<view
class=
""
>
</view>
</view>
</view>
</view>
<view
class=
"footer"
>
<view
class=
"footer"
>
<view
class=
""
>
<view
class=
""
style=
"display: align-self: start;"
>
<text>
《服务协议》| 《隐私政策》
</text>
<p>
客服电话:400:921-9029
</p>
</view>
<p>
由银盾保险经纪有限公司提供
</p>
<view
class=
""
style=
"display: align-self: end;"
>
<text
style=
"color: #2D56A7;"
>
《服务协议》| 《隐私政策》
</text>
<p
class=
"footer-text"
style=
"margin: 10px 0;"
>
客服电话:400:921-9029
</p>
<p
class=
"footer-text"
>
由银盾保险经纪有限公司提供
</p>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -45,11 +54,22 @@
...
@@ -45,11 +54,22 @@
}
}
.header
{
.header
{
flex
:
1
;
flex
:
1
;
border
:
1px
solid
aqua
;
}
.footer-text
{
font-size
:
12px
;
color
:
#999999
;
}
.hand
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
30
rpx
0
;
margin
:
46
rpx
50
rpx
;
border-top
:
2
rpx
solid
#E6E6E6
;
border-bottom
:
2
rpx
solid
#E6E6E6
;
}
}
.footer
{
.footer
{
flex
:
1
;
text-align
:
center
;
border
:
1px
solid
#000
;
padding
:
50
rpx
;
}
}
//
.header-box
{
//
.header-box
{
//
height
:
300
rpx
;
//
height
:
300
rpx
;
...
@@ -61,7 +81,7 @@
...
@@ -61,7 +81,7 @@
.header-box-img
{
.header-box-img
{
width
:
124
rpx
;
width
:
124
rpx
;
height
:
124
rpx
;
height
:
124
rpx
;
margin
:
auto
auto
;
margin
:
90
rpx
auto
45
rpx
auto
;
background
:
url('../../../static/myteam/Group1633.png')
;
background
:
url('../../../static/myteam/Group1633.png')
;
background-size
:
auto
100%
;
background-size
:
auto
100%
;
}
}
...
...
pages/personalCenter/system/accontsetting.vue
View file @
f8e2afe3
<
template
>
<
template
>
<view>
<view>
<menu-list
:m
inorMenuLists
=
"minorMenuLists"
></menu-list>
<menu-list
:m
enuList
=
"minorMenuLists"
></menu-list>
</view>
</view>
</
template
>
</
template
>
...
...
pages/personalCenter/system/menu.vue
deleted
100644 → 0
View file @
475b22f7
<
template
>
<view>
<!--
<view
class=
"personalInfo"
>
<view
class=
"ulBox"
>
<view
v-for=
"item in menuList.filter(v=>v.isShow)"
:key=
"item.title"
@
click=
"goDetail(item)"
class=
"liBox"
>
<view
class=
"infoBox"
>
<image
:src=
"'/static/moduleIcon/'+item.icon+'.png'"
alt=
""
srcset=
""
mode=
"widthFix"
></image>
<text>
{{
item
.
title
}}
</text>
</view>
<view
class=
"iconBox"
>
<i
class=
"iconfont icon-youjiantou"
></i>
</view>
</view>
</view>
</view>
-->
</view>
</
template
>
<
script
>
export
default
{
props
:
{
menuList
:
{
type
:
Array
}
},
data
()
{
return
{
menuList
:[]
}
},
mounted
(){
console
.
log
(
this
.
menuList
,
7412
)
},
methods
:{
// goDetail(item){
// if(item.isShow && item.isOpen){
// if(item.title==='我的邀请码'){
// this.$refs.popup1.open('bottom');
// }else{
// uni.navigateTo({
// url: item.link
// });
// }
// }else{
// common.errorDialog(2,'该模块正在开发中,敬请期待!','提示');
// }
// }
}
}
</
script
>
<
style
lang=
"scss"
>
.personalInfo
{
}
</
style
>
pages/personalCenter/system/menulist.vue
View file @
f8e2afe3
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<view>
<view>
<view
class=
"personalInfo"
>
<view
class=
"personalInfo"
>
<view
class=
"ulBox"
>
<view
class=
"ulBox"
>
<view
v-for=
"item in m
inorMenuLists
.filter(v=>v.isShow)"
:key=
"item.title"
@
click=
"goDetail(item)"
class=
"liBox"
>
<view
v-for=
"item in m
enuList
.filter(v=>v.isShow)"
:key=
"item.title"
@
click=
"goDetail(item)"
class=
"liBox"
>
<view
class=
"infoBox"
>
<view
class=
"infoBox"
>
<!--
<image
:src=
"'/static/moduleIcon/'+item.icon+'.png'"
alt=
""
srcset=
""
mode=
"widthFix"
></image>
-->
<!--
<image
:src=
"'/static/moduleIcon/'+item.icon+'.png'"
alt=
""
srcset=
""
mode=
"widthFix"
></image>
-->
<text>
{{
item
.
title
}}
</text>
<text>
{{
item
.
title
}}
</text>
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<
script
>
<
script
>
export
default
{
export
default
{
props
:
{
props
:
{
m
inorMenuLists
:
{
m
enuList
:
{
type
:
Array
type
:
Array
}
}
},
},
...
...
pages/personalCenter/system/settings.vue
View file @
f8e2afe3
<
template
>
<
template
>
<view>
<view>
<menu
v-if=
"menuList != 'undefined '"
:menuList=
"minorMenuLists"
></menu
>
<menu
-list
v-if=
"menuList != 'undefined '"
:menuList=
"minorMenuLists"
></menu-list
>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
Menu
from
"./menu
.vue"
import
Menu
List
from
"./menulist
.vue"
export
default
{
export
default
{
components
:{
Menu
},
components
:{
Menu
List
},
data
()
{
data
()
{
return
{
return
{
minorMenuLists
:
[{
minorMenuLists
:
[{
title
:
'
我的邀请码
'
,
title
:
'
账号绑定设置
'
,
icon
:
'shareEcode'
,
icon
:
'shareEcode'
,
link
:
''
,
link
:
'
/pages/personalCenter/system/accontsetting
'
,
isOpen
:
true
,
isOpen
:
true
,
isShow
:
true
isShow
:
true
,
isType
:
false
,
},
},
{
{
title
:
'
我的卡包
'
,
title
:
'
清除缓存
'
,
icon
:
'card'
,
icon
:
'card'
,
link
:
''
,
link
:
''
,
isOpen
:
true
,
isOpen
:
true
,
isShow
:
false
isShow
:
true
,
isType
:
true
,
},
},
{
{
title
:
'
我的认证
'
,
title
:
'
关于CFFP财富中心
'
,
icon
:
'myCertify'
,
icon
:
'myCertify'
,
link
:
'/pages/myCertify/myCertify'
,
link
:
'/pages/personalCenter/accountoperation/aboutcffp'
,
isOpen
:
true
,
isShow
:
true
},
{
title
:
'申请修改公司周边'
,
icon
:
'setting'
,
link
:
''
,
isOpen
:
true
,
isOpen
:
true
,
isShow
:
true
isShow
:
true
,
isType
:
false
,
},
},
{
title
:
'我的消息'
,
icon
:
'message'
,
link
:
'/pages/systemMsg/system_msg'
,
isOpen
:
true
,
isShow
:
true
},
{
title
:
'系统设置'
,
icon
:
'setting'
,
link
:
'/pages/personalCenter/system/settings'
,
isOpen
:
true
,
isShow
:
true
}
]
]
}
}
}
}
...
...
pages/personalCenter/user-information.vue
View file @
f8e2afe3
<
template
>
<
template
>
<view
class=
""
>
<view
class=
"content"
>
这里是个人信息
<view
class=
"header"
>
<view
class=
"headportrait"
@
click=
"uploadAvatar()"
>
<img
src=
""
alt=
""
>
</view>
</view>
<view
class=
"band"
>
<view
class=
"contentItem"
>
<text>
真实名称
</text>
<input
class=
"user-input"
type=
"text"
placeholder=
"请输入姓名"
/>
</view>
<view
class=
"contentItem"
>
<text>
昵称
</text>
<input
class=
"user-input"
maxlength=
"10"
type=
"text"
placeholder=
"请输入3~10个字符"
/>
</view>
<view
class=
"contentItem"
>
<text>
个人简介
</text>
<textarea
class=
"user-textarea"
></textarea>
</view>
</view>
<view
class=
"footer"
>
<button
class=
"user-button"
>
保存
</button>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
CommonUpload
}
from
'@/util/uploaderFile'
export
default
{
data
()
{
return
{
}
},
methods
:{
uploadAvatar
(
event
)
{
let
that
=
this
;
CommonUpload
()
.
then
(
res
=>
{
// that.headUrl = res[0].url
})
},
}
}
</
script
>
</
script
>
<
style
>
<
style
scoped
>
.content
{
width
:
100vw
;
}
.user-input
{
text-align
:
right
;
}
.user-textarea
{
border
:
1px
solid
#C7C7C7
;
width
:
540
rpx
;
height
:
270
rpx
;
border-radius
:
10
rpx
;
}
.band
{
margin
:
0
20
rpx
;
font-size
:
26
rpx
;
}
.header
{
display
:
flex
;
justify-content
:
center
;
}
.headportrait
{
width
:
260
rpx
;
height
:
260
rpx
;
border
:
1
rpx
solid
aqua
;
border-radius
:
50%
;
}
.contentItem
{
margin-top
:
40
rpx
;
display
:
flex
;
justify-content
:
space-between
;
border-bottom
:
2
rpx
solid
#E4E4E4
;
padding
:
20
rpx
;
}
.footer
{
width
:
500
rpx
;
height
:
80
rpx
;
opacity
:
1
;
margin
:
80
rpx
auto
;
}
.user-button
{
color
:
#FFFFFF
;
background
:
#20269B
;
border-radius
:
80px
;
}
</
style
>
</
style
>
util/uploaderFile.ts
View file @
f8e2afe3
...
@@ -4,6 +4,7 @@ import request from "./request";
...
@@ -4,6 +4,7 @@ import request from "./request";
// 上传的事件
// 上传的事件
export
function
CommonUpload
()
{
export
function
CommonUpload
()
{
// @ts-ignore
return
new
Promise
((
resolve
,
rej
)
=>
{
return
new
Promise
((
resolve
,
rej
)
=>
{
uni
.
chooseImage
({
uni
.
chooseImage
({
count
:
1
,
//默认9
count
:
1
,
//默认9
...
@@ -48,111 +49,37 @@ import request from "./request";
...
@@ -48,111 +49,37 @@ import request from "./request";
}
}
export
function
CommonUploadFile
(
staffDeptId
,
type
)
{
// 上传文件
// type ==1 可以多传照片
export
function
uploadFilepdf
(){
var
sourceType
=
[]
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
type
==
2
){
sourceType
=
[
'camera'
]
}
else
{
sourceType
=
[
'album'
,
'camera'
]
}
return
new
Promise
((
resolve
,
rej
)
=>
{
uni
.
chooseImage
({
count
:
type
==
1
?
9
:
1
,
//默认9
sizeType
:
[
'original'
,
'compressed'
],
//可以指定是原图还是压缩图,默认二者都有
sourceType
:
sourceType
,
//从相册选择
success
:
function
(
res
)
{
var
urlList
=
[]
// res.tempFiles 数组
for
(
var
i
=
0
;
i
<
res
.
tempFilePaths
.
length
;
i
++
)
{
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'加载中'
,
title
:
'加载中'
,
mask
:
true
mask
:
true
});
});
uni
.
uploadFile
({
uni
.
uploadFile
({
url
:
$http
.
baseUrl
+
'/route/fileupload/uploadForLogin'
,
// 后端api接口
url
:
baseURL
+
'/common/upload'
,
//仅为示例,非真实的接口地址
filePath
:
res
.
tempFilePaths
[
i
],
// uni.chooseImage函数调用后获取的本地文件路劲
filePath
:
tempFilePaths
,
name
:
'file'
,
//后端通过'file'获取上传的文件对象
name
:
'file'
,
// formData: this.sendDate,
formData
:
{...
data
,
token
:
uni
.
getStorageSync
(
'token'
)
||
''
},
formData
:
{
//后台所需除图片外的参数可以写在这里面 ,单张多张都可
success
:
(
res
)
=>
{
'isAddWaterMaker'
:
true
,
uni
.
showLoading
({
'staffDeptId'
:
staffDeptId
,
title
:
'加载中'
,
},
mask
:
true
header
:
{
// "third-session": uni.getStorageSync('thirdSession')
'Authorization'
:
'Bearer'
+
uni
.
getStorageSync
(
'access_token'
)
},
success
:
(
res1
)
=>
{
console
.
log
(
res1
,
'aaa'
)
let
data
=
JSON
.
parse
(
res1
.
data
)
setTimeout
(()
=>
{
uni
.
showToast
({
title
:
'上传成功'
,
icon
:
"none"
,
duration
:
3000
})
},
30
)
urlList
.
push
({
url
:
data
.
data
.
link
,
recordId
:
data
.
data
.
recordId
})
// 抛出
if
(
urlList
.
length
==
res
.
tempFilePaths
.
length
)
resolve
(
urlList
)
// resolve(data,res.tempFilePaths.length)
uni
.
hideLoading
();
}
});
});
console
.
log
(
res
);
if
(
res
.
statusCode
==
200
){
resolve
(
JSON
.
parse
(
res
.
data
).
data
)
}
}
}
},
});
fail
:(
err
)
=>
{
})
}
// 外勤打开
export
function
CommonUploadPng
(
staffDeptId
)
{
return
new
Promise
((
resolve
,
rej
)
=>
{
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'加载中'
,
title
:
'加载中'
,
mask
:
true
mask
:
true
});
});
uni
.
uploadFile
({
console
.
log
(
err
,
'上传报错'
);
url
:
$http
.
baseUrl
+
'/route/fileupload/upload'
,
// 后端api接口
// return
filePath
:
res
.
tempFilePaths
[
0
],
// uni.chooseImage函数调用后获取的本地文件路劲
reject
(
err
)
name
:
'file'
,
//后端通过'file'获取上传的文件对象
// formData: this.sendDate,
formData
:
{
//后台所需除图片外的参数可以写在这里面 ,单张多张都可
'isAddWaterMaker'
:
true
,
'staffDeptId'
:
staffDeptId
},
// header:{"third-session": uni.getStorageSync('thirdSession')},
header
:
{
// "third-session": uni.getStorageSync('thirdSession')
'Authorization'
:
'Bearer'
+
uni
.
getStorageSync
(
'access_token'
)
},
success
:
(
res
)
=>
{
let
data
=
JSON
.
parse
(
res
.
data
)
if
(
data
.
code
==
1
)
{
setTimeout
(()
=>
{
uni
.
showToast
({
title
:
'上传失败'
,
icon
:
"none"
,
duration
:
3000
})
},
30
)
}
else
{
urlList
.
push
({
url
:
data
.
data
.
link
,
recordId
:
data
.
data
.
recordId
})
// 抛出
resolve
(
urlList
)
uni
.
hideLoading
();
}
}
}
});
})
})
}
})
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment