增加了引导弹窗

This commit is contained in:
GaoHao
2024-12-13 16:03:33 +08:00
parent 9083c9a454
commit 073f8a0797
6 changed files with 60 additions and 10 deletions

View File

@@ -1,3 +1,4 @@
<script> <script>
import config from '@/common/config.js' import config from '@/common/config.js'
export default { export default {

View File

@@ -1,5 +1,6 @@
<template> <template>
<view style="padding-bottom: 20rpx;"> <view style="padding-bottom: 20rpx;">
<!-- 自定义导航栏带搜索 --> <!-- 自定义导航栏带搜索 -->
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<u-navbar :background="background" height="60" :is-back="false" :title="title" :border-bottom="false"> <u-navbar :background="background" height="60" :is-back="false" :title="title" :border-bottom="false">
@@ -177,6 +178,12 @@
:existTabBar="true" @btnClick="btnClick" /> --> :existTabBar="true" @btnClick="btnClick" /> -->
<u-image @click="goMsg('/me/choujiang/choujiang')" :src="`../../static/images/draw/draw.gif`" <u-image @click="goMsg('/me/choujiang/choujiang')" :src="`../../static/images/draw/draw.gif`"
style="width: 150rpx;height: 150rpx;position: fixed;right: 30rpx;bottom: 180rpx;"></u-image> style="width: 150rpx;height: 150rpx;position: fixed;right: 30rpx;bottom: 180rpx;"></u-image>
<!-- #ifdef H5 -->
<div v-if="isWeixin" style="width: 100%;height: 100%;position: fixed;top: 0;z-index: 999;background: url('../../static/images/open_guide.png') no-repeat center bottom / cover;"></div>
<!-- #endif -->
<!-- #ifdef H5 -->
<div v-if="isIos" @click="isIos=false" style="width: 100%;height: 100%;position: fixed;top: 0;z-index: 999;background: url('../../static/images/index_guide.png') no-repeat center bottom / 100%;background-color: rgba(0, 0, 0, 0.8);"></div>
<!-- #endif -->
</view> </view>
</template> </template>
@@ -233,6 +240,8 @@
newVideList: [], //最新热播 newVideList: [], //最新热播
videoInfo: [], videoInfo: [],
draw: Math.floor((Math.random() * 12) + 1), draw: Math.floor((Math.random() * 12) + 1),
isWeixin: false,
isIos: true,
}; };
}, },
onShareAppMessage(res) { onShareAppMessage(res) {
@@ -317,7 +326,17 @@
} }
}) })
} }
let u = navigator.userAgent;
if ( u.toLowerCase().indexOf('micromessenger') !== -1) {
this.isWeixin = true
}
// uni.removeStorageSync('isIos')
if ( u.indexOf('iPhone') > -1 && !uni.getStorageSync('isIos')) {
uni.setStorageSync('isIos', true)
this.isIos = true
} else {
this.isIos = false
}
}, },
onShow() { onShow() {
//本周热门 //本周热门

View File

@@ -1,12 +1,12 @@
<template> <template>
<view class="containers"> <view class="containers">
<image style="width: 100%;position: absolute;" src="../../static/images/appeq_bg.png" mode="widthFix"></image> <div style="width: 100%;height: 85%;position: absolute;background: url('../../static/images/appeq_bg.png') no-repeat center bottom / cover;"></div>
<view style="text-align: center;position: relative;height: 100%;"> <view style="text-align: center;position: relative;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;">
<image style="width: 124rpx;height: 124rpx;margin-top: 162rpx;border-radius:20upx;" src="../../static/images/appLogo.png"></image> <image style="width: 124rpx;height: 124rpx;margin-top: -920rpx;border-radius:20upx;" src="../../static/images/appLogo.png"></image>
<view style="font-size: 40rpx;margin-top: 32rpx;color: #FFFFFF;font-weight: bold;">斯耀短剧APP</view> <view style="font-size: 40rpx;margin-top: 22rpx;color: #FFFFFF;font-weight: bold;">斯耀短剧APP{{isWeixin}}</view>
<view style="font-size: 28rpx;margin-top: 16rpx;color: #FFFFFF;font-weight: bold;">海量电子榨菜 免费又过瘾</view> <view style="font-size: 28rpx;margin-top: 16rpx;color: #FFFFFF;font-weight: bold;">海量电子榨菜 免费又过瘾</view>
<button class="confirm-btn" @click="taobaoLogin">斯耀短剧APP</button> <button class="confirm-btn" @click="taobaoLogin">{{confirmBtn}}</button>
</view> </view>
<view id="shareit" v-if="show_share" @tap="closeShare"> <view id="shareit" v-if="show_share" @tap="closeShare">
@@ -14,6 +14,9 @@
</image> </image>
<view id="follow">点击右上角按钮选择浏览器打开下载</view> <view id="follow">点击右上角按钮选择浏览器打开下载</view>
</view> </view>
<!-- #ifdef H5 -->
<div v-if="isWeixin" style="width: 100%;height: 100%;position: absolute;top: 0;background: url('../../static/images/open_guide.png') no-repeat center bottom / cover;"></div>
<!-- #endif -->
</view> </view>
</template> </template>
<script> <script>
@@ -28,11 +31,22 @@
openShares: false, openShares: false,
relationId: '', relationId: '',
sending: false, sending: false,
confirmBtn: '斯耀短剧APP',
isWeixin: false,
}; };
}, },
onLoad(e) { onLoad(e) {
let u = navigator.userAgent;
if ( u.indexOf('iPhone') > -1) {
// #ifdef H5
this.confirmBtn = "跳转网页版首页"
// #endif
}
if ( u.toLowerCase().indexOf('micromessenger') !== -1) {
this.isWeixin = true
}
}, },
methods: { methods: {
closeShare() { closeShare() {
@@ -81,6 +95,7 @@
} }
}); });
} else { } else {
this.$Request.get('/app/common/type/50').then(res => { this.$Request.get('/app/common/type/50').then(res => {
if (res.code == 0) { if (res.code == 0) {
if (res.data && res.data.value) { if (res.data && res.data.value) {
@@ -95,6 +110,9 @@
// #endif // #endif
// #ifdef H5 // #ifdef H5
window.location.href = res.data.value; window.location.href = res.data.value;
// uni.switchTab({
// url: 'pages/index/index'
// })
// #endif // #endif
} else { } else {
this.show_share = true; this.show_share = true;
@@ -112,7 +130,11 @@
// this.$queue.showToast('邀请码复制成功'); // this.$queue.showToast('邀请码复制成功');
} }
}); });
window.location.href = res.data.value;
uni.switchTab({
url: '/pages/index/index'
})
// window.location.href = res.data.value;
// #endif // #endif
} }
} }
@@ -276,6 +298,6 @@
position: absolute; position: absolute;
left: 0; left: 0;
right: 0; right: 0;
bottom: 160rpx; bottom: 70rpx;
} }
</style> </style>

View File

@@ -45,6 +45,9 @@
<navigator url="/me/setting/xieyi" open-type="navigate" style="color: #37A6FF;">用户协议</navigator> <navigator url="/me/setting/xieyi" open-type="navigate" style="color: #37A6FF;">用户协议</navigator>
</view> </view>
</view> </view>
<!-- #ifdef H5 -->
<div v-if="isWeixin" style="width: 100%;height: 100%;position: fixed;top: 0;z-index: 999;background: url('../../static/images/open_guide.png') no-repeat center bottom / cover;"></div>
<!-- #endif -->
</view> </view>
</template> </template>
@@ -63,6 +66,7 @@
invitation: '', invitation: '',
registerCode: '', registerCode: '',
qdCodeion: '', qdCodeion: '',
isWeixin: false,
}; };
}, },
onLoad(e) { onLoad(e) {
@@ -79,6 +83,10 @@
this.registerCode = res.data.value this.registerCode = res.data.value
} }
}); });
let u = navigator.userAgent;
if ( u.toLowerCase().indexOf('micromessenger') !== -1) {
this.isWeixin = true
}
}, },
methods: { methods: {
isShowAgree() { isShowAgree() {

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB