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
49644e1e
Commit
49644e1e
authored
Dec 06, 2022
by
youjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/youjie/thinkapp
parents
e34b3663
4cd2c898
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
202 additions
and
114 deletions
+202
-114
erp.js
src/api/erp.js
+7
-1
bottom.vue
src/components/bottom.vue
+1
-1
allGraspTheSituation.vue
src/components/index/scoreDetails/allGraspTheSituation.vue
+104
-88
user-card.vue
src/components/user-card.vue
+3
-3
manifest.json
src/manifest.json
+1
-1
index.vue
src/pages/index/index.vue
+9
-1
bind.vue
src/pages/person/bind.vue
+55
-9
person.vue
src/pages/person/person.vue
+8
-1
timeTable.vue
src/pages/timetable/timeTable.vue
+10
-5
request.js
src/utils/request.js
+1
-1
requestErp.js
src/utils/requestErp.js
+1
-1
requestMall.js
src/utils/requestMall.js
+2
-2
No files found.
src/api/erp.js
View file @
49644e1e
...
@@ -142,7 +142,13 @@ export function GetOrderPage(data) {
...
@@ -142,7 +142,13 @@ export function GetOrderPage(data) {
data
data
})
})
}
}
export
function
BindMyChild
(
data
)
{
return
request
({
url
:
'/AppletCenter/SetMyChild'
,
method
:
'post'
,
data
})
}
/**
/**
* 进入亲友团
* 进入亲友团
* @param {JSON参数} data
* @param {JSON参数} data
...
...
src/components/bottom.vue
View file @
49644e1e
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
uni
.
removeStorageSync
(
'userInfo'
)
uni
.
removeStorageSync
(
'userInfo'
)
uni
.
removeStorageSync
(
'users'
)
uni
.
removeStorageSync
(
'users'
)
uni
.
reLaunch
({
uni
.
reLaunch
({
url
:
'/pages/login/
accountL
ogin'
url
:
'/pages/login/
l
ogin'
});
});
}
else
if
(
res
.
cancel
)
{
}
else
if
(
res
.
cancel
)
{
...
...
src/components/index/scoreDetails/allGraspTheSituation.vue
View file @
49644e1e
<
template
>
<
template
>
<view
class=
"allGraspTheSituation-box flex"
>
<view
class=
"allGraspTheSituation-box flex"
>
<view
class=
"allGraspTheSituation-title flex"
>
<view
class=
"allGraspTheSituation-title flex"
>
<view
v-for=
"(T,index) in TitleList"
:key=
"index"
>
{{
T
}}
</view>
<view
v-for=
"(T,index) in TitleList"
:key=
"index"
>
{{
T
}}
</view>
</view>
</view>
<view
class=
"allGraspTheSituation-content flex"
>
<view
class=
"allGraspTheSituation-content flex"
>
<view
class=
"allGraspTheSituation-num flex"
v-for=
"(item,index) in ModuleList"
:key=
"index"
>
<view
class=
"allGraspTheSituation-num flex"
v-for=
"(item,index) in ModuleList"
:key=
"index"
>
<text
class=
"name"
>
{{
item
.
Module
}}
</text>
<text
class=
"name"
>
{{
item
.
Module
}}
</text>
<text
class=
"Score"
>
{{
item
.
Score
}}
</text>
<text
class=
"Score"
>
{{
item
.
Score
}}
</text>
<text
class=
"ScoreRate"
<text
class=
"ScoreRate"
:class=
"item.ScoreRate
<0
.
5
?'
failed
'
:
:class=
"item.ScoreRate
<0
.
5
?'
failed
'
:
(
item
.
ScoreRate=
=1?'fullScore':'')"
>
(
item
.
ScoreRate=
=1?'fullScore':'')"
>
{{
item
.
PScore
.
toFixed
(
0
)
}}
<text></text></text>
{{
item
.
PScore
.
toFixed
(
0
)
}}
<text
class=
"AvgScoreRate"
>
{{
item
.
AvgScore
.
toFixed
(
0
)
}}
<text></text></text>
<text>
</view>
</text>
</text>
</view>
<text
class=
"AvgScoreRate"
>
{{
item
.
AvgScore
.
toFixed
(
0
)
}}
<text></text></text>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -28,7 +31,7 @@
...
@@ -28,7 +31,7 @@
export
default
{
export
default
{
props
:
{
props
:
{
ModuleList
:[]
ModuleList
:
[]
},
},
components
:
{},
components
:
{},
setup
()
{
setup
()
{
...
@@ -40,7 +43,7 @@
...
@@ -40,7 +43,7 @@
},
},
showPhone
:
false
,
showPhone
:
false
,
showLogin
:
true
,
//多次点击
showLogin
:
true
,
//多次点击
TitleList
:[
'考点'
,
'分数'
,
'个人得分'
,
'平均得分'
]
TitleList
:
[
'考点'
,
'分数'
,
'个人得分'
,
'平均得分'
]
});
});
return
{
return
{
...
toRefs
(
data
),
...
toRefs
(
data
),
...
@@ -49,75 +52,88 @@
...
@@ -49,75 +52,88 @@
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.allGraspTheSituation-num
.ScoreRate.failed
{
.allGraspTheSituation-num
.ScoreRate.failed
{
color
:
#EE8790
;
color
:
#EE8790
;
}
}
.allGraspTheSituation-num
.ScoreRate.failed
text
{
color
:
#EE8790
;
.allGraspTheSituation-num
.ScoreRate.failed
text
{
}
color
:
#EE8790
;
.allGraspTheSituation-num
.ScoreRate.fullScore
{
}
color
:
#4AC698
;
}
.allGraspTheSituation-num
.ScoreRate.fullScore
{
.allGraspTheSituation-num
.ScoreRate.fullScore
text
{
color
:
#4AC698
;
color
:
#4AC698
;
}
}
.allGraspTheSituation-num
text
text
{
.allGraspTheSituation-num
.ScoreRate.fullScore
text
{
font-size
:
20
rpx
;
color
:
#4AC698
;
margin-top
:
10
rpx
;
}
margin-left
:
5
rpx
;
}
.allGraspTheSituation-num
text
text
{
.allGraspTheSituation-num
text
{
font-size
:
20
rpx
;
flex
:
0
0
25%
;
margin-top
:
10
rpx
;
font-size
:
36
rpx
;
margin-left
:
5
rpx
;
font-weight
:
800
;
}
font-style
:
italic
;
}
.allGraspTheSituation-num
text
{
.allGraspTheSituation-num
.name
{
flex
:
0
0
25%
;
font-size
:
20
rpx
;
font-size
:
36
rpx
;
font-style
:
inherit
;
font-weight
:
800
;
font-weight
:
400
;
font-style
:
italic
;
color
:
#282828
;
}
}
.allGraspTheSituation-num
:last-child
{
.allGraspTheSituation-num
.name
{
margin-bottom
:
44
rpx
;
font-size
:
20
rpx
;
}
font-style
:
inherit
;
.allGraspTheSituation-num
{
font-weight
:
400
;
flex
:
1
;
color
:
#282828
;
color
:
#282828
;
}
font-weight
:
400
;
flex-direction
:
row
;
.allGraspTheSituation-num
:last-child
{
align-items
:
center
;
margin-bottom
:
44
rpx
;
margin-top
:
41
rpx
;
}
}
.allGraspTheSituation-content
{
.allGraspTheSituation-num
{
flex-direction
:
column
;
flex
:
1
;
text-align
:
center
;
color
:
#282828
;
font-size
:
20px
;
font-weight
:
400
;
font-weight
:
400
;
flex-direction
:
row
;
color
:
#282828
;
align-items
:
center
;
}
margin-top
:
41
rpx
;
.allGraspTheSituation-title
view
:first-child
{
}
font-weight
:
bold
;
color
:
#282828
;
.allGraspTheSituation-content
{
}
flex-direction
:
column
;
.allGraspTheSituation-title
view
{
text-align
:
center
;
flex
:
0
0
25%
;
font-size
:
20px
;
color
:
#A1A1A1
;
font-weight
:
400
;
}
color
:
#282828
;
.allGraspTheSituation-title
{
}
flex-shrink
:
0
;
font-size
:
20
rpx
;
.allGraspTheSituation-title
view
:first-child
{
font-weight
:
400
;
font-weight
:
bold
;
color
:
#282828
;
color
:
#282828
;
padding
:
41
rpx
0
21
rpx
0
;
}
border-bottom
:
2
rpx
solid
#EDEDED
;
text-align
:
center
;
.allGraspTheSituation-title
view
{
}
flex
:
0
0
25%
;
.allGraspTheSituation-box
{
color
:
#A1A1A1
;
margin
:
30
rpx
50
rpx
0
50
rpx
;
}
background
:
#FFFFFF
;
box-shadow
:
0px
6px
29px
0px
rgba
(
76
,
76
,
76
,
0.09
);
.allGraspTheSituation-title
{
border-radius
:
30px
;
flex-shrink
:
0
;
flex-direction
:
column
;
font-size
:
20
rpx
;
}
font-weight
:
400
;
color
:
#282828
;
padding
:
41
rpx
0
21
rpx
0
;
border-bottom
:
2
rpx
solid
#EDEDED
;
text-align
:
center
;
}
.allGraspTheSituation-box
{
margin
:
30
rpx
50
rpx
0
50
rpx
;
background
:
#FFFFFF
;
box-shadow
:
0px
6px
29px
0px
rgba
(
76
,
76
,
76
,
0.09
);
border-radius
:
30px
;
flex-direction
:
column
;
}
</
style
>
</
style
>
src/components/user-card.vue
View file @
49644e1e
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
:show=
"showChange"
:show=
"showChange"
round
round
v-if=
"currentErpUser"
v-if=
"currentErpUser"
custom-style=
"
height: 650rpx
;width:650rpx"
custom-style=
";width:650rpx"
>
>
<view
class=
"user-change-box"
>
<view
class=
"user-change-box"
>
<view
class=
"title-box"
>
<view
class=
"title-box"
>
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<van-icon
name=
'cross'
@
click=
"closeChangeUserHandler"
></van-icon>
<van-icon
name=
'cross'
@
click=
"closeChangeUserHandler"
></van-icon>
</view>
</view>
</view>
</view>
<scroll-view
s
tyle=
"overflow-y: auto; height: 1px; flex:1
;margin-top:50rpx"
>
<scroll-view
s
croll-y=
"true"
style=
" height: 500rpx;
;margin-top:50rpx"
>
<view
class=
"user-item"
@
click=
"changeErpUserHandler(x)"
v-for=
"(x,i) in erpUsers"
>
<view
class=
"user-item"
@
click=
"changeErpUserHandler(x)"
v-for=
"(x,i) in erpUsers"
>
<view
class=
"avatar"
:style=
"
{background:x.bgColor}">
{{
x
.
AccountName
.
substring
(
0
,
1
)
}}
</view>
<view
class=
"avatar"
:style=
"
{background:x.bgColor}">
{{
x
.
AccountName
.
substring
(
0
,
1
)
}}
</view>
<view
class=
"uname"
>
<view
class=
"uname"
>
...
@@ -172,7 +172,7 @@
...
@@ -172,7 +172,7 @@
.userCard-box
.user-change-box
{
.userCard-box
.user-change-box
{
padding
:
50
rpx
;
padding
:
50
rpx
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
height
:
100%
;
/* height: 600rpx; */
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
}
}
...
...
src/manifest.json
View file @
49644e1e
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
"quickapp"
:
{},
"quickapp"
:
{},
/*
快应用特有相关
*/
/*
快应用特有相关
*/
"mp-weixin"
:
{
"mp-weixin"
:
{
"appid"
:
"
wx10655d8e5b0a67c5
"
,
"appid"
:
"
13982128958
"
,
"setting"
:
{
"setting"
:
{
"urlCheck"
:
false
,
"urlCheck"
:
false
,
"es6"
:
false
,
"es6"
:
false
,
...
...
src/pages/index/index.vue
View file @
49644e1e
<
template
>
<
template
>
<page-meta
:page-style=
"showPopu?'overflow:hidden;':''"
>
<page-meta
:page-style=
"showPopu?'overflow:hidden;':''"
>
<view
class=
"indexpage"
>
<view
class=
"indexpage"
:style=
"
{'padding-bottom': `${statusBarHeight}px`}"
>
<navbar
class=
"navbarSticky"
bg=
"#F6F6F6"
>
<navbar
class=
"navbarSticky"
bg=
"#F6F6F6"
>
<!--
<view
class=
"index-header-box"
>
<!--
<view
class=
"index-header-box"
>
<view
class=
"index-header-img"
>
<view
class=
"index-header-img"
>
...
@@ -132,6 +132,7 @@
...
@@ -132,6 +132,7 @@
searchBindKey
:
''
,
searchBindKey
:
''
,
searchResult
:
null
,
searchResult
:
null
,
submiting
:
false
,
submiting
:
false
,
statusBarHeight
:
0
,
workList
:
[],
//学员作业、考试、评语数据
workList
:
[],
//学员作业、考试、评语数据
});
});
...
@@ -235,6 +236,13 @@
...
@@ -235,6 +236,13 @@
}
}
onMounted
(()
=>
{
onMounted
(()
=>
{
that
.
VersionUpdate
()
that
.
VersionUpdate
()
wx
.
getSystemInfo
({
success
(
res
)
{
let
lift
=
res
.
screenHeight
-
res
.
safeArea
.
bottom
let
tabbarHeight
=
Number
(
lift
)
+
50
data
.
statusBarHeight
=
tabbarHeight
}
})
});
});
let
that
=
methods
;
let
that
=
methods
;
return
{
return
{
...
...
src/pages/person/bind.vue
View file @
49644e1e
...
@@ -146,8 +146,11 @@
...
@@ -146,8 +146,11 @@
</view>
-->
</view>
-->
</view>
</view>
</scroll-view>
</scroll-view>
<view
v-if=
"loading"
class=
"addChild-buttom"
@
click=
"setBindHandler"
>
<view
v-if=
"loading
&& exsitsUnionId
"
class=
"addChild-buttom"
@
click=
"setBindHandler"
>
已选
{{
list
.
length
}}
个,确认绑定
已选
{{
list
.
length
}}
个,确认绑定
</view>
<view
v-else-if=
"loading && !exsitsUnionId"
open-type=
"getUserInfo"
class=
"addChild-buttom"
@
click=
"getUserProfile"
>
已选
{{
list
.
length
}}
个,确认绑定
</view>
</view>
<view
v-else
class=
"addChild-buttom active"
>
<view
v-else
class=
"addChild-buttom active"
>
已选
{{
list
.
length
}}
个,确认绑定
已选
{{
list
.
length
}}
个,确认绑定
...
@@ -172,9 +175,12 @@
...
@@ -172,9 +175,12 @@
import
bottom
from
"../../components/bottom"
;
import
bottom
from
"../../components/bottom"
;
import
{
import
{
GetStudentPageList
,
GetStudentPageList
,
Set
MyChild
,
Bind
MyChild
,
setStudentClassInAccount
setStudentClassInAccount
}
from
"../../api/erp"
;
}
from
"../../api/erp"
;
import
{
getWeChatOpenId
}
from
"../../api/index"
;
export
default
{
export
default
{
components
:
{
components
:
{
bottom
,
bottom
,
...
@@ -207,11 +213,42 @@
...
@@ -207,11 +213,42 @@
pageState
:
"more"
,
pageState
:
"more"
,
timer
:
null
,
//防抖
timer
:
null
,
//防抖
isSearched
:
false
,
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'
))
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
()
{
setBindHandler
()
{
if
(
data
.
list
.
length
==
0
)
{
if
(
data
.
list
.
length
==
0
)
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -272,14 +309,17 @@
...
@@ -272,14 +309,17 @@
param
.
WeChatImg
=
userWxInfo
.
userInfo
.
avatarUrl
param
.
WeChatImg
=
userWxInfo
.
userInfo
.
avatarUrl
param
.
UnionId
=
wxUserAuthInfo
.
unionid
param
.
UnionId
=
wxUserAuthInfo
.
unionid
data
.
loading
=
false
data
.
loading
=
false
SetMyChild
(
param
).
then
(
res
=>
{
BindMyChild
(
param
).
then
(
res
=>
{
console
.
log
(
res
.
Code
==
1
)
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
console
.
log
(
'in.....'
)
uni
.
hideLoading
()
uni
.
hideLoading
()
uni
.
showToast
({
uni
.
showToast
({
title
:
'绑定成功'
title
:
'绑定成功'
})
})
//重新获取
//重新获取
let
erpStus
=
uni
.
getStorageSync
(
'ErpStus'
)
let
erpStus
=
uni
.
getStorageSync
(
'ErpStus'
)
erpStus
=
erpStus
?
erpStus
:[]
let
flag
=
false
let
flag
=
false
erpStus
.
forEach
(
x
=>
{
erpStus
.
forEach
(
x
=>
{
if
(
x
.
AccountId
==
res
.
Data
.
AccountId
){
if
(
x
.
AccountId
==
res
.
Data
.
AccountId
){
...
@@ -288,17 +328,22 @@
...
@@ -288,17 +328,22 @@
uni
.
setStorageSync
(
'erpUserInfo'
,
x
)
uni
.
setStorageSync
(
'erpUserInfo'
,
x
)
}
}
})
})
if
(
flag
){
if
(
!
flag
){
erpStus
.
push
(
res
.
Data
)
erpStus
.
push
(
res
.
Data
)
uni
.
setStorageSync
(
'erpUserInfo'
,
res
.
Data
)
uni
.
setStorageSync
(
'erpUserInfo'
,
res
.
Data
)
}
}
uni
.
setStorageSync
(
'ErpStus'
,
erpStus
)
uni
.
setStorageSync
(
'ErpStus'
,
erpStus
)
// if(uni.getStorageSync('users')){
// let users=[]
// users.push(uni.getStorageSync('userInfo'))
// uni.setStorageSync('users',users)
// }
data
.
loading
=
true
data
.
loading
=
true
uni
.
reLaunch
({
uni
.
reLaunch
({
url
:
'/pages/index/index'
url
:
'/pages/index/index'
})
})
}
else
{
}
else
{
console
.
log
(
'..........22'
)
data
.
loading
=
true
data
.
loading
=
true
uni
.
hideLoading
()
uni
.
hideLoading
()
uni
.
showToast
({
uni
.
showToast
({
...
@@ -307,6 +352,7 @@
...
@@ -307,6 +352,7 @@
})
})
}
}
}).
catch
(
e
=>
{
}).
catch
(
e
=>
{
console
.
log
(
e
+
"..........."
)
data
.
loading
=
true
data
.
loading
=
true
uni
.
hideLoading
()
uni
.
hideLoading
()
uni
.
showToast
({
uni
.
showToast
({
...
...
src/pages/person/person.vue
View file @
49644e1e
...
@@ -339,7 +339,14 @@
...
@@ -339,7 +339,14 @@
};
};
let
that
=
methods
;
let
that
=
methods
;
onMounted
(()
=>
{
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
.
VersionUpdate
()
that
.
initColor
()
that
.
initColor
()
});
});
...
...
src/pages/timetable/timeTable.vue
View file @
49644e1e
<
template
>
<
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
style=
"height: 100rpx"
></view>
<view
class=
"navbar"
>
<view
class=
"navbar"
>
...
@@ -497,7 +497,14 @@
...
@@ -497,7 +497,14 @@
activeDay
.
value
=
today
.
day
;
activeDay
.
value
=
today
.
day
;
}
}
sliceWeek
(
today
);
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
;
let
that
=
methods
;
return
{
return
{
...
@@ -522,9 +529,7 @@
...
@@ -522,9 +529,7 @@
onShow
()
{
onShow
()
{
this
.
msg
.
StartTime
=
getToday
(
'y'
,
'm'
)
+
'-01'
;
this
.
msg
.
StartTime
=
getToday
(
'y'
,
'm'
)
+
'-01'
;
this
.
msg
.
EndTime
=
getToday
(
'y'
,
'm'
)
+
'-'
+
getMonthMaxDay
();
this
.
msg
.
EndTime
=
getToday
(
'y'
,
'm'
)
+
'-'
+
getMonthMaxDay
();
if
(
this
.
$isLogin
())
{
this
.
getAllData
()
this
.
getAllData
()
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
this
.
initSwiper
()
this
.
initSwiper
()
...
...
src/utils/request.js
View file @
49644e1e
...
@@ -26,7 +26,7 @@ let request = (param) => {
...
@@ -26,7 +26,7 @@ let request = (param) => {
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
(
'erpUserInfo'
)){
if
(
!
uni
.
getStorageSync
(
'erpUserInfo'
)
||
(
uni
.
getStorageSync
(
'erpUserInfo'
)
&&
uni
.
getStorageSync
(
'userInfo'
))
){
console
.
log
(
'in....'
)
console
.
log
(
'in....'
)
uni
.
showToast
({
uni
.
showToast
({
title
:
"用户凭证失效,请重新授权"
,
title
:
"用户凭证失效,请重新授权"
,
...
...
src/utils/requestErp.js
View file @
49644e1e
...
@@ -27,7 +27,7 @@ let request = (param) => {
...
@@ -27,7 +27,7 @@ let request = (param) => {
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'
)){
if
(
!
uni
.
getStorageSync
(
'userInfo'
)
||
(
uni
.
getStorageSync
(
'erpUserInfo'
)
&&
uni
.
getStorageSync
(
'userInfo'
))
){
uni
.
reLaunch
({
uni
.
reLaunch
({
url
:
"/pages/login/login"
url
:
"/pages/login/login"
})
})
...
...
src/utils/requestMall.js
View file @
49644e1e
//请求电商接口
//请求电商接口
let
host
=
''
let
host
=
''
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
host
=
'http://192.168.10.46:8200/api'
//
host = 'http://192.168.10.46:8200/api'
//
host = "https://mallapi.oytour.com/api"
host
=
"https://mallapi.oytour.com/api"
}
else
{
}
else
{
host
=
"https://mallapi.oytour.com/api"
host
=
"https://mallapi.oytour.com/api"
}
}
...
...
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