| | |
| | | <block slot="right"> |
| | | <view class="city"> |
| | | <view> |
| | | <text class="uni-nav-bar-text">角色</text> |
| | | <text class="uni-nav-bar-text">{{username}}</text> |
| | | </view> |
| | | <uni-icons type="arrowdown" color="#333333" size="20" /> |
| | | </view> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import user from '@/pages/api/user/user.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | csmtrList: [], |
| | | last_id: '', |
| | | username: '', |
| | | userid: 0, |
| | | reload: false, |
| | | status: 'more', |
| | | curr:2, |
| | |
| | | }) |
| | | |
| | | }, |
| | | onLoad() { |
| | | |
| | | }, |
| | | onShow() { |
| | | setTimeout(()=> { |
| | | this.getCsmtr1() |
| | | },500) |
| | | this.getDetail() |
| | | }, |
| | | onReachBottom() { |
| | | this.status = 'more'; |
| | | this.getCsmtr() |
| | | }, |
| | | mounted() { |
| | | // this.getUserTree() |
| | | // this.columns = [['aa','bb']] |
| | | }, |
| | | methods: { |
| | | async getDetail() { |
| | | let res = await user.getDetail() |
| | | if (res.code === 200) { |
| | | this.username = res.data.username |
| | | } else if (res.code === 403) { |
| | | this.backLogin(res) |
| | | } |
| | | }, |
| | | open() { |
| | | this.show = true |
| | | console.log(this.columns); |
| | |
| | | }).then((res)=>{ |
| | | console.log(res); |
| | | }) |
| | | |
| | | |
| | | |
| | | // success(res) { |
| | | // res = res.data |
| | | // res.data[0].childern |
| | | // let sel1 = [] |
| | | // for (let k of res.data[0].children) { |
| | | // res.data[0].children |
| | | // sel1.push(k.title) |
| | | |
| | | // } |
| | | // // _this.columns[0] = sel1 |
| | | // } |
| | | }, |
| | | back() { |
| | | uni.navigateBack({ |
| | |
| | | // --- |
| | | search() { |
| | | |
| | | }, |
| | | backLogin(res) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '../login/login' |
| | | }); |
| | | }, 1000); |
| | | } |
| | | } |
| | | } |
| | |
| | | .city { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-right: 4px; |
| | | } |
| | | .uni-nav-bar-text { |
| | | font-size: 12px; |