binding.vue 2.0 KB
<template>

	<div class='binding'>
		<view class="binding_title">绑定客户</view>
		<view class="binding_input">
			<input type="text" placeholder="请填写推荐码" placeholder-class="bind_input" v-model="code">
		</view>
		<view class="content">{{content}}</view>
		<view class="binding_btn" @click="set_sure">确定</view>
	</div>
</template>

<script>
	import app from "../../App.vue";
	export default {
		data() {
			return {
				code: "",
				content: ""
			}
		},
		methods: {
			set_sure() {
				let t = this;
				let url = "api/person/bindKehu";
				let param = {
					code: t.code
				};
				app.post(url, param, 'get').then(r => {
					console.log('1234567890',r)
					uni.setStorageSync('re_id',1)
					uni.switchTab({
						url: '/pages/taocangoumai/taocangoumai'
					})	
				}).catch(err => {
					console.log(err)
					t.content = err.msg
				})
			}
		},
		onLoad(options) {

		},
		mounted() {

		},
		created() {

		}
	}
</script>

<style>
	.binding {
		width: 686rpx;
		background: rgba(255, 255, 255, 1);
		opacity: 1;
		border-radius: 10rpx;
		position: absolute;
		top: 30%;
		left: 50%;
		transform: translate(-50%, -30%);
		padding: 60rpx 48rpx 56rpx;
		box-sizing: border-box;
	}

	.binding_title {
		font-size: 44rpx;
		font-weight: bold;
		line-height: 60rpx;
		color: rgba(6, 18, 30, 1);
	}

	.content {
		margin-top: 20rpx;
		font-size: 26rpx;
		font-weight: 400;
		line-height: 36rpx;
		color: rgba(206, 21, 0, 1);
	}

	.binding_input {
		margin-top: 134rpx;
		border-bottom: 1rpx solid rgba(235, 235, 235, 1);
		padding-bottom: 36rpx;
	}

	.bind_input {
		font-size: 32rpx;
		font-weight: 400;
		line-height: 44rpx;
		color: rgba(210, 210, 210, 1);
		text-align: center;
	}

	.binding_btn {
		margin-top: 110rpx;
		height: 100rpx;
		background: rgba(243, 152, 0, 1);
		box-shadow: 0rpx 4rpx 18rpx rgba(0, 0, 0, 0.04);
		opacity: 1;
		border-radius: 10rpx;
		font-size: 32rpx;
		font-weight: 400;
		line-height: 100rpx;
		color: rgba(255, 255, 255, 1);
		text-align: center;
	}
</style>