U.U.GZ.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. Namespace.register("U.U.GZ");
  2. U.U.GZ.GN = { "2d9c5d2d-e6e5-4a40-8064-f93a98d0e647": { "Url": "http://pay.1473.cn/?f=hbt&=hbt", "TT": ["UP_TGXI UP_TGXIH", "", "好笔头", "云笔记产品", "好笔头业务云笔记专为企业团队量身打造,致力为企业团队提供最好、最适合的云笔记产品,记客户,记工作,记知识,重要工作备忘提醒,专为改善企业团队工作效率而生,同时团队围绕笔记交流协作,提高团队执行和分享效率。", "UP_TGXWCB UP_TGXWCBB"] }, "7bc6d08c-7db3-4ef4-8a39-595a4967a189": { "Url": "http://pay.1473.cn/?f=zh&zh=", "TT": ["UP_TGXI UP_TGXIZ", "", "中恒科技", "兼容生产CD", "深圳市中恒科技实业有限公司坐落于具有中国光盘生产基地之誉称的广东省深圳市,是一家兼容生产CD-R,DVD-R可录入式空白光盘的中外合资企业,总投资3千万美元。第一期拥有10条具有国际先进水平的生产线,年产量可达6千万元。", "UP_TGXWCB UP_TGXWCBD"] }, "ea0efe2e-9167-4698-b9b5-31c27ad5eb73": { "Url": "http://pay.1473.cn/?f=sp&sp=", "TT": ["UP_TGXI UP_TGXIB", "", "声博配音公司", "各个语种的深圳配音", "声博配音公司拥有全新数字专业录音棚,资深音频工程师、录音师、音乐制作人等。 成立以来,公司在一直致力于中文及各个语种的深圳配音业务、音乐制作等。 为国内外客户录制了大量影视动画、广告、专题等。在深圳配音行业内树立了良好的口碑。", "UP_TGXWCB UP_TGXWCBB"] }, "fd01dd1b-9c87-4e4f-a3fb-af1b91bf56f8": { "Url": "/#!/tg/", "TT": ["UP_TGXI UP_TGXIY", "", "云端桌面", "体验崭新的云服务", "云端桌面远离单机,基于互联网。提供免费存储,让你远离U盘,排除U盘丢失和携带的麻烦。云端的资源都是共享的,你可以随时获取好友共享的资源。", "UP_TGXWCB UP_TGXWCBY"] }, "ea0efe2e-9167-4698-b9b5-31c27ad5eb73": { "Url": "http://pay.1473.cn/?f=sp&sp=", "TT": ["UP_TGXI UP_TGXIB", "", "声博配音公司", "各个语种的深圳配音", "声博配音公司拥有全新数字专业录音棚,资深音频工程师、录音师、音乐制作人等。 成立以来,公司在一直致力于中文及各个语种的深圳配音业务、音乐制作等。 为国内外客户录制了大量影视动画、广告、专题等。在深圳配音行业内树立了良好的口碑。", "UP_TGXWCB UP_TGXWCBB"] }, "90f7c5ca-f7ab-4f31-8869-7275b8e8955c": { "Url": "http://pay.1473.cn/?f=bz&bz=", "TT": ["UP_TGXI UP_TGXID", "", "北京邮电大学", "高新技术产业发展", "北京邮电大学深圳研究院(简称深圳研究院)是依照国家有关法律、行政法规和深圳市人民政府深府办[2000]39号文件以及关于进一步扶持高新技术产业发展的若干规定成立的北京邮电大学全资事业法人机构。", "UP_TGXWCB UP_TGXWCBD"] } }
  3. U.U.GZ.TF; //
  4. //---------------------------------------------------------------------------用户数据加载----------------------------------------------------------------------------
  5. //-------------------------------------------------------加载数据
  6. U.U.GZ.DTG = function () {
  7. var _UDPD = $("#UP_TG")[0]; //推广框
  8. U.D.PopupWindow(_UDPD); //居中
  9. // U.D.Tb.WindowRestore(_UDPD, null, "推广"); //创建任务栏链接
  10. }
  11. //-----------------------------------------------------推广介绍
  12. U.U.GZ.DTGOD = function (TGID) {
  13. var _UDTD = $("#UP_TGXW")[0],
  14. _UDAD = $("div", _UDTD),
  15. _UGN = U.U.GZ.GN[TGID]["TT"];
  16. for (var i = 0; i < _UGN.length; i++) {
  17. if (i == 1) {
  18. continue;
  19. }
  20. if (i > 0 && i < _UGN.length - 1) {
  21. _UDAD[i].innerHTML = _UGN[i];
  22. }
  23. else {
  24. _UDAD[i].className = _UGN[i] + " UP_TGI";
  25. }
  26. }
  27. _UDAD[_UDAD.length - 2].onclick = U.M.apply(this, [[U.U.GZ.GTGURL, [TGID]]]); //点击获取推广地址
  28. }
  29. //-----------------------------------------------------------------------------有效点击
  30. //加载该用户已有的推广数据
  31. U.U.GZ.NTG = function (T) {
  32. if (!U.U.L.isLogin()) {
  33. if (US.userInfo.TGD && US.userInfo.TGD["NTG"] && T == null) {
  34. U.U.GZ.PLTG(US.userInfo.TGD["NTG"]);
  35. U.U.GZ.LTTG(US.userInfo.TGD["YXT"]);
  36. $("#UP_TGDPI")[0].innerText = "";
  37. U.U.GZ.GTGFW(0);
  38. }
  39. else {
  40. U.A.Request("UseStudioPay.GetUserAllTG", [US.userInfo.userid], U.U.GZ.AsynNTG, [$("#UP_TGA")[0]]);
  41. $("#UP_TGA")[0].onscroll = U.M.SSCH({ 'AF': U.U.GZ.GFWTG }).SCH();
  42. } //异步获取
  43. }
  44. }
  45. //异步获取推广数据
  46. U.U.GZ.AsynNTG = function (r) {
  47. var context = r.context;
  48. r = r.value;
  49. (US.userInfo.TGD == null) && (US.userInfo.TGD = {});
  50. US.userInfo.TGD["NTG"] = r[0];
  51. US.userInfo.TGD["YXT"] = U.U.GZ.DT(r[1]); //区分有效统计和注册
  52. US.userInfo.TGD["YXD"] = [r[2]];
  53. U.U.GZ.NTG();
  54. }
  55. //区分有效统计 点击和注册
  56. U.U.GZ.DT = function (UTL) {
  57. var i, j, _TF = [];
  58. for (i = 0; i < UTL.length; i++) {
  59. _TF[i] = []; _TF[i].push(UTL[i]);
  60. for (j = i + 1; j < UTL.length; j++) {
  61. if (UTL[j]["TGUserInfoID"] == UTL[i]["TGUserInfoID"]) {
  62. _TF[i].push(UTL[j]); UTL.splice(j, 1);
  63. }
  64. }
  65. }
  66. return _TF;
  67. }
  68. //用户已有的推广数据
  69. U.U.GZ.PLTG = function (UTL) {
  70. var i, j, k,
  71. _UDPD = $("#UP_TGDTD")[0],
  72. _UDOD, _UDTD, _UDI,
  73. _UDFD = $$("frag"),
  74. _UAFD = [],
  75. _UAT = ["disk", "photo", "music", "video", "blog"];
  76. _UDPD.innerText = "";
  77. if (UTL.length > 0) {
  78. $("#UP_TGDUN")[0].innerHTML = US.userInfo.TrueName || US.userInfo.UserNickName; //用户推广名
  79. for (i = 0; i < UTL.length; i++) {
  80. _UAFD.push(UTL[i]["TY"] + UTL[i]["TGUserInfoID"]); //基础推广地址
  81. if (UTL[i]["TGID"] == "fd01dd1b-9c87-4e4f-a3fb-af1b91bf56f8") { for (j = 0; j < _UAT.length; j++) { _UAFD.push(US.ms + "#!/" + _UAT[j] + "/" + US.userInfo.username); } }
  82. _UDOD = $$("div", { "className": "UP_TGDTDD" }, _UDFD);
  83. $$("div", { "className": "UP_TGDTDDN", "innerHTML": U.U.GZ.GN[UTL[i]["TGID"]]["TT"][2] + ':' }, _UDOD);
  84. for (k = 0; k < _UAFD.length; k++) {
  85. _UDTD = $$("div", { "className": "UP_TGDTDDA" }, _UDOD);
  86. _UDI = $$("input", { "className": "UP_TGDTDDS", "readOnly": "true", "value": _UAFD[k], "oncopy": [[U.M.StopBubble], [U.M.Copy, ["retElement.value"]]] }, _UDTD);
  87. $$("div", { "innerHTML": "复制", "className": "UP_TGDTDDF", "style": { "cssText": "float:right" }, "onclick": [[U.M.StopBubble], [U.M.Copy, [_UDI.value]]] }, _UDTD); //复制按钮
  88. }
  89. _UAFD.splice(0, _UAFD.length);
  90. }
  91. _UDPD.appendChild(_UDFD);
  92. }
  93. else { _UDPD.innerText = "没有推广分类文类"; }
  94. }
  95. //打印有效统计
  96. U.U.GZ.LTTG = function (UTL) {
  97. var _UDPD = $("#UP_TGDWP")[0],
  98. _UDOD, _UDTD, _UDSD,
  99. _UDFD = $$("frag");
  100. _UDPD.innerText = "";
  101. for (var i = 0; i < UTL.length; i++) {
  102. _UDOD = $$("div", { "className": "UP_TGDWP" }, _UDFD);
  103. _UDTD = $$("div", { "className": "UP_TGDWY" }, _UDOD);
  104. $$("div", { "className": "UP_TGDWYN", "innerHTML": U.U.GZ.GN[UTL[i][0]["TGID"]]["TT"][2] + "点击次数" }, _UDTD);
  105. $$("div", { "className": "UP_TGDWYS", "innerHTML": UTL[i][0]["C"] }, _UDTD);
  106. _UDSD = $$("div", { "className": "UP_TGDWY" }, _UDOD);
  107. $$("div", { "className": "UP_TGDWYN", "innerHTML": U.U.GZ.GN[UTL[i][0]["TGID"]]["TT"][2] + "成功注册" }, _UDSD);
  108. $$("div", { "className": "UP_TGDWYS", "innerHTML": UTL[i][1] ? UTL[i][1]["C"] : "0" }, _UDSD);
  109. }
  110. _UDPD.appendChild(_UDFD);
  111. }
  112. //---------------------------------------------------------------------有效地址
  113. //滚动加载访问地址
  114. U.U.GZ.GFWTG = function () {
  115. if (U.U.GZ.GTGFW.call(this, (this.P + 1)).length == 0) {
  116. this.P -= 1;
  117. this.TF = false; return false;
  118. }
  119. }
  120. //获取打印有效数据
  121. U.U.GZ.GTGFW = function (P) {
  122. var _UTL = U.U.GZ.GYXFW(P);
  123. if (_UTL) { U.U.GZ.FWTG(_UTL); }
  124. else {
  125. var _FP = Math.floor(P / 5);
  126. U.A.Request("UseStudioPay.GetTGYXSL", [US.userInfo.userid, _FP * 50, (_FP + 1) * 50 - 1], U.U.GZ.AsynGTGFW, ["", P, this]);
  127. return [];
  128. }
  129. return _UTL;
  130. }
  131. //异步获取
  132. U.U.GZ.AsynGTGFW = function (r) {
  133. var context = r.context;
  134. r = r.value;
  135. US.userInfo.TGD["YXD"].push(r);
  136. U.U.GZ.GTGFW(context[1]);
  137. context[2].TF = true;
  138. }
  139. //获取有效数据
  140. U.U.GZ.GYXFW = function (P) {
  141. if (US.userInfo.TGD) {
  142. var _UTGP = US.userInfo.TGD["YXD"],
  143. TP = Math.floor(P / 5), FP = (P - TP * 5);
  144. if (_UTGP[TP]) {
  145. return _UTGP[TP].slice(FP * 10, (FP + 1) * 10);
  146. }
  147. }
  148. }
  149. //访问地址打印
  150. U.U.GZ.FWTG = function (UTL) {
  151. if (UTL.length > 0) {
  152. var _UDPD = $("#UP_TGDPI")[0], _UDOD, _UTD, _UDFD = $$("frag");
  153. for (var i = 0; i < UTL.length; i++) {
  154. eval("0,_UTD =" + UTL[i]["TGAdress"]);
  155. _UDOD = $$("div", { "className": "UP_TGDPH UP_TGDPIF", "style": { "backgroundColor": "White" } }, _UDPD);
  156. $$("div", { "className": "UTDF", "style": { "marginLeft": "0px" }, "innerHTML": UTL[i]["UserIp"] }, _UDOD);
  157. $$("div", { "className": "UTDF", "innerHTML": _UTD["province"] + " " + _UTD["city"] }, _UDOD);
  158. $$("div", { "className": "UTDF", "innerHTML": U.MT.getYearMonthDay(UTL[i]["Time"], "String") }, _UDOD);
  159. $$("div", { "className": "UTDF", "innerHTML": U.U.GZ.GN[UTL[i]["TGID"]]["TT"][2] }, _UDOD);
  160. $$("div", { "className": "UTDF", "innerHTML": UTL[i]["IsRegistration"] ? "成功" : "失败", "style": { "color": UTL[i]["IsRegistration"] ? "Red" : "" } }, _UDOD);
  161. }
  162. _UDPD.appendChild(_UDFD);
  163. }
  164. }
  165. //-----------------------------------------------------------------排名
  166. //获取排名
  167. U.U.GZ.GPMTG = function (TF) {
  168. if (US.userInfo.TGD && US.userInfo.TGD["TGP"] && TF == null) {
  169. U.U.GZ.PMTG(US.userInfo.TGD["TGP"]);
  170. }
  171. else {
  172. U.A.Request("UseStudioPay.GetTGPM", [], U.U.GZ.AsynGPMTG, [$("#UP_TGA")[0]]);
  173. }
  174. }
  175. //异步获取排名
  176. U.U.GZ.AsynGPMTG = function (r) {
  177. r = r.value;
  178. (US.userInfo.TGD == null) && (US.userInfo.TGD = {});
  179. US.userInfo.TGD["TGP"] = r;
  180. U.U.GZ.GPMTG(); //打印排名
  181. }
  182. //打印用户排名
  183. U.U.GZ.PMTG = function (UTL) {
  184. var _UDPD = $("#UP_TGPG")[0],
  185. _UDOD, _UDTD,
  186. _UDFD = $$("frag");
  187. _UDPD.innerText = "";
  188. for (var i = 0; i < UTL.length; i++) {
  189. _UDOD = $$("div", { "className": "UP_TGPH" + (i < 3 ? "" : " UP_TGPHV") }, _UDFD);
  190. $$("div", { "className": "UP_TGPHM", "innerHTML": (i + 1 < 10 ? "0" : "") + (i + 1) + ".", "style": { "color": i == 0 ? "#e06767" : "" } }, _UDOD);
  191. _UDTD = $$("div", { "className": (i < 3 ? "UP_TGPHH" : "UP_TGPHHM") }, _UDOD);
  192. $$("img", { "className": (i < 3 ? "UP_TGPHHI" : "UP_TGPHHIO"), "alt": UTL[i]["TrueName"] || UTL[i]["UserName"], "src": U.M.GetImgU(UTL[i].UserThumbnailImageHead), "onclick": [U.U.I.POUW, [UTL[i]["UserID"]]] }, _UDTD);
  193. $$("div", { "className": "UP_TGPHHS UTDF" + (i < 3 ? "" : " UP_TGPHHSM"), "innerHTML": UTL[i]["TrueName"] || UTL[i]["UserName"] }, _UDTD);
  194. $$("div", { "className": "UP_TGPHHS UTDF" + (i < 3 ? "" : " UP_TGPHHSM"), "innerHTML": U.U.GZ.GN[UTL[i]["TGID"]]["TT"][2] }, _UDTD);
  195. }
  196. _UDPD.appendChild(_UDFD);
  197. }
  198. //----------------------------------------------------------------------辅助功能
  199. //添加用户访问地址
  200. //例子:2013年的推广,暂时没有使用
  201. U.U.GZ.AddUr = function (TGID) {
  202. U.A.Request("UseStudioPay.SetYXTG", [TGID, U.MS.jsonToStr(US.NLInfo)]), U.U.GZ.AsynAddUr, [""];
  203. }
  204. //通过用户id添加用户访问地址
  205. //例:
  206. U.U.GZ.AddUrID = function (userid) {
  207. U.A.Request("UseStudioPay.SetYXTGBYUID", [userid, U.MS.jsonToStr(US.NLInfo)]), U.U.GZ.AsynAddUr, [""];
  208. }
  209. //获取用户访问地址
  210. U.U.GZ.AsynAddUr = function (r) {
  211. r = r.value;
  212. U.U.GZ.TF = r;
  213. U.U.GZ.TGR(); //发送注册信息
  214. }
  215. //添加推广地址
  216. U.U.GZ.GTGURL = function (TGID) {
  217. if (!U.U.L.isLogin()) {//必须登录获取用户信息
  218. if (US.userInfo.TGD && US.userInfo.TGD["NTG"] && U.U.GZ.GISTGURL(TGID)) {
  219. U.U.GZ.STG(1, $("#UP_TGA")[0]);
  220. return false;
  221. } //查看地址
  222. U.Alert("正在获取中..."); //提示用户等待
  223. U.A.Request("UseStudioPay.SetUserTG", [US.userInfo.userid, TGID], U.U.GZ.AsynGTGURL, ["", TGID]); //添加用户注册信息
  224. }
  225. }
  226. //异步添加推广地址
  227. U.U.GZ.AsynGTGURL = function (r) {
  228. context = r.context;
  229. r = r.value
  230. if (r) {
  231. if (US.userInfo.TGD && US.userInfo.TGD["NTG"]) {
  232. r = r.toLocaleLowerCase();
  233. var _ET = new U.U.GZ.TGE[context[1], r, U.U.GZ.GN[context[1]]["Url"]];
  234. };
  235. US.userInfo.TGD["NTG"].push(_ET);
  236. }
  237. U.U.GZ.STG(1, $("#UP_TGA")[0]); //查看地址
  238. }
  239. //获取推广地址是否存在
  240. U.U.GZ.GISTGURL = function (TGID) {
  241. var _UNTG = US.userInfo.TGD["NTG"];
  242. for (var i = 0; i < _UNTG.length; i++) {
  243. if (_UNTG[i]["TGID"] == TGID) {
  244. return _UNTG[i];
  245. }
  246. }
  247. return false;
  248. }
  249. //成功注册,添加推广信息,
  250. U.U.GZ.TGR = function () {
  251. if (U.U.GZ.TF && US.userInfo.userid) {//添加用户注册信息
  252. U.A.Request("UseStudioPay.UpAddR", [U.U.GZ.TF], U.M.apply(), []);
  253. U.U.GZ.TF = false; //取消重复
  254. }
  255. }
  256. //推广切换
  257. U.U.GZ.STG = function (TF, UTFD) {
  258. TF = TF + 1; //显示的div
  259. var _UTAD = U.M.GTCN(UTFD.childNodes); //获取所有的子元素
  260. for (var i = 1; i < _UTAD.length; i++) {
  261. if (TF == 2 && US.userInfo.userid == null) { break; };
  262. if (TF == i) { _UTAD[i].style.display = "block"; }
  263. else { _UTAD[i].style.display = "none"; }
  264. }
  265. if (TF == 3) { U.U.GZ.GPMTG(); } //查看排名
  266. else if (TF > 1) { if (!U.U.L.isLogin()) { U.U.GZ.NTG(); } } //用户推广资料
  267. }
  268. //-------------------------------------------------------------------辅助函数--------------------------------------------------------------
  269. //用户推广的实体
  270. U.U.GZ.TGE = function (E) {
  271. this.TGID = E[0];
  272. this.TGUserInfoID = E[1];
  273. this.TY = E[2];
  274. }