diff --git a/packageIndex/report/report.vue b/packageIndex/report/report.vue index f54c3a0..20cedfb 100644 --- a/packageIndex/report/report.vue +++ b/packageIndex/report/report.vue @@ -531,7 +531,7 @@ }, } }, - mounted() { + async mounted() { this.fetchSpecial() // 获取专题 this.fetchCodeURl() // 获取验证码 this.form.reportType = getLocationParams('reportTypeValue'); // 举报类型接口传参 @@ -543,6 +543,12 @@ console.log(this.form.reportType, '-', this.form.type, 'p', this.reportType) console.log(getLocationParams('reportType'), 'getLocationParams') //在这里先获取举报人信息,有举报人正常,没有举报人提示去注册 + // 自动填充举报人信息 + const userinfo = wx.getStorageSync('userInfoxj') + const account = await decryption(userinfo.account) + const phone = await decryption(userinfo.phone) + this.form.reportName = account && account !== 'undefined' ? account : '' + this.form.phone = phone && phone !== 'undefined' ? phone : '' }, onReady() { this.showMessage = true; //显示举报须知