Douyin_TikTok_Download_API
Douyin_TikTok_Download_API copied to clipboard
可以对接微信小程序吗?
小白求助,这个可以对接微信小程序吗?
可以
太好了啊,但怎么设置呢,可以帮我一下吗,我想设置一个去水印的小程序 。
以下是用的极客API的代码,我应该怎么修改一下呢大佬。求帮助啊。
!function() { getApp(); Page({ data: { isInput: 0, inputValue: "" }, bindinput(e) { var t = e.detail.value; t.length > 0 && this.setData({ isInput: 1, inputValue: t }); }, saveCache(e) { let t = wx.getStorageSync("analysis"); t || (t = []), t.length >= 50 && t.splice(0, 1), t.push(e), wx.setStorageSync("analysis", t); }, paste_and_content() { console.log("观看激励视频,再解析"); let e = this; wx.getClipboardData({ success(t) { if (console.log("解析内容", t.data), !t.data) return wx.showToast({ title: "请输入视频 (或图集) 链接", icon: "none", duration: 2e3 }), !1; e.qushuiyin("", t.data); } }); }, paste() { let e = this; wx.getClipboardData({ success(t) { e.setData({ inputValue: t.data, isInput: 1 }); } }); }, qushuiyin(e, t) { let a = this; wx.showLoading({ title: "解析中..." }); let s = t || a.data.inputValue; console.log("一键去水印", s), wx.request({ url: "https://api.wxshares.com/api/qsy/as", data: { key: "xfwu0IxYvaYYpwaXsPjwY4dIUR", url: s }, header: { "content-type": "application/json" }, success(e) { wx.hideLoading(), console.log("服务器返回数据", e.data); let t = e.data; 200 == t.code ? (console.log("解析成功打印数据", t.data), wx.navigateTo({ url: "/pages/analysis/analysis", events: { acceptDataFromOpenedPage: function(e) { console.log(e); }, someEvent: function(e) { console.log(e); } }, success: function(e) { a.setData({ inputValue: "", isInput: 0 }), a.saveCache(s), e.eventChannel.emit("acceptDataFromOpenerPage", { data: t.data }); } })) : wx.showModal({ title: "解析失败", content: "解析失败,可能是因为:1、链接错误或暂时不支持平台2、作品还未审核通过3、作品已经被删除了---如有问题,请联系我们的客服【xiaoyaozz】", success(e) { e.confirm && a.copyBtn(1, "xiaoyaozz"); } }); } }); }, clear() { this.setData({ inputValue: "", isInput: 0 }); }, copyBtn(e, t) { let a = t || e.target.dataset.kefu; wx.setClipboardData({ data: a, success: function(e) { wx.showToast({ title: "【客服微信】复制成功", icon: "none", mask: "true" }); } }); }, onLoad() { wx.getUserProfile && this.setData({ canIUseGetUserProfile: !0 }); let e = null; wx.createInterstitialAd && (e = wx.createInterstitialAd({ adUnitId: "" }), e.onLoad(() => {}), e.onError(e => {}), e.onClose(() => {})), e && e.show().catch(e => { console.error(e); }); }, getUserProfile(e) { wx.getUserProfile({ desc: "展示用户信息", success: e => { console.log(e), this.setData({ userInfo: e.userInfo, hasUserInfo: !0 }); } }); }, getUserInfo(e) { console.log(e), this.setData({ userInfo: e.detail.userInfo, hasUserInfo: !0 }); } }); }();
他这个有极客API有一个 KEY 需要 充值 才能用,所以有一段是
let s = t || a.data.inputValue; console.log("一键去水印", s), wx.request({ url: "https://api.wxshares.com/api/qsy/as", data: { key: "xfwu0IxYvaYYpwaXsPjwY4dIUR", url: s },
怎么CODE显示的这么烦啊,怎么格式化显示出来。
这个你得自己去处理了,你可以观察一下本项目的响应报文内容然后修改你的js代码
对我来说太难了,哎呀~
你是怎么学会这个的,
你试试ChatGPT吧
好的,感谢大佬 你真是太好了。
搞定了大佬,我研究了一天,真是太难搞了,用了GPT3.5
怎么做的求带
搞定了大佬,我研究了一天,真是太难搞了,用了GPT3.5
牛逼了,交流一下,可以嘛