Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
995e90e6
Commit
995e90e6
authored
Aug 15, 2023
by
zeyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.优化拦截器,解决卡顿问题
2.解决h5浏览器打开支付错误问题 3.video宽高比调整
parent
22d839c3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
9 deletions
+13
-9
App.vue
+3
-1
pages/courseDetail/courseDetail.vue
+5
-5
pages/orderConfirm/orderConfirm.vue
+3
-1
util/request.ts
+2
-2
No files found.
App.vue
View file @
995e90e6
<
script
>
<
script
>
import
initApp
from
"@/util/router.js"
;
import
initApp
from
"@/util/router.js"
;
import
{
interceptor
}
from
"@/util/interceptor"
;
import
{
baseURL
,
apiURL
,
cffpURL
}
from
"@/environments/environment"
;
import
{
baseURL
,
apiURL
,
cffpURL
}
from
"@/environments/environment"
;
export
default
{
export
default
{
onLaunch
:
function
()
{
onLaunch
:
function
()
{
...
@@ -61,7 +62,8 @@
...
@@ -61,7 +62,8 @@
})
})
// #endif
// #endif
initApp
()
interceptor
();
initApp
();
},
},
onShow
:
function
()
{
3
,
onShow
:
function
()
{
3
,
console
.
log
(
'App Show'
)
console
.
log
(
'App Show'
)
...
...
pages/courseDetail/courseDetail.vue
View file @
995e90e6
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<view
class=
"courseBannerBox"
v-if=
"!sliceshare"
>
<view
class=
"courseBannerBox"
v-if=
"!sliceshare"
>
<video
v-if=
"isRenderVideo"
id=
"myVideo"
:src=
"courseInfo.filePathOss"
:initial-time=
"viewTime"
<video
v-if=
"isRenderVideo"
id=
"myVideo"
:src=
"courseInfo.filePathOss"
:initial-time=
"viewTime"
object-fit=
"contain"
class=
"videoBox"
:poster=
"courseInfo.fileFirstImage"
:title=
"courseInfo.fileTitle"
object-fit=
"contain"
class=
"videoBox"
:poster=
"courseInfo.fileFirstImage"
:title=
"courseInfo.fileTitle"
@
play=
"playVideo"
@
pause=
"pause"
@
timeupdate=
"timeupdate"
style=
"width: 100vw;height: 3
20
rpx;"
@
play=
"playVideo"
@
pause=
"pause"
@
timeupdate=
"timeupdate"
style=
"width: 100vw;height: 3
12.5
rpx;"
></video>
></video>
</view>
</view>
...
@@ -829,10 +829,10 @@
...
@@ -829,10 +829,10 @@
}
}
.courseBannerBox
{
.courseBannerBox
{
background-color
:
#ebebeb
;
//
background-color
:
#ebebeb
;
display
:
flex
;
//
display
:
flex
;
justify-content
:
center
;
//
justify-content
:
center
;
z-index
:
1
;
//
z-index
:
1
;
}
}
.courseTitleContent
{
.courseTitleContent
{
...
...
pages/orderConfirm/orderConfirm.vue
View file @
995e90e6
...
@@ -168,6 +168,8 @@
...
@@ -168,6 +168,8 @@
<
script
>
<
script
>
import
api
from
"@/api/api"
;
import
api
from
"@/api/api"
;
import
courseItem
from
"@/components/courseItem/courseItem.vue"
;
import
courseItem
from
"@/components/courseItem/courseItem.vue"
;
import
{
apiURL
}
from
"../environments/environment"
;
import
{
nextTick
}
from
"vue"
;
import
{
import
{
nextTick
nextTick
}
from
"vue"
;
}
from
"vue"
;
...
@@ -512,7 +514,7 @@
...
@@ -512,7 +514,7 @@
this
.
isRedirect
=
option
.
isRedirect
;
this
.
isRedirect
=
option
.
isRedirect
;
if
(
this
.
isRedirect
==
1
&&
option
.
userId
)
{
if
(
this
.
isRedirect
==
1
&&
option
.
userId
)
{
uni
.
request
({
uni
.
request
({
url
:
'/api/authorize/obtainToken'
,
url
:
`
${
apiURL
}
/authorize/obtainToken`
,
method
:
'POST'
,
method
:
'POST'
,
data
:
{
ticket
:
'uni-app'
,
loginId
:
option
.
userId
},
data
:
{
ticket
:
'uni-app'
,
loginId
:
option
.
userId
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
...
...
util/request.ts
View file @
995e90e6
import
{
interceptor
}
from
"./interceptor"
;
//
import {interceptor} from "./interceptor";
// 全局请求封装
// 全局请求封装
export
default
(
url
:
string
,
method
:
any
,
params
?:
any
)
=>
{
export
default
(
url
:
string
,
method
:
any
,
params
?:
any
)
=>
{
interceptor
();
//
interceptor();
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
// uni.showLoading({
// uni.showLoading({
// title: '加载中...'
// title: '加载中...'
...
...
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