Ver código fonte

图片提交

fanghuisheng 4 semanas atrás
pai
commit
37dc269c38
57 arquivos alterados com 152 adições e 0 exclusões
  1. 152 0
      unpackage/config/setting.js
  2. BIN
      unpackage/res/icons-xunJian/1024x1024.png
  3. BIN
      unpackage/res/icons-xunJian/120x120.png
  4. BIN
      unpackage/res/icons-xunJian/144x144.png
  5. BIN
      unpackage/res/icons-xunJian/152x152.png
  6. BIN
      unpackage/res/icons-xunJian/167x167.png
  7. BIN
      unpackage/res/icons-xunJian/180x180.png
  8. BIN
      unpackage/res/icons-xunJian/192x192.png
  9. BIN
      unpackage/res/icons-xunJian/20x20.png
  10. BIN
      unpackage/res/icons-xunJian/29x29.png
  11. BIN
      unpackage/res/icons-xunJian/40x40.png
  12. BIN
      unpackage/res/icons-xunJian/58x58.png
  13. BIN
      unpackage/res/icons-xunJian/60x60.png
  14. BIN
      unpackage/res/icons-xunJian/72x72.png
  15. BIN
      unpackage/res/icons-xunJian/76x76.png
  16. BIN
      unpackage/res/icons-xunJian/80x80.png
  17. BIN
      unpackage/res/icons-xunJian/87x87.png
  18. BIN
      unpackage/res/icons-xunJian/96x96.png
  19. BIN
      unpackage/res/icons/1024x1024.png
  20. BIN
      unpackage/res/icons/120x120.png
  21. BIN
      unpackage/res/icons/144x144.png
  22. BIN
      unpackage/res/icons/152x152.png
  23. BIN
      unpackage/res/icons/167x167.png
  24. BIN
      unpackage/res/icons/180x180.png
  25. BIN
      unpackage/res/icons/192x192.png
  26. BIN
      unpackage/res/icons/20x20.png
  27. BIN
      unpackage/res/icons/29x29.png
  28. BIN
      unpackage/res/icons/40x40.png
  29. BIN
      unpackage/res/icons/58x58.png
  30. BIN
      unpackage/res/icons/60x60.png
  31. BIN
      unpackage/res/icons/72x72.png
  32. BIN
      unpackage/res/icons/76x76.png
  33. BIN
      unpackage/res/icons/80x80.png
  34. BIN
      unpackage/res/icons/87x87.png
  35. BIN
      unpackage/res/icons/96x96.png
  36. BIN
      unpackage/res/push-xunJian/1024x1024.png
  37. BIN
      unpackage/res/push-xunJian/120x120.png
  38. BIN
      unpackage/res/push-xunJian/144x144.png
  39. BIN
      unpackage/res/push-xunJian/152x152.png
  40. BIN
      unpackage/res/push-xunJian/167x167.png
  41. BIN
      unpackage/res/push-xunJian/180x180.png
  42. BIN
      unpackage/res/push-xunJian/192x192.png
  43. BIN
      unpackage/res/push-xunJian/20x20.png
  44. BIN
      unpackage/res/push-xunJian/29x29.png
  45. BIN
      unpackage/res/push-xunJian/40x40.png
  46. BIN
      unpackage/res/push-xunJian/58x58.png
  47. BIN
      unpackage/res/push-xunJian/60x60.png
  48. BIN
      unpackage/res/push-xunJian/72x72.png
  49. BIN
      unpackage/res/push-xunJian/76x76.png
  50. BIN
      unpackage/res/push-xunJian/80x80.png
  51. BIN
      unpackage/res/push-xunJian/87x87.png
  52. BIN
      unpackage/res/push-xunJian/96x96.png
  53. BIN
      unpackage/res/push/18x18.png
  54. BIN
      unpackage/res/push/24x24.png
  55. BIN
      unpackage/res/push/36x36.png
  56. BIN
      unpackage/res/push/48x48.png
  57. BIN
      unpackage/res/push/72x72.png

