Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jd-vx-app
Project
Project
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
Administrator
jd-vx-app
Commits
06d8d6ce
Commit
06d8d6ce
authored
May 11, 2022
by
lijiongliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改token过期问题
新增跳转第三方页面
parent
90267245
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
11 deletions
+55
-11
api.js
common/api/api.js
+3
-3
pages.json
pages.json
+7
-0
index.vue
pages/binding/index.vue
+11
-6
shop.vue
pages/shop.vue
+8
-2
webview.vue
pages/webview/webview.vue
+26
-0
No files found.
common/api/api.js
View file @
06d8d6ce
//
const baseUrl = 'https://jduniapp.uzosp.com/test-api';
const
baseUrl
=
'http://sx2zq2
.natappfree.cc'
;
const
baseUrl
=
'https://jduniapp.uzosp.com/test-api'
;
// const baseUrl = 'http://64qycp
.natappfree.cc';
const
httpRequest
=
(
opts
,
data
)
=>
{
let
httpDefaultOpts
=
{
url
:
baseUrl
+
opts
.
url
,
...
...
@@ -64,7 +64,7 @@ const httpTokenRequest = (opts, data) => {
if
(
res
[
1
].
data
.
code
==
401
){
uni
.
removeStorageSync
(
'userToken'
)
uni
.
navigateTo
({
url
:
"/pages/binding/index"
url
:
"/pages/binding/index
?failure=401
"
})
return
;
}
...
...
pages.json
View file @
06d8d6ce
...
...
@@ -24,6 +24,13 @@
"style"
:
{
"navigationBarTitleText"
:
"绑定友众账号"
}
},
{
"path"
:
"pages/webview/webview"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
],
"subPackages"
:
[
...
...
pages/binding/index.vue
View file @
06d8d6ce
...
...
@@ -62,6 +62,7 @@ export default {
superiorUrl
:
'/pages/main'
,
//上级路径参数
superiorParam
:
"index"
,
failure
:
null
};
},
methods
:
{
...
...
@@ -153,15 +154,18 @@ export default {
opts
=
{
url
:
'/app/user/check/move/code'
,
method
:
'post'
}
that
.
http
.
httpTokenRequest
(
opts
,
param
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
.
bindFlag
)
{
that
.
gotoMoveCar
();
}
else
{
that
.
gotoBindMoveCar
();
}
if
(
res
.
data
.
data
.
bindFlag
)
{
that
.
gotoMoveCar
();
}
else
{
that
.
gotoBindMoveCar
();
}
}
})
}
else
{
}
else
if
(
this
.
failure
==
401
){
uni
.
navigateBack
()
return
}
else
{
that
.
gotoIndex
()
}
...
...
@@ -214,6 +218,7 @@ export default {
},
onLoad
(
e
)
{
//默认加载
let
openid
=
uni
.
getStorageSync
(
'openid'
);
this
.
failure
=
e
.
failure
if
(
!
openid
)
{
this
.
wechatLogin
()
}
else
{
...
...
pages/shop.vue
View file @
06d8d6ce
...
...
@@ -26,7 +26,7 @@
<div
class=
"shop__list__one"
>
<div
class=
"view__title"
>
车主精选 养车必备
</div>
<view
class=
"owner-select"
v-if=
"boutiqueMallList.length > 0"
>
<view
class=
"one_item"
v-for=
"(vo,inx) in boutiqueMallList"
:key=
"inx"
@
click=
"goDetail(vo.id)"
>
<view
class=
"one_item"
v-for=
"(vo,inx) in boutiqueMallList"
:key=
"inx"
@
click=
"goDetail(vo.id
,vo.link
)"
>
<view
class=
"one_item_img"
>
<image
:src=
"getImage(vo.mainImgUrl)"
/>
</view>
...
...
@@ -154,7 +154,13 @@ export default {
url
:
'/pagesC/pages/shop/search'
})
},
goDetail
(
id
)
{
goDetail
(
id
,
link
)
{
if
(
link
){
uni
.
navigateTo
({
url
:
'/pages/webview/webview?url='
+
link
})
return
}
uni
.
navigateTo
({
url
:
'/pagesC/pages/shop/detail?id='
+
id
})
...
...
pages/webview/webview.vue
0 → 100644
View file @
06d8d6ce
<
template
>
<view>
<web-view
:src=
"url"
></web-view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
url
:
''
}
},
onLoad
(
e
)
{
console
.
log
(
e
.
url
,
111111
)
this
.
url
=
e
.
url
},
methods
:
{
}
}
</
script
>
<
style
>
</
style
>
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