wave.js 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803
  1. function isMobile() {
  2. return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
  3. }
  4. (function () {
  5. var language = (/^zh/.test(navigator.language) ? "zh" : "en");
  6. if("undefined" == typeof site_name_zh) site_name_zh = "";
  7. if("undefined" == typeof site_name_tw) site_name_tw = "";
  8. if("undefined" == typeof site_name_en) site_name_en = "";
  9. var w = {
  10. zh: {
  11. AUTO_RETURN_HOME: "<label id='countdown'>{{countdown}}</label> 秒后发现新应用",
  12. LOADING: "加载中...",
  13. DOWNLOAD_INSTALL: "下载安装",
  14. DOWNLOAD_LOADING: "下载中",
  15. DOWNLOAD_ENTER: "立即进入",
  16. DATA_ERROR: "数据错误",
  17. DATA_INCOMPLETE: "请联系应用开发者, <a href='/publish'>去重新上传</p>",
  18. DATA_INCOMPLETE_IN_MOBILE: "请联系应用开发者重新上传",
  19. DOWNLOAD_FAILED: "刷新并重试",
  20. VIEW_IN_DESKTOP: "正在安装,请按 Home 键在桌面查看",
  21. VIEW_IN_BROWSER: "请在浏览器中查看下载进度",
  22. PLATFORM_NOT_MATCHING: "只支持 {{app|app_type}} 设备",
  23. CHANGELOG_PLACEHOLDER: "没有更新日志",
  24. FAILED_LOAD_APP: "加载失败",
  25. NOT_FOUND_TITLE: "404 - Not Found",
  26. NOT_FOUND_LOG: "您访问的 应用/页面 不存在",
  27. FORBIDDEN_TITLE: "403 - Forbidden",
  28. FORBIDDEN_TITLE_LOG: "您没有权限访问这个应用",
  29. REQUIRE_PWD: "请输入密码",
  30. PASSWORD_WRONG: "密码错误,请重新输入",
  31. SCAN_TIPS: "扫描二维码下载",
  32. DESC: "应用描述",
  33. CURRENT_VERSION: "当前版本",
  34. FILE_SIZE: "文件大小",
  35. UPDATED_AT: "更新于",
  36. RELEASES: "历史版本",
  37. CHANGELOG: "更新日志",
  38. VIEW_ALL_APP_RELEASES: "查看全部 {{app.histories|length}} 个历史版本",
  39. VIEW_ALL_APP_RELEASES_IOS: "查看全部 {{ios.histories|length}} 个历史版本",
  40. VIEW_ALL_APP_RELEASES_ANDROID: "查看全部 {{android.histories|length}} 个历史版本",
  41. FOLDING: "隐藏",
  42. VIEW_ALL_COMBOAPP_RELEASES: "查看全部 {{combo_app.releases|length}} 个历史版本",
  43. SCREENSHOTS: "应用截图",
  44. INHOUSE: "123",
  45. ADHOC: "内测版",
  46. CONFIRM: "确认",
  47. UNABLE_INSTALL: "微信/QQ 内无法下载应用",
  48. GO_OUT_WECHAT_TIP: "<span class=\"span1\">\n" +
  49. " <img src=\"/static/images/click_btn.png\">\n" +
  50. " </span>\n" +
  51. " <span class=\"span2\">\n" +
  52. " <em>1</em> 点击右上角\n" +
  53. " <img src=\"/static/images/menu_android.png\">\n" +
  54. " 打开菜单\n" +
  55. " </span>\n" +
  56. " <span class=\"span2 android_open\">\n" +
  57. " <em>2</em> 选择\n" +
  58. " <img src=\"/static/images/android.png\">\n" +
  59. " </span>",
  60. GO_OUT_WECHAT_IOS_TIP: "<span class=\"span1\">\n" +
  61. " <img src=\"/static/images/click_btn.png\">\n" +
  62. " </span>\n" +
  63. " <span class=\"span2\">\n" +
  64. " <em>1</em> 点击右上角\n" +
  65. " <img src=\"/static/images/menu.png\">\n" +
  66. " 打开菜单\n" +
  67. " </span>\n" +
  68. " <span class=\"span2\">\n" +
  69. " <em>2</em> 选择\n" +
  70. " <img src=\"/static/images/safari.png\">\n" +
  71. " 用Safari打开下载\n" +
  72. " </span>",
  73. USE_SAFARI_TIP: "<span class=\"span1\">\n" +
  74. " <img src=\"/static/images/click_btn.png\">\n" +
  75. " </span>\n" +
  76. " <span class=\"span2\">\n" +
  77. " <em>1</em> 返回桌面\n" +
  78. " </span>\n" +
  79. " <span class=\"span2\">\n" +
  80. " <em>2</em> 选择\n" +
  81. " <img src=\"/static/images/safari.png\">\n" +
  82. " 用Safari打开下载\n" +
  83. " </span>",
  84. FOOTER_SLOGAN: '本站是应用内测平台,请自行甄别应用风险,<wbr />如应用存在问题,<wbr />可点击“举报”按钮 <a class="one-key-report" href="javascript:;">举报!</a>',
  85. SAFE: "安全",
  86. SAFE_TEXT: "此应用已通过以下安全检测,可放心下载",
  87. VIRUS_PASS: "扫描通过",
  88. LOW_RISK: "低风险",
  89. HIGH_RISK: "高风险",
  90. VIRUS: "病毒",
  91. RISK: "有风险",
  92. RISK_TEXT: "此应用下载有风险,请谨慎下载",
  93. KING_SOFT: "猎豹安全大师",
  94. BAIDU: "百度手机卫士",
  95. POPULARIZE: "推荐应用",
  96. DOWNLOAD: "下载",
  97. REPORT_TITLE: "举报",
  98. REPORT_TIPS: "作为第三方内测分发平台,我们一直致力于打击违规应用,保护用户权益。非常感谢您的举报,我们会在第一时间安排专人处理您的举报问题。感谢您对我们的支持。",
  99. REPORT_RETUEN: "返回下载页",
  100. REPORT_SENDING: "正在发送,请稍后...",
  101. REPORT_EMAIL: "你的邮箱",
  102. REPORT_EMAIL_PLACEHOLDER: "Email",
  103. REPORT_EMAIL_ERROR: "请填写有效的邮箱,可及时了解举报结果",
  104. REPORT_REASON: "举报原因",
  105. REPORT_DB: "盗版",
  106. REPORT_HS: "黄色",
  107. REPORT_QZ: "欺诈",
  108. REPORT_OTHER: "其它",
  109. REPORT_REASON_ERROR: "请选择举报类型",
  110. REPORT_CONTENT_PLACEHOLDER: "补充举报原因",
  111. REPORT_CONTENT_ERROR: "请填写举报原因",
  112. REPORT_BUTTON: "举报",
  113. REPORT_THANKS: "感谢你的举报",
  114. REPORT_MESSAGE: "我们会尽快核实您的举报内容,将于 1-3 个工作日内处理。",
  115. LEGAL_FORBIDDEN: "因法律的要求<wbr />而被拒绝",
  116. LEGAL_FORBIDDEN_LOG: "该 APP 涉及盗版、欺诈、色情或其他不良信息",
  117. TRUST_DEVELOPER: "信任开发者",
  118. UNTRUSTED_ENTERPRISE_DEVELOPER: "<div style=\"text-align:center;padding:15px;\"><a target=\"_blank\" href=\"/guide.php\" style=\"color:#157df1;\"><span class=\"glyphicon glyphicon-hand-right\"></span>&nbsp;&nbsp;\"未受信任的企业级开发者\"的解决办法</a></div>",
  119. VERSION: "版本",
  120. SIZE: "大小",
  121. UPDATE_TIME: "更新时间",
  122. FOR_ANDROID: "适用于安卓手机",
  123. FOR_IOS: "适用于苹果手机",
  124. FOR_IOS_AND_ANDROID: "适用于苹果和安卓手机",
  125. DIBAQU: site_name_zh,
  126. DISCLAIMER: "免责声明",
  127. REPORT: "举报",
  128. APP_DESCRIPTION: "应用描述",
  129. APP_SCREENSHOTS: "应用截图",
  130. APP_CONTACT: "联系方式",
  131. APP_REMARK: "应用备注",
  132. APP_ILLEGAL: "该应用不存在或已被自动删除",
  133. APP_EXPIRED: "该应用不存在或已过期",
  134. APP_PASSWORD_ERROR: "下载密码错误",
  135. APP_DOWNLOAD_TIMES_OVER: "APP下载次数已耗尽,请联系应用所有者",
  136. BACK_HOME: "返回首页",
  137. REALNAME_LAYER_HINT: "提示",
  138. REALNAME_LAYER_TITLE: "账户尚未实名,请尽快操作实名认证",
  139. REALNAME_LAYER_CONTENT: "建议您:<br>尽快登录分发平台,点击右上角未实名认证,进行认证。<br>未实名认证,下载链接有效期只有24小时,只能下载5次。",
  140. REALNAME_LAYER_BUTTON_TEXT: "知道了",
  141. BUTTON_OK: "确定"
  142. },
  143. en: {
  144. AUTO_RETURN_HOME: "Found new apps in <label id='countdown'>{{countdown}}</label> secs",
  145. LOADING: "Loading...",
  146. DOWNLOAD_INSTALL: "Download",
  147. DOWNLOAD_LOADING: "Loading",
  148. DOWNLOAD_ENTER: "Enter",
  149. DATA_ERROR: "Data Error",
  150. DATA_INCOMPLETE: "Please contact the app's owner, <a href='/publish'>upload again in Rio version</p>",
  151. DATA_INCOMPLETE_IN_MOBILE: "Please contact the app's owner upload again",
  152. DOWNLOAD_FAILED: "Refresh",
  153. VIEW_IN_DESKTOP: "Installing, please check on your home screen",
  154. VIEW_IN_BROWSER: "Please check the download progress in the browser",
  155. PLATFORM_NOT_MATCHING: "Only support {{app|app_type}} device",
  156. CHANGELOG_PLACEHOLDER: "There is no update log",
  157. FAILED_LOAD_APP: "Load failed",
  158. NOT_FOUND_TITLE: "404 - Not Found",
  159. NOT_FOUND_LOG: "Page does not exist",
  160. FORBIDDEN_TITLE: "403 - Forbidden",
  161. FORBIDDEN_TITLE_LOG: "You don't have permission to view this page",
  162. REQUIRE_PWD: "Please enter the password",
  163. PASSWORD_WRONG: "Password is not correct",
  164. SCAN_TIPS: "<span style=''>Scan the qrcode to download</span>",
  165. DESC: "Description",
  166. CURRENT_VERSION: "Current version",
  167. FILE_SIZE: "File size",
  168. UPDATED_AT: "Updated at",
  169. RELEASES: "Releases",
  170. CHANGELOG: "Changelog",
  171. VIEW_ALL_APP_RELEASES: "View all {{app.histories|length}} releases",
  172. VIEW_ALL_APP_RELEASES_IOS: "View all {{ios.histories|length}} releases",
  173. VIEW_ALL_APP_RELEASES_ANDROID: "View all {{android.histories|length}} releases",
  174. FOLDING: "Folding",
  175. SCREENSHOTS: "Screenshots",
  176. INHOUSE: "",
  177. ADHOC: "Adhoc",
  178. CONFIRM: "Confirm",
  179. UNABLE_INSTALL: "Can't downloads apps in WeChat/QQ",
  180. GO_OUT_WECHAT_IOS_TIP: "Open in Safari and install this app",
  181. GO_OUT_WECHAT_TIP: "Open in browser and install this app",
  182. USE_SAFARI_TIP: "Open in Safari and install this app",
  183. FOOTER_SLOGAN: 'we are provide beta app hosting service. If the app <wbr /> is suspicious, click the "report" button please.<a class="one-key-report" href="javascript:;">Report!</a>',
  184. SAFE: "Safe",
  185. SAFE_TEXT: "This application is already passing the security testing, you can start to download it.",
  186. VIRUS_PASS: "PASS",
  187. LOW_RISK: "Low Risk",
  188. HIGH_RISK: "High Risk",
  189. VIRUS: "Virus",
  190. RISK: "WARNING",
  191. RISK_TEXT: "We find out some unknown viruses in this app, please make sure this application is from someone you trust.",
  192. KING_SOFT: "CM Security",
  193. BAIDU: "Baidu Mobile Security",
  194. POPULARIZE: "Hot apps",
  195. DOWNLOAD: "Download",
  196. REPORT_TITLE: "Report",
  197. REPORT_TIPS: "As a third-party platform,we are committed to cracking down on illegal apps,protect the rights of users。Thank you for your complaint. We will deal with it as soon as possible.Thanks for your support.",
  198. REPORT_RETUEN: "Back",
  199. REPORT_SENDING: "Sending...",
  200. REPORT_EMAIL: "Email",
  201. REPORT_EMAIL_PLACEHOLDER: "Your Email",
  202. REPORT_EMAIL_ERROR: "Please enter your email address. Once we have reviewed your report, we will notify you by email.",
  203. REPORT_REASON: "Reason for report",
  204. REPORT_DB: "Pirate",
  205. REPORT_HS: "Porn",
  206. REPORT_QZ: "Scam",
  207. REPORT_OTHER: "Other",
  208. REPORT_REASON_ERROR: "Please choose a topic you want to report.",
  209. REPORT_CONTENT_PLACEHOLDER: "Please provide details of the reported issue.",
  210. REPORT_CONTENT_ERROR: "Please tell us why you want to report this app.",
  211. REPORT_BUTTON: "Report",
  212. REPORT_THANKS: "Thank you for helping to make xuanfeng better!",
  213. REPORT_MESSAGE: "We will review your report soon and the result will be processed within 1-3 working days",
  214. LEGAL_FORBIDDEN: "Unavailable For Legal Reasons",
  215. LEGAL_FORBIDDEN_LOG: "Unavailable For Legal Reasons",
  216. TRUST_DEVELOPER: "Trust developer",
  217. UNTRUSTED_ENTERPRISE_DEVELOPER: "<div style=\"text-align:center;padding:15px;\"><a target=\"_blank\" href=\"/guide.php\" style=\"color:#157df1;\">Untrusted enterprise developer</a></div>",
  218. VERSION: "Version",
  219. SIZE: "Size",
  220. UPDATE_TIME: "Update Time",
  221. FOR_ANDROID: "For Android",
  222. FOR_IOS: "For iOS",
  223. FOR_IOS_AND_ANDROID: "For iOS & Android",
  224. DIBAQU: site_name_en,
  225. DISCLAIMER: "Disclaimer",
  226. REPORT: "Report",
  227. APP_DESCRIPTION: "Description",
  228. APP_SCREENSHOTS: "Screenshots",
  229. APP_CONTACT: "Contact",
  230. APP_REMARK: "Remark",
  231. APP_ILLEGAL: "The APP has been removed because it contains illegal content",
  232. APP_EXPIRED: "The APP has expired and cannot be downloaded",
  233. APP_PASSWORD_ERROR: "wrong password",
  234. APP_DOWNLOAD_TIMES_OVER: "The APP download times have been exhausted, please contact the APP owner",
  235. BACK_HOME: "Back to home",
  236. REALNAME_LAYER_HINT: "Hint",
  237. REALNAME_LAYER_TITLE: "The account has not been verified.",
  238. REALNAME_LAYER_CONTENT: "please go to login to xuanfeng website,click the button in the upper right corner to authentication。<br />If not , the download link is valid for download only 5 times in 24 hours.",
  239. REALNAME_LAYER_BUTTON_TEXT: "got it",
  240. BUTTON_OK: "OK"
  241. },
  242. "zh-tw": {
  243. AUTO_RETURN_HOME: "<label id='countdown'>{{countdown}}</label> 秒後發現新應用",
  244. LOADING: "加載中...",
  245. DOWNLOAD_INSTALL: "下載安裝",
  246. DOWNLOAD_LOADING: "下载中",
  247. DOWNLOAD_ENTER: "立即進入",
  248. DATA_ERROR: "數據錯誤",
  249. DATA_INCOMPLETE: "請聯系應用開發者, <a href='/publish'>去重新上傳</p>",
  250. DATA_INCOMPLETE_IN_MOBILE: "請聯系應用開發者重新上傳",
  251. DOWNLOAD_FAILED: "刷新並重試",
  252. VIEW_IN_DESKTOP: "正在安裝,請按 Home 鍵在桌面查看",
  253. VIEW_IN_BROWSER: "請在浏覽器中查看下載進度",
  254. PLATFORM_NOT_MATCHING: "只支持 {{app|app_type}} 設備",
  255. CHANGELOG_PLACEHOLDER: "没有更新日志",
  256. FAILED_LOAD_APP: "加載失敗",
  257. NOT_FOUND_TITLE: "404 - Not Found",
  258. NOT_FOUND_LOG: "您訪問的 應用/頁面 不存在",
  259. FORBIDDEN_TITLE: "403 - Forbidden",
  260. FORBIDDEN_TITLE_LOG: "您沒有權限訪問這個應用",
  261. REQUIRE_PWD: "請輸入密碼",
  262. PASSWORD_WRONG: "密碼錯誤,請重新輸入",
  263. SCAN_TIPS: "掃描二維碼下載",
  264. DESC: "應用描述",
  265. CURRENT_VERSION: "當前版本",
  266. FILE_SIZE: "文件大小",
  267. UPDATED_AT: "更新于",
  268. RELEASES: "曆史版本",
  269. CHANGELOG: "更新日志",
  270. VIEW_ALL_APP_RELEASES: "查看全部 {{app.histories|length}} 個曆史版本",
  271. VIEW_ALL_APP_RELEASES_IOS: "查看全部 {{ios.histories|length}} 個曆史版本",
  272. VIEW_ALL_APP_RELEASES_ANDROID: "查看全部 {{android.histories|length}} 個曆史版本",
  273. FOLDING: "隱藏",
  274. VIEW_ALL_COMBOAPP_RELEASES: "查看全部 {{combo_app.releases|length}} 個曆史版本",
  275. SCREENSHOTS: "應用截圖",
  276. INHOUSE: "123",
  277. ADHOC: "內測版",
  278. CONFIRM: "確認",
  279. UNABLE_INSTALL: "微信/QQ 內無法下載應用",
  280. GO_OUT_WECHAT_TIP: "請點擊右上角<br/>選擇“浏覽器中打開”",
  281. GO_OUT_WECHAT_IOS_TIP: "點擊右上角菜單在<br/>Safari 中打開並安裝",
  282. USE_SAFARI_TIP: "請在Safari 中打開並安裝",
  283. FOOTER_SLOGAN: '本站是應用內測平台,請自行甄別應用風險,<wbr />如應用存在問題,<wbr />可點擊“舉報”按鈕 <a class="one-key-report" href="javascript:;">舉報!</a>',
  284. SAFE: "安全",
  285. SAFE_TEXT: "此應用已通過以下安全檢測,可放心下載",
  286. VIRUS_PASS: "掃描通過",
  287. LOW_RISK: "低風險",
  288. HIGH_RISK: "高風險",
  289. VIRUS: "病毒",
  290. RISK: "有風險",
  291. RISK_TEXT: "此應用下載有風險,請謹慎下載",
  292. KING_SOFT: "獵豹安全大師",
  293. BAIDU: "百度手機衛士",
  294. POPULARIZE: "推薦應用",
  295. DOWNLOAD: "下載",
  296. REPORT_TITLE: "舉報",
  297. REPORT_TIPS: "作為第三方內測分發平臺,我們壹直致力於打擊違規應用,保護用戶權益。非常感謝您的舉報,我們會在第壹時間安排專人處理您的舉報問題。感謝您對我們的支持。",
  298. REPORT_RETUEN: "返回下載頁",
  299. REPORT_SENDING: "正在發送,請稍後...",
  300. REPORT_EMAIL: "你的郵箱",
  301. REPORT_EMAIL_PLACEHOLDER: "Email",
  302. REPORT_EMAIL_ERROR: "請填寫有效的郵箱,可及時了解舉報結果",
  303. REPORT_REASON: "舉報原因",
  304. REPORT_DB: "盜版",
  305. REPORT_HS: "黃色",
  306. REPORT_QZ: "欺詐",
  307. REPORT_OTHER: "其它",
  308. REPORT_REASON_ERROR: "請選擇舉報類型",
  309. REPORT_CONTENT_PLACEHOLDER: "補充舉報原因",
  310. REPORT_CONTENT_ERROR: "請填寫舉報原因",
  311. REPORT_BUTTON: "舉報",
  312. REPORT_THANKS: "感謝你的舉報",
  313. REPORT_MESSAGE: "我們會盡快核實您的舉報內容,關于舉報的處理結果將于 1-3 個工作日內發送至你郵箱。",
  314. LEGAL_FORBIDDEN: "因法律的要求<wbr />而被拒絕",
  315. LEGAL_FORBIDDEN_LOG: "該 APP 涉及盜版、欺詐、色情或其他不良信息",
  316. TRUST_DEVELOPER: "信任開發者",
  317. UNTRUSTED_ENTERPRISE_DEVELOPER: "<div style=\"text-align:center;padding:15px;\"><a target=\"_blank\" href=\"/guide.php\" style=\"color:#157df1;\"><span class=\"glyphicon glyphicon-hand-right\"></span>&nbsp;&nbsp;未受信任的企業開發者</a></div>",
  318. VERSION: "版本",
  319. SIZE: "大小",
  320. UPDATE_TIME: "更新時間",
  321. FOR_ANDROID: "適用于安卓手機",
  322. FOR_IOS: "適用于蘋果手機",
  323. FOR_IOS_AND_ANDROID: "適用于蘋果和安卓手機",
  324. DIBAQU: site_name_tw,
  325. DISCLAIMER: "免責聲明",
  326. REPORT: "舉報",
  327. APP_DESCRIPTION: "應用描述",
  328. APP_SCREENSHOTS: "應用截圖",
  329. APP_CONTACT: "聯系方式",
  330. APP_REMARK: "應用備注",
  331. APP_ILLEGAL: "該應用不存在或已被自動刪除",
  332. APP_EXPIRED: "該應用不存在或已過期",
  333. APP_PASSWORD_ERROR: "下載密碼錯誤",
  334. APP_DOWNLOAD_TIMES_OVER: "APP下載次數已耗盡,請聯系應用所有者",
  335. BACK_HOME: "返回首頁",
  336. REALNAME_LAYER_HINT: "提示",
  337. REALNAME_LAYER_TITLE: "賬戶尚未實名,請盡快操作實名認證",
  338. REALNAME_LAYER_CONTENT: "建議您:<br>盡快登錄網站,點擊右上角未實名認證,進行認證。<br>未實名認證,下載鏈接有效期只有24小時,只能下載5次。",
  339. REALNAME_LAYER_BUTTON_TEXT: "知道了",
  340. BUTTON_OK: "確定"
  341. }
  342. };
  343. $(function () {
  344. window.DAFU = {
  345. brand: "Xuanfeng",
  346. locale: 'zh',
  347. params: {},
  348. platform: {},
  349. config: {
  350. server: "/source/index/ajax.php?ac=jsonFormat&link="
  351. },
  352. data: {},
  353. APP: {},
  354. signPackage: {},
  355. AD: {},
  356. init: function () {
  357. },
  358. query: function () {
  359. var self = this;
  360. $.getJSON(this.config.server + this.getQuerySetting(), this.getQueryParams(), function (ret) {
  361. if (ret.code != '200') {
  362. alert(ret.msg);
  363. return false;
  364. }
  365. self.APP = ret.data.info;
  366. self.AD = ret.data.ad_config;
  367. self.signPackage = ret.data.signPackage;
  368. self.data = ret.data;
  369. if (ret.data.info.template_language) {
  370. language = ret.data.info.template_language;
  371. }
  372. if (w[language] == undefined) {
  373. language = 'zh';
  374. }
  375. $.extend(Mark.includes, w[language]);
  376. if (!self.APP.template) {
  377. self.successVip();
  378. } else if (['tmp1', 'tmp2', 'tmp3', 'tmp4', 'tmp5', 'tmp6'].indexOf(self.APP.template) > -1) {
  379. self.successVip();
  380. } else if (['error'].indexOf(self.APP.template) > -1) {
  381. self.error(ret.data.msg);
  382. }
  383. });
  384. },
  385. getQuerySetting: function () {
  386. var url = $('input[name="url"]').val();
  387. if (url) return url;
  388. var pathname = window.location.pathname.substring(1);
  389. pathname = pathname.split("?")[0];
  390. return pathname.replace(/show\//, "");
  391. },
  392. getQueryParams: function GetRequest() {
  393. var url = location.search;
  394. var theRequest = new Object();
  395. if (url.indexOf("?") != -1) {
  396. var str = url.substr(1);
  397. var strs = str.split("&");
  398. for (var i = 0; i < strs.length; i++) {
  399. theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
  400. }
  401. }
  402. return theRequest;
  403. },
  404. successVip: function () {
  405. var tmp = Mark.up($('#title').html(), this.APP);
  406. $('head').append(tmp);
  407. var tmp = Mark.up($('#meta').html(), this.APP);
  408. $('head').append(tmp);
  409. this.APP.show_button = this.data.show_button;
  410. this.APP.checked = this.data.checked;
  411. this.APP.support_ios = (this.APP.support & 1) ? true : false;
  412. this.APP.support_android = (this.APP.support & 2) ? true : false;
  413. $('body').append(Mark.up($('#content').html(), this.APP));
  414. var clipboard = new Clipboard('#copy_button');
  415. clipboard.on('success', function (e) {
  416. var msg = e.trigger.getAttribute('aria-label');
  417. alert(msg);
  418. e.clearSelection();
  419. });
  420. this.APP.show_guide = this.data.show_guide;
  421. if (this.APP.show_guide && this.APP.ext == 'iOS') {
  422. $(w[language].UNTRUSTED_ENTERPRISE_DEVELOPER).insertBefore('.down_load');
  423. $('.down_load').css('margin-top', 0);
  424. }
  425. $('body').append(Mark.up($('#copyright').html(), this.APP));
  426. this.showAd();
  427. this.showPopup();
  428. //this.weixin();
  429. //console.info(this.data);
  430. if (this.data.info.user.is_publish == 0) {
  431. console.info(1);
  432. Modal.templateModal({
  433. imgName: "modal-bg-2.jpg",
  434. title1: w[language].REALNAME_LAYER_HINT,
  435. title2: w[language].REALNAME_LAYER_TITLE,
  436. p: w[language].REALNAME_LAYER_CONTENT,
  437. align: 'left', // 居左 left, 居中 center, 居右 right
  438. btnText: w[language].REALNAME_LAYER_BUTTON_TEXT,
  439. btnClass: "modal-btn1"
  440. });
  441. }
  442. },
  443. error: function (msg) {
  444. $('body').append(Mark.up($('#error-content').html(), this.APP));
  445. $(".error-msg").html(w[language][msg]);
  446. },
  447. success: function () {
  448. var tmp = Mark.up($('#title').html(), this.APP);
  449. $('head').append(tmp);
  450. var tmp = Mark.up($('#meta').html(), this.APP);
  451. $('head').append(tmp);
  452. var top_title = Mark.up($('#top_title').html(), this.APP);
  453. $('body').append(top_title);
  454. this.APP.show_button = this.data.show_button;
  455. this.APP.checked = this.data.checked;
  456. var button = Mark.up($('#button').html(), this.APP);
  457. $('body').append(button);
  458. $('body').append(Mark.up($('#intro').html(), this.APP));
  459. $('body').append(Mark.up($('#qrcode').html(), this.APP));
  460. var clipboard = new Clipboard('#copy_button');
  461. clipboard.on('success', function (e) {
  462. var msg = e.trigger.getAttribute('aria-label');
  463. alert(msg);
  464. e.clearSelection();
  465. });
  466. this.APP.show_guide = this.data.show_guide;
  467. $('body').append(Mark.up($('#copyright').html(), this.APP));
  468. //this.weixin();
  469. this.showAd();
  470. this.showPopup();
  471. },
  472. showAd: function () {
  473. if (parseInt(this.data.show_ad) == 0) {
  474. return;
  475. }
  476. $.ajax({
  477. type: "POST",
  478. url: "/source/index/ajax.php?ac=adsense&template=" + this.APP.template,
  479. data: {'template': this.data.template},
  480. dataType: 'html',
  481. beforeSend: function (xhr) {
  482. },
  483. success: function (result, textStatus, jqXHR) {
  484. if (result) {
  485. $('body').append(result);
  486. $('.template-footer').css("margin-bottom", "60px");
  487. }
  488. },
  489. error: function (jqXHR, textStatus, errorThrown) {
  490. }
  491. });
  492. },
  493. reportApp: function () {
  494. $("#reportModal").modal("show");
  495. // 举报 单选
  496. $(document).on('click', '.report ul li', function () {
  497. $("#reportModal .report ul li").find(".icon").removeClass("icon-radio-checked").siblings("input[type=radio]").prop("checked", false);
  498. $(this).find(".icon").addClass("icon-radio-checked").siblings("input[type=radio]").prop("checked", true);
  499. // console.log($("#reportModal :checked").val());
  500. });
  501. // 举报保存
  502. $(document).on('click', (".report .save"), function () {
  503. $(this).attr('disabled', true);
  504. var checkedRadio = $("#reportModal .report ul");
  505. var textarea = $("#reportModal .report textarea");
  506. var email = $("#reportModal .report input[name=email]");
  507. var emailValidation = /\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/;
  508. if (checkedRadio.find(":checked").length > 0) {
  509. checkedRadio.parents(".form-group").removeClass("form-error");
  510. } else {
  511. checkedRadio.parents(".form-group").addClass("form-error");
  512. }
  513. if (textarea.val().length > 0) {
  514. textarea.parents(".form-group").removeClass("form-error");
  515. } else {
  516. textarea.parents(".form-group").addClass("form-error");
  517. }
  518. if (emailValidation.test(email.val())) {
  519. email.parents(".form-group").removeClass("form-error");
  520. } else {
  521. email.parents(".form-group").addClass("form-error");
  522. }
  523. var errorLength = $("#reportModal .report .form-error").length;
  524. if (errorLength > 0) {
  525. $("#reportModal").modal("show");
  526. } else {
  527. var app_id = DAFU.APP.id;
  528. var app_name = DAFU.APP.app_name;
  529. $.post('/source/index/ajax.php?ac=report', {
  530. email: email.val(),
  531. type: $.trim(checkedRadio.find(":checked").parent().text()),
  532. message: textarea.val(),
  533. app_id: app_id,
  534. app_name: app_name
  535. }, function (data) {
  536. $('#report-sending').hide();
  537. if (data.code == 200) {
  538. $("#reportModal").modal("hide");
  539. Modal.generalModal({
  540. backdrop: true, // 点击阴影是否关闭弹窗, // true 开启; false 关闭
  541. iconClass: "", // success: icon-modal-success1, error: icon-modal-error2
  542. title: w[language].REPORT_THANKS, // 弹窗标题
  543. p: w[language].REPORT_MESSAGE, // 弹窗内容
  544. align: 'left', // 弹窗内容排列顺序 left center right
  545. cancelBtnText: "", // 取消按钮文字
  546. successBtnText: w[language].BUTTON_OK, // 确定按钮文字
  547. successBtnModal: true, // 点击确定按钮是否关闭弹窗 true 关闭 false 不关闭
  548. cancelBtnModal: true, // 点击取消按钮是否关闭弹窗 true 关闭 false 不关闭
  549. successCallback: function () {
  550. },
  551. cancelCallback: function () {
  552. }
  553. });
  554. } else {
  555. alert(data.msg);
  556. }
  557. }, 'json');
  558. }
  559. });
  560. },
  561. clickReport: function () {
  562. $('.dialog-close .icon-close').click(function () {
  563. $('#reportDialog').hide();
  564. });
  565. $('#reportDialog').show();
  566. $('.custom-checkbox').click(function () {
  567. $('.custom-checkbox').removeClass('active');
  568. $(this).addClass('active');
  569. });
  570. $("#submit_report").click(function () {
  571. var email = $('#report-email').val();
  572. var type = $('div .active').html();
  573. var message = $('#report-content').val();
  574. var app_id = DAFU.APP.id;
  575. var app_name = DAFU.APP.app_name;
  576. if (!email) {
  577. $('.email-error').show();
  578. return false;
  579. } else {
  580. $('.email-error').hide();
  581. }
  582. if (!type) {
  583. $('.type-error').show();
  584. return false;
  585. } else {
  586. $('.type-error').hide();
  587. }
  588. if (!message) {
  589. $('.message-error').show();
  590. return false;
  591. } else {
  592. $('.message-error').hide();
  593. }
  594. $('#report-sending').show();
  595. $.post('/source/index/ajax.php?ac=report', {
  596. email: email,
  597. type: type,
  598. message: message,
  599. app_id: app_id,
  600. app_name: app_name
  601. }, function (data) {
  602. $('#report-sending').hide();
  603. if (data.code == 200) {
  604. $('#report-form').hide();
  605. $('#report-feedback').show();
  606. } else {
  607. alert(data.msg);
  608. }
  609. }, 'json');
  610. });
  611. },
  612. showPopup: function () {
  613. var browser = {
  614. versions: function () {
  615. var u = navigator.userAgent;
  616. var ua = navigator.userAgent.toLocaleLowerCase();
  617. return {
  618. trident: u.indexOf('Trident') > -1, // IE内核
  619. presto: u.indexOf('Presto') > -1, // opera内核
  620. webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
  621. gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, // 火狐内核
  622. mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/), // 是否为移动终端
  623. ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), // IOS终端
  624. android: u.indexOf('Android') > -1 , // 安卓终端
  625. iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, // 是否为iphone或QQHD浏览器
  626. iPad: u.indexOf('iPad') > -1, // 是否为iPad
  627. webApp: u.indexOf('Safari') == -1, // 是否web应用程序,没有头部与底部
  628. QQbrw: u.indexOf('MQQBrowser') > -1, // QQ浏览器
  629. weiXin: u.indexOf('MicroMessenger') > -1, // 微信
  630. QQ: ua.match(/\sQQ/i) == " qq", // QQ App内置浏览器(需要配合使用)
  631. weiBo: ua.match(/WeiBo/i) == "weibo", // 微博
  632. safari: /Safari/.test(u) && !/Chrome/.test(u) && u.indexOf('MQQBrowser') < 0,
  633. UCbrw: u.indexOf('UCBrowser') > -1, //UC浏览器
  634. ucSpecial: u.indexOf('rv:1.2.3.4') > -1,
  635. Symbian: u.indexOf('Symbian') > -1,
  636. ucSB: u.indexOf('Firofox/1.') > -1
  637. };
  638. }(),
  639. language: (navigator.browserLanguage || navigator.language).toLowerCase()
  640. };
  641. var weixin, weibo, isQQ, isiOS, isAndroid = false;
  642. var ua = navigator.userAgent.toLowerCase();//获取判断用的对象
  643. if (browser.versions.mobile) {//判断是否是移动设备打开
  644. if (browser.versions.weiXin) {
  645. weixin = true;
  646. }
  647. if (browser.versions.weiBo) {
  648. weibo = true;
  649. }
  650. if (browser.versions.QQ) {
  651. isQQ = true;
  652. }
  653. if (browser.versions.ios || browser.versions.iPhone || browser.versions.iPad) {
  654. isiOS = true;
  655. }
  656. if (browser.versions.android) {
  657. isAndroid = true;
  658. }
  659. if (browser.versions.safari) {
  660. isSafari = true;
  661. }else{
  662. isSafari = false;
  663. }
  664. }
  665. var appType = (this.APP.ext == 'iOS') ? 'ios' : 'android';
  666. if (weixin == true) {
  667. $('.down_load').hide();
  668. if (isiOS == true) {
  669. $("#weixin_ios").show();
  670. $("#weixin_android").hide();
  671. } else {
  672. $("#weixin_ios").hide();
  673. $("#weixin_android").show();
  674. }
  675. return false;
  676. }
  677. if (isQQ) {
  678. $('.down_load').hide();
  679. if (isiOS == true) {
  680. $("#weixin_ios").show();
  681. $("#weixin_android").hide();
  682. } else {
  683. $("#weixin_ios").hide();
  684. $("#weixin_android").show();
  685. }
  686. return false;
  687. }
  688. if(isiOS && !isSafari && (browser.versions.UCbrw || this.APP.fileExt=='mobileconfig')){
  689. $('.down_load').hide();
  690. $("#no_safari").show();
  691. }
  692. if (appType == 'android' && isiOS) {
  693. $('.down_load').hide();
  694. } else if (appType == 'ios' && !isiOS) {
  695. $('.down_load').hide();
  696. } else {
  697. var app_source = this.APP.source;
  698. $('.down_load').click(function () {
  699. var a = $.ua.browser.name;
  700. var b = $.ua.device.type;
  701. $(this).attr('style', 'display:none !important');
  702. $("#showtext").show();
  703. var c = a.match(/safari/gi);
  704. var d = b.match(/mobile/gi);
  705. if (c && d && "ios" == appType && app_source != 3) {
  706. setTimeout(function () {
  707. $("#showtext").hide();
  708. var a = $("<a href='/static/app/embedded.mobileprovision' class='ms-btn template-btn clearfix pc-pwd' style='display:block;background-color:#40acf1; border: 1px solid #40acf1;margin: 15px'>" + w[language].TRUST_DEVELOPER + "</a>");
  709. $("#showtext").after(a);
  710. }, 6000);
  711. }
  712. });
  713. }
  714. }, weixin: function () {
  715. wx.config({
  716. debug: false,
  717. appId: this.signPackage["appId"],
  718. timestamp: this.signPackage["timestamp"],
  719. nonceStr: this.signPackage["nonceStr"],
  720. signature: this.signPackage["signature"],
  721. jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ']
  722. });
  723. var this_app = this.APP;
  724. wx.ready(function () {
  725. wx.onMenuShareAppMessage({
  726. title: this_app.app_name,
  727. desc: decodeURIComponent(encodeURIComponent('版本:' + this_app.version + '.' + this_app.version_code + ' 大小:' + this_app.app_size).replace(/\+/g, '%20')),
  728. link: www_domain + this_app.url,
  729. imgUrl: "https:" + this_app.icon_300
  730. });
  731. wx.onMenuShareTimeline({
  732. title: this_app.app_name,
  733. desc: decodeURIComponent(encodeURIComponent('版本:' + this_app.version + '.' + this_app.version_code + ' 大小:' + this_app.app_size).replace(/\+/g, '%20')),
  734. link: www_domain + this_app.url,
  735. imgUrl: "https:" + this_app.icon_300
  736. });
  737. wx.onMenuShareQQ({
  738. title: this_app.app_name,
  739. desc: decodeURIComponent(encodeURIComponent('版本:' + this_app.version + '.' + this_app.version_code + ' 大小:' + this_app.app_size).replace(/\+/g, '%20')),
  740. link: www_domain + this_app.url,
  741. imgUrl: "https:" + this_app.icon_300
  742. });
  743. });
  744. },
  745. submitPwd: function () {
  746. url = this.getQuerySetting();
  747. password = $("input[name='pwd']").val();
  748. // 验证密码是否正确
  749. $.getJSON('/source/index/ajax.php?ac=check-password', {url: url, password: password}, function (data) {
  750. if (data.code == 200) {
  751. window.location.href = '/' + url + '?t='+data.time+'&password=' + password;
  752. } else {
  753. $("#autoHideTemplateModal").find(".modal-dialog").addClass("modal-sm").find(".auto-hide .mt5").text(w[language].PASSWORD_WRONG);
  754. autoHideModal('#autoHideTemplateModal', 3000);
  755. }
  756. });
  757. //window.location.href = '/' + this.getQuerySetting() + '?password=' + $('#password').val();
  758. },
  759. showProvision: function () {
  760. }
  761. },
  762. DAFU.init(), DAFU.query();
  763. })
  764. }).call(this);