|
@@ -59,7 +59,7 @@
|
|
|
height:'160px',
|
|
|
}"
|
|
|
@select="uploadSelectImg('member_idcard_image2',$event)"
|
|
|
- @delete="dropImage('member_idcard_image2')"
|
|
|
+ @delete="dropImage('member_idcard_image2',$event)"
|
|
|
>
|
|
|
</uni-file-picker>
|
|
|
</view>
|
|
@@ -82,7 +82,7 @@
|
|
|
height:'160px',
|
|
|
}"
|
|
|
@select="uploadSelectImg('member_idcard_image3',$event)"
|
|
|
- @delete="dropImage('member_idcard_image3')"
|
|
|
+ @delete="dropImage('member_idcard_image3' ,$event)"
|
|
|
>
|
|
|
</uni-file-picker>
|
|
|
</view>
|
|
@@ -223,25 +223,33 @@ export default {
|
|
|
},
|
|
|
goBack(){uni.navigateBack({delta:1})},
|
|
|
...mapMutations({
|
|
|
- memberEdit: 'memberEdit'
|
|
|
+ memberEdit: 'memberEdit',
|
|
|
+ memberUpdate: 'memberUpdate',
|
|
|
}),
|
|
|
submitInformation () {
|
|
|
- if (!this.if_confirm) {
|
|
|
- this.confirmSumit()
|
|
|
- return
|
|
|
- }
|
|
|
- this.dialog={condition:1,content:'请仔细核对信息,确认上传后除非管理员审核否则无法再次上传'}
|
|
|
- this.$refs.confirm.open()
|
|
|
+ // if (!this.if_confirm) {
|
|
|
+ // this.confirmSumit()
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ const that = this
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '请仔细核对信息,确认上传后除非管理员审核否则无法再次上传',
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ that.confirmSumit()
|
|
|
+ } else if (res.cancel) {
|
|
|
+ console.log('用户点击取消');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // this.dialog={condition:1,content:'请仔细核对信息,确认上传后除非管理员审核否则无法再次上传'}
|
|
|
+ // this.$refs.confirm.open()
|
|
|
},
|
|
|
confirmSumit () {
|
|
|
- updateMemberAuth(this.realname, this.idcard, this.if_confirm).then(res => {
|
|
|
- if (this.if_confirm) {
|
|
|
+ updateMemberAuth(this.realname, this.idcard, true).then(res => {
|
|
|
this.memberEdit({ member_truename: this.realname, member_idcard: this.idcard, member_auth_state: 1 })
|
|
|
uni.showToast({icon:'none',title: res.message})
|
|
|
- } else {
|
|
|
- this.if_confirm = true
|
|
|
- this.submitInformation()
|
|
|
- }
|
|
|
}).catch(function (error) {
|
|
|
uni.showToast({icon:'none',title: error.message})
|
|
|
})
|
|
@@ -250,48 +258,59 @@ export default {
|
|
|
this.showimage = src
|
|
|
this.showPopup('isshow')
|
|
|
},
|
|
|
- dropImage (id) {
|
|
|
-
|
|
|
- this.dialog={condition:2, content:'确定要删除该图片吗?',data:id}
|
|
|
- this.$refs.confirm.open()
|
|
|
+ dropImage (id ,e) {
|
|
|
+
|
|
|
+ // this.dialog={condition:1,content:'请仔细核对信息,确认上传后除非管理员审核否则无法再次上传'}
|
|
|
+ // this.$refs.confirm.open()
|
|
|
+ // this.dialog={condition:2, content:'确定要删除该图片吗?', data:id}
|
|
|
+ dropAuth(id).then(res => {
|
|
|
+ this.user[this.dialog.data + '_url'] = ''
|
|
|
+ var temp = {}
|
|
|
+ temp[id + '_url'] = ''
|
|
|
+ this.memberEdit(temp)
|
|
|
+ }).catch(function (error) {
|
|
|
+ uni.showToast({icon:'none',title: error.message})
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
|
|
|
},
|
|
|
- useCrop (res) {
|
|
|
- let index = this.cropType
|
|
|
- var formdata={
|
|
|
- filePath:res.url,
|
|
|
- name:index,
|
|
|
- id:index
|
|
|
- }
|
|
|
+ // useCrop (res) {
|
|
|
+ // let index = this.cropType
|
|
|
+ // var formdata={
|
|
|
+ // filePath:res.url,
|
|
|
+ // name:index,
|
|
|
+ // id:index
|
|
|
+ // }
|
|
|
|
|
|
- uploadAuth(formdata).then(res => {
|
|
|
- this.user[index + '_url'] = res.result.file_path
|
|
|
- this.imageValue[index]=[{
|
|
|
- name:index,
|
|
|
- extname:'jpg',
|
|
|
- url:res.result.file_path
|
|
|
- }]
|
|
|
- var temp = {}
|
|
|
- temp[index + '_url'] = res.result.file_path
|
|
|
- this.memberEdit(temp)
|
|
|
- this.cropperOption.imgUrl=''
|
|
|
- this.$forceUpdate()
|
|
|
- uni.hideLoading()
|
|
|
- }).catch(function (error) {
|
|
|
- uni.showToast({icon:'none',title: error.message})
|
|
|
- uni.hideLoading()
|
|
|
- this.cropperOption.imgUrl=''
|
|
|
- this.$forceUpdate()
|
|
|
- })
|
|
|
- },
|
|
|
- cropReady(){
|
|
|
- this.cropperOption.img = this.cropperOption.imgUrl
|
|
|
- },
|
|
|
- cropBack(){
|
|
|
- console.log('this.cropperOptio' , this.cropperOption)
|
|
|
- this.cropperOption.imgUrl=''
|
|
|
- this.$forceUpdate()
|
|
|
- },
|
|
|
+ // uploadAuth(formdata).then(res => {
|
|
|
+ // this.user[index + '_url'] = res.result.file_path
|
|
|
+ // this.imageValue[index]=[{
|
|
|
+ // name:index,
|
|
|
+ // extname:'jpg',
|
|
|
+ // url:res.result.file_path
|
|
|
+ // }]
|
|
|
+ // var temp = {}
|
|
|
+ // temp[index + '_url'] = res.result.file_path
|
|
|
+ // this.memberEdit(temp)
|
|
|
+ // this.cropperOption.imgUrl=''
|
|
|
+ // this.$forceUpdate()
|
|
|
+ // uni.hideLoading()
|
|
|
+ // }).catch(function (error) {
|
|
|
+ // uni.showToast({icon:'none',title: error.message})
|
|
|
+ // uni.hideLoading()
|
|
|
+ // this.cropperOption.imgUrl=''
|
|
|
+ // this.$forceUpdate()
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // cropReady(){
|
|
|
+ // this.cropperOption.img = this.cropperOption.imgUrl
|
|
|
+ // },
|
|
|
+ // cropBack(){
|
|
|
+ // console.log('this.cropperOptio' , this.cropperOption)
|
|
|
+ // this.cropperOption.imgUrl=''
|
|
|
+ // this.$forceUpdate()
|
|
|
+ // },
|
|
|
// 直接上传
|
|
|
uploadSelectImg(index, event){
|
|
|
const file = event.tempFiles[0]
|