Commit a6f7d245 authored by 潘永坪's avatar 潘永坪

详情修改

parent b7128e7e
......@@ -9,8 +9,12 @@
<u-icon name="close" @click="showPop=false"></u-icon>
</view>
<view style="flex: 1;overflow-y: scroll;">
<view>
<u-swiper :list="detailData.imgList" mode="number" height="350" name="url"></u-swiper>
<view v-if="detailData.imgList&&detailData.imgList.length>0">
<u-swiper :list="detailData.imgList" @change="e => currentNum = e.current" indicatorStyle="right: 20px;bottom:25px" height="400">
<view slot="indicator" class="indicator-num">
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ detailData.imgList.length }}</text>
</view>
</u-swiper>
</view>
<view class="middle">
<!-- 景区介绍 -->
......@@ -30,25 +34,25 @@
<!-- 开放时间 -->
<view class="opentime">
<view class="middle-title">开放时间</view>
<uni-table>
<uni-tr v-if="!times">
<uni-td>每天</uni-td>
</uni-tr>
<uni-tr v-if="!times">
<uni-td>
<u-table>
<u-tr v-if="!times">
<u-td>每天</u-td>
</u-tr>
<u-tr v-if="!times">
<u-td>
{{detailData.businessStart?detailData.businessStart.substr(0,5):""}}
~{{detailData.businessEnd?detailData.businessEnd.substr(0,5):""}}
</uni-td>
</uni-tr>
<uni-tr v-if="times">
<uni-td colspan="2">开放时间</uni-td>
</uni-tr>
<uni-tr v-for="(item,index) of times" :key="index" v-if="times">
<uni-td v-for="(items,b) of item" :key="b" v-if="items!=''">
</u-td>
</u-tr>
<u-tr v-if="times">
<u-td colspan="2">开放时间</u-td>
</u-tr>
<u-tr v-for="(item,index) of times" :key="index" v-if="times">
<u-td v-for="(items,b) of item" :key="b" v-if="items">
{{items}}
</uni-td>
</uni-tr>
</uni-table>
</u-td>
</u-tr>
</u-table>
</view>
<!-- 优待政策 -->
<view class="policy" v-if="policy">
......@@ -105,6 +109,7 @@ export default {
props: ['detailData'],
data() {
return {
currentNum:0,//轮播图下标
showPop: false, //控制弹窗显示隐藏
times: '', //时间数组
policy:'', //优待政策列表
......
......@@ -20,12 +20,11 @@
</view>
<view class="banner">
<!-- <u-swiper :list="list" @change="e => currentNum = e.current" indicatorStyle="right: 20px" height="300">
<u-swiper :list="list" @change="e => currentNum = e.current" indicatorStyle="right: 20px" height="300">
<view slot="indicator" class="indicator-num">
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
</view>
</u-swiper> -->
<u-swiper1 :list="list" name='url'></u-swiper1>
</u-swiper>
</view>
</view>
......@@ -227,10 +226,14 @@ export default {
}
},
onLoad(option){
// 首次进入时执行
let companyId=this.$commonjs.getCompanyId(option)
if(!companyId){
this.getCompanyId()
}
},
onShow() {
// 首次进入、后台切入前台时会执行
this.loadIcon()
},
methods: {
......
......@@ -7,7 +7,6 @@
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ imgList.length }}</text>
</view>
</u-swiper>
<!-- <u-swiper :list="imgList" name="url" mode="number" height="200" indicator-pos="topRight"></u-swiper> -->
</view>
<view class="middle">
<view class="tabbar" :style="tabbarObj">
......
<!-- 由于uview2.x的swiper3D版本默认不显示第一张时会出现BUG,故重新引入uview1.x版本的swiper -->
<template>
<view class="u-swiper-wrap" :style="{
borderRadius: `${borderRadius}rpx`
......@@ -49,27 +50,7 @@
</template>
<script>
/**
* swiper 轮播图
* @description 该组件一般用于导航轮播,广告展示等场景,可开箱即用
* @tutorial https://www.uviewui.com/components/swiper.html
* @property {Array} list 轮播图数据,见官网"基本使用"说明
* @property {Boolean} title 是否显示标题文字,需要配合list参数,见官网说明(默认false)
* @property {String} mode 指示器模式,见官网说明(默认round)
* @property {String Number} height 轮播图组件高度,单位rpx(默认250)
* @property {String} indicator-pos 指示器的位置(默认bottomCenter)
* @property {Boolean} effect3d 是否开启3D效果(默认false)
* @property {Boolean} autoplay 是否自动播放(默认true)
* @property {String Number} interval 自动轮播时间间隔,单位ms(默认2500)
* @property {Boolean} circular 是否衔接播放,见官网说明(默认true)
* @property {String} bg-color 背景颜色(默认#f3f4f6)
* @property {String Number} border-radius 轮播图圆角值,单位rpx(默认8)
* @property {Object} title-style 自定义标题样式
* @property {String Number} effect3d-previous-margin mode = true模式的情况下,激活项与前后项之间的距离,单位rpx(默认50)
* @property {String} img-mode 图片的裁剪模式,详见image组件裁剪模式(默认aspectFill)
* @event {Function} click 点击轮播图时触发
* @example <u-swiper :list="list" mode="dot" indicator-pos="bottomRight"></u-swiper>
*/
export default {
name: 'u-swiper1',
props: {
......
<template>
<view class="u-table">
<view class="u-table" :style="[tableStyle]">
<slot />
</view>
</template>
<script>
import props from './props.js';
/**
* Table 表格
* @description 表格组件一般用于展示大量结构化数据的场景 本组件标签类似HTML的table表格,由table、tr、th、td四个组件组成
/**
* table 表格
* @description 表格组件一般用于展示大量结构化数据的场景
* @tutorial https://www.uviewui.com/components/table.html
* @example <u-table><u-tr><u-th>学校</u-th </u-tr> <u-tr><u-td>浙江大学</u-td> </u-tr> <u-tr><u-td>清华大学</u-td> </u-tr></u-table>
* @property {String} border-color 表格边框的颜色(默认#e4e7ed)
* @property {String} bg-color 表格的背景颜色(默认#ffffff)
* @property {String} align 单元格的内容对齐方式,作用类似css的text-align(默认center)
* @property {String} padding 单元格的内边距,同css的padding写法(默认10rpx 0)
* @property {String Number} font-size 单元格字体大小,单位rpx(默认28)
* @property {String} color 单元格字体颜色(默认#606266)
* @property {Object} th-style th单元格的样式,对象形式(将th所需参数放在table组件,是为了避免每一个th组件要写一遍)
* @event {Function} click 点击组件时触发
* @event {Function} close 点击关闭按钮时触发
* @example <u-table></u-table>
*/
export default {
export default {
name: 'u-table',
mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
data() {
return {
props: {
borderColor: {
type: String,
default: '#e4e7ed'
},
align: {
type: String,
default: 'center'
},
// td的内边距
padding: {
type: String,
default: '10rpx 6rpx'
},
// 字体大小
fontSize: {
type: [String, Number],
default: 28
},
// 字体颜色
color: {
type: String,
default: '#606266'
},
// th的自定义样式
thStyle: {
type: Object,
default () {
return {}
}
},
// table的背景颜色
bgColor: {
type: String,
default: '#ffffff'
}
},
data() {
return {}
},
computed: {
tableStyle() {
let style = {}
style.borderLeft = `solid 1px ${this.borderColor}`
style.borderTop = `solid 1px ${this.borderColor}`
style.backgroundColor = this.bgColor
return style
}
}
}
</script>
<style lang="scss" scoped>
@import "../../libs/css/components.scss";
@import "../../libs/css/style.components.scss";
.u-table {
width: 100%;
box-sizing: border-box;
}
</style>
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 to comment