Browse Source

第一次提交

master
刘灿 9 months ago
commit
aa9ba8c967
  1. BIN
      .DS_Store
  2. 18
      .hbuilderx/launch.json
  3. 17
      App.vue
  4. 20
      index.html
  5. 22
      main.js
  6. 133
      manifest.json
  7. 270
      mixins/linkBEL.js
  8. 253
      mixins/linkFTP.js
  9. 190
      mixins/linkUSB.js
  10. 26
      mixins/sixteenToString.js
  11. BIN
      nativeplugins/.DS_Store
  12. BIN
      nativeplugins/ZS-Bugly/android/bugly-release.aar
  13. BIN
      nativeplugins/ZS-Bugly/android/crashreport-4.1.9.3.aar
  14. 18
      nativeplugins/ZS-Bugly/package.json
  15. BIN
      nativeplugins/Zhimi-UsbSerial/.DS_Store
  16. BIN
      nativeplugins/Zhimi-UsbSerial/android/usbserial-android-release.aar
  17. 24
      nativeplugins/Zhimi-UsbSerial/package.json
  18. BIN
      nativeplugins/zhimiFTP/.DS_Store
  19. BIN
      nativeplugins/zhimiFTP/android/.DS_Store
  20. BIN
      nativeplugins/zhimiFTP/android/zhimiFTP-release.aar
  21. 23
      nativeplugins/zhimiFTP/package.json
  22. 45
      pages.json
  23. 231
      pages/belShili/index.vue
  24. 333
      pages/ftpCgjc/index.vue
  25. 405
      pages/tsjcIndex/index.vue
  26. 33
      pages/usbCgjc/index.vue
  27. 152
      pages/webPage/index.vue
  28. 225
      pages/zhimiOK/index.vue
  29. 1
      static/ceshi.txt
  30. BIN
      static/logo.png
  31. 10
      uni.promisify.adaptor.js
  32. 76
      uni.scss
  33. BIN
      unpackage/.DS_Store
  34. 1
      unpackage/cache/wgt/__UNI__030605A/__uniappchooselocation.js
  35. BIN
      unpackage/cache/wgt/__UNI__030605A/__uniapperror.png
  36. 1
      unpackage/cache/wgt/__UNI__030605A/__uniappes6.js
  37. 1
      unpackage/cache/wgt/__UNI__030605A/__uniappopenlocation.js
  38. 1
      unpackage/cache/wgt/__UNI__030605A/__uniapppicker.js
  39. 8
      unpackage/cache/wgt/__UNI__030605A/__uniappquill.js
  40. 1
      unpackage/cache/wgt/__UNI__030605A/__uniappquillimageresize.js
  41. 1
      unpackage/cache/wgt/__UNI__030605A/__uniappscan.js
  42. BIN
      unpackage/cache/wgt/__UNI__030605A/__uniappsuccess.png
  43. 25
      unpackage/cache/wgt/__UNI__030605A/__uniappview.html
  44. 8
      unpackage/cache/wgt/__UNI__030605A/app-config-service.js
  45. 1
      unpackage/cache/wgt/__UNI__030605A/app-config.js
  46. 1
      unpackage/cache/wgt/__UNI__030605A/app-service.js
  47. 1
      unpackage/cache/wgt/__UNI__030605A/app-view.js
  48. 1
      unpackage/cache/wgt/__UNI__030605A/manifest.json
  49. BIN
      unpackage/cache/wgt/__UNI__030605A/nativeplugins/ZS-Bugly/android/bugly-release.aar
  50. BIN
      unpackage/cache/wgt/__UNI__030605A/nativeplugins/ZS-Bugly/android/crashreport-4.1.9.3.aar
  51. 18
      unpackage/cache/wgt/__UNI__030605A/nativeplugins/ZS-Bugly/package.json
  52. BIN
      unpackage/cache/wgt/__UNI__030605A/nativeplugins/Zhimi-UsbSerial/.DS_Store
  53. BIN
      unpackage/cache/wgt/__UNI__030605A/nativeplugins/Zhimi-UsbSerial/android/usbserial-android-release.aar
  54. 24
      unpackage/cache/wgt/__UNI__030605A/nativeplugins/Zhimi-UsbSerial/package.json
  55. BIN
      unpackage/cache/wgt/__UNI__030605A/nativeplugins/zhimiFTP/.DS_Store
  56. BIN
      unpackage/cache/wgt/__UNI__030605A/nativeplugins/zhimiFTP/android/.DS_Store
  57. BIN
      unpackage/cache/wgt/__UNI__030605A/nativeplugins/zhimiFTP/android/zhimiFTP-release.aar
  58. 23
      unpackage/cache/wgt/__UNI__030605A/nativeplugins/zhimiFTP/package.json
  59. 1
      unpackage/cache/wgt/__UNI__030605A/static/ceshi.txt
  60. BIN
      unpackage/cache/wgt/__UNI__030605A/static/logo.png
  61. 1
      unpackage/cache/wgt/__UNI__030605A/view.css
  62. 6
      unpackage/cache/wgt/__UNI__030605A/view.umd.min.js
  63. BIN
      unpackage/debug/android_debug.apk
  64. 0
      unpackage/dist/build/.automator/app-plus/.automator.json
  65. 1
      unpackage/dist/build/app-plus/__uniappchooselocation.js
  66. BIN
      unpackage/dist/build/app-plus/__uniapperror.png
  67. 1
      unpackage/dist/build/app-plus/__uniappes6.js
  68. 1
      unpackage/dist/build/app-plus/__uniappopenlocation.js
  69. 1
      unpackage/dist/build/app-plus/__uniapppicker.js
  70. 8
      unpackage/dist/build/app-plus/__uniappquill.js
  71. 1
      unpackage/dist/build/app-plus/__uniappquillimageresize.js
  72. 1
      unpackage/dist/build/app-plus/__uniappscan.js
  73. BIN
      unpackage/dist/build/app-plus/__uniappsuccess.png
  74. 25
      unpackage/dist/build/app-plus/__uniappview.html
  75. 8
      unpackage/dist/build/app-plus/app-config-service.js
  76. 1
      unpackage/dist/build/app-plus/app-config.js
  77. 1
      unpackage/dist/build/app-plus/app-service.js
  78. 1
      unpackage/dist/build/app-plus/app-view.js
  79. 1
      unpackage/dist/build/app-plus/manifest.json
  80. 1
      unpackage/dist/build/app-plus/static/ceshi.txt
  81. BIN
      unpackage/dist/build/app-plus/static/logo.png
  82. 1
      unpackage/dist/build/app-plus/view.css
  83. 6
      unpackage/dist/build/app-plus/view.umd.min.js
  84. 0
      unpackage/dist/dev/.automator/app-plus/.automator.json
  85. 0
      unpackage/dist/dev/.automator/mp-weixin/.automator.json
  86. 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  87. 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map
  88. 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  89. 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/webPage/index.js.map
  90. 1
      unpackage/dist/dev/app-plus/__uniappchooselocation.js
  91. BIN
      unpackage/dist/dev/app-plus/__uniapperror.png
  92. 1
      unpackage/dist/dev/app-plus/__uniappes6.js
  93. 1
      unpackage/dist/dev/app-plus/__uniappopenlocation.js
  94. 1
      unpackage/dist/dev/app-plus/__uniapppicker.js
  95. 8
      unpackage/dist/dev/app-plus/__uniappquill.js
  96. 1
      unpackage/dist/dev/app-plus/__uniappquillimageresize.js
  97. 1
      unpackage/dist/dev/app-plus/__uniappscan.js
  98. BIN
      unpackage/dist/dev/app-plus/__uniappsuccess.png
  99. 25
      unpackage/dist/dev/app-plus/__uniappview.html
  100. 8
      unpackage/dist/dev/app-plus/app-config-service.js

BIN
.DS_Store

Binary file not shown.

18
.hbuilderx/launch.json

