NetworkPromotion.js 16 KB

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