图片路径重设
This commit is contained in:
parent
c1a82f2bd1
commit
09f4a7f7d0
@ -17,19 +17,19 @@ let xinzhiKey = 'SBh45_yy21FU5ErV_';
|
||||
const CONFIG = {
|
||||
// 开发环境配置
|
||||
development: {
|
||||
officialWebUrl: 'https://iot-xcwl.cn/',
|
||||
baseUrl: 'https://iot-xcwl.cn/prod-api/',
|
||||
mqttServer: protocalProd + 'iot-xcwl.cn/mqtt',
|
||||
decoderUrl: 'https://iot-xcwl.cn/',
|
||||
officialWebUrl: 'https://xaznkj.cn/',
|
||||
baseUrl: 'https://xaznkj.cn/prod-api/',
|
||||
mqttServer: protocalProd + 'xaznkj.cn/mqtt',
|
||||
decoderUrl: 'https://xaznkj.cn/',
|
||||
qqmapKey,
|
||||
xinzhiKey,
|
||||
},
|
||||
// 生产环境配置
|
||||
production: {
|
||||
officialWebUrl: 'https://iot-xcwl.cn/',
|
||||
baseUrl: 'https://iot-xcwl.cn/prod-api/',
|
||||
mqttServer: protocalProd + 'iot-xcwl.cn/mqtt',
|
||||
decoderUrl: 'https://iot-xcwl.cn/',
|
||||
officialWebUrl: 'https://xaznkj.cn/',
|
||||
baseUrl: 'https://xaznkj.cn/prod-api/',
|
||||
mqttServer: protocalProd + 'xaznkj.cn/mqtt',
|
||||
decoderUrl: 'https://xaznkj.cn/',
|
||||
qqmapKey,
|
||||
xinzhiKey,
|
||||
}
|
||||
|
370
manifest.json
370
manifest.json
@ -1,186 +1,186 @@
|
||||
{
|
||||
"name": "芯程物联",
|
||||
"appid": "__UNI__0B4DD99",
|
||||
"description": "开源物联网平台",
|
||||
"versionName": "1.0.0",
|
||||
"versionCode": 260,
|
||||
"transformPx": false,
|
||||
"app-plus": {
|
||||
"kernel": {
|
||||
"ios": "WKWebview"
|
||||
},
|
||||
"usingComponents": true,
|
||||
"nvueCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"splashscreen": {
|
||||
"alwaysShowBeforeRender": true,
|
||||
"waiting": true,
|
||||
"autoclose": true,
|
||||
"delay": 0
|
||||
},
|
||||
"modules": {
|
||||
"Barcode": {},
|
||||
"OAuth": {},
|
||||
"Camera": {}
|
||||
},
|
||||
"distribute": {
|
||||
"android": {
|
||||
"permissions": [
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.INTERNET\"/>"
|
||||
],
|
||||
"minSdkVersion": 22,
|
||||
"targetSdkVersion": 30,
|
||||
"abiFilters": ["armeabi-v7a", "arm64-v8a"],
|
||||
"permissionExternalStorage": {
|
||||
"request": "none",
|
||||
"prompt": "应用保存运行状态等信息,需要获取读写手机存储权限,请允许。"
|
||||
},
|
||||
"permissionPhoneState": {
|
||||
"request": "none",
|
||||
"prompt": "为保证您正常、安全地使用,需要获取设备识别码使用权限,请允许。"
|
||||
},
|
||||
"schemes": "fastbee"
|
||||
},
|
||||
"ios": {
|
||||
"idfa": true,
|
||||
"privacyDescription": {
|
||||
"NSLocationAlwaysUsageDescription": "便于您使用该功能获取当前位置天气情况、WIFI列表等场景。",
|
||||
"NSLocationAlwaysAndWhenInUseUsageDescription": "便于您使用该功能获取当前位置天气情况、WIFI列表等场景。",
|
||||
"NSLocalNetworkUsageDescription": "允许访问蜂窝网络,用于扫码/关联式添加设备",
|
||||
"NSLocationWhenInUseUsageDescription": "便于您使用该功能获取当前位置天气情况、WIFI列表等场景。"
|
||||
},
|
||||
"dSYMs": false,
|
||||
"urltypes": "fastbee"
|
||||
},
|
||||
"sdkConfigs": {
|
||||
"push": {},
|
||||
"statics": {},
|
||||
"maps": {},
|
||||
"ad": {},
|
||||
"oauth": {
|
||||
"weixin": {
|
||||
"appid": "wx6be3f0d7bf7154e1",
|
||||
"appsecret": "b6c1d0da60bd5250857d211cdc64fdc9",
|
||||
"UniversalLinks": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"splashscreen": {
|
||||
"iosStyle": "common",
|
||||
"androidStyle": "default",
|
||||
"alwaysShowBeforeRender": false,
|
||||
"waiting": true,
|
||||
"autoclose": false,
|
||||
"delay": 0,
|
||||
"android": {
|
||||
"hdpi": "./static/logo.9.png",
|
||||
"xhdpi": "./static/logo.9.png",
|
||||
"xxhdpi": "./static/logo.9.png"
|
||||
}
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"ios": {
|
||||
"appstore": "unpackage/res/icons/1024x1024.png",
|
||||
"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"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
},
|
||||
"nativePlugins": {}
|
||||
},
|
||||
"quickapp": {},
|
||||
"mp-weixin": {
|
||||
"appid": "wx52ca113738fb0f64",
|
||||
"setting": {
|
||||
"urlCheck": false,
|
||||
"minified": true,
|
||||
"es6": true
|
||||
},
|
||||
"usingComponents": true,
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
},
|
||||
"optimization": {
|
||||
"subPackages": true
|
||||
},
|
||||
"permission": {
|
||||
"scope.userLocation": {
|
||||
"desc": "便于您使用该功能获取当前位置天气情况、WIFI列表等场景。"
|
||||
}
|
||||
},
|
||||
"requiredPrivateInfos": ["getLocation"],
|
||||
"lazyCodeLoading": "requiredComponents"
|
||||
},
|
||||
"mp-alipay": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-baidu": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-toutiao": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
},
|
||||
"h5": {
|
||||
"title": "蜂信物联",
|
||||
"router": {
|
||||
"mode": "hash",
|
||||
"base": "./"
|
||||
},
|
||||
"devServer": {
|
||||
// "disableHostCheck": true, // 禁止访问本地host文件
|
||||
"port": 8090
|
||||
},
|
||||
"optimization": {
|
||||
"treeShaking": {
|
||||
"enable": false
|
||||
}
|
||||
},
|
||||
"template": "uni_modules/jessibuca/hybrid/index.html",
|
||||
"sdkConfigs": {
|
||||
"maps": {
|
||||
"qqmap": {
|
||||
"key": "4PDBZ-4KQKU-AX6VO-GU7NB-INDZJ-YBFXC"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"name" : "芯程物联",
|
||||
"appid" : "__UNI__0B4DD99",
|
||||
"description" : "开源物联网平台",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : 260,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
"kernel" : {
|
||||
"ios" : "WKWebview"
|
||||
},
|
||||
"usingComponents" : true,
|
||||
"nvueCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
"modules" : {
|
||||
"Barcode" : {},
|
||||
"OAuth" : {},
|
||||
"Camera" : {}
|
||||
},
|
||||
"distribute" : {
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.INTERNET\"/>"
|
||||
],
|
||||
"minSdkVersion" : 22,
|
||||
"targetSdkVersion" : 30,
|
||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a" ],
|
||||
"permissionExternalStorage" : {
|
||||
"request" : "none",
|
||||
"prompt" : "应用保存运行状态等信息,需要获取读写手机存储权限,请允许。"
|
||||
},
|
||||
"permissionPhoneState" : {
|
||||
"request" : "none",
|
||||
"prompt" : "为保证您正常、安全地使用,需要获取设备识别码使用权限,请允许。"
|
||||
},
|
||||
"schemes" : "fastbee"
|
||||
},
|
||||
"ios" : {
|
||||
"idfa" : true,
|
||||
"privacyDescription" : {
|
||||
"NSLocationAlwaysUsageDescription" : "便于您使用该功能获取当前位置天气情况、WIFI列表等场景。",
|
||||
"NSLocationAlwaysAndWhenInUseUsageDescription" : "便于您使用该功能获取当前位置天气情况、WIFI列表等场景。",
|
||||
"NSLocalNetworkUsageDescription" : "允许访问蜂窝网络,用于扫码/关联式添加设备",
|
||||
"NSLocationWhenInUseUsageDescription" : "便于您使用该功能获取当前位置天气情况、WIFI列表等场景。"
|
||||
},
|
||||
"dSYMs" : false,
|
||||
"urltypes" : "fastbee"
|
||||
},
|
||||
"sdkConfigs" : {
|
||||
"push" : {},
|
||||
"statics" : {},
|
||||
"maps" : {},
|
||||
"ad" : {},
|
||||
"oauth" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx6be3f0d7bf7154e1",
|
||||
"appsecret" : "b6c1d0da60bd5250857d211cdc64fdc9",
|
||||
"UniversalLinks" : ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"splashscreen" : {
|
||||
"iosStyle" : "common",
|
||||
"androidStyle" : "default",
|
||||
"alwaysShowBeforeRender" : false,
|
||||
"waiting" : true,
|
||||
"autoclose" : false,
|
||||
"delay" : 0,
|
||||
"android" : {
|
||||
"hdpi" : "./static/logo.9.png",
|
||||
"xhdpi" : "./static/logo.9.png",
|
||||
"xxhdpi" : "./static/logo.9.png"
|
||||
}
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"ios" : {
|
||||
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||
"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"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"nativePlugins" : {}
|
||||
},
|
||||
"quickapp" : {},
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx71a45919045c7e19",
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"minified" : true,
|
||||
"es6" : true
|
||||
},
|
||||
"usingComponents" : true,
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"optimization" : {
|
||||
"subPackages" : true
|
||||
},
|
||||
"permission" : {
|
||||
"scope.userLocation" : {
|
||||
"desc" : "便于您使用该功能获取当前位置天气情况、WIFI列表等场景。"
|
||||
}
|
||||
},
|
||||
"requiredPrivateInfos" : [ "getLocation" ],
|
||||
"lazyCodeLoading" : "requiredComponents"
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"h5" : {
|
||||
"title" : "蜂信物联",
|
||||
"router" : {
|
||||
"mode" : "hash",
|
||||
"base" : "./"
|
||||
},
|
||||
"devServer" : {
|
||||
// "disableHostCheck": true, // 禁止访问本地host文件
|
||||
"port" : 8090
|
||||
},
|
||||
"optimization" : {
|
||||
"treeShaking" : {
|
||||
"enable" : false
|
||||
}
|
||||
},
|
||||
"template" : "uni_modules/jessibuca/hybrid/index.html",
|
||||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
"qqmap" : {
|
||||
"key" : "4PDBZ-4KQKU-AX6VO-GU7NB-INDZJ-YBFXC"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
74
node_modules/.vue-global-types/vue_99_0_0_0.d.ts
generated
vendored
74
node_modules/.vue-global-types/vue_99_0_0_0.d.ts
generated
vendored
@ -2,7 +2,6 @@
|
||||
export {};
|
||||
|
||||
; declare global {
|
||||
const __VLS_intrinsicElements: __VLS_IntrinsicElements;
|
||||
const __VLS_directiveBindingRestFields: { instance: null, oldValue: null, modifiers: any, dir: any };
|
||||
const __VLS_unref: typeof import('vue').unref;
|
||||
const __VLS_placeholder: any;
|
||||
@ -24,10 +23,31 @@ export {};
|
||||
N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N2] } :
|
||||
N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N3] } :
|
||||
{ [K in N0]: unknown };
|
||||
type __VLS_FunctionalComponentProps<T, K> =
|
||||
'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: { props?: infer P } } ? NonNullable<P> : never
|
||||
: T extends (props: infer P, ...args: any) => any ? P :
|
||||
{};
|
||||
type __VLS_FunctionalComponentCtx<T, K> = __VLS_PickNotAny<'__ctx' extends keyof __VLS_PickNotAny<K, {}>
|
||||
? K extends { __ctx?: infer Ctx } ? NonNullable<Ctx> : never : any
|
||||
, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any
|
||||
>;
|
||||
type __VLS_FunctionalComponentProps<T, K> = '__ctx' extends keyof __VLS_PickNotAny<K, {}>
|
||||
? K extends { __ctx?: { props?: infer P } } ? NonNullable<P> : never
|
||||
: T extends (props: infer P, ...args: any) => any ? P
|
||||
: {};
|
||||
type __VLS_FunctionalComponent<T> = (props: (T extends { $props: infer Props } ? Props : {}) & Record<string, unknown>, ctx?: any) => __VLS_Element & {
|
||||
__ctx?: {
|
||||
attrs?: any,
|
||||
slots?: T extends { $slots: infer Slots } ? Slots : Record<string, any>,
|
||||
emit?: T extends { $emit: infer Emit } ? Emit : {},
|
||||
props?: (T extends { $props: infer Props } ? Props : {}) & Record<string, unknown>,
|
||||
expose?: (exposed: T) => void,
|
||||
}
|
||||
};
|
||||
type __VLS_NormalizeSlotReturns<S, R = NonNullable<S> extends (...args: any) => infer K ? K : any> = R extends any[] ? {
|
||||
[K in keyof R]: R[K] extends infer V
|
||||
? V extends Element ? V
|
||||
: V extends new (...args: any) => infer R ? ReturnType<__VLS_FunctionalComponent<R>>
|
||||
: V extends (...args: any) => infer R ? R
|
||||
: any
|
||||
: never
|
||||
} : R;
|
||||
type __VLS_IsFunction<T, K> = K extends keyof T
|
||||
? __VLS_IsAny<T[K]> extends false
|
||||
? unknown extends T[K]
|
||||
@ -35,13 +55,13 @@ export {};
|
||||
: true
|
||||
: false
|
||||
: false;
|
||||
type __VLS_NormalizeComponentEvent<Props, Events, onEvent extends keyof Props, Event extends keyof Events, CamelizedEvent extends keyof Events> = (
|
||||
type __VLS_NormalizeComponentEvent<Props, Emits, onEvent extends keyof Props, Event extends keyof Emits, CamelizedEvent extends keyof Emits> = (
|
||||
__VLS_IsFunction<Props, onEvent> extends true
|
||||
? Props
|
||||
: __VLS_IsFunction<Events, Event> extends true
|
||||
? { [K in onEvent]?: Events[Event] }
|
||||
: __VLS_IsFunction<Events, CamelizedEvent> extends true
|
||||
? { [K in onEvent]?: Events[CamelizedEvent] }
|
||||
: __VLS_IsFunction<Emits, Event> extends true
|
||||
? { [K in onEvent]?: Emits[Event] }
|
||||
: __VLS_IsFunction<Emits, CamelizedEvent> extends true
|
||||
? { [K in onEvent]?: Emits[CamelizedEvent] }
|
||||
: Props
|
||||
) & Record<string, unknown>;
|
||||
// fix https://github.com/vuejs/language-tools/issues/926
|
||||
@ -67,11 +87,16 @@ export {};
|
||||
}
|
||||
>
|
||||
>;
|
||||
type __VLS_PrettifyGlobal<T> = { [K in keyof T]: T[K]; } & {};
|
||||
type __VLS_PickFunctionalComponentCtx<T, K> = NonNullable<__VLS_PickNotAny<
|
||||
'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: infer Ctx } ? Ctx : never : any
|
||||
, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any
|
||||
>>;
|
||||
type __VLS_ResolveEmits<
|
||||
Comp,
|
||||
Emits,
|
||||
TypeEmits = Comp extends { __typeEmits?: infer T } ? unknown extends T ? {} : import('vue').ShortEmitsToObject<T> : {},
|
||||
NormalizedEmits = __VLS_NormalizeEmits<Emits> extends infer E ? string extends keyof E ? {} : E : never,
|
||||
> = __VLS_SpreadMerge<NormalizedEmits, TypeEmits>;
|
||||
type __VLS_ResolveDirectives<T> = {
|
||||
[K in Exclude<keyof T, keyof __VLS_GlobalDirectives> & string as `v${Capitalize<K>}`]: T[K];
|
||||
};
|
||||
type __VLS_PrettifyGlobal<T> = { [K in keyof T as K]: T[K]; } & {};
|
||||
type __VLS_UseTemplateRef<T> = Readonly<import('vue').ShallowRef<T | null>>;
|
||||
|
||||
function __VLS_getVForSourceType<T extends number | string | any[] | Iterable<any>>(source: T): [
|
||||
@ -87,10 +112,8 @@ export {};
|
||||
key: keyof T,
|
||||
index: number,
|
||||
][];
|
||||
// @ts-ignore
|
||||
function __VLS_getSlotParams<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>;
|
||||
// @ts-ignore
|
||||
function __VLS_getSlotParam<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0];
|
||||
function __VLS_getSlotParameters<S, D extends S>(slot: S, decl?: D):
|
||||
__VLS_PickNotAny<NonNullable<D>, (...args: any) => any> extends (...args: infer P) => any ? P : any[];
|
||||
function __VLS_asFunctionalDirective<T>(dir: T): T extends import('vue').ObjectDirective
|
||||
? NonNullable<T['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']>
|
||||
: T extends (...args: any) => any
|
||||
@ -98,19 +121,10 @@ export {};
|
||||
: (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void;
|
||||
function __VLS_makeOptional<T>(t: T): { [K in keyof T]?: T[K] };
|
||||
function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K):
|
||||
T extends new (...args: any) => any
|
||||
? (props: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>, ctx?: any) => __VLS_Element & {
|
||||
__ctx?: {
|
||||
attrs?: any;
|
||||
slots?: K extends { $slots: infer Slots } ? Slots : any;
|
||||
emit?: K extends { $emit: infer Emit } ? Emit : any;
|
||||
expose?(exposed: K): void;
|
||||
props?: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>;
|
||||
}
|
||||
}
|
||||
T extends new (...args: any) => any ? __VLS_FunctionalComponent<K>
|
||||
: T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>
|
||||
: T extends (...args: any) => any ? T
|
||||
: (_: {} & Record<string, unknown>, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record<string, unknown> } };
|
||||
: __VLS_FunctionalComponent<{}>;
|
||||
function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): 2 extends Parameters<T>['length'] ? [any] : [];
|
||||
function __VLS_asFunctionalElement<T>(tag: T, endTag?: T): (attrs: T & Record<string, unknown>) => void;
|
||||
function __VLS_asFunctionalSlot<S>(slot: S): S extends () => infer R ? (props: {}) => R : NonNullable<S>;
|
||||
|
@ -320,11 +320,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "/home/device/status/addProgram",
|
||||
"path": "home/device/status/addProgram",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加节目"
|
||||
"navigationBarTitleText": "添加节目"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}, {
|
||||
|
@ -8,7 +8,7 @@
|
||||
</view>
|
||||
<view class="register" @click="handleRegister()" v-if="formIndex===0">{{$tt('register.registration')}}
|
||||
</view>
|
||||
<image class="img" src="https://iot-xcwl.cn/doc/photo/logo.jpg" mode="widthFix"></image>
|
||||
<image class="img" src="https://xaznkj.cn/doc/photo/logo.jpg" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="main-wrap">
|
||||
<view v-if="formIndex==0">
|
||||
@ -152,7 +152,7 @@
|
||||
<view class="one-click-login-pop-wrap">
|
||||
<u-popup :show="isShowPop" mode="bottom" :round="10" closeable="true" @close="isShowPop = false">
|
||||
<view class="content-wrap">
|
||||
<u--image :showLoading="true" src="https://iot-xcwl.cn/app/fastbee1_blue.png" width="260rpx"
|
||||
<u--image :showLoading="true" src="https://xaznkj.cn/app/fastbee1_blue.png" width="260rpx"
|
||||
height="90rpx" customStyle="float:left"></u--image>
|
||||
<text class="title">{{$tt("login.welcomeToLogin")}}</text>
|
||||
<view class="btn-login">
|
||||
|
@ -86,7 +86,7 @@
|
||||
<u-loadmore :status="loadmoreStatus" v-if="total > queryParams.pageSize" marginTop="20" />
|
||||
</scroll-view>
|
||||
</view>
|
||||
<u-loading-page :loading="loading" bg-color="#eef3f7" loadingText="iot-xcwl.cn"></u-loading-page>
|
||||
<u-loading-page :loading="loading" bg-color="#eef3f7" loadingText="xaznkj.cn"></u-loading-page>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -203,7 +203,7 @@
|
||||
<u-modal :show="modal.show" :content="modal.content" @confirm="confirm" @cancel="cancel"
|
||||
:showConfirmButton="modal.showConfirmButton" showCancelButton></u-modal>
|
||||
<u-loading-page style="z-index: 98" :loading="loading" bg-color="#eef3f7"
|
||||
loadingText="iot-xcwl.cn"></u-loading-page>
|
||||
loadingText="xaznkj.cn"></u-loading-page>
|
||||
<u-modal :show="openAlert" :content="$tt('home.content')" @confirm="gotoLogin"
|
||||
@cancel="() => openAlert = false" showCancelButton></u-modal>
|
||||
</view>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<view class="navbar h5">
|
||||
<view class="navbar-left" @click="toggleSearchMode">
|
||||
<view v-if="!isSearching" class="logo">
|
||||
<image src="https://iot-xcwl.cn/doc/photo/750.png" mode="widthFix" style="width: 260rpx;">
|
||||
<image src="https://xaznkj.cn/doc/photo/750.png" mode="widthFix" style="width: 260rpx;">
|
||||
</image>
|
||||
</view>
|
||||
<view v-else class="icon"></view>
|
||||
@ -25,7 +25,7 @@
|
||||
<view class="navbar weixin">
|
||||
<view class="navbar-left" @click="toggleSearchMode">
|
||||
<view v-if="!isSearching" class="logo">
|
||||
<image src="https://iot-xcwl.cn/doc/photo/750.png" mode="widthFix" style="width: 260rpx;">
|
||||
<image src="https://xaznkj.cn/doc/photo/750.png" mode="widthFix" style="width: 260rpx;">
|
||||
</image>
|
||||
</view>
|
||||
<view v-else class="icon"></view>
|
||||
@ -50,7 +50,7 @@
|
||||
<view class="navbar app">
|
||||
<view class="navbar-left" @click="toggleSearchMode">
|
||||
<view v-if="!isSearching" class="logo">
|
||||
<image src="https://iot-xcwl.cn/doc/photo/750.png" mode="widthFix" style="width: 260rpx;">
|
||||
<image src="https://xaznkj.cn/doc/photo/750.png" mode="widthFix" style="width: 260rpx;">
|
||||
</image>
|
||||
</view>
|
||||
<view v-else class="icon"></view>
|
||||
@ -179,7 +179,7 @@
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
margin-left: 6px;
|
||||
background-image: url('https://iot-xcwl.cn/doc/photo/logo.png');
|
||||
background-image: url('https://xaznkj.cn/doc/photo/logo.png');
|
||||
background-size: cover;
|
||||
filter: drop-shadow(0 2rpx 4rpx rgba(0, 0, 0, 0.2));
|
||||
animation: scaleUp 0.5s ease;
|
||||
|
@ -46,7 +46,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<u-empty mode="data" :show="listSwiper.length === 0 && list.length === 0" marginTop="30"></u-empty>
|
||||
<u-loading-page :loading="loading" bg-color="#eef3f7" loadingText="iot-xcwl.cn"></u-loading-page>
|
||||
<u-loading-page :loading="loading" bg-color="#eef3f7" loadingText="xaznkj.cn"></u-loading-page>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -193,6 +193,19 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'AddProgram',
|
||||
onLoad() {
|
||||
// 从本地存储获取设备信息
|
||||
const device = uni.getStorageSync('currentDevice');
|
||||
const deviceInfo = uni.getStorageSync('currentDeviceInfo');
|
||||
|
||||
if (device) {
|
||||
this.device = device;
|
||||
}
|
||||
if (deviceInfo) {
|
||||
this.deviceInfo = deviceInfo;
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
this.$nextTick(() => {
|
||||
this.initializeAnimations();
|
||||
@ -210,6 +223,8 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
device: null,
|
||||
deviceInfo: null,
|
||||
screenWidth: 32,
|
||||
screenHeight: 64,
|
||||
// picker弹窗控制
|
||||
@ -229,8 +244,10 @@
|
||||
showStayTimePicker: false,
|
||||
// 选项数组
|
||||
playTypes: ['文字', '图片'],
|
||||
modes: ['模式1', '模式2(上下)', '模式3(左右)', '模式4(上中下)', '模式5', '模式6'],
|
||||
commonPhrases: ['自定义', "公安交警正在巡逻",
|
||||
modes: ['模式1', '模式2(上下)', '模式3(左右)', '模式1114(上中下)', '模式5', '模式6'],
|
||||
commonPhrases: [
|
||||
'自定义',
|
||||
"公安交警正在巡逻",
|
||||
"公安交警停车检查",
|
||||
"前方事故减速慢行",
|
||||
"警察临检请您配合",
|
||||
@ -249,7 +266,7 @@
|
||||
],
|
||||
fonts: ['宋体(中)', '黑体(中)', '楷体(中)'],
|
||||
fontShapes: ['圆角(英)', '直角(英)'],
|
||||
fontSizes: ['16px', '24px', '32px'],
|
||||
fontSizes: ['16px', '24px', '32px', '48px', '64px'],
|
||||
fontColors: ['红色', '绿色', '蓝色'],
|
||||
fontBold: ['不加粗', '加粗'],
|
||||
fontStretch: ['不拉伸', '横向拉伸', '纵向拉伸'],
|
||||
@ -799,7 +816,20 @@
|
||||
this.$u.toast('读取功能待实现');
|
||||
},
|
||||
onSet() {
|
||||
this.$u.toast('设置功能待实现');
|
||||
// 构建要发送的数据
|
||||
const programData = {
|
||||
form: this.form,
|
||||
device: this.device,
|
||||
deviceInfo: this.deviceInfo
|
||||
};
|
||||
|
||||
// 发送数据到父页面
|
||||
uni.$emit('programDataReady', programData);
|
||||
|
||||
this.$u.toast('设置成功');
|
||||
|
||||
// 返回上一页
|
||||
uni.navigateBack();
|
||||
},
|
||||
mapFont(index) {
|
||||
return ['SimSun', 'SimHei', 'KaiTi'][index] || 'SimSun';
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-loading-page :loading="loading" bg-color="#eef3f7" loadingText="iot-xcwl.cn"></u-loading-page>
|
||||
<u-loading-page :loading="loading" bg-color="#eef3f7" loadingText="xaznkj.cn"></u-loading-page>
|
||||
<view class="card" v-show="!loading">
|
||||
<view class="status-title">{{title}}</view>
|
||||
<view style="padding:20rpx;">
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -7,10 +7,10 @@
|
||||
<u--form labelPosition="left" labelWidth="100"
|
||||
:labelStyle="{ marginRight: '16px', lineHeight: '32px', width: '50px', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', color: '#000000' }">
|
||||
<view class="version-wrap">
|
||||
<u-form-item :label="$tt('status.deviceVersion') || '设备版本'">
|
||||
<u-form-item :label="$tt('status.deviceVersion')">
|
||||
<u-row>
|
||||
<u-col span="8">
|
||||
<u--text :text="'Version' + (device.firmwareVersion || '')"></u--text>
|
||||
<u--text :text="'Version ' + device.firmwareVersion"></u--text>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</u-form-item>
|
||||
@ -19,270 +19,302 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- Webview容器 -->
|
||||
<view class="webview-container">
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<web-view :src="fullUrl" @message="handleWebviewMessage" ref="webview"></web-view>
|
||||
<!-- #endif -->
|
||||
<!-- 网关信息卡片 -->
|
||||
<view class="card gateway-info">
|
||||
<view class="section-title">网关信息</view>
|
||||
<view class="info-content">
|
||||
<view class="info-grid">
|
||||
<view class="info-item">
|
||||
<text class="info-label">设备名称</text>
|
||||
<text class="info-value">{{ device.deviceName || '未命名' }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="info-label">设备ID</text>
|
||||
<text class="info-value">{{ device.deviceId || '未知' }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="info-label">序列号</text>
|
||||
<text class="info-value">{{ device.serialNumber || '未知' }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="info-label">产品ID</text>
|
||||
<text class="info-value">{{ device.productId || '未知' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- #ifdef H5 -->
|
||||
<iframe :src="fullUrl" frameborder="0" class="h5-iframe" @load="iframeLoaded"></iframe>
|
||||
<!-- #endif -->
|
||||
<!-- 子设备分段控制器 -->
|
||||
<view class="subsection-container">
|
||||
<view class="subsection-header">
|
||||
<text class="subsection-title">子设备管理</text>
|
||||
<view class="subdevice-status">
|
||||
<view class="status-item">
|
||||
<view class="status-dot online"></view>
|
||||
<text>声卡在线</text>
|
||||
</view>
|
||||
<view class="status-item">
|
||||
<view class="status-dot online"></view>
|
||||
<text>显卡在线</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-subsection
|
||||
:list="subsectionList"
|
||||
:current="currentSubsection"
|
||||
@change="onSubsectionChange"
|
||||
activeColor="#2979ff"
|
||||
inactiveColor="#666"
|
||||
:fontSize="28"
|
||||
:height="80"
|
||||
:bold="true"
|
||||
:styleType="'button'"
|
||||
></u-subsection>
|
||||
</view>
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<web-view id="wxWebview" :src="fullUrl" @message="handleWebviewMessage" @load="wxWebviewLoaded"
|
||||
@error="wxWebviewError"></web-view>
|
||||
<!-- #endif -->
|
||||
<!-- 子设备内容区域 -->
|
||||
<view class="subdevice-content">
|
||||
<!-- 声卡子设备 -->
|
||||
<view v-if="currentSubsection === 0" class="subdevice-panel">
|
||||
<voice-control :device="device"></voice-control>
|
||||
</view>
|
||||
|
||||
<!-- 显卡子设备 -->
|
||||
<view v-if="currentSubsection === 1" class="subdevice-panel">
|
||||
<display-control :device="device"></display-control>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'gateway-control',
|
||||
props: {
|
||||
device: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
deviceId: '',
|
||||
serialNumber: '',
|
||||
firmwareVersion: '',
|
||||
status: 0,
|
||||
isShadow: 0,
|
||||
thingsModels: []
|
||||
}),
|
||||
required: true
|
||||
import VoiceControl from './voice.vue';
|
||||
import DisplayControl from './display.vue';
|
||||
|
||||
export default {
|
||||
name: 'GatewayControl',
|
||||
components: {
|
||||
VoiceControl,
|
||||
DisplayControl
|
||||
},
|
||||
props: {
|
||||
device: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '设备离线',
|
||||
currentSubsection: 0,
|
||||
subsectionList: [
|
||||
{
|
||||
text: '声卡',
|
||||
icon: 'volume',
|
||||
description: '音频控制'
|
||||
},
|
||||
{
|
||||
text: '显卡',
|
||||
icon: 'eye',
|
||||
description: '显示控制'
|
||||
}
|
||||
],
|
||||
deviceInfo: {
|
||||
chartList: [],
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '设备离线',
|
||||
baseUrl: 'https://iot-xcwl.cn/h5/index.html',
|
||||
wxWebviewReady: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
fullUrl() {
|
||||
if (!this.device?.deviceId || !this.device?.serialNumber) {
|
||||
console.error('设备ID或序列号未定义', this.device);
|
||||
return this.baseUrl;
|
||||
}
|
||||
|
||||
const productParamModel = this.device.thingsModels?.find(model => model.id === 'productpram');
|
||||
let paramData = productParamModel?.shadow || '';
|
||||
if (typeof paramData === 'string' && paramData.startsWith('JSON=')) {
|
||||
paramData = paramData.substring(5);
|
||||
}
|
||||
const paramDataString = typeof paramData === 'string' ? paramData : JSON.stringify(paramData || {});
|
||||
|
||||
return `${this.baseUrl}?deviceId=${encodeURIComponent(this.device.deviceId)}&serialNumber=${encodeURIComponent(this.device.serialNumber)}&initialData=${encodeURIComponent(paramDataString)}`;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.updateDeviceStatus(this.device);
|
||||
this.mqttCallback();
|
||||
|
||||
// 监听来自 H5 的消息
|
||||
uni.$on('h5Message', this.handleH5Message);
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 移除监听器,防止内存泄漏
|
||||
uni.$off('h5Message', this.handleH5Message);
|
||||
|
||||
if (this.messageListener) {
|
||||
window.removeEventListener('message', this.messageListener);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 微信 webview 加载完成
|
||||
wxWebviewLoaded() {
|
||||
console.log('微信webview加载完成');
|
||||
this.wxWebviewReady = true;
|
||||
this.sendInitialDataToWebview();
|
||||
},
|
||||
|
||||
// 获取 webview 组件
|
||||
getWebviewComponent() {
|
||||
const pages = getCurrentPages();
|
||||
const currentPage = pages[pages.length - 1];
|
||||
return currentPage.selectComponent('#wxWebview');
|
||||
},
|
||||
|
||||
// 发送初始数据到 webview
|
||||
sendInitialDataToWebview() {
|
||||
const productParamModel = this.device.thingsModels?.find(model => model.id === 'productpram');
|
||||
if (!productParamModel) {
|
||||
console.warn('未找到 productpram 模型');
|
||||
return;
|
||||
}
|
||||
|
||||
let paramData = productParamModel.shadow || '';
|
||||
if (typeof paramData === 'string' && paramData.startsWith('JSON=')) {
|
||||
paramData = paramData.substring(5);
|
||||
}
|
||||
const paramDataString = typeof paramData === 'string' ? paramData : JSON.stringify(paramData || {});
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
const component = this.getWebviewComponent();
|
||||
if (component) {
|
||||
component.postMessage({
|
||||
type: 'initialData',
|
||||
data: paramDataString,
|
||||
timestamp: Date.now()
|
||||
});
|
||||
console.log('【微信小程序】发送初始数据成功:', paramDataString);
|
||||
} else {
|
||||
console.error('获取 webview 组件失败');
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
if (this.$refs.webview) {
|
||||
this.$refs.webview.postMessage({
|
||||
type: 'initialData',
|
||||
data: paramDataString,
|
||||
timestamp: Date.now()
|
||||
});
|
||||
console.log('【APP】发送初始数据成功:', paramDataString);
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
const iframe = document.querySelector('.h5-iframe');
|
||||
if (iframe && iframe.contentWindow) {
|
||||
iframe.contentWindow.postMessage({
|
||||
type: 'initialData',
|
||||
data: paramDataString,
|
||||
timestamp: Date.now()
|
||||
}, '*');
|
||||
console.log('【H5】发送初始数据成功:', paramDataString);
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
|
||||
// 不加任何判断,收到啥就打印啥
|
||||
handleWebviewMessage(e) {
|
||||
console.log('【小程序】收到 H5 消息:', e);
|
||||
|
||||
let messageData = null;
|
||||
|
||||
// 处理不同平台的消息格式
|
||||
// #ifdef MP-WEIXIN
|
||||
messageData = e.detail.data; // 直接取整个对象
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS || H5
|
||||
messageData = e.data || e.detail?.data?.[0] || e.detail.data;
|
||||
// #endif
|
||||
|
||||
if (!messageData) {
|
||||
console.warn('无法解析的消息格式', e);
|
||||
return;
|
||||
}
|
||||
|
||||
// 不管是什么类型,都先打印出来
|
||||
console.log('【小程序】原始消息内容:', messageData);
|
||||
|
||||
// 使用 uni.$emit 广播消息
|
||||
uni.$emit('h5Message', messageData);
|
||||
},
|
||||
|
||||
// 接收 H5 消息的回调
|
||||
handleH5Message(message) {
|
||||
console.log('【uni.$on】接收到 H5 消息:', message);
|
||||
|
||||
if (message.type === 'mqtt_data') {
|
||||
console.log('处理 mqtt_data 消息:', message.payload);
|
||||
// 这里可以执行业务逻辑,例如 MQTT 发布等
|
||||
}
|
||||
},
|
||||
|
||||
// 更新设备状态
|
||||
updateDeviceStatus(device) {
|
||||
if (!device) {
|
||||
this.title = '设备未连接';
|
||||
return;
|
||||
}
|
||||
|
||||
if (device.status === 3) {
|
||||
this.title = this.$tt('status.online') || '在线';
|
||||
} else {
|
||||
this.title = device.isShadow === 1 ?
|
||||
(this.$tt('status.shadow') || '影子模式') :
|
||||
(this.$tt('status.deviceOffline') || '离线');
|
||||
}
|
||||
},
|
||||
|
||||
// MQTT 状态监听
|
||||
mqttCallback() {
|
||||
if (!this.$mqttTool?.client) {
|
||||
console.warn('MQTT客户端未初始化');
|
||||
return;
|
||||
}
|
||||
|
||||
this.$mqttTool.client.removeAllListeners('message');
|
||||
|
||||
this.$mqttTool.client.on('message', (topic, message, buffer) => {
|
||||
const topics = topic.split('/');
|
||||
if (this.device.serialNumber !== topics[2]) return;
|
||||
|
||||
const msg = JSON.parse(message.toString());
|
||||
if (topics[3] === 'status') {
|
||||
this.device.status = msg.status;
|
||||
this.device.isShadow = msg.isShadow;
|
||||
this.device.rssi = msg.rssi;
|
||||
this.updateDeviceStatus(this.device);
|
||||
}
|
||||
});
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
device: function(newVal, oldVal) {
|
||||
if (newVal.deviceName !== '') {
|
||||
this.deviceInfo = newVal;
|
||||
this.updateDeviceStatus(this.deviceInfo);
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
if (this.device !== null && Object.keys(this.device).length !== 0) {
|
||||
this.deviceInfo = this.device;
|
||||
this.updateDeviceStatus(this.deviceInfo);
|
||||
};
|
||||
this.mqttCallback();
|
||||
},
|
||||
methods: {
|
||||
onSubsectionChange(index) {
|
||||
this.currentSubsection = index;
|
||||
console.log('切换到子设备:', this.subsectionList[index].text);
|
||||
},
|
||||
mqttCallback() {
|
||||
this.$mqttTool.client.on('message', (topic, message, buffer) => {
|
||||
let topics = topic.split('/');
|
||||
let productId = topics[1];
|
||||
let deviceNum = topics[2];
|
||||
message = JSON.parse(message.toString());
|
||||
if (topics[3] == 'status') {
|
||||
if (this.deviceInfo.serialNumber == deviceNum) {
|
||||
this.deviceInfo.status = message.status;
|
||||
this.deviceInfo.isShadow = message.isShadow;
|
||||
this.deviceInfo.rssi = message.rssi;
|
||||
this.updateDeviceStatus(this.deviceInfo);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
updateDeviceStatus(device) {
|
||||
if (device.status === 3) {
|
||||
this.title = this.$tt('status.online');
|
||||
} else {
|
||||
this.title = device.isShadow === 1 ? this.$tt('status.shadow') : this.$tt('status.deviceOffline');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* 保持原有样式不变 */
|
||||
.gateway-container {
|
||||
padding: 20rpx;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.gateway-container {
|
||||
padding: 24rpx;
|
||||
background-color: #f5f7fa;
|
||||
min-height: 100vh;
|
||||
font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
|
||||
|
||||
.card {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.card {
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 24rpx;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||
overflow: hidden;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
.webview-container {
|
||||
flex: 1;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
border-radius: 20rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.h5-iframe {
|
||||
width: 100%;
|
||||
height: 600px;
|
||||
}
|
||||
}
|
||||
|
||||
.status-titletop {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
line-height: 42rpx;
|
||||
text-align: left;
|
||||
padding: 15rpx 28rpx;
|
||||
}
|
||||
|
||||
.version-wrap {
|
||||
background-color: #F7F7F7;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 42rpx;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
line-height: 42rpx;
|
||||
&:hover {
|
||||
box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.status-titletop {
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
color: #333333;
|
||||
line-height: 42rpx;
|
||||
text-align: left;
|
||||
padding: 15rpx 28rpx;
|
||||
background-color: #eef6ff;
|
||||
border-bottom: 1rpx solid #dceaff;
|
||||
}
|
||||
|
||||
.version-wrap {
|
||||
background-color: #F7F7F7;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 42rpx;
|
||||
font-size: 24rpx;
|
||||
color: #000000;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
|
||||
.subsection-container {
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 24rpx;
|
||||
padding: 20rpx;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
.subsection-header {
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.subsection-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.subdevice-status {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
|
||||
.status-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
|
||||
.status-dot {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
border-radius: 50%;
|
||||
|
||||
&.online {
|
||||
background-color: #52c41a;
|
||||
box-shadow: 0 0 8rpx rgba(82, 196, 26, 0.4);
|
||||
}
|
||||
|
||||
&.offline {
|
||||
background-color: #ff4d4f;
|
||||
box-shadow: 0 0 8rpx rgba(255, 77, 79, 0.4);
|
||||
}
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.subdevice-content {
|
||||
.subdevice-panel {
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.gateway-info {
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 24rpx;
|
||||
padding: 20rpx;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
.section-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
padding: 24rpx 24rpx 16rpx;
|
||||
border-bottom: 1rpx solid #f0f2f5;
|
||||
}
|
||||
|
||||
.info-content {
|
||||
padding: 24rpx;
|
||||
|
||||
.info-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 20rpx;
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8rpx;
|
||||
|
||||
.info-label {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -64,7 +64,7 @@
|
||||
this.isSubDev = newVal.subDeviceList && newVal.subDeviceList.length > 0;
|
||||
this.isRelayProduct = newVal.productName === '多路控制器';
|
||||
this.isVoiceProduct = newVal.productName === '声卡';
|
||||
this.isGatewayProduct = newVal.productName === '网关卡兼容';
|
||||
this.isGatewayProduct = newVal.productName === '网关';
|
||||
this.isdisplay = newVal.productName === '显卡设置';
|
||||
|
||||
|
||||
@ -92,8 +92,7 @@
|
||||
this.isRelayProduct = this.device.productName === '继电器测试';
|
||||
this.isVoiceProduct = this.device.productName === '声卡';
|
||||
this.isGatewayProduct = this.device.productName === '网关卡兼容';
|
||||
this.isdisplay = newVal.productName === '显卡设置';
|
||||
|
||||
this.isdisplay = this.device.productName === '显卡设置';
|
||||
console.log("create的数据", JSON.stringify(this.deviceInfo))
|
||||
|
||||
},
|
||||
|
@ -137,7 +137,7 @@
|
||||
</u--form>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-loading-page :loading="loading" bg-color="#eef3f7" loadingText="iot-xcwl.cn"></u-loading-page>
|
||||
<u-loading-page :loading="loading" bg-color="#eef3f7" loadingText="xaznkj.cn"></u-loading-page>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<!-- 音量控制 -->
|
||||
<view class="volume-slider">
|
||||
<view class="volume-icon">
|
||||
<image src="https://iot-xcwl.cn/doc/photo/voice.svg" mode="aspectFit" class="volume-svg">
|
||||
<image src="https://xaznkj.cn/doc/photo/voice.svg" mode="aspectFit" class="volume-svg">
|
||||
</image>
|
||||
</view>
|
||||
<view class="slider-container">
|
||||
@ -56,7 +56,7 @@
|
||||
<view class="card audio-list">
|
||||
<view class="section-title">
|
||||
<text>音频列表</text>
|
||||
<image src="https://iot-xcwl.cn/doc/photo/add.svg" mode="aspectFit" class="add-icon"
|
||||
<image src="https://xaznkj.cn/doc/photo/add.svg" mode="aspectFit" class="add-icon"
|
||||
@click="showAddAudioModal"></image>
|
||||
</view>
|
||||
<view class="list-container">
|
||||
@ -81,7 +81,7 @@
|
||||
<view class="card default-list">
|
||||
<view class="section-title">
|
||||
<text>播放列表</text>
|
||||
<image src="https://iot-xcwl.cn/doc/photo/add.svg" mode="aspectFit" class="add-icon"
|
||||
<image src="https://xaznkj.cn/doc/photo/add.svg" mode="aspectFit" class="add-icon"
|
||||
@click="showAddDefaultModal"></image>
|
||||
</view>
|
||||
<view class="list-container">
|
||||
@ -118,7 +118,7 @@
|
||||
<view class="recorder-status">
|
||||
<view class="status-indicator" :class="{ recording: isRecording }">
|
||||
<image
|
||||
:src="isRecording ? 'https://iot-xcwl.cn/doc/photo/recording.png' : 'https://iot-xcwl.cn/doc/photo/record.png'"
|
||||
:src="isRecording ? 'https://xaznkj.cn/doc/photo/recording.png' : 'https://xaznkj.cn/doc/photo/record.png'"
|
||||
class="mic-img" mode="aspectFit" />
|
||||
</view>
|
||||
<text class="status-text">{{ recordingStatus }}</text>
|
||||
@ -134,7 +134,7 @@
|
||||
<view class="talk-button" :class="{ recording: isRecording }" @touchstart="startRecording"
|
||||
@touchend="stopRecording" @touchcancel="cancelRecording">
|
||||
<image
|
||||
:src="isRecording ? 'https://iot-xcwl.cn/doc/photo/micred.png' : 'https://iot-xcwl.cn/doc/photo/mic.png'"
|
||||
:src="isRecording ? 'https://xaznkj.cn/doc/photo/micred.png' : 'https://xaznkj.cn/doc/photo/mic.png'"
|
||||
class="mic-img" mode="aspectFit" />
|
||||
<text>{{ isRecording ? '录音中...' : '按住说话' }}</text>
|
||||
</view>
|
||||
@ -402,7 +402,7 @@
|
||||
this.recordingStatus = '上传中...';
|
||||
|
||||
// 在 uni-app 中直接使用 uni.uploadFile,不需要 FormData
|
||||
const uploadUrl = 'https://iot-xcwl.cn/common/upload/audio';
|
||||
const uploadUrl = 'https://xaznkj.cn/common/upload/audio';
|
||||
const token =
|
||||
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImU3MWM2OTg4LTNlMzMtNDYyMy05M2M3LWE4YzZmMTNlMjZkZSJ9.wgsL8b3WDmyuesG8JTA3LcNFp2FigkB90h6Inwxt7OFadH6rc5np5TjAyU1pzU2_b5cmG8BYXMEdAqEdJzoDcA';
|
||||
|
||||
|
@ -74,7 +74,7 @@
|
||||
:nomoreText="$tt('timing.nothing')" marginTop="20" @loadmore="loadMoreLogs" />
|
||||
<u-empty mode="data" :show="total === 0" marginTop="60" :text="$tt('timing.emptyNull')"></u-empty>
|
||||
</view>
|
||||
<u-loading-page :loading="loading" loadingText="iot-xcwl.cn" bg-color="#eef3f7"></u-loading-page>
|
||||
<u-loading-page :loading="loading" loadingText="xaznkj.cn" bg-color="#eef3f7"></u-loading-page>
|
||||
|
||||
<view class="other">
|
||||
<u-modal :show="isModal" :title="modalTitle" :content="modalContent" @confirm="modalConfirm"
|
||||
|
@ -42,7 +42,7 @@
|
||||
<u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png" :show="total === 0"
|
||||
marginTop="30"></u-empty>
|
||||
<u-loadmore :status="loadmoreStatus" v-if="total > 0" marginTop="20" />
|
||||
<u-loading-page :loading="loading" bg-color="#eef3f7" loadingText="iot-xcwl.cn"></u-loading-page>
|
||||
<u-loading-page :loading="loading" bg-color="#eef3f7" loadingText="xaznkj.cn"></u-loading-page>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
||||
|
||||
<u-empty mode="list" :show="total === 0" marginTop="30"></u-empty>
|
||||
<u-loadmore :status="loadmoreStatus" v-if="total > 0" marginTop="20" />
|
||||
<u-loading-page :loading="loading" bg-color="#eef3f7" loadingText="iot-xcwl.cn"></u-loading-page>
|
||||
<u-loading-page :loading="loading" bg-color="#eef3f7" loadingText="xaznkj.cn"></u-loading-page>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="bind-login-wrap">
|
||||
<view class="top-wrap">
|
||||
<image src="https://iot-xcwl.cn/app/fastbee1_blue.png" mode="widthFix" style="width: 500rpx;"></image>
|
||||
<image src="https://xaznkj.cn/app/fastbee1_blue.png" mode="widthFix" style="width: 500rpx;"></image>
|
||||
</view>
|
||||
<view class="main-wrap">
|
||||
<u--text size="18" type="info" bold margin="20rpx 0" :text="$tt('bindLogin.bindLogin')"></u--text>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<view class="back-btn">
|
||||
<u-icon name="arrow-left" color="#333333" size="18" @click="handleBack()"></u-icon>
|
||||
</view>
|
||||
<image class="img" src="https://iot-xcwl.cn/app/fastbee1_blue.png" mode="widthFix"></image>
|
||||
<image class="img" src="https://xaznkj.cn/app/fastbee1_blue.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="main-wrap">
|
||||
<view>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<u-icon name="arrow-left" color="#333333" size="18" @click="handleBack()"></u-icon>
|
||||
</view>
|
||||
<view class="register" @click="handleRegister()">{{$tt('register.registration')}}</view>
|
||||
<image class="img" src="https://iot-xcwl.cn/app/fastbee1_blue.png" mode="widthFix"></image>
|
||||
<image class="img" src="https://xaznkj.cn/app/fastbee1_blue.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="main-wrap">
|
||||
<view>
|
||||
@ -77,7 +77,7 @@
|
||||
<view class="one-click-login-pop-wrap">
|
||||
<u-popup :show="isShowPop" mode="bottom" :round="10" closeable="true" @close="isShowPop = false">
|
||||
<view class="content-wrap">
|
||||
<u--image :showLoading="true" src="https://iot-xcwl.cn/app/fastbee1_blue.png" width="260rpx"
|
||||
<u--image :showLoading="true" src="https://xaznkj.cn/app/fastbee1_blue.png" width="260rpx"
|
||||
height="90rpx" customStyle="float:left"></u--image>
|
||||
<text class="title">{{$tt("login.welcomeToLogin")}}</text>
|
||||
<view class="btn-login">
|
||||
|
@ -4,7 +4,7 @@
|
||||
<view class="top-wrap">
|
||||
<view class="user-register" @click="handleRegister()">{{$tt('register.registration')}}</view>
|
||||
<view class="bounce-in-top">
|
||||
<image src="https://iot-xcwl.cn/app/fastbee1_blue.png" mode="widthFix" style="width: 290rpx;">
|
||||
<image src="https://xaznkj.cn/app/fastbee1_blue.png" mode="widthFix" style="width: 290rpx;">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -5,8 +5,8 @@
|
||||
<view class="user-about">
|
||||
<view class="list-group">
|
||||
<view style="padding: 80rpx">
|
||||
<u--image :showLoading="true" src="https://iot-xcwl.cn/app/fastbee1_blue.png" width="130px"
|
||||
height="45px" customStyle="margin:auto"></u--image>
|
||||
<u--image :showLoading="true" src="https://xaznkj.cn/app/fastbee1_blue.png" width="130px" height="45px"
|
||||
customStyle="margin:auto"></u--image>
|
||||
<u--text :text="$tt('about.open')" size="14" type="info"
|
||||
customStyle="margin:auto; margin-top:24rpx;"></u--text>
|
||||
<u--text :text="$tt('about.message')" size="14" type="info"
|
||||
|
@ -69,7 +69,7 @@
|
||||
</scroll-view>
|
||||
<u-empty mode="list" :show="total === 0 && isTriggeredTop === false" marginTop="60"></u-empty>
|
||||
</view>
|
||||
<u-loading-page :loading="loading" bg-color="rbga(0,0,0,0)" loadingText="iot-xcwl.cn"></u-loading-page>
|
||||
<u-loading-page :loading="loading" bg-color="rbga(0,0,0,0)" loadingText="xaznkj.cn"></u-loading-page>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-loading-page :loading="loading" bg-color="#eef3f7" loadingText="iot-xcwl.cn"></u-loading-page>
|
||||
<u-loading-page :loading="loading" bg-color="#eef3f7" loadingText="xaznkj.cn"></u-loading-page>
|
||||
<view class="card">
|
||||
<u-sticky>
|
||||
<view class="player-wrapper">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-loading-page :loading="loading" bg-color="#eef3f7" loadingText="iot-xcwl.cn"></u-loading-page>
|
||||
<u-loading-page :loading="loading" bg-color="#eef3f7" loadingText="xaznkj.cn"></u-loading-page>
|
||||
<view class="card">
|
||||
<u-sticky>
|
||||
<view class="player-wrapper">
|
||||
|
Loading…
x
Reference in New Issue
Block a user