@ -0,0 +1,18 @@
{
"version" : "1.0",
"configurations" : [
{
"playground" : "custom",
"type" : "uni-app:app-android"
},
{
"app-plus" : {
"launchtype" : "local"
},
"mp-weixin" : {
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}

17
App.vue

@ -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
index.html

@ -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>

22
main.js

@ -0,0 +1,22 @@
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

133
manifest.json

@ -0,0 +1,133 @@
{
"name" : "HUIMU眼科检查信息系统",
"appid" : "__UNI__030605A",
"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" : {
"bluetooth" : {},
"Bluetooth" : {}
},
/* */
"distribute" : {
/* android */
"android" : {
"permissions" : [
"<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.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>", //
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>", //
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH_SCAN\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH_CONNECT\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_BACKGROUND_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.USB_PERMISSION\"/>",
"<uses-permission android:name=\"android.permission.MANAGE_USB\"/>"
]
},
/* ios */
"ios" : {
"dSYMs" : false
},
/* SDK */
"sdkConfigs" : {
"ad" : {}
}
},
"nativePlugins" : {
"zhimiFTP" : {
"__plugin_info__" : {
"name" : "zhimiFTP",
"description" : "FTP插件",
"platforms" : "Android",
"url" : "",
"android_package_name" : "",
"ios_bundle_id" : "",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {}
}
},
"Zhimi-UsbSerial" : {
"__plugin_info__" : {
"name" : "Usb通讯插件",
"description" : "Usb通讯插件",
"platforms" : "Android",
"url" : "",
"android_package_name" : "",
"ios_bundle_id" : "",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {}
}
},
"ZS-Bugly" : {
"__plugin_info__" : {
"name" : "ZS-Bugly",
"description" : "捕获系统错误",
"platforms" : "Android",
"url" : "",
"android_package_name" : "",
"ios_bundle_id" : "",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {}
}
}
}
},
/* */
"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" : "2"
}

270
mixins/linkBEL.js

@ -0,0 +1,270 @@
export default {
data() {
return {
onBluetoothDeviceFoundcustom: '',
deviceId: '',
stringToSend: '$D50504010300#', // D50604010000
setInterTimeBEL: null
}
},
onLoad() {},
methods: {
// 打开GPS定位!!!打开GPS定位新买的荣耀才能触发uni.onBluetoothDeviceFound监听!!!!
checkAndOpenGPS() {
var Context = plus.android.importClass("android.content.Context");
var LocationManager = plus.android.importClass("android.location.LocationManager");
var main = plus.android.runtimeMainActivity();
// 获取系统的 LocationManager 服务
var locationManager = main.getSystemService(Context.LOCATION_SERVICE);
// 检查 GPS 是否开启
var isGPSEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
var isNetworkEnabled = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER); // 检查网络定位服务
// 位置服务已开启,不进行任何操作
if (isGPSEnabled || isNetworkEnabled) {
console.log("位置服务已开启");
this.openBluetoothAdapter()
} else {
console.log("位置服务未开启,跳转到设置页面");
// 位置服务未开启,引导用户打开 GPS 设置页面
var Intent = plus.android.importClass("android.content.Intent");
var Settings = plus.android.importClass("android.provider.Settings");
var intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
main.startActivity(intent);
// 提示用户手动开启 GPS
plus.nativeUI.alert("请手动开启GPS!");
}
},
// 初始化蓝牙
openBluetoothAdapter() {
let that = this
that.closeBluetoothAdapter()
console.log('初始化蓝牙');
uni.openBluetoothAdapter({
success(res) {
console.log(res)
var data = {
command: 'belConnectFeedback',
commandType: 'BEL',
data: {
state: 0,
message: '初始化成功'
}
}
that.webViewToH5(data)
that.startBluetoothDevicesDiscovery()
},
fail(res) {
console.log('初始化蓝牙失败', res)
var data = {
command: 'belConnectFeedback',
commandType: 'BEL',
data: {
state: 0,
message: '初始化失败'
}
}
that.webViewToH5(data)
setTimeout(() => {
that.openBluetoothAdapter()
}, 5000)
}
})
},
// 开始搜索蓝牙设备
startBluetoothDevicesDiscovery() {
let that = this
console.log('开始搜索蓝牙设备');
var data = {
command: 'belConnectFeedback',
commandType: 'BEL',
data: {
state: 0,
message: '设备搜索中'
}
}
that.webViewToH5(data)
uni.startBluetoothDevicesDiscovery({
success(res) {
console.log(res)
that.onBluetoothDeviceFound()
}
})
},
// 监听设备发现
onBluetoothDeviceFound() {
let that = this
this.onBluetoothDeviceFoundcustom = uni.onBluetoothDeviceFound((res) => {
console.log('监听设备发现', res.devices[0]);
if (res.devices[0].name === 'ACP60205') {
console.log('hello,厉害,找到啦,啦啦啦~~~');
// 连接成功后,停止设备搜索
uni.stopBluetoothDevicesDiscovery();
that.deviceId = res.devices[0].deviceId; // 获取设备ID
that.createBLEConnection()
}
})
},
// 连接到设备
createBLEConnection() {
let that = this
console.log('连接到设备that.deviceId', that.deviceId);
uni.createBLEConnection({
deviceId: that.deviceId,
success: function() {
console.log('连接成功')
var data = {
command: 'belConnectFeedback',
commandType: 'BEL',
data: {
state: 0,
message: '已连接'
}
}
that.webViewToH5(data)
that.belStatus()
},
fail: function(err) {
console.error('连接失败', err)
var data = {
command: 'belConnectFeedback',
commandType: 'BEL',
data: {
state: 0,
message: '连接失败'
}
}
that.webViewToH5(data)
setTimeout(() => {
that.openBluetoothAdapter()
}, 5000)
}
})
},
// 检测BEL是否连接状态
belStatus() {
clearInterval(this.setInterTimeBEL)
this.setInterTimeBEL = setInterval(() => {
this.getConnectedBluetoothDevices()
}, 5000)
},
// 检查设备连接状态
getConnectedBluetoothDevices() {
let that = this
uni.getConnectedBluetoothDevices({
success(res) {
console.log('当前已连接的设备:', res.devices);
if (res.devices.length <= 0) {
that.openBluetoothAdapter()
clearInterval(that.setInterTimeBEL)
var data = {
command: 'belConnectFeedback',
commandType: 'BEL',
data: {
state: 0,
message: '连接失败'
}
}
that.webViewToH5(data)
} else {
var data = {
command: 'belConnectFeedback',
commandType: 'BEL',
data: {
state: 0,
message: '已连接'
}
}
that.webViewToH5(data)
}
},
fail(err) {
console.log('获取已连接设备失败:', err)
that.openBluetoothAdapter()
}
})
},
// 发送蓝牙内容
writeBLECharacteristicValue(belvalue) {
console.log('发送蓝牙内容',belvalue);
let that = this
// 要发送的字符串
// $D50504030231#
// D5---5米距离
// 06---
const dataToSend = that.stringToByteArray(belvalue)
console.log(' dataToSend.buffer', dataToSend.buffer)
uni.writeBLECharacteristicValue({
deviceId: that.deviceId, // 设备ID
serviceId: '0000ffe0-0000-1000-8000-00805f9b34fb', // 服务ID
characteristicId: '0000ffe1-0000-1000-8000-00805f9b34fb', // 特征ID
value: dataToSend.buffer,
writeType: 'write',
success: () => {
console.log('发送内容成功')
var data = {
command: 'sendBelDataFeedback',
commandType: 'BEL',
data: {
state: 0,
message: '发送内容成功'
}
}
that.webViewToH5(data)
},
fail: (err) => {
console.error('发送内容失败', err)
var data = {
command: 'sendBelDataFeedback',
commandType: 'BEL',
data: {
state: 0,
message: '发送内容失败'
}
}
that.webViewToH5(data)
}
})
},
// 处理发送的内容
stringToByteArray(str) {
const byteArray = new Uint8Array(str.length);
for (let i = 0; i < str.length; i++) {
byteArray[i] = str.charCodeAt(i)
}
return byteArray;
},
// 断开蓝牙
closeBluetoothAdapter(title) {
let that = this
uni.closeBluetoothAdapter({
success() {
console.log('蓝牙适配器关闭成功');
var data = {
command: title === 'belClose' ? 'belCloseFeedback' : 'belConnectFeedback',
commandType: 'BEL',
data: {
state: 0,
message: title === 'belClose' ? '已断开' : '未连接'
}
}
clearInterval(that.setInterTimeBEL)
uni.stopBluetoothDevicesDiscovery();
that.webViewToH5(data)
},
fail(err) {
console.log('关闭蓝牙适配器失败: ', err);
}
});
},
// uniapp 传参给 vue页面---刘灿测试
webViewToH5(res) {
let currentWebview = this.$scope.$getAppWebview();
let wv = currentWebview.children()[0];
console.log('uniapp 传参给 vue页面');
wv.evalJS(`getVueMessage(${JSON.stringify(res)})`);
},
}
}

253
mixins/linkFTP.js

@ -0,0 +1,253 @@
var FTP = uni.requireNativePlugin('Zhimi-FTP-Module');
export default {
data() {
return {
remoteUrl: '',
androidFileDocPath: plus.io.convertLocalFileSystemURL('_doc'),
ftpLogicDeceteName: '/sda1/logicDelete',
count: 0,
isConnect: false,
setInterTimeFTP: null,
readerFileFlag:false
}
},
onShow() {
// console.log('showshowshow');
},
onHide() {
// console.log('hidehidehide');
},
onLoad() {},
destroyed() {
console.log('销毁页面');
clearInterval(this.setInterTimeFTP)
},
methods: {
// 流程:
// ftp连接 ---> 获取ftp目录文件夹名和文件名 ---> 下载文件夹中的文件到安卓机 ---> 临时地址转url传输给H5展示
// ---> H5页面关联确认完,在安卓机中找到关联确认后的文件上传到FTP的另外一个文件夹(新建文件夹) ---> 删除安卓机临时文件 ---> 删除FTP之前文件夹中关联确认后的文件
// 测试是否掉线的方法
ftpSendNoOp() {
clearInterval(this.setInterTimeFTP)
this.setInterTimeFTP = setInterval(() => {
FTP.ftpSendNoOp(res => {
if (res.data === true) {
console.log('测试是否掉线回调-未掉线',res);
console.log('readerFileFlag',this.readerFileFlag);
!this.readerFileFlag ? FTP.ftpChangeWorkingDirectory("/", red => {
console.log('下载前调用这个方法', red)
var data = {
command: 'ftpStatusChanged',
data: {
state: 0,
message: 'FTP已连接'
}
}
this.webViewToH5(data)
red.data ? this.ftpLoopServerPath() : ''
}) : ''
} else {
console.log('测试是否掉线回调-已掉线', res);
var data = {
command: 'ftpStatusChanged',
data: {
state: 0,
message: 'FTP已掉线'
}
}
this.webViewToH5(data)
this.connectFtpServer()
}
})
}, 5000)
},
// FTP连接
connectFtpServer() {
//(“服务地址”, 端口, “用户名”,”密码“, 回调 )
//回调
//成功 {type : "connect", data : {data : "相应状态码:200 连接是否成功:true 连接是否有效:true}}
//失败 {type : "connect", data : {"error" : "失败原因"}}
// "192.168.50.1", 21, "hmgc", "hmgc"
// "192.168.50.131", 21, "hmftp", "hmftp"
let cgConfigInfoData = this.cgConfigInfo.data
console.log('cgConfigInfoData',cgConfigInfoData);
// '192.168.50.1', 21, 'hmgc', 'hmgc', "UTF-8"
// cgConfigInfoData.ftpHostName, 21, cgConfigInfoData.ftpUserName, cgConfigInfoData.ftpPassWord,
FTP.connectFtpServer( '192.168.50.1', 21, 'hmgc', 'hmgc', "UTF-8", res => {
console.log('FTP连接', res)
if (res.type === 'connect' && res.data.connect === true) {
var data = {
command: 'ftpStatusChanged',
data: {
state: 0,
message: 'FTP已连接'
}
}
this.webViewToH5(data)
// 获取FTP服务器目录前调用这个方法---处理闪退现象
FTP.ftpChangeWorkingDirectory("/", red => {
console.log('下载前调用这个方法', red)
red.data ? this.ftpLoopServerPath() : ''
})
} else if (res.type === 'connect' && res.data.connect === false) {
// this.isConnect = false
var data = {
command: 'ftpStatusChanged',
data: {
state: 0,
message: 'FTP连接失败'
}
}
this.webViewToH5(data)
}
})
},
// 获取FTP服务器目录
ftpLoopServerPath() {
let name = this.cgConfigInfo.data.inspectionDir
console.log('name',name);
// 阀值--循环时控制暂时不走获取FTP服务器目录
this.readerFileFlag = true
// 1是文件夹 0是文件
//("获取服务器目录下文件,空白为根目录", 回调)
//回调
//成功 {type : getFileInfo, data : [{name : "地址", size : 文件大小单位字节, time : “修改时间”}]}
//失败 {type : "error", data : "失败原因"}
FTP.ftpLoopServerPath(name, res => {
console.log('获取FTP服务器目录res', res);
if(res.type === 'getFileInfo' && res.data.length > 0) {
let newData = res.data.sort((a, b) => new Date(b.time) - new Date(a.time))
console.log('newData时间排序',newData)
// 下载前调用这个方法---处理闪退现象
FTP.ftpChangeWorkingDirectory("/", red => {
console.log('下载前调用这个方法', red)
red.data ? this.ftpDownloadSingleFile(newData[0]) : ''
})
} else {
this.readerFileFlag = false
}
})
},
// FTP-单个文件下载至安卓机
ftpDownloadSingleFile(data) {
//("要下载到本地文件夹的绝对路径", "要下载的服务器上文件的绝对路径", 回调)
//回调
//{type : download, data : {status : true/false, name : "下载的文件名", errpr : "失败原因"}}
// var inputFile = plus.io.convertLocalFileSystemURL('/static')
console.log('androidFileDocPath', this.androidFileDocPath)
// '/sda1/deviceNewFile/20240918/20240918logo.png'
FTP.ftpDownloadSingleFile(this.androidFileDocPath, data.name, res => {
console.log('单个文件下载至安卓机--成功', res)
if (res.type === 'download' && res.data.status) {
this.readerFile(data)
} else {
this.readerFileFlag = false
}
})
},
// 获取安卓机临时文件中的内容
readerFile(dataParams) {
let tempFilePath = this.androidFileDocPath + dataParams.fileName
console.log('获取安卓机临时文件中的内容', tempFilePath);
// console.log('获取安卓机临时文件中的内容1',plus.io.resolveLocalFileSystemURL);
plus.io.resolveLocalFileSystemURL(tempFilePath, (entry) => {
console.log("文件条目:", entry);
entry.file((file) => {
console.log('file', file);
var reader = new plus.io.FileReader()
reader.onloadend = (res) => {
console.log("文件内容:", res.target.result); // 输出文件内容
var data = {
command: 'examineData',
commandType:'FTP',
data: {
state: 0,
message: JSON.stringify(res.target.result),
fileName: dataParams.fileName
}
}
this.webViewToH5(data)
this.readerFileFlag = false
};
reader.readAsText(file); // 根据文件类型选择读取方式,例如:readAsText
}, (error) => {
console.error("读取文件失败:", error);
this.readerFileFlag = false
});
}, (error) => {
console.error("获取文件路径失败:", error);
this.readerFileFlag = false
})
},
// 删除安卓机下载下来的文件
deleteAppDownLoadFile(data) {
console.log(' 删除安卓机下载下来的文件--data', data);
// 获取安卓机路径地址
var deleteAppFileName = this.androidFileDocPath + data.fileName
plus.io.resolveLocalFileSystemURL(deleteAppFileName, (entry) => {
// 调用 remove 方法删除文件
entry.remove(() => {
console.log('文件删除成功');
}, (error) => {
console.log('文件删除失败: ' + error.message);
});
}, (error) => {
console.log('无法解析文件路径: ' + error.message);
})
},
// 删除FTP服务器文件
ftpDeleteServerFiles(data) {
//("要删除的文件夹或文件地址", 回调)
//回调
//{type : delete, data : {msg : "删除文件/删除文件夹(ps:先删除文件夹里面的文件再删文件夹)", data : "文件名", status : true/false, error : "失败原因"}}
let name = this.cgConfigInfo.data.inspectionDir + '/' + data.fileName
console.log('删除FTP服务器文件',name);
data && data.fileName ? FTP.ftpDeleteServerFiles(name, res => {
console.log('FTP服务器文件删除成功', name,res)
// setTimeout(() => {
// this.ftpUploadFile(data)
// }, 3000)
}) : ''
},
// 删除FTPS文件夹下面文件保留文件夹
ftpDeleteServerFilesWithoutDirectory() {
//同上,不会删除指定文件夹
FTP.ftpDeleteServerFilesWithoutDirectory(this.cgConfigInfo.data.inspectionDir, res => {
console.log(res)
})
},
// FTP-上传文件至FTP
// ftpUploadFile(data) {
// var inputFile = plus.io.convertLocalFileSystemURL('/static/logo.png')
// console.log('inputFile文件', inputFile);
// FTP.ftpUploadFile(inputFile, '/sda1/deviceNewFile', res => {
// console.log('文件-上传成功', res)
// if (res.data.msg === '上传完成') {
// console.log('00000000000000000000');
// this.ftpLoopServerPath()
// console.log(this.count++);
// }
// })
// },
// FTP断开连接
closeFTPConnect() {
console.log('FTP断开连接!!!!');
//失败有回调,成功没有回调
FTP.closeFTPConnect(res => {
console.log('FTP断开连接',res)
clearInterval(this.setInterTimeFTP)
// this.isConnect = false
})
},
// uniapp 传参给 vue页面---刘灿测试
webViewToH5(res) {
let currentWebview = this.$scope.$getAppWebview();
let wv = currentWebview.children()[0];
console.log('uniapp 传参给 vue页面');
wv.evalJS(`getVueMessage(${JSON.stringify(res)})`);
},
}
}

190
mixins/linkUSB.js

@ -0,0 +1,190 @@
var UsbSerial = uni.requireNativePlugin('Zhimi-UsbSerial');
export default {
data() {
return {
setInterTimeUSB: null,
vendorId: '',
port: '',
usbDevicesComPortsList: [] // 串口名称数组
}
},
destroyed() {
console.log('销毁页面');
clearInterval(this.setInterTimeUSB)
},
methods: {
// 检测USB是否连接状态
usbStatus() {
clearInterval(this.setInterTimeUSB)
this.setInterTimeUSB = setInterval(() => {
this.connectUSB('open')
}, 5000)
},
// 设置USB数据回调
connectUSB(flag, callback) {
console.log('UsbSerial', UsbSerial)
//设置数据回调
UsbSerial.setDataCallback((res) => {
console.log('设置USB数据回调-res', res)
if (res.type == "onUsbDeviceAttached") { //usb插上
console.log('USB已插入');
var data = {
command: 'comStatusChanged',
data: {
state: 0,
message: 'USB已插入'
}
}
this.webViewToH5(data)
} else if (res.type == "onUsbDeviceDetached") { //usb断开
console.log('USB已拔出');
var data = {
command: 'comStatusChanged',
data: {
state: 0,
message: 'USB已拔出'
}
}
this.webViewToH5(data)
} else if (res.type === 'startUpdateValue') {
console.log('正在接受数据中,请稍等...');
} else if (res.type == "onNewData") { //数据回调
var data = res.data.data; //字节数组
var str = res.data.string; //字符串
var hex = res.data.hex; //十六进制
// console.log('字节数组',data)
// console.log('字符串',str)
console.log('hex', hex)
// 68656c6c6f20776f726c64---hello world
console.log('this.hexCharCodeToStr(hex)', JSON.stringify(this.hexCharCodeToStr(hex)));
var data = {
command: 'examineData',
commandType: 'USB',
data: {
state: 0,
message: JSON.stringify(this.hexCharCodeToStr(hex))
}
}
this.webViewToH5(data)
} else if (res.type == "onRunError") {
//点击关闭USB
var data = {
command: 'comStatusChanged',
data: {
state: 0,
message: 'USBRunError'
}
}
this.webViewToH5(data)
}
});
//UsbSerial.setReceiveTime(type,time) 参数:
// type (0 1 2)0直接返回,字节太长会被分包; 1固定间隔time返回拼接的数据; 2拼接数据,没接收到数据间隔time后返回
// time (毫秒)
UsbSerial.setReceiveTime(2, 500)
//获取usb列表
UsbSerial.getUsbDevices((usbDevices) => {
console.log('获取usb列表-usbDevices', usbDevices)
//选择usb列表
if (usbDevices.length > 0) {
this.usbDevicesComPortsList = usbDevices.map(item => item.device.vendorId)
if (flag === 'NoOpen') {
callback()
} else {
// console.log('this.cgConfigInfo.data.portName',this.cgConfigInfo.data.portName);
// console.log('usbDevices[0].device.vendorId',usbDevices[0].device.vendorId);
let usbDevice = usbDevices.filter(item => item.device.vendorId == this.cgConfigInfo.data.portName)
console.log('usbDevice',usbDevice);
if (usbDevice.length > 0) {
this.vendorId = usbDevice[0].device.vendorId
this.port = usbDevice[0].ports[0]
this.openUSB()
}
}
} else {
this.usbDevicesComPortsList = []
flag === 'NoOpen' ? callback() : ''
}
});
},
// 打开USB
openUSB() {
let vueDetailData = this.cgConfigInfo.data
console.log('打开USB', this.vendorId)
//检查授权Usb权限
UsbSerial.grantUsbPermission(this.vendorId, (res) => {
console.log('检查授权Usb权限', res)
if (res == true) {
//打开usb连接
UsbSerial.open(this.vendorId, this.port, (ret) => {
console.log('打开usb连接', ret)
if (ret == true) {
//设置参数
UsbSerial.setParameters(vueDetailData.baudRate, vueDetailData.dataBits, vueDetailData.stopBits, vueDetailData.parity)
var data = {
command: 'comStatusChanged',
data: {
state: 0,
message: 'USB已打开'
}
}
this.webViewToH5(data)
}
});
} else {
var data = {
command: 'comStatusChanged',
data: {
state: 0,
message: 'USB未授权'
}
}
this.webViewToH5(data)
}
});
},
//关闭usb
closeUSB() {
console.log('关闭usb')
UsbSerial.close()
clearInterval(this.setInterTimeUSB)
var data = {
command: 'comStatusChanged',
data: {
state: 0,
message: 'USB已关闭'
}
}
this.webViewToH5(data)
// uni.showToast({
// title: "usb已断开"
// })
},
// 将16进制的内容转成我们看得懂的字符串内容
hexCharCodeToStr(hexCharCodeStr) {
var trimedStr = hexCharCodeStr.trim()
var rawStr = trimedStr.substr(0, 2).toLowerCase() === "0x" ? trimedStr.substr(2) : trimedStr
var len = rawStr.length;
// console.log(len)
if (len % 2 !== 0) {
alert("存在非法字符!")
return ""
}
var curCharCode
var resultStr = []
for (var i = 0; i < len; i = i + 2) {
curCharCode = parseInt(rawStr.substr(i, 2), 16)
resultStr.push(String.fromCharCode(curCharCode))
}
return resultStr.join("")
},
// uniapp 传参给 vue页面---刘灿测试
webViewToH5(res) {
let currentWebview = this.$scope.$getAppWebview();
let wv = currentWebview.children()[0];
console.log('uniapp 传参给 vue页面');
wv.evalJS(`getVueMessage(${JSON.stringify(res)})`);
},
}
}

26
mixins/sixteenToString.js

@ -0,0 +1,26 @@
export default {
data() {
return {
}
},
methods: {
// 将16进制的内容转成我们看得懂的字符串内容
hexCharCodeToStr(hexCharCodeStr) {
var trimedStr = hexCharCodeStr.trim()
var rawStr = trimedStr.substr(0, 2).toLowerCase() === "0x" ? trimedStr.substr(2) : trimedStr
var len = rawStr.length;
console.log(len)
if (len % 2 !== 0) {
alert("存在非法字符!")
return ""
}
var curCharCode
var resultStr = []
for (var i = 0; i < len; i = i + 2) {
curCharCode = parseInt(rawStr.substr(i, 2), 16)
resultStr.push(String.fromCharCode(curCharCode))
}
return resultStr.join("")
},
}
}

BIN
nativeplugins/.DS_Store

Binary file not shown.

BIN
nativeplugins/ZS-Bugly/android/bugly-release.aar

Binary file not shown.

BIN
nativeplugins/ZS-Bugly/android/crashreport-4.1.9.3.aar

Binary file not shown.

18
nativeplugins/ZS-Bugly/package.json

@ -0,0 +1,18 @@
{
"name": "ZS-Bugly",
"id": "ZS-Bugly",
"version": "1.3.0",
"description": "捕获系统错误",
"_dp_type": "nativeplugin",
"_dp_nativeplugin": {
"android": {
"plugins": [{
"type": "module",
"name": "ZS-Bugly",
"class": "com.example.bugly.buglyModule"
}],
"integrateType": "aar",
"minSdkVersion": 16
}
}
}

BIN
nativeplugins/Zhimi-UsbSerial/.DS_Store

Binary file not shown.

BIN
nativeplugins/Zhimi-UsbSerial/android/usbserial-android-release.aar

Binary file not shown.

24
nativeplugins/Zhimi-UsbSerial/package.json

@ -0,0 +1,24 @@
{
"name": "Usb通讯插件",
"id": "Zhimi-UsbSerial",
"version": "1.0",
"description": "Usb通讯插件",
"_dp_type":"nativeplugin",
"_dp_nativeplugin":{
"android": {
"plugins": [
{
"type": "module",
"name": "Zhimi-UsbSerial",
"class": "com.zhimi.usbserial.UsbSerialModule"
}
],
"hooksClass": "com.zhimi.usbserial.UsbSerialAppProxy",
"integrateType": "aar",
"dependencies": [
"com.github.mik3y:usb-serial-for-android:3.4.3"
],
"minSdkVersion": "21"
}
}
}

BIN
nativeplugins/zhimiFTP/.DS_Store

Binary file not shown.

BIN
nativeplugins/zhimiFTP/android/.DS_Store

Binary file not shown.

BIN
nativeplugins/zhimiFTP/android/zhimiFTP-release.aar

Binary file not shown.

23
nativeplugins/zhimiFTP/package.json

@ -0,0 +1,23 @@
{
"name": "zhimiFTP",
"id": "zhimiFTP",
"version": "1.0.0",
"description": "FTP插件",
"_dp_type": "nativeplugin",
"_dp_nativeplugin": {
"android": {
"plugins": [
{
"type": "module",
"name": "Zhimi-FTP-Module",
"class": "com.example.zhimiftp.zhimiFTPModule"
}
],
"integrateType": "aar",
"minSdkVersion": "21",
"dependencies": [
"commons-net:commons-net:3.8.0"
]
}
}
}

45
pages.json

@ -0,0 +1,45 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path" : "pages/webPage/index", // USB
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
// {
// "path": "pages/ftpCgjc/index", // ftp
// "style": {
// "navigationBarTitleText": "uni-app"
// }
// }
// {
// "path": "pages/belShili/index", //
// "style": {
// "navigationBarTitleText": "uni-app"
// }
// }
// {
// "path" : "pages/usbCgjc/index", // USB
// "style" :
// {
// "navigationBarTitleText": "",
// "enablePullDownRefresh": false
// }
// }
// {
// "path": "pages/zhimiOK/index",
// "style": {
// "navigationBarTitleText": "uni-app"
// }
// }
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"uniIdRouter": {}
}

