Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
voucher-h5
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘琦
voucher-h5
Commits
f918eca5
Commit
f918eca5
authored
Dec 23, 2019
by
潘琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
所有页面需要用到user id的地方都加上非空判断及提示;
parent
f8b71f8a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
14 deletions
+37
-14
index.vue
src/views/home/index.vue
+0
-1
addMain.vue
src/views/member/addMain.vue
+10
-2
addMember.vue
src/views/member/addMember.vue
+10
-2
indexbate.vue
src/views/signingWD/indexbate.vue
+0
-0
index.vue
src/views/vouchers/index.vue
+17
-9
No files found.
src/views/home/index.vue
View file @
f918eca5
...
...
@@ -22,7 +22,6 @@
<
script
>
import
store
from
'@/store'
// import store from '@/store'
import
CardItem
from
'@/components/cardItem'
import
ListItem
from
'@/components/listItem'
import
{
getUserCard
,
getunUsedCountById
}
from
'@/api/apply/apply'
...
...
src/views/member/addMain.vue
View file @
f918eca5
...
...
@@ -66,7 +66,7 @@
</
template
>
<
script
>
import
{
getStore
}
from
'@/util
/store'
import
store
from
'@
/store'
import
{
saveMember
}
from
'@/api/basic/basic'
import
{
validatename
,
cardid
,
isvalidatemobile
}
from
'@/util/validate'
import
{
SubtractDay
,
getBirthByIdNumber
,
getSexByIdCard
}
from
'@/util/index'
...
...
@@ -76,7 +76,7 @@ export default {
name
:
'Home'
,
data
()
{
return
{
userId
:
getStore
({
name
:
'user_id'
})
,
userId
:
store
.
getters
.
user_id
,
orgId
:
this
.
$route
.
query
.
orgId
?
parseInt
(
this
.
$route
.
query
.
orgId
)
:
null
,
orgName
:
this
.
$route
.
query
.
orgName
?
this
.
$route
.
query
.
orgName
:
''
,
userData
:
{
...
...
@@ -165,6 +165,14 @@ export default {
if
(
this
.
userData
.
sex
===
'2'
&&
!
this
.
BaseValidate
.
lastMensesTimeState
)
{
return
true
}
if
(
!
this
.
userId
||
this
.
userId
===
'null'
||
this
.
userId
!==
''
)
{
this
.
$toast
({
message
:
'缺少用户标识(user id为空)'
,
position
:
'center'
,
duration
:
3000
})
return
}
let
params
=
{
userId
:
this
.
userId
,
name
:
this
.
userData
.
name
,
...
...
src/views/member/addMember.vue
View file @
f918eca5
...
...
@@ -109,7 +109,7 @@
</
template
>
<
script
>
import
{
getStore
}
from
'@/util
/store'
import
store
from
'@
/store'
import
{
saveMember
}
from
'@/api/basic/basic'
import
{
validatename
,
cardid
}
from
'@/util/validate'
import
{
SubtractDay
,
getBirthByIdNumber
,
getSexByIdCard
}
from
'@/util/index'
...
...
@@ -119,7 +119,7 @@ export default {
name
:
'Home'
,
data
()
{
return
{
userId
:
getStore
({
name
:
'user_id'
})
,
userId
:
store
.
getters
.
user_id
,
orgId
:
this
.
$route
.
query
.
orgId
?
parseInt
(
this
.
$route
.
query
.
orgId
)
:
null
,
orgName
:
this
.
$route
.
query
.
orgName
?
this
.
$route
.
query
.
orgName
:
''
,
labelId
:
this
.
$route
.
query
.
labelId
?
parseInt
(
this
.
$route
.
query
.
labelId
)
:
1
,
// 领取角色类型 1=子女 2=配偶
...
...
@@ -238,6 +238,14 @@ export default {
return
}
}
if
(
!
this
.
userId
||
this
.
userId
===
'null'
||
this
.
userId
!==
''
)
{
this
.
$toast
({
message
:
'缺少用户标识(user id为空)'
,
position
:
'center'
,
duration
:
3000
})
return
}
let
params
=
{
userId
:
this
.
userId
,
name
:
this
.
userData
.
name
,
...
...
src/views/signingWD/indexbate.vue
deleted
100644 → 0
View file @
f8b71f8a
This diff is collapsed.
Click to expand it.
src/views/vouchers/index.vue
View file @
f918eca5
...
...
@@ -24,7 +24,7 @@
</
template
>
<
script
>
import
{
getStore
}
from
'@/util
/store'
import
store
from
'@
/store'
import
{
getUserCard
}
from
'@/api/apply/apply'
import
CardItem
from
'@/components/cardItem'
export
default
{
...
...
@@ -35,7 +35,7 @@ export default {
size
:
10
,
params
:
{
states
:
[
1
],
userId
:
getStore
({
name
:
'user_id'
})
userId
:
store
.
getters
.
user_id
}
}
},
...
...
@@ -51,17 +51,25 @@ export default {
},
methods
:
{
getUserCardByIdFn
()
{
getUserCard
(
this
.
size
,
this
.
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
voucherData
=
res
.
data
}
}).
catch
((
error
)
=>
{
if
(
this
.
params
.
userId
&&
this
.
params
.
userId
!==
'null'
&&
this
.
params
.
userId
!==
''
)
{
getUserCard
(
this
.
size
,
this
.
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
voucherData
=
res
.
data
}
}).
catch
((
error
)
=>
{
this
.
$toast
({
message
:
error
.
message
,
position
:
'center'
,
duration
:
3000
})
})
}
else
{
this
.
$toast
({
message
:
error
.
message
,
message
:
'缺少用户标识(user id为空)'
,
position
:
'center'
,
duration
:
3000
})
}
)
}
},
filter
(
state
)
{
console
.
log
(
state
)
...
...
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