succe.vue 2.22 KB
<template>
	<view class="questionnaire">
		<view  style="position: absolute;top:30%;width:80%;left:10%" v-if="yuan">
			<image src="../../static/images/tijiao.png" style="width:100%;" mode="aspectFit"></image>
			<button class="submit-btn" @click="guanbi">关闭</button>
		</view>
		<view  style="position: absolute;top:30%;width:80%;left:10%" v-if="chong">
			<image src="../../static/images/tijiaoTwo.png" style="width:100%;" mode="aspectFit"></image>
		</view>
		<view  style="position: absolute;top:30%;width:80%;left:10%" v-if="yuan == false && chong == false">
			<image src="../../static/images/tijiaoThree.png" style="width:100%;" mode="aspectFit"></image>
			 <view style="text-align: center;font-size: 20px;color: grey;">{{msg}}</view>
		</view>
	</view>
</template>

<script>
	export default {
	data() {
		return {
			wenjuanID :'',
			chong :false,
			yuan:false,
			msg:'问卷已结束,感谢您的参与',
			}
	},
			onLoad(options) {
			uni.setNavigationBarTitle({
				title: '问卷调查'
			});
				if (options.ids) {
					this.wenjuanID = options.ids
						this.yuan = true
						this.chong = false
				}
				if(options.chonfu){
					this.chong = true
					this.yuan = false
				}

				if(options.flag){
					this.msg ='问卷已结束,感谢您的参与'
					this.chong = false
					this.yuan = false
					
				}
				// if(options.flag=='2'){
				// 		this.msg ='问卷未开始,请开始后再参与'
				// 	this.chong = false
				// 	this.yuan = false
				// }
				// if(options.flag=='3'){
				// 		this.msg ='问卷已结束,感谢您的参与'
				// 	this.chong = false
				// 	this.yuan = false
				// }
				
			},
	methods: {
			guanbi(){
					uni.reLaunch({
						url: `/pages_category_page1/question/question?ids=${this.wenjuanID}`
				})
			}
	}
}
</script>

<style>
	.questionnaire {
		width: 100%;
		max-width: 600px;
		flex-grow: 1;
	
		/* padding: 30px; */
		background-color: white;
		box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
		border-radius: 5px;
		box-sizing: border-box;
	}
	.submit-btn{
		background-color: #3F9B6A;
		color: white;
		border: none;
		padding: 0px 20px;
		border-radius: 3px;
		cursor: pointer;
		margin-top: 20px;
		transition: background-color 0.3s ease;
		width: 100%;
		box-sizing: border-box;
	}
</style>