231
pages/belShili/index.vue

@ -0,0 +1,231 @@
<template>
<view>
<view class="title" @click="openBluetoothAdapter" style="margin-bottom: 10px;">初始化蓝牙</view>
<input class="classInput" type="" :value="stringToSend" @input="stringToSendInputHandle" />
<view class="title" @click="writeBLECharacteristicValue" style="margin-top: 10px;">触发执行</view>
<view class="title" @click="closeBluetoothAdapter" style="color: red;margin-top:40px;">断开蓝牙</view>
</view>
</template>
<script>
export default {
data() {
return {
onBluetoothDeviceFoundcustom: '',
deviceId: '',
stringToSend: '$D50504010300#', // D50604010000
setInterTimeBEL: null
}
},
onLoad() {
},
methods: {
// //
// stringToSendInputHandle(e) {
// console.log('', e);
// this.stringToSend = e.target.value
// },
// GPSGPS耀uni.onBluetoothDeviceFound
checkAndOpenGPS() {
var Context = plus.android.importClass("android.content.Context");
var LocationManager = plus.android.importClass("android.location.LocationManager");
var main = plus.android.runtimeMainActivity();
// LocationManager
var locationManager = main.getSystemService(Context.LOCATION_SERVICE);
// GPS
var isGPSEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
var isNetworkEnabled = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER); //
//
if (isGPSEnabled || isNetworkEnabled) {
console.log("位置服务已开启");
this.openBluetoothAdapter()
} else {
console.log("位置服务未开启,跳转到设置页面");
// GPS
var Intent = plus.android.importClass("android.content.Intent");
var Settings = plus.android.importClass("android.provider.Settings");
var intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
main.startActivity(intent);
// GPS
plus.nativeUI.alert("请手动开启GPS!");
}
},
//
openBluetoothAdapter() {
let that = this
that.closeBluetoothAdapter()
console.log('初始化蓝牙');
uni.openBluetoothAdapter({
success(res) {
console.log(res)
that.startBluetoothDevicesDiscovery()
},
fail(res) {
console.log('初始化蓝牙失败', res)
setTimeout(() => {
that.openBluetoothAdapter()
}, 5000)
}
})
},
//
startBluetoothDevicesDiscovery() {
console.log('开始搜索蓝牙设备');
let that = this
uni.startBluetoothDevicesDiscovery({
success(res) {
console.log(res)
that.onBluetoothDeviceFound()
}
})
},
//
onBluetoothDeviceFound() {
let that = this
this.onBluetoothDeviceFoundcustom = uni.onBluetoothDeviceFound((res) => {
console.log('监听设备发现', res.devices[0]);
if (res.devices[0].name === 'ACP60205') {
console.log('hello,厉害,找到啦,啦啦啦~~~');
//
uni.stopBluetoothDevicesDiscovery();
that.deviceId = res.devices[0].deviceId; // ID
that.createBLEConnection()
// setTimeout(()=>{this.getBLEDeviceServices()},3000)
}
})
},
// +
getBLEDeviceServices() {
let that = this
uni.getBLEDeviceServices({
deviceId: that.deviceId,
success: (res) => {
console.log('服务列表', res.services);
res.services.forEach(service => {
uni.getBLEDeviceCharacteristics({
deviceId: that.deviceId,
serviceId: service.uuid,
success: function(charRes) {
console.log('特征列表', charRes.characteristics);
},
fail: function(err) {
console.error('获取特征失败', err)
}
});
});
},
fail: function(err) {
console.error('获取服务失败', err)
}
})
},
//
createBLEConnection() {
let that = this
console.log('连接到设备that.deviceId', that.deviceId);
uni.createBLEConnection({
deviceId: that.deviceId,
success: function() {
console.log('连接成功')
that.belStatus()
},
fail: function(err) {
console.error('连接失败', err)
setTimeout(() => {
that.openBluetoothAdapter()
}, 5000)
}
})
},
// BEL
belStatus() {
clearInterval(this.setInterTimeBEL)
this.setInterTimeBEL = setInterval(() => {
this.getConnectedBluetoothDevices()
}, 5000)
},
//
getConnectedBluetoothDevices() {
let that = this
uni.getConnectedBluetoothDevices({
success(res) {
console.log('当前已连接的设备:', res.devices);
if (res.devices.length <= 0) {
that.openBluetoothAdapter()
clearInterval(that.setInterTimeBEL)
}
},
fail(err) {
console.log('获取已连接设备失败:', err)
that.openBluetoothAdapter()
}
})
},
//
writeBLECharacteristicValue() {
let that = this
//
// $D50504030231#
// D5---5
// 06---
const dataToSend = that.stringToByteArray(that.stringToSend)
console.log(' dataToSend.buffer', dataToSend.buffer)
uni.writeBLECharacteristicValue({
deviceId: that.deviceId, // ID
serviceId: '0000ffe0-0000-1000-8000-00805f9b34fb', // ID
characteristicId: '0000ffe1-0000-1000-8000-00805f9b34fb', // ID
value: dataToSend.buffer,
writeType: 'write',
success: () => {
console.log('发送内容成功')
},
fail: (err) => {
console.error('发送内容失败', err)
}
})
},
//
stringToByteArray(str) {
const byteArray = new Uint8Array(str.length);
for (let i = 0; i < str.length; i++) {
byteArray[i] = str.charCodeAt(i)
}
return byteArray;
},
//
closeBluetoothAdapter(title) {
let that = this
uni.closeBluetoothAdapter({
success() {
console.log('蓝牙适配器关闭成功');
},
fail(err) {
console.log('关闭蓝牙适配器失败: ', err);
}
});
},
}
}
</script>
<style>
.title {
font-size: 36rpx;
color: #8f8f94;
text-align: center;
}
.classInput {
border: 1px solid #ccc;
height: 80rpx;
width: 300px;
text-align: center;
margin: auto;
}
</style>

