刘翔宇-旅管家 4 years ago
parent 94058c5e5a
commit b5cc8f5031

@ -1,44 +1,32 @@
<template> <template>
<view class="content"> <view class="content">
<view class="contentlist"> <view class="contentlist">
<view class="content_box"> <block v-for="(item,index) in noticeList" :key="index">
<view class="content_title" @click="showwhat('shownotice')"> <view class="content_box">
<view class="content_title" @click="showwhat(index)">
<view class="infoicon">
<u-icon size="16" color="#42b983" name="info-circle-fill"></u-icon> <view class="infoicon">
<text>参观须知</text> <u-icon size="16" color="#42b983" name="info-circle-fill"></u-icon>
</view> <text>{{item.name}}</text>
<u-icon v-if="!show.shownotice" size="16" name="arrow-down"></u-icon> </view>
<u-icon v-if="show.shownotice" size="16" name="arrow-up"></u-icon> <u-icon v-if="!item.shownotice" size="16" name="arrow-down"></u-icon>
</view> <u-icon v-if="item.shownotice" size="16" name="arrow-up"></u-icon>
<view class="content_info" v-if="show.shownotice"> </view>
<rich-text style="text-indent: 2em;" :nodes="notice.content"></rich-text> <view class="content_info" v-if="item.shownotice">
</view> <rich-text style="text-indent: 2em;" :nodes="item.content"></rich-text>
</view> </view>
<view class="content_box">
<view class="content_title" @click="showwhat('showask')">
<view class="infoicon">
<u-icon size="16" color="#42b983" name="info-circle-fill"></u-icon>
<text>常见问题</text>
</view>
<u-icon v-if="!show.showask" size="16" name="arrow-down"></u-icon>
<u-icon v-if="show.showask" size="16" name="arrow-up"></u-icon>
</view>
<view class="content_info" v-if="show.showask">
<rich-text style="text-indent: 2em;" :nodes="ask.content"></rich-text>
</view> </view>
</view> </block>
<view class="content_box"> <view class="content_box">
<view class="content_title" @click="showwhat('showform')"> <view class="content_title" @click="showwhat('showform')">
<view class="infoicon"> <view class="infoicon">
<u-icon size="16" color="#42b983" name="info-circle-fill"></u-icon> <u-icon size="16" color="#42b983" name="info-circle-fill"></u-icon>
<text>意见建议</text> <text>意见建议</text>
</view> </view>
<u-icon v-if="!show.showform" size="16" name="arrow-down"></u-icon> <u-icon v-if="!show.showform" size="16" name="arrow-down"></u-icon>
<u-icon v-if="show.showform" size="16" name="arrow-up"></u-icon> <u-icon v-if="show.showform" size="16" name="arrow-up"></u-icon>
</view> </view>
<view class="content_info" v-if="show.showform"> <view class="content_info" v-if="show.showform">
<u-form labelPosition="top" :model="form"> <u-form labelPosition="top" :model="form">
@ -65,30 +53,31 @@
form: { form: {
mobile: "", mobile: "",
content: "" content: ""
}, },
show:{ show: {
shownotice:false, shownotice: false,
showask:false, showask: false,
showform:false showform: false
}, },
urls: { urls: {
1: '/api/mobile/other/visit-notice-index', 1: '/api/mobile/other/visit-notice-index',
4: '/api/mobile/other/ask-index' 4: '/api/mobile/other/ask-index'
} },
noticeList: []
} }
}, },
onLoad() { onLoad() {
var that = this; var that = this;
that.loadList(1, 1) that.loadList(1, 1)
that.loadList(1, 4) //that.loadList(1, 4)
}, },
methods: { methods: {
showwhat(type){ showwhat(type) {
// for(var m in this.show){ if (type == "showform")
// if(m==type){ this.show[type] = !this.show[type];
this.show[type] = !this.show[type] else
// } this.noticeList[type].shownotice = !this.noticeList[type].shownotice;
// } this.$forceUpdate();
}, },
loadList(page, type) { loadList(page, type) {
var that = this; var that = this;
@ -102,6 +91,10 @@
that.notice = res.data[0]; that.notice = res.data[0];
if (type == 4) if (type == 4)
that.ask = res.data[0]; that.ask = res.data[0];
for (var mod of res.data) {
mod.shownotice = false;
}
that.noticeList = res.data
}, },
utilFail: function(res) { utilFail: function(res) {
uni.showToast({ uni.showToast({
@ -158,8 +151,8 @@
} }
.content { .content {
padding:0 24rpx 60rpx 24rpx; padding: 0 24rpx 60rpx 24rpx;
min-height: 100vh; min-height: 100vh;
background: #fff; background: #fff;
} }
@ -169,17 +162,19 @@
padding: 30rpx 21rpx; padding: 30rpx 21rpx;
margin-bottom: 25rpx; */ margin-bottom: 25rpx; */
} }
.content_title { .content_title {
padding: 26rpx 0; padding: 26rpx 0;
border-bottom: #ddd 1rpx solid; border-bottom: #ddd 1rpx solid;
font-size: 32rpx; font-size: 32rpx;
color: #351C1B; color: #351C1B;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.infoicon view{
display: inline-block!important; .infoicon view {
margin-right:20rpx display: inline-block !important;
margin-right: 20rpx
} }
.content_info { .content_info {

@ -181,6 +181,9 @@
onReady() { onReady() {
// //
this.$refs.calendar.setFormatter(this.formatter) this.$refs.calendar.setFormatter(this.formatter)
},
onHide() {
this.showBook=false;
}, },
methods: { methods: {
closePhone() { closePhone() {

Loading…
Cancel
Save