<template>
<div
id="index"
@tap="delegate"
>
<div
class="tab-content-block"
:class="{'hide-tab': hideTab}"
v-fixscroll
>
<div v-show='current == "portal"'>
<portal v-if='current == "portal"'></portal>
<div class="launch-wai">
<wx-open-launch-app
id="launch-btn"
appid="wx8a9e85b64c679566"
extinfo="your-extinfo"
@error="handleErrorFn"
@launch="handleLaunchFn"
>
<script type="text/wxtag-template">
<style>.btn { display: flex;align-items: center; }</style>
<div class="btn" style="border-radius: 50px;font-size:15px;color:#ffffff;font-weight:700;padding: 0 50px;height:45px;line-height: 45px;background-color: #FF9700;margin: 0 auto;">前往贝瓦儿歌</div>
</script>
<template>
<button class="btn2">App内查看</button>
</template>
</wx-open-launch-app>
</div>
</div>
</div>
</div>
</template>
<style lang='postcss' scoped>
.launch-wai {
width: 100%;
height: 500px;
background-color: red;
}
.btn2 {
padding: 12px;
width: 200px;
height: 45px;
line-height: 45px;
text-align: center;
font-size: 17px;
border-radius: 22.5px;
}
</style>
<script>
methods: {
handleLaunchFn(){
alert('launch!');
console.log('success');
},
handleErrorFn(){
alert('launch error');
console.log('fail', e.detail);
},
},
</script>
解决了没