|
@@ -25,37 +25,41 @@
|
|
|
<text>院内交通</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="right">简介<text class="iconfont icon-dayuhao"></text></view>
|
|
|
+ <view class="right" @tap="toBrief">简介<text class="iconfont icon-dayuhao"></text></view>
|
|
|
</view>
|
|
|
<view class="two_3">
|
|
|
<view class="left">{{config.address||'暂无'}}</view>
|
|
|
- <view class="right">
|
|
|
+ <view class="right" @tap="toMap">
|
|
|
<text class="iconfont icon-ditu"></text>
|
|
|
<text>地图</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="two_4">
|
|
|
+ <view class="two_4" v-if="couponList.length>0">
|
|
|
<view class="left">优惠卷</view>
|
|
|
- <view class="right">领卷<text class="iconfont icon-dayuhao"></text></view>
|
|
|
+ <view class="right" @click="toCoupon">领卷<text class="iconfont icon-dayuhao"></text></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="thr">
|
|
|
<view class="thr_1">门票</view>
|
|
|
<view class="thr_2">
|
|
|
- <text class="text">今日出游</text>
|
|
|
- <text class="text">明日出游</text>
|
|
|
- <text class="text">指定日期<text class="iconfont icon-dayuhao"></text></text>
|
|
|
+ <text class="text" @tap="toChoose('0')">今日出游</text>
|
|
|
+ <text class="text" @tap="toChoose('1')">明日出游</text>
|
|
|
+ <text class="text" @tap="toOpen">指定日期<text class="iconfont icon-dayuhao"></text></text>
|
|
|
</view>
|
|
|
<view class="thr_3">
|
|
|
- <view class="list" v-for="(item, index) in totalList" :key="index">
|
|
|
- <text class="text">{{item.label}}</text>
|
|
|
+ <view class="list" v-for="(item, index) in totalList" :key="index" @tap="toType(item)">
|
|
|
+ <text :class="[is_type==item._id||is_person==item._id?'text_1':'text']">{{item.label}}</text>
|
|
|
+ </view>
|
|
|
+ <view @tap="toSelect">
|
|
|
+ 筛选
|
|
|
+ <uni-icons v-if="is_select" type="top"></uni-icons>
|
|
|
+ <uni-icons v-else type="bottom"></uni-icons>
|
|
|
</view>
|
|
|
- <view>筛选</view>
|
|
|
</view>
|
|
|
<view class="thr_4">
|
|
|
<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
|
|
|
<view class="list-scroll-view">
|
|
|
- <view class="list" v-for="(item, index) in list" :key="index">
|
|
|
+ <view class="list" v-for="(item, index) in list" :key="index" @tap="toInfo(item)">
|
|
|
<view class="left">
|
|
|
<view class="name textOne">{{item.name||'暂无'}}</view>
|
|
|
<view class="type textOne">#{{item.zhType||'暂无'}}</view>
|
|
@@ -70,7 +74,7 @@
|
|
|
<text>¥{{item.money||'暂无'}}起</text>
|
|
|
</view>
|
|
|
<view class="button">
|
|
|
- <button type="warn" @tap.stop="toBuy(item)">预订</button>
|
|
|
+ <button @tap.stop="toBuy(item)">预订</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -82,10 +86,39 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <!-- 日历选择 -->
|
|
|
+ <uni-calendar ref="calendar" :clear-date="true" :insert="false" :lunar="true" :range="true"
|
|
|
+ @confirm="toConfirm" />
|
|
|
+ <!-- 筛选门票类型 -->
|
|
|
+ <uni-popup ref="popup" type="top" background-color="#fff" @maskClick="toClose">
|
|
|
+ <view class="popup">
|
|
|
+ <view class="one">
|
|
|
+ <view class="name">出游人群</view>
|
|
|
+ <view class="cotent">
|
|
|
+ <view class="list" v-for="(item, index) in personList" :key="index" @tap="toScreen(item,'0')">
|
|
|
+ <text :class="[is_person==item._id?'text_1':'text']">{{item.label}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="one">
|
|
|
+ <view class="name">服务特色</view>
|
|
|
+ <view class="cotent">
|
|
|
+ <view class="list" v-for="(item, index) in typeList" :key="index" @tap="toScreen(item,'1')">
|
|
|
+ <text :class="[is_type==item._id?'text_1':'text']">{{item.label}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="button">
|
|
|
+ <button class="button_1" type="default" @tap.stop="toReset">重置</button>
|
|
|
+ <button class="button_2" type="default" @tap.stop="toSubmit">确定</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import moment from 'moment';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -101,11 +134,17 @@
|
|
|
// 数据是否触底
|
|
|
is_bottom: false,
|
|
|
scrollTop: 0,
|
|
|
+ // 优惠卷
|
|
|
+ couponList: [],
|
|
|
// 字典表
|
|
|
statusList: [],
|
|
|
personList: [],
|
|
|
typeList: [],
|
|
|
- totalList: []
|
|
|
+ totalList: [],
|
|
|
+ // 是否筛选
|
|
|
+ is_select: false,
|
|
|
+ is_person: '',
|
|
|
+ is_type: '',
|
|
|
}
|
|
|
},
|
|
|
onLoad: async function(e) {
|
|
@@ -185,10 +224,96 @@
|
|
|
that.clearPage();
|
|
|
that.search();
|
|
|
},
|
|
|
+ // 简介
|
|
|
+ toBrief() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pagesHome/info/index`
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 地图
|
|
|
+ toMap() {
|
|
|
+ uni.reLaunch({
|
|
|
+ url: `/pages/map/index`
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 领卷
|
|
|
+ toCoupon() {
|
|
|
+
|
|
|
+ },
|
|
|
+ // 打开日历
|
|
|
+ toOpen() {
|
|
|
+ const that = this;
|
|
|
+ that.$refs.calendar.open()
|
|
|
+ },
|
|
|
+ // 选择的日期
|
|
|
+ toConfirm(e) {
|
|
|
+ const that = this;
|
|
|
+ that.$set(that.searchInfo, `date`, e.fulldate)
|
|
|
+ that.clearPage();
|
|
|
+ that.search();
|
|
|
+ },
|
|
|
+ // 选择当天还是明天
|
|
|
+ toChoose(type) {
|
|
|
+ const that = this;
|
|
|
+ if (type == '0') that.$set(that.searchInfo, `date`, moment().format('YYYY-MM-DD'))
|
|
|
+ else that.$set(that.searchInfo, `date`, moment(new Date()).add(1, 'days').format("YYYY-MM-DD"))
|
|
|
+ that.clearPage();
|
|
|
+ that.search();
|
|
|
+ },
|
|
|
+ // 选择类型
|
|
|
+ toType(item) {
|
|
|
+ const that = this;
|
|
|
+ if (item.type == 'ticket_person') {
|
|
|
+ that.$set(that.searchInfo, `type`, '')
|
|
|
+ that.$set(that.searchInfo, `person`, item.value)
|
|
|
+ } else {
|
|
|
+ that.$set(that.searchInfo, `person`, '')
|
|
|
+ that.$set(that.searchInfo, `type`, item.value)
|
|
|
+ }
|
|
|
+ that.clearPage();
|
|
|
+ that.search();
|
|
|
+ },
|
|
|
+ // 筛选打开弹窗
|
|
|
+ toSelect() {
|
|
|
+ const that = this;
|
|
|
+ that.$set(that, `is_select`, true)
|
|
|
+ that.$refs.popup.open()
|
|
|
+ },
|
|
|
+ // 关闭弹窗
|
|
|
+ toClose() {
|
|
|
+ const that = this;
|
|
|
+ that.$set(that, `is_select`, false)
|
|
|
+ that.$refs.popup.close()
|
|
|
+ },
|
|
|
+ // 筛选
|
|
|
+ toScreen(item, type) {
|
|
|
+ const that = this;
|
|
|
+ if (type == '0') that.$set(that, `is_person`, item._id)
|
|
|
+ else that.$set(that, `is_type`, item._id)
|
|
|
+ },
|
|
|
+ // 重置
|
|
|
+ toReset() {
|
|
|
+ const that = this;
|
|
|
+ that.$set(that, `is_person`, '')
|
|
|
+ that.$set(that, `is_type`, '')
|
|
|
+ that.$set(that.searchInfo, `person`, '')
|
|
|
+ that.$set(that.searchInfo, `type`, '')
|
|
|
+ },
|
|
|
+ // 确定
|
|
|
+ toSubmit() {
|
|
|
+ const that = this;
|
|
|
+ const person = that.personList.find(i => i._id == that.is_person)
|
|
|
+ if (person) that.$set(that.searchInfo, `person`, person.value)
|
|
|
+ const type = that.typeList.find(i => i._id == that.is_type)
|
|
|
+ if (type) that.$set(that.searchInfo, `type`, type.value)
|
|
|
+ that.clearPage();
|
|
|
+ that.search();
|
|
|
+ that.toClose();
|
|
|
+ },
|
|
|
// 详情
|
|
|
toInfo(e) {
|
|
|
uni.navigateTo({
|
|
|
- url: `/pagesHome/hotel/info?id=${e.id||e._id}`
|
|
|
+ url: `/pagesHome/ticket/info?id=${e.id||e._id}`
|
|
|
})
|
|
|
},
|
|
|
// 预订
|
|
@@ -437,9 +562,20 @@
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
+ .text_1 {
|
|
|
+ margin: 0 5px 0 0;
|
|
|
+ padding: 1vw;
|
|
|
+ border-radius: 5px;
|
|
|
+ font-size: var(--font12Size);
|
|
|
+ color: var(--mainColor);
|
|
|
+ background-color: var(--f3CColor);
|
|
|
|
|
|
+ .iconfont {
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.thr_4 {
|
|
@@ -506,6 +642,7 @@
|
|
|
button {
|
|
|
font-size: var(--font14Size);
|
|
|
border-radius: 40px;
|
|
|
+ color: var(--mainColor);
|
|
|
background: linear-gradient(to right, #00BFFF, #007AFF);
|
|
|
}
|
|
|
}
|
|
@@ -516,6 +653,64 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .popup {
|
|
|
+ padding: 2vw;
|
|
|
+
|
|
|
+ .one {
|
|
|
+ padding: 2vw;
|
|
|
+
|
|
|
+ .name {
|
|
|
+ padding: 2vw 0;
|
|
|
+ font-size: var(--font16Size);
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ .cotent {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ margin: 5vw 0;
|
|
|
+
|
|
|
+ .list {
|
|
|
+ margin: 0 0 5vw 0;
|
|
|
+
|
|
|
+ .text {
|
|
|
+ margin: 0 5px 0 0;
|
|
|
+ padding: 2vw 7vw;
|
|
|
+ border-radius: 5px;
|
|
|
+ font-size: var(--font14Size);
|
|
|
+ color: var(--f69Color);
|
|
|
+ background-color: var(--f9Color);
|
|
|
+ }
|
|
|
+
|
|
|
+ .text_1 {
|
|
|
+ margin: 0 5px 0 0;
|
|
|
+ padding: 2vw 7vw;
|
|
|
+ border-radius: 5px;
|
|
|
+ font-size: var(--font14Size);
|
|
|
+ color: var(--mainColor);
|
|
|
+ background-color: var(--f3CColor);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .button {
|
|
|
+ display: flex;
|
|
|
+ padding: 2vw;
|
|
|
+
|
|
|
+ button {
|
|
|
+ width: 30vw;
|
|
|
+ font-size: var(--font16Size);
|
|
|
+ border-radius: 40px;
|
|
|
+ }
|
|
|
+
|
|
|
+ button:last-child {
|
|
|
+ color: var(--mainColor);
|
|
|
+ background: linear-gradient(to right, #00BFFF, #007AFF);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.scroll-view {
|
|
|
position: absolute;
|
|
|
top: 0;
|