You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hezhiying/pages/bind/bind.vue

85 lines
1.5 KiB

1 year ago
<template>
<view class="bind">
1 year ago
<u-notice-bar :text="text1"></u-notice-bar>
<view class="logo">
<image src="/static/image/logo254.png" mode="widthFix"></image>
</view>
<view class="info">
<text>推荐人账号</text>
<u--input
border="bottom"
v-model="value"
></u--input>
</view>
<view class="bindBtn" @click="bingHandle">
</view>
<u-toast ref="uToast"></u-toast>
1 year ago
</view>
</template>
<script>
1 year ago
import {bindInvitor} from '@/common/api.js'
export default{
data(){
return{
text1:'温馨提示:为了您的权益请尽快绑定推荐人,只可绑定一次请谨慎操作,如不了解可联系工作人员。',
value:''
}
},
methods:{
bingHandle(){
if(!this.value){
this.$refs.uToast.show({
message:'请输入推荐人'
})
return;
}
bindInvitor({mobile:this.value}).then(res=>{
if(res.code==1){
this.$refs.uToast.show({
message:'绑定成功'
})
uni.switchTab({
url:"/pages/my/my"
})
}
})
}
}
}
1 year ago
</script>
<style lang="scss" scoped>
.bind{
min-height: calc(100vh - 90rpx);
1 year ago
.logo{
text-align: center;
margin-top:70rpx;
image{
width:40%;
height:auto;
}
}
.info{
display: flex;
margin-top:30rpx;
align-items: center;
justify-content: center;
padding:0 44rpx;
&>text{
margin-right:20rpx;
}
}
.bindBtn{
background-color: $base;
width:70%;
margin:50rpx auto;
color:#ffffff;
padding:20rpx;
text-align: center;
border-radius: 10rpx;
}
1 year ago
}
</style>