Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
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
和慭琛
take_order
Commits
0dade5e4
Commit
0dade5e4
authored
Feb 26, 2021
by
和慭琛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入驻信息页 确认按钮 防抖
parent
fd1c002e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
16 deletions
+43
-16
pages.json
take-order/pages.json
+13
-13
base.vue
take-order/pages/settle/base.vue
+30
-3
No files found.
take-order/pages.json
View file @
0dade5e4
...
@@ -7,17 +7,23 @@
...
@@ -7,17 +7,23 @@
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
{
"path"
:
"pages/settle/base"
,
"style"
:
{
"navigationBarTitleText"
:
"入驻信息"
}
},{
"path"
:
"pages/settle/index"
,
"style"
:
{
"navigationBarTitleText"
:
"充电桩安装招募"
}
},{
"path"
:
"pages/exam/index"
,
"path"
:
"pages/exam/index"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"入驻考试"
"navigationBarTitleText"
:
"入驻考试"
}
}
},{
"path"
:
"pages/settle/index"
,
"style"
:
{
"navigationBarTitleText"
:
"充电桩安装招募"
}
},{
},{
"path"
:
"pages/exam/start"
,
"path"
:
"pages/exam/start"
,
"style"
:
{
"style"
:
{
...
@@ -59,13 +65,7 @@
...
@@ -59,13 +65,7 @@
{
"path"
:
"pages/settle/base"
,
"style"
:
{
"navigationBarTitleText"
:
"入驻信息"
}
},
{
{
"path"
:
"pages/settle/select"
,
"path"
:
"pages/settle/select"
,
"style"
:
{
"style"
:
{
...
...
take-order/pages/settle/base.vue
View file @
0dade5e4
...
@@ -81,7 +81,8 @@
...
@@ -81,7 +81,8 @@
</view>
</view>
<view
class=
"seat"
></view>
<view
class=
"seat"
></view>
<view
class=
"btn-wrap flex-xc"
>
<view
class=
"btn-wrap flex-xc"
>
<button
class=
"btn-submit"
:disabled=
"!submitStatus"
@
click=
"submitBaseInfo"
>
<!--view class="">submitBaseInfo
</view-->
<button
class=
"btn-submit"
:disabled=
"!submitStatus"
@
click=
"submitBaseInfo()"
>
确定
确定
</button>
</button>
</view>
</view>
...
@@ -109,7 +110,8 @@
...
@@ -109,7 +110,8 @@
areaTxts
:
[],
areaTxts
:
[],
workingAgeTxt
:
''
,
workingAgeTxt
:
''
,
protocolContent
:
''
,
protocolContent
:
''
,
address
:
''
address
:
''
,
isPosting
:
false
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
...
@@ -119,6 +121,12 @@
...
@@ -119,6 +121,12 @@
}
}
this
.
initLocation
()
this
.
initLocation
()
},
},
onShow
()
{
if
(
this
.
isPosting
)
{
this
.
isPosting
=
false
}
},
computed
:
{
computed
:
{
submitStatus
()
{
submitStatus
()
{
const
baseInfo
=
this
.
baseInfo
const
baseInfo
=
this
.
baseInfo
...
@@ -302,15 +310,31 @@
...
@@ -302,15 +310,31 @@
});
});
return
!
flagArr
||
flagArr
.
length
<
1
;
return
!
flagArr
||
flagArr
.
length
<
1
;
},
},
/*
shakeCLick: function() {
let timer = setTimeout(() => {
clearTimeout(timer)
this.submitBaseInfo()
}, 2000)
},
*/
async
submitBaseInfo
()
{
async
submitBaseInfo
()
{
// this.newSubmitBaseInfo()
// this.newSubmitBaseInfo()
// return
// return
const
baseInfo
=
this
.
baseInfo
;
const
baseInfo
=
this
.
baseInfo
;
if
(
!
this
.
checkBaseInfo
())
{
if
(
!
this
.
checkBaseInfo
())
{
return
;
return
;
}
}
if
(
this
.
isPosting
){
return
}
this
.
isPosting
=
true
//尝试防抖
this
.
saving
=
true
;
this
.
saving
=
true
;
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
...
@@ -322,6 +346,9 @@
...
@@ -322,6 +346,9 @@
const
res
=
await
this
.
$u
.
api
.
submitSettleBaseInfo
(
params
)
const
res
=
await
this
.
$u
.
api
.
submitSettleBaseInfo
(
params
)
this
.
saving
=
false
;
this
.
saving
=
false
;
uni
.
hideLoading
()
uni
.
hideLoading
()
//this.isPosting = false
if
(
res
.
code
!=
200
)
{
if
(
res
.
code
!=
200
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
message
,
title
:
res
.
message
,
...
...
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