Commit 3df84a6e by hank

bug

parent 767ccb09
<template>
<div class="fuceng">
<div class="fucengBox">
<div class="fucengBox" :class="isPlus ? 'fucengBoxPlus' : ''" :style="{ 'background-image' : 'url(' + bgImg+ ')' }">
<div class="close" @click="closeFuceng">我要报名</div>
</div>
</div>
......@@ -10,7 +10,17 @@
export default {
data() {
return {
bgImg: import('@/pages/index/assets/images/fengceng.png'),
isPlus: false
}
},
created() {
var ua = navigator.userAgent.toLowerCase();
if (/iphone|ipad|ipod/.test(ua) && window.innerWidth >= 414) {
// alert("iphone");
console.log('414')
this.isPlus = true;
this.bgImg = require('@/pages/index/assets/images/fengcengplus.png')
}
},
mounted() {
......@@ -43,7 +53,7 @@ export default {
width: 100%;
// height: 15rem;
height: 100%;
background: url("~@/pages/index/assets/images/fengceng.png") no-repeat center;
background: #2b193f url("~@/pages/index/assets/images/fengceng.png") no-repeat center;
background-size: auto 100%;
position: absolute;
top: 50%;
......@@ -67,6 +77,9 @@ export default {
transform: translate(-50%, 0);
}
}
.fucengBoxPlus {
background-size: 100% auto;
}
}
</style>
......@@ -10,10 +10,12 @@
export default {
data() {
return {
isShow: true
isShow: true,
}
},
created() {
if(localStorage.getItem('fucengBox2')) {
this.isShow = false
}
......
......@@ -8,20 +8,27 @@
</div>
<div class="upLoad">
<!-- @click="addPic" @touch="addPic" -->
<div href="#" class="list-default-img" v-touch:tap="addPicTap" @click.stop="addPic" v-show="isPhoto">
<img src="./assets/images/icon_photo.png">
<p>上传宝贝精彩视频</p>
<p>用视界的力量让宝贝与世同行</p>
<input
type="file"
id="text"
accept="video/*"
@change="onFileChange($event)"
style="display: none;"
<label>
<div
href="#"
class="list-default-img"
@click.stop="addPic"
v-show="isPhoto"
>
<!-- capture="camera" -->
</div>
<!-- <label></label> -->
<img src="./assets/images/icon_photo.png">
<p>上传宝贝精彩视频</p>
<p>用视界的力量让宝贝与世同行</p>
<input
type="file"
id="text"
accept="video/*"
@change="onFileChange($event)"
style="display: none;"
>
<!-- capture="camera" -->
</div>
</label>
<ul class="list-ul" v-if="isPreivw">
<!-- <li v-for="(item, index) in testUrl" :key="index">
<img :src="item" alt>
......@@ -184,11 +191,12 @@ export default {
this.activeIndex = num;
},
addPicTap() {
if(this.isIos) {
if (!this.isClick ) {
if (this.isIos) {
console.log("iosclick");
if (!this.isClick) {
this.isClick = true;
document.querySelector("#text").click();
alert('click end')
alert("click end");
var timer = setTimeout(() => {
this.isClick = false;
clearTimeout(timer);
......@@ -196,10 +204,9 @@ export default {
}
}
},
addPic() {
if (!this.isClick && !this.isIos) {
addPic() {
if (!this.isClick && this.isIos) {
this.isClick = true;
alert()
document.querySelector("#text").click();
var timer = setTimeout(() => {
this.isClick = false;
......
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 sign in to comment