| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <template>
- <view style="margin: 0 auto;" :style="{ width: modelData.style === 2 ? '710rpx' : '750rpx' }">
- <u-swiper
- :height="modelData.style === 2 ? '300' : '350'"
- :interval="modelData.interval * 1000"
- :list="modelData.bannerList"
- name="img"
- :autoplay="modelData.autoplay"
- :effect3d="false"
- bg-color="transparent"
- :border-radius="modelData.style === 2 ? '24' : '0'"
- @click="navTo"
- ></u-swiper>
- <NoLoginTip @cancel="cancelTip" :show="loginTip" v-if="loginTip" />
- </view>
- </template>
- <script>
- import NoLoginTip from '../../NoLoginTip.vue';
- export default {
- components: {
- NoLoginTip
- },
- props: {
- modelData: {
- type: Object,
- default: () => {
- return {};
- }
- }
- },
- data() {
- return {
- loginTip: false
- };
- },
- methods: {
- cancelTip() {
- this.loginTip = false;
- },
- navTo(index) {
- if (!this.$common.isLogin()) {
- this.loginTip = true;
- } else {
- this.goPage(this.modelData.bannerList[index].url, this.modelData.bannerList[index].switchTab);
- }
- }
- }
- };
- </script>
- <style scoped lang="scss"></style>
|