333
pages/ftpCgjc/index.vue

@ -0,0 +1,333 @@
<template>
<view class="content" style="margin-left: 200px;">
<view>连接状态{{isConnect ? '已连接' : '未连接'}}</view>
<view>循环次数: {{count}}</view>
<button type="primary" @click="connectFtpServer()">FTP连接</button>
<button type="primary" @click="ftpUploadFiles()">FTP上传文件夹</button>
<button type="primary" @click="ftpCreatNewDirectory()">FTP新建文件夹</button>
<button type="primary" @click="ftpUploadFile()">FTP上传文件</button>
<button type="primary" @click="ftpDownloadSingleFile()">FTP单个文件下载</button>
<button type="primary" @click="ftpLoopServerPath()">获取目录</button>
<button type="primary" @click="ftpDeleteServerFiles()">删除文件</button>
<button type="primary" @click="ftpDeleteServerFilesWithoutDirectory()">删除文件夹下面文件保留文件夹</button>
<button type="primary" @click="closeFTPConnect()">FTP断开连接</button>
<button type="primary" @click="closeSetTime()">刘灿-FTP暂停循环</button>
<button type="primary" @click="turnUrl()">刘灿-FTP本地文件转URL</button>
<button type="primary" @click="deleteAppDownLoadFile()">刘灿-删除安卓机目录文件</button>
<button type="primary" style="margin-top: 16px;" @click="connectFtpsServer()">FTPS连接</button>
<button type="primary" @click="ftpsUploadFiles()">FTPS上传文件夹</button>
<button type="primary" @click="ftpsCreatNewDirectory()">FTPS新建文件夹</button>
<button type="primary" @click="ftpsUploadFile()">FTPS上传文件</button>
<button type="primary" @click="ftpsDownloadSingleFile()">FTPS单个文件下载</button>
<button type="primary" @click="ftpsLoopServerPath()">ftps获取目录</button>
<button type="primary" @click="ftpsDeleteServerFiles()">ftps删除文件</button>
<button type="primary" @click="ftpsDeleteServerFilesWithoutDirectory()">ftps删除文件夹下面文件保留文件夹</button>
<button type="primary" @click="closeFTPSConnect()">FTPS断开连接</button>
<view class="webViewClass" style="height: 50vh;">
<web-view ref="webViewRef" @message="messageData" src="http://192.168.0.35:8001/wz_qg/ftpCs"
:fullscreen="false" :webview-styles="webviewStyles"></web-view>
</view>
</view>
</template>
<script>
var FTP = uni.requireNativePlugin('Zhimi-FTP-Module');
export default {
data() {
return {
title: 'Hello',
remoteUrl: '',
webviewStyles: {
width: '300px',
height: '500px',
left: '0px',
top: '200px'
// top: '100px'
},
androidFileDocPath: plus.io.convertLocalFileSystemURL('_doc'),
ftpLogicDeceteName: '/sda1/logicDelete',
count:0,
isConnect:false,
setInterTimeFTP:null
}
},
onShow() {
console.log('showshowshow');
// this.ftpLoopServerPath()
},
onHide() {
console.log('hidehidehide');
},
onLoad() {
this.connectFtpServer()
},
methods: {
// :
// ftp ---> ftp ---> ---> urlH5
// ---> H5FTP ---> ---> FTP
// FTP
connectFtpServer() {
//
//
// {type : "connect", data : {data : "200 true true}}
// {type : "connect", data : {"error" : ""}}
// "192.168.50.1", 21, "hmgc", "hmgc"
// "192.168.50.131", 21, "hmftp", "hmftp"
FTP.connectFtpServer("192.168.50.131", 21, "hmftp", "hmftp", "gbk", res => {
console.log('FTP连接',res)
clearInterval(this.setInterTimeFTP)
this.ftpSendNoOp()
if(res.type==='connect' && res.data.connect === true) {
this.isConnect = true
} else if(res.type==='connect' && res.data.connect === false){
this.isConnect = false
}
})
},
// FTP
ftpLoopServerPath(name,index,text) {
// 1 0
//("" )
//
// {type : getFileInfo, data : [{name : "", size : , time : }]}
// {type : "error", data : ""}
let pathName = name ? name : '/sda1/deviceNewFile'
console.log('pathName', pathName);
FTP.ftpLoopServerPath(pathName,res=>{
console.log('获取FTP服务器目录res',res);
res.data.length > 0 ? this.ftpChangeWorkingDirectory(res.data[0]) : ''
})
},
//
ftpChangeWorkingDirectory(data) {
FTP.ftpChangeWorkingDirectory("/",res=>{
console.log('下载前调用这个方法',res)
res.data ? this.ftpDownloadSingleFile(data) : ''
})
},
// FTP-
ftpDownloadSingleFile(data) {
//"", ""
//
//{type : download, data : {status : true/false, name : "", errpr : ""}}
// var inputFile = plus.io.convertLocalFileSystemURL('/static')
console.log('androidFileDocPath',this.androidFileDocPath)
// '/sda1/deviceNewFile/20240918/20240918logo.png'
FTP.ftpDownloadSingleFile(this.androidFileDocPath, data.name, res => {
console.log('单个文件下载至安卓机--成功', res)
if(res.type === 'download') {
this.turnUrl(data)
}
})
},
// URL---
turnUrl(data) {
var androidFileNamePath = this.androidFileDocPath + data.fileName
console.log('androidFileNamePath', androidFileNamePath);
plus.io.resolveLocalFileSystemURL(androidFileNamePath, (entry) => {
this.remoteUrl = entry.toRemoteURL();
console.log('Remote URL:', this.remoteUrl);
this.webViewToH5({
type: 'getUrlInfo',
url: this.remoteUrl,
data:data
})
}, function(e) {
console.log('文件路径解析失败', e);
})
},
// uniapp vue---
webViewToH5(res) {
let currentWebview = this.$scope.$getAppWebview();
let wv = currentWebview.children()[0];
console.log('uniapp 传参给 vue页面');
wv.evalJS(`getVueMessage(${JSON.stringify(res)})`);
},
// uniapp vueUNI ---
messageData(e) {
console.log('接收的VUE参数', e.detail.data[0]) //
let vueDetail = e.detail.data[0]
if(vueDetail.type === 'getCgjcSuccess') {
setTimeout(()=>{
this.deleteAppDownLoadFile(vueDetail.data)
this.ftpDeleteServerFiles(vueDetail.data)
},2000)
}
},
// ---
deleteAppDownLoadFile(data) {
console.log(' 删除安卓机下载下来的文件--data',data);
//
var deleteAppFileName = this.androidFileDocPath + data.fileName
plus.io.resolveLocalFileSystemURL(deleteAppFileName, (entry)=> {
// remove
entry.remove(() => {
console.log('文件删除成功');
}, (error) => {
console.log('文件删除失败: ' + error.message);
});
}, (error) => {
console.log('无法解析文件路径: ' + error.message);
})
},
// FTP
ftpDeleteServerFiles(data) {
//("", )
//
//{type : delete, data : {msg : "/(ps)", data : "", status : true/false, error : ""}}
FTP.ftpDeleteServerFiles(data.name, res => {
console.log('FTP服务器文件删除成功', res)
setTimeout(()=>{
this.ftpUploadFile(data)
},3000)
})
},
// FTP-FTP
ftpUploadFile(data) {
var inputFile = plus.io.convertLocalFileSystemURL('/static/logo.png')
console.log('inputFile文件', inputFile);
FTP.ftpUploadFile(inputFile, '/sda1/deviceNewFile', res => {
console.log('文件-上传成功',res)
if(res.data.msg==='上传完成') {
console.log('00000000000000000000');
this.ftpLoopServerPath()
console.log(this.count++);
}
})
},
// FTP
closeFTPConnect() {
console.log('点到了!!!!');
//
FTP.closeFTPConnect(res => {
console.log(res)
this.isConnect = false
})
},
// 线
ftpSendNoOp(callback) {
this.setInterTimeFTP = setInterval(()=>{
FTP.ftpSendNoOp(res=>{
if(res.data === true) {
// console.log('线-线',res);
this.isConnect = true
// callback(res.data)
} else {
console.log('测试是否掉线回调-已掉线',res);
this.isConnect = false
this.connectFtpServer()
// callback(res.data)
}
})
},5000)
},
// ----------ftps----------
// FTPS
connectFtpsServer() {
FTP.connectFtpsServer("192.168.0.8", 21, "hmftp", "hmftp", "gbk", res => {
console.log(res)
})
},
// FTPS
ftpsUploadFiles() {
var inputFile = plus.io.convertLocalFileSystemURL('/static')
console.log('inputFile文件夹', inputFile);
FTP.ftpsUploadFile(inputFile, "/sda1", res => {
console.log(res)
})
},
// FTPS
ftpsUploadFile() {
var inputFile = plus.io.convertLocalFileSystemURL('/static/ceshi.txt')
FTP.ftpsUploadFile(inputFile, "/sda1", res => {
console.log(res)
})
},
// FTPS
ftpsCreatNewDirectory() {
FTP.ftpsCreatNewDirectory("/sda1", "newDirectory", res => {
console.log(res)
})
},
// FTPS
ftpsDownloadSingleFile() {
var outputFile = plus.io.convertLocalFileSystemURL('_doc')
console.log('outputFile', outputFile);
FTP.ftpsDownloadSingleFile(outputFile, "/sda1/ceshi.txt", res => {
console.log(res)
})
},
// FTPS
ftpsLoopServerPath() {
FTP.ftpsLoopServerPath("/sda1", res => {
console.log(res)
})
},
// FTPS
ftpsDeleteServerFiles() {
//("", )
//
//{type : delete, data : {msg : "/(ps)", data : "", status : true/false, error : ""}}
FTP.ftpsDeleteServerFiles('/sda1/ceshi.txt', res => {
console.log(res)
})
},
// FTPS
ftpsDeleteServerFilesWithoutDirectory() {
//
FTP.ftpsDeleteServerFilesWithoutDirectory("/sda1", res => {
console.log(res)
})
},
// FTPS
closeFTPSConnect() {
console.log('点到了!!!!');
FTP.closeFTPSConnect(res => {
console.log('点到了进来了!!!!');
console.log(res)
})
},
// 线
ftpsSendNoOp() {
FTP.ftpsSendNoOp(e=>{
})
},
}
}
</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;
}
.webViewClass {
position: fixed;
}
</style>

