chenhaozhe
2025-07-09 faee62f47523b2e1c0d1eeed34e047be8ca0c99d
完善蓝牙连接组件 实现蓝牙状态全局可查询
3个文件已修改
1032 ■■■■■ 已修改文件
components/blueToothConnector/blueToothConnector.vue 148 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
main.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 881 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/blueToothConnector/blueToothConnector.vue
@@ -2,7 +2,15 @@
    <view>
        <!-- 蓝牙连接状态 MAC地址 -->
        <view class="connection-status">
            <view>连接状态:</view>
            <view style="display: flex; flex-direction: row; gap: 20rpx;padding: 20rpx;">
                <view style="width: 5rem;">连接设备: </view>
                <view v-if="$printer.isConnected() === false">无</view>
                <view v-else="$printer.isConnected() === true"
                style="flex: 1;display: inline-flex;flex-direction: row;justify-content: space-between;">
                    <view>{{ $printer.connectedDevice().name }}</view>
                    <view>{{ $printer.connectedDevice().address }}</view>
                </view>
            </view>
        </view>
        <!-- 操作区 -->
        <view class="buttons">
@@ -34,12 +42,13 @@
        FakeConnectedDevice,
        WriteOptions,
    } from '@psdk/frame-father';
import { getAddress } from '../../utils/auth';
    export default {
        name: "blueToothConnector",
        data() {
            return {
                discoveredDevices: [], // 查询到的设备
                connectedDeviceId: ""
                connectedDeviceId: "",
            };
        },
        methods: {
@@ -86,6 +95,7 @@
                        }
                    }
                })
            },
            onDevice(device) {
                console.log("监听寻找到新设备的事件---------------")
@@ -108,7 +118,8 @@
                    title: '连接中'
                });
                bluetoothTool.connDevice(device.address, (result) => {
                    console.log(result)
                    console.log("设备MAC地址: ", device.address)
                    console.log("printer:",vm.$printer._connectedDevice)
                    uni.hideLoading()
                    if (result) {
                        //     // console.log(result);
@@ -116,10 +127,14 @@
                        // console.log(vm.$printer)
                        vm.$printer.init(new FakeConnectedDevice());
                        vm.connectedDeviceId = device.address;
                        vm.$printer._connectedDevice.address = device.address
                        vm.$printer._connectedDevice.name = device.name
                        console.log("printer:",vm.$printer._connectedDevice)
                        uni.showToast({
                            icon: 'none',
                            title: '连接成功'
                        })
                    } else {
                        uni.showToast({
                            icon: 'none',
@@ -138,12 +153,132 @@
                if (vm.connectedDeviceId != '') {
                    bluetoothTool.closeBtSocket();
                    vm.connectedDeviceId = "";
                    vm.$printer._connectedDevice = null
                }
            },
            labelPrint() {
                // 打印
                // 检查蓝牙连接
                let btStatus = bluetoothTool.getBluetoothStatus()
                if (btStatus != true) {
                    this.showToast("蓝牙连接异常!")
                    return
                }
                // 检查是否连接设备
                let pairedDevices = bluetoothTool.getPairedDevices()
                if (pairedDevices.length < 1) {
                    this.showToast("无设备连接!")
                    return
                }
                // 检查表单项是否有空值
                for (var key in this.hform) {
                    if (this.hform[key] == "") {
                        // todo 提示表单项不能为空
                        this.showToast("表单不能有空值!")
                        return
                    }
                }
                this.printWrite()
            },
            showToast(msg, status = "none") {
                uni.showToast({
                    title: msg,
                    icon: status,
                    duration: 2000
                });
            },
            ///转成安卓有符号的
            uint8ArrayToSignedArray(uint8Array) {
                let signedArray = new Array(uint8Array.length);
                for (let i = 0; i < uint8Array.length; i++) {
                    if (uint8Array[i] >= 128) {
                        signedArray[i] = uint8Array[i] - 256;
                    } else {
                        signedArray[i] = uint8Array[i];
                    }
                }
                return signedArray;
            },
            async printWrite(type = "cpcl") {
                const vm = this;
                console.log("开始打印------------------")
                switch (type) {
                    case "cpcl":
                        await vm.writeCpclModel();
                        break;
                }
            },
            async writeCpclModel() {
                const vm = this;
                try {
                    const cpcl = await vm.$printer.cpcl().clear()
                        .page(new CPage({
                            width: 608,
                            height: 260
                        }))
                        .text(new CText({
                            x: 54,
                            y: 40,
                            content: "物料代码: " + vm.hform.HMaterCode,
                            font: CFont.TSS24
                        }))
                        .text(new CText({
                            x: 54,
                            y: 80,
                            content: "名    称: " + vm.hform.HMaterName,
                            font: CFont.TSS24
                        }))
                        .text(new CText({
                            x: 54,
                            y: 120,
                            content: "规格型号: " + vm.hform.HMaterType,
                            font: CFont.TSS24
                        }))
                        .text(new CText({
                            x: 54,
                            y: 160,
                            content: "数    量: " + vm.hform.HNumber,
                            font: CFont.TSS24
                        }))
                        .bar(new CBar({
                            x: 120,
                            y: 200,
                            lineWidth: 1,
                            height: 80,
                            content: vm.hform.HBarCode,
                            codeRotation: CCodeRotation.ROTATION_0,
                            codeType: CCodeType.CODE128
                        }))
                        .form(new CForm()) //标签纸需要加定位指令
                        .print();
                    console.log(cpcl.command().string());
                    var binary = cpcl.command().binary();
                    await this.sendMessage(Array.from(this.uint8ArrayToSignedArray(binary)));
                } catch (e) {
                    console.error(e);
                    uni.showToast({
                        title: '失败',
                    });
                }
            },
            async sendMessage(cmd) {
                console.log(cmd);
                const result = bluetoothTool.sendByteData(cmd);
                uni.showToast({
                    icon: 'none',
                    title: result ? '发送成功!' : '发送失败...'
                })
            },
        },
        async mounted() {
            //#ifdef APP-PLUS
            // 蓝牙
            console.log("蓝牙初始化")
            bluetoothTool.init({
                listenBTStatusCallback: (state) => {
                    if (state == 'STATE_ON') {
@@ -166,9 +301,10 @@
                }
            });
            
            // 查看连接设备
            let pariedDevices = bluetoothTool.getPairedDevices()
            console("已配对设备", pariedDevices)
            console.log(this.$printer)
            if(this.$printer.isConnected()){
                this.connectedDeviceId = this.$printer.connectedDevice().address
            }
            //#endif
        },
    }
main.js
@@ -1,5 +1,6 @@
import App from './App'
import Printer from './plugins/printer'
Vue.use(Printer);
// 生产环境
 // Vue.prototype.serverUrl = "https://qqyapi.xinlinsoft.cn/qqy-api";
// 开发环境
pages.json
@@ -1,446 +1,443 @@
{
    "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
        {
            "path": "pages/index/login",
            "style": {
                "navigationBarTitleText": "登录",
                "navigationStyle": "custom"
            }
        },
        {
            "path": "pages/index/index",
            "style": {
                "navigationBarTitleText": "首页",
                "navigationStyle": "custom"
            }
        },
        {
            "path": "pages/index/tab1",
            "style": {
                "navigationBarTitleText": "模块功能"
            }
        },
        {
            "path": "pages/index/tab2",
            "style": {
                "navigationBarTitleText": "报表中心"
            }
        },
        {
            "path": "pages/index/mine",
            "style": {
                "navigationBarTitleText": "个人中心",
                // "navigationStyle": "custom"
                "navigationBarTextStyle": "white",
                "navigationBarBackgroundColor": "#65a2fb"
            }
        },
        {
            "path": "pages/shebeilvli/form",
            "style": {
                "navigationBarTitleText": "设备状态分析"
            }
        },
        {
            "path": "pages/shebeilvli/table",
            "style": {
                "navigationBarTitleText": "设备履历",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/shebeilvli/table_son",
            "style": {
                "navigationBarTitleText": "设备履历子表"
            }
        },
        {
            "path": "pages/baoyangjihua/form",
            "style": {
                "navigationBarTitleText": "设备保养计划单"
            }
        },
        {
            "path": "pages/baoyangjihua/table",
            "style": {
                "navigationBarTitleText": "设备保养计划单",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/baoyangjihua/table_son",
            "style": {
                "navigationBarTitleText": "保养计划子表"
            }
        },
        {
            "path": "pages/baoyangjilu/form",
            "style": {
                "navigationBarTitleText": "设备保养记录单"
            }
        },
        {
            "path": "pages/baoyangjilu/table",
            "style": {
                "navigationBarTitleText": "设备保养记录单",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/baoyangjilu/table_son",
            "style": {
                "navigationBarTitleText": "保养记录子表"
            }
        },
        {
            "path": "pages/guzhangdengji/form",
            "style": {
                "navigationBarTitleText": "设备故障登记表"
            }
        },
        {
            "path": "pages/guzhangdengji/table",
            "style": {
                "navigationBarTitleText": "设备故障登记表",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/shebeidangan/form",
            "style": {
                "navigationBarTitleText": "设备档案"
            }
        },
        {
            "path": "pages/shebeidangan/table",
            "style": {
                "navigationBarTitleText": "设备档案",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/shebeiweixiu/form",
            "style": {
                "navigationBarTitleText": "设备维修记录单"
            }
        },
        {
            "path": "pages/shebeiweixiu/table",
            "style": {
                "navigationBarTitleText": "设备维修记录单",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/weiwaigxIn/form",
            "style": {
                "navigationBarTitleText": "委外工序发出单"
            }
        },
        {
            "path": "pages/weiwaigxIn/table",
            "style": {
                "navigationBarTitleText": "委外工序发出单",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/weiwaigxOut/form",
            "style": {
                "navigationBarTitleText": "委外工序接收单"
            }
        },
        {
            "path": "pages/weiwaigxOut/table",
            "style": {
                "navigationBarTitleText": "委外工序接收单",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/weiwaigxOut/firstCheck",
            "style": {
                "navigationBarTitleText": "首件检验单",
                "enablePullDownRefresh": true
            }
        },{
            "path": "pages/gongxuIn/form",
            "style": {
                "navigationBarTitleText": "工序进站接收单"
            }
        },
        {
            "path": "pages/gongxuIn/table",
            "style": {
                "navigationBarTitleText": "工序进站接收单",
                "enablePullDownRefresh": true
            }
        },{
            "path": "pages/gongxuOut/form",
            "style": {
                "navigationBarTitleText": "工序出站汇报单"
            }
        },
        {
            "path": "pages/gongxuOut/table",
            "style": {
                "navigationBarTitleText": "工序出站汇报单",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/shebeiguanli/form",
            "style": {
                "navigationBarTitleText": "设备管理",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/shebeiguanli/table",
            "style": {
                "navigationBarTitleText": "设备管理",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/shebeiguanli/list",
            "style": {
                "navigationBarTitleText": "工单列表",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/baogong/form",
            "style": {
                "navigationBarTitleText": "产量汇报单",
                "enablePullDownRefresh": false
            }
        },
        {
            "path": "pages/baogong/table",
            "style": {
                "navigationBarTitleText": "报工平台",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/baogong/list",
            "style": {
                "navigationBarTitleText": "工单列表",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/baogong/abnormal",
            "style": {
                "navigationBarTitleText": "异常反馈单",
                "enablePullDownRefresh": false
            }
        },
        {
            "path": "pages/yichang/table",
            "style": {
                "navigationBarTitleText": "异常反馈单列表",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/yichang/form",
            "style": {
                "navigationBarTitleText": "异常反馈单",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/yichang/list",
            "style": {
                "navigationBarTitleText": "异常反馈处理单列表",
                "enablePullDownRefresh": true
            }
        },
        {
            "path" : "pages/labelPrinter/index",
            "style": {
                "navigationBarTitleText": "标签打印"
            }
        },
        {
            "path" : "pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai",
            "style": {
                "navigationBarTitleText": "设备运行状态",
                "enablePullDownRefresh": true
            }
        },
        {
            "path" : "pages/shebeiyunxingzhuangtai/detail",
            "style": {
                "navigationBarTitleText": "设备运行状态详情"
            }
        },
        {
            "path" : "pages/mujvzhuangtai/mujvzhuangtai",
            "style" :
    "pages" : [
        //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
        {
            "path" : "pages/index/login",
            "style" : {
                "navigationBarTitleText" : "登录",
                "navigationStyle" : "custom"
            }
        },
        {
            "path" : "pages/index/index",
            "style" : {
                "navigationBarTitleText" : "首页",
                "navigationStyle" : "custom"
            }
        },
        {
            "path" : "pages/index/tab1",
            "style" : {
                "navigationBarTitleText" : "模块功能"
            }
        },
        {
            "path" : "pages/index/tab2",
            "style" : {
                "navigationBarTitleText" : "报表中心"
            }
        },
        {
            "path" : "pages/index/mine",
            "style" : {
                "navigationBarTitleText" : "个人中心",
                // "navigationStyle": "custom"
                "navigationBarTextStyle" : "white",
                "navigationBarBackgroundColor" : "#65a2fb"
            }
        },
        {
            "path" : "pages/shebeilvli/form",
            "style" : {
                "navigationBarTitleText" : "设备状态分析"
            }
        },
        {
            "path" : "pages/shebeilvli/table",
            "style" : {
                "navigationBarTitleText" : "设备履历",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/shebeilvli/table_son",
            "style" : {
                "navigationBarTitleText" : "设备履历子表"
            }
        },
        {
            "path" : "pages/baoyangjihua/form",
            "style" : {
                "navigationBarTitleText" : "设备保养计划单"
            }
        },
        {
            "path" : "pages/baoyangjihua/table",
            "style" : {
                "navigationBarTitleText" : "设备保养计划单",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/baoyangjihua/table_son",
            "style" : {
                "navigationBarTitleText" : "保养计划子表"
            }
        },
        {
            "path" : "pages/baoyangjilu/form",
            "style" : {
                "navigationBarTitleText" : "设备保养记录单"
            }
        },
        {
            "path" : "pages/baoyangjilu/table",
            "style" : {
                "navigationBarTitleText" : "设备保养记录单",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/baoyangjilu/table_son",
            "style" : {
                "navigationBarTitleText" : "保养记录子表"
            }
        },
        {
            "path" : "pages/guzhangdengji/form",
            "style" : {
                "navigationBarTitleText" : "设备故障登记表"
            }
        },
        {
            "path" : "pages/guzhangdengji/table",
            "style" : {
                "navigationBarTitleText" : "设备故障登记表",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/shebeidangan/form",
            "style" : {
                "navigationBarTitleText" : "设备档案"
            }
        },
        {
            "path" : "pages/shebeidangan/table",
            "style" : {
                "navigationBarTitleText" : "设备档案",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/shebeiweixiu/form",
            "style" : {
                "navigationBarTitleText" : "设备维修记录单"
            }
        },
        {
            "path" : "pages/shebeiweixiu/table",
            "style" : {
                "navigationBarTitleText" : "设备维修记录单",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/weiwaigxIn/form",
            "style" : {
                "navigationBarTitleText" : "委外工序发出单"
            }
        },
        {
            "path" : "pages/weiwaigxIn/table",
            "style" : {
                "navigationBarTitleText" : "委外工序发出单",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/weiwaigxOut/form",
            "style" : {
                "navigationBarTitleText" : "委外工序接收单"
            }
        },
        {
            "path" : "pages/weiwaigxOut/table",
            "style" : {
                "navigationBarTitleText" : "委外工序接收单",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/weiwaigxOut/firstCheck",
            "style" : {
                "navigationBarTitleText" : "首件检验单",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/gongxuIn/form",
            "style" : {
                "navigationBarTitleText" : "工序进站接收单"
            }
        },
        {
            "path" : "pages/gongxuIn/table",
            "style" : {
                "navigationBarTitleText" : "工序进站接收单",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/gongxuOut/form",
            "style" : {
                "navigationBarTitleText" : "工序出站汇报单"
            }
        },
        {
            "path" : "pages/gongxuOut/table",
            "style" : {
                "navigationBarTitleText" : "工序出站汇报单",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/shebeiguanli/form",
            "style" : {
                "navigationBarTitleText" : "设备管理",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/shebeiguanli/table",
            "style" : {
                "navigationBarTitleText" : "设备管理",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/shebeiguanli/list",
            "style" : {
                "navigationBarTitleText" : "工单列表",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/baogong/form",
            "style" : {
                "navigationBarTitleText" : "产量汇报单",
                "enablePullDownRefresh" : false
            }
        },
        {
            "path" : "pages/baogong/table",
            "style" : {
                "navigationBarTitleText" : "报工平台",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/baogong/list",
            "style" : {
                "navigationBarTitleText" : "工单列表",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/baogong/abnormal",
            "style" : {
                "navigationBarTitleText" : "异常反馈单",
                "enablePullDownRefresh" : false
            }
        },
        {
            "path" : "pages/yichang/table",
            "style" : {
                "navigationBarTitleText" : "异常反馈单列表",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/yichang/form",
            "style" : {
                "navigationBarTitleText" : "异常反馈单",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/yichang/list",
            "style" : {
                "navigationBarTitleText" : "异常反馈处理单列表",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/labelPrinter/index",
            "style" : {
                "navigationBarTitleText" : "标签打印"
            }
        },
        {
            "path" : "pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai",
            "style" : {
                "navigationBarTitleText" : "设备运行状态",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/shebeiyunxingzhuangtai/detail",
            "style" : {
                "navigationBarTitleText" : "设备运行状态详情"
            }
        },
        {
            "path" : "pages/mujvzhuangtai/mujvzhuangtai",
            "style" : {
                "navigationBarTitleText" : "模具状态分布",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/mujvzhuangtai/detail",
            "style" : {
                "navigationBarTitleText" : "模具状态详情"
            }
        },
        {
            "path" : "pages/tiaomachaima/tiaomachaima",
            "style" : {
                "navigationBarTitleText" : "条码拆码"
            }
        },
        {
            "path" : "pages/wuliaosaoma/wuliaosaoma",
            "style" : {
                "navigationBarTitleText" : "物料清单"
            }
        },
        {
            "path" : "pages/wuliaosaoma/detail",
            "style" : {
                "navigationBarTitleText" : "条码档案"
            }
        },
        {
            "path" : "pages/caigouruku/table",
            "style" : {
                "navigationBarTitleText" : "采购入库",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/caigouruku/form",
            "style" : {
                "navigationBarTitleText" : "采购入库单"
            }
        },
        {
            "path" : "pages/caigoutuiliao/table",
            "style" : {
                "navigationBarTitleText" : "采购退料",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/caigoutuiliao/form",
            "style" : {
                "navigationBarTitleText" : "采购退料单"
            }
        },
        {
            "path" : "pages/xiaoshouchuku/table",
            "style" : {
                "navigationBarTitleText" : "销售出库",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/xiaoshouchuku/form",
            "style" : {
                "navigationBarTitleText" : "销售出库单"
            }
        },
        {
            "path" : "pages/xiaoshoutuihuo/table",
            "style" : {
                "navigationBarTitleText" : "销售退货",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/xiaoshoutuihuo/form",
            "style" : {
                "navigationBarTitleText" : "销售退货单"
            }
        },
        {
            "path" : "pages/qitachuku/qitachuku",
            "style" : {
                "navigationBarTitleText" : "其他出库",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/qitachuku/form",
            "style" : {
                "navigationBarTitleText" : "其他出库单"
            }
        },
        {
            "path" : "pages/qitaruku/qitaruku",
            "style" : {
                "navigationBarTitleText" : "其他入库",
                "enablePullDownRefresh" : true
            }
        },
        {
            "path" : "pages/qitaruku/form",
            "style" : {
                "navigationBarTitleText" : "其他入库单"
            }
        }
    ],
    "tabBar" : {
        "color" : "#888888", //tab 上的文字默认颜色,仅支持十六进制颜色
        "selectedColor" : "#2d7dee", //tab 上的文字选中时的颜色,仅支持十六进制颜色
        "borderStyle" : "black", //tabbar上边框的颜色, 仅支持 black / white
        "backgroundColor" : "#ffffff", //tab 的背景色,仅支持十六进制颜色
        "list" : [
            {
                "pagePath" : "pages/index/index",
                "iconPath" : "static/tabBar/home.png",
                "selectedIconPath" : "static/tabBar/home-default.png",
                "text" : "首页"
            },
            {
                "pagePath" : "pages/index/tab1",
                "iconPath" : "static/tabBar/icon1.png",
                "selectedIconPath" : "static/tabBar/icon1-default.png",
                "text" : "模块功能"
            },
            {
                "pagePath" : "pages/index/tab2",
                "iconPath" : "static/tabBar/icon2.png",
                "selectedIconPath" : "static/tabBar/icon2-default.png",
                "text" : "报表中心"
            },
            {
                "pagePath" : "pages/index/mine",
                "iconPath" : "static/tabBar/user.png",
                "selectedIconPath" : "static/tabBar/user-default.png",
                "text" : "我的"
            }
        ]
    },
    "globalStyle" : {
        "navigationBarTextStyle" : "white",
        "navigationBarTitleText" : "设备管理",
        "navigationBarBackgroundColor" : "#3A78FF",
        "backgroundColor" : "#F8F8F8",
        "pageOrientation" : "default"
    },
    "uniIdRouter" : {},
    "condition" : { //模式配置,仅开发期间生效
        "current": 0, //当前激活的模式(list 的索引项)
        "list": [
            {
                "navigationBarTitleText" : "模具状态分布",
                "enablePullDownRefresh": true
                "name": "", //模式名称
                "path": "", //启动页面,必选
                "query": "" //启动参数,在页面的onLoad函数里面得到
            }
        },
        {
            "path" : "pages/mujvzhuangtai/detail",
            "style" :
            {
                "navigationBarTitleText" : "模具状态详情"
            }
        },
        {
            "path" : "pages/tiaomachaima/tiaomachaima",
            "style" :
            {
                "navigationBarTitleText" : "条码拆码"
            }
        },
        {
            "path" : "pages/wuliaosaoma/wuliaosaoma",
            "style" :
            {
                "navigationBarTitleText" : "物料清单"
            }
        },
        {
            "path" : "pages/wuliaosaoma/detail",
            "style" :
            {
                "navigationBarTitleText" : "条码档案"
            }
        },
        {
            "path" : "pages/caigouruku/table",
            "style" :
            {
                "navigationBarTitleText" : "采购入库",
                "enablePullDownRefresh": true
            }
        },
        {
            "path" : "pages/caigouruku/form",
            "style" :
            {
                "navigationBarTitleText" : "采购入库单"
            }
        },
        {
            "path" : "pages/caigoutuiliao/table",
            "style" :
            {
                "navigationBarTitleText" : "采购退料",
                "enablePullDownRefresh": true
            }
        },
        {
            "path" : "pages/caigoutuiliao/form",
            "style" :
            {
                "navigationBarTitleText" : "采购退料单"
            }
        },
        {
            "path" : "pages/xiaoshouchuku/table",
            "style" :
            {
                "navigationBarTitleText" : "销售出库",
                "enablePullDownRefresh": true
            }
        },
        {
            "path" : "pages/xiaoshouchuku/form",
            "style" :
            {
                "navigationBarTitleText" : "销售出库单"
            }
        },
        {
            "path" : "pages/xiaoshoutuihuo/table",
            "style" :
            {
                "navigationBarTitleText" : "销售退货",
                "enablePullDownRefresh": true
            }
        },
        {
            "path" : "pages/xiaoshoutuihuo/form",
            "style" :
            {
                "navigationBarTitleText" : "销售退货单"
            }
        },
        {
            "path" : "pages/qitachuku/qitachuku",
            "style" :
            {
                "navigationBarTitleText" : "其他出库",
                "enablePullDownRefresh": true
            }
        },
        {
            "path" : "pages/qitachuku/form",
            "style" :
            {
                "navigationBarTitleText" : "其他出库单"
            }
        },
        {
            "path" : "pages/qitaruku/qitaruku",
            "style" :
            {
                "navigationBarTitleText" : "其他入库",
                "enablePullDownRefresh": true
            }
        },
        {
            "path" : "pages/qitaruku/form",
            "style" :
            {
                "navigationBarTitleText" : "其他入库单"
            }
        }
    ],
    "tabBar": {
         "color": "#888888", //tab 上的文字默认颜色,仅支持十六进制颜色
         "selectedColor": "#2d7dee", //tab 上的文字选中时的颜色,仅支持十六进制颜色
         "borderStyle": "black", //tabbar上边框的颜色, 仅支持 black / white
         "backgroundColor": "#ffffff", //tab 的背景色,仅支持十六进制颜色
         "list": [{
             "pagePath": "pages/index/index",
             "iconPath":"static/tabBar/home.png",
             "selectedIconPath":"static/tabBar/home-default.png",
             "text": "首页"
         },
         {
             "pagePath": "pages/index/tab1",
             "iconPath":"static/tabBar/icon1.png",
             "selectedIconPath":"static/tabBar/icon1-default.png",
             "text": "模块功能"
         },
         {
             "pagePath": "pages/index/tab2",
             "iconPath":"static/tabBar/icon2.png",
             "selectedIconPath":"static/tabBar/icon2-default.png",
             "text": "报表中心"
         },
         {
            "pagePath": "pages/index/mine",
            "iconPath":"static/tabBar/user.png",
            "selectedIconPath":"static/tabBar/user-default.png",
            "text": "我的"
         }]
     },
    "globalStyle": {
        "navigationBarTextStyle": "white",
        "navigationBarTitleText": "设备管理",
        "navigationBarBackgroundColor": "#3A78FF",
        "backgroundColor": "#F8F8F8",
        "pageOrientation": "default"
    },
    "uniIdRouter": {}
        ]
    }
}