broker.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <view class="broker">
  3. <view class="broker-title">
  4. 基本信息
  5. </view>
  6. <view class="broker-row u-flex">
  7. <view class="broker-row-left u-flex">
  8. <text>姓名</text>
  9. <text>*</text>
  10. </view>
  11. <input type="text" placeholder="请输入" v-model="name" class="input-right">
  12. </view>
  13. <!-- <view class="broker-row u-flex">
  14. <view class="broker-row-left u-flex">
  15. <text>身份证号</text>
  16. <text>*</text>
  17. </view>
  18. <input type="idcard" placeholder="请输入" v-model="card" class="input-right">
  19. </view> -->
  20. <view class="broker-row u-flex">
  21. <view class="broker-row-left u-flex">
  22. <text>手机号</text>
  23. <text>*</text>
  24. </view>
  25. <input type="number" placeholder="请输入" v-model="tel" class="input-right">
  26. </view>
  27. <view class="broker-row u-flex">
  28. <view class="broker-row-left u-flex">
  29. <text>门店</text>
  30. <text>*</text>
  31. </view>
  32. <input type="text" placeholder="请输入" v-model="shop" class="input-right">
  33. </view>
  34. <view class="broker-btn" @click="save">
  35. 确认
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. export default {
  41. data() {
  42. return {
  43. type: 1,
  44. name: '',
  45. card: '',
  46. tel: '',
  47. shop: ''
  48. }
  49. },
  50. onLoad(option) {
  51. this.type = option.type
  52. this.getuser()
  53. },
  54. onShow() {
  55. if (this.type == 1) {
  56. uni.setNavigationBarTitle({
  57. title: "中介经纪人"
  58. })
  59. } else {
  60. uni.setNavigationBarTitle({
  61. title: "全民经纪人"
  62. })
  63. }
  64. },
  65. methods: {
  66. getuser() {
  67. this.$u.post('/api/Member/member_info').then(res => {
  68. this.name = res.data.broker_name
  69. this.card = res.data.broker_id_card
  70. this.tel = res.data.broker_phone
  71. this.shop = res.data.broker_shop
  72. if (res.data.certification_check_status == 1) {
  73. uni.showModal({
  74. title: "提示",
  75. content: "审核中",
  76. success() {
  77. uni.navigateBack()
  78. }
  79. })
  80. return
  81. }
  82. if (res.data.certification_check_status == 2) {
  83. uni.showModal({
  84. title: "提示",
  85. content: "审核已通过",
  86. success() {
  87. uni.navigateBack()
  88. }
  89. })
  90. return
  91. }
  92. if (res.data.certification_check_status == 3) {
  93. uni.showModal({
  94. title: "提示",
  95. content: "申请失败"
  96. })
  97. }
  98. })
  99. },
  100. save() {
  101. if (!this.name) {
  102. this.$u.toast("请输入姓名")
  103. return
  104. }
  105. // if (!this.$u.test.idCard(this.card)) {
  106. // this.$u.toast("请输入正确的身份证")
  107. // return
  108. // }
  109. if (!this.$u.test.mobile(this.tel)) {
  110. this.$u.toast("请输入正确的手机号")
  111. return
  112. }
  113. if (!this.shop) {
  114. this.$u.toast("请输入门店")
  115. return
  116. }
  117. uni.showLoading({
  118. mask: true,
  119. title: "请稍后"
  120. })
  121. this.$u.post('/api/Member/submit_broker', {
  122. type: this.type,
  123. name: this.name,
  124. id_card: this.card,
  125. phone: this.tel,
  126. shop: this.shop
  127. }).then(res => {
  128. this.$u.toast(res.msg)
  129. if (res.code == 1) {
  130. setTimeout(() => {
  131. uni.navigateBack()
  132. }, 800)
  133. }
  134. })
  135. }
  136. }
  137. }
  138. </script>
  139. <style lang="scss">
  140. .broker {
  141. padding: 0 24rpx;
  142. .broker-btn {
  143. width: 702rpx;
  144. line-height: 82rpx;
  145. background: #1F7EFF;
  146. border-radius: 8rpx;
  147. text-align: center;
  148. font-size: 28rpx;
  149. font-family: PingFangSC-Regular, PingFang SC;
  150. font-weight: 400;
  151. color: #FFFFFF;
  152. position: fixed;
  153. bottom: 226rpx;
  154. left: 24rpx;
  155. }
  156. .broker-row {
  157. height: 82rpx;
  158. border-bottom: 2rpx solid #F5F5F5;
  159. .input-right {
  160. flex: 1;
  161. font-size: 24rpx;
  162. }
  163. .broker-row-left {
  164. width: 252rpx;
  165. text:first-child {
  166. font-size: 24rpx;
  167. font-family: PingFangSC-Regular, PingFang SC;
  168. font-weight: 400;
  169. color: #999999;
  170. }
  171. text:nth-child(2) {
  172. font-size: 24rpx;
  173. font-family: PingFangSC-Regular, PingFang SC;
  174. font-weight: 400;
  175. color: #F83838;
  176. }
  177. }
  178. }
  179. .broker-title {
  180. padding: 24rpx 0;
  181. font-size: 28rpx;
  182. font-family: PingFangSC-Medium, PingFang SC;
  183. font-weight: 500;
  184. color: #333333;
  185. }
  186. }
  187. </style>