<template>
	<view class="" >
		
	
	
	<view  >
		<image src="../../static/bg.png" mode="" class="bg"></image>
		<view class="top">
			<view class="" style="text-align: center;margin-top: 100rpx;">
				您的账号已被禁用，请联系平台管理员
			</view>
		</view>
		
	
		
		
	</view>
	
	
	</view>
</template>

<script>
	export default {
		
		onLoad() {
				
		},
		onShow() {
			
				
		},
		data() {
			return {
				
			}
		},
		methods: {
			reset(){
					this.status=0
			},
			getInfo() {
				uni.$u.http.post('/api/user/userinfo').then(res => {
					if (res.code == 1) {
						this.status=res.data.is_info
					}
				})
			},
			getCode(){
			if (this.s == 60) {
				if (!this.phone) {
					uni.showToast({
						title: "请输入手机号",
						duration: 2000,
						icon: "none",
					});
					return false;
				}
				      
				uni.$u.http.post('/api/Sms/alsend',{phone:this.phone}).then((res) => {
					uni.hideLoading()
					uni.showToast({
						title: res.msg,
						duration: 2000,
						icon: "none",
					});
					if (res.code == 1) {
						this.time = setInterval(() => {
							this.s--
							this.count = `${this.s}s`
							if (this.s <= 0) {
								this.s = 60
								this.count = '重新发送'
								clearInterval(this.time)
							}
						}, 1000)
					}
				});
				}
			},
			gorenzheng(){
				if(!this.unit){
					this.$u.toast('请输入单位名称')
					return
				}
				if(!this.name){
					this.$u.toast('请输入姓名')
					return
				}
				if(!this.idcard){
					this.$u.toast('请输入身份证号')
					return
				}
				if(!this.age){
					this.$u.toast('请输入年龄')
					return
				}
				if(this.current==null){
					this.$u.toast('请选择学历')
					return
				}
				if(!this.phone){
					this.$u.toast('请输入手机号')
					return
				}
				if(!this.code){
					this.$u.toast('请输入验证码')
					return
				}
				// if(!this.uuid){
				// 	this.$u.toast('请输入会员号')
				// 	return
				// }
				// if(!this.workImg){
				// 	this.$u.toast('上传单位证明')
				// 	return
				// }
				// if(this.fileList1.length==0){
				// 	this.$u.toast('上传个人照片')
				// 	return
				// }
				
				let data={
					working:this.unit,
					username:this.name,
					ID_car:this.idcard,
					age:this.age,
					education:this.current,
					phone:this.phone,
					code:this.code,
				}
				uni.$u.http.post('/api/index/member_basic',data).then(res => {
									if(res.code==1){
										this.$u.toast(res.msg)
										this.getInfo() 
									}
								})
			},
			uploadImg(){
				var that=this
				uni.chooseImage({
					success: (chooseImageRes) => {
						const tempFilePaths = chooseImageRes.tempFilePaths;
						uni.uploadFile({
							url: this.$url+'/api/Publics/uploadLocality', //仅为示例，非真实的接口地址
							filePath: tempFilePaths[0],
							name: 'file',
							
							success: (uploadFileRes) => {
								that.workImg=JSON.parse(uploadFileRes.data).data.url
							}
						});
					}
				});
			},

			change(e) {
				this.current = e.value[0]
				// console.log(this.columns[0][this.current])
				this.show = false
			},
			cancel() {
				this.show = false
			},
			// 删除图片
			deletePic(event) {
				this[`fileList${event.name}`].splice(event.index, 1)
			},
			// 新增图片
			async afterRead(event) {
				// 当设置 mutiple 为 true 时, file 为数组格式，否则为对象格式
				let lists = [].concat(event.file)
				let fileListLen = this[`fileList${event.name}`].length
				lists.map((item) => {
					this[`fileList${event.name}`].push({
						...item,
						status: 'uploading',
						message: '上传中'
					})
				})
				for (let i = 0; i < lists.length; i++) {
					const result = await this.uploadFilePromise(lists[i].url)
					let item = this[`fileList${event.name}`][fileListLen]
					this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
						status: 'success',
						message: '',
						url: result
					}))
					fileListLen++
				}
			},
			uploadFilePromise(url) {
				return new Promise((resolve, reject) => {
					let a = uni.uploadFile({
						url: this.$url+'/api/Publics/uploadLocality', // 仅为示例，非真实的接口地址
						filePath: url,
						name: 'file',
						formData: {
							user: 'test'
						},
						success: (res) => {
							setTimeout(() => {
								resolve(JSON.parse(res.data).data.url)
							}, 1000)
						}
					});
				})
			},
		}
	}
</script>

