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;
|
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 SxRate from '@/components/sx-rate'
|
||||||
|
|
||||||
import {appraiseRepair} from '../../api/repair/repairApi.js'
|
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 {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -62,11 +63,13 @@
|
|||||||
let _that = this;
|
let _that = this;
|
||||||
let _repairId = options.repairId;
|
let _repairId = options.repairId;
|
||||||
this.repairId = _repairId;
|
this.repairId = _repairId;
|
||||||
getCurOwner()
|
this.userId = getUserId();
|
||||||
.then(function(_owner) {
|
this.userName = getUserName();
|
||||||
_that.userId = _owner.userId;
|
// getCurOwner()
|
||||||
_that.userName = _owner.userName;
|
// .then(function(_owner) {
|
||||||
});
|
// _that.userId = _owner.userId;
|
||||||
|
// _that.userName = _owner.userName;
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
appraiseScoreChange(e) {
|
appraiseScoreChange(e) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user