123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <template>
- <view class="content">
- <view class="row b-b flex">
- <text class="tit">上级UID</text>
- <input class="input" v-model="uid" type="number" placeholder-class="placeholder" placeholder="请输入上级UID" />
- </view>
- <view class="submit-box flex">
- <view class="submit" @click="bind">绑定上级</view>
- </view>
- </view>
- </template>
- <script>
- import {
- spread
- } from '@/api/user.js';
- export default {
- data() {
- return {
- uid: ''
- }
- },
- onLoad(opt) {
- },
- onShow() {
- },
- onReachBottom() {
- },
- onReady() {
- },
- methods: {
- bind() {
- if(this.uid == '') {
- return this.$api.msg('请输入上级UID')
- }
- spread({
- puid: this.uid
- }).then(res => {
- uni.showToast({
- title:'绑定成功',
- duration:2000
- });
- setTimeout(()=> {
- uni.navigateBack()
- },1500)
- })
- }
- }
- }
- </script>
- <style lang="scss">
- .row {
- background: #fff;
- padding: 42rpx 25rpx;
- font-size: 30rpx;
- color: #333333;
- image {
- width: 80rpx;
- height: 80rpx;
- border-radius: 50%;
- }
- .input {
- text-align: right;
- color: #333333;
- }
- }
- .submit-box {
- display: flex;
- flex-direction: column;
- padding-top: 157rpx;
- .submit {
- margin: 40rpx auto;
- width: 560rpx;
- background-color: #F75022;
- color: #FFFFFF;
- text-align: center;
- padding: 26rpx 0rpx;
- border-radius: 50rpx;
- }
- .dl {
- background-color: #FFFFFF;
- color: #F75022;
- }
- }
- </style>
|