405
pages/tsjcIndex/index.vue

@ -0,0 +1,405 @@
<template>
<view class="content" style="margin-left: 200px;">
<!-- <button type="primary" @click="hq()">唤起app</button> -->
<button type="primary" @click="connectFtpServer()">FTP连接</button>
<button type="primary" @click="ftpUploadFiles()">FTP上传文件夹</button>
<button type="primary" @click="ftpCreatNewDirectory()">FTP新建文件夹</button>
<button type="primary" @click="ftpUploadFile()">FTP上传文件</button>
<button type="primary" @click="ftpDownloadSingleFile()">FTP单个文件下载</button>
<button type="primary" @click="ftpLoopServerPath()">获取目录</button>
<button type="primary" @click="ftpDeleteServerFiles()">删除文件</button>
<button type="primary" @click="ftpDeleteServerFilesWithoutDirectory()">删除文件夹下面文件保留文件夹</button>
<button type="primary" @click="closeFTPConnect()">FTP断开连接</button>
<button type="primary" @click="closeSetTime()">刘灿-FTP暂停循环</button>
<button type="primary" @click="turnUrl()">刘灿-FTP本地文件转URL</button>
<button type="primary" @click="deleteAppDownLoadFile()">刘灿-删除安卓机目录文件</button>
<button type="primary" style="margin-top: 16px;" @click="connectFtpsServer()">FTPS连接</button>
<button type="primary" @click="ftpsUploadFiles()">FTPS上传文件夹</button>
<button type="primary" @click="ftpsCreatNewDirectory()">FTPS新建文件夹</button>
<button type="primary" @click="ftpsUploadFile()">FTPS上传文件</button>
<button type="primary" @click="ftpsDownloadSingleFile()">FTPS单个文件下载</button>
<button type="primary" @click="ftpsLoopServerPath()">ftps获取目录</button>
<button type="primary" @click="ftpsDeleteServerFiles()">ftps删除文件</button>
<button type="primary" @click="ftpsDeleteServerFilesWithoutDirectory()">ftps删除文件夹下面文件保留文件夹</button>
<button type="primary" @click="closeFTPSConnect()">FTPS断开连接</button>
<view class="webViewClass" style="height: 50vh;">
<web-view ref="webViewRef" @message="messageData" src="http://192.168.0.35:8001/wz_qg/ftpCs"
:fullscreen="false" :webview-styles="webviewStyles"></web-view>
</view>
</view>
</template>
<script>
var FTP = uni.requireNativePlugin('Zhimi-FTP-Module');
export default {
data() {
return {
title: 'Hello',
setInterTime: null,
remoteUrl: '',
webviewStyles: {
width: '300px',
height: '500px',
left: '0px',
top: '200px'
// top: '100px'
},
androidFileDocPath: '',
ftpLogicDeceteName: '/sda1/logicDelete',
currentfolderList:[],
flag:true,
loopI:0
}
},
onLoad() {
// console.log(plus.io.convertLocalFileSystemURL('ceshi'));
},
methods: {
// hq() {
// plus.runtime.launchApplication({
// packageName: 'com.baidu.BaiduMap'
// }, function() {
// console.log('');
// }, function(e) {
// console.error(': ' + e.message);
// })
// },
// :
// ftp ---> ftp ---> ---> urlH5
// ---> H5FTP ---> ---> FTP
// FTP
connectFtpServer() {
//
//
// {type : "connect", data : {data : "200 true true}}
// {type : "connect", data : {"error" : ""}}
// "192.168.50.1", 21, "hmgc", "hmgc"
// "192.168.50.131", 21, "hmftp", "hmftp"
FTP.connectFtpServer("192.168.50.1", 21, "hmgc", "hmgc", "gbk", res => {
console.log(res)
})
},
// FTP
ftpLoopServerPath(name,index,text) {
// 1 0
//("" )
//
// {type : getFileInfo, data : [{name : "", size : , time : }]}
// {type : "error", data : ""}
let pathName = name ? name : '/sda1/deviceNewFile'
console.log('pathName', pathName);
if(text==='不走循环') {
FTP.ftpLoopServerPath(pathName,res=>{
this.webViewToH5(res)
})
} else {
FTP.ftpLoopServerPath(pathName, res => {
console.log('res', res)
if(res.data.length > 0 && res.data[0].type===1) {
console.log('type=1',res.data);
this.currentfolderList = res.data
} else if(res.data.length > 0 && res.data[0].type ===0) {
this.flag = true
this.loopI++;
} else if (res.data.length <=0) {
this.currentfolderList.splice(index,1)
console.log('空文件夹',this.currentfolderList);
this.flag = true
}
})
setTimeout(()=>{
while (this.flag === true && this.loopI <= this.currentfolderList.length -1) {
this.flag = false
this.ftpLoopServerPath(this.currentfolderList[this.loopI].name,this.loopI)
console.log('结果',this.currentfolderList);
}
},150)
if(this.loopI == this.currentfolderList.length -1) {
this.webViewToH5({
type:'getFileInfo',
data:this.currentfolderList
})
}
}
},
// uniapp vue---
webViewToH5(res) {
let currentWebview = this.$scope.$getAppWebview();
let wv = currentWebview.children()[0];
console.log('uniapp 传参给 vue页面');
wv.evalJS(`getVueMessage(${JSON.stringify(res)})`);
this.currentfolderList = []
this.loopI = 0
},
// uniapp vueUNI ---
messageData(e) {
console.log('接收的VUE参数', e.detail.data[0]) //
let vueDetail = e.detail.data[0]
if (vueDetail.type === 'getFileInfo') {
console.log('vueDetail.data', vueDetail.data);
this.ftpLoopServerPath(vueDetail.data.name,'','不走循环')
} else if (vueDetail.type === 'getUrlInfo') {
this.ftpDownloadSingleFile(vueDetail.data)
} else if (vueDetail.type === 'sendCorrelationConfirm') {
// logicDelete
this.isHaveCurrentFileFolder(vueDetail.data)
}
},
// FTP-
ftpDownloadSingleFile(data) {
//"", ""
//
//{type : download, data : {status : true/false, name : "", errpr : ""}}
// var inputFile = plus.io.convertLocalFileSystemURL('/static')
this.androidFileDocPath = plus.io.convertLocalFileSystemURL('_doc')
console.log(this.androidFileDocPath)
// '/sda1/deviceNewFile/20240918/20240918logo.png'
FTP.ftpDownloadSingleFile(this.androidFileDocPath, data.name, res => {
console.log('单个文件下载至安卓机--成功', res)
this.turnUrl(data)
})
},
// URL---
turnUrl(data) {
var androidFileNamePath = this.androidFileDocPath + data.fileName
console.log('androidFileNamePath', androidFileNamePath);
plus.io.resolveLocalFileSystemURL(androidFileNamePath, (entry) => {
this.remoteUrl = entry.toRemoteURL();
console.log('Remote URL:', this.remoteUrl);
this.webViewToH5({
type: 'getUrlInfo',
url: this.remoteUrl
})
}, function(e) {
console.log('文件路径解析失败', e);
})
},
// logicDelete
isHaveCurrentFileFolder(data) {
let nameArr = data.name.split("/")
let folderName = nameArr[nameArr.length - 2]
// FTP
FTP.ftpLoopServerPath(this.ftpLogicDeceteName, res => {
let index = res.data.findIndex(item => item.fileName == folderName)
console.log('判断logicDelete逻辑删除备份的文件夹中是否有此文件夹', index);
if (index === -1) {
this.ftpCreatNewDirectory(data, folderName)
} else {
this.ftpUploadFile(data, folderName)
}
})
},
// FTP-FTP
ftpCreatNewDirectory(data, folderName) {
FTP.ftpCreatNewDirectory(this.ftpLogicDeceteName, folderName, res => {
//
this.ftpUploadFile(data,folderName)
console.log('新建文件夹成功',res)
})
// let index = 0
//
// setInterval(() => {
// let fileIndexName = `2024${index++}`
// FTP.ftpCreatNewDirectory('/sda1/deviceNewFile', fileIndexName, res => {
// var inputFile = plus.io.convertLocalFileSystemURL('/static/logo.png')
// //
// FTP.ftpUploadFile(inputFile, `/sda1/deviceNewFile/${fileIndexName}`,
// res => {
// console.log('---', '-');
// console.log(res)
// })
// })
// }, 2000)
},
// FTP-FTP
ftpUploadFiles() {
// /htdocs/fileName
//
//{type : "upload", data : {path : "", status : true/false, msg : "", error : ""}}
// /storage/emulated/0/Download/downladed_rom
var inputFile = plus.io.convertLocalFileSystemURL('/static')
FTP.ftpUploadFile(inputFile, "/sda1", res => {
console.log(res)
})
},
// FTP-FTP
ftpUploadFile(data, folderName) {
// var inputFile = plus.io.convertLocalFileSystemURL('/static/ceshi.txt')
// console.log('inputFile', inputFile);
// //
// FTP.ftpUploadFile(inputFile, `/sda1/deviceNewFile/${ftpFwqName}`, res => {
// console.log(ftpFwqName, '-');
// console.log(res)
// })
// ftp---
var detailFileName = this.androidFileDocPath + data.fileName
FTP.ftpUploadFile(detailFileName, `${this.ftpLogicDeceteName}/${folderName}`, res => {
console.log('获取安卓手机文件夹中的文件---刘灿测试', '文件-上传成功');
console.log(res)
this.deleteAppDownLoadFile(data.fileName)
this.ftpDeleteServerFiles(data.name,folderName)
})
},
// ---
deleteAppDownLoadFile(fileName) {
//
var deleteAppFileName = this.androidFileDocPath + fileName
plus.io.resolveLocalFileSystemURL(deleteAppFileName, function(entry) {
// remove
entry.remove(() => {
console.log('文件删除成功');
}, (error) => {
console.log('文件删除失败: ' + error.message);
});
}, (error) => {
console.log('无法解析文件路径: ' + error.message);
})
},
// FTP
ftpDeleteServerFiles(name,folderName) {
//("", )
//
//{type : delete, data : {msg : "/(ps)", data : "", status : true/false, error : ""}}
FTP.ftpDeleteServerFiles(name, res => {
console.log('FTP服务器文件删除成功', res)
})
// this.ftpLoopServerPath()
setTimeout(()=>{
console.log('删除后获取目录-路径',`/sda1/deviceNewFile/${folderName}`);
FTP.ftpLoopServerPath(`/sda1/deviceNewFile/${folderName}`,res=>{
console.log('删除后获取目录',res);
this.webViewToH5(res)
})
},2000)
},
// FTP
ftpDeleteServerFilesWithoutDirectory() {
//
FTP.ftpDeleteServerFilesWithoutDirectory("/sda1/deviceNewFile", res => {
console.log(res)
})
},
// ---
closeSetTime() {
console.log('停止循环');
clearInterval(this.setInterTime)
},
// FTP
closeFTPConnect() {
console.log('点到了!!!!');
//
FTP.closeFTPConnect(res => {
console.log(res)
})
},
// ----------ftps----------
// FTPS
connectFtpsServer() {
FTP.connectFtpsServer("192.168.0.8", 21, "hmftp", "hmftp", "gbk", res => {
console.log(res)
})
},
// FTPS
ftpsUploadFiles() {
var inputFile = plus.io.convertLocalFileSystemURL('/static')
console.log('inputFile文件夹', inputFile);
FTP.ftpsUploadFile(inputFile, "/sda1", res => {
console.log(res)
})
},
// FTPS
ftpsUploadFile() {
var inputFile = plus.io.convertLocalFileSystemURL('/static/ceshi.txt')
FTP.ftpsUploadFile(inputFile, "/sda1", res => {
console.log(res)
})
},
// FTPS
ftpsCreatNewDirectory() {
FTP.ftpsCreatNewDirectory("/sda1", "newDirectory", res => {
console.log(res)
})
},
// FTPS
ftpsDownloadSingleFile() {
var outputFile = plus.io.convertLocalFileSystemURL('_doc')
console.log('outputFile', outputFile);
FTP.ftpsDownloadSingleFile(outputFile, "/sda1/ceshi.txt", res => {
console.log(res)
})
},
// FTPS
ftpsLoopServerPath() {
FTP.ftpsLoopServerPath("/sda1", res => {
console.log(res)
})
},
// FTPS
ftpsDeleteServerFiles() {
//("", )
//
//{type : delete, data : {msg : "/(ps)", data : "", status : true/false, error : ""}}
FTP.ftpsDeleteServerFiles('/sda1/ceshi.txt', res => {
console.log(res)
})
},
// FTPS
ftpsDeleteServerFilesWithoutDirectory() {
//
FTP.ftpsDeleteServerFilesWithoutDirectory("/sda1", res => {
console.log(res)
})
},
// FTPS
closeFTPSConnect() {
console.log('点到了!!!!');
FTP.closeFTPSConnect(res => {
console.log('点到了进来了!!!!');
console.log(res)
})
}
}
}
</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;
}
.webViewClass {
position: fixed;
}
</style>

