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
2c8d141f
Commit
2c8d141f
authored
Oct 11, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成部分BUG调整
parent
797a3da6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
87 additions
and
15 deletions
+87
-15
erp.js
src/api/erp.js
+7
-1
bottom.vue
src/components/bottom.vue
+1
-1
index.vue
src/pages/index/index.vue
+9
-1
bind.vue
src/pages/person/bind.vue
+53
-9
person.vue
src/pages/person/person.vue
+8
-1
timeTable.vue
src/pages/timetable/timeTable.vue
+9
-2
No files found.
src/api/erp.js
View file @
2c8d141f
...
...
@@ -142,7 +142,13 @@ export function GetOrderPage(data) {
data
})
}
export
function
BindMyChild
(
data
)
{
return
request
({
url
:
'/AppletCenter/SetMyChild'
,
method
:
'post'
,
data
})
}
/**
* 进入亲友团
* @param {JSON参数} data
...
...
src/components/bottom.vue
View file @
2c8d141f
...
...
@@ -28,7 +28,7 @@
uni
.
removeStorageSync
(
'userInfo'
)
uni
.
removeStorageSync
(
'users'
)
uni
.
reLaunch
({
url
:
'/pages/login/
accountL
ogin'
url
:
'/pages/login/
l
ogin'
});
}
else
if
(
res
.
cancel
)
{
...
...
src/pages/index/index.vue
View file @
2c8d141f
<
template
>
<page-meta
:page-style=
"showPopu?'overflow:hidden;':''"
>
<view
class=
"indexpage"
>
<view
class=
"indexpage"
:style=
"
{'padding-bottom': `${statusBarHeight}px`}"
>
<navbar
class=
"navbarSticky"
bg=
"#F6F6F6"
>
<!--
<view
class=
"index-header-box"
>
<view
class=
"index-header-img"
>
...
...
@@ -132,6 +132,7 @@
searchBindKey
:
''
,
searchResult
:
null
,
submiting
:
false
,
statusBarHeight
:
0
,
workList
:
[],
//学员作业、考试、评语数据
});
...
...
@@ -235,6 +236,13 @@
}
onMounted
(()
=>
{
that
.
VersionUpdate
()
wx
.
getSystemInfo
({
success
(
res
)
{
let
lift
=
res
.
screenHeight
-
res
.
safeArea
.
bottom
let
tabbarHeight
=
Number
(
lift
)
+
50
data
.
statusBarHeight
=
tabbarHeight
}
})
});
let
that
=
methods
;
return
{
...
...
src/pages/person/bind.vue
View file @
2c8d141f
...
...
@@ -146,8 +146,11 @@
</view>
-->
</view>
</scroll-view>
<view
v-if=
"loading"
class=
"addChild-buttom"
@
click=
"setBindHandler"
>
<view
v-if=
"loading
&& exsitsUnionId
"
class=
"addChild-buttom"
@
click=
"setBindHandler"
>
已选
{{
list
.
length
}}
个,确认绑定
</view>
<view
v-else-if=
"loading && !exsitsUnionId"
open-type=
"getUserInfo"
class=
"addChild-buttom"
@
click=
"getUserProfile"
>
已选
{{
list
.
length
}}
个,确认绑定
</view>
<view
v-else
class=
"addChild-buttom active"
>
已选
{{
list
.
length
}}
个,确认绑定
...
...
@@ -172,9 +175,12 @@
import
bottom
from
"../../components/bottom"
;
import
{
GetStudentPageList
,
Set
MyChild
,
Bind
MyChild
,
setStudentClassInAccount
}
from
"../../api/erp"
;
}
from
"../../api/erp"
;
import
{
getWeChatOpenId
}
from
"../../api/index"
;
export
default
{
components
:
{
bottom
,
...
...
@@ -207,11 +213,42 @@
pageState
:
"more"
,
timer
:
null
,
//防抖
isSearched
:
false
,
userInfo
:
null
userInfo
:
null
,
exsitsUnionId
:
false
});
data
.
userInfo
=
uni
.
getStorageSync
(
'userInfo'
)
data
.
userInfo
=
uni
.
getStorageSync
(
'userInfo'
)
data
.
exsitsUnionId
=
uni
.
getStorageSync
(
'userWxInfo'
)?
true
:
false
console
.
log
(
uni
.
getStorageSync
(
'userInfo'
))
const
methods
=
{
const
methods
=
{
getUserProfile
()
{
//新的获取用户资料
wx
.
getUserProfile
({
desc
:
"用于完善资料"
,
// 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success
:
(
info
)
=>
{
uni
.
setStorageSync
(
'userWxInfo'
,
info
)
wx
.
login
({
//成功放回
success
:(
res
)
=>
{
methods
.
loginByOpenCode
(
res
.
code
)
}
})
},
fail
:
()
=>
{
uni
.
showToast
({
title
:
"微信授权失败,无法进行绑定"
,
icon
:
"none"
,
});
},
});
},
loginByOpenCode
(
Code
){
getWeChatOpenId
({
Code
}).
then
(
r
=>
{
uni
.
setStorageSync
(
'wxUserAuthInfo'
,
r
.
Data
)
data
.
exsitsUnionId
=
true
methods
.
setBindHandler
()
})
},
setBindHandler
()
{
if
(
data
.
list
.
length
==
0
)
{
uni
.
showToast
({
...
...
@@ -272,14 +309,17 @@
param
.
WeChatImg
=
userWxInfo
.
userInfo
.
avatarUrl
param
.
UnionId
=
wxUserAuthInfo
.
unionid
data
.
loading
=
false
SetMyChild
(
param
).
then
(
res
=>
{
BindMyChild
(
param
).
then
(
res
=>
{
console
.
log
(
res
.
Code
==
1
)
if
(
res
.
Code
==
1
)
{
console
.
log
(
'in.....'
)
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'绑定成功'
})
//重新获取
let
erpStus
=
uni
.
getStorageSync
(
'ErpStus'
)
erpStus
=
erpStus
?
erpStus
:[]
let
flag
=
false
erpStus
.
forEach
(
x
=>
{
if
(
x
.
AccountId
==
res
.
Data
.
AccountId
){
...
...
@@ -288,12 +328,16 @@
uni
.
setStorageSync
(
'erpUserInfo'
,
x
)
}
})
if
(
flag
){
if
(
!
flag
){
erpStus
.
push
(
res
.
Data
)
uni
.
setStorageSync
(
'erpUserInfo'
,
res
.
Data
)
}
uni
.
setStorageSync
(
'ErpStus'
,
erpStus
)
if
(
uni
.
getStorageSync
(
'users'
)){
let
users
=
[]
user
.
push
(
uni
.
getStorageSync
(
'userInfo'
))
uni
.
setStorageSync
(
'users'
,
user
)
}
data
.
loading
=
true
uni
.
reLaunch
({
url
:
'/pages/index/index'
...
...
src/pages/person/person.vue
View file @
2c8d141f
...
...
@@ -339,7 +339,14 @@
};
let
that
=
methods
;
onMounted
(()
=>
{
data
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
;
//data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
wx
.
getSystemInfo
({
success
(
res
)
{
let
lift
=
res
.
screenHeight
-
res
.
safeArea
.
bottom
let
tabbarHeight
=
Number
(
lift
)
+
50
data
.
statusBarHeight
=
tabbarHeight
}
})
that
.
VersionUpdate
()
that
.
initColor
()
});
...
...
src/pages/timetable/timeTable.vue
View file @
2c8d141f
<
template
>
<view
class=
""
:style=
"
{
'padding-top': `${statusBarHeight}px`,
'padding-bottom': `${statusBarHeight}px` }">
<view
class=
""
:style=
"
{'padding-bottom': `${statusBarHeight}px` }">
<view
style=
"height: 100rpx"
></view>
<view
class=
"navbar"
>
...
...
@@ -497,7 +497,14 @@
activeDay
.
value
=
today
.
day
;
}
sliceWeek
(
today
);
data
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
;
wx
.
getSystemInfo
({
success
(
res
)
{
let
lift
=
res
.
screenHeight
-
res
.
safeArea
.
bottom
let
tabbarHeight
=
Number
(
lift
)
+
50
data
.
statusBarHeight
=
tabbarHeight
}
})
//data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight+52;
});
let
that
=
methods
;
return
{
...
...
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