tianyi 4 weeks ago
parent
commit
8ee57e7572
  1. 21
      App.vue

21
App.vue

@ -46,8 +46,8 @@
// mainurl: 'https://taketest.sdwanyue.com/api/?s=', // mainurl: 'https://taketest.sdwanyue.com/api/?s=',
// mainurl: 'https://take.sdwanyue.com/api/?s=', // mainurl: 'https://take.sdwanyue.com/api/?s=',
// mainurl: 'https://dev.xenjoyou.com/hiver', // mainurl: 'https://dev.xenjoyou.com/hiver',
mainurl: 'https://hbkuaishi.com/hiver', // mainurl: 'https://hbkuaishi.com/hiver',
// mainurl: 'http://192.168.1.192:8888/hiver', mainurl: 'http://192.168.100.32:8888/hiver',
// #endif // #endif
// weburl: 'https://taketest.sdwanyue.com/', // weburl: 'https://taketest.sdwanyue.com/',
weburl: 'https://takeout.sdwanyue.com/', weburl: 'https://takeout.sdwanyue.com/',
@ -80,7 +80,6 @@
return context.$t(str) return context.$t(str)
} }
this.getAreaSize() this.getAreaSize()
console.log('jpushModule', jpushModule)
// this.getRegistrationID() // this.getRegistrationID()
// #ifdef APP-PLUS // #ifdef APP-PLUS
jpushModule.initJPushService(); jpushModule.initJPushService();
@ -95,7 +94,6 @@
// //
this.getNotificationEnabled(); this.getNotificationEnabled();
jpushModule.addConnectEventListener(result => { jpushModule.addConnectEventListener(result => {
console.log('----------------------------', result)
let connectEnable = result.connectEnable let connectEnable = result.connectEnable
if (connectEnable == true) { if (connectEnable == true) {
@ -103,7 +101,6 @@
} else { } else {
} }
console.log('监听到了连接状态变化 --- ')
}); });
jpushModule.addNotificationListener(result => { // jpushModule.addNotificationListener(result => { //
jpushModule.setBadge(0); jpushModule.setBadge(0);
@ -123,7 +120,6 @@
} }
// //
this.globalData.printData.push(JSON.parse(result.android.inAppExtras)) this.globalData.printData.push(JSON.parse(result.android.inAppExtras))
console.log("通知入队,当前队列长度:", this.globalData.printData.length)
// //
if (!this.globalData.isPrinting) { if (!this.globalData.isPrinting) {
this.processPrintQueue() this.processPrintQueue()
@ -136,7 +132,6 @@
const { const {
code code
} = res } = res
console.log(res, '安卓连接状态');
}) })
//#endif //#endif
@ -196,17 +191,14 @@
// 退 // 退
if (this.globalData.printData.length === 0) { if (this.globalData.printData.length === 0) {
this.globalData.isPrinting = false this.globalData.isPrinting = false
console.log("打印队列已全部处理完毕")
return return
} }
// //
this.globalData.isPrinting = true this.globalData.isPrinting = true
console.log("开始打印队头数据,剩余队列长度:", this.globalData.printData.length)
// onDone // onDone
printer.getData(() => { printer.getData(() => {
// //
this.globalData.printData.shift() this.globalData.printData.shift()
console.log("本条打印完成,队列剩余:", this.globalData.printData.length)
// //
this.processPrintQueue() this.processPrintQueue()
}) })
@ -235,7 +227,6 @@
}, },
getAreaSize() { getAreaSize() {
var res = uni.getSystemInfoSync() var res = uni.getSystemInfoSync()
// console.log(res)
this.globalData.safeAreaInsets = res.safeAreaInsets this.globalData.safeAreaInsets = res.safeAreaInsets
this.globalData.windowHeight = res.windowHeight this.globalData.windowHeight = res.windowHeight
this.globalData.screenHeight = res.screenHeight this.globalData.screenHeight = res.screenHeight
@ -247,7 +238,6 @@
this.globalData.pageHeight = this.globalData.windowHeight + 44 + this.globalData.top this.globalData.pageHeight = this.globalData.windowHeight + 44 + this.globalData.top
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
var weixin = uni.getMenuButtonBoundingClientRect(); var weixin = uni.getMenuButtonBoundingClientRect();
// console.log(weixin)
this.globalData.top = weixin.top this.globalData.top = weixin.top
this.globalData.menuButtonWidth = weixin.width this.globalData.menuButtonWidth = weixin.width
this.globalData.menuButtonLeft = weixin.left this.globalData.menuButtonLeft = weixin.left
@ -280,7 +270,6 @@
jpushModule.getRegistrationID(result => { jpushModule.getRegistrationID(result => {
let registerID = result.registerID let registerID = result.registerID
this.globalData.registrationID = registerID this.globalData.registrationID = registerID
console.log("看这里", result)
uni.setStorageSync("registerID", registerID) uni.setStorageSync("registerID", registerID)
// uni.setStorageSync("signPerson", result.signPerson) // uni.setStorageSync("signPerson", result.signPerson)
}) })
@ -354,12 +343,6 @@
} }
}, },
}, },
onShow: function() {
},
onHide: function() {
// console.log('App Hide')
}
} }
</script> </script>

Loading…
Cancel
Save