Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
komatsu-lease-app
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
komatsu
komatsu-lease-app
Commits
223aeb36
Commit
223aeb36
authored
Dec 23, 2022
by
Step_by_step
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 投诉与建议接口联调
parent
f90d1f90
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
10 deletions
+26
-10
index.js
src/modules/complaint/api/index.js
+6
-8
index.vue
src/modules/complaint/views/index.vue
+20
-2
No files found.
src/modules/complaint/api/index.js
View file @
223aeb36
import
{
get
,
put
,
post
,
File
,
deleteReq
}
from
'@/utils/http'
import
{
post
}
from
'@/utils/http'
const
baseURL
=
import
.
meta
.
env
.
DEV
?
'/api'
:
import
.
meta
.
env
.
VITE_HTTP_BASE_URL
const
baseURL
=
import
.
meta
.
env
.
VITE_HTTP_BASE_URL
const
api
=
{
const
api
=
{
// getMakingList (data) { // 查询合同制作列表
commit
(
data
=
{})
{
// return get(
return
post
(
`
${
baseURL
}
/app/api/app/complaint/suggest/save`
,
{
userId
:
window
.
localStorage
.
getItem
(
'userId'
),
...
data
})
// `${baseURL}/hlct/v1/0/contracts/toMake`,
},
// {...data}
// )
// },
};
};
export
default
api
;
export
default
api
;
src/modules/complaint/views/index.vue
View file @
223aeb36
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
</section>
</section>
<section
class=
"sub"
>
<section
class=
"sub"
>
<Button
type=
"primary"
block
>
确认
</Button>
<Button
@
click=
"save"
type=
"primary"
block
>
确认
</Button>
</section>
</section>
</div>
</div>
</div>
</div>
...
@@ -29,9 +29,10 @@
...
@@ -29,9 +29,10 @@
<
script
setup
>
<
script
setup
>
import
{
goBack
}
from
"@/utils/globalFun"
import
{
goBack
}
from
"@/utils/globalFun"
import
{
NavBar
,
Button
,
Field
}
from
"vant"
;
import
{
NavBar
,
Button
,
Field
,
Toast
}
from
"vant"
;
import
AuForm
from
'@/components/AuForm.vue'
;
import
AuForm
from
'@/components/AuForm.vue'
;
import
AuFormClass
from
"@/components/useAuForm"
;
import
AuFormClass
from
"@/components/useAuForm"
;
import
api
from
"../api"
;
const
form
=
$ref
();
const
form
=
$ref
();
const
formConfig
=
$ref
(
new
AuFormClass
([
const
formConfig
=
$ref
(
new
AuFormClass
([
...
@@ -57,6 +58,23 @@ const formConfig = $ref(new AuFormClass([
...
@@ -57,6 +58,23 @@ const formConfig = $ref(new AuFormClass([
isRequired
:
true
isRequired
:
true
}
}
]))
]))
const
save
=
async
()
=>
{
if
(
formConfig
.
validate
())
{
let
formObj
=
formConfig
.
getValues
();
let
res
=
await
api
.
commit
(
formObj
)
if
(
res
.
success
)
{
Toast
.
success
(
'提交成功!感谢您的反馈'
)
setTimeout
(()
=>
{
goBack
()
},
2000
);
}
else
{
Toast
.
fail
(
'提交失败!请稍后重试'
)
}
}
else
{
Toast
({
message
:
'请将必填项填写完整'
,
position
:
'top'
});
}
}
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
...
...
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