Compare commits
2 Commits
53367da524
...
61c812935b
| Author | SHA1 | Date |
|---|---|---|
|
|
61c812935b | 3 years ago |
|
|
ab92a77712 | 3 years ago |
@ -1,24 +1,26 @@ |
|||||
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ |
{ |
||||
|
// launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ |
||||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 |
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 |
||||
"version": "0.0", |
"version" : "0.0", |
||||
"configurations": [{ |
"configurations" : [ |
||||
"app-plus" : |
|
||||
{ |
{ |
||||
|
"app-plus" : { |
||||
"launchtype" : "local" |
"launchtype" : "local" |
||||
}, |
}, |
||||
"default" : |
"default" : { |
||||
{ |
|
||||
"launchtype" : "local" |
"launchtype" : "local" |
||||
}, |
}, |
||||
"h5" : |
"h5" : { |
||||
{ |
|
||||
"launchtype" : "local" |
"launchtype" : "local" |
||||
}, |
}, |
||||
"mp-weixin" : |
"mp-weixin" : { |
||||
{ |
|
||||
"launchtype" : "local" |
"launchtype" : "local" |
||||
}, |
}, |
||||
"type" : "uniCloud" |
"type" : "uniCloud" |
||||
|
}, |
||||
|
{ |
||||
|
"playground" : "custom", |
||||
|
"type" : "uni-app:app-ios" |
||||
} |
} |
||||
] |
] |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,80 @@ |
|||||
|
<template> |
||||
|
<view> |
||||
|
<web-view :webview-styles="webviewStyles" :src="src"></web-view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import facebook from '@/utils/facebook.js' |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
webviewStyles: { |
||||
|
progress: { |
||||
|
color: '#FF3333' |
||||
|
} |
||||
|
}, |
||||
|
src:'' |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
// 初始化 Facebook SDK |
||||
|
window.fbAsyncInit = function() { |
||||
|
console.log("初始化 Facebook SDK"); |
||||
|
console.log(f); |
||||
|
FB.init({ |
||||
|
appId: '884982142884404', |
||||
|
// 21026908a4829cc8f4dceffbddd01c2e 1179110879655260 |
||||
|
autoLogAppEvents: true, |
||||
|
xfbml: true, |
||||
|
version: 'v9.0', |
||||
|
}); |
||||
|
}; |
||||
|
}, |
||||
|
onLoad(e) { |
||||
|
let that = this; |
||||
|
let s = 0; |
||||
|
let time = setInterval(() => { |
||||
|
uni.getNetworkType({ |
||||
|
success: (res) => { |
||||
|
console.log(res.networkType, s); |
||||
|
if (res.networkType == 'none') { |
||||
|
uni.showToast({ |
||||
|
icon: 'none', |
||||
|
title: 'Please connect to the network', |
||||
|
duration: 3000, |
||||
|
}) |
||||
|
} else if (res.networkType !== 'none') { |
||||
|
that.typee = 2; |
||||
|
clearInterval(time); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
s++; |
||||
|
}, 1000); |
||||
|
this.src = e.src |
||||
|
}, |
||||
|
methods:{ |
||||
|
FB.login(function(response) { |
||||
|
if (response.authResponse) { |
||||
|
// 登录成功 |
||||
|
console.log(response); |
||||
|
// 可以在这里处理登录后的数据 |
||||
|
} else { |
||||
|
// 登录失败 |
||||
|
uni.showToast({ |
||||
|
title:'User cancelled login or did not fully authorize.', |
||||
|
icon:'none', |
||||
|
duration: 2000 |
||||
|
}) |
||||
|
console.log('User cancelled login or did not fully authorize.'); |
||||
|
} |
||||
|
}, { scope: 'public_profile,email' }); |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
|
||||
|
</style> |
||||
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 34 KiB |
@ -0,0 +1,122 @@ |
|||||
|
{ |
||||
|
"images": [ |
||||
|
{ |
||||
|
"size": "20x20", |
||||
|
"idiom": "iphone", |
||||
|
"filename": "icon-20@2x.png", |
||||
|
"scale": "2x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "20x20", |
||||
|
"idiom": "iphone", |
||||
|
"filename": "icon-20@3x.png", |
||||
|
"scale": "3x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "29x29", |
||||
|
"idiom": "iphone", |
||||
|
"filename": "icon-29.png", |
||||
|
"scale": "1x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "29x29", |
||||
|
"idiom": "iphone", |
||||
|
"filename": "icon-29@2x.png", |
||||
|
"scale": "2x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "29x29", |
||||
|
"idiom": "iphone", |
||||
|
"filename": "icon-29@3x.png", |
||||
|
"scale": "3x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "40x40", |
||||
|
"idiom": "iphone", |
||||
|
"filename": "icon-40@2x.png", |
||||
|
"scale": "2x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "40x40", |
||||
|
"idiom": "iphone", |
||||
|
"filename": "icon-40@3x.png", |
||||
|
"scale": "3x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "60x60", |
||||
|
"idiom": "iphone", |
||||
|
"filename": "icon-60@2x.png", |
||||
|
"scale": "2x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "60x60", |
||||
|
"idiom": "iphone", |
||||
|
"filename": "icon-60@3x.png", |
||||
|
"scale": "3x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "20x20", |
||||
|
"idiom": "ipad", |
||||
|
"filename": "icon-20-ipad.png", |
||||
|
"scale": "1x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "20x20", |
||||
|
"idiom": "ipad", |
||||
|
"filename": "icon-20@2x-ipad.png", |
||||
|
"scale": "2x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "29x29", |
||||
|
"idiom": "ipad", |
||||
|
"filename": "icon-29-ipad.png", |
||||
|
"scale": "1x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "29x29", |
||||
|
"idiom": "ipad", |
||||
|
"filename": "icon-29@2x-ipad.png", |
||||
|
"scale": "2x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "40x40", |
||||
|
"idiom": "ipad", |
||||
|
"filename": "icon-40.png", |
||||
|
"scale": "1x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "40x40", |
||||
|
"idiom": "ipad", |
||||
|
"filename": "icon-40@2x.png", |
||||
|
"scale": "2x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "76x76", |
||||
|
"idiom": "ipad", |
||||
|
"filename": "icon-76.png", |
||||
|
"scale": "1x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "76x76", |
||||
|
"idiom": "ipad", |
||||
|
"filename": "icon-76@2x.png", |
||||
|
"scale": "2x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "83.5x83.5", |
||||
|
"idiom": "ipad", |
||||
|
"filename": "icon-83.5@2x.png", |
||||
|
"scale": "2x" |
||||
|
}, |
||||
|
{ |
||||
|
"size": "1024x1024", |
||||
|
"idiom": "ios-marketing", |
||||
|
"filename": "icon-1024.png", |
||||
|
"scale": "1x" |
||||
|
} |
||||
|
], |
||||
|
"info": { |
||||
|
"version": 1, |
||||
|
"author": "icon.wuruihong.com" |
||||
|
} |
||||
|
} |
||||
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 462 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 703 B |
|
After Width: | Height: | Size: 703 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
@ -0,0 +1,90 @@ |
|||||
|
/*1673591345,,JIT Construction: v1006815498,en_US*/ |
||||
|
|
||||
|
/** |
||||
|
* Copyright (c) 2017-present, Facebook, Inc. All rights reserved. |
||||
|
* |
||||
|
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use, |
||||
|
* copy, modify, and distribute this software in source code or binary form for use |
||||
|
* in connection with the web services and APIs provided by Facebook. |
||||
|
* |
||||
|
* As with any software that integrates with the Facebook platform, your use of |
||||
|
* this software is subject to the Facebook Platform Policy |
||||
|
* [http://developers.facebook.com/policy/]. This copyright notice shall be
|
||||
|
* included in all copies or substantial portions of the software. |
||||
|
* |
||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
||||
|
*/ |
||||
|
|
||||
|
(function _(a, b, c, d, e) { |
||||
|
// let f = uni.getRealWindow()
|
||||
|
var f = window.console; |
||||
|
f && Math.floor(new Date().getTime() / 1e3) - b > 7 * 24 * 60 * 60 && f.warn( |
||||
|
"The Facebook JSSDK is more than 7 days old."); |
||||
|
if (window[c]) return; |
||||
|
if (!window.JSON) return; |
||||
|
var g = window[c] = { |
||||
|
__buffer: { |
||||
|
replay: function() { |
||||
|
var a = this, |
||||
|
b = function(d) { |
||||
|
var b = window[c]; |
||||
|
a.calls[d][0].split(".").forEach(function(a) { |
||||
|
return b = b[a] |
||||
|
}); |
||||
|
b.apply(null, a.calls[d][1]) |
||||
|
}; |
||||
|
for (var d = 0; d < this.calls.length; d++) b(d); |
||||
|
this.calls = [] |
||||
|
}, |
||||
|
calls: [], |
||||
|
opts: null |
||||
|
}, |
||||
|
getUserID: function() { |
||||
|
return "" |
||||
|
}, |
||||
|
getAuthResponse: function() { |
||||
|
return null |
||||
|
}, |
||||
|
getAccessToken: function() { |
||||
|
return null |
||||
|
}, |
||||
|
init: function(a) { |
||||
|
g.__buffer.opts = a |
||||
|
} |
||||
|
}; |
||||
|
for (b = 0; b < d.length; b++) { |
||||
|
f = d[b]; |
||||
|
if (f in g) continue; |
||||
|
var h = f.split("."), |
||||
|
i = h.pop(), |
||||
|
j = g; |
||||
|
for (var k = 0; k < h.length; k++) j = j[h[k]] || (j[h[k]] = {}); |
||||
|
j[i] = function(a) { |
||||
|
if (a === "init") return; |
||||
|
return function() { |
||||
|
g.__buffer.calls.push([a, Array.prototype.slice.call(arguments)]) |
||||
|
} |
||||
|
}(f) |
||||
|
} |
||||
|
k = document.createElement("script"); |
||||
|
k.src = a; |
||||
|
k.async = !0; |
||||
|
e && (k.crossOrigin = "anonymous"); |
||||
|
h = document.getElementsByTagName("script")[0]; |
||||
|
h.parentNode && h.parentNode.insertBefore(k, h) |
||||
|
})("https:\/\/connect.facebook.net\/en_US\/sdk.js?hash=9a3a1c29786b95e8ac4f1e0ff5db6b7f", 1673591345, "FB", [ |
||||
|
"AppEvents.EventNames", "AppEvents.ParameterNames", "AppEvents.activateApp", "AppEvents.clearAppVersion", |
||||
|
"AppEvents.clearUserID", "AppEvents.getAppVersion", "AppEvents.getUserID", "AppEvents.logEvent", |
||||
|
"AppEvents.logPageView", "AppEvents.logPurchase", "AppEvents.setAppVersion", "AppEvents.setUserID", |
||||
|
"AppEvents.updateUserProperties", "Canvas.Plugin.showPluginElement", "Canvas.Plugin.hidePluginElement", |
||||
|
"Canvas.Prefetcher.addStaticResource", "Canvas.Prefetcher.setCollectionMode", "Canvas.getPageInfo", |
||||
|
"Canvas.scrollTo", "Canvas.setAutoGrow", "Canvas.setDoneLoading", "Canvas.setSize", "Canvas.setUrlHandler", |
||||
|
"Canvas.startTimer", "Canvas.stopTimer", "Event.subscribe", "Event.unsubscribe", "XFBML.parse", "addFriend", |
||||
|
"api", "getAccessToken", "getAuthResponse", "getLoginStatus", "getUserID", "init", "login", "logout", "publish", |
||||
|
"share", "ui" |
||||
|
], true); |
||||
@ -0,0 +1,88 @@ |
|||||
|
/*1673411369,,JIT Construction: v1006804714,en_US*/ |
||||
|
|
||||
|
/** |
||||
|
* Copyright (c) 2017-present, Facebook, Inc. All rights reserved. |
||||
|
* |
||||
|
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use, |
||||
|
* copy, modify, and distribute this software in source code or binary form for use |
||||
|
* in connection with the web services and APIs provided by Facebook. |
||||
|
* |
||||
|
* As with any software that integrates with the Facebook platform, your use of |
||||
|
* this software is subject to the Facebook Platform Policy |
||||
|
* [http://developers.facebook.com/policy/]. This copyright notice shall be
|
||||
|
* included in all copies or substantial portions of the software. |
||||
|
* |
||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
||||
|
*/ |
||||
|
(function _(a, b, c, d, e) { |
||||
|
var f = window.console; |
||||
|
f && Math.floor(new Date().getTime() / 1e3) - b > 7 * 24 * 60 * 60 && f.warn( |
||||
|
"The Facebook JSSDK is more than 7 days old."); |
||||
|
if (window[c]) return; |
||||
|
if (!window.JSON) return; |
||||
|
var g = window[c] = { |
||||
|
__buffer: { |
||||
|
replay: function() { |
||||
|
var a = this, |
||||
|
b = function(d) { |
||||
|
var b = window[c]; |
||||
|
a.calls[d][0].split(".").forEach(function(a) { |
||||
|
return b = b[a] |
||||
|
}); |
||||
|
b.apply(null, a.calls[d][1]) |
||||
|
}; |
||||
|
for (var d = 0; d < this.calls.length; d++) b(d); |
||||
|
this.calls = [] |
||||
|
}, |
||||
|
calls: [], |
||||
|
opts: null |
||||
|
}, |
||||
|
getUserID: function() { |
||||
|
return "" |
||||
|
}, |
||||
|
getAuthResponse: function() { |
||||
|
return null |
||||
|
}, |
||||
|
getAccessToken: function() { |
||||
|
return null |
||||
|
}, |
||||
|
init: function(a) { |
||||
|
g.__buffer.opts = a |
||||
|
} |
||||
|
}; |
||||
|
for (b = 0; b < d.length; b++) { |
||||
|
f = d[b]; |
||||
|
if (f in g) continue; |
||||
|
var h = f.split("."), |
||||
|
i = h.pop(), |
||||
|
j = g; |
||||
|
for (var k = 0; k < h.length; k++) j = j[h[k]] || (j[h[k]] = {}); |
||||
|
j[i] = function(a) { |
||||
|
if (a === "init") return; |
||||
|
return function() { |
||||
|
g.__buffer.calls.push([a, Array.prototype.slice.call(arguments)]) |
||||
|
} |
||||
|
}(f) |
||||
|
} |
||||
|
k = document.createElement("script"); |
||||
|
k.src = a; |
||||
|
k.async = !0; |
||||
|
e && (k.crossOrigin = "anonymous"); |
||||
|
h = document.getElementsByTagName("script")[0]; |
||||
|
h.parentNode && h.parentNode.insertBefore(k, h) |
||||
|
})("https:\/\/connect.facebook.net\/en_US\/sdk.js?hash=c7b4d3b5237e274cabe2a52309d2217d#xfbml=1&version=v9.0", 1673411369, "FB", [ |
||||
|
"AppEvents.EventNames", "AppEvents.ParameterNames", "AppEvents.activateApp", "AppEvents.clearAppVersion", |
||||
|
"AppEvents.clearUserID", "AppEvents.getAppVersion", "AppEvents.getUserID", "AppEvents.logEvent", |
||||
|
"AppEvents.logPageView", "AppEvents.logPurchase", "AppEvents.setAppVersion", "AppEvents.setUserID", |
||||
|
"AppEvents.updateUserProperties", "Canvas.Plugin.showPluginElement", "Canvas.Plugin.hidePluginElement", |
||||
|
"Canvas.Prefetcher.addStaticResource", "Canvas.Prefetcher.setCollectionMode", "Canvas.getPageInfo", |
||||
|
"Canvas.scrollTo", "Canvas.setAutoGrow", "Canvas.setDoneLoading", "Canvas.setSize", "Canvas.setUrlHandler", |
||||
|
"Canvas.startTimer", "Canvas.stopTimer", "Event.subscribe", "Event.unsubscribe", "XFBML.parse", "addFriend", |
||||
|
"api", "getAccessToken", "getAuthResponse", "getLoginStatus", "getUserID", "init", "login", "logout", "publish", |
||||
|
"share", "ui" |
||||
|
], true); |
||||