我正在尝试在Outlook加载项中设置测试许可证令牌。根据文档,我必须在清单文件的SourceLocation
中进行设置:
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="https://localhost:3000?et=%3Cr%3E%0A%20%20%3..."/>
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
问题是,当我尝试获取URL查询参数时,它将无法工作。 window.location
看起来像这样:
https://localhost:3000/?et=
知道为什么会发生吗?
当我更新动作ShowTaskpane
的源位置时,它不会启动插件:
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="messageReadTaskPaneUrl" />
</Action>
...
<bt:Url id="messageReadTaskPaneUrl" DefaultValue="https://localhost:3000?et=%3Cr%3E%0A%20%20%...">
如果我这样设置,则在启动插件时会显示:
Sorry, but we can't start this add-in because it isn't set up properly.
我使用以下测试令牌:
<r>
<t
aid="WA907006056"
pid="{4FB601F2-5469-4542-B9FC-B96345DC8B39}"
cid="32F3E7FC559F4F49"
did="{0672BAE9-B41B-48FE-87F1-7F4D3DD3F3B1}"
ts="30"
et="Trial"
ad="2012-01-12T21:58:13Z"
ed="2019-06-30T21:58:13Z"
sd="2012-01-12T00:00:00Z"
test="true"
te="2019-06-30T02:49:34Z" />
<d>VNNAnf36IrkyUVZlihQJNdUUZl/YFEfJOeldWBtd3IM=</d>
</r>
并使用以下服务对网址进行编码:
答案 0 :(得分:1)
问题出在URL编码上。对令牌进行编码时,必须删除所有新行。否则,将引发错误。因此,在编码之前,请先获取令牌...
<r>
<t
aid="WA907006056"
pid="{4FB601F2-5469-4542-B9FC-B96345DC8B39}"
cid="32F3E7FC559F4F49"
did="{0672BAE9-B41B-48FE-87F1-7F4D3DD3F3B1}"
ts="30"
et="Trial"
ad="2012-01-12T21:58:13Z"
ed="2019-06-30T21:58:13Z"
sd="2012-01-12T00:00:00Z"
test="true"
te="2019-06-30T02:49:34Z" />
<d>VNNAnf36IrkyUVZlihQJNdUUZl/YFEfJOeldWBtd3IM=</d>
</r>
并删除所有新行,如下所示:
<r> <t aid="WA907006056" pid="{4FB601F2-5469-4542-B9FC-B96345DC8B39}" cid="32F3E7FC559F4F49" did="{0672BAE9-B41B-48FE-87F1-7F4D3DD3F3B1}" ts="30" et="Trial" ad="2012-01-12T21:58:13Z" ed="2019-06-30T21:58:13Z" sd="2012-01-12T00:00:00Z" test="true" te="2019-06-30T02:49:34Z" /> <d>VNNAnf36IrkyUVZlihQJNdUUZl/YFEfJOeldWBtd3IM=</d> </r>
最终编码并添加到所有源位置。