文件
xionggeshop/xgsc.gynhc.com_wx/pages/app/commission/bind-invite.vue
2026-09-14 17:24:53 +08:00

83 行
1.5 KiB
Vue

<!-- 绑定邀请码 -->
<template>
<view class="bind-invite-page brand-page">
<view class="page-wrap">
<shopro-navbar variant="gradient" backText="绑定邀请码"></shopro-navbar>
<view class="page-content">
<view class="form-card brand-card">
<view class="form-title">输入邀请人的邀请码</view>
<input class="invite-input" v-model="inviteCode" placeholder="请输入邀请码" />
<button class="submit-btn" @tap="bindCode">确认绑定</button>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
inviteCode: ''
};
},
methods: {
bindCode() {
if (!this.inviteCode) {
this.$u.toast('请输入邀请码');
return;
}
this.$http('commission.bindInviteCode', { invite_code: this.inviteCode }).then(res => {
if (res.code === 1) {
this.$u.toast('绑定成功');
setTimeout(() => this.$Router.back(), 1500);
}
});
}
}
};
</script>
<style lang="scss" scoped>
.bind-invite-page {
height: 100vh;
}
.page-wrap {
background: $brand-header-gradient;
min-height: 100vh;
}
.page-content {
padding: 0 $brand-page-gutter 24rpx;
}
.form-card {
padding: 40rpx 32rpx;
.form-title {
font-size: 28rpx;
color: #666;
margin-bottom: 24rpx;
}
.invite-input {
height: 88rpx;
border: 1rpx solid #e5e5e5;
border-radius: 12rpx;
padding: 0 24rpx;
font-size: 32rpx;
margin-bottom: 32rpx;
}
.submit-btn {
height: 88rpx;
line-height: 88rpx;
background: #1677FF;
color: #fff;
border-radius: 44rpx;
font-size: 30rpx;
}
}
</style>