33
pages/usbCgjc/index.vue

@ -0,0 +1,33 @@
<template>
<view class="content">
<button type="primary" @click="connectUSB()">初始化</button>
<button type="primary" @click="openUSB()" style="margin-top: 10px;">打开usb</button>
</view>
</template>
<script>
import linkUSB from '@/mixins/linkUSB.js'
export default {
mixins: [linkUSB],
data() {
return {
}
},
mounted() {
this.connectUSB()
},
methods: {
}
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
</style>

152
pages/webPage/index.vue

@ -0,0 +1,152 @@
<template>
<view class="webViewClass" style="height: 50vh;">
<!-- http://192.168.0.35:8001/wz_qg/ftpCs -->
<!-- "http://192.168.0.35:8001/ykjc/login -->
<web-view ref="webViewRef" @message="messageData" src="http://192.168.0.35:8001/ykjc/login"
:fullscreen="true"></web-view>
</view>
</template>
<script>
import linkUSB from '@/mixins/linkUSB.js'
import linkFTP from '@/mixins/linkFTP.js'
import linkBEL from '@/mixins/linkBEL.js'
export default {
mixins: [linkUSB, linkFTP, linkBEL],
data() {
return {
cgConfigInfo: '',
buglyModule: ''
}
},
mounted() {
this.select1()
console.log('cgConfigInfo', uni.getStorageSync('cgConfigInfo'));
this.cgConfigInfo = uni.getStorageSync('cgConfigInfo') ? JSON.parse(uni.getStorageSync('cgConfigInfo')) :
''
// cgConfigSet // --FTP
if (this.cgConfigInfo.command === 'cgConfigSet') {
this.linkSet()
}
},
methods: {
// uniapp vueUNI ---
messageData(e) {
console.log('接收的VUE参数', e.detail.data[0]) //
let vueDetail = e.detail.data[0]
// vue
// cgConfigSet // --FTP
if (vueDetail.command === 'cgConfigSet') {
this.cgConfigInfo = vueDetail
uni.setStorageSync('cgConfigInfo', JSON.stringify(vueDetail))
var data = {
command: 'cgConfigSetFeedback',
data: {
state: 0,
message: ''
}
}
this.linkSet()
}
// vue --- FTP
if (vueDetail.command === 'deleteOneFile' && this.cgConfigInfo.commandType === 'FTP') {
this.deleteAppDownLoadFile(vueDetail.data)
// FTP---退
this.ftpDeleteServerFiles(vueDetail.data)
}
// vue --- FTP
if (vueDetail.command === 'deleteAllFile' && this.cgConfigInfo.commandType === 'FTP') {
this.ftpDeleteServerFilesWithoutDirectory()
}
// vue:
if (vueDetail.command === 'cgConfigQuery') {
let cgConfigInfoData = this.cgConfigInfo.data
// USB
this.connectUSB('NoOpen', () => {
this.webViewToH5({
command: 'cgConfigQueryFeedback',
commandType: this.cgConfigInfo.commandType,
data: {
status: 0,
system: plus.os.name, //
comPorts: this.usbDevicesComPortsList, //
portName: cgConfigInfoData ? cgConfigInfoData.portName : '', //
baudRate: cgConfigInfoData ? cgConfigInfoData.baudRate : '', //
parity: cgConfigInfoData ? cgConfigInfoData.parity : '', //
dataBits: cgConfigInfoData ? cgConfigInfoData.dataBits : '', //
stopBits: cgConfigInfoData ? cgConfigInfoData.stopBits : '', //
inspectionDir: cgConfigInfoData ? cgConfigInfoData.inspectionDir :
'', //
ftpHostName: cgConfigInfoData ? cgConfigInfoData.ftpHostName :
'', // ftp
ftpUserName: cgConfigInfoData ? cgConfigInfoData.ftpUserName :
'', // ftp
ftpPassWord: cgConfigInfoData ? cgConfigInfoData.ftpPassWord : '', // ftp
}
})
})
}
// vue
if (vueDetail.command === 'belConnect') {
console.log('vue发送过来的:蓝牙连接');
this.checkAndOpenGPS()
}
// vue
if (vueDetail.command === 'sendBelData') {
this.writeBLECharacteristicValue(vueDetail.data.belvalue)
}
if (vueDetail.command === 'belClose') {
console.log('vue发送过来的:蓝牙断开');
this.closeBluetoothAdapter('belClose')
}
},
linkSet() {
//
if (this.cgConfigInfo.commandType === 'USB') {
// USB
this.connectUSB('open')
//
this.usbStatus()
// FTp
this.closeFTPConnect()
}
// ftp
else if (this.cgConfigInfo.commandType === 'FTP') {
// FTP
this.connectFtpServer()
//
this.ftpSendNoOp()
// USB
this.closeUSB()
}
},
select1() {
//
this.buglyModule = uni.requireNativePlugin('ZS-Bugly');
console.log('buglyModule', this.buglyModule);
if (this.buglyModule) {
//
this.buglyModule.initBuglyNoVersion('e6c8c40ced', (res) => {
// uni.showToast({
// icon: 'none',
// title: JSON.stringify(res)
// });
// this.buglyModule.gotoNativePage();
console.log('res', res);
});
} else {
uni.showToast({
icon: 'none',
title: '加载Bugly插件失败'
});
}
},
}
}
</script>
<style>
.webViewClass {
position: fixed;
}
</style>

225
pages/zhimiOK/index.vue

@ -0,0 +1,225 @@
<template>
<view class="content">
<button type="primary" @click="connectFtpServer()">FTP连接</button>
<button type="primary" @click="ftpUploadFiles()">FTP上传文件夹</button>
<button type="primary" @click="ftpCreatNewDirectory()">FTP新建文件夹</button>
<button type="primary" @click="ftpUploadFile()">FTP上传文件</button>
<button type="primary" @click="ftpDownloadSingleFile()">FTP单个文件下载</button>
<button type="primary" @click="ftpLoopServerPath()">获取目录</button>
<button type="primary" @click="ftpDeleteServerFiles()">删除文件</button>
<button type="primary" @click="ftpDeleteServerFilesWithoutDirectory()">删除文件夹下面文件保留文件夹</button>
<button type="primary" @click="closeFTPConnect()">FTP断开连接</button>
<button type="primary" style="margin-top: 16px;" @click="connectFtpsServer()">FTPS连接</button>
<button type="primary" @click="ftpsUploadFiles()">FTPS上传文件夹</button>
<button type="primary" @click="ftpsCreatNewDirectory()">FTPS新建文件夹</button>
<button type="primary" @click="ftpsUploadFile()">FTPS上传文件</button>
<button type="primary" @click="ftpsDownloadSingleFile()">FTPS单个文件下载</button>
<button type="primary" @click="ftpsLoopServerPath()">ftps获取目录</button>
<button type="primary" @click="ftpsDeleteServerFiles()">ftps删除文件</button>
<button type="primary" @click="ftpsDeleteServerFilesWithoutDirectory()">ftps删除文件夹下面文件保留文件夹</button>
<button type="primary" @click="closeFTPSConnect()">FTPS断开连接</button>
</view>
</template>
<script>
var FTP = uni.requireNativePlugin('Zhimi-FTP-Module');
export default {
data() {
return {
title: 'Hello',
}
},
onLoad() {
// console.log(plus.io.convertLocalFileSystemURL('ceshi'));
},
methods: {
// FTP
connectFtpServer() {
//
//
// {type : "connect", data : {data : "200 true true}}
// {type : "connect", data : {"error" : ""}}
// "192.168.50.1", 21, "hmgc", "hmgc"
// "192.168.50.131", 21, "hmftp", "hmftp"
FTP.connectFtpServer("192.168.50.1", 21, "hmgc", "hmgc", "gbk", res => {
console.log(res)
})
},
// FTP-FTP
ftpUploadFiles(ftpFwqName) {
// /htdocs/fileName
//
//{type : "upload", data : {path : "", status : true/false, msg : "", error : ""}}
// /storage/emulated/0/Download/downladed_rom
var inputFile = plus.io.convertLocalFileSystemURL('/static')
console.log('inputFile文件夹', inputFile);
FTP.ftpUploadFile(inputFile, '/sda1/DDwifi', res => {
console.log(ftpFwqName, '文件夹-上传成功');
console.log(res)
//
// this.ftpDownloadSingleFile(ftpFwqName)
})
},
// FTP-FTP
ftpUploadFile() {
var inputFile = plus.io.convertLocalFileSystemURL('/static/logo.png')
console.log('inputFile文件', inputFile);
//
FTP.ftpUploadFile(inputFile, '/sda1/deviceNewFile/20240919', res => {
console.log(res)
})
},
// FTP-FTP
ftpCreatNewDirectory() {
let ftpFwq = 0
FTP.ftpCreatNewDirectory("/sda1/DDwifi", 'newDirectory', res => {
console.log(res)
})
},
// FTP-
ftpDownloadSingleFile(ftpFwqName) {
//"", ""
//
//{type : download, data : {status : true/false, name : "", errpr : ""}}
// var inputFile = plus.io.convertLocalFileSystemURL('/static')
var outputFile = plus.io.convertLocalFileSystemURL('_doc')
console.log(outputFile);
FTP.ftpDownloadSingleFile(outputFile, '/sda1/logicDelete/logo.png', res => {
// console.log(ftpFwqName,);
console.log(res)
})
},
// FTP
ftpLoopServerPath() {
//("" )
//
// {type : getFileInfo, data : [{name : "", size : , time : }]}
// {type : "error", data : ""}
FTP.ftpLoopServerPath("/sda1/DDwifi", res => {
console.log(res)
})
},
// FTP
ftpDeleteServerFiles() {
//("", )
//
//{type : delete, data : {msg : "/(ps)", data : "", status : true/false, error : ""}}
FTP.ftpDeleteServerFiles('/sda1/DDwifi/logo.png', res => {
console.log(res)
})
},
// FTP
ftpDeleteServerFilesWithoutDirectory() {
//
FTP.ftpDeleteServerFilesWithoutDirectory("/sda1/DDwifi", res => {
console.log(res)
})
},
// FTP
closeFTPConnect() {
console.log('点到了!!!!');
//
FTP.closeFTPConnect(res => {
console.log(res)
})
},
// ----------ftps----------
// FTPS
connectFtpsServer() {
FTP.connectFtpsServer("192.168.0.8", 21, "hmftp", "hmftp", "gbk", res => {
console.log(res)
})
},
// FTPS
ftpsUploadFiles() {
var inputFile = plus.io.convertLocalFileSystemURL('/static')
console.log('inputFile文件夹', inputFile);
FTP.ftpsUploadFile(inputFile, "/sda1", res => {
console.log(res)
})
},
// FTPS
ftpsUploadFile() {
var inputFile = plus.io.convertLocalFileSystemURL('/static/ceshi.txt')
FTP.ftpsUploadFile(inputFile, "/sda1", res => {
console.log(res)
})
},
// FTPS
ftpsCreatNewDirectory() {
FTP.ftpsCreatNewDirectory("/sda1", "newDirectory", res => {
console.log(res)
})
},
// FTPS
ftpsDownloadSingleFile() {
var outputFile = plus.io.convertLocalFileSystemURL('_doc')
console.log('outputFile', outputFile);
FTP.ftpsDownloadSingleFile(outputFile, "/sda1/ceshi.txt", res => {
console.log(res)
})
},
// FTPS
ftpsLoopServerPath() {
FTP.ftpsLoopServerPath("/sda1", res => {
console.log(res)
})
},
// FTPS
ftpsDeleteServerFiles() {
//("", )
//
//{type : delete, data : {msg : "/(ps)", data : "", status : true/false, error : ""}}
FTP.ftpsDeleteServerFiles('/sda1/ceshi.txt', res => {
console.log(res)
})
},
// FTPS
ftpsDeleteServerFilesWithoutDirectory() {
//
FTP.ftpsDeleteServerFilesWithoutDirectory("/sda1", res => {
console.log(res)
})
},
// FTPS
closeFTPSConnect() {
console.log('点到了!!!!');
FTP.closeFTPSConnect(res => {
console.log('点到了进来了!!!!');
console.log(res)
})
}
}
}
</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>

1
static/ceshi.txt

@ -0,0 +1 @@
1

BIN
static/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

10
uni.promisify.adaptor.js

@ -0,0 +1,10 @@
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) => res[0] ? reject(res[0]) : resolve(res[1]));
});
},
});

