修改页面
This commit is contained in:
+59
-12
@@ -7,17 +7,19 @@
|
||||
<view class="content">
|
||||
<view class="contop">
|
||||
<view class="">
|
||||
<!-- <image class="userimg" :src="userinfo.avatar" mode=""></image> -->
|
||||
<image class="userimg" src="/static/image/mine/user.png" mode=""></image>
|
||||
<image class="userimg" :src="userinfo.avatar==''||userinfo.avatar==null||userinfo.avatar=='null'?'/static/image/mine/user.png':userinfo.avatar" mode=""></image>
|
||||
<!-- <image class="userimg" src="/static/image/mine/user.png" mode=""></image> -->
|
||||
</view>
|
||||
<!-- <view class="right" @click="changinfo"> -->
|
||||
<view class="right">
|
||||
<view class="">
|
||||
<text>{{userinfo.email}}</text>
|
||||
<!-- <image src="/static/image/mine/edit.png" mode=""></image> -->
|
||||
<!-- <view class="right"> -->
|
||||
<view class="" @click="changinfo">
|
||||
<text>{{userinfo.name}}</text>
|
||||
<image src="/static/image/mine/edit.png" mode=""></image>
|
||||
</view>
|
||||
<view class="mineid">
|
||||
ID:{{userinfo.id}}
|
||||
<view class="minemp">
|
||||
<view class="mineid">ID:{{userinfo.id}}</view>
|
||||
<!-- <view class="mp" @click="gomymp">{{$t('auth')}}</view> -->
|
||||
<view v-if="!isopenid" class="mp" @click="gomyauth">{{$t('auth')}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -32,11 +34,11 @@
|
||||
<uni-icons type="right" class="icon" size="18"></uni-icons>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="sonContent" @click="navTo('/pages/mine/resetPwd')">
|
||||
<view class="sonContent" @click="navTo('/pages/mine/resetPwd')">
|
||||
<image class="son-img-bg" src="/static/image/mine/icon2.png"></image>
|
||||
<span>{{$t('mine.cpassword')}}</span>
|
||||
<uni-icons type="right" class="icon" size="18"></uni-icons>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="sonContent" @click="show=true">
|
||||
<image class="son-img-bg" src="/static/image/mine/icon3.png"></image>
|
||||
<span>{{$t('mine.contact')}}</span>
|
||||
@@ -57,6 +59,11 @@
|
||||
<span>{{$t('mine.logoff')}}</span>
|
||||
<uni-icons type="right" class="icon" size="18"></uni-icons>
|
||||
</view> -->
|
||||
<!-- <view class="sonContent" @click="navTo('/pages/mine/recyclebin')">
|
||||
<image class="son-img-bg" src="/static/image/mine/icon8.png"></image>
|
||||
<span>{{$t('mine.recyclebin')}}</span>
|
||||
<uni-icons type="right" class="icon" size="18"></uni-icons>
|
||||
</view> -->
|
||||
<view class="sonContent" @click="logout">
|
||||
<image class="son-img-bg" src="/static/image/mine/icon7.png"></image>
|
||||
<span>{{$t('mine.logout')}}</span>
|
||||
@@ -84,15 +91,41 @@
|
||||
data() {
|
||||
return {
|
||||
userinfo:'',
|
||||
show: false
|
||||
show: false,
|
||||
isopenid:false,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.userinfo =JSON.parse(uni.getStorageSync('userinfo'))
|
||||
// this.userinfo =JSON.parse(uni.getStorageSync('userinfo'))
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.getuserinfo()
|
||||
},
|
||||
methods: {
|
||||
getuserinfo(){
|
||||
|
||||
request({
|
||||
url:'user/getInfo',
|
||||
method:'get',
|
||||
}).then(res => {
|
||||
this.userinfo = res.data.data;
|
||||
if(this.userinfo.feishu_openid&&this.userinfo.feishu_openid!=null&&this.userinfo.feishu_openid!='null'&&this.userinfo.feishu_openid!=''){
|
||||
this.isopenid=true
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
gomymp(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/mine/webview'
|
||||
})
|
||||
},
|
||||
gomyauth(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/webview'
|
||||
})
|
||||
},
|
||||
changinfo(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/mine/changinfo'
|
||||
@@ -173,6 +206,7 @@
|
||||
font-size: 34rpx;
|
||||
color: white;
|
||||
.right{
|
||||
flex: 2;
|
||||
margin-left: 15px;
|
||||
image{
|
||||
width: 32rpx;
|
||||
@@ -182,9 +216,22 @@
|
||||
view{
|
||||
line-height: 30px;
|
||||
}
|
||||
.minemp{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.mp{
|
||||
font-size: 28rpx;
|
||||
background: #fff;
|
||||
color: #3471FF;
|
||||
padding: 1px 15px;
|
||||
border-radius: 5px 15px 15px 15px;
|
||||
}
|
||||
}
|
||||
.mineid{
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<view>
|
||||
<web-view style="background-color: #fafafa;height: 100vh;" ref="webview" :src="webUrl"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { request,showToast } from '@/api/apiT.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
webUrl:''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options);
|
||||
this.feishugetAuth()
|
||||
if(options.code){
|
||||
request({
|
||||
url:'feishu/getAuth',
|
||||
method:'post',
|
||||
data:{
|
||||
code:options.code
|
||||
}
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
icon: 'none'
|
||||
});
|
||||
if(res.data.code ==0){
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/mine',// 替换为你要跳转的页面路径
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
feishugetAuth(){
|
||||
const pages = getCurrentPages();
|
||||
const currentPage = pages[pages.length - 1];
|
||||
const route = currentPage.route; // 页面路径
|
||||
const options = currentPage.options; // 页面参数
|
||||
const fullUrl = `${route}?${Object.keys(options).map(key => `${key}=${options[key]}`).join('&')}`;
|
||||
console.log('当前页面完整 URL:', fullUrl);
|
||||
request({
|
||||
url:'feishu/getinfo',
|
||||
method:'post',
|
||||
}).then(res => {
|
||||
var data = res.data.data;
|
||||
var urls = data.url+fullUrl
|
||||
console.log(data)
|
||||
this.webUrl = 'https://open.feishu.cn/open-apis/authen/v1/authorize?app_id='+data.app_id+'&redirect_uri='+urls+'&scope='+data.scope+'&state='+data.state
|
||||
console.log(this.webUrl)
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user