about.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>关于</title>
  6. <meta name="viewport"
  7. content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  8. <!-- 挂接mui样式 -->
  9. <link href="../css/mui.css" rel="stylesheet" />
  10. <!-- 挂接app样式 -->
  11. <link rel="stylesheet" type="text/css" href="../css/app.css" />
  12. <!-- 引入字体 -->
  13. <link rel="stylesheet" type="text/css" href="../fonts/TTTGB-Medium.css" />
  14. <!-- 引入数字字体 -->
  15. <link rel="stylesheet" type="text/css" href="../fonts/font-time.css" />
  16. <!-- 本页独有样式 -->
  17. <style type="text/css">
  18. /* 内容框架样式 */
  19. .cr-content {
  20. display: flex;
  21. align-items: center;
  22. flex-direction: column;
  23. }
  24. /* App图标容器样式 */
  25. .cr-app-icon-panel {
  26. background-color: rgb(255, 255, 255);
  27. width: 100px;
  28. height: 100px;
  29. border-radius: 50px;
  30. display: flex;
  31. align-items: center;
  32. justify-content: center;
  33. margin-top: 40px;
  34. }
  35. /* App图标样式 */
  36. .cr-app-icon-panel>img {
  37. width: 60px;
  38. height: 60px;
  39. }
  40. /* App名称样式 */
  41. .cr-app-name {
  42. font-size: 24px;
  43. font-family: 'TTTGB-Medium';
  44. color: rgb(87, 137, 247);
  45. margin: 20px 0px 30px 0px;
  46. }
  47. /* 信息组标题样式 */
  48. .mui-table-view-divider {
  49. line-height: 24px;
  50. font-size: 14px;
  51. padding-left: 5px !important;
  52. }
  53. /* 单元格样式 */
  54. .mui-table-view-cell {
  55. line-height: 15px;
  56. }
  57. /* 行标题样式 */
  58. .mui-table-view-cell>span:nth-child(1) {
  59. font-size: 13px;
  60. color: rgb(69, 69, 69);
  61. }
  62. /* 行内容样式 */
  63. .mui-table-view-cell>span:nth-child(2) {
  64. font-size: 12px;
  65. color: rgb(87, 137, 247);
  66. float: right;
  67. }
  68. </style>
  69. </head>
  70. <body>
  71. <div class="mui-content cr-content">
  72. <div class="cr-app-icon-panel">
  73. <img src="../img/ico_app.png" />
  74. </div>
  75. <span class="cr-app-name"></span>
  76. </div>
  77. <ul class="mui-table-view">
  78. </ul>
  79. </body>
  80. </html>
  81. <!-- 引入mui脚本 -->
  82. <script src="../js/mui.js" type="text/javascript" charset="utf-8"></script>
  83. <!-- 引入jQuery脚本 -->
  84. <script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
  85. <!-- 引入通用脚本 -->
  86. <script src="../js/common.js" type="text/javascript" charset="utf-8"></script>
  87. <!-- 引入webview脚本 -->
  88. <script src="../js/webview.js" type="text/javascript" charset="utf-8"></script>
  89. <!-- 引入存储脚本 -->
  90. <script src="../js/save.js" type="text/javascript" charset="utf-8"></script>
  91. <!-- 本页独有脚本 -->
  92. <script type="text/javascript">
  93. mui.init();
  94. /* 初始化完成 */
  95. plusInit(function() {
  96. plus.runtime.getProperty(plus.runtime.appid, function(info) {
  97. plus.io.resolveLocalFileSystemURL('_www/manifest.json', function(entry) {
  98. entry.file(function(file) {
  99. var fileReader = new plus.io.FileReader();
  100. fileReader.readAsText(file, 'utf-8');
  101. fileReader.onloadend = function(evt) {
  102. var data = JSON.parse(evt.target.result);
  103. showAbout(info,data);
  104. }
  105. }, function(err) {
  106. printToConsole("读取文件错误:" + JSON.stringify(err));
  107. });
  108. }, function(err) {
  109. printToConsole("获取文件错误:" + JSON.stringify(err));
  110. });
  111. });
  112. })
  113. /**
  114. * 展示关于信息
  115. * @param {JSON} info 通过plus.runtime.getProperty读取的信息
  116. * @param {JSON} data 读取manifest.json的信息
  117. */
  118. function showAbout(info,data){
  119. var infoHtml = "";
  120. /* 赋值应用名称 */
  121. $('.cr-app-name').html(info.name);
  122. /* 组装相关信息 */
  123. infoHtml += "<li class='mui-table-view-divider'>基本信息</li>";
  124. infoHtml += "<li class='mui-table-view-cell'>";
  125. infoHtml += "<span>应用名称</span>";
  126. infoHtml += "<span>" + info.name + "</span>";
  127. infoHtml += "</li>"
  128. infoHtml += "<li class='mui-table-view-cell'>";
  129. infoHtml += "<span>版本</span>";
  130. infoHtml += "<span>" + info.version + "</span>";
  131. infoHtml += "</li>"
  132. infoHtml += "<li class='mui-table-view-cell'>";
  133. infoHtml += "<span>内部版本</span>";
  134. infoHtml += "<span>" + info.versionCode + "</span>";
  135. infoHtml += "</li>"
  136. infoHtml += "<li class='mui-table-view-divider'>版权信息</li>";
  137. infoHtml += "<li class='mui-table-view-cell'>";
  138. infoHtml += "<span>版权所有</span>";
  139. infoHtml += "<span>" + info.author + "</span>";
  140. infoHtml += "</li>"
  141. infoHtml += "<li class='mui-table-view-cell'>";
  142. infoHtml += "<span>公司网站</span>";
  143. infoHtml += "<span>" + data.developer.url + "</span>";
  144. infoHtml += "</li>"
  145. infoHtml += "<li class='mui-table-view-divider'>技术支持</li>";
  146. infoHtml += "<li class='mui-table-view-cell'>";
  147. infoHtml += "<span>技术支持邮箱</span>";
  148. infoHtml += "<span>" + data.developer.email + "</span>";
  149. infoHtml += "</li>"
  150. infoHtml += "<li class='mui-table-view-cell'>";
  151. infoHtml += "<span>技术支持电话</span>";
  152. infoHtml += "<span>" + data.developer.phone + "</span>";
  153. infoHtml += "</li>"
  154. infoHtml += "<li class='mui-table-view-cell'>";
  155. infoHtml += "<span>办公电话</span>";
  156. infoHtml += "<span>" + data.developer.tel + "</span>";
  157. infoHtml += "</li>"
  158. /* 展示信息 */
  159. $('.mui-table-view').html(infoHtml);
  160. }
  161. </script>