enterpriseInformation.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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.unit" 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">
  23. <view class="lable">所在地区:</view>
  24. <view class="input">
  25. <pickerAddress class="pickerAddress" :class="{pickerColor: !location}"
  26. @change="onCityClick">{{location||'请选择地址'}}</pickerAddress>
  27. </view>
  28. <view><img src="@/static/img/jt.png" v-show="!location"></view>
  29. </view>
  30. <view class="list">
  31. <view class="lable">详细地址:</view>
  32. <view class="input">
  33. <input type="text" v-model="list.address" placeholder="请输入详细地址" />
  34. </view>
  35. </view>
  36. <view class="list">
  37. <view class="lable">主营领域:</view>
  38. <view class="input">
  39. <input type="text" v-model="list.occupation" placeholder="请输入职业"/>
  40. </view>
  41. </view>
  42. <view class="list">
  43. <view class="lable">公司年限:</view>
  44. <view class="input">
  45. <input type="text" v-model="list.careerYears" placeholder="请输入职业年限"/>
  46. </view>
  47. </view>
  48. <view class="list">
  49. <view class="lable">保荐人:</view>
  50. <view class="input">
  51. <input type="text" v-model="list.sponsor" placeholder="请输入保荐人"/>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="img">
  56. <p>品牌logo</p>
  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. unit: '', //企业单位
  78. id: '', //企业统一代码
  79. phone: '', //联系方式
  80. Location: '', //所在地区
  81. address: '', //详细地址
  82. occupation: '', //主营领域
  83. careerYears: '', //公司年限
  84. sponsor: '', //保荐人
  85. img: '', //品牌logo
  86. pay_type: 'weixin', //weixin:微信支付,yue:余额支付
  87. grade: '' //等级
  88. },
  89. province: '', //省
  90. city: '', //市
  91. district: '', //区
  92. TYPE: 2//2代表企业会员
  93. }
  94. },
  95. computed: {
  96. location() {
  97. return this.province + this.city + this.district
  98. }
  99. },
  100. methods: {
  101. //会员价格
  102. price() {
  103. const type = this.TYPE
  104. getPrice({},type).then(res => {
  105. console.log(res)
  106. })
  107. },
  108. //提交
  109. submit() {
  110. this.price()
  111. this.list.location = this.location
  112. const data = this.list
  113. console.log(data)
  114. const type = this.TYPE
  115. apply({ data },type).then(res => {
  116. console.log(res)
  117. }).catch(res => {
  118. console.log(res)
  119. })
  120. },
  121. //图片预览
  122. pic() {
  123. const that = this
  124. uni.chooseImage({
  125. success: function(res) {
  126. console.log(res.tempFilePaths[0])
  127. that.list.img = res.tempFilePaths[0]
  128. }
  129. })
  130. },
  131. // 选中城市切换
  132. onCityClick({data}) {
  133. this.province = data[0];
  134. this.city = data[1];
  135. this.district = data[2];
  136. }
  137. }
  138. }
  139. </script>
  140. <style lang="scss">
  141. page {
  142. height: 100%;
  143. }
  144. body {
  145. background-color: #f3f3f3;
  146. }
  147. .information {
  148. background-color: #fff;
  149. margin: 0 10rpx;
  150. padding: 0 40rpx;
  151. border-radius: 20rpx;
  152. font-size: 30rpx;
  153. margin-top: 30rpx;
  154. }
  155. .list {
  156. display: flex;
  157. border-bottom: solid 1rpx #f3f3f3;
  158. .lable {
  159. padding: 20rpx;
  160. width: 270rpx;
  161. }
  162. img {
  163. padding-top: 26rpx;
  164. width: 0rpx;
  165. float: right;
  166. }
  167. .input {
  168. input {
  169. border: 0;
  170. width: calc(100% - 20rpx);
  171. font-size: 30rpx;
  172. padding: 20rpx;
  173. }
  174. }
  175. }
  176. .img {
  177. margin: 0 10rpx;
  178. font-size: 30rpx;
  179. background-color: #fff;
  180. padding: 0 24rpx;
  181. border-radius: 20rpx;
  182. height: 400rpx;
  183. margin: 0 10rpx;
  184. position: relative;
  185. p {
  186. padding: 20rpx;
  187. }
  188. img {
  189. width: 160rpx;
  190. }
  191. }
  192. .photo {
  193. width: 160rpx;
  194. height: 160rpx;
  195. margin: auto auto;
  196. position: absolute;
  197. left: calc(50% - 80rpx);
  198. }
  199. .button {
  200. position: fixed;
  201. bottom: 0;
  202. left: 0;
  203. width: 100%;
  204. text-align: center;
  205. color: #fff;
  206. background-color: #3b66f5;
  207. font-size: 30rpx;
  208. height: 100rpx;
  209. line-height: 100rpx;
  210. }
  211. .pickerAddress {
  212. margin-top: 20rpx;
  213. padding-left: 5rpx;
  214. }
  215. .pickerColor {
  216. color: #808080;
  217. }
  218. </style>