123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- <template>
- <view class="broker">
- <view class="broker-title">
- 基本信息
- </view>
- <view class="broker-row u-flex">
- <view class="broker-row-left u-flex">
- <text>姓名</text>
- <text>*</text>
- </view>
- <input type="text" placeholder="请输入" v-model="name" class="input-right">
- </view>
- <!-- <view class="broker-row u-flex">
- <view class="broker-row-left u-flex">
- <text>身份证号</text>
- <text>*</text>
- </view>
- <input type="idcard" placeholder="请输入" v-model="card" class="input-right">
- </view> -->
- <view class="broker-row u-flex">
- <view class="broker-row-left u-flex">
- <text>手机号</text>
- <text>*</text>
- </view>
- <input type="number" placeholder="请输入" v-model="tel" class="input-right">
- </view>
- <view class="broker-row u-flex">
- <view class="broker-row-left u-flex">
- <text>门店</text>
- <text>*</text>
- </view>
- <input type="text" placeholder="请输入" v-model="shop" class="input-right">
- </view>
- <view class="broker-btn" @click="save">
- 确认
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- type: 1,
- name: '',
- card: '',
- tel: '',
- shop: ''
- }
- },
- onLoad(option) {
- this.type = option.type
- this.getuser()
- },
- onShow() {
- if (this.type == 1) {
- uni.setNavigationBarTitle({
- title: "中介经纪人"
- })
- } else {
- uni.setNavigationBarTitle({
- title: "全民经纪人"
- })
- }
- },
- methods: {
- getuser() {
- this.$u.post('/api/Member/member_info').then(res => {
- this.name = res.data.broker_name
- this.card = res.data.broker_id_card
- this.tel = res.data.broker_phone
- this.shop = res.data.broker_shop
- if (res.data.certification_check_status == 1) {
- uni.showModal({
- title: "提示",
- content: "审核中",
- success() {
- uni.navigateBack()
- }
- })
- return
- }
- if (res.data.certification_check_status == 2) {
- uni.showModal({
- title: "提示",
- content: "审核已通过",
- success() {
- uni.navigateBack()
- }
- })
- return
- }
- if (res.data.certification_check_status == 3) {
- uni.showModal({
- title: "提示",
- content: "申请失败"
- })
- }
- })
- },
- save() {
- if (!this.name) {
- this.$u.toast("请输入姓名")
- return
- }
- // if (!this.$u.test.idCard(this.card)) {
- // this.$u.toast("请输入正确的身份证")
- // return
- // }
- if (!this.$u.test.mobile(this.tel)) {
- this.$u.toast("请输入正确的手机号")
- return
- }
- if (!this.shop) {
- this.$u.toast("请输入门店")
- return
- }
- uni.showLoading({
- mask: true,
- title: "请稍后"
- })
- this.$u.post('/api/Member/submit_broker', {
- type: this.type,
- name: this.name,
- id_card: this.card,
- phone: this.tel,
- shop: this.shop
- }).then(res => {
- this.$u.toast(res.msg)
- if (res.code == 1) {
- setTimeout(() => {
- uni.navigateBack()
- }, 800)
- }
- })
- }
- }
- }
- </script>
- <style lang="scss">
- .broker {
- padding: 0 24rpx;
- .broker-btn {
- width: 702rpx;
- line-height: 82rpx;
- background: #1F7EFF;
- border-radius: 8rpx;
- text-align: center;
- font-size: 28rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #FFFFFF;
- position: fixed;
- bottom: 226rpx;
- left: 24rpx;
- }
- .broker-row {
- height: 82rpx;
- border-bottom: 2rpx solid #F5F5F5;
- .input-right {
- flex: 1;
- font-size: 24rpx;
- }
- .broker-row-left {
- width: 252rpx;
- text:first-child {
- font-size: 24rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #999999;
- }
- text:nth-child(2) {
- font-size: 24rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #F83838;
- }
- }
- }
- .broker-title {
- padding: 24rpx 0;
- font-size: 28rpx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #333333;
- }
- }
- </style>
|