嗨,我已经搜索了一段时间,但似乎找不到答案。
我必须在 JavaScript 中编写一个函数,该函数需要几天的参数,然后将其转换为更容易理解的字符串。
前任 :
function getFormatedStringFromDays(days)
{
var formatedString = "";
//... logic
return formatedString;
}
Run Code Online (Sandbox Code Playgroud)
getFormatedStringFromDays(183)返回类似的东西也是如此6 months 3 days。
我目前正在Azure中构建一个逻辑应用程序,用Twilio发送短信.除了我不能在身体中发送复杂的URL之外,一切都很顺利.
例如,如果我发送此信息:https://example.com? id = 26我将收到正确的字符串,但该参数未与可点击链接中的域正确连接.

因此,当我单击文本消息中的链接时,它只会打开https://example.com.我发送的消息是这样构建的:
"Send_Text_Message_(SMS)": {
"inputs": {
"body": {
"body": "@{triggerBody()?['message']}@{triggerBody()?['url']}@{body('Insert_row')?['Id']}",
"from": "xxx-xxx-xxxx",
"to": "@triggerBody()?['phone']"
},
message: Hello please click this link
url :https://example.com?id=
id: 26
so the final body would be like : [message][url][id]
Run Code Online (Sandbox Code Playgroud)
我已经尝试发送一个简单的字符串,如https://example.com?id=8,看看它是否是失败的"复杂"身体连接,但它仍然无法正常工作.
谁能帮忙:)?