优化代码

This commit is contained in:
java110 2022-06-15 19:02:46 +08:00
parent 348a5da3a0
commit 1865d5d1a9

View File

@ -64,6 +64,7 @@
// #ifdef H5 // #ifdef H5
import { import {
getPageWAppId,
wechatRefreshToken wechatRefreshToken
} from '@/lib/java110/page/PageH5.js' } from '@/lib/java110/page/PageH5.js'
// #endif // #endif
@ -76,7 +77,8 @@
setting: {}, setting: {},
titles: [], titles: [],
qaId: '', qaId: '',
objType: '' objType: '',
openId:''
}; };
}, },
/** /**
@ -86,9 +88,11 @@
let that = this; let that = this;
// #ifdef H5 // #ifdef H5
if (!options.openId) { if (!options.openId) {
getPageWAppId(options);
wechatRefreshToken(window.location.href, 2, window.location.href); wechatRefreshToken(window.location.href, 2, window.location.href);
return; return;
} }
this.openId = options.openId;
this._loadUserInfo(options.openId); this._loadUserInfo(options.openId);
// #endif // #endif
this.settingId = options.settingId; this.settingId = options.settingId;
@ -178,6 +182,7 @@
"bindTime": this.bindTime, "bindTime": this.bindTime,
"remark": this.remark, "remark": this.remark,
"backTime": this.bindDate + " " + this.bindTime + ":00", "backTime": this.bindDate + " " + this.bindTime + ":00",
"openId":this.openId,
}; };
let msg = ""; let msg = "";
if (obj.communityId == "") { if (obj.communityId == "") {
@ -248,6 +253,7 @@
"personName": this.name, "personName": this.name,
"idCard": this.idCard, "idCard": this.idCard,
"tel": this.tel, "tel": this.tel,
"openId":this.openId,
questionAnswerTitles: _questionAnswerTitles, questionAnswerTitles: _questionAnswerTitles,
} }
saveReportInfoAnswerValue(obj) saveReportInfoAnswerValue(obj)
@ -257,6 +263,9 @@
title: '保存成功' title: '保存成功'
}); });
this.communityId = ""; this.communityId = "";
uni.navigateBack({
delta:1
})
}, err => { }, err => {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',