applyfor.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <view style="padding: 0 32upx;">
  3. <van-field
  4. :value="name"
  5. placeholder="请输入您的姓名"
  6. label="姓名"
  7. />
  8. <van-field
  9. :value="name"
  10. placeholder="请输入您的手机号码"
  11. label="手机号码"
  12. />
  13. <van-field
  14. :value="name"
  15. placeholder="请输入您的身份证号码"
  16. label="身份证号码"
  17. />
  18. <van-field
  19. :value="name"
  20. placeholder="请输入您的联系地址"
  21. label="联系地址"
  22. />
  23. <view>
  24. <uploadImage />
  25. <view>须上传营业执照和手持身份证照</view>
  26. </view>
  27. <view class="submitRemin">申请代理</view>
  28. </view>
  29. </template>
  30. <script>
  31. import uploadImage from '@/component/uploadImage.vue'
  32. export default {
  33. components: {
  34. uploadImage
  35. },
  36. data(){
  37. return{
  38. name:'',
  39. imageList:[]
  40. }
  41. },
  42. methods: {
  43. chooseImage() {
  44. if (this.imageList.length === 3) {
  45. // let isContinue = await this.isFullImg();
  46. // console.log("是否继续?", isContinue);
  47. // if (!isContinue) {
  48. // return;
  49. // }
  50. return;
  51. }
  52. uni.chooseImage({
  53. sourceType: this.sourceType,
  54. sizeType: this.sizeType,
  55. count: this.imageList.length + this.count[this.countIndex] > 3 ? 3 - this.imageList.length : this.count[this.countIndex],
  56. success: (res) => {
  57. this.imageList = this.imageList.concat(res.tempFilePaths);
  58. uni.uploadFile({
  59. url: 'https://www.example.com/upload', //仅为示例,非真实的接口地址
  60. filePath: tempFilePaths[0],
  61. name: 'file',
  62. formData: {
  63. 'user': 'test'
  64. },
  65. success: (uploadFileRes) => {
  66. console.log(uploadFileRes.data);
  67. }
  68. });
  69. }
  70. })
  71. },
  72. }
  73. }
  74. </script>
  75. <style>
  76. .deepHeight {
  77. height: 108upx;
  78. width: 108upx;
  79. }
  80. </style>