Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
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
程默
mayi-mp-shop
Commits
65016047
Commit
65016047
authored
Oct 08, 2022
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
再次跳转外部小程序无效问题
parent
a9687865
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
10 deletions
+46
-10
src/pages/toMini/index.vue
+46
-10
No files found.
src/pages/toMini/index.vue
View file @
65016047
<
template
>
<div
class=
"text"
>
正在跳转到其他小程序...
<div
v-if=
"loadFlag
<
=
1
"
>
正在跳转到其他小程序...
</div>
<div
v-else
class=
"toMini"
@
click=
"toMini"
>
点击跳转到其他小程序
</div>
</div>
</
template
>
<
script
>
export
default
{
data
(){
return
{
loadFlag
:
0
,
options
:
""
,
}
},
onLoad
(
options
){
wx
.
navigateToMiniProgram
({
appId
:
options
.
weappAppId
,
path
:
decodeURIComponent
(
options
.
weappPage
),
// envVersion: 'release',
extraData
:
options
.
extraData
&&
JSON
.
parse
(
options
.
extraData
),
success
(
res
)
{
// 打开成功
}
})
this
.
options
=
options
;
console
.
log
(
"onLoad"
,
this
.
loadFlag
)
this
.
toMini
();
},
onShow
(){
this
.
loadFlag
++
;
console
.
log
(
"onShow"
,
this
.
loadFlag
)
this
.
toMini
();
},
methods
:
{
toMini
(){
let
_this
=
this
;
wx
.
navigateToMiniProgram
({
appId
:
_this
.
options
.
weappAppId
,
path
:
decodeURIComponent
(
_this
.
options
.
weappPage
),
// envVersion: 'release',
extraData
:
_this
.
options
.
extraData
&&
JSON
.
parse
(
_this
.
options
.
extraData
),
success
(
res
)
{
console
.
log
(
res
,
'--------打开成功'
)
// 打开成功
},
complete
(
res
){
console
.
log
(
res
,
'------------------38'
)
}
})
}
}
}
</
script
>
...
...
@@ -27,4 +51,15 @@
font-size
:
16px
;
color
:
#333
;
}
.toMini
{
width
:
60%
;
margin
:
0
auto
;
margin-top
:
40vh
;
height
:
40px
;
line-height
:
40px
;
padding
:
0
30px
;
color
:
#fff
;
background
:
#41c867
;
border-radius
:
40px
;
}
</
style
>
\ No newline at end of file
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