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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
4 deletions
+40
-4
src/pages/toMini/index.vue
+40
-4
No files found.
src/pages/toMini/index.vue
View file @
65016047
<
template
>
<
template
>
<div
class=
"text"
>
<div
class=
"text"
>
正在跳转到其他小程序...
<div
v-if=
"loadFlag
<
=
1
"
>
正在跳转到其他小程序...
</div>
<div
v-else
class=
"toMini"
@
click=
"toMini"
>
点击跳转到其他小程序
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
(){
return
{
loadFlag
:
0
,
options
:
""
,
}
},
onLoad
(
options
){
onLoad
(
options
){
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
({
wx
.
navigateToMiniProgram
({
appId
:
options
.
weappAppId
,
appId
:
_this
.
options
.
weappAppId
,
path
:
decodeURIComponent
(
options
.
weappPage
),
path
:
decodeURIComponent
(
_this
.
options
.
weappPage
),
// envVersion: 'release',
// envVersion: 'release',
extraData
:
options
.
extraData
&&
JSON
.
parse
(
options
.
extraData
),
extraData
:
_this
.
options
.
extraData
&&
JSON
.
parse
(
_this
.
options
.
extraData
),
success
(
res
)
{
success
(
res
)
{
console
.
log
(
res
,
'--------打开成功'
)
// 打开成功
// 打开成功
},
complete
(
res
){
console
.
log
(
res
,
'------------------38'
)
}
}
})
})
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -27,4 +51,15 @@
...
@@ -27,4 +51,15 @@
font-size
:
16px
;
font-size
:
16px
;
color
:
#333
;
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
>
</
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