优化代码

This commit is contained in:
wuxw 2023-12-08 10:54:58 +08:00
parent 4ce58506ed
commit f425366407
3 changed files with 17 additions and 5 deletions

View File

@ -375,3 +375,13 @@ export function getUserName(){
return _userInfo.userName;
}
export function getUserTel(){
let _userInfo = uni.getStorageSync("userInfo");
if(!_userInfo){
return null;
}
return _userInfo.ownerTel;
}

View File

@ -82,7 +82,8 @@
formatDate,
date2String,
dateSubOneDay
} from '../../lib/java110/utils/DateUtil.js'
} from '../../lib/java110/utils/DateUtil.js';
import {getUserName,getUserTel} from '../../api/user/userApi.js'
export default {
components: {
@ -307,8 +308,8 @@
"tradeType": _tradeType,
"communityId": this.ownerInfo.communityId,
"spaces": JSON.stringify(spacesList),
"personName": this.ownerInfo.appUserName,
"personTel": this.ownerInfo.link,
"personName": getUserName(),
"personTel": getUserTel(),
"payWay": "2",
"state": "S",
"remark": "",

View File

@ -86,7 +86,7 @@
import {getCurOwner} from '@/api/owner/ownerApi.js';
import {payFeeWechat} from '../../api/fee/feeApi.js';
import {getUserId} from '../../api/user/userApi.js';
import {getUserId,getUserName} from '../../api/user/userApi.js';
export default {
data() {
@ -113,9 +113,10 @@
let _selectdGoods = uni.getStorageSync('/pages/reserve/reserveOrder');
this.selectdGoods = _selectdGoods;
let _that = this;
_that.personName = getUserName();
getCurOwner()
.then(_ownerInfo=>{
_that.personName = _ownerInfo.appUserName;
//_that.personName = _ownerInfo.appUserName;
_that.personTel = _ownerInfo.link;
_that.communityId = _ownerInfo.communityId;
});