1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <template>
- <view >
- <uni-popup ref="inputDialog" class="pop" :mask-click="false" @close="closeAdd">
- <view class="popup-content" >
- <swiper class="swiper-box" @change="swiperChange">
- <swiper-item v-for="(item ,index) in swiperList" :key="index" class="f-straight">
- <image class="img-item" :src="item.url" @click="skipLink(item)" mode="widthFix"></image>
- <view @click="closeAdd" class="f-horizon-center">
- <uni-icons style="display: flex;justify-content: flex-end;" type="closeempty" size="40" color="#fff"/>
- </view>
- </swiper-item>
- </swiper>
- </view>
- </uni-popup>
- </view>
- </template>
- <script setup>
- import { ref, onMounted } from 'vue'
- const current = ref(0)
- const inputDialog = ref()
- const swiperList = [{ url: 'https://minio.menduner.com/dev/260c94447f93c5258e6b5c0db453f9da92ce59bebd1eef6bff3a8063d91d07f1.jpg', path: 'https://mp.weixin.qq.com/s/lI7_iHY1yaEqrb_kG1MusA' }]
- const currentPage = getCurrentPages()[0].route
- const closeAdd = () => {
- inputDialog.value.close()
- uni.removeStorageSync('firstOpen')
- }
- const openDialog = () => {
- inputDialog.value.open()
- }
- const skipLink = ({path}) => {
- closeAdd()
- // if (!uni.getStorageSync('token') && currentPage !== 'pages/login/index') {
- // uni.switchTab({
- // url: '/pages/index/my'
- // })
- // }
- if (path) {
- uni.navigateTo({ url: `/pages/addWebView/index?url=${path}` })
- }
- }
- const swiperChange = (e) => {
- current.value = e.detail.current
- }
- onMounted(() => {
- if(uni.getStorageSync('firstOpen')) openDialog()
- })
- </script>
- <style scoped lang="scss">
- .popup-content {
- align-items: center;
- justify-content: center;
- width: 80vw;
- height: 100vh;
- }
- .img-item{
- width: 100%;
- height: 60vh;
- margin: 0;
- border-radius: 20px;
- }
- .swiper-box{
- height: 100vh;
- }
- .f-straight{
- display: flex;
- justify-content: center;
- flex-direction: column;
- }
- </style>
|