mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-23 21:36:38 +08:00
优化代码
This commit is contained in:
parent
6d7935a40a
commit
7eadec3836
@ -365,3 +365,13 @@ export function getUserId(){
|
||||
|
||||
return _userInfo.userId;
|
||||
}
|
||||
|
||||
export function getUserName(){
|
||||
let _userInfo = uni.getStorageSync("userInfo");
|
||||
if(!_userInfo){
|
||||
return null;
|
||||
}
|
||||
|
||||
return _userInfo.userName;
|
||||
}
|
||||
|
||||
|
||||
@ -37,7 +37,8 @@
|
||||
import SxRate from '@/components/sx-rate'
|
||||
|
||||
import {appraiseRepair} from '../../api/repair/repairApi.js'
|
||||
import {getCurOwner} from '../../api/owner/ownerApi.js'
|
||||
import {getCurOwner} from '../../api/owner/ownerApi.js';
|
||||
import {getUserId,getUserName} from '../../api/user/userApi.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -62,11 +63,13 @@
|
||||
let _that = this;
|
||||
let _repairId = options.repairId;
|
||||
this.repairId = _repairId;
|
||||
getCurOwner()
|
||||
.then(function(_owner) {
|
||||
_that.userId = _owner.userId;
|
||||
_that.userName = _owner.userName;
|
||||
});
|
||||
this.userId = getUserId();
|
||||
this.userName = getUserName();
|
||||
// getCurOwner()
|
||||
// .then(function(_owner) {
|
||||
// _that.userId = _owner.userId;
|
||||
// _that.userName = _owner.userName;
|
||||
// });
|
||||
},
|
||||
methods: {
|
||||
appraiseScoreChange(e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user