lion 4 years ago
parent 94058c5e5a
commit df24ad9a5d

@ -1,193 +1,188 @@
<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>
<text>{{item.name}}</text>
</view>
<u-icon v-if="!item.shownotice" size="16" name="arrow-down"></u-icon>
<u-icon v-if="item.shownotice" size="16" name="arrow-up"></u-icon>
</view> </view>
<u-icon v-if="!show.shownotice" size="16" name="arrow-down"></u-icon> <view class="content_info" v-if="item.shownotice">
<u-icon v-if="show.shownotice" size="16" name="arrow-up"></u-icon> <rich-text style="text-indent: 2em;" :nodes="item.content"></rich-text>
</view>
<view class="content_info" v-if="show.shownotice">
<rich-text style="text-indent: 2em;" :nodes="notice.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> </view>
<u-icon v-if="!show.showask" size="16" name="arrow-down"></u-icon> </view>
<u-icon v-if="show.showask" size="16" name="arrow-up"></u-icon> </block>
<view class="content_box">
</view> <view class="content_title" @click="showwhat('showform')">
<view class="content_info" v-if="show.showask">
<rich-text style="text-indent: 2em;" :nodes="ask.content"></rich-text>
</view>
</view>
<view class="content_box">
<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">
<u-form-item label="手机号" prop="mobile" labelWidth="60px" required> <u-form-item label="手机号" prop="mobile" labelWidth="60px" required>
<u-input v-model="form.mobile" placeholder="请输入手机号"></u-input> <u-input v-model="form.mobile" placeholder="请输入手机号"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="内容" prop="content" labelWidth="60px" required> <u-form-item label="内容" prop="content" labelWidth="60px" required>
<u-textarea v-model="form.content" placeholder="请输入内容"></u-textarea> <u-textarea v-model="form.content" placeholder="请输入内容"></u-textarea>
</u-form-item> </u-form-item>
</u-form> </u-form>
<u-button type="primary" @click="tosubmit"></u-button> <u-button type="primary" @click="tosubmit"></u-button>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
notice: {}, notice: {},
ask: {}, ask: {},
form: { form: {
mobile: "", mobile: "",
content: "" content: ""
},
show: {
shownotice: false,
showask: false,
showform: false
},
urls: {
1: '/api/mobile/other/visit-notice-index',
4: '/api/mobile/other/ask-index'
}, },
show:{ noticeList: []
shownotice:false, }
showask:false, },
showform:false onLoad() {
}, var that = this;
urls: { that.loadList(1, 1)
1: '/api/mobile/other/visit-notice-index', //that.loadList(1, 4)
4: '/api/mobile/other/ask-index' },
}
}
},
onLoad() {
var that = this;
that.loadList(1, 1)
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;
this.util.request({ this.util.request({
api: this.urls[type], api: this.urls[type],
data: { data: {
page: page page: page
}, },
utilSuccess: function(res) { utilSuccess: function(res) {
if (type == 1) if (type == 1)
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) {
utilFail: function(res) { mod.shownotice = false;
uni.showToast({ }
icon: "none", that.noticeList = res.data
title: res },
}) utilFail: function(res) {
} uni.showToast({
}) icon: "none",
}, title: res
tosubmit() { })
let that = this; }
if (this.util.isNull(that.form.mobile)) { })
this.util.toast("请填写手机号!"); },
return false; tosubmit() {
} else { let that = this;
if (!uni.$u.test.mobile(that.form.mobile)) { if (this.util.isNull(that.form.mobile)) {
this.util.toast("请填写正确的手机号!"); this.util.toast("请填写手机号!");
return false; return false;
} } else {
} if (!uni.$u.test.mobile(that.form.mobile)) {
if (this.util.isNull(that.form.content)) { this.util.toast("请填写正确的手机号!");
this.util.toast("请填写内容!"); return false;
return false; }
} }
this.util.request({ if (this.util.isNull(that.form.content)) {
api: '/api/mobile/other/tip-store', this.util.toast("请填写内容!");
data: this.form, return false;
method: "POST", }
utilSuccess: function(res) { this.util.request({
console.log(res) api: '/api/mobile/other/tip-store',
uni.showToast({ data: this.form,
icon: "none", method: "POST",
title: "投诉建议成功", utilSuccess: function(res) {
complete() { console.log(res)
uni.reLaunch({ uni.showToast({
url: "/pages/success/success?from=feed" icon: "none",
}) title: "投诉建议成功",
} complete() {
}) uni.reLaunch({
}, url: "/pages/success/success?from=feed"
utilFail: function(res) { })
that.util.toast(res); }
} })
}) },
utilFail: function(res) {
} that.util.toast(res);
} }
} })
</script>
}
<style> }
page { }
background: #f7f6f4; </script>
}
<style>
.content { page {
padding:0 24rpx 60rpx 24rpx; background: #f7f6f4;
}
.content {
padding: 0 24rpx 60rpx 24rpx;
min-height: 100vh; min-height: 100vh;
background: #fff; background: #fff;
} }
.content_box { .content_box {
/* background: #FFFFFF; /* background: #FFFFFF;
border-radius: 16rpx; border-radius: 16rpx;
padding: 30rpx 21rpx; padding: 30rpx 21rpx;
margin-bottom: 25rpx; */ margin-bottom: 25rpx; */
} }
.content_title {
padding: 26rpx 0; .content_title {
border-bottom: #ddd 1rpx solid; padding: 26rpx 0;
font-size: 32rpx; border-bottom: #ddd 1rpx solid;
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;
margin-right: 20rpx
}
.content_info {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #828282;
line-height: 40rpx;
padding-top: 32rpx;
} }
.infoicon view{
display: inline-block!important;
margin-right:20rpx
}
.content_info {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #828282;
line-height: 40rpx;
padding-top: 32rpx;
}
</style> </style>

