123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266 |
- Namespace.register("U.U.OT");
- U.U.OT.UTF = false;
- U.U.OT.UST = "最新科技:云操作系统,您也来加入吧!点击进入哦!";
- U.U.OT.User = {};
- U.U.OT.QqLoadJs = function (bottonstyle) {
- U.MD.DynamicLoad("http://qzonestyle.gtimg.cn/qzone/openapi/qc-1.0.1.js",
- "js",
- function () {
- U.U.OT.AsynQqLoadJs(bottonstyle);
- },
-
- {"data-appid": "100584402", "charset": "utf-8", "src": "http://qzonestyle.gtimg.cn/qzone/openapi/qc-1.0.1.js" }, true);
- }
- U.U.OT.AsynQqLoadJs = function (bottonstyle) {
- QC.Login(bottonstyle[i], U.M.apply(null, [[U.U.OT.QQCB, [null]]]));
-
- $("a", $("#" + UDE[i]["btnId"])[0]).addAttrArray({ "href": "javascript:void(0)" });
- }
- U.U.OT.WeiboLoadJs = function (bottonstyle) {
-
- U.MD.DynamicLoad(
- "http://tjs.sjs.sinajs.cn/open/api/js/wb.js?appkey=1242324937&i=" + Guid.newGuid(),
- "js",
- function () {
- WB2.anyWhere(function () {
- U.U.OT.ButtonWeiboLoadJs(bottonstyle);
- });
- },
-
- {"charset": "utf-8", "src": "http://tjs.sjs.sinajs.cn/open/api/js/wb.js?appkey=1242324937&i=" + Guid.newGuid(),
- "charset": "utf-8", "type": "text/javascript"
- },
- true);
- }
- U.U.OT.ButtonWeiboLoadJs = function (bottonstyle, window) {
- window.widget.connectButton(bottonstyle);
- $("a", $("#" + bottonstyle["id"])[0]).addAttrArray({ "href": "javascript:void(0)" });
- }
- U.U.OT.WeixinLoadJs = function (bottonstyle) {
-
- U.MD.DynamicLoad("http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js", "js",
- function () { U.U.OT.AsynWeixinLoadJs(bottonstyle); },
-
- {"charset": "utf-8", "src": "http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js", "charset": "utf-8", "type": "text/javascript" }, true);
- }
- U.U.OT.AsynWeixinLoadJs = function (bottonstyle) {
-
- new WxLogin({
- id: bottonstyle.ID || "",
- appid: "wxae62986df7490c49",
- scope: "snsapi_login",
- redirect_uri: "",
- state: bottonstyle.state || Guid.newGuid(),
- style: bottonstyle.style || "",
- href: bottonstyle.href || ""
- });
- }
- U.U.OT.Logout = function () {
- if (WB2.checkLogin()) { WB2.logout(); }
- if (QC.Login.check()) { QC.Login.signOut(); }
- }
- U.U.OT.QQCB = function (UCB, UDE) {
- if (QC.Login.check()) {
- QC.Login.getMe(function (UOID, UAID) {
- QC.api("get_user_info", {}).success(function (UKE) {
- UKE = UKE.data;
-
- U.Ut.AddObj(UKE, { "UserNickName": UKE.nickname,
- "gender": UKE == "男" ? 1 : 0, "openID": UOID,
- "accessToken": UAID, "province": UKE.province,
- "city": UKE.city, "Birthday": U.MT.toTimeStamp(UKE.year + "/01/01")
- });
-
- QC.api("get_info", {}).success(function (UWE) {
- UWE = UWE.data.data; var _UDL = UWE.location.split(' ');
-
- QC.api("add_pic_t", { "content": U.U.OT.UST, "pic": "/img/qqew.jpg" });
- QC.api("add_idol", { "name": "雨云科技" });
- var _userinfo = U.Ut.AddObj(UKE, { "nickname": UWE.nick,
- "gender": UWE.sex,
- "openID": UOID,
- "accessToken": UAID,
- "province": _UDL[1],
- "city": _UDL[2],
- "description": UWE.introduction,
- "UserEmail": UWE.email,
- "Birthday": U.MT.toTimeStamp(UWE.birth_year + "-" + UWE.birth_month + "-" + UWE.birth_day, "-")
- });
- U.U.OT.USUser(_userinfo);
- }).error(function () {
- U.U.OT.USUser(UKE);
- }).complete(function () {
- });
- }).error(function () { U.Alert("获取QQ用户信息失败!"); }).complete(function () { ; });
- });
- }
- }
- U.U.OT.WBCB = function (UCB, userinfo) {
- U.U.OT.USUser(userinfo);
- WB2.anyWhere(function (WB2) {
- WB2.parseCMD("/statuses/update.json", function (message) {
- }, { "status": U.U.OT.UST });
- WB2.parseCMD("/friendships/create.json", function (message) {
- }, { "screen_name": "1473云端" });
- });
- }
- U.U.OT.WBGZ = function (UDID) {
- WB2.anyWhere(function (UWE) {
- W.widget.followButton({ "nick_name": "1473云端",
- "id": UDID, "show_head": false, "show_name": false, "show_cancel": false
- });
- });
- }
- U.U.OT.weixin = function () {
-
- U.U.OT.wxData = { "id": Guid.newGuid() };
- window.open("https://open.weixin.qq.com/connect/qrconnect?appid=wxae62986df7490c49&redirect_uri=" + window.encodeURI("/WxDomain.htm") + "&response_type=code&scope=snsapi_login&state=" + U.U.OT.wxData.id);
- }
- U.U.OT.Asynweixin = function (UST) {
- var _co = U.M.QueryString("code", UST),
- _state = U.M.QueryString("state", UST);
- if (_state == U.U.OT.wxData.id && _state != null) {
- U.A.Request("http://zhifu.1473.cn/weixin/login.php?code=" + _co, [], function (r) {
- if (r.value.openid) {
- U.U.OT.USUser(r.value);
- }
- else {
- U.Alert("微信扫描登录失败");
- }
- });
- }
- }
- U.U.OT.USUser = function (userinfo) {
-
- U.A.Request(US.Auth, ["ThirdPartyLogin", (userinfo.openID || userinfo.id || userinfo.openid)]),
- U.U.OT.AsynUSUser, [null, US.NLInfo.LogAddr, userinfo];
- }
- U.U.OT.AsynUSUser = function (r) {
- var _UDE;
- var _UTF = true,
- context = r.context;
-
-
-
-
- if (_UTF) {
- if (typeof r.value == "object") {
- context[3] = r.value[0].UserName;
- context[2] = null;
- U.U.L.AsynUlL(r);
- }
- else {
- _UDE = U.U.R.TBA;
- _UDE[0] = _UDE[1] = false;
- U.U.L.USUTJ(context[2], r.value);
- }
- }
- }
|