diff --git a/App.vue b/App.vue index 3b22289..9cd5593 100644 --- a/App.vue +++ b/App.vue @@ -13,10 +13,9 @@ diff --git a/manifest.json b/manifest.json index 72f8c91..f7d735b 100644 --- a/manifest.json +++ b/manifest.json @@ -18,28 +18,35 @@ }, /* 模块配置 */ "modules" : { - "SQLite" : {} + "SQLite" : {}, + "Barcode" : {}, + "Camera" : {}, + "Share" : {} }, /* 应用发布信息 */ "distribute" : { /* android打包配置 */ "android" : { "permissions" : [ - "", - "", - "", - "", - "", + "", "", "", + "", "", + "", + "", + "", + "", + "", "", + "", + "", "", - "", + "", + "", "", - "", - "", - "" + "", + "" ], "minSdkVersion" : 21, "targetSdkVersion" : 32 @@ -50,14 +57,16 @@ }, /* SDK配置 */ "sdkConfigs" : { - "ad" : {} + "ad" : {}, + "share" : {}, + "statics" : {} } }, "nativePlugins" : { - "JY-MLScanSDK" : { + "LY-HWScan" : { "__plugin_info__" : { - "name" : "JY-MLScanSDK模块", - "description" : "JY-MLScanSDK", + "name" : "LYHWScan", + "description" : "uni原生华为扫描插件", "platforms" : "Android", "url" : "", "android_package_name" : "", diff --git a/nativeplugins/JY-MLScanSDK/android/jy-mlscansdk-release.aar b/nativeplugins/JY-MLScanSDK/android/jy-mlscansdk-release.aar deleted file mode 100644 index cb10842..0000000 Binary files a/nativeplugins/JY-MLScanSDK/android/jy-mlscansdk-release.aar and /dev/null differ diff --git a/nativeplugins/JY-MLScanSDK/android/mlkit-scanner-release.aar b/nativeplugins/JY-MLScanSDK/android/mlkit-scanner-release.aar deleted file mode 100644 index e08b633..0000000 Binary files a/nativeplugins/JY-MLScanSDK/android/mlkit-scanner-release.aar and /dev/null differ diff --git a/nativeplugins/JY-MLScanSDK/package.json b/nativeplugins/JY-MLScanSDK/package.json deleted file mode 100644 index d8f6f5a..0000000 --- a/nativeplugins/JY-MLScanSDK/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "JY-MLScanSDK模块", - "id": "JY-MLScanSDK", - "version": "1.0.0", - "description": "JY-MLScanSDK", - "_dp_type": "nativeplugin", - "_dp_nativeplugin": { - "android": { - "plugins": [{ - "type": "module", - "name": "JY-MLScanSDK", - "class": "com.jiyi.jy_mlscansdk.JYMLScanSDKModule" - }], - "integrateType": "aar", - "dependencies": [ - "com.google.mlkit:barcode-scanning:16.2.0", - "androidx.camera:camera-core:1.0.1", - "androidx.camera:camera-camera2:1.0.1", - "androidx.camera:camera-lifecycle:1.0.1", - "androidx.camera:camera-view:1.0.0-alpha25" - ], - "compileOptions": { - "sourceCompatibility": "1.8", - "targetCompatibility": "1.8" - } - } - } -} diff --git a/nativeplugins/LY-HWScan/android/uniplugin_hwscan-release.aar b/nativeplugins/LY-HWScan/android/uniplugin_hwscan-release.aar new file mode 100644 index 0000000..5391e28 Binary files /dev/null and b/nativeplugins/LY-HWScan/android/uniplugin_hwscan-release.aar differ diff --git a/nativeplugins/LY-HWScan/package.json b/nativeplugins/LY-HWScan/package.json new file mode 100644 index 0000000..fd1a43d --- /dev/null +++ b/nativeplugins/LY-HWScan/package.json @@ -0,0 +1,32 @@ +{ + "name": "LYHWScan", + "id": "LY-HWScan", + "version": "1.0.8", + "description": "uni原生华为扫描插件", + "_dp_type": "nativeplugin", + "_dp_nativeplugin": { + "android": { + "plugins": [{ + "type": "module", + "name": "LY-HWScan", + "class": "com.lianyunzhihui.uniplugin_hwscan.HWScanModule" + }, { + "type": "component", + "name": "ly-hwscan", + "class": "com.lianyunzhihui.uniplugin_hwscan.HWScan" + }], + "hooksClass": "", + "integrateType": "aar", + "dependencies": [ + "androidx.localbroadcastmanager:localbroadcastmanager:1.0.0", + "androidx.core:core:1.1.0", + "androidx.fragment:fragment:1.1.0", + "androidx.appcompat:appcompat:1.1.0", + "androidx.recyclerview:recyclerview:1.1.0", + "com.alibaba:fastjson:1.2.83", + "com.huawei.hms:scanplus:2.9.0.300" + ], + "minSdkVersion": "21" + } + } +} diff --git a/pages.json b/pages.json index f3d952e..1d19998 100644 --- a/pages.json +++ b/pages.json @@ -10,6 +10,13 @@ "enablePullDownRefresh": false } }, + { + "path": "pages/webview/webview", + "style": { + "navigationBarTitleText": "Browser", + "enablePullDownRefresh": false + } + }, // { // "path": "pages/create/Create", // "style": { @@ -119,26 +126,26 @@ "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "ScanCode", - "navigationBarBackgroundColor": "#F8F8F8", - "backgroundColor": "#F8F8F8" + "navigationBarBackgroundColor": "#0186ff", + "backgroundColor": "#0186ff" }, "uniIdRouter": {}, //底部跳转tab "tabBar": { - "color": "#7A7E83", - "selectedColor": "#1296DB", + "color": "#e6e6e6", + "selectedColor": "#F8F8F8", "borderStyle": "black", - "backgroundColor": "#F8F8F8", + "backgroundColor": "#0186ff", "list": [{ "pagePath": "pages/scan/Scan", - "iconPath": "static/art-default.png", - "selectedIconPath": "static/art-select.png", + "iconPath": "static/scan-default.png", + "selectedIconPath": "static/scan-select.png", "text": "Scan" }, { "pagePath": "pages/history/History", - "iconPath": "static/art-default.png", - "selectedIconPath": "static/art-select.png", + "iconPath": "static/history-default.png", + "selectedIconPath": "static/history-select.png", "text": "History" }, // { @@ -149,8 +156,8 @@ // }, { "pagePath": "pages/setting/Setting", - "iconPath": "static/art-default.png", - "selectedIconPath": "static/art-select.png", + "iconPath": "static/setting-default.png", + "selectedIconPath": "static/setting-select.png", "text": "Setting" } ] diff --git a/pages/history/History.vue b/pages/history/History.vue index 9bfd646..b9effe5 100644 --- a/pages/history/History.vue +++ b/pages/history/History.vue @@ -100,40 +100,7 @@ "label":"URL" }, ], - historyList: [] - // historyList:[ - // { - // "icon":"grid-item-icon tn-icon-empty-network", - // "text":"15936215478", - // "sort":"0", - // "label":"WIFI" - // }, - // { - // "icon":"grid-item-icon tn-icon-empty-network", - // "text":"15936215478", - // "sort":"1", - // "label":"WIFI" - // }, - // { - // "icon":"grid-item-icon tn-icon-empty-network", - // "text":"15936215478", - // "sort":"2", - // "label":"WIFI" - // }, - // { - // "icon":"grid-item-icon tn-icon-empty-network", - // "text":"15936215478", - // "sort":"3", - // "label":"WIFI" - // }, - // { - // "icon":"grid-item-icon tn-icon-empty-network", - // "text":"15936215478", - // "sort":"4", - // "label":"WIFI" - // } - // ] } }, async onShow() { @@ -151,31 +118,31 @@ //查看指定记录历史信息 getHistory(category,data){ - console.log("123") + //console.log('category',category) + console.log('data', data) let that = this; - if(category === 'Contacts'){ - that.jumpToPage('/pages/scan/Contacts','history',data); + that.jumpToPage('/pages/scan/Contacts','history', data); }else if(category === 'Email'){ - that.jumpToPage('/pages/scan/Email','history',data); + that.jumpToPage('/pages/scan/Email','history', data); }else if(category === 'Tel'){ - that.jumpToPage('/pages/scan/Tel','history',data); + that.jumpToPage('/pages/scan/Tel','history', data); }else if(category === 'Product'){ - that.jumpToPage('/pages/scan/Product','history',data); + that.jumpToPage('/pages/scan/Product','history', data); }else if(category === 'Sms'){ - that.jumpToPage('/pages/scan/Sms','history',data); + that.jumpToPage('/pages/scan/Sms','history', data); }else if(category === 'Text'){ - that.jumpToPage('/pages/scan/Text','history',data); + that.jumpToPage('/pages/scan/Text','history', data); }else if(category === 'Url'){ - that.jumpToPage('/pages/scan/Url','history',data); + that.jumpToPage('/pages/scan/Url','history', data); }else if(category === 'Wifi'){ - that.jumpToPage('/pages/scan/Wifi','history',data); + that.jumpToPage('/pages/scan/Wifi','history', data); }else if(category === 'Location'){ - that.jumpToPage('/pages/scan/Location','history',data); + that.jumpToPage('/pages/scan/Location','history', data); }else if(category === 'Calendar'){ - that.jumpToPage('/pages/scan/Calendar','history',data); + that.jumpToPage('/pages/scan/Calendar','history', data); }else if(category === 'Book'){ - that.jumpToPage('/pages/scan/Book','history',data); + that.jumpToPage('/pages/scan/Book','history', data); } }, @@ -190,10 +157,6 @@ async openSqlite(){ try{ let b = await openSqlite() - // uni.showToast({ - // title:"open db success", - // icon:"none" - // }) console.log('db打开了'); }catch(e){ console.error("open db error",e) @@ -213,29 +176,38 @@ // 获取数据 async getData(){ + let that = this; try{ let where = {} - let res = await getPageList(this.tableName,this.options,where,"id desc") - console.log("加载数据",res) - this.historyList = res.data.data.records - this.pages = res.data.data.pages - this.total = res.data.data.total + let res = await getPageList(that.tableName,that.options,where,"id desc") + //console.log("加载数据",res) + // for (let data of res.data.data.records) { + // //console.log('data',data) + // let content = JSON.parse(data.content) + // //console.log('content',content) + // data.content = content; + // } + that.historyList = res.data.data.records + console.log('historyList',that.historyList) + that.pages = res.data.data.pages + that.total = res.data.data.total }catch(e){ - // uni.showToast({ - // title:"报错,请查看控制台", - // icon:"none" - // }); + uni.showToast({ + title:"get History Data error", + icon:"none" + }); console.error("error",e) } }, // 修改数据 async changeData(){ + let that = this; // fid 是自增id try{ - let res = await getPageList(this.tableName,{current:1,size:1},{},"fid desc") + let res = await getPageList(that.tableName,{current:1,size:1},{},"fid desc") console.log("最后一页数据",res.data.data) - await updateSql(this.tableName,{title:"updated data"},{fid:res.data.data.records[0].fid}) + await updateSql(that.tableName,{title:"updated data"},{fid:res.data.data.records[0].fid}) uni.showToast({ title:"update ok", icon:"none" @@ -259,7 +231,9 @@ align-items: center; justify-content: center; background-color: #000000; - height:100%; + // height:1400rpx; + height: 100vh; + overflow: scroll; .headLine{ color: royalblue; diff --git a/pages/scan/Barcode.vue b/pages/scan/Barcode.vue index aa8a2e8..5212b62 100644 --- a/pages/scan/Barcode.vue +++ b/pages/scan/Barcode.vue @@ -1,17 +1,27 @@