我已经开发了一个自定义 Microsoft Teams 应用程序,它可以在桌面上正常运行,但它不能在移动应用程序上运行。它只显示有关调试的页面。
这是进入移动应用程序的标签:
我该如何解决?谢谢
这是桌面应用程序的选项卡:
这是我的个人应用程序的主页选项卡代码的一部分:
class Tab extends React.Component {
constructor(props) {
super(props)
this.state = {
user: null,
loading: true,
isLogged: false,
error: null,
layout: true
}
}
componentDidMount() {
const params = new URLSearchParams(this.props.location.search);
let teamsUser = {
Tid: params.get('tid'),
Aaid: params.get('aaId')
}
getUser(teamsUser).then((userResponse) => {
this.setState({
user: userResponse,
loading: false,
isLogged: true
})
}).catch((error) => {
logger.warn(JSON.stringify(error));
this.setState({
error: error,
loading: false
})
});
}
setLogged = (user) => {
this.setState({
user: user,
isLogged: true,
loading: false
})
}
render() {
let content;
const { user, loading, isLogged, error } = this.state;
if (loading) {
content = <Loading></Loading>
} else if (error) {
throw Error(error)
}
else if (isLogged) {
content = <Catalogue user={user}></Catalogue>
} else {
content = <UserLogin setLogged={this.setLogged}></UserLogin>
}
return (
<Layout>
{content}
</Layout>
);
}
}
export default Tab
这是我的清单,我将 url 与 tid 和 aaid 放在了一起:
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.9/MicrosoftTeams.schema.json",
"manifestVersion": "1.9",
"version": "1.0.0",
"id": "86af4197-14c8-4439-a440-3d33b4567f54",
"packageName": "com.microsoft.teams.extension",
"developer": {
"name": "Teams App, Inc.",
"websiteUrl": "https://localhost:3000",
"privacyUrl": "https://localhost:3000/privacy",
"termsOfUseUrl": "https://localhost:3000/termsofuse"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "AppLocal",
"full": ""
},
"description": {
"short": "Short description for Personal App.",
"full": "Full description of Personal App."
},
"accentColor": "#FFFFFF",
"staticTabs": [
{
"entityId": "index",
"name": "Catalogue",
"contentUrl": "https://localhost:3000/catalogue?tid={tid}&aaId={userObjectId}",
"websiteUrl": "https://localhost:3000/catalogue",
"scopes": [
"personal"
]
},
{
"entityId": "live",
"name": "Live",
"contentUrl": "https://localhost:3000/live?tid={tid}&aaId={userObjectId}",
"websiteUrl": "https://localhost:3000/live",
"scopes": [
"personal"
]
},
{
"entityId": "about",
"scopes": [
"personal"
]
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"localhost:3000",
"localhost"
]
}
我希望上面提到的代码可以帮助你帮助我。