editpersonalinformation.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <template>
  2. <view class="content">
  3. <view class="content3 flex s-row">
  4. <view>个人信息</view>
  5. <view class="flex flex-space-between width100">
  6. <view>姓名</view>
  7. <view class="flex">
  8. <u--input placeholder="输入姓名" inputAlign='right' border="none" v-model="dataDetails.name">
  9. </u--input>
  10. </view>
  11. </view>
  12. <view class="flex flex-space-between width100">
  13. <view>联系电话</view>
  14. <view class="flex">
  15. <u--input placeholder="输入联系电话" inputAlign='right' border="none" v-model="dataDetails.name">
  16. </u--input>
  17. </view>
  18. </view>
  19. <view class="flex flex-space-between width100">
  20. 上传身份证人像面
  21. </view>
  22. <u-button type="primary" @click="uploadImg(3)">上传身份证人像面</u-button>
  23. <view class="flex flex-space-between width100">
  24. 上传身份证国徽面
  25. </view>
  26. <u-button type="primary" @click="uploadImg(3)">上传身份证国徽面</u-button>
  27. <view class="flex flex-space-between width100">
  28. <view>身份证号</view>
  29. <view class="flex">
  30. <u--input placeholder="输入身份证号" inputAlign='right' border="none" v-model="dataDetails.name">
  31. </u--input>
  32. </view>
  33. </view>
  34. <view class="flex flex-space-between width100">
  35. <view>身份证有效期</view>
  36. <view class="flex">
  37. <u--input placeholder="选择身份证有效期" inputAlign='right' border="none" v-model="dataDetails.name">
  38. </u--input>
  39. <view>手动输入</view>
  40. </view>
  41. </view>
  42. <u-checkbox-group
  43. v-model="checkboxValue1"
  44. placement="column"
  45. @change="checkboxChange"
  46. >
  47. <u-checkbox v-model="checked" label="我已阅读并同意全部细则"
  48. name="1">明月</u-checkbox>
  49. </u-checkbox-group>
  50. <!-- <view class="flex flex-space-between width100">
  51. <view>收款人</view>
  52. <view class="flex">
  53. <u--input placeholder="输入收款人姓名" inputAlign='right' border="none" v-model="dataDetails.name">
  54. </u--input>
  55. </view>
  56. </view> -->
  57. </view>
  58. <view class="" @click="submit">提交</view>
  59. <u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
  60. @select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
  61. </u-action-sheet>
  62. </view>
  63. </template>
  64. <script>
  65. import upload from '@/components/upload.vue';
  66. import uploadImage from '@/components/ossutil/uploadFile.js';
  67. var _this;
  68. export default {
  69. components: {},
  70. data() {
  71. return {
  72. uploadType: '',
  73. isShowimgType: false,
  74. dataDetails: {
  75. name: '阿萨啊',
  76. carNumberList: [{
  77. kahao: '',
  78. addressUrl: ''
  79. }],
  80. bankList: [{
  81. yhk: '',
  82. kh: '',
  83. khh: '',
  84. khzh: '',
  85. skr: ''
  86. }],
  87. },
  88. imagesrc: ''
  89. };
  90. },
  91. onLoad() {
  92. _this = this;
  93. },
  94. methods: {
  95. //设置图片
  96. setImage(e) {
  97. debugger
  98. console.log(e);
  99. //显示在页面
  100. //this.imagesrc = e.path;
  101. if (e.dotype == 'idphoto') {
  102. _this.zjzClipper(e.path);
  103. } else if (e.dotype == 'watermark') {
  104. _this.watermark(e.path);
  105. } else {
  106. _this.savePhoto(e.path);
  107. }
  108. },
  109. //保存图片到相册,方便核查
  110. savePhoto(path) {
  111. debugger
  112. this.imagesrc = path;
  113. uploadImage(path, 'appData/',
  114. result => {
  115. // 上传成功
  116. console.log('图片地址', result)
  117. }
  118. )
  119. //保存到相册
  120. // uni.saveImageToPhotosAlbum({
  121. // filePath: path,
  122. // success: () => {
  123. // uni.showToast({
  124. // title: '已保存至相册',
  125. // duration: 2000
  126. // });
  127. // }
  128. // });
  129. },
  130. uploadImg(type) {
  131. this.uploadType = type
  132. this.isShowimgType = true
  133. },
  134. photograph() {
  135. console.log('拍照')
  136. let that = this;
  137. uni.chooseImage({
  138. count: 1,
  139. success: function(res) {
  140. console.log(JSON.stringify(res.tempFilePaths));
  141. uploadImage(res.tempFilePaths[0], 'appData/',
  142. result => {
  143. // 上传成功
  144. console.log('图片地址', result)
  145. }
  146. )
  147. }
  148. });
  149. },
  150. imgTypeSelect(val) {
  151. console.log(val)
  152. console.log(this.uploadType)
  153. if (val.name == '相册') {
  154. uni.chooseImage({
  155. count: 1,
  156. sourceType: this.$helper.chooseImage.sourceType,
  157. success: function(res) {
  158. console.log(JSON.stringify(res.tempFilePaths));
  159. uploadImage(res.tempFilePaths[0], 'appData/',
  160. result => {
  161. // 上传成功
  162. console.log('图片地址', result)
  163. switch (this.uploadType) {
  164. case 0:
  165. console.log('人车合影')
  166. break
  167. case 1:
  168. console.log('身份正面')
  169. break
  170. case 2:
  171. console.log('身份反面')
  172. break
  173. case 3:
  174. console.log('银行卡')
  175. break
  176. case 4:
  177. }
  178. }
  179. )
  180. }
  181. });
  182. } else {
  183. switch (this.uploadType) {
  184. case 0:
  185. console.log('人车合影')
  186. break
  187. case 1:
  188. uni.$u.route('/pages/mine/camera/idcard/idcard?dotype=face');
  189. console.log('身份正面')
  190. break
  191. case 2:
  192. console.log('身份反面')
  193. break
  194. case 3:
  195. console.log('银行卡')
  196. break
  197. case 4:
  198. }
  199. }
  200. },
  201. //身份证正面
  202. getImgUrl1(src) {
  203. // console.log(src)
  204. // console.log('------------res-----------')
  205. // let that = this;
  206. // that.id[0] = src
  207. // that.id1 = src
  208. // that.certificates = false
  209. // that.personImgs.personImg = that.id[0]
  210. // that.$api.doRequest('get', '/driverViewInfo/personShibie', that
  211. // .personImgs).then(res => {
  212. // if (res.data.data.recPerson != null) {
  213. // if (res.data.data.recPerson != "") {
  214. // that.$set(that.DriverViewInfo, 'driverName', res
  215. // .data.data.recPerson)
  216. // }
  217. // }
  218. // if (res.data.data.recPersonNo != null) {
  219. // if (res.data.data.recPersonNo != "") {
  220. // that.$set(that.DriverViewInfo, 'numberCard', res
  221. // .data.data.recPersonNo)
  222. // }
  223. // }
  224. // }).catch(res => {
  225. // uni.showToast({
  226. // title: res.data.message,
  227. // icon: 'none',
  228. // duration: 2000
  229. // })
  230. // })
  231. },
  232. submit(){
  233. console.log(' tijia')
  234. },
  235. },
  236. };
  237. </script>
  238. <style>
  239. </style>