123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- <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-btn" @click="save">
- 确认
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- type: 1,
- name: '',
- card: '',
- tel: '',
- title:''
- }
- },
- onLoad(option) {
- this.type = option.type
- this.title = option.title
- 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
- })
- },
- 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
- }
- 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
- }).then(res => {
- this.$u.toast('提交成功,请等待后台审核')
- if(res.code == 1){
- setTimeout(() => {
- uni.switchTab({
- url: "/pages/index/index"
- })
- },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>
|