Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
thinkApp
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
游洁
thinkApp
Commits
5227b1f9
Commit
5227b1f9
authored
Sep 28, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重新调整
parent
83d014dd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
11 deletions
+87
-11
addFriendsAndRelatives.vue
src/pages/FriendsAndRelatives/addFriendsAndRelatives.vue
+4
-0
index.vue
src/pages/FriendsAndRelatives/index.vue
+0
-5
addChild.vue
src/pages/MyChild/addChild.vue
+38
-5
index.vue
src/pages/MyChild/index.vue
+39
-0
requestErp.js
src/utils/requestErp.js
+6
-1
No files found.
src/pages/FriendsAndRelatives/addFriendsAndRelatives.vue
View file @
5227b1f9
...
@@ -242,6 +242,10 @@
...
@@ -242,6 +242,10 @@
this
.
AccountName
=
options
.
AccountName
this
.
AccountName
=
options
.
AccountName
this
.
shareUnionId
=
options
.
unionId
this
.
shareUnionId
=
options
.
unionId
this
.
getData
()
this
.
getData
()
}
else
{
uni
.
reLaunch
({
url
:
'/pages/login/login'
})
}
}
// uni.showModal({
// uni.showModal({
// title: 'options',
// title: 'options',
...
...
src/pages/FriendsAndRelatives/index.vue
View file @
5227b1f9
...
@@ -338,11 +338,6 @@
...
@@ -338,11 +338,6 @@
this
.
wxUserAuthInfo
=
uni
.
getStorageSync
(
'wxUserAuthInfo'
)
this
.
wxUserAuthInfo
=
uni
.
getStorageSync
(
'wxUserAuthInfo'
)
this
.
erpUserInfo
=
uni
.
getStorageSync
(
'erpUserInfo'
)
this
.
erpUserInfo
=
uni
.
getStorageSync
(
'erpUserInfo'
)
this
.
getData
()
this
.
getData
()
let
path
=
`/pages/FriendsAndRelatives/addFriendsAndRelatives?unionId=
${
this
.
wxUserAuthInfo
.
unionid
}
&AccountName=
${
this
.
erpUserInfo
.
AccountName
}
`
console
.
log
(
path
)
uni
.
navigateTo
({
url
:
path
})
},
},
onReachBottom
()
{
onReachBottom
()
{
...
...
src/pages/MyChild/addChild.vue
View file @
5227b1f9
...
@@ -155,6 +155,7 @@
...
@@ -155,6 +155,7 @@
import
{
import
{
GetStudentPageList
,
SetMyChild
GetStudentPageList
,
SetMyChild
}
from
"../../api/erp.js"
;
}
from
"../../api/erp.js"
;
import
{
getLoginAccounts
}
from
'../../api/index.js'
export
default
{
export
default
{
components
:
{
components
:
{
bottom
,
bottom
,
...
@@ -237,17 +238,49 @@
...
@@ -237,17 +238,49 @@
data
.
loading
=
false
data
.
loading
=
false
uni
.
showLoading
()
uni
.
showLoading
()
let
res
=
await
SetMyChild
(
data
.
form
);
let
res
=
await
SetMyChild
(
data
.
form
);
console
.
log
(
res
)
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
uni
.
hideLoading
()
let
erps
=
uni
.
getStorageSync
(
'ErpStus'
)
data
.
loading
=
true
erps
.
push
(
res
.
Data
)
uni
.
navigateBack
({
uni
.
setStorageSync
(
'ErpStus'
,
erps
)
delta
:
1
if
(
res
.
Data
.
ClassInAccount
){
});
methods
.
setAccountsLogin
(
res
.
Data
.
ClassInAccount
)
}
else
{
uni
.
hideLoading
()
data
.
loading
=
true
uni
.
navigateBack
({
delta
:
1
});
}
}
else
{
}
else
{
uni
.
hideLoading
()
uni
.
hideLoading
()
data
.
loading
=
true
data
.
loading
=
true
uni
.
showToast
({
title
:
'添加失败'
,
icon
:
"error"
})
}
}
},
},
setAccountsLogin
(
Accounts
){
getLoginAccounts
({
Accounts
}).
then
(
r
=>
{
uni
.
hideLoading
()
data
.
loading
=
true
if
(
r
.
Data
&&
r
.
Data
.
length
>
0
){
let
users
=
uni
.
getStorageSync
(
'users'
)?
uni
.
getStorageSync
(
'users'
):[]
users
.
push
(
r
.
Data
[
0
])
uni
.
setStorageSync
(
"users"
,
users
)
data
.
loading
=
true
uni
.
navigateBack
({
delta
:
1
});
}
}).
catch
(
e
=>
{
uni
.
hideLoading
()
data
.
loading
=
true
})
},
getData
()
{
getData
()
{
uni
.
showLoading
()
uni
.
showLoading
()
GetStudentPageList
(
data
.
msg
).
then
(
res
=>
{
GetStudentPageList
(
data
.
msg
).
then
(
res
=>
{
...
...
src/pages/MyChild/index.vue
View file @
5227b1f9
...
@@ -250,6 +250,7 @@
...
@@ -250,6 +250,7 @@
content
:
'将要删除该数据,是否继续'
,
content
:
'将要删除该数据,是否继续'
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
if
(
res
.
confirm
)
{
uni
.
showLoading
()
uni
.
showLoading
()
let
msg
=
{
let
msg
=
{
Id
:
item
.
Id
Id
:
item
.
Id
...
@@ -257,6 +258,7 @@
...
@@ -257,6 +258,7 @@
RemoveMyChild
(
msg
).
then
(
r
=>
{
RemoveMyChild
(
msg
).
then
(
r
=>
{
if
(
r
.
Code
==
1
){
if
(
r
.
Code
==
1
){
uni
.
hideLoading
()
uni
.
hideLoading
()
methods
.
delCache
(
item
)
methods
.
getData
();
methods
.
getData
();
}
else
{
}
else
{
uni
.
hideLoading
()
uni
.
hideLoading
()
...
@@ -276,6 +278,43 @@
...
@@ -276,6 +278,43 @@
});
});
},
},
delCache
(
item
){
let
users
=
uni
.
getStorageSync
(
'users'
)
let
erps
=
uni
.
getStorageSync
(
'ErpStus'
)
let
u
=
uni
.
getStorageSync
(
'userInfo'
)
let
eu
=
uni
.
getStorageSync
(
'erpUserInfo'
)
let
temp
=
erps
.
find
(
x
=>
x
.
RealPhone
==
item
.
StuRealMobile
)
if
(
temp
){
let
t
=
JSON
.
parse
(
JSON
.
stringify
(
temp
))
if
(
users
){
users
=
users
.
filter
(
x
=>
x
.
Account
!=
t
.
ClassInAccount
)
if
(
users
&&
users
.
length
>
0
){
uni
.
setStorageSync
(
'users'
,
users
)
if
(
u
.
Account
==
t
.
ClassInAccount
){
uni
.
setStorageSync
(
'userInfo'
,
users
[
0
])
}
}
else
{
uni
.
removeStorageSync
(
'users'
)
uni
.
removeStorageSync
(
'userInfo'
)
}
}
if
(
erps
){
erps
=
erps
.
filter
(
x
=>
x
.
AccountId
!=
t
.
AccountId
)
if
(
erps
&&
erps
.
length
>
0
){
uni
.
setStorageSync
(
'ErpStus'
,
erps
)
if
(
eu
.
AccountId
==
t
.
AccountId
){
uni
.
setStorageSync
(
'erpUserInfo'
,
erps
[
0
])
}
}
else
{
uni
.
removeStorageSync
(
'ErpStus'
)
uni
.
removeStorageSync
(
'erpUserInfo'
)
}
}
}
},
jumpPage
(
url
)
{
jumpPage
(
url
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
url
,
url
:
url
,
...
...
src/utils/requestErp.js
View file @
5227b1f9
...
@@ -26,7 +26,12 @@ let request = (param) => {
...
@@ -26,7 +26,12 @@ let request = (param) => {
if
(
res
.
data
.
Code
===
1
)
{
if
(
res
.
data
.
Code
===
1
)
{
resolve
(
res
.
data
)
resolve
(
res
.
data
)
}
else
{
}
else
{
if
(
res
.
data
.
Code
==
10001
||
res
.
data
.
Code
==
10000
)
{
if
(
res
.
data
.
Code
==
10001
||
res
.
data
.
Code
==
10000
)
{
if
(
!
uni
.
getStorageSync
(
'userInfo'
)){
uni
.
reLaunch
({
url
:
"/pages/login/login"
})
}
// uni.showToast({
// uni.showToast({
// title: "用户凭证失效,请重新授权",
// title: "用户凭证失效,请重新授权",
// duration: 2000,
// duration: 2000,
...
...
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