@ -126,8 +126,11 @@
<view class="mpopup-title"> <view class="mpopup-title">
{{currentNotice.name}} {{currentNotice.name}}
</view> </view>
<view class="mpopup-content" style="padding: 40rpx 20rpx;"> <view class="mpopup-content" style="padding: 40rpx 20rpx;">
<rich-text :nodes="currentNotice.content"></rich-text> <view v-html="currentNotice.content" style="font-size:32rpx;line-height: 50rpx;text-indent: 2em;">
</view>
<!-- <rich-text :nodes="currentNotice.content"></rich-text> -->
</view> </view>
</view> </view>
</u-popup> </u-popup>
@ -313,7 +316,8 @@
}) })
}, },
openInfo(e) { openInfo(e) {
this.currentNotice = this.listNotice[e]; this.currentNotice = this.listNotice[e];
this.currentNotice.content = this.currentNotice.content.replace(/\<p/gi,"<p class='richp'");
this.showInfo = true; this.showInfo = true;
}, },
closeInfo() { closeInfo() {
@ -573,5 +577,8 @@
.footer-img { .footer-img {
width: 421rpx; width: 421rpx;
height: 364rpx; height: 364rpx;
}
.richp{
margin-bottom:10rpx;
} }
</style> </style>

@ -160,21 +160,15 @@
</view> </view>
</view> </view>
</view> </view>
<view class="box-card"> <!-- <view class="box-card">
<u-form-item label="特殊情况" labelWidth="80" prop="leader" ref="leader"> <u-form-item label="特殊情况" labelWidth="80" prop="leader" ref="leader">
<!-- <u-radio-group v-model="specialtype">
<u-radio ref="specialradio" width="50%" @change="radioChange" activeColor="#EF9525"
name='3' label="">
</u-radio>
</u-radio-group> -->
<u-checkbox-group @change="radioChange"> <u-checkbox-group @change="radioChange">
<u-checkbox activeColor="#EF9525" label="乘坐轮椅等行动不便者" v-model="specialtype" name='1' shape="circle"></u-checkbox> <u-checkbox activeColor="#EF9525" label="乘坐轮椅等行动不便者" v-model="specialtype" name='1' shape="circle"></u-checkbox>
</u-checkbox-group> </u-checkbox-group>
</u-form-item> </u-form-item>
</view> </view> -->
<view class="box-card" v-if="type=='team'"> <view class="box-card" v-if="type=='team'">
<view class="box-card-title"> <view class="box-card-title">
{{type=="team"?"领队人信息":"联系人信息"}} {{type=="team"?"领队人信息":"联系人信息"}}
@ -236,7 +230,13 @@
</u-form-item> </u-form-item>
<u-form-item label="证件号码" labelWidth="80" prop="idcard" ref="idcard" required> <u-form-item label="证件号码" labelWidth="80" prop="idcard" ref="idcard" required>
<u-input placeholder="请输入证件号码" v-model="formUser.idcard"></u-input> <u-input placeholder="请输入证件号码" v-model="formUser.idcard"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="特殊情况" labelWidth="80" prop="leader" ref="leader">
<u-checkbox-group @change="radioChange">
<u-checkbox activeColor="#EF9525" label="乘坐轮椅等行动不便者" v-model="specialtype" name='1' shape="circle"></u-checkbox>
</u-checkbox-group>
</u-form-item>
<u-form-item label="手机号" labelWidth="80" prop="from.mobile" ref="mobile"> <u-form-item label="手机号" labelWidth="80" prop="from.mobile" ref="mobile">
<u-input placeholder="请输入手机号" v-model="formUser.mobile"></u-input> <u-input placeholder="请输入手机号" v-model="formUser.mobile"></u-input>
</u-form-item> </u-form-item>

Loading…
Cancel
Save