code-scan / cfwork_shortlink_text

使用cf的work实现的短网址和文本分享
Other
46 stars 19 forks source link

Short Menu兼容问题 #5

Closed coppea closed 2 years ago

coppea commented 2 years ago

3

接上个话题,又来打扰您了,short menu仅支持{ "shorturl" : "https://abc.com/123" },不支持{ "shorturl" : "123" } 即name返回值是“ https://abc.com/123 ”, 而不是 “ 123 ”

自己试了修改一直出错,不知怎么修改,大佬能否点拨一下

B站已三连 http://b23.tv/azzKhZQ

code-scan commented 2 years ago
const url_key = 'orgi_url' // original url key
const url_name = 'short_code' // short code  key
const short_url_key = 'short_url'; // full short url

增加了short_url_key用于返回完整的短网址,改成自定义的键值会在response中返回

response

{"orgi_url":"http://123123","short_code":"fjbmd","type":"link","short_url":"https://www.js.al/fjbmd"}