# 用管家MES移动端 **Repository Path**: git3/ygj ## Basic Information - **Project Name**: 用管家MES移动端 - **Description**: 用管家MES移动端。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2024-08-07 - **Last Updated**: 2025-07-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 用管家CLI版本 ## ### 安装、运行 系统环境 node 14.15.4 1. 命令行切换到代码目录下,执行以下命令安装依赖 shell script npm install 2. 编译代码 编译微信小程序 shell script npm run dev:mp-weixin 会在dist/dev下生成mp-weixin文件夹,用微信开发者工具打开即可预览小程序 各个平台编译命令: // 微信 npm run dev:mp-weixin // H5 npm run dev:h5 ### 钉钉调试命令 CLI -专有钉钉内无效 ding dev web --targetH5Url http://192.168.20.39:8080 ## 代码说明 ### 目录结构 /src目录 ``` components // 公共组件 core // 小程序核心代码 └── apiUrl.js // 服务器端API接口配置 └── siteinfo.js // 服务器路径配置 pages // 页面代码 plugins // 插件代码 static // 图片、样式 store // vuex App.vue // 小程序生命周期控制 main.js // 入口文件 manifest.json // 小程序配置 pages.json // 页面路由配置 uni.scss // 全局样式 ``` ### 公共代码 - app-layout - 每一个page页面请用,如下代码书写: ````html ```` ### 网络请求 - api request 已挂载在全局 ````javascript Vue.use({ install(Vue, options) { // 接口 路径 Vue.prototype.$api = Api; // 请求 Vue.prototype.$request = request; }, }); ```` - 使用方法 ````javascript this.$request({ url: this.$api.index.config, }); ````