Commit 0944f24a authored by liwei's avatar liwei

完善了实名认证相关页面

parent 861f5a22
......@@ -69,75 +69,6 @@
},
methods: {
async loadPage() {
// var that = this;
// const res = await that.$myRequest({
// url: '/nostalgia/fruserauth/info',
// withToken: true,
// method: 'GET',
// });
// console.log(res);
// if (res.data.code == 200) {
// if (res.data.data.identityImgList != null) {
// if (res.data.data.identityImgList.length > 0) {
// that.zhengimageUrl = res.data.data.identityImgList[0]
// }
// if (res.data.data.identityImgList.length > 1) {
// that.fanimageUrl = res.data.data.identityImgList[1]
// }
//
// }
//
// } else {
// this.tipMsg = res.data.msg;
// this.$refs.elm.showDialog();
// }
},
chooseImg(type) {
console.log(type);
uni.chooseImage({
count: 1,
success: (res) => {
uni.showLoading({
title: "上传中"
})
res.tempFilePaths.forEach((i) => {
uni.uploadFile({
url: this.$BASE_URL + '/file/upload',
filePath: i,
name: 'file',
formData: {
'file': 'file'
},
success: (res) => {
uni.hideLoading();
let dataing = JSON.parse(res.data)
console.log(dataing)
this.newImageSrc = dataing.data.url
console.log(this.newImageSrc)
this.updateImage(type);
},
fail: (loginErr) => {
this.tipMsg = "上传失败,请重试";
this.$refs.elm.showDialog();
}
});
});
}
});
},
updateImage(type) {
var that = this;
if (type == 'z') {
that.updatezImg = that.newImageSrc;
that.zhengimageUrl = that.newImageSrc;
} else if (type == 'f') {
that.updatefImg = that.newImageSrc;
that.fanimageUrl = that.newImageSrc;
}
},
async authadd() {
const userInfo = uni.getStorageSync('userInfo')
const params = {
......@@ -150,15 +81,14 @@
uni.navigateTo({
url: "/webView/index"
})
}else {
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
}
})
},
confirm() {
this.isConfirm=false;
uni.navigateBack();
}
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment