Commit 5d2a9635 authored by 罗成兵's avatar 罗成兵

获取用户信息

parent b284720f
......@@ -12,8 +12,8 @@ const routes = [
{path: '/provideDetail',name: 'provideDetail',component: () => import('../views/provideDetail/provideDetail.vue')},
{path: '/receiveDetail',name: 'receiveDetail',component: () => import('../views/receiveDetail/receiveDetail.vue')},
{path: '/canvas',name: 'canvas',component: () => import('../views/canvas/canvas.vue')},
{path: '/questionAnswer',name: 'canvas',component: () => import('../views/questionAnswer/questionAnswer.vue')},
{path: '/debugInfo',name: 'canvas',component: () => import('../views/index/debugInfo.vue')},
{path: '/questionAnswer',name: 'questionAnswer',component: () => import('../views/questionAnswer/questionAnswer.vue')},
{path: '/debugInfo',name: 'debugInfo',component: () => import('../views/index/debugInfo.vue')},
{path: '/test1',name: 'test1',component: () => import('../views/test/test1.vue')},
]
......
......@@ -6,7 +6,7 @@
</template>
</van-nav-bar>
<div class="height_44"></div>
<vue-esign ref="esign" :isCrop="false"/>
<vue-esign ref="esign" :isCrop="false" :width="400" :height="700"/>
<div class="btn">
<div class="btn_right" @click="handleReset">
<img src="../../assets/images/abrase.png" alt="">
......
......@@ -7,26 +7,24 @@
</div>
</template>
</van-nav-bar>
<br> <br>
<van-divider />
<van-list
v-model:loading="loading"
:finished="finished"
finished-text=""
<br>
<van-divider/>
>
<van-cell :title="'姓名: '+userInfo.nickName"/>
<van-cell :title="'性别: '+(userInfo.nickName==1?'男':'女')"/>
<van-cell :title="'账号: '+userInfo.account"/>
<van-cell :title="'用户ID: '+userInfo.userId"/>
<van-cell :title="'Token: '+userInfo.token"/>
<van-cell :title="'接入地址: '+userInfo.domain"/>
</van-list>
<van-form label-align="right" label-width="70">
<van-cell-group>
<van-field v-model="userInfo.account" readonly autosize rows="1" label="账号:" type="textarea"/>
<van-field v-model="userInfo.nickName" readonly autosize rows="1" label="姓名:" type="textarea"/>
<van-field v-model="userInfo.genderName" readonly autosize rows="1" label="性别:" type="textarea"/>
<van-field v-model="userInfo.userId" readonly autosize rows="1" label="用户ID:" type="textarea"/>
<van-field v-model="userInfo.token" readonly autosize rows="1" label="Token:" type="textarea"/>
<van-field v-model="userInfo.domain" readonly autosize rows="1" label="接入地址:" type="textarea"/>
</van-cell-group>
</van-form>
<br>
<van-button style="margin-left: 10%;width: 80%" round type="primary" color="#1989fa" @click="copyUserInfo()">
复制
</van-button>
<br> <br>
<br> <br>
<van-button style="margin-left: 10%;width: 80%" round type="danger" color="#EC808D" @click="handleBack()">
关闭
</van-button>
......@@ -38,13 +36,18 @@ export default {
components: {},
data() {
return {
loading: true,
finished: true,
userInfo: JSON.parse(sessionStorage.getItem("userInfo"))||{},
userInfo: {},
}
},
created() {
let userInfo = sessionStorage.getItem("userInfo")
if (userInfo) {
this.userInfo = JSON.parse(userInfo)
this.userInfo.genderName = (this.userInfo.gender == null ? '未知' : this.userInfo.gender == 1 ? '男' : '女')
}
},
methods: {
copyUserInfo(){
copyUserInfo() {
let textarea = document.createElement('textarea');
textarea.style.position = 'fixed';
textarea.style.opacity = 0;
......@@ -55,7 +58,7 @@ export default {
document.body.removeChild(textarea);
this.$toast.tips('已复制到剪贴板!');
},
handleBack(){
handleBack() {
this.$router.go(-1);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment