Commit cb851553 by 李伟康

修改WeixinOpenTags

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