<style lang="scss">
	.btnlist{
		width: 100%;
	}
	.btn1{
		font-weight: 500;
		color: #FFFFFF;
		line-height: 50px;
		background: linear-gradient(270deg, #A890FE 0%, #FFAEAE 100%);
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
		width: 270rpx;
		height: 88rpx;
		line-height: 88rpx;
		text-align: center;
		font-size: 36rpx;
		border-radius: 48rpx;
		border: 4rpx solid #E6CDE6;
		// border-image: linear-gradient(270deg, rgba(171, 145, 252, 1), rgba(251, 173, 177, 1)) 2 2;
	}
	.btn{
		width: 270rpx;
		height: 88rpx;
		line-height: 88rpx;
		text-align: center;
		background: linear-gradient(270deg, #A890FE 0%, #FFAEAE 100%);
		border-radius: 48rpx;
		font-size: 36rpx;
	}
	.error{
		padding-top: 96rpx;
		padding-bottom: 94rpx;
		margin: 56rpx auto 0;
		width: 690rpx;
		// height: 888rpx;
		background: #FFFFFF;
		border-radius: 40rpx;
		font-size: 24rpx;
		color: #222222;
		image{
			width: 140rpx;
			height: 140rpx;
		}
		.reason{
			padding: 24rpx 20rpx;
			margin: 52rpx auto 64rpx;
			width: 610rpx;
			height: 200rpx;
			background: #F4F4F4;
			border-radius: 20rpx;
		}
	}
	.success{
		box-sizing: border-box;
		padding: 0 40rpx;
		height: auto;
	}
	.info{
		padding: 40rpx 40rpx 0;
		width: 100%;
		margin-top: 80rpx;
		border-top: 2rpx solid #F3F3F3;
		.infoitem{
			line-height: 100rpx;
			width: 100%;
			font-size: 30rpx;
			color: #222222;
		}
	}
	.btnlist{
		margin-top: 30rpx;
		width: 100%;
	}
	.btn1{
		font-weight: 500;
		color: #FFFFFF;
		line-height: 50px;
		background: linear-gradient(270deg, #A890FE 0%, #FFAEAE 100%);
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
		width: 270rpx;
		height: 88rpx;
		line-height: 88rpx;
		text-align: center;
		font-size: 36rpx;
		border-radius: 48rpx;
		border: 4rpx solid #E6CDE6;
		// border-image: linear-gradient(270deg, rgba(171, 145, 252, 1), rgba(251, 173, 177, 1)) 2 2;
	}
	.btn{
		width: 270rpx;
		height: 88rpx;
		line-height: 88rpx;
		text-align: center;
		background: linear-gradient(270deg, #A890FE 0%, #FFAEAE 100%);
		border-radius: 48rpx;
		font-size: 36rpx;
	}
	.error{
		padding-top: 96rpx;
		padding-bottom: 94rpx;
		margin: 56rpx auto 0;
		width: 690rpx;
		// height: 888rpx;
		background: #FFFFFF;
		border-radius: 40rpx;
		font-size: 24rpx;
		color: #222222;
		image{
			width: 140rpx;
			height: 140rpx;
		}
		.reason{
			padding: 24rpx 20rpx;
			margin: 52rpx auto 64rpx;
			width: 610rpx;
			height: 200rpx;
			background: #F4F4F4;
			border-radius: 20rpx;
		}
	}
	.lookvip {
		font-weight: 500;
		margin-top: 24rpx;
		font-size: 24rpx;
		color: #555555;
		text-align: center;

		text {
			margin: 0 8rpx;
		}
	}

	.uploadContent {
		position: relative;
		margin-top: 32rpx;
		width: 650rpx;
		height: 472rpx;
		font-size: 28rpx;
		color: #fff;
		font-weight: 600;
		background: #F3F4F6;
		border-radius: 20rpx;

		.contentTop {
			height: 400rpx;
			background-color: #F3F4F6;
			position: relative;

			.bigImg {
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translate(-50%, -50%);
				width: 510rpx;
				height: 320rpx;
			}

			.smallImg {
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translate(-50%, -50%);
				width: 116rpx;
				height: 116rpx;
				z-index: 1;
			}
		}

		.contentBottom {
			width: 650rpx;
			height: 72rpx;
			line-height: 72rpx;
			text-align: center;
			background: linear-gradient(270deg, #A890FE 0%, #FFAEAE 100%);
			border-radius: 0px 0px 20rpx 20rpx;
		}
	}

	.upload {
		margin: 20rpx auto;
		width: 690rpx;
		// height: 652rpx;
		padding: 24rpx 20rpx;
		background: #FDFCFE;
		box-shadow: 0px 0px 16rpx 0px rgba(0, 0, 0, 0.0400);
		border-radius: 24rpx;
		box-sizing: border-box;

		.title {
			font-weight: 500;
			font-size: 30rpx;
			color: #222222;

			text {
				color: #FF5B5B;
			}
		}
	}

	.form {
		padding: 0 30rpx;
		margin: 36rpx 30rpx 0;
		background-color: #fff;
		border-radius: 40rpx ;
		background: #fff;

		.item {
			height: 94rpx;
			line-height: 94rpx;
			border-bottom: 2rpx solid #F5F5F5;

			text {
				font-size: 30rpx;
				color: #222222;
			}

			input {
				text-align: right;
			}
		}
	}

	.top {
		padding-top: 44rpx;
		text-align: center;
		font-size: 36rpx;
		font-weight: 600;

		image {
			width: 102rpx;
			height: 60rpx;
		}
	}
</style>
