Commit cb851553 by 李伟康

修改WeixinOpenTags

1 parent 6ceb6b2b
<template>
<div
:class="['action isFullSucreen flex', { bgBlack: videoFullscreen }, { liveBtn: isImAction }]"
v-if="show"
>
<div
class="btn-box flex"
v-show="!videoFullscreen"
>
<div
class="item"
@click="getPoster"
>
<div :class="['action isFullSucreen flex', { bgBlack: videoFullscreen }, { liveBtn: isImAction }]" v-if="show">
<div class="btn-box flex" v-show="!videoFullscreen">
<div class="item" @click="getPoster">
<div class="sprite-icon icon-poster"></div>
海报
</div>
......@@ -22,22 +13,15 @@
</div>
<button
:class="['btn text-center', { disabled: !detail.isStaffLoginLink && (iSMiniprogram || detail.activityStatus == 3 || detail.buyFlag == 2 || totalGoodsNumber < 1) }, { short: detail.buyFlag == 3 }]"
@click="submit"
@touchstart="touchstart"
@touchend="touchend"
>
@click="submit" @touchstart="touchstart" @touchend="touchend">
<template v-if="detail.isStaffLoginLink">
<template v-if="supportOpenLaunch">
员工注册
<wx-open-launch-weapp
class="mini"
:path="path"
:username="miniprogramInfo.username"
:env-version="miniprogramInfo.envVersion"
>
<wx-open-launch-weapp class="mini" :path="path" :username="miniprogramInfo.username"
:env-version="miniprogramInfo.envVersion">
<script type="text/wxtag-template">
<div class="mini-btn">点击跳转</div>
</script>
</script>
</wx-open-launch-weapp>
</template>
<template v-else>
......@@ -54,32 +38,13 @@
</template>
</template>
</button>
<pay-modal
v-model="showModal"
:list="formList"
@cancel="showModal = false"
@pay="checkOut"
:payStatus="payStatus"
:carInfo="carInfo"
/>
<van-overlay
:show="showPoster"
@click.self="showPoster = false"
>
<div
class="wrapper"
@click.stop
>
<van-image
:src="posterImg"
width="100%"
height="100%"
>
<pay-modal v-model="showModal" :list="formList" @cancel="showModal = false" @pay="checkOut" :payStatus="payStatus"
:carInfo="carInfo" />
<van-overlay :show="showPoster" @click.self="showPoster = false">
<div class="wrapper" @click.stop>
<van-image :src="posterImg" width="100%" height="100%">
<template v-slot:loading>
<van-loading
type="spinner"
size="20"
/>
<van-loading type="spinner" size="20" />
</template>
</van-image>
</div>
......@@ -163,14 +128,14 @@ export default {
let wechat_version = ''
if (MicroMessenger && MicroMessenger.length) wechat_version = MicroMessenger[1]
try {
let [w_a, w_b, w_c] = wechat_version.split('.')
if (!w_c) w_c = 0
if (wechat_version) {
wechat_version = wechat_version.replace(/\./g, '')
if (wechat_version.length == 3) wechat_version = `${wechat_version}0`
if (wechat_version < 7012) throw false
}
/*
* 微信版本要求为:7.0.12及以上
*/
if (w_a < 7) throw false
if (w_a == 7 && w_b == 0 && w_c < 12) throw false
if (userAgent.includes('iPhone') || userAgent.includes('iPad')) {
let phone_version = userAgent.match(/iPhone OS ([\d\_]+)/i)[1]
if (phone_version) {
......@@ -184,7 +149,7 @@ export default {
/**
* 👇 iOS15底层 WebKit 接口发生变更,微信版本8.0.8以下(不包括8.0.8)无法使用开放标签,可引导用户升级最新版本微信
*/
if (wechat_version && a == 15 && w_a == 8 && w_b == 0 && w_c < 8) throw false
if (wechat_version && a == 15 && wechat_version < 8080) throw false
}
}
if (userAgent.includes('Android')) {
......@@ -438,10 +403,12 @@ export default {
z-index: 3;
padding: 0 16px;
animation: show-goods-action 0.5s forwards;
.btn-box {
font-size: 13px;
font-weight: bold;
color: #656566;
.item {
margin-right: 8px;
width: 28px;
......@@ -450,6 +417,7 @@ export default {
overflow: hidden;
}
}
.price {
font-weight: 600;
color: #f13c3d;
......@@ -457,13 +425,16 @@ export default {
display: flex;
align-items: baseline;
margin-left: 10px;
.unit {
font-size: 12px;
}
span {
font-size: 14px;
}
}
.btn {
width: 200px;
height: 40px;
......@@ -478,6 +449,7 @@ export default {
box-sizing: border-box;
line-height: 40px;
position: relative;
.mini {
position: absolute;
left: 0;
......@@ -486,28 +458,34 @@ export default {
height: 100%;
z-index: 2;
opacity: 0;
&-btn {
width: 100%;
height: 100%;
}
}
.sprite-icon {
margin: 0 auto;
}
}
.disabled {
background: #b1b1b1;
border-color: #b1b1b1;
box-shadow: none;
}
.short {
width: 150px;
}
}
.bgBlack {
background: rgba(#000000, 0.6);
z-index: 9;
}
.action.liveBtn {
position: relative;
padding: 0 0 !important;
......@@ -515,10 +493,12 @@ export default {
height: 40px;
background: url('../assets/images/live-btn.png') no-repeat;
background-size: 100% 40px;
.price {
color: #ffffff;
width: calc(100% - 96px);
}
.btn {
background: transparent;
width: 96px;
......@@ -526,18 +506,22 @@ export default {
border-width: 0;
}
}
@keyframes show-goods-action {
0% {
bottom: -100%;
}
100% {
bottom: 0;
}
}
.isFullSucreen {
padding-bottom: constant(safe-area-inset-bottom) !important;
padding-bottom: env(safe-area-inset-bottom) !important;
}
.wrapper {
position: fixed;
left: 50%;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!