Browse Source

修改扫描

wms3.0_pda
李俊城 1 year ago
parent
commit
14ad489c32
  1. 4
      .hbuilderx/debug.config.json
  2. 14
      .hbuilderx/launch.json
  3. 10
      src/main.js
  4. 9
      src/manifest.json
  5. 38
      src/mycomponents/scan/winComScan.vue
  6. 7
      src/pages.json
  7. 1
      src/pages/index/index.vue
  8. 1
      src/pages/login/index.vue

4
.hbuilderx/debug.config.json

@ -0,0 +1,4 @@
{
"rootPathIndex": 1,
"webRoot": "${projectDir}"
}

14
.hbuilderx/launch.json

@ -1,16 +1,20 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ {
// launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote // launchtypelocalremote, localremote
"version" : "0.0", "version" : "0.0",
"configurations": [{ "configurations" : [
"app-plus" :
{ {
"app-plus" : {
"launchtype" : "local" "launchtype" : "local"
}, },
"default" : "default" : {
{
"launchtype" : "local" "launchtype" : "local"
}, },
"type" : "uniCloud" "type" : "uniCloud"
},
{
"openVueDevtools" : true,
"type" : "uni-app:h5"
} }
] ]
} }

10
src/main.js

@ -34,7 +34,7 @@ export function createApp() {
app.use(uView) app.use(uView)
app.component('comMessage', comMessage) app.component('comMessage', comMessage)
console.log("网络22请求") console.log("网络22请求")
startApp(app); // startApp(app);
return { return {
app, app,
}; };
@ -57,10 +57,10 @@ export function startApp(app) {
// getApp().globalData.feed_configList = res.data.feed_configList; // getApp().globalData.feed_configList = res.data.feed_configList;
// getApp().globalData.isDevelopment = res.data.baseInfo.isDevelopment.value // getApp().globalData.isDevelopment = res.data.baseInfo.isDevelopment.value
// Vue.prototype.$dev_url = res.data.baseInfo.dev.value; // Vue.prototype.$dev_url = res.data.baseInfo.dev.value;
console.log("网络",res.data.baseInfo.request_url.value) // console.log("网络",res.data.baseInfo.request_url.value)
console.log("开发环境12",res.data.baseInfo.isDevelopment.value) // console.log("开发环境12",res.data.baseInfo.isDevelopment.value)
uni.setStorageSync("request_url",res.data.baseInfo.request_url.value) // uni.setStorageSync("request_url",res.data.baseInfo.request_url.value)
uni.setStorageSync("isDevelopment",res.data.baseInfo.isDevelopment.value) // uni.setStorageSync("isDevelopment",res.data.baseInfo.isDevelopment.value)
} }
}, },
fail: (error) => { fail: (error) => {

9
src/manifest.json

@ -20,7 +20,11 @@
"delay" : 0 "delay" : 0
}, },
/* */ /* */
"modules" : {}, "modules" : {
"Bluetooth" : {},
"Barcode" : {},
"Camera" : {}
},
/* */ /* */
"distribute" : { "distribute" : {
/* android */ /* android */
@ -42,7 +46,8 @@
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
], ],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ] "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"minSdkVersion" : 23
}, },
/* ios */ /* ios */
"ios" : { "ios" : {

38
src/mycomponents/scan/winComScan.vue

@ -63,8 +63,7 @@
export default { export default {
name: "winComScan", name: "winComScan",
emits: ["getResult"], emits: ["getResult"],
components: { components: {},
},
props: { props: {
placeholder: { placeholder: {
type: String, type: String,
@ -101,10 +100,32 @@
} }
}, },
mounted() { mounted() {
//#ifndef APP-PLUS
// #ifdef H5
if (document.querySelector('textarea') != null) { if (document.querySelector('textarea') != null) {
document.querySelector('textarea').setAttribute('inputmode', 'none') document.querySelector('textarea').setAttribute('inputmode', 'none')
} }
// #endif
// #ifdef APP-PLUS
//
// uni.onKeyboardHeightChange(res => {
// console.log(res.height)
// if(res.height>0){
// // uni.hideKeyboard();
// plus.key.hideSoftKeybord();
// }
// })
//
// uni.onWindowResize((res) => {
// plus.key.hideSoftKeybord()
// })
// plus.key.hideSoftKeybord();
// setInterval(function(){
// plus.key.hideSoftKeybord();
// // uni.hideKeyboard();//
// // plus.key.hideSoftKeybord();
// },60);
// #endif // #endif
// if (this.$el.querySelector('textarea') != null) { // if (this.$el.querySelector('textarea') != null) {
@ -120,6 +141,17 @@
this.placeholderValue = '请扫描' + this.placeholder; this.placeholderValue = '请扫描' + this.placeholder;
}, },
methods: { methods: {
hide() {
//
var interval = setInterval(function() {
uni.hideKeyboard(); //
console.log('刷新')
}, 60);
setTimeout(() => {
clearInterval(interval);
console.log('停止刷新')
}, 2000);
},
getValue() { getValue() {
return this.scanMsg return this.scanMsg
}, },

7
src/pages.json

@ -333,6 +333,13 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{
"path": "pages/inspect/job/inspectFullDetail",
"style": {
"navigationBarTitleText": "全检检验详情",
"enablePullDownRefresh": true
}
},
{ {
"path": "pages/putaway/job/putawayJob", "path": "pages/putaway/job/putawayJob",
"style": { "style": {

1
src/pages/index/index.vue

@ -124,6 +124,7 @@
this.getMenuItemTop() this.getMenuItemTop()
} }
}, },
onHide() { onHide() {
this.stopRefresh(); this.stopRefresh();

1
src/pages/login/index.vue

@ -146,7 +146,6 @@
}, },
onLoad() { onLoad() {
getCaptchaImage().then(res => { getCaptchaImage().then(res => {
if (res) { if (res) {
var code = res.data.img; var code = res.data.img;

Loading…
Cancel
Save