|
|
|
|
@ -4,22 +4,22 @@
|
|
|
|
|
<image src="../../static/img/index_bg.jpg" class="index_bg"></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="box-notice">
|
|
|
|
|
<u-notice-bar @click="openInfo" :text="list" direction="column" mode="link" color="#9E8F8B"></u-notice-bar>
|
|
|
|
|
<u-notice-bar @click="openInfo" :text="list" direction="column" color="#9E8F8B"></u-notice-bar>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="box-body">
|
|
|
|
|
<view class="box-body-title">
|
|
|
|
|
<image src="../../static/img/index_name.png" class="box-body-title-img"></image>
|
|
|
|
|
<view class="box-body-sub-title">开馆时间:周二~周日 9:00-17:00 周一闭馆</view>
|
|
|
|
|
<view class="box-body-sub-title">开馆时间:{{info.sub_title||""}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view style="margin-top: 56rpx;">
|
|
|
|
|
<view class="box-row">
|
|
|
|
|
<view class="box-col" @click="openBook">
|
|
|
|
|
<view class="box-col" @click="handleBook(1)">
|
|
|
|
|
<image src="../../static/img/index_icon_1.png" class="box-body-icon"></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="box-col" @click="openActivity">
|
|
|
|
|
<view class="box-col" @click="handleBook(2)">
|
|
|
|
|
<image src="../../static/img/index_icon_2.png" class="box-body-icon"></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="box-col" @click="openPark">
|
|
|
|
|
<view class="box-col" @click="handleBook(3)">
|
|
|
|
|
<image src="../../static/img/index_icon_3.png" class="box-body-icon"></image>
|
|
|
|
|
</view>
|
|
|
|
|
</u-row>
|
|
|
|
|
@ -91,8 +91,6 @@
|
|
|
|
|
{{(currentTime.start_time||"")+"-"+(currentTime.end_time||"")}}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="book-box-selectInfo-right">
|
|
|
|
|
<text class="book-box-selectInfo-righttxt">预约须知</text>
|
|
|
|
|
<u-icon name="arrow-right" color="#EF9525" size="20rpx"></u-icon>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="mpopup-footer">
|
|
|
|
|
@ -108,16 +106,29 @@
|
|
|
|
|
<u-calendar ref="calendar" :show-confirm="false" :show="showCalendar" :minDate="minDate" :maxDate="maxDate"
|
|
|
|
|
color="#EF9525" round="20" defaultDate="2022-02-15" @confirm="handleSelectDate" @close="closecalendar">
|
|
|
|
|
</u-calendar>
|
|
|
|
|
<u-popup :show="showInfo" mode="center" @close="closeInfo" @open="openInfo" :round="10" closeable>
|
|
|
|
|
<u-popup :show="showInfo" mode="center" @close="closeInfo" :round="10" closeable>
|
|
|
|
|
<view class="mpopup">
|
|
|
|
|
<view class="mpopup-title">
|
|
|
|
|
通知
|
|
|
|
|
{{currentNotice.name}}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="mpopup-content">
|
|
|
|
|
<text>人生若只如初见,何事秋风悲画扇</text>
|
|
|
|
|
<view class="mpopup-content" style="padding: 40rpx 20rpx;">
|
|
|
|
|
<rich-text :nodes="currentNotice.content"></rich-text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-popup>
|
|
|
|
|
|
|
|
|
|
<u-popup :show="showAuthorization" closeable mode="bottom" @close="closePhone" :round="10">
|
|
|
|
|
<view class="box">
|
|
|
|
|
<view class="box-title" style="text-align: center;padding: 20rpx 0;font-size: 32rpx;">
|
|
|
|
|
请授权您的手机号
|
|
|
|
|
</view>
|
|
|
|
|
<view class="box-content" style="padding: 20px;">
|
|
|
|
|
<u-button type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">授权手机号
|
|
|
|
|
</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-popup>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -135,28 +146,50 @@
|
|
|
|
|
minDate: `${year}-${month}-${date + 1}`,
|
|
|
|
|
maxDate: `${year}-${month}-${date + 7}`,
|
|
|
|
|
showCalendar: false,
|
|
|
|
|
list: [
|
|
|
|
|
'寒雨连江夜入吴',
|
|
|
|
|
'平明送客楚山孤',
|
|
|
|
|
'洛阳亲友如相问',
|
|
|
|
|
'一片冰心在玉壶'
|
|
|
|
|
],
|
|
|
|
|
list: ["暂无通知通告"],
|
|
|
|
|
info: {},
|
|
|
|
|
listDatePrice: [],
|
|
|
|
|
currentDate: {},
|
|
|
|
|
currentTime: {},
|
|
|
|
|
currentIndex: 0,
|
|
|
|
|
listCalendar: []
|
|
|
|
|
listCalendar: [],
|
|
|
|
|
listNotice: [],
|
|
|
|
|
currentNotice: {},
|
|
|
|
|
showAuthorization: false,
|
|
|
|
|
openType: 1
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad() {
|
|
|
|
|
this.loadInfo()
|
|
|
|
|
this.loadInfo();
|
|
|
|
|
this.loadNotice();
|
|
|
|
|
},
|
|
|
|
|
onReady() {
|
|
|
|
|
// 如果需要兼容微信小程序的话,需要用此写法
|
|
|
|
|
this.$refs.calendar.setFormatter(this.formatter)
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
closePhone() {
|
|
|
|
|
this.showAuthorization = false
|
|
|
|
|
},
|
|
|
|
|
getPhoneNumber(e) {
|
|
|
|
|
var that = this;
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/mobile/user/mobile',
|
|
|
|
|
data: {
|
|
|
|
|
code: e.detail.code
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
that.util.getUserInfo(function(r) {
|
|
|
|
|
that.checkUser();
|
|
|
|
|
}, true)
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
closecalendar() {
|
|
|
|
|
this.showCalendar = false;
|
|
|
|
|
},
|
|
|
|
|
@ -236,17 +269,44 @@
|
|
|
|
|
url: "/pages/park/index"
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
openInfo() {
|
|
|
|
|
openInfo(e) {
|
|
|
|
|
this.currentNotice = this.listNotice[e];
|
|
|
|
|
this.showInfo = true;
|
|
|
|
|
},
|
|
|
|
|
closeInfo() {
|
|
|
|
|
this.showInfo = false;
|
|
|
|
|
},
|
|
|
|
|
loadUser(cb) {
|
|
|
|
|
var that = this;
|
|
|
|
|
this.util.getOpenidInfo(function(res) {
|
|
|
|
|
that.util.getUserInfo(function(r) {
|
|
|
|
|
cb(r);
|
|
|
|
|
}, true)
|
|
|
|
|
}, true);
|
|
|
|
|
},
|
|
|
|
|
handleBook(type) {
|
|
|
|
|
this.openType = type;
|
|
|
|
|
uni.$u.throttle(this.checkUser, 1500)
|
|
|
|
|
},
|
|
|
|
|
checkUser() {
|
|
|
|
|
let type = this.openType;
|
|
|
|
|
var that = this;
|
|
|
|
|
that.loadUser(function(res) {
|
|
|
|
|
if (that.util.isNull(res.mobile)) {
|
|
|
|
|
that.showAuthorization = true;
|
|
|
|
|
} else {
|
|
|
|
|
that.showAuthorization = false;
|
|
|
|
|
if (type == 1) that.openBook();
|
|
|
|
|
else if (type == 2) that.openActivity()
|
|
|
|
|
else if (type == 3) that.openPark()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
openBook() {
|
|
|
|
|
var that = this;
|
|
|
|
|
var sdate = this.$moment().format("yyyy-MM-DD");
|
|
|
|
|
this.showBook = true;
|
|
|
|
|
this.load3Day(sdate)
|
|
|
|
|
var sdate = that.$moment().format("yyyy-MM-DD");
|
|
|
|
|
that.showBook = true;
|
|
|
|
|
that.load3Day(sdate)
|
|
|
|
|
},
|
|
|
|
|
closeBook() {
|
|
|
|
|
this.showBook = false;
|
|
|
|
|
@ -262,7 +322,26 @@
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/mobile/visit/introduce',
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
console.log(res)
|
|
|
|
|
console.log(res);
|
|
|
|
|
that.info = res;
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
loadNotice() {
|
|
|
|
|
var that = this;
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/mobile/other/notice-index',
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
let arr = [];
|
|
|
|
|
for (var m of res.data) {
|
|
|
|
|
arr.push(m.name)
|
|
|
|
|
}
|
|
|
|
|
that.listNotice = res.data;
|
|
|
|
|
that.list = arr;
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
|
|
|
|
|
|