| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 | <template>	<view class="content">		<view class="bindbox">			<image :src="baseUrl + '/images/bindComUser.png'" mode="aspectFill"></image>			<view>立即绑定,享受更多权益</view>		</view>		<button class="bind-btn" :loading="btnLodaing" :disabled="btnLodaing" @click="handleBind">立即绑定</button>	</view></template><script>	import { bindCompanyFsUser } from '@/api/companyUser.js'	export default {		data() {			return {				baseUrl:uni.getStorageSync('requestPath'),				btnLodaing: false,				companyUserId: '',			}		},		onLoad(option) {			let q = {}			if(option.q) {				q = decodeURIComponent(option.q) // 获取到二维码原始链接内容			}			this.companyUserId = q.companyUserId || option.companyUserId		},		methods: {			handleBind() {				this.$isLogin().then(					res => {						if(res){							this.submit();						}						else{							uni.navigateTo({								url:'/pages/auth/login'							})						}					}				);			},			submit() {				this.btnLodaing = true				uni.showLoading({					title: '绑定中...'				})				bindCompanyFsUser(this.companyUserId).then(res=>{					this.btnLodaing = false					uni.hideLoading()					uni.showToast({						title: res.msg,						icon: 'none'					})				}).catch(()=>{					this.btnLodaing = false					uni.hideLoading()				})			}		}	}</script><style lang="scss" scoped>	.bindbox {		display: flex;		flex-direction: column;		align-items: center;		justify-content: center;		padding-top: 20vh;		font-family: PingFang SC, PingFang SC;		font-weight: 400;		font-size: 32rpx;		color: #757575;		image {			height: 150rpx;			width: 150rpx;			margin-bottom: 50rpx;		}	}	.content {		width: 100%;		display: flex;		flex-direction: column;		align-items: center;		padding-bottom: calc(var(--window-bottom) + 150rpx);			}	.bind-btn {		margin: 20vh auto 20px auto;		width: 300px;		height: 44px;		line-height: 44px;		text-align: center;		background: #FF5C03 !important;		color: #fff !important;		font-size: 16px;		font-weight: 500;		border-radius: 22px;		display: block;		&:after {			border: none;		}	}</style>
 |