This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a uni-app based mobile application for quality control (QC) and warehouse management in a MES (Manufacturing Execution System) environment. The app is specifically designed for PDA devices and supports both Android and iOS platforms.
App Details:
- Name: GS-MES-AP (广深科技 MES Application)
- Framework: uni-app with Vue 2
- Version: 1.1.1.4
- Company: 广深科技 (Guangshen Technology)
pages.jsonmain.js - contains global configurations, prototypes, and app initializationpages/ - All application pages organized by functionality:BasePages/ - Core app pages (login, main, user, messages)QC/ - Quality control modules (XJ-巡检, SJ-首检, RKJ-入库检, LLJ-来料检)Warehouse/ - Warehouse management (inventory, purchases, returns)Test/ - Testing and development pagesAllocation/ - Transfer operations (in/out)components/ - Reusable UI components and third-party componentsstatic/ - Static assets (images, CSS, audio files)store/ - Vuex state managementcommon/ - Shared utilities and mixinsutils/ - Utility functionsThis is a uni-app project with no traditional package.json build scripts. Development and building should be done through:
Since this is a uni-app project without npm scripts, use:
- Development: Open project in HBuilderX and use built-in dev server
- Build for production: Use HBuilderX build tools or uni-app CLI
- No traditional lint/test commands found in the codebase
manifest.json - App configuration, permissions, and platform settingspages.json - Page routing and navigation configurationuni.scss - Global SCSS variablesApp.vue - Root component with global stylesServer endpoints are configured in store/index.js:
- Local development: http://localhost:10054/api
- Internal network: http://192.168.11.251:10054
- Current active API: http://localhost:10054/api (configured in serverAPI)
The app supports switching between internal and external network environments via the networkFlag state in the Vuex store.
Global request methods available on Vue prototype:
- this.$get() - GET requests with loading indicators
- this.$post() - POST requests with loading indicators
- this.$postSyncPost() - Synchronous POST requests
- this.$toERP() - ERP system requests
- this.$uni_request() - Core request wrapper
- this.$uni_requestNew() - Alternative request method
- this.$sendPostRequest() - Wrapper for ERP POST requests
Additional utility methods available on Vue prototype:
- this.$camera() - Camera and image selection functionality
- this.$fileUpload() - File upload with base64 encoding
- this.$getDate() - Date formatting utility
- this.$getUrlParams() - URL parameter extraction
- this.$showMessage() - Toast notification display
- this.$showDialog() - Modal dialog display
- this.$setTitle() - Navigation title setting
- this.$getUserMenu() - User menu retrieval
User authentication managed through:
- Login info stored in this.$loginInfo prototype
- User data persisted in uni.storage
- Forced login required (forcedLogin: true)
- Global authentication check via globalMixin.js (currently commented out)
- Session management with this.$login() and this.$logout() methods
manifest.json)kk-printer component)static/audio/)Configured in manifest.json for Android:
- Camera access for photo capture
- Storage access for file operations
- Network access for API communications
- Bluetooth for printer connectivity
manifest.jsonPages use uni-app navigation with parameters passed via URL query strings. Use this.$getUrlParams(url) to extract parameters.
QC modules include image upload functionality for inspection records with base64 encoding.
Vuex store maintains server configuration and app state. Network settings can be switched between internal/external environments.
Global error handling through unified request methods with toast notifications for user feedback.
components/ directorykk-printer - Bluetooth printer integrationuni-* - Official uni-app UI componentsmpvue-* - Vue-based utility componentscomponents/page-head and page-foot - Layout componentsproduct.vue - Product display componentList.vue → Add.vue → detail.vue → ImageItem.vueTest/ directory for development