Commit 7129e4ba authored by beisir's avatar beisir

feat:创建微信浏览器引导弹窗

parent 9811fb3b
...@@ -129,6 +129,13 @@ export default { ...@@ -129,6 +129,13 @@ export default {
imgUrl: sharePicData.skuImg, // 图片地 imgUrl: sharePicData.skuImg, // 图片地
posterUrl: sharePicData.posterUrl posterUrl: sharePicData.posterUrl
}; };
// this.shareInfo = {
// title: '超值0元购',
// desc: '拼团成功全额退款免费送回家',
// link: 'http://192.168.29.73:8080/groupBuy/list?activityId=82&vccToken={token}', // 页面地址
// imgUrl: 'https://appsync.lkbang.net/FrAnqyCCc2lLl13p_bW0hDCNvmqP', // 图片地
// posterUrl: 'https://kdspstatic.q-gp.com/sku_pic_3761633428276594.png'
// };
}, },
filterShareInfo() { filterShareInfo() {
const type = this.type; const type = this.type;
...@@ -171,7 +178,7 @@ export default { ...@@ -171,7 +178,7 @@ export default {
// const linkParams = encodeURIComponent(JSON.stringify({ url: linkPath })); // const linkParams = encodeURIComponent(JSON.stringify({ url: linkPath }));
// return `${linkPrve}&extraInfo=${linkParams}`; // return `${linkPrve}&extraInfo=${linkParams}`;
// } // }
return linkPath; return encodeURIComponent(linkPath);
}, },
shareOpenWechat() { shareOpenWechat() {
this.showShare = true; this.showShare = true;
...@@ -241,6 +248,7 @@ export default { ...@@ -241,6 +248,7 @@ export default {
} }
} }
}; };
alert(link);
this.nativeBridge.showShareView(data); this.nativeBridge.showShareView(data);
}, },
tipDialogMessage() { tipDialogMessage() {
......
<template> <template>
<!-- 狼大呜原始ID:gh_e1d790d67513 <cr-popup v-model="show" class="wchat-popup" :close-on-click-overlay="false">
羊小咩原始ID:gh_a976018bfb9e --> <div class="wchat-popup-dialog">
<wx-open-launch-weapp <div class="wchat-popup-message">
class="launch-btn" <div>请在微信小程序中参与此活动哦~</div>
username="gh_a976018bfb9e" </div>
:path="newJumpUrl" <div class="wchat-popup-footer">
@launch="launch" <div plain type="primary" class="wchat-popup-confirm">
@error="launchError" 打开微信小程序
> <!-- 狼大呜原始ID:gh_e1d790d67513
<script type="text/wxtag-template"> 羊小咩原始ID:gh_a976018bfb9e -->
<style>.btn {position: absolute;top: 0;left: 0;width: 100%;height: 100%;}</style> <wx-open-launch-weapp
<div class="btn">打开小程序</div> class="launch-btn"
</script> username="gh_a976018bfb9e"
</wx-open-launch-weapp> :path="newJumpUrl"
@launch="launch"
@error="launchError"
>
<script type="text/wxtag-template">
<style>.btn {height: 100%;width: 100%;}</style>
<div class="btn">打开小程序</div>
</script>
</wx-open-launch-weapp>
</div>
</div>
</div>
</cr-popup>
</template> </template>
<script> <script>
import wx from 'weixin-js-sdk'; import wx from 'weixin-js-sdk';
...@@ -31,7 +43,9 @@ export default { ...@@ -31,7 +43,9 @@ export default {
jumpUrl: String jumpUrl: String
}, },
data() { data() {
return {}; return {
show: true
};
}, },
computed: { computed: {
newJumpUrl() { newJumpUrl() {
...@@ -64,8 +78,53 @@ export default { ...@@ -64,8 +78,53 @@ export default {
}; };
</script> </script>
<style lang="less"> <style lang="less">
.wchat-popup {
overflow-y: visible !important;
.wchat-popup-dialog {
position: fixed;
top: 50%;
left: 50%;
width: 310px;
font-size: 16px;
background-color: #fff;
border-radius: 0.426667rem;
transform: translate3d(-50%, -50%, 0);
backface-visibility: hidden;
transition: 0.3s;
transition-property: transform, opacity;
}
.wchat-popup-message {
max-height: 60vh;
padding: 0.64rem;
overflow-y: auto;
font-size: 0.426667rem;
line-height: 0.586667rem;
white-space: pre-wrap;
text-align: center;
word-wrap: break-word;
-webkit-overflow-scrolling: touch;
}
.wchat-popup-footer {
height: 48px;
overflow: hidden;
user-select: none;
border-bottom-left-radius: 0.426667rem;
border-bottom-right-radius: 0.426667rem;
border-top: solid 1px #f4f4f4;
}
.wchat-popup-confirm {
color: #ec1500;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
}
.launch-btn { .launch-btn {
position: fixed; position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment