disable sharing block

This commit is contained in:
huanqing.shao
2019-11-01 00:10:32 +08:00
parent 2787c89a44
commit f733109d1d
2 changed files with 10 additions and 6 deletions

View File

@ -1,8 +1,8 @@
<template> <template>
<!-- <div> <div>
<slot></slot> <slot></slot>
</!--> </div>
<div style="border: solid 1px #E6A23C; background-color: rgb(253, 246, 236); padding: 1rem;"> <!-- <div style="border: solid 1px #E6A23C; background-color: rgb(253, 246, 236); padding: 1rem;">
<div v-show="!authorized" key="not"> <div v-show="!authorized" key="not">
<p style="color: red; font-weight: 500;">免费解锁全站文档</p> <p style="color: red; font-weight: 500;">免费解锁全站文档</p>
<li>扫描二维码加微信获得验证码</li> <li>扫描二维码加微信获得验证码</li>
@ -42,7 +42,7 @@
</el-alert> </el-alert>
<slot></slot> <slot></slot>
</div> </div>
</div> </div> -->
</template> </template>
<script> <script>

View File

@ -35,8 +35,12 @@ module.exports = {
['script', { type: 'text/javascript' }, ` ['script', { type: 'text/javascript' }, `
window.onload = function() { window.onload = function() {
if (window.innerWidth > 1360) { if (window.innerWidth > 1360) {
console.log('init-wechat') if (location.search !== undefined && location.search.indexOf('sharing') >= 0) {
IcsWebSdkJs.init('https://bot.4paradigm.com/web/chat/15516/bbc69136-e42c-4299-ba85-c57685c8417d') console.log('正在分享,不显示机器人')
} else {
console.log('init-wechat')
IcsWebSdkJs.init('https://bot.4paradigm.com/web/chat/15516/bbc69136-e42c-4299-ba85-c57685c8417d')
}
} else { } else {
console.log('窗口太小,不显示机器人') console.log('窗口太小,不显示机器人')
} }