引入PDA项目
This commit is contained in:
17
PDA/PDA/App.vue
Normal file
17
PDA/PDA/App.vue
Normal file
@ -0,0 +1,17 @@
|
||||
<script>
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
console.log('App Launch')
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
},
|
||||
onHide: function() {
|
||||
console.log('App Hide')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/*每个页面公共css */
|
||||
</style>
|
20
PDA/PDA/index.html
Normal file
20
PDA/PDA/index.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<title></title>
|
||||
<!--preload-links-->
|
||||
<!--app-context-->
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"><!--app-html--></div>
|
||||
<script type="module" src="/main.js"></script>
|
||||
</body>
|
||||
</html>
|
24
PDA/PDA/main.js
Normal file
24
PDA/PDA/main.js
Normal file
@ -0,0 +1,24 @@
|
||||
import App from './App'
|
||||
|
||||
|
||||
// #ifndef VUE3
|
||||
import Vue from 'vue'
|
||||
import './uni.promisify.adaptor'
|
||||
|
||||
Vue.config.productionTip = false
|
||||
App.mpType = 'app'
|
||||
const app = new Vue({
|
||||
...App
|
||||
})
|
||||
app.$mount()
|
||||
// #endif
|
||||
|
||||
// #ifdef VUE3
|
||||
import { createSSRApp } from 'vue'
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
return {
|
||||
app
|
||||
}
|
||||
}
|
||||
// #endif
|
72
PDA/PDA/manifest.json
Normal file
72
PDA/PDA/manifest.json
Normal file
@ -0,0 +1,72 @@
|
||||
{
|
||||
"name" : "PDA",
|
||||
"appid" : "__UNI__721DB64",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "3"
|
||||
}
|
17
PDA/PDA/pages.json
Normal file
17
PDA/PDA/pages.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧物流系统-移动端"
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "智慧物流系统-移动端",
|
||||
"navigationBarBackgroundColor": "#F8F8F8",
|
||||
"backgroundColor": "#F8F8F8"
|
||||
},
|
||||
"uniIdRouter": {}
|
||||
}
|
91
PDA/PDA/pages/index/index - 副本.vue
Normal file
91
PDA/PDA/pages/index/index - 副本.vue
Normal file
@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<image class="logo" src="/static/logo.png"></image>
|
||||
<view class="text-area">
|
||||
<text class="title">{{title}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
recive
|
||||
} from '../../src/libs/Broadcast.js';
|
||||
import {
|
||||
unregisterReceiver
|
||||
} from '../../src/libs/Broadcast.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: 'Hello'
|
||||
}
|
||||
},
|
||||
onShow: function() {
|
||||
const self = this; // 保存this的引用
|
||||
recive(function(res) {
|
||||
console.log("Success:"+res.data);
|
||||
self.getEquipmentInfo(res.data);
|
||||
}, function(err) {
|
||||
console.log("Error:", JSON.stringify(err)); // 正确打印错误信息
|
||||
});
|
||||
},
|
||||
onUnload: function() {
|
||||
unregisterReceiver()
|
||||
},
|
||||
methods: {
|
||||
getEquipmentInfo(encodedString) {
|
||||
|
||||
// 去除末尾的逗号和"..."(如果有的话)
|
||||
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');
|
||||
console.log("1:"+encodedString);
|
||||
// 分割字符串并转换为字节数组
|
||||
let byteStrings = encodedString.split(',');
|
||||
let byteArray = [];
|
||||
for (let byteString of byteStrings) {
|
||||
byteArray.push(parseInt(byteString, 10)); // 将字符串转换为十进制整数
|
||||
}
|
||||
console.log("2:"+encodedString);
|
||||
// 将字节数组转换为UTF-8字符串
|
||||
// 注意:这里使用了一个简单的循环来构建字符串,因为String.fromCharCode.apply可能在大数据上性能不佳
|
||||
let originalString = '';
|
||||
for (let i = 0; i < byteArray.length; i++) {
|
||||
// 对于每个字节,使用fromCharCode转换为对应的字符
|
||||
// 注意:这里假设你的字节数组已经是正确的UTF-8编码,并且不需要额外的处理来组合多字节字符
|
||||
originalString += String.fromCharCode(byteArray[i]);
|
||||
}
|
||||
console.log("3:"+originalString);
|
||||
this.title = originalString;
|
||||
console.log("4:"+this.title);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 200rpx;
|
||||
width: 200rpx;
|
||||
margin-top: 200rpx;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
|
||||
.text-area {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
color: #8f8f94;
|
||||
}
|
||||
</style>
|
96
PDA/PDA/pages/index/index.vue
Normal file
96
PDA/PDA/pages/index/index.vue
Normal file
@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<image class="logo" src="/static/logo.png"></image>
|
||||
|
||||
<view class="text-area">
|
||||
<text class="title">{{title}}</text>
|
||||
</view>
|
||||
|
||||
<view class="text-area">
|
||||
<text class="title">{{title}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
recive
|
||||
} from '../../src/libs/Broadcast.js';
|
||||
import {
|
||||
unregisterReceiver
|
||||
} from '../../src/libs/Broadcast.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: 'Hello'
|
||||
}
|
||||
},
|
||||
onShow: function() {
|
||||
const self = this; // 保存this的引用
|
||||
recive(function(res) {
|
||||
console.log("Success:"+res.data);
|
||||
self.getEquipmentInfo(res.data);
|
||||
}, function(err) {
|
||||
console.log("Error:", JSON.stringify(err)); // 正确打印错误信息
|
||||
});
|
||||
},
|
||||
onUnload: function() {
|
||||
unregisterReceiver()
|
||||
},
|
||||
methods: {
|
||||
getEquipmentInfo(encodedString) {
|
||||
|
||||
// 去除末尾的逗号和"..."(如果有的话)
|
||||
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');
|
||||
console.log("1:"+encodedString);
|
||||
// 分割字符串并转换为字节数组
|
||||
let byteStrings = encodedString.split(',');
|
||||
let byteArray = [];
|
||||
for (let byteString of byteStrings) {
|
||||
byteArray.push(parseInt(byteString, 10)); // 将字符串转换为十进制整数
|
||||
}
|
||||
console.log("2:"+encodedString);
|
||||
// 将字节数组转换为UTF-8字符串
|
||||
// 注意:这里使用了一个简单的循环来构建字符串,因为String.fromCharCode.apply可能在大数据上性能不佳
|
||||
let originalString = '';
|
||||
for (let i = 0; i < byteArray.length; i++) {
|
||||
// 对于每个字节,使用fromCharCode转换为对应的字符
|
||||
// 注意:这里假设你的字节数组已经是正确的UTF-8编码,并且不需要额外的处理来组合多字节字符
|
||||
originalString += String.fromCharCode(byteArray[i]);
|
||||
}
|
||||
console.log("3:"+originalString);
|
||||
this.title = originalString;
|
||||
console.log("4:"+this.title);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 200rpx;
|
||||
width: 200rpx;
|
||||
margin-top: 200rpx;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
|
||||
.text-area {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 50rpx;
|
||||
color: #000000;
|
||||
}
|
||||
</style>
|
113
PDA/PDA/src/libs/Broadcast.js
Normal file
113
PDA/PDA/src/libs/Broadcast.js
Normal file
@ -0,0 +1,113 @@
|
||||
var main = null;
|
||||
var receiver = null;
|
||||
//接收广播
|
||||
export function recive(success, fail) {
|
||||
|
||||
// #ifdef APP
|
||||
main = plus.android.runtimeMainActivity(); //获取activity
|
||||
//创建自定义广播实例
|
||||
receiver = plus.android.implements('io.dcloud.feature.internal.reflect.BroadcastReceiver', {
|
||||
onReceive: function(context, intent) { //实现onReceiver回调函数
|
||||
plus.android.importClass(intent); //通过intent实例引入intent类,方便以后的‘.’操作
|
||||
var action = intent.getAction()
|
||||
|
||||
var data
|
||||
switch (action) {
|
||||
case "com.android.server.scannerservice.broadcast":
|
||||
data = intent.getExtra("scannerdata");
|
||||
break
|
||||
|
||||
case "android.intent.action.SCANRESULT":
|
||||
data = intent.getExtra("value");
|
||||
break
|
||||
|
||||
case "android.intent.ACTION_DECODE_DATA":
|
||||
data = intent.getExtra("barcode_string");
|
||||
break
|
||||
|
||||
case "com.android.provider.sdlmessage":
|
||||
data = intent.getExtra("msg");
|
||||
break
|
||||
case "com.neusoft.action.scanner.read":
|
||||
|
||||
data = intent.getStringExtra("scanner_value"); //东软pda
|
||||
if (data == null) {
|
||||
data = intent.getStringExtra("Scanner_value"); //东软pda
|
||||
}
|
||||
break
|
||||
case "nlscan.action.SCANNER_RESULT":
|
||||
data = intent.getExtra("SCAN_BARCODE1");
|
||||
break
|
||||
case "com.barcode.sendBroadcast":
|
||||
data = intent.getExtra("BARCODE");
|
||||
break
|
||||
|
||||
case "scan.rcv.message":
|
||||
let barocode = intent.getByteArrayExtra("barocode");
|
||||
let barocodelen = intent.getIntExtra("length", 0);
|
||||
data = new String(barocode, 0, barocodelen);
|
||||
break
|
||||
case "xlyk.wz":
|
||||
data = intent.getExtra("qrcode");
|
||||
break
|
||||
|
||||
case "com.android.scanner.broadcast":
|
||||
data = intent.getExtra("scandata");
|
||||
break
|
||||
case "com.honeywell.scan.broadcast":
|
||||
data = intent.getExtra("data");
|
||||
break
|
||||
|
||||
|
||||
}
|
||||
if (data) {
|
||||
// console.log('zhanglp', data.replace(/\n/, ''))
|
||||
// console.log('zhanglp', data.replace(/\n/, '').replace(/\t/, ''))
|
||||
success({
|
||||
type: 'barcode',
|
||||
data: data.replace(/\n/, '').replace(/\t/, '').trim() //处理结束符和换行符为空
|
||||
})
|
||||
} else {
|
||||
|
||||
fail({
|
||||
type: 'barcode',
|
||||
data: '未识别到扫码数据' //处理结束符和换行符为空
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
var IntentFilter = plus.android.importClass('android.content.IntentFilter'); //网络
|
||||
var Intent = plus.android.importClass('android.content.Intent');
|
||||
var filter = new IntentFilter(); //过滤
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
filter.addAction("com.android.provider.sdlMessage"); //海信
|
||||
filter.addAction("com.neusoft.action.scanner.read"); //东软
|
||||
filter.addAction("nlscan.action.SCANNER_RESULT"); //新大陆 霍尼韦尔
|
||||
filter.addAction("scan.rcv.message"); //南方鸿志
|
||||
filter.addAction("com.android.server.scannerservice.broadcast"); //得实2 东大集成 扫码工具密码888888
|
||||
filter.addAction("android.intent.action.SCANRESULT"); //得实idata
|
||||
// filter.addAction("com.android.server.scannerservice.broadcast");//东大集成 扫码工具密码888888
|
||||
filter.addAction("android.intent.ACTION_DECODE_DATA"); //UROVO 优博讯科
|
||||
filter.addAction("com.barcode.sendBroadcast"); //西安富立叶微电子 F760
|
||||
filter.addAction("xlyk.wz"); //西安富立叶微电子 F760
|
||||
filter.addAction("com.android.scanner.broadcast");
|
||||
filter.addAction("com.android.scanner.broadcast");
|
||||
filter.addAction("com.honeywell.scan.broadcast");
|
||||
|
||||
|
||||
main.registerReceiver(receiver, filter); //注册监听
|
||||
// #endif
|
||||
}
|
||||
//取消监听
|
||||
export function unregisterReceiver() {
|
||||
// #ifdef APP
|
||||
console.log("取消监听广播")
|
||||
main.unregisterReceiver(receiver);
|
||||
// #endif
|
||||
}
|
BIN
PDA/PDA/static/logo.png
Normal file
BIN
PDA/PDA/static/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
13
PDA/PDA/uni.promisify.adaptor.js
Normal file
13
PDA/PDA/uni.promisify.adaptor.js
Normal file
@ -0,0 +1,13 @@
|
||||
uni.addInterceptor({
|
||||
returnValue (res) {
|
||||
if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) {
|
||||
return res;
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
res.then((res) => {
|
||||
if (!res) return resolve(res)
|
||||
return res[0] ? reject(res[0]) : resolve(res[1])
|
||||
});
|
||||
});
|
||||
},
|
||||
});
|
76
PDA/PDA/uni.scss
Normal file
76
PDA/PDA/uni.scss
Normal file
@ -0,0 +1,76 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
|
||||
/* 颜色变量 */
|
||||
|
||||
/* 行为相关颜色 */
|
||||
$uni-color-primary: #007aff;
|
||||
$uni-color-success: #4cd964;
|
||||
$uni-color-warning: #f0ad4e;
|
||||
$uni-color-error: #dd524d;
|
||||
|
||||
/* 文字基本颜色 */
|
||||
$uni-text-color:#333;//基本色
|
||||
$uni-text-color-inverse:#fff;//反色
|
||||
$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
|
||||
$uni-text-color-placeholder: #808080;
|
||||
$uni-text-color-disable:#c0c0c0;
|
||||
|
||||
/* 背景颜色 */
|
||||
$uni-bg-color:#ffffff;
|
||||
$uni-bg-color-grey:#f8f8f8;
|
||||
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
|
||||
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
|
||||
|
||||
/* 边框颜色 */
|
||||
$uni-border-color:#c8c7cc;
|
||||
|
||||
/* 尺寸变量 */
|
||||
|
||||
/* 文字尺寸 */
|
||||
$uni-font-size-sm:12px;
|
||||
$uni-font-size-base:14px;
|
||||
$uni-font-size-lg:16px;
|
||||
|
||||
/* 图片尺寸 */
|
||||
$uni-img-size-sm:20px;
|
||||
$uni-img-size-base:26px;
|
||||
$uni-img-size-lg:40px;
|
||||
|
||||
/* Border Radius */
|
||||
$uni-border-radius-sm: 2px;
|
||||
$uni-border-radius-base: 3px;
|
||||
$uni-border-radius-lg: 6px;
|
||||
$uni-border-radius-circle: 50%;
|
||||
|
||||
/* 水平间距 */
|
||||
$uni-spacing-row-sm: 5px;
|
||||
$uni-spacing-row-base: 10px;
|
||||
$uni-spacing-row-lg: 15px;
|
||||
|
||||
/* 垂直间距 */
|
||||
$uni-spacing-col-sm: 4px;
|
||||
$uni-spacing-col-base: 8px;
|
||||
$uni-spacing-col-lg: 12px;
|
||||
|
||||
/* 透明度 */
|
||||
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
|
||||
|
||||
/* 文章场景相关 */
|
||||
$uni-color-title: #2C405A; // 文章标题颜色
|
||||
$uni-font-size-title:20px;
|
||||
$uni-color-subtitle: #555555; // 二级标题颜色
|
||||
$uni-font-size-subtitle:26px;
|
||||
$uni-color-paragraph: #3F536E; // 文章段落颜色
|
||||
$uni-font-size-paragraph:15px;
|
8
PDA/PDA/unpackage/dist/cache/.vite/deps/_metadata.json
vendored
Normal file
8
PDA/PDA/unpackage/dist/cache/.vite/deps/_metadata.json
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"hash": "8bc42da3",
|
||||
"configHash": "d3426109",
|
||||
"lockfileHash": "e3b0c442",
|
||||
"browserHash": "9884c163",
|
||||
"optimized": {},
|
||||
"chunks": {}
|
||||
}
|
3
PDA/PDA/unpackage/dist/cache/.vite/deps/package.json
vendored
Normal file
3
PDA/PDA/unpackage/dist/cache/.vite/deps/package.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
11
PDA/PDA/unpackage/dist/dev/.nvue/app.css.js
vendored
Normal file
11
PDA/PDA/unpackage/dist/dev/.nvue/app.css.js
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __commonJS = (cb, mod) => function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
var require_app_css = __commonJS({
|
||||
"app.css.js"(exports) {
|
||||
const _style_0 = {};
|
||||
exports.styles = [_style_0];
|
||||
}
|
||||
});
|
||||
export default require_app_css();
|
2
PDA/PDA/unpackage/dist/dev/.nvue/app.js
vendored
Normal file
2
PDA/PDA/unpackage/dist/dev/.nvue/app.js
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
Promise.resolve("./app.css.js").then(() => {
|
||||
});
|
16
PDA/PDA/unpackage/dist/dev/app-plus/__uniappautomator.js
vendored
Normal file
16
PDA/PDA/unpackage/dist/dev/app-plus/__uniappautomator.js
vendored
Normal file
File diff suppressed because one or more lines are too long
32
PDA/PDA/unpackage/dist/dev/app-plus/__uniappchooselocation.js
vendored
Normal file
32
PDA/PDA/unpackage/dist/dev/app-plus/__uniappchooselocation.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
PDA/PDA/unpackage/dist/dev/app-plus/__uniapperror.png
vendored
Normal file
BIN
PDA/PDA/unpackage/dist/dev/app-plus/__uniapperror.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.7 KiB |
32
PDA/PDA/unpackage/dist/dev/app-plus/__uniappopenlocation.js
vendored
Normal file
32
PDA/PDA/unpackage/dist/dev/app-plus/__uniappopenlocation.js
vendored
Normal file
File diff suppressed because one or more lines are too long
33
PDA/PDA/unpackage/dist/dev/app-plus/__uniapppicker.js
vendored
Normal file
33
PDA/PDA/unpackage/dist/dev/app-plus/__uniapppicker.js
vendored
Normal file
File diff suppressed because one or more lines are too long
8
PDA/PDA/unpackage/dist/dev/app-plus/__uniappquill.js
vendored
Normal file
8
PDA/PDA/unpackage/dist/dev/app-plus/__uniappquill.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
PDA/PDA/unpackage/dist/dev/app-plus/__uniappquillimageresize.js
vendored
Normal file
1
PDA/PDA/unpackage/dist/dev/app-plus/__uniappquillimageresize.js
vendored
Normal file
File diff suppressed because one or more lines are too long
32
PDA/PDA/unpackage/dist/dev/app-plus/__uniappscan.js
vendored
Normal file
32
PDA/PDA/unpackage/dist/dev/app-plus/__uniappscan.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
PDA/PDA/unpackage/dist/dev/app-plus/__uniappsuccess.png
vendored
Normal file
BIN
PDA/PDA/unpackage/dist/dev/app-plus/__uniappsuccess.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
24
PDA/PDA/unpackage/dist/dev/app-plus/__uniappview.html
vendored
Normal file
24
PDA/PDA/unpackage/dist/dev/app-plus/__uniappview.html
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>View</title>
|
||||
<link rel="icon" href="data:,">
|
||||
<link rel="stylesheet" href="app.css" />
|
||||
<script>var __uniConfig = {"globalStyle":{},"darkmode":false}</script>
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="uni-app-view.umd.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
11
PDA/PDA/unpackage/dist/dev/app-plus/app-config-service.js
vendored
Normal file
11
PDA/PDA/unpackage/dist/dev/app-plus/app-config-service.js
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
;(function(){
|
||||
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
|
||||
const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","navigationBar":{"backgroundColor":"#F8F8F8","titleText":"uni-app","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"PDA","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"4.36","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
|
||||
const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"uni-app","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
||||
__uniConfig.styles=[];//styles
|
||||
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:16})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:u,window:u,document:u,frames:u,self:u,location:u,navigator:u,localStorage:u,history:u,Caches:u,screen:u,alert:u,confirm:u,prompt:u,fetch:u,XMLHttpRequest:u,WebSocket:u,webkit:u,print:u}}}});
|
||||
})();
|
||||
|
1
PDA/PDA/unpackage/dist/dev/app-plus/app-config.js
vendored
Normal file
1
PDA/PDA/unpackage/dist/dev/app-plus/app-config.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(function(){})();
|
217
PDA/PDA/unpackage/dist/dev/app-plus/app-service.js
vendored
Normal file
217
PDA/PDA/unpackage/dist/dev/app-plus/app-service.js
vendored
Normal file
@ -0,0 +1,217 @@
|
||||
if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
|
||||
Promise.prototype.finally = function(callback) {
|
||||
const promise = this.constructor;
|
||||
return this.then(
|
||||
(value) => promise.resolve(callback()).then(() => value),
|
||||
(reason) => promise.resolve(callback()).then(() => {
|
||||
throw reason;
|
||||
})
|
||||
);
|
||||
};
|
||||
}
|
||||
;
|
||||
if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
|
||||
const global = uni.requireGlobal();
|
||||
ArrayBuffer = global.ArrayBuffer;
|
||||
Int8Array = global.Int8Array;
|
||||
Uint8Array = global.Uint8Array;
|
||||
Uint8ClampedArray = global.Uint8ClampedArray;
|
||||
Int16Array = global.Int16Array;
|
||||
Uint16Array = global.Uint16Array;
|
||||
Int32Array = global.Int32Array;
|
||||
Uint32Array = global.Uint32Array;
|
||||
Float32Array = global.Float32Array;
|
||||
Float64Array = global.Float64Array;
|
||||
BigInt64Array = global.BigInt64Array;
|
||||
BigUint64Array = global.BigUint64Array;
|
||||
}
|
||||
;
|
||||
if (uni.restoreGlobal) {
|
||||
uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
|
||||
}
|
||||
(function(vue) {
|
||||
"use strict";
|
||||
function formatAppLog(type, filename, ...args) {
|
||||
if (uni.__log__) {
|
||||
uni.__log__(type, filename, ...args);
|
||||
} else {
|
||||
console[type].apply(console, [...args, filename]);
|
||||
}
|
||||
}
|
||||
var main = null;
|
||||
var receiver = null;
|
||||
function recive(success, fail) {
|
||||
main = plus.android.runtimeMainActivity();
|
||||
receiver = plus.android.implements("io.dcloud.feature.internal.reflect.BroadcastReceiver", {
|
||||
onReceive: function(context, intent) {
|
||||
plus.android.importClass(intent);
|
||||
var action = intent.getAction();
|
||||
var data;
|
||||
switch (action) {
|
||||
case "com.android.server.scannerservice.broadcast":
|
||||
data = intent.getExtra("scannerdata");
|
||||
break;
|
||||
case "android.intent.action.SCANRESULT":
|
||||
data = intent.getExtra("value");
|
||||
break;
|
||||
case "android.intent.ACTION_DECODE_DATA":
|
||||
data = intent.getExtra("barcode_string");
|
||||
break;
|
||||
case "com.android.provider.sdlmessage":
|
||||
data = intent.getExtra("msg");
|
||||
break;
|
||||
case "com.neusoft.action.scanner.read":
|
||||
data = intent.getStringExtra("scanner_value");
|
||||
if (data == null) {
|
||||
data = intent.getStringExtra("Scanner_value");
|
||||
}
|
||||
break;
|
||||
case "nlscan.action.SCANNER_RESULT":
|
||||
data = intent.getExtra("SCAN_BARCODE1");
|
||||
break;
|
||||
case "com.barcode.sendBroadcast":
|
||||
data = intent.getExtra("BARCODE");
|
||||
break;
|
||||
case "scan.rcv.message":
|
||||
let barocode = intent.getByteArrayExtra("barocode");
|
||||
let barocodelen = intent.getIntExtra("length", 0);
|
||||
data = new String(barocode, 0, barocodelen);
|
||||
break;
|
||||
case "xlyk.wz":
|
||||
data = intent.getExtra("qrcode");
|
||||
break;
|
||||
case "com.android.scanner.broadcast":
|
||||
data = intent.getExtra("scandata");
|
||||
break;
|
||||
case "com.honeywell.scan.broadcast":
|
||||
data = intent.getExtra("data");
|
||||
break;
|
||||
}
|
||||
if (data) {
|
||||
success({
|
||||
type: "barcode",
|
||||
data: data.replace(/\n/, "").replace(/\t/, "").trim()
|
||||
//处理结束符和换行符为空
|
||||
});
|
||||
} else {
|
||||
fail({
|
||||
type: "barcode",
|
||||
data: "未识别到扫码数据"
|
||||
//处理结束符和换行符为空
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
var IntentFilter = plus.android.importClass("android.content.IntentFilter");
|
||||
plus.android.importClass("android.content.Intent");
|
||||
var filter = new IntentFilter();
|
||||
filter.addAction("com.android.provider.sdlMessage");
|
||||
filter.addAction("com.neusoft.action.scanner.read");
|
||||
filter.addAction("nlscan.action.SCANNER_RESULT");
|
||||
filter.addAction("scan.rcv.message");
|
||||
filter.addAction("com.android.server.scannerservice.broadcast");
|
||||
filter.addAction("android.intent.action.SCANRESULT");
|
||||
filter.addAction("android.intent.ACTION_DECODE_DATA");
|
||||
filter.addAction("com.barcode.sendBroadcast");
|
||||
filter.addAction("xlyk.wz");
|
||||
filter.addAction("com.android.scanner.broadcast");
|
||||
filter.addAction("com.android.scanner.broadcast");
|
||||
filter.addAction("com.honeywell.scan.broadcast");
|
||||
main.registerReceiver(receiver, filter);
|
||||
}
|
||||
function unregisterReceiver() {
|
||||
formatAppLog("log", "at src/libs/Broadcast.js:110", "取消监听广播");
|
||||
main.unregisterReceiver(receiver);
|
||||
}
|
||||
const _imports_0 = "/static/logo.png";
|
||||
const _export_sfc = (sfc, props) => {
|
||||
const target = sfc.__vccOpts || sfc;
|
||||
for (const [key, val] of props) {
|
||||
target[key] = val;
|
||||
}
|
||||
return target;
|
||||
};
|
||||
const _sfc_main$1 = {
|
||||
data() {
|
||||
return {
|
||||
title: "Hello"
|
||||
};
|
||||
},
|
||||
onShow: function() {
|
||||
const self = this;
|
||||
recive(function(res) {
|
||||
formatAppLog("log", "at pages/index/index.vue:27", "Success:" + res.data);
|
||||
self.getEquipmentInfo(res.data);
|
||||
}, function(err) {
|
||||
formatAppLog("log", "at pages/index/index.vue:30", "Error:", JSON.stringify(err));
|
||||
});
|
||||
},
|
||||
onUnload: function() {
|
||||
unregisterReceiver();
|
||||
},
|
||||
methods: {
|
||||
getEquipmentInfo(encodedString) {
|
||||
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
|
||||
formatAppLog("log", "at pages/index/index.vue:41", "1:" + encodedString);
|
||||
let byteStrings = encodedString.split(",");
|
||||
let byteArray = [];
|
||||
for (let byteString of byteStrings) {
|
||||
byteArray.push(parseInt(byteString, 10));
|
||||
}
|
||||
formatAppLog("log", "at pages/index/index.vue:48", "2:" + encodedString);
|
||||
let originalString = "";
|
||||
for (let i = 0; i < byteArray.length; i++) {
|
||||
originalString += String.fromCharCode(byteArray[i]);
|
||||
}
|
||||
formatAppLog("log", "at pages/index/index.vue:57", "3:" + originalString);
|
||||
this.title = originalString;
|
||||
formatAppLog("log", "at pages/index/index.vue:59", "4:" + this.title);
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
|
||||
vue.createElementVNode("image", {
|
||||
class: "logo",
|
||||
src: _imports_0
|
||||
}),
|
||||
vue.createElementVNode("view", { class: "text-area" }, [
|
||||
vue.createElementVNode(
|
||||
"text",
|
||||
{ class: "title" },
|
||||
vue.toDisplayString($data.title),
|
||||
1
|
||||
/* TEXT */
|
||||
)
|
||||
])
|
||||
]);
|
||||
}
|
||||
const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/代码/锡膏机微信小程序/PDA/pages/index/index.vue"]]);
|
||||
__definePage("pages/index/index", PagesIndexIndex);
|
||||
const _sfc_main = {
|
||||
onLaunch: function() {
|
||||
formatAppLog("log", "at App.vue:4", "App Launch");
|
||||
},
|
||||
onShow: function() {
|
||||
formatAppLog("log", "at App.vue:7", "App Show");
|
||||
},
|
||||
onHide: function() {
|
||||
formatAppLog("log", "at App.vue:10", "App Hide");
|
||||
}
|
||||
};
|
||||
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/代码/锡膏机微信小程序/PDA/App.vue"]]);
|
||||
function createApp() {
|
||||
const app = vue.createVueApp(App);
|
||||
return {
|
||||
app
|
||||
};
|
||||
}
|
||||
const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
|
||||
uni.Vuex = __Vuex__;
|
||||
uni.Pinia = __Pinia__;
|
||||
__app__.provide("__globalStyles", __uniConfig.styles);
|
||||
__app__._component.mpType = "app";
|
||||
__app__._component.render = () => {
|
||||
};
|
||||
__app__.mount("#app");
|
||||
})(Vue);
|
4
PDA/PDA/unpackage/dist/dev/app-plus/app.css
vendored
Normal file
4
PDA/PDA/unpackage/dist/dev/app-plus/app.css
vendored
Normal file
File diff suppressed because one or more lines are too long
107
PDA/PDA/unpackage/dist/dev/app-plus/manifest.json
vendored
Normal file
107
PDA/PDA/unpackage/dist/dev/app-plus/manifest.json
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
{
|
||||
"@platforms": [
|
||||
"android",
|
||||
"iPhone",
|
||||
"iPad"
|
||||
],
|
||||
"id": "__UNI__721DB64",
|
||||
"name": "PDA",
|
||||
"version": {
|
||||
"name": "1.0.0",
|
||||
"code": "100"
|
||||
},
|
||||
"description": "",
|
||||
"developer": {
|
||||
"name": "",
|
||||
"email": "",
|
||||
"url": ""
|
||||
},
|
||||
"permissions": {
|
||||
"UniNView": {
|
||||
"description": "UniNView原生渲染"
|
||||
}
|
||||
},
|
||||
"plus": {
|
||||
"useragent": {
|
||||
"value": "uni-app",
|
||||
"concatenate": true
|
||||
},
|
||||
"splashscreen": {
|
||||
"target": "id:1",
|
||||
"autoclose": true,
|
||||
"waiting": true,
|
||||
"delay": 0
|
||||
},
|
||||
"popGesture": "close",
|
||||
"launchwebview": {
|
||||
"render": "always",
|
||||
"id": "1",
|
||||
"kernel": "WKWebview"
|
||||
},
|
||||
"usingComponents": true,
|
||||
"nvueStyleCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"distribute": {
|
||||
"google": {
|
||||
"permissions": [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
"apple": {},
|
||||
"plugins": {
|
||||
"audio": {
|
||||
"mp3": {
|
||||
"description": "Android平台录音支持MP3格式文件"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"statusbar": {
|
||||
"immersed": "supportedDevice",
|
||||
"style": "dark",
|
||||
"background": "#F8F8F8"
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
},
|
||||
"allowsInlineMediaPlayback": true,
|
||||
"uni-app": {
|
||||
"control": "uni-v3",
|
||||
"vueVersion": "3",
|
||||
"compilerVersion": "4.36",
|
||||
"nvueCompiler": "uni-app",
|
||||
"renderer": "auto",
|
||||
"nvue": {
|
||||
"flex-direction": "column"
|
||||
},
|
||||
"nvueLaunchMode": "normal",
|
||||
"webView": {
|
||||
"minUserAgentVersion": "49.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"app-harmony": {
|
||||
"useragent": {
|
||||
"value": "uni-app",
|
||||
"concatenate": true
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
}
|
||||
},
|
||||
"launch_path": "__uniappview.html"
|
||||
}
|
23
PDA/PDA/unpackage/dist/dev/app-plus/pages/index/index.css
vendored
Normal file
23
PDA/PDA/unpackage/dist/dev/app-plus/pages/index/index.css
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.logo {
|
||||
height: 6.25rem;
|
||||
width: 6.25rem;
|
||||
margin-top: 6.25rem;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 1.5625rem;
|
||||
}
|
||||
.text-area {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.title {
|
||||
font-size: 1.125rem;
|
||||
color: #8f8f94;
|
||||
}
|
BIN
PDA/PDA/unpackage/dist/dev/app-plus/static/logo.png
vendored
Normal file
BIN
PDA/PDA/unpackage/dist/dev/app-plus/static/logo.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
7
PDA/PDA/unpackage/dist/dev/app-plus/uni-app-view.umd.js
vendored
Normal file
7
PDA/PDA/unpackage/dist/dev/app-plus/uni-app-view.umd.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
PDA/PDA/unpackage/dist/dev/cache/.app-plus/tsc/app-android/.tsbuildInfo
vendored
Normal file
1
PDA/PDA/unpackage/dist/dev/cache/.app-plus/tsc/app-android/.tsbuildInfo
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user