76
uni.scss

@ -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;

BIN
unpackage/.DS_Store

Binary file not shown.

1
unpackage/cache/wgt/__UNI__030605A/__uniappchooselocation.js

File diff suppressed because one or more lines are too long

BIN
unpackage/cache/wgt/__UNI__030605A/__uniapperror.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

1
unpackage/cache/wgt/__UNI__030605A/__uniappes6.js

File diff suppressed because one or more lines are too long

1
unpackage/cache/wgt/__UNI__030605A/__uniappopenlocation.js

File diff suppressed because one or more lines are too long

1
unpackage/cache/wgt/__UNI__030605A/__uniapppicker.js

File diff suppressed because one or more lines are too long

8
unpackage/cache/wgt/__UNI__030605A/__uniappquill.js

File diff suppressed because one or more lines are too long

1
unpackage/cache/wgt/__UNI__030605A/__uniappquillimageresize.js

File diff suppressed because one or more lines are too long

1
unpackage/cache/wgt/__UNI__030605A/__uniappscan.js

File diff suppressed because one or more lines are too long

BIN
unpackage/cache/wgt/__UNI__030605A/__uniappsuccess.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

25
unpackage/cache/wgt/__UNI__030605A/__uniappview.html

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<script>
var __UniViewStartTime__ = Date.now();
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>View</title>
<link rel="stylesheet" href="view.css" />
</head>
<body>
<div id="app"></div>
<script src="__uniappes6.js"></script>
<script src="view.umd.min.js"></script>
<script src="app-view.js"></script>
</body>
</html>

8
unpackage/cache/wgt/__UNI__030605A/app-config-service.js

@ -0,0 +1,8 @@
var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[];
var __uniConfig = {"pages":["pages/webPage/index"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8"},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"HUIMU眼科检查信息系统","compilerVersion":"3.8.12","entryPagePath":"pages/webPage/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/webPage/index","meta":{"isQuit":true},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}}];
__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:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});

1
unpackage/cache/wgt/__UNI__030605A/app-config.js

