personalInformation.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <template>
  2. <view class="">
  3. <view class="information">
  4. <view class="list">
  5. <view class="lable">姓名:</view>
  6. <view class="input">
  7. <input type="text" v-model="list.name" placeholder="请输入姓名"/>
  8. </view>
  9. </view>
  10. <view class="list">
  11. <view class="lable">身份证:</view>
  12. <view class="input">
  13. <input type="text" v-model="list.id" placeholder="请输入身份证号"/>
  14. </view>
  15. </view>
  16. <view class="list">
  17. <view class="lable">联系方式:</view>
  18. <view class="input">
  19. <input type="text" v-model="list.phone" placeholder="请输入联系方式"/>
  20. </view>
  21. </view>
  22. <view class="list" @click="choose">
  23. <view class="lable">所在地区:</view>
  24. <view class="input">
  25. <pickerAddress class="pickerAddress" :class="{pickerColor: !location}" @change="onCityClick">{{location||'请选择地址'}}</pickerAddress>
  26. </view>
  27. <view><img src="@/static/img/jt.png" v-show="!location"></view>
  28. </view>
  29. <view class="list">
  30. <view class="lable">详细地址:</view>
  31. <view class="input">
  32. <input type="text" v-model="list.address" placeholder="请输入详细地址" />
  33. </view>
  34. </view>
  35. <view class="list">
  36. <view class="lable">职业:</view>
  37. <view class="input">
  38. <input type="text" v-model="list.occupation" placeholder="请输入职业"/>
  39. </view>
  40. </view>
  41. <view class="list">
  42. <view class="lable">职业年限:</view>
  43. <view class="input">
  44. <input type="text" v-model="list.careerYears" placeholder="请输入职业年限"/>
  45. </view>
  46. </view>
  47. <view class="list">
  48. <view class="lable">保荐人:</view>
  49. <view class="input">
  50. <input type="text" v-model="list.sponsor" placeholder="请输入保荐人"/>
  51. </view>
  52. </view>
  53. </view>
  54. <view class="img">
  55. <p>半身照</p>
  56. <!-- <input type="file" class="inputfile" @change="changeImage"/> -->
  57. <view class="photo" @click="pic">
  58. <img :src="list.img" v-if="list.img"/>
  59. <img src="@/static/img/k.png" v-else>
  60. </view>
  61. </view>
  62. <view class="button" @click="submit" >
  63. 提交申请
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. import { apply,getPrice } from '../../api/apply.js'
  69. import pickerAddress from '@/components/wangding-pickerAddress/wangding-pickerAddress.vue';
  70. export default {
  71. components: {
  72. pickerAddress
  73. },
  74. data() {
  75. return {
  76. list: {
  77. name: '', //姓名
  78. id: '', //身份证
  79. phone: '', //联系方式
  80. Location: '', //所在地区
  81. address: '', //详细地址
  82. occupation: '', //职业
  83. careerYears: '', //职业年限
  84. sponsor: '', //保荐人
  85. img: '', //半身照
  86. pay_type: 'weixin', //weixin:微信支付,yue:余额支付
  87. grade: '' //等级
  88. },
  89. province: '', //省
  90. city: '', //市
  91. area: '', //区
  92. }
  93. },
  94. computed: {
  95. location() {
  96. return this.province + this.city + this.area
  97. }
  98. },
  99. methods: {
  100. //提交
  101. submit() {
  102. },
  103. //图片预览
  104. pic() {
  105. const that = this
  106. uni.chooseImage({
  107. success: function(res) {
  108. console.log(res.tempFilePaths[0])
  109. that.list.img = res.tempFilePaths[0]
  110. }
  111. })
  112. },
  113. // 选中城市切换
  114. onCityClick({data}) {
  115. this.province = data[0];
  116. this.city = data[1];
  117. this.district = data[2];
  118. },
  119. }
  120. }
  121. </script>
  122. <style lang="scss">
  123. page {
  124. height: 100%;
  125. }
  126. body {
  127. background-color: #f3f3f3;
  128. }
  129. .information {
  130. background-color: #fff;
  131. margin: 0 10rpx;
  132. padding: 0 40rpx;
  133. border-radius: 20rpx;
  134. font-size: 30rpx;
  135. margin-top: 30rpx;
  136. }
  137. .list {
  138. display: flex;
  139. border-bottom: solid 1rpx #f3f3f3;
  140. .lable {
  141. padding: 20rpx;
  142. width: 200rpx;
  143. }
  144. img {
  145. padding-top: 26rpx;
  146. width: 0rpx;
  147. float: right;
  148. }
  149. .input {
  150. input {
  151. border: 0;
  152. width: calc(100% - 20rpx);
  153. font-size: 30rpx;
  154. padding: 20rpx;
  155. }
  156. }
  157. }
  158. .img {
  159. margin: 0 10rpx;
  160. font-size: 30rpx;
  161. background-color: #fff;
  162. padding: 0 24rpx;
  163. border-radius: 20rpx;
  164. height: 400rpx;
  165. margin: 0 10rpx;
  166. position: relative;
  167. p {
  168. padding: 20rpx;
  169. }
  170. img {
  171. width: 160rpx;
  172. }
  173. }
  174. .photo {
  175. width: 160rpx;
  176. height: 160rpx;
  177. margin: auto auto;
  178. position: absolute;
  179. left: calc(50% - 80rpx);
  180. }
  181. .button {
  182. position: fixed;
  183. bottom: 0;
  184. left: 0;
  185. width: 100%;
  186. text-align: center;
  187. color: #fff;
  188. background-color: #3b66f5;
  189. font-size: 30rpx;
  190. height: 100rpx;
  191. line-height: 100rpx;
  192. }
  193. .pickerAddress {
  194. margin-top: 20rpx;
  195. padding-left: 20rpx;
  196. }
  197. .pickerColor {
  198. color: #808080;
  199. }
  200. </style>