|
@@ -841,11 +841,12 @@ function handleComplete(evt, comp) {
|
|
|
|
|
|
function getInfo() {
|
|
function getInfo() {
|
|
var ua = navigator.userAgent.toLowerCase();
|
|
var ua = navigator.userAgent.toLowerCase();
|
|
- var isMobile = false;
|
|
|
|
|
|
+ var isAvatorSupport = false;
|
|
if (!!navigator.userAgent.match(/AppleWebKit.*Mobile.*/)) {
|
|
if (!!navigator.userAgent.match(/AppleWebKit.*Mobile.*/)) {
|
|
- isMobile = true;
|
|
|
|
|
|
+
|
|
if (ua.match(/MicroMessenger/i) == "micromessenger") {
|
|
if (ua.match(/MicroMessenger/i) == "micromessenger") {
|
|
type = 0;
|
|
type = 0;
|
|
|
|
+ isAvatorSupport = true;
|
|
url = "https://open.weixin.qq.com/connect/oauth2/authorize?"
|
|
url = "https://open.weixin.qq.com/connect/oauth2/authorize?"
|
|
+"appid=wx749c84daac654e1e&"
|
|
+"appid=wx749c84daac654e1e&"
|
|
+"redirect_uri=https://wx.ttkuaiban.com/minigame&"
|
|
+"redirect_uri=https://wx.ttkuaiban.com/minigame&"
|
|
@@ -856,6 +857,7 @@ function getInfo() {
|
|
|
|
|
|
if (ua.match(/WeiBo/i) == "weibo") {
|
|
if (ua.match(/WeiBo/i) == "weibo") {
|
|
type = 1;
|
|
type = 1;
|
|
|
|
+ isAvatorSupport = true;
|
|
url = "https://api.weibo.com/oauth2/authorize?"
|
|
url = "https://api.weibo.com/oauth2/authorize?"
|
|
+"client_id=2141531565&"
|
|
+"client_id=2141531565&"
|
|
+"response_type=code&"
|
|
+"response_type=code&"
|
|
@@ -865,6 +867,7 @@ function getInfo() {
|
|
var ua = navigator.userAgent.toLowerCase();
|
|
var ua = navigator.userAgent.toLowerCase();
|
|
if (ua.match(/MicroMessenger/i) == "micromessenger") {
|
|
if (ua.match(/MicroMessenger/i) == "micromessenger") {
|
|
type = 0;
|
|
type = 0;
|
|
|
|
+ isAvatorSupport = true;
|
|
url = "https://open.weixin.qq.com/connect/oauth2/authorize?"
|
|
url = "https://open.weixin.qq.com/connect/oauth2/authorize?"
|
|
+"appid=wx749c84daac654e1e&"
|
|
+"appid=wx749c84daac654e1e&"
|
|
+"redirect_uri=https://wx.ttkuaiban.com/minigame&"
|
|
+"redirect_uri=https://wx.ttkuaiban.com/minigame&"
|
|
@@ -933,7 +936,7 @@ function getInfo() {
|
|
$('.secret-btn').show();
|
|
$('.secret-btn').show();
|
|
|
|
|
|
init();
|
|
init();
|
|
- if (isMobile && !window.ifDebug) {
|
|
|
|
|
|
+ if (isAvatorSupport && !window.ifDebug) {
|
|
getMsg();
|
|
getMsg();
|
|
}
|
|
}
|
|
|
|
|