@ -0,0 +1 @@
(function(e){function r(r){for(var n,l,i=r[0],p=r[1],a=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);f&&f(r);while(s.length)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var p=t[i];0!==o[p]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={"app-config":0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this["webpackJsonp"]=this["webpackJsonp"]||[],p=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var f=p;t()})([]);

1
unpackage/cache/wgt/__UNI__030605A/app-service.js

File diff suppressed because one or more lines are too long

1
unpackage/cache/wgt/__UNI__030605A/app-view.js

File diff suppressed because one or more lines are too long

1
unpackage/cache/wgt/__UNI__030605A/manifest.json

@ -0,0 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__030605A","name":"HUIMU眼科检查信息系统","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"bluetooth":{},"Bluetooth":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"google":{"permissions":["<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.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>","<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>","<uses-permission android:name=\"android.permission.BLUETOOTH\"/>","<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.BLUETOOTH_SCAN\"/>","<uses-permission android:name=\"android.permission.BLUETOOTH_CONNECT\"/>","<uses-permission android:name=\"android.permission.ACCESS_BACKGROUND_LOCATION\"/>","<uses-permission android:name=\"android.permission.USB_PERMISSION\"/>","<uses-permission android:name=\"android.permission.MANAGE_USB\"/>"],"packagename":"uni.UNI030605A","aliasname":"","password":"","keystore":"html5plus://test","custompermissions":true},"apple":{"dSYMs":false,"plistcmds":["Add :UIFileSharingEnabled bool true"],"devices":"universal"},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}},"debug":true,"syncDebug":true,"orientation":"portrait-primary"},"nativePlugins":{"zhimiFTP":{},"Zhimi-UsbSerial":{},"ZS-Bugly":{}},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"3.8.12","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html","adid":"127892240008"}}

BIN
unpackage/cache/wgt/__UNI__030605A/nativeplugins/ZS-Bugly/android/bugly-release.aar

Binary file not shown.

BIN
unpackage/cache/wgt/__UNI__030605A/nativeplugins/ZS-Bugly/android/crashreport-4.1.9.3.aar

Binary file not shown.

18
unpackage/cache/wgt/__UNI__030605A/nativeplugins/ZS-Bugly/package.json

@ -0,0 +1,18 @@
{
"name": "ZS-Bugly",
"id": "ZS-Bugly",
"version": "1.3.0",
"description": "捕获系统错误",
"_dp_type": "nativeplugin",
"_dp_nativeplugin": {
"android": {
"plugins": [{
"type": "module",
"name": "ZS-Bugly",
"class": "com.example.bugly.buglyModule"
}],
"integrateType": "aar",
"minSdkVersion": 16
}
}
}

BIN
unpackage/cache/wgt/__UNI__030605A/nativeplugins/Zhimi-UsbSerial/.DS_Store

Binary file not shown.

BIN
unpackage/cache/wgt/__UNI__030605A/nativeplugins/Zhimi-UsbSerial/android/usbserial-android-release.aar

Binary file not shown.

24
unpackage/cache/wgt/__UNI__030605A/nativeplugins/Zhimi-UsbSerial/package.json

@ -0,0 +1,24 @@
{
"name": "Usb通讯插件",
"id": "Zhimi-UsbSerial",
"version": "1.0",
"description": "Usb通讯插件",
"_dp_type":"nativeplugin",
"_dp_nativeplugin":{
"android": {
"plugins": [
{
"type": "module",
"name": "Zhimi-UsbSerial",
"class": "com.zhimi.usbserial.UsbSerialModule"
}
],
"hooksClass": "com.zhimi.usbserial.UsbSerialAppProxy",
"integrateType": "aar",
"dependencies": [
"com.github.mik3y:usb-serial-for-android:3.4.3"
],
"minSdkVersion": "21"
}
}
}

BIN
unpackage/cache/wgt/__UNI__030605A/nativeplugins/zhimiFTP/.DS_Store

Binary file not shown.

BIN
unpackage/cache/wgt/__UNI__030605A/nativeplugins/zhimiFTP/android/.DS_Store

Binary file not shown.

BIN
unpackage/cache/wgt/__UNI__030605A/nativeplugins/zhimiFTP/android/zhimiFTP-release.aar

Binary file not shown.

23
unpackage/cache/wgt/__UNI__030605A/nativeplugins/zhimiFTP/package.json

@ -0,0 +1,23 @@
{
"name": "zhimiFTP",
"id": "zhimiFTP",
"version": "1.0.0",
"description": "FTP插件",
"_dp_type": "nativeplugin",
"_dp_nativeplugin": {
"android": {
"plugins": [
{
"type": "module",
"name": "Zhimi-FTP-Module",
"class": "com.example.zhimiftp.zhimiFTPModule"
}
],
"integrateType": "aar",
"minSdkVersion": "21",
"dependencies": [
"commons-net:commons-net:3.8.0"
]
}
}
}

1
unpackage/cache/wgt/__UNI__030605A/static/ceshi.txt

@ -0,0 +1 @@
1

BIN
unpackage/cache/wgt/__UNI__030605A/static/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

1
unpackage/cache/wgt/__UNI__030605A/view.css

File diff suppressed because one or more lines are too long

6
unpackage/cache/wgt/__UNI__030605A/view.umd.min.js

File diff suppressed because one or more lines are too long

BIN
unpackage/debug/android_debug.apk

Binary file not shown.

0
unpackage/dist/build/.automator/app-plus/.automator.json

1
unpackage/dist/build/app-plus/__uniappchooselocation.js

File diff suppressed because one or more lines are too long

BIN
unpackage/dist/build/app-plus/__uniapperror.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

1
unpackage/dist/build/app-plus/__uniappes6.js

File diff suppressed because one or more lines are too long

1
unpackage/dist/build/app-plus/__uniappopenlocation.js

File diff suppressed because one or more lines are too long

1
unpackage/dist/build/app-plus/__uniapppicker.js

File diff suppressed because one or more lines are too long

8
unpackage/dist/build/app-plus/__uniappquill.js

File diff suppressed because one or more lines are too long

1
unpackage/dist/build/app-plus/__uniappquillimageresize.js

File diff suppressed because one or more lines are too long

1
unpackage/dist/build/app-plus/__uniappscan.js

File diff suppressed because one or more lines are too long

BIN
unpackage/dist/build/app-plus/__uniappsuccess.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

25
unpackage/dist/build/app-plus/__uniappview.html

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<script>
var __UniViewStartTime__ = Date.now();
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>View</title>
<link rel="stylesheet" href="view.css" />
</head>
<body>
<div id="app"></div>
<script src="__uniappes6.js"></script>
<script src="view.umd.min.js"></script>
<script src="app-view.js"></script>
</body>
</html>

8
unpackage/dist/build/app-plus/app-config-service.js

@ -0,0 +1,8 @@
var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[];
var __uniConfig = {"pages":["pages/webPage/index"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8"},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"HUIMU眼科检查信息系统","compilerVersion":"3.8.12","entryPagePath":"pages/webPage/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/webPage/index","meta":{"isQuit":true},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}}];
__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:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});

1
unpackage/dist/build/app-plus/app-config.js

@ -0,0 +1 @@
(function(e){function r(r){for(var n,l,i=r[0],p=r[1],a=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);f&&f(r);while(s.length)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var p=t[i];0!==o[p]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={"app-config":0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this["webpackJsonp"]=this["webpackJsonp"]||[],p=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var f=p;t()})([]);

1
unpackage/dist/build/app-plus/app-service.js

File diff suppressed because one or more lines are too long

1
unpackage/dist/build/app-plus/app-view.js

File diff suppressed because one or more lines are too long

1
unpackage/dist/build/app-plus/manifest.json

@ -0,0 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__030605A","name":"HUIMU眼科检查信息系统","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"bluetooth":{},"Bluetooth":{},"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"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"google":{"permissions":["<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.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>","<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>","<uses-permission android:name=\"android.permission.BLUETOOTH\"/>","<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.BLUETOOTH_SCAN\"/>","<uses-permission android:name=\"android.permission.BLUETOOTH_CONNECT\"/>","<uses-permission android:name=\"android.permission.ACCESS_BACKGROUND_LOCATION\"/>","<uses-permission android:name=\"android.permission.USB_PERMISSION\"/>","<uses-permission android:name=\"android.permission.MANAGE_USB\"/>"]},"apple":{"dSYMs":false},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"nativePlugins":{"zhimiFTP":{"__plugin_info__":{"name":"zhimiFTP","description":"FTP插件","platforms":"Android","url":"","android_package_name":"","ios_bundle_id":"","isCloud":false,"bought":-1,"pid":"","parameters":{}}},"Zhimi-UsbSerial":{"__plugin_info__":{"name":"Usb通讯插件","description":"Usb通讯插件","platforms":"Android","url":"","android_package_name":"","ios_bundle_id":"","isCloud":false,"bought":-1,"pid":"","parameters":{}}},"ZS-Bugly":{"__plugin_info__":{"name":"ZS-Bugly","description":"捕获系统错误","platforms":"Android","url":"","android_package_name":"","ios_bundle_id":"","isCloud":false,"bought":-1,"pid":"","parameters":{}}}},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"3.8.12","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html"}}

1
unpackage/dist/build/app-plus/static/ceshi.txt

@ -0,0 +1 @@
1

BIN
unpackage/dist/build/app-plus/static/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

1
unpackage/dist/build/app-plus/view.css

File diff suppressed because one or more lines are too long

6
unpackage/dist/build/app-plus/view.umd.min.js

File diff suppressed because one or more lines are too long

0
unpackage/dist/dev/.automator/app-plus/.automator.json

0
unpackage/dist/dev/.automator/mp-weixin/.automator.json

1
unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map

File diff suppressed because one or more lines are too long

1
unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map

File diff suppressed because one or more lines are too long

1
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map

File diff suppressed because one or more lines are too long

1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/webPage/index.js.map

File diff suppressed because one or more lines are too long

1
unpackage/dist/dev/app-plus/__uniappchooselocation.js

File diff suppressed because one or more lines are too long

BIN
unpackage/dist/dev/app-plus/__uniapperror.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

1
unpackage/dist/dev/app-plus/__uniappes6.js

File diff suppressed because one or more lines are too long

1
unpackage/dist/dev/app-plus/__uniappopenlocation.js

File diff suppressed because one or more lines are too long

1
unpackage/dist/dev/app-plus/__uniapppicker.js

File diff suppressed because one or more lines are too long

8
unpackage/dist/dev/app-plus/__uniappquill.js

File diff suppressed because one or more lines are too long

1
unpackage/dist/dev/app-plus/__uniappquillimageresize.js

File diff suppressed because one or more lines are too long

1
unpackage/dist/dev/app-plus/__uniappscan.js

File diff suppressed because one or more lines are too long

BIN
unpackage/dist/dev/app-plus/__uniappsuccess.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

25
unpackage/dist/dev/app-plus/__uniappview.html

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<script>
var __UniViewStartTime__ = Date.now();
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>View</title>
<link rel="stylesheet" href="view.css" />
</head>
<body>
<div id="app"></div>
<script src="__uniappes6.js"></script>
<script src="view.umd.min.js"></script>
<script src="app-view.js"></script>
</body>
</html>

8
unpackage/dist/dev/app-plus/app-config-service.js

@ -0,0 +1,8 @@
var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[];
var __uniConfig = {"pages":["pages/webPage/index"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8"},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"HUIMU眼科检查信息系统","compilerVersion":"3.8.12","entryPagePath":"pages/webPage/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/webPage/index","meta":{"isQuit":true},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}}];
__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:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save