+ 152 - 0
unpackage/config/setting.js

@@ -0,0 +1,152 @@
+const fs = require('fs');
+
+const args = process.argv.slice(2)[0];
+const filesToModify = ['./src/manifest.json', './src/pages.json'];
+filesToModify.forEach((file) => {
+    fs.readFile(file, 'utf8', function (err, data) {
+        if (err) throw err;
+        let cleanedData = data.replace(/\/\/.*|\/\*[\s\S]*?\*\//g, '');// 使用正则表达式去除单行注释
+        let state = JSON.parse(cleanedData);// 解析JSON数据
+
+        if (file == './src/manifest.json') {
+            var maps = state["app-plus"].distribute.sdkConfigs.maps
+            var geolocation = state["app-plus"].distribute.sdkConfigs.geolocation
+            var icons = state["app-plus"].distribute.icons
+            var push = state["app-plus"].distribute.sdkConfigs.push
+
+            if (args === 'huiYi') {
+                state.name = '智能会议'
+                state.appid = '__UNI__F3963F8'
+                state.description = '智能会议APP,是一款集成了现代信息技术和智能化管理功能的移动应用程序,旨在提升会议体验和管理效率。'
+                state.versionName = "1.0.3"
+                state.versionCode = 3
+                state.h5.title = '智能会议'
+
+                maps.amap.name = "amapBOujshtbA"
+                maps.amap.appkey_ios = "fb35d03fbb17cbf7a8743a522da3c7fc"
+                maps.amap.appkey_android = "ffc71dfd4e576596027f8f45a1b8fb2f"
+
+                geolocation.amap.name = "amapBOujshtbA"
+                geolocation.amap.appkey_ios = "fb35d03fbb17cbf7a8743a522da3c7fc"
+                geolocation.amap.appkey_android = "ffc71dfd4e576596027f8f45a1b8fb2f"
+                geolocation.tencent.apikey_ios = "EGOBZ-74ZET-ST7XS-VYICT-RBLHZ-KLFEX"
+                geolocation.tencent.apikey_android = "EGOBZ-74ZET-ST7XS-VYICT-RBLHZ-KLFEX"
+                icons.android = {
+                    "hdpi": "unpackage/res/icons/72x72.png",
+                    "xhdpi": "unpackage/res/icons/96x96.png",
+                    "xxhdpi": "unpackage/res/icons/144x144.png",
+                    "xxxhdpi": "unpackage/res/icons/192x192.png"
+                }
+                icons.ios.appstore = "unpackage/res/icons/1024x1024.png"
+                icons.ios.ipad = {
+                    "app": "unpackage/res/icons/76x76.png",
+                    "app@2x": "unpackage/res/icons/152x152.png",
+                    "notification": "unpackage/res/icons/20x20.png",
+                    "notification@2x": "unpackage/res/icons/40x40.png",
+                    "proapp@2x": "unpackage/res/icons/167x167.png",
+                    "settings": "unpackage/res/icons/29x29.png",
+                    "settings@2x": "unpackage/res/icons/58x58.png",
+                    "spotlight": "unpackage/res/icons/40x40.png",
+                    "spotlight@2x": "unpackage/res/icons/80x80.png"
+                }
+                icons.ios.iphone = {
+                    "app@2x": "unpackage/res/icons/120x120.png",
+                    "app@3x": "unpackage/res/icons/180x180.png",
+                    "notification@2x": "unpackage/res/icons/40x40.png",
+                    "notification@3x": "unpackage/res/icons/60x60.png",
+                    "settings@2x": "unpackage/res/icons/58x58.png",
+                    "settings@3x": "unpackage/res/icons/87x87.png",
+                    "spotlight@2x": "unpackage/res/icons/80x80.png",
+                    "spotlight@3x": "unpackage/res/icons/120x120.png"
+                }
+                push.unipush.icons.small = {
+                    "hdpi": "unpackage/res/push/36x36.png",
+                    "ldpi": "unpackage/res/push/18x18.png",
+                    "mdpi": "unpackage/res/push/24x24.png",
+                    "xhdpi": "unpackage/res/push/48x48.png",
+                    "xxhdpi": "unpackage/res/push/72x72.png"
+                }
+            } else if (args === 'menJin') {
+                state.name = '智能门禁'
+                state.appid = '__UNI__8D6E9FD'
+                state.description = '智能门禁APP,是一款集成了现代信息技术和智能化管理功能的移动应用程序。'
+                state.versionName = "1.0.1"
+                state.versionCode = 2
+                state.h5.title = '智能门禁'
+
+                maps.amap.name = "amapBOujshtbA"
+                maps.amap.appkey_ios = "fb35d03fbb17cbf7a8743a522da3c7fc"
+                maps.amap.appkey_android = "ffc71dfd4e576596027f8f45a1b8fb2f"
+
+                geolocation.amap.name = "amapBOujshtbA"
+                geolocation.amap.appkey_ios = "fb35d03fbb17cbf7a8743a522da3c7fc"
+                geolocation.amap.appkey_android = "ffc71dfd4e576596027f8f45a1b8fb2f"
+                geolocation.tencent.apikey_ios = "EGOBZ-74ZET-ST7XS-VYICT-RBLHZ-KLFEX"
+                geolocation.tencent.apikey_android = "EGOBZ-74ZET-ST7XS-VYICT-RBLHZ-KLFEX"
+                icons.android = {
+                    "hdpi": "unpackage/res/icons/72x72.png",
+                    "xhdpi": "unpackage/res/icons/96x96.png",
+                    "xxhdpi": "unpackage/res/icons/144x144.png",
+                    "xxxhdpi": "unpackage/res/icons/192x192.png"
+                }
+                icons.ios.appstore = "unpackage/res/icons/1024x1024.png"
+                icons.ios.ipad = {
+                    "app": "unpackage/res/icons/76x76.png",
+                    "app@2x": "unpackage/res/icons/152x152.png",
+                    "notification": "unpackage/res/icons/20x20.png",
+                    "notification@2x": "unpackage/res/icons/40x40.png",
+                    "proapp@2x": "unpackage/res/icons/167x167.png",
+                    "settings": "unpackage/res/icons/29x29.png",
+                    "settings@2x": "unpackage/res/icons/58x58.png",
+                    "spotlight": "unpackage/res/icons/40x40.png",
+                    "spotlight@2x": "unpackage/res/icons/80x80.png"
+                }
+                icons.ios.iphone = {
+                    "app@2x": "unpackage/res/icons/120x120.png",
+                    "app@3x": "unpackage/res/icons/180x180.png",
+                    "notification@2x": "unpackage/res/icons/40x40.png",
+                    "notification@3x": "unpackage/res/icons/60x60.png",
+                    "settings@2x": "unpackage/res/icons/58x58.png",
+                    "settings@3x": "unpackage/res/icons/87x87.png",
+                    "spotlight@2x": "unpackage/res/icons/80x80.png",
+                    "spotlight@3x": "unpackage/res/icons/120x120.png"
+                }
+                push.unipush.icons.small = {
+                    "hdpi": "unpackage/res/push/36x36.png",
+                    "ldpi": "unpackage/res/push/18x18.png",
+                    "mdpi": "unpackage/res/push/24x24.png",
+                    "xhdpi": "unpackage/res/push/48x48.png",
+                    "xxhdpi": "unpackage/res/push/72x72.png"
+                }
+            }
+        } else if ('./src/pages.json') {
+            state.pages.forEach((e, index) => {
+                if (args === 'huiYi') {
+                    if (e.style.navigationBarTitleText === "人脸识别") {
+                        if (index != 0) {
+                            state.pages.splice(0, 1, ...state.pages.splice(index, 1, state.pages[0]))
+                        }
+                    }
+                    state.condition.list[0].path = "pages/face/index"
+                } else if (args === 'menJin') {
+                    if (e.style.navigationBarTitleText === "门禁识别") {
+                        if (index != 0) {
+                            state.pages.splice(0, 1, ...state.pages.splice(index, 1, state.pages[0]))
+                        }
+                    }
+                    state.condition.list[0].path = "pages/door/index"
+                }
+            })
+        }
+
+        // 将修改后的对象转换回JSON字符串
+        const updated = JSON.stringify(state, null, 4);
+
+        // 写入新的配置到manifest.json
+        fs.writeFile(file, updated, 'utf8', function (err) {
+            if (err) throw err;
+            console.log(file + ' updated successfully');
+        });
+    });
+})
+

BIN
unpackage/res/icons-xunJian/1024x1024.png


BIN
unpackage/res/icons-xunJian/120x120.png


BIN
unpackage/res/icons-xunJian/144x144.png


BIN
unpackage/res/icons-xunJian/152x152.png


BIN
unpackage/res/icons-xunJian/167x167.png


BIN
unpackage/res/icons-xunJian/180x180.png


BIN
unpackage/res/icons-xunJian/192x192.png


BIN
unpackage/res/icons-xunJian/20x20.png


BIN
unpackage/res/icons-xunJian/29x29.png


BIN
unpackage/res/icons-xunJian/40x40.png


BIN
unpackage/res/icons-xunJian/58x58.png


BIN
unpackage/res/icons-xunJian/60x60.png


BIN
unpackage/res/icons-xunJian/72x72.png


BIN
unpackage/res/icons-xunJian/76x76.png


BIN
unpackage/res/icons-xunJian/80x80.png


BIN
unpackage/res/icons-xunJian/87x87.png


BIN
unpackage/res/icons-xunJian/96x96.png


BIN
unpackage/res/icons/1024x1024.png


BIN
unpackage/res/icons/120x120.png


BIN
unpackage/res/icons/144x144.png


BIN
unpackage/res/icons/152x152.png


BIN
unpackage/res/icons/167x167.png


BIN
unpackage/res/icons/180x180.png


BIN
unpackage/res/icons/192x192.png


BIN
unpackage/res/icons/20x20.png


BIN
unpackage/res/icons/29x29.png


BIN
unpackage/res/icons/40x40.png


BIN
unpackage/res/icons/58x58.png


BIN
unpackage/res/icons/60x60.png


BIN
unpackage/res/icons/72x72.png


BIN
unpackage/res/icons/76x76.png


BIN
unpackage/res/icons/80x80.png


BIN
unpackage/res/icons/87x87.png


BIN
unpackage/res/icons/96x96.png


BIN
unpackage/res/push-xunJian/1024x1024.png


BIN
unpackage/res/push-xunJian/120x120.png


BIN
unpackage/res/push-xunJian/144x144.png


BIN
unpackage/res/push-xunJian/152x152.png


BIN
unpackage/res/push-xunJian/167x167.png


BIN
unpackage/res/push-xunJian/180x180.png


BIN
unpackage/res/push-xunJian/192x192.png


BIN
unpackage/res/push-xunJian/20x20.png


BIN
unpackage/res/push-xunJian/29x29.png


BIN
unpackage/res/push-xunJian/40x40.png


BIN
unpackage/res/push-xunJian/58x58.png


BIN
unpackage/res/push-xunJian/60x60.png


BIN
unpackage/res/push-xunJian/72x72.png


BIN
unpackage/res/push-xunJian/76x76.png


BIN
unpackage/res/push-xunJian/80x80.png


BIN
unpackage/res/push-xunJian/87x87.png


BIN
unpackage/res/push-xunJian/96x96.png


BIN
unpackage/res/push/18x18.png


BIN
unpackage/res/push/24x24.png


BIN
unpackage/res/push/36x36.png


BIN
unpackage/res/push/48x48.png


BIN
unpackage/res/push/72x72.png