| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- <template>
- <view style="background-color: #fff;">
- <view class="" style="width: 100%;height: 30rpx;background-color: #f7f7f7;">
-
- </view>
- <view class="my_infobox">
- <view class="my_info_item">
- <view class="">
- 账号名称
- </view>
- <view class="">
- {{userinfo.username}}
- </view>
- </view>
- <view class="">
- <u-collapse>
- <u-collapse-item title="隶属海关" name="Docs guide">
- <p class="u-collapse-content" v-for="(item,index) in userinfo.org_list" :key="index">
- {{index+1+"、"}}{{item.org_name}}</p>
- <p v-if="userinfo.org_list.length == 0">暂无组织信息</p>
- </u-collapse-item>
- </u-collapse>
- </view>
- <view class="my_info_item">
- <view class="">
- 角色
- </view>
- <view class="">
- {{userinfo.real_name}}
- </view>
- </view>
- <view class="my_info_item">
- <view class="">
- 手机号码
- </view>
- <view class="">
- {{userinfo.mobile}}
- </view>
- </view>
- <view class="my_info_item">
- <view class="">
- 邮箱
- </view>
- <view class="">
- {{userinfo.email}}
- </view>
- </view>
- <view class="my_info_item" @click="toalter">
- <view class="">
- 密码
- </view>
- <view class="item_name">
- 修改
- </view>
- </view>
- <view class="my_info_item">
- <u-button type="primary" text="退出账号" @click="show = true" shape="circle"></u-button>
- <u-modal :show="show" :title="title" :content='content' :showCancelButton="true" @confirm="confirm" @cancel="show = false"></u-modal>
- </view>
- </view>
- </view>
- </template>
- <script>
- import store from '@/store/index.js'; //需要引入store
- let App = getApp();
- var API = App.globalData.socketTask;
- export default {
- data() {
- return {
- userinfo: {
- org_list:[]
- },
- orglist: "",
- title: "",
- show: false,
- content: "确定要退出当前账号吗?"
- }
- },
- methods: {
- async getinfo() {
- const res = await this.$myRequest({
- url: '/api/api_gateway?method=sysmenage.usermanager.user_info',
- })
- console.log(res)
- this.userinfo = res
- },
- toalter() {
- uni.navigateTo({
- url: './password',
- });
- },
- async confirm() {
- const res = await this.$myRequest({
- url: '/api/api_gateway?method=sysmenage.usermanager.user_logout',
- })
- console.log(res)
- if(res){
- App.close();
- uni.removeStorage({
- key: 'session_key',
- })
- uni.reLaunch({
- url: '../login/login',
- });
- }
- }
- },
- onLoad() {
- this.getinfo()
- }
- }
- </script>
- <style lang="less" scoped>
- page{
- background-color: #f7f7f7;
- }
- .my_infobox {
- width: 90%;
- margin: 0 auto;
- .my_info_item {
- display: flex;
- padding: 30rpx 0;
- border-bottom: 1px solid #F6F6F6;
- justify-content: space-between;
- .item_name {
- color: #409eff;
- }
- }
- .my_info_item:first-child {
- border-bottom: 0;
- }
- /deep/.u-line {
- border-bottom: 1px solid #F6F6F6 !important;
- transform: scaleY(1) !important;
- }
- /deep/.u-cell__body {
- padding-left: 0;
- padding-right: 0;
- font-size: 32rpx;
- .u-cell__title-text {
- font-size: 32rpx;
- font-family: "微软雅黑";
- }
- }
- }
- </style>
|