| | |
| | | data: {curr:1,limit:16}, |
| | | method:'POST', |
| | | success(result) { |
| | | console.log(res); |
| | | if (result.statusCode === 404) { |
| | | uni.showToast({title: '请重新登录', icon: "none", position: 'top'}) |
| | | return |
| | |
| | | </view> |
| | | <!-- 信息 --> |
| | | <view class="user-info"> |
| | | <view class="user-name">陈鹏</view> |
| | | <view class="user-name">{{username}}</view> |
| | | <view class="user-company">中扬立库技术有限公司</view> |
| | | </view> |
| | | <!-- 更多 --> |
| | |
| | | export default{ |
| | | data() { |
| | | return { |
| | | |
| | | username: '' |
| | | } |
| | | }, |
| | | onShow() { |
| | | this.getDetail() |
| | | }, |
| | | methods: { |
| | | userDetail() { |
| | | uni.navigateTo({ |
| | | url:'/pages/user/user_detail/userDetail' |
| | | }) |
| | | }, |
| | | getDetail() { |
| | | let that = this |
| | | uni.request({ |
| | | url: that.baseUrl + '/user/detail/auth', |
| | | header: {'token' : uni.getStorageSync('token')}, |
| | | method: 'POST', |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | that.username = res.data.username |
| | | } else if (res.code === 403) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '../../login/login' |
| | | }); |
| | | }, 1000); |
| | | } else { |
| | | uni.showToast({title: res.msg, icon: "none",position: 'top'}) |
| | | } |
| | | console.log(res.data); |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <view> |
| | | <view style="background-color: #fff;"> |
| | | <view style="background-color: #fff;" @click="clickk"> |
| | | <view class="item"> |
| | | <view>角色</view><view class="item-right">{{detail.roleName}}</view> |
| | | <view class="user-icons"> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view>密码</view><view class="item-right">{{detail.roleName}}</view> |
| | | <view>密码</view><view class="item-right"></view> |
| | | <view class="user-icons"> |
| | | <uni-icons type="right" color="#c1c1c1"></uni-icons> |
| | | </view> |
| | |
| | | method: 'POST', |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | that.detail = res.data |
| | | console.log(res.data); |
| | | } else if (res.code === 403) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '../../login/login' |
| | | }); |
| | | }, 1000); |
| | | } else { |
| | | uni.showToast({title: res.msg, icon: "none",position: 'top'}) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | clickk() { |
| | | uni.showToast({ |
| | | icon:'error', |
| | | title: '移动端暂不支持修改,请至电脑端修改', |
| | | duration: 2000 |
| | | }) |
| | | }, |
| | | logOut() { |
| | | |
| | | uni.showToast({ |
| | | title: '退出成功', |
| | | duration: 1000 |
| | | }) |
| | | setTimeout(() => { |
| | | uni.removeStorageSync('token'); |
| | | uni.removeStorageSync('password'); |
| | | uni.reLaunch({ |
| | | url:"/pages/login/login" |
| | | }); |
| | | }, 1000); |
| | | } |
| | | |
| | | } |