@oxiaom/adoremix-linux-arm 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/index.js +24 -0
  2. package/native/.adoremix-native.json +1 -0
  3. package/native/AdoreMixV8.0.17_console_linuxarm +0 -0
  4. package/native/README.md +20 -0
  5. package/native/audio/libqtaudio_alsa.so +0 -0
  6. package/native/audio/libqtmedia_pulse.so +0 -0
  7. package/native/bearer/libqconnmanbearer.so +0 -0
  8. package/native/bearer/libqgenericbearer.so +0 -0
  9. package/native/bearer/libqnmbearer.so +0 -0
  10. package/native/etc/Demo1.ini +49 -0
  11. package/native/etc/docroot/bangzhu/.project +22 -0
  12. package/native/etc/docroot/bangzhu/css/app.css +21 -0
  13. package/native/etc/docroot/bangzhu/css/feedback.css +131 -0
  14. package/native/etc/docroot/bangzhu/css/icons-extra.css +63 -0
  15. package/native/etc/docroot/bangzhu/css/mui.dtpicker.css +136 -0
  16. package/native/etc/docroot/bangzhu/css/mui.imageviewer.css +123 -0
  17. package/native/etc/docroot/bangzhu/css/mui.indexedlist.css +112 -0
  18. package/native/etc/docroot/bangzhu/css/mui.listpicker.css +95 -0
  19. package/native/etc/docroot/bangzhu/css/mui.min.css +5 -0
  20. package/native/etc/docroot/bangzhu/css/mui.picker.all.css +285 -0
  21. package/native/etc/docroot/bangzhu/css/mui.picker.css +85 -0
  22. package/native/etc/docroot/bangzhu/css/mui.picker.min.css +7 -0
  23. package/native/etc/docroot/bangzhu/css/mui.poppicker.css +64 -0
  24. package/native/etc/docroot/bangzhu/examples/accordion.html +125 -0
  25. package/native/etc/docroot/bangzhu/examples/actionsheet-plus.html +128 -0
  26. package/native/etc/docroot/bangzhu/examples/actionsheet.html +153 -0
  27. package/native/etc/docroot/bangzhu/examples/ad.html +47 -0
  28. package/native/etc/docroot/bangzhu/examples/ajax.html +155 -0
  29. package/native/etc/docroot/bangzhu/examples/badges.html +54 -0
  30. package/native/etc/docroot/bangzhu/examples/beecloud.html +150 -0
  31. package/native/etc/docroot/bangzhu/examples/best-practices/list-to-detail/detail.html +104 -0
  32. package/native/etc/docroot/bangzhu/examples/best-practices/list-to-detail/list-to-detail.css +160 -0
  33. package/native/etc/docroot/bangzhu/examples/best-practices/list-to-detail/listview.html +326 -0
  34. package/native/etc/docroot/bangzhu/examples/best-practices/list-to-detail/vue.min.js +8 -0
  35. package/native/etc/docroot/bangzhu/examples/buttons-with-badges.html +48 -0
  36. package/native/etc/docroot/bangzhu/examples/buttons-with-block.html +50 -0
  37. package/native/etc/docroot/bangzhu/examples/buttons-with-icons.html +68 -0
  38. package/native/etc/docroot/bangzhu/examples/buttons-with-loading.html +86 -0
  39. package/native/etc/docroot/bangzhu/examples/buttons.html +89 -0
  40. package/native/etc/docroot/bangzhu/examples/card.html +97 -0
  41. package/native/etc/docroot/bangzhu/examples/checkbox.html +68 -0
  42. package/native/etc/docroot/bangzhu/examples/clouddb_wilddog.html +268 -0
  43. package/native/etc/docroot/bangzhu/examples/date.html +88 -0
  44. package/native/etc/docroot/bangzhu/examples/dialog.html +82 -0
  45. package/native/etc/docroot/bangzhu/examples/dtpicker.html +129 -0
  46. package/native/etc/docroot/bangzhu/examples/echarts.html +150 -0
  47. package/native/etc/docroot/bangzhu/examples/feedback.html +72 -0
  48. package/native/etc/docroot/bangzhu/examples/grid-default.html +61 -0
  49. package/native/etc/docroot/bangzhu/examples/grid-pagination.html +266 -0
  50. package/native/etc/docroot/bangzhu/examples/guide.html +269 -0
  51. package/native/etc/docroot/bangzhu/examples/icons-extra.html +161 -0
  52. package/native/etc/docroot/bangzhu/examples/icons.html +182 -0
  53. package/native/etc/docroot/bangzhu/examples/im-chat.html +711 -0
  54. package/native/etc/docroot/bangzhu/examples/imageviewer-native.html +90 -0
  55. package/native/etc/docroot/bangzhu/examples/imageviewer.html +197 -0
  56. package/native/etc/docroot/bangzhu/examples/indexed-list-select.html +459 -0
  57. package/native/etc/docroot/bangzhu/examples/indexed-list.html +265 -0
  58. package/native/etc/docroot/bangzhu/examples/info.html +119 -0
  59. package/native/etc/docroot/bangzhu/examples/input.html +108 -0
  60. package/native/etc/docroot/bangzhu/examples/lazyload-image.html +73 -0
  61. package/native/etc/docroot/bangzhu/examples/list-triplex-row.html +115 -0
  62. package/native/etc/docroot/bangzhu/examples/list-with-input.html +91 -0
  63. package/native/etc/docroot/bangzhu/examples/locker-dom.html +85 -0
  64. package/native/etc/docroot/bangzhu/examples/login.html +83 -0
  65. package/native/etc/docroot/bangzhu/examples/media-list.html +220 -0
  66. package/native/etc/docroot/bangzhu/examples/message-bottom.html +87 -0
  67. package/native/etc/docroot/bangzhu/examples/modals.html +45 -0
  68. package/native/etc/docroot/bangzhu/examples/nav-nativeObj.html +45 -0
  69. package/native/etc/docroot/bangzhu/examples/nav.html +135 -0
  70. package/native/etc/docroot/bangzhu/examples/nav_transparent.html +127 -0
  71. package/native/etc/docroot/bangzhu/examples/nav_transparent_native.html +121 -0
  72. package/native/etc/docroot/bangzhu/examples/numbox.html +114 -0
  73. package/native/etc/docroot/bangzhu/examples/offcanvas-drag-down.html +384 -0
  74. package/native/etc/docroot/bangzhu/examples/offcanvas-drag-left-plus-main.html +293 -0
  75. package/native/etc/docroot/bangzhu/examples/offcanvas-drag-left-plus-menu.html +102 -0
  76. package/native/etc/docroot/bangzhu/examples/offcanvas-drag-left.html +228 -0
  77. package/native/etc/docroot/bangzhu/examples/offcanvas-drag-right-plus-main.html +292 -0
  78. package/native/etc/docroot/bangzhu/examples/offcanvas-drag-right-plus-menu.html +111 -0
  79. package/native/etc/docroot/bangzhu/examples/offcanvas-drag-right.html +220 -0
  80. package/native/etc/docroot/bangzhu/examples/pagination.html +236 -0
  81. package/native/etc/docroot/bangzhu/examples/picker.html +159 -0
  82. package/native/etc/docroot/bangzhu/examples/popovers.html +200 -0
  83. package/native/etc/docroot/bangzhu/examples/progressbar.html +171 -0
  84. package/native/etc/docroot/bangzhu/examples/pullrefresh.html +86 -0
  85. package/native/etc/docroot/bangzhu/examples/pullrefresh_main.html +46 -0
  86. package/native/etc/docroot/bangzhu/examples/pullrefresh_sub.html +101 -0
  87. package/native/etc/docroot/bangzhu/examples/pullrefresh_with_tab.html +586 -0
  88. package/native/etc/docroot/bangzhu/examples/radio.html +93 -0
  89. package/native/etc/docroot/bangzhu/examples/range.html +89 -0
  90. package/native/etc/docroot/bangzhu/examples/setting.html +910 -0
  91. package/native/etc/docroot/bangzhu/examples/slider-default.html +98 -0
  92. package/native/etc/docroot/bangzhu/examples/slider-native.html +43 -0
  93. package/native/etc/docroot/bangzhu/examples/slider-table-default.html +62 -0
  94. package/native/etc/docroot/bangzhu/examples/slider-table-pagination.html +74 -0
  95. package/native/etc/docroot/bangzhu/examples/slider-with-title.html +99 -0
  96. package/native/etc/docroot/bangzhu/examples/switches.html +92 -0
  97. package/native/etc/docroot/bangzhu/examples/tab-top-subpage-1.html +131 -0
  98. package/native/etc/docroot/bangzhu/examples/tab-top-subpage-2.html +131 -0
  99. package/native/etc/docroot/bangzhu/examples/tab-top-subpage-3.html +56 -0
  100. package/native/etc/docroot/bangzhu/examples/tab-top-subpage-4.html +110 -0
  101. package/native/etc/docroot/bangzhu/examples/tab-top-subpage-5.html +131 -0
  102. package/native/etc/docroot/bangzhu/examples/tab-top-webview-main.html +183 -0
  103. package/native/etc/docroot/bangzhu/examples/tab-vertical-scroll.html +170 -0
  104. package/native/etc/docroot/bangzhu/examples/tab-webview-main.html +112 -0
  105. package/native/etc/docroot/bangzhu/examples/tab-webview-subpage-about.html +38 -0
  106. package/native/etc/docroot/bangzhu/examples/tab-webview-subpage-chat.html +127 -0
  107. package/native/etc/docroot/bangzhu/examples/tab-webview-subpage-contact.html +155 -0
  108. package/native/etc/docroot/bangzhu/examples/tab-webview-subpage-setting.html +79 -0
  109. package/native/etc/docroot/bangzhu/examples/tab-with-segmented-control-vertical.html +85 -0
  110. package/native/etc/docroot/bangzhu/examples/tab-with-segmented-control.html +195 -0
  111. package/native/etc/docroot/bangzhu/examples/tab-with-viewpagerindicator.html +203 -0
  112. package/native/etc/docroot/bangzhu/examples/tabbar-labels-only.html +44 -0
  113. package/native/etc/docroot/bangzhu/examples/tabbar-with-submenus.html +75 -0
  114. package/native/etc/docroot/bangzhu/examples/tabbar.html +247 -0
  115. package/native/etc/docroot/bangzhu/examples/tableviews-with-badges.html +78 -0
  116. package/native/etc/docroot/bangzhu/examples/tableviews-with-collapses.html +83 -0
  117. package/native/etc/docroot/bangzhu/examples/tableviews-with-swipe.html +184 -0
  118. package/native/etc/docroot/bangzhu/examples/tableviews.html +87 -0
  119. package/native/etc/docroot/bangzhu/examples/typography.html +41 -0
  120. package/native/etc/docroot/bangzhu/fonts/mui-icons-extra.ttf +0 -0
  121. package/native/etc/docroot/bangzhu/fonts/mui.ttf +0 -0
  122. package/native/etc/docroot/bangzhu/images/60x60.gif +0 -0
  123. package/native/etc/docroot/bangzhu/images/cbd.jpg +0 -0
  124. package/native/etc/docroot/bangzhu/images/login-1.png +0 -0
  125. package/native/etc/docroot/bangzhu/images/logo.png +0 -0
  126. package/native/etc/docroot/bangzhu/images/muwu.jpg +0 -0
  127. package/native/etc/docroot/bangzhu/images/qrcode.png +0 -0
  128. package/native/etc/docroot/bangzhu/images/shuijiao.jpg +0 -0
  129. package/native/etc/docroot/bangzhu/images/yuantiao.jpg +0 -0
  130. package/native/etc/docroot/bangzhu/index-menu.html +196 -0
  131. package/native/etc/docroot/bangzhu/index.html +414 -0
  132. package/native/etc/docroot/bangzhu/js/95516.js +32 -0
  133. package/native/etc/docroot/bangzhu/js/arttmpl.js +2 -0
  134. package/native/etc/docroot/bangzhu/js/beecloud.js +141 -0
  135. package/native/etc/docroot/bangzhu/js/city.data-3.js +11548 -0
  136. package/native/etc/docroot/bangzhu/js/city.data.js +1605 -0
  137. package/native/etc/docroot/bangzhu/js/feedback.js +234 -0
  138. package/native/etc/docroot/bangzhu/js/mui.dtpicker.js +471 -0
  139. package/native/etc/docroot/bangzhu/js/mui.imageViewer.js +268 -0
  140. package/native/etc/docroot/bangzhu/js/mui.indexedlist.js +187 -0
  141. package/native/etc/docroot/bangzhu/js/mui.js +8390 -0
  142. package/native/etc/docroot/bangzhu/js/mui.lazyload.img.js +116 -0
  143. package/native/etc/docroot/bangzhu/js/mui.lazyload.js +327 -0
  144. package/native/etc/docroot/bangzhu/js/mui.listpicker.js +399 -0
  145. package/native/etc/docroot/bangzhu/js/mui.locker.js +303 -0
  146. package/native/etc/docroot/bangzhu/js/mui.min.js +6 -0
  147. package/native/etc/docroot/bangzhu/js/mui.picker.all.js +1018 -0
  148. package/native/etc/docroot/bangzhu/js/mui.picker.js +389 -0
  149. package/native/etc/docroot/bangzhu/js/mui.picker.min.js +7 -0
  150. package/native/etc/docroot/bangzhu/js/mui.poppicker.js +160 -0
  151. package/native/etc/docroot/bangzhu/js/mui.previewimage.js +382 -0
  152. package/native/etc/docroot/bangzhu/js/mui.pullToRefresh.js +407 -0
  153. package/native/etc/docroot/bangzhu/js/mui.pullToRefresh.material.js +352 -0
  154. package/native/etc/docroot/bangzhu/js/mui.view.js +628 -0
  155. package/native/etc/docroot/bangzhu/js/mui.zoom.js +322 -0
  156. package/native/etc/docroot/bangzhu/js/update.js +45 -0
  157. package/native/etc/docroot/bangzhu/js/webviewGroup.js +286 -0
  158. package/native/etc/docroot/bangzhu/libs/echarts-all.js +35 -0
  159. package/native/etc/docroot/bangzhu/manifest.json +994 -0
  160. package/native/etc/docroot/index.html +1 -0
  161. package/native/etc/docroot/luyin2/index.html +145 -0
  162. package/native/etc/docroot/luyin2/js/jquery-1.10.1.min.js +6 -0
  163. package/native/etc/docroot/luyin2/js/jquery-1.5.min.js +16 -0
  164. package/native/etc/docroot/luyin2/js/jquery.js +18 -0
  165. package/native/etc/docroot/luyin2/js/jquery.multiselect.js +104 -0
  166. package/native/etc/docroot/luyin2/js/lame.min.js +308 -0
  167. package/native/etc/docroot/luyin2/js/recordmp3.js +239 -0
  168. package/native/etc/docroot/luyin2/js/worker-realtime.js +106 -0
  169. package/native/etc/docroot/luyin2//346/223/215/344/275/234/346/214/207/345/215/227.txt +3 -0
  170. package/native/etc/docroot/static/css/app.8421a6d597ba48619941ccd4e386fbb2.css +675 -0
  171. package/native/etc/docroot/static/css/app.8421a6d597ba48619941ccd4e386fbb2.css.map +1 -0
  172. package/native/etc/docroot/static/fonts/element-icons.535877f.woff +0 -0
  173. package/native/etc/docroot/static/fonts/element-icons.732389d.ttf +0 -0
  174. package/native/etc/docroot/static/img/login_bg.ad6b482.jpg +0 -0
  175. package/native/etc/docroot/static/js/app.eff1c2200a448936b027.js +2 -0
  176. package/native/etc/docroot/static/js/app.eff1c2200a448936b027.js.map +1 -0
  177. package/native/etc/docroot/static/js/manifest.400eada2d24447a4fc30.js +2 -0
  178. package/native/etc/docroot/static/js/manifest.400eada2d24447a4fc30.js.map +1 -0
  179. package/native/etc/docroot/static/js/vendor.ca4f735ec1dfe336a804.js +45 -0
  180. package/native/etc/docroot/static/js/vendor.ca4f735ec1dfe336a804.js.map +1 -0
  181. package/native/etc/docroot/tts.js +151 -0
  182. package/native/etc/docroot/xcx/Discover.html +156 -0
  183. package/native/etc/docroot/xcx/css/mui.css +5649 -0
  184. package/native/etc/docroot/xcx/css/mui.min.css +5 -0
  185. package/native/etc/docroot/xcx/devicelist.html +659 -0
  186. package/native/etc/docroot/xcx/fonts/mui.ttf +0 -0
  187. package/native/etc/docroot/xcx/index.html +75 -0
  188. package/native/etc/docroot/xcx/index.js +1 -0
  189. package/native/etc/docroot/xcx/js/axios.min.js +3 -0
  190. package/native/etc/docroot/xcx/js/axios.min.map +1 -0
  191. package/native/etc/docroot/xcx/js/js.cookie.js +8 -0
  192. package/native/etc/docroot/xcx/js/mui.js +8390 -0
  193. package/native/etc/docroot/xcx/js/mui.min.js +6 -0
  194. package/native/etc/docroot/xcx/main.html +85 -0
  195. package/native/etc/ssl/README.txt +5 -0
  196. package/native/etc/ssl/ca.crt +21 -0
  197. package/native/etc/ssl/ca.key +27 -0
  198. package/native/etc/ssl/client.crt +20 -0
  199. package/native/etc/ssl/client.key +28 -0
  200. package/native/etc/ssl/client.p12 +0 -0
  201. package/native/etc/ssl/server.crt +20 -0
  202. package/native/etc/ssl/server.key +28 -0
  203. package/native/etc/templates/demo-de.tpl +12 -0
  204. package/native/etc/templates/demo.tpl +12 -0
  205. package/native/etc/ttys/adore03.sql +426 -0
  206. package/native/etc/ttys/adore04.sql +426 -0
  207. package/native/etc/ttys/adore1.sql +859 -0
  208. package/native/etc/ttys/adore_mix22.sql +806 -0
  209. package/native/etc/ttys/sqlite.sql +1140 -0
  210. package/native/etc/ttys/sqlite3main.sql +434 -0
  211. package/native/etc/ttys/sqltest.sql +279 -0
  212. package/native/etc/ttys/tp3sql.sql +1412 -0
  213. package/native/find.js +529 -0
  214. package/native/findsc.js +701 -0
  215. package/native/iconengines/libqsvgicon.so +0 -0
  216. package/native/imageformats/libqgif.so +0 -0
  217. package/native/imageformats/libqico.so +0 -0
  218. package/native/imageformats/libqjpeg.so +0 -0
  219. package/native/imageformats/libqsvg.so +0 -0
  220. package/native/lib/libQt5Concurrent.so.5 +0 -0
  221. package/native/lib/libQt5Core.so.5 +0 -0
  222. package/native/lib/libQt5DBus.so.5 +0 -0
  223. package/native/lib/libQt5Multimedia.so.5 +0 -0
  224. package/native/lib/libQt5MultimediaGstTools.so.5 +0 -0
  225. package/native/lib/libQt5Network.so.5 +0 -0
  226. package/native/lib/libQt5Sql.so.5 +0 -0
  227. package/native/lib/libQt5Svg.so.5 +0 -0
  228. package/native/lib/libQt5WebSockets.so.5 +0 -0
  229. package/native/lib/libQt5Xml.so.5 +0 -0
  230. package/native/lib/libcrypto.so.3 +0 -0
  231. package/native/lib/libgcc_s.so.1 +0 -0
  232. package/native/lib/libmariadb.so.3 +0 -0
  233. package/native/lib/libmp3lame.so.0 +0 -0
  234. package/native/lib/libmp3lame.so.0.0.0 +0 -0
  235. package/native/lib/libopus.so.0 +0 -0
  236. package/native/lib/libopus.so.0.8.0 +0 -0
  237. package/native/lib/libopusfile.so.0 +0 -0
  238. package/native/lib/libopusfile.so.0.4.2 +0 -0
  239. package/native/lib/libopusurl.so.0 +0 -0
  240. package/native/lib/libopusurl.so.0.4.2 +0 -0
  241. package/native/lib/libsqlite3.so.0 +0 -0
  242. package/native/lib/libsqlite3.so.0.8.6 +0 -0
  243. package/native/lib/libssl.so.3 +0 -0
  244. package/native/lib/libstdc++.so.6 +0 -0
  245. package/native/lib/libstdc++.so.6.0.30 +0 -0
  246. package/native/mediaservice/libgstaudiodecoder.so +0 -0
  247. package/native/mediaservice/libgstcamerabin.so +0 -0
  248. package/native/mediaservice/libgstmediacapture.so +0 -0
  249. package/native/mediaservice/libgstmediaplayer.so +0 -0
  250. package/native/platforms/libqeglfs.so +0 -0
  251. package/native/platforms/libqlinuxfb.so +0 -0
  252. package/native/platforms/libqminimal.so +0 -0
  253. package/native/platforms/libqminimalegl.so +0 -0
  254. package/native/platforms/libqoffscreen.so +0 -0
  255. package/native/platforms/libqvnc.so +0 -0
  256. package/native/platforms/libqxcb.so +0 -0
  257. package/native/qt.conf +3 -0
  258. package/native/sqldrivers/libqsqlite.so +0 -0
  259. package/native/sqldrivers/libqsqlmysql.so +0 -0
  260. package/native/sqldrivers/libsqlitecipher.so +0 -0
  261. package/native/tts.js +151 -0
  262. package/package.json +23 -0
@@ -0,0 +1,701 @@
1
+ var request_lc = require('request');
2
+ var mysql = require('mysql');
3
+ var serverHost = "127.0.0.1";
4
+ var __key = 0;
5
+ var __port = 0;
6
+ var net = require('net');
7
+ var connection =null;
8
+ var jsres={"res":false,"info":"ubs"};
9
+ var stdin = process.openStdin();
10
+ var request=null;
11
+ var countnow = 0;
12
+ var client = new net.Socket();
13
+ var action = "";
14
+ stdin.on('data', function(chunk){
15
+ var jsonstr = JSON.parse(chunk);
16
+ var actionar = jsonstr.__path.split("/");
17
+ var action_ = actionar[actionar.length-1];
18
+ action = action_;
19
+ request = jsonstr;
20
+ if(jsonstr.sqlme.sqlmedbk == 1){
21
+ connection = mysql.createConnection({
22
+ host : jsonstr.sqlme.sqlmeip,
23
+ user : jsonstr.sqlme.sqlmeusername,
24
+ port : jsonstr.sqlme.sqlmeport,
25
+ password : jsonstr.sqlme.sqlmepasswd,
26
+ database : jsonstr.sqlme.sqlmebasename
27
+ });
28
+ connection.connect();
29
+ }else if(jsonstr.sqlme.sqlmedbk == 0){
30
+
31
+ }
32
+ __port = jsonstr.__port;
33
+ __key = jsonstr.__key;
34
+ client.connect(__port, serverHost, function()
35
+ {
36
+ var data_ ="";
37
+ client.write( __key.toString()) ;
38
+ client.on("data",function(data){
39
+ data_ = data_ + data;
40
+
41
+ });
42
+ client.on("end",function(){
43
+
44
+ var json_pd = JSON.parse(data_);
45
+ request = json_pd;
46
+ self_route();
47
+ });
48
+ });
49
+ });
50
+ function self_route(){
51
+ if(action == "getfinder"){
52
+ endexit();
53
+ console.log(JSON.stringify(jsres));
54
+ }else if(action == "getusersinfo"){
55
+ getusersinfo();
56
+ }else if(action == "getusersdevice"){
57
+ getusersdevice();
58
+ }else if(action == "changeuserdevicemode"){
59
+ changeuserdevicemode();
60
+ }else if(action == "getwplantlist"){
61
+ getwplantlist();
62
+ }else if(action == "rmwplant"){
63
+ rmwplant();
64
+ }else if(action == "wplantadd"){ //wpdevicehistory
65
+ wplantadd();
66
+ }else if(action == "wpdevicehistory"){ //wpdevicehistory
67
+ wpdevicehistory();
68
+ }else if(action == "wfilelistrg"){ //wpdevicehistory
69
+ wfilelistrg();
70
+ }else if(action == "addziuser"){ //wpdevicehistory //listziuser
71
+ addziuser();
72
+ }else if(action == "listziuser"){ //listzrdevs
73
+ listziuser();
74
+ }else if(action == "listzrdevs"){ //getusersdevice
75
+ listzrdevs();
76
+ }else if(action == "listmydevice"){ //getusersdevice
77
+ listmydevice();
78
+ }else if(action == "changezidevices"){ //getusersdevice
79
+ changezidevices();
80
+ }else if(action == "changezimask"){ //getusersdevice
81
+ changezimask();
82
+ }else if(action == "gtoken"){ //getusersdevice
83
+ gtoken();
84
+ }else if(action == "getswapinfo"){ //getusersdevice
85
+ getswapinfo();
86
+ }else if(action == "ffffmyinfo"){ //newnickname
87
+ myinfo();
88
+ }else if(action == "newnickname"){ //newnickname
89
+ newnickname();
90
+ }else if(action == "newpasswdnick"){ //save_user_yinsixieyi
91
+ newpasswdnick();
92
+ }else if(action == "save_user_yinsixieyi"){ //save_user_yinsixieyi
93
+
94
+ save_user_yinsixieyi();
95
+ }else if(action == "get_user_yinsixieyi"){ //save_user_yinsixieyi
96
+ get_user_yinsixieyi();
97
+ }else if(action == "getonegdevs"){ //save_user_yinsixieyi
98
+ getonegdevs();
99
+ }else if(action == "create_lc_sbuser"){ //save_user_yinsixieyi
100
+ create_lc_sbuser();
101
+ }else if(action == "test"){ //save_user_yinsixieyi
102
+ test();
103
+ }else{
104
+ endexit();
105
+ }
106
+ }
107
+
108
+
109
+ function getTime(){
110
+ var timestamp = Math.round(new Date().getTime()/1000);
111
+ return timestamp;
112
+ }
113
+ //129.211.117.94:12080/user/listplant
114
+ function calcSign(timestamp,nonce,appSecret){
115
+ var str = "time:" + timestamp+",nonce:" + nonce +",appSecret:" + appSecret;
116
+ var sign = CryptoJS.MD5( str).toString();
117
+ return sign;
118
+ }
119
+
120
+ function create_lc_sbuser(){
121
+
122
+ var timestamp = getTime();
123
+ var nonce =Math.random().toString(36).substr(2);
124
+
125
+ var appSecret = pm.environment.get("appSecret");
126
+ var sign = calcSign(timestamp,nonce,appSecret);
127
+
128
+ var id=Math.floor(Math.random() * (50 - 1 + 1) + 1);
129
+
130
+ var options = {
131
+ 'method': 'POST',
132
+ 'url': 'https://openapi.lechange.cn:443/openapi/accessToken',
133
+ 'headers': {
134
+ 'Content-Type': 'application/json'
135
+ },
136
+ body: JSON.stringify({
137
+ "system": {
138
+ "ver": "1.0",
139
+ "sign": sign,
140
+ "appId": request.appId,
141
+ "time": timestamp,
142
+ "nonce": nonce
143
+ },
144
+ "params": {
145
+ "token": request.token,
146
+ "account": request.account
147
+ },
148
+ "id":id
149
+ })
150
+
151
+ };
152
+
153
+ request_lc(options, function (error, response) {
154
+ if (error) throw new Error(error);
155
+ console.log(response.body);
156
+ endexit();
157
+ });
158
+ console.log("============>");
159
+ endexit();
160
+
161
+ }
162
+ //getonegdevs
163
+ // sqline = "SELECT sbox_device_info.* FROM group_seed,sbox_device_info where sbox_device_info.id = group_seed.devid and group_seed.userid = '@userid' and group_seed.gid = '@gid' ;";
164
+ function getonegdevs(){
165
+ var dev_info_S=[];
166
+ var dev_info=[];
167
+ var sqline = "SELECT sbox_device_info.* FROM group_seed,sbox_device_info where sbox_device_info.id = group_seed.devid and group_seed.userid = '@userid' and group_seed.gid = '@gid' ;";
168
+
169
+ sqline = sqline.replace("@gid",request.gid);
170
+ sqline = sqline.replace("@token",request.token);
171
+ sqline = sqline.replace("@userid",request.id);
172
+
173
+ connection.query(sqline,function(error, results, fields){
174
+ if(error != null ){
175
+ jsres['res'] = false;
176
+ jsres['info'] = error;
177
+ }else{
178
+ for(var line in results){
179
+ dev_info_S.push(results[line].device_seed);
180
+ };
181
+ }
182
+ jsres["dev_info_S"] = dev_info_S;
183
+ sqline = "SELECT * FROM sbox_device_info where user_id = '@userid' ;";
184
+ sqline = sqline.replace("@userid",request.id);
185
+ connection.query(sqline,function(error, results, fields){
186
+ if(error != null ){
187
+ jsres['res'] = false;
188
+ jsres['info'] = error;
189
+ }else{
190
+ jsres['res'] = true;
191
+ for(var line in results){
192
+ var objs={};
193
+ objs.key = results[line].device_seed ;
194
+ objs.label = new Buffer( results[line].device_name , 'base64').toString();
195
+ objs.id = results[line].id ;
196
+ dev_info.push(objs);
197
+ };
198
+ }
199
+ jsres["dev_info"] = dev_info;
200
+ console.log( JSON.stringify(jsres) );
201
+ endexit();
202
+ });
203
+
204
+ });
205
+ }
206
+
207
+ function test(){
208
+ console.log( JSON.stringify(request));
209
+ endexit();
210
+ }
211
+
212
+ function save_user_yinsixieyi(){
213
+ var sqline = "UPDATE `xieyi_mod` SET `xieyi` = '@xieyi' WHERE (`id` = '1'); ";
214
+ sqline = sqline.replace("@xieyi",request.xieyi);
215
+ connection.query(sqline,function(error, results, fields){
216
+ if(error != null ){
217
+ jsres['res'] = false;
218
+ jsres['info'] = error;
219
+ }else{
220
+ jsres['res'] = true;
221
+ jsres['info'] = error;
222
+ }
223
+ console.log( JSON.stringify(jsres) );
224
+ endexit();
225
+ });
226
+ }
227
+
228
+ function get_user_yinsixieyi(){
229
+ //SELECT * FROM xieyi_mod where id = 1 ;
230
+ var sqline = "SELECT * FROM xieyi_mod where id = 1 ;";
231
+
232
+ connection.query(sqline,function(error, results, fields){
233
+ if(error != null ){
234
+ jsres['res'] = false;
235
+ jsres['info'] = error;
236
+ }else{
237
+ jsres['res'] = true;
238
+ jsres['info'] = error;
239
+ jsres['data'] = results[0];
240
+ }
241
+ console.log( JSON.stringify(jsres) );
242
+ endexit();
243
+ });
244
+ }
245
+ function newpasswdnick(){
246
+ var sqline = "UPDATE `sbox_users` SET `user_pass` = '@user_pass' WHERE ( `id` = '@userid' and `token` = '@token' );";
247
+ sqline = sqline.replace("@userid",request.id);
248
+ sqline = sqline.replace("@token",request.token);
249
+ sqline = sqline.replace("@user_pass",request.newpass);
250
+
251
+ connection.query(sqline,function(error, results, fields){
252
+ if(error != null ){
253
+ jsres['res'] = false;
254
+ jsres['info'] = error;
255
+ }else{
256
+ jsres['res'] = true;
257
+ jsres['info'] = error;
258
+ }
259
+ console.log( JSON.stringify(jsres) );
260
+ endexit();
261
+ });
262
+ }
263
+
264
+ function newnickname(){
265
+ var sqline = "UPDATE `sbox_users` SET `nickname` = '@nickname' WHERE ( `id` = '@userid' and `token` = '@token' );";
266
+ sqline = sqline.replace("@userid",request.id);
267
+ sqline = sqline.replace("@token",request.token);
268
+ sqline = sqline.replace("@nickname",request.nickname);
269
+
270
+ connection.query(sqline,function(error, results, fields){
271
+ if(error != null ){
272
+ jsres['res'] = false;
273
+ jsres['info'] = error;
274
+
275
+ }else{
276
+ jsres['res'] = true;
277
+ jsres['info'] = error;
278
+ jsres['nickname'] = request.nickname;
279
+ }
280
+ console.log( JSON.stringify(jsres) );
281
+ endexit();
282
+ });
283
+
284
+ }
285
+ function myinfo(){
286
+ var sqline = "SELECT * FROM sbox_users where ( `id` = '@userid' and `token` = '@token' );";
287
+
288
+ sqline = sqline.replace("@userid",request.id);
289
+ sqline = sqline.replace("@token",request.token);
290
+ connection.query(sqline,function(error, results, fields){
291
+ if(error != null ){
292
+ jsres['res'] = false;
293
+ jsres['info'] = error;
294
+
295
+ }else{
296
+ jsres['res'] = true;
297
+ jsres['info'] = error;
298
+ jsres['data'] = results[0];
299
+ }
300
+ console.log( JSON.stringify(jsres) );
301
+ endexit();
302
+ });
303
+ }
304
+ function getswapinfo(){
305
+ var sqline = "SELECT * FROM swap_info;";
306
+ connection.query(sqline,function(error, results, fields){
307
+ if(error != null ){
308
+ jsres['res'] = false;
309
+ jsres['info'] = error;
310
+
311
+ }else{
312
+ jsres['res'] = true;
313
+ jsres['info'] = error;
314
+ jsres['data'] = results;
315
+ }
316
+ console.log( JSON.stringify(jsres) );
317
+ endexit();
318
+ });
319
+ }
320
+ function gtoken(){
321
+ var sqline = "SELECT * FROM sbox_users where ( `user_name` = '@user_name' and `user_pass` = '@user_pass' );";
322
+ sqline = sqline.replace("@user_name",request.username);
323
+ sqline = sqline.replace("@user_pass",request.passwd);
324
+ connection.query(sqline,function(error, results, fields){
325
+ if(error != null ){
326
+ jsres['res'] = false;
327
+ jsres['info'] = error;
328
+
329
+ }else{
330
+ jsres['res'] = true;
331
+ jsres['info'] = error;
332
+ jsres['data'] = results[0];
333
+ }
334
+ console.log( JSON.stringify(jsres) );
335
+ endexit();
336
+ });
337
+ }
338
+ function insertStr(source, start, newStr) {
339
+ return source.slice(0, start) + newStr + source.slice(start+1)
340
+ }
341
+ function changezimask(){
342
+ var zuserid = request.userid;
343
+ var zdex = request.zdex;
344
+ var zcase = request.zcase;
345
+ jsres['zcase'] = zcase ;
346
+ jsres['zdex'] = zdex ;
347
+ var sqline = "SELECT * FROM sbox_users where id = '@zuserid';";
348
+ sqline = sqline.replace("@zuserid",zuserid);
349
+ connection.query(sqline,function(error, results, fields){
350
+ if(error != null ){
351
+ jsres['res'] = false;
352
+ jsres['res1'] = false;
353
+ jsres['info'] = error;
354
+ }else{
355
+ jsres['res'] = true;
356
+ jsres['results'] = results;
357
+ if(results.length == 1){
358
+ var endmask = "";
359
+ jsres['endmask'] = results[0].mask;
360
+ if(zcase == "false"){
361
+ endmask= insertStr(results[0].mask,parseInt(zdex),"0");
362
+ }else{
363
+ endmask= insertStr(results[0].mask,parseInt(zdex),"1");
364
+
365
+ }
366
+ sqline = "UPDATE `sbox_users` SET `mask` = '@mask' WHERE (`id` = '@zuserid');";
367
+ sqline = sqline.replace("@zuserid",zuserid);
368
+ sqline = sqline.replace("@mask",endmask);
369
+ jsres['endmask'] = endmask;
370
+ connection.query(sqline,function(error, results, fields){
371
+ if(error != null ){
372
+ jsres['res1'] = false;
373
+ jsres['info'] = error;
374
+
375
+ }else{
376
+ jsres['res1'] = true;
377
+ jsres['info'] = error;
378
+ jsres['endmask'] = endmask;
379
+ }
380
+ console.log( JSON.stringify(jsres) );
381
+ endexit();
382
+ });
383
+
384
+ }else{
385
+ jsres['info'] = error;
386
+ console.log( JSON.stringify(jsres) );
387
+ endexit();
388
+ }
389
+ }
390
+ console.log( JSON.stringify(jsres) );
391
+ endexit();
392
+ });
393
+
394
+
395
+ }
396
+ function changezidevices(){
397
+ //console.log(request);
398
+ if(request.pus_idstr != "null"){
399
+ var sqline = "call pus_str( '@idS' , @masterid, @zid );";
400
+ sqline = sqline.replace("@idS" ,request.pus_idstr);
401
+ sqline = sqline.replace("@masterid" ,request.id);
402
+ sqline = sqline.replace("@zid" ,request.gid);
403
+ connection.query(sqline,function(error, results, fields){
404
+ if(error != null ){
405
+ jsres['res'] = false;
406
+ jsres['sqline'] = sqline;
407
+ jsres['info'] = error;
408
+ //changezidevices();
409
+ }else{
410
+ jsres['res'] = true;
411
+ jsres['info'] = error;
412
+ }
413
+ if(request.dis_idstr != "null" ){
414
+ sqline = "call dis_str('@idS',@zid);";
415
+ sqline = sqline.replace("@idS" ,request.dis_idstr);
416
+ sqline = sqline.replace("@zid" ,request.gid);
417
+ connection.query(sqline,function(error, results, fields){
418
+ if(error != null ){
419
+ jsres['res'] = false;
420
+ jsres['info'] = error;
421
+ }else{
422
+ jsres['res'] = true;
423
+ jsres['info'] = error;
424
+ }
425
+ console.log( JSON.stringify(jsres) );
426
+ endexit();
427
+ });
428
+ }else{
429
+ console.log( JSON.stringify(jsres) );
430
+ endexit();
431
+ }
432
+ });
433
+
434
+ }else if(request.dis_idstr != "null" ){
435
+ jsres['pus_idstr'] = "null";
436
+ var sqline = "call dis_str('@idS',@zid);";
437
+ sqline = sqline.replace("@idS" ,request.dis_idstr);
438
+ sqline = sqline.replace("@zid" ,request.gid);
439
+ //console.log(sqline);
440
+ connection.query(sqline,function(error, results, fields){
441
+ if(error != null ){
442
+ jsres['res'] = false;
443
+ jsres['info'] = error;
444
+ }else{
445
+ jsres['res'] = true;
446
+ jsres['info'] = error;
447
+ }
448
+ console.log( JSON.stringify(jsres) );
449
+ endexit();
450
+ });
451
+
452
+ }else{
453
+ jsres['pus_idstr'] = "null";
454
+ jsres['dis_idstr'] = "null";
455
+ console.log( JSON.stringify(jsres) );
456
+ endexit();
457
+ }
458
+
459
+ }
460
+ function listmydevice(){
461
+ var sqline = "SELECT * FROM sbox_device_info where (`user_id` = '@user_id');";
462
+ sqline = sqline.replace("@user_id",request.id);
463
+ connection.query(sqline,function(error, results, fields){
464
+ if(error != null ){
465
+ jsres['res'] = false;
466
+ jsres['info'] = error;
467
+ console.log( JSON.stringify(jsres) );
468
+ endexit();
469
+ }
470
+ jsres['res']=true;
471
+ jsres['results']=results;
472
+ for(var line in results){
473
+ jsres['results'][line].devname = new Buffer( results[line].device_name , 'base64').toString();
474
+ };
475
+ //jsres['sqline']=sqline;
476
+ console.log( JSON.stringify(jsres) );
477
+ endexit();
478
+ });
479
+ }
480
+
481
+ function listzrdevs(){
482
+ var sqline = "SELECT * FROM sbox_device_info where (`user_id` = '@user_id');";
483
+ sqline = sqline.replace("@user_id",request.ziid);
484
+ connection.query(sqline,function(error, results, fields){
485
+ if(error != null ){
486
+ jsres['res'] = false;
487
+ jsres['info'] = error;
488
+ console.log( JSON.stringify(jsres) );
489
+ endexit();
490
+ }
491
+ jsres['res']=true;
492
+ jsres['sqline']=sqline;
493
+ jsres['results']=results;
494
+ console.log( JSON.stringify(jsres) );
495
+ endexit();
496
+ });
497
+ }
498
+
499
+ function listziuser(){
500
+ var sqline = "select * from `sbox_users` where `master_id` = '@master_id' ;";
501
+ sqline = sqline.replace("@master_id",request.id);
502
+ connection.query(sqline,function(error, results, fields){
503
+ if(error != null ){
504
+ jsres['res'] = false;
505
+ jsres['info'] = error;
506
+ console.log( JSON.stringify(jsres) );
507
+ endexit();
508
+ }
509
+ jsres['res']=true;
510
+ jsres['results']=results;
511
+ console.log( JSON.stringify(jsres) );
512
+ endexit();
513
+ });
514
+ }
515
+
516
+ function addziuser(){
517
+ var sqline = "INSERT INTO `sbox_users` (`user_name`, `user_pass`, `master_id`, `mask`, `beizhu` , `token`, `nickname`) VALUES ('@user_name', '@user_pass', '@master_id', '@mask', '@beizhu' , '@token', '@nickname');";
518
+ sqline = sqline.replace("@user_name",request.ziusername);
519
+ sqline = sqline.replace("@user_pass",request.zipasswd);
520
+ sqline = sqline.replace("@master_id",request.id);
521
+ sqline = sqline.replace("@mask",request.mask);
522
+ sqline = sqline.replace("@beizhu",request.beizhu );
523
+ sqline = sqline.replace("@token",request.token );
524
+ sqline = sqline.replace("@nickname",request.nickname );
525
+ connection.query(sqline,function(error, results, fields){
526
+ if(error != null ){
527
+ jsres['res'] = false;
528
+ jsres['info'] = error;
529
+ console.log( JSON.stringify(jsres) );
530
+ endexit();
531
+ }
532
+ jsres['res']=true;
533
+ jsres['results']=results;
534
+ console.log( JSON.stringify(jsres) );
535
+ endexit();
536
+ });
537
+ }
538
+
539
+ function wfilelistrg(){
540
+ var sqline = "select * from `warregister` where `userid` = '@userid' ;";
541
+ sqline = sqline.replace("@userid",request.id);
542
+ connection.query(sqline,function(error, results, fields){
543
+ if(error != null ){
544
+ jsres['res'] = false;
545
+ jsres['info'] = error;
546
+ console.log( JSON.stringify(jsres) );
547
+ endexit();
548
+ }
549
+ jsres['res']=true;
550
+ jsres['results']=results;
551
+ console.log( JSON.stringify(jsres) );
552
+ endexit();
553
+ });
554
+ };
555
+ function wpdevicehistory(){
556
+ var sqline = "SELECT * FROM sbox_device_info where (`user_id` = '@user_id' and `iswarning` = '99');";
557
+ sqline = sqline.replace("@user_id",request.id);
558
+ connection.query(sqline,function(error, results, fields){
559
+ if(error != null ){
560
+ jsres['res'] = false;
561
+ jsres['info'] = error;
562
+ console.log( JSON.stringify(jsres) );
563
+ endexit();
564
+ }
565
+ jsres['res'] = true;
566
+ jsres['results'] = results;
567
+ for(var line in results){
568
+ jsres['results'][line].devname = new Buffer( results[line].device_name , 'base64').toString();
569
+ };
570
+ console.log( JSON.stringify(jsres) );
571
+ endexit();
572
+ });
573
+ };
574
+ function wplantadd(){
575
+ var sqline = "INSERT INTO `warningplant` (`snids`,`url`, `name`, `userid`) VALUES ('@snids','@url','@name','@userid')";
576
+ sqline = sqline.replace("@snids",request.snlist);
577
+ sqline = sqline.replace("@url",request.url);
578
+ sqline = sqline.replace("@name",request.plantname);
579
+ sqline = sqline.replace("@userid",request.id);
580
+ connection.query(sqline,function(error, results, fields){
581
+ if(error != null ){
582
+ jsres['res'] = false;
583
+ jsres['info'] = error;
584
+ console.log( JSON.stringify(jsres) );
585
+ endexit();
586
+ }
587
+
588
+ jsres['res'] = true;
589
+ console.log( JSON.stringify(jsres) );
590
+ endexit();
591
+ });
592
+ };
593
+ function rmwplant(){
594
+ var sqline = "DELETE FROM `warningplant` WHERE (`id` = '@id' and userid = '@userid') ;";
595
+ sqline = sqline.replace("@userid",request.id);
596
+ sqline = sqline.replace("@id",request.pltid);
597
+ connection.query(sqline,function(error, results, fields){
598
+ if(error != null ){
599
+ jsres['res'] = false;
600
+ jsres['info'] = error;
601
+ console.log( JSON.stringify(jsres) );
602
+ endexit();
603
+ }
604
+ jsres['res'] = true;
605
+ console.log( JSON.stringify(jsres) );
606
+ endexit();
607
+ });
608
+ };
609
+ function getwplantlist(){
610
+ var sqline = " SELECT * FROM warningplant WHERE (`userid` = '@userid' );";
611
+ sqline = sqline.replace("@userid",request.id);
612
+ connection.query(sqline,function(error, results, fields){
613
+ if(error != null ){
614
+ jsres['res'] = false;
615
+ jsres['info'] = error;
616
+ console.log( JSON.stringify(jsres) );
617
+ endexit();
618
+ }
619
+ jsres['res'] = true;
620
+ jsres['results'] = results;
621
+
622
+ for(var line in results){
623
+ var snids = results[line].snids;
624
+ var snidlist = snids.split("|");
625
+ jsres['results'][line].sncount = snidlist.length;
626
+ };
627
+
628
+ console.log( JSON.stringify(jsres) );
629
+ endexit();
630
+ });
631
+ };
632
+ function changeuserdevicemode(){
633
+ var sqline = "UPDATE `sbox_device_info` SET `iswarning` = '@iswarning' ,`kind` = '@kind' ,`device_type` = '@device_type' \
634
+ WHERE (`user_id` = '@userid' and `id` = '@deviceid' );";
635
+ sqline = sqline.replace("@userid",request.userid);
636
+ sqline = sqline.replace("@iswarning",request.iswarning);
637
+ sqline = sqline.replace("@device_type",request.device_type);
638
+ sqline = sqline.replace("@kind",request.kind);
639
+ sqline = sqline.replace("@deviceid",request.deviceid);
640
+ connection.query(sqline,function(error, results, fields){
641
+ if(error != null ){
642
+ jsres['res'] = false;
643
+ jsres['info'] = error;
644
+ console.log( JSON.stringify(jsres) );
645
+ endexit();
646
+ }
647
+ jsres['res'] = true;
648
+ jsres['efrow'] = results.affectedRows;
649
+ console.log( JSON.stringify(jsres) );
650
+ endexit();
651
+ });
652
+ };
653
+ function getusersdevice(){
654
+ var sqline = 'SELECT * FROM sbox_device_info where user_id = \'@userid\';';
655
+ sqline = sqline.replace("@userid",request.userid);
656
+ connection.query(sqline,function(error, results, fields){
657
+ if(error != null ){
658
+ endexit();
659
+ }
660
+ jsres['data'] = results;
661
+ jsres['res'] = true;
662
+ console.log(JSON.stringify(jsres));
663
+ endexit();
664
+ });
665
+ };
666
+ function getusersinfo(){
667
+ connection.query("SELECT * FROM sbox_users;",function(error, results, fields){
668
+
669
+ if(error != null ){
670
+ endexit();
671
+ }
672
+ var obary = [];
673
+ for(var line in results){
674
+ var obj = {};
675
+ obj.id = results[line].id;
676
+ obj.user_name = results[line].user_name;
677
+ obj.master_id = results[line].master_id;
678
+ obj.ctime = results[line].ctime;
679
+ obj.nickname = results[line].nickname;
680
+ obj.user_level = results[line].user_level;
681
+ obj.user_type = results[line].user_type;
682
+ obj.status = results[line].status;
683
+ obj.token = results[line].token;
684
+ obj.qianfei = results[line].qianfei;
685
+ obj.cdnpath = results[line].cdnpath;
686
+ obj.jiankong = results[line].jiankong;
687
+ obj.mask = results[line].mask;
688
+ obary.push(obj);
689
+ };
690
+ jsres['data'] = obary;
691
+ jsres['res'] = true;
692
+ console.log(JSON.stringify(jsres));
693
+ endexit();
694
+ });
695
+ }
696
+ function endexit(){
697
+ if(jsonstr.sqlme.sqlmedbk == 1){
698
+ connection.end();
699
+ }
700
+ process.exit();
701
+ }
Binary file
Binary file
Binary file
Binary file
Binary file