diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index 3c4faa8..3d35457 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -19,8 +19,8 @@ const install = (Vue, vm) => {
// },
// });
Vue.prototype.$u.http.setConfig({
- baseUrl: 'http://192.168.2.27:10002',
- // baseUrl: 'https://kg.chuangtewl.com/prod-api',
+ // baseUrl: 'http://192.168.2.27:10002',
+ baseUrl: 'https://kg.chuangtewl.com/prod-api',
// loadingText: '加载中...',
// loadingTime: 1000,
// 设置自定义头部content-type
diff --git a/page_components/bindsz.vue b/page_components/bindsz.vue
index 15c5b09..b501ec6 100644
--- a/page_components/bindsz.vue
+++ b/page_components/bindsz.vue
@@ -407,7 +407,7 @@
let devicesarr = options.data
// console.log(devicesarr,'devicesarrdevicesarr');
devicesarr.forEach(device => {
- const mac = device.name.substring(5)
+ const mac = device.name.slice(-12)
if (device.name.slice(5, 17) == this.qrResult) {
this.deviceId = device.deviceId
this.name = device.name
diff --git a/page_components/bindszthr.vue b/page_components/bindszthr.vue
index 543d833..af1ef4e 100644
--- a/page_components/bindszthr.vue
+++ b/page_components/bindszthr.vue
@@ -510,7 +510,7 @@
let devicesarr = options.data
// console.log(devicesarr,'devicesarrdevicesarr');
devicesarr.forEach(device => {
- const mac = device.name.substring(5)
+ const mac = device.name.slice(-12)
if (device.name.slice(5, 17) == this.qrResult) {
this.deviceId = device.deviceId
this.name = device.name
diff --git a/page_components/bindsztwo.vue b/page_components/bindsztwo.vue
index b00a8b8..b176889 100644
--- a/page_components/bindsztwo.vue
+++ b/page_components/bindsztwo.vue
@@ -665,7 +665,7 @@
let devicesarr = options.data
// console.log(devicesarr,'devicesarrdevicesarr')
devicesarr.forEach(device => {
- const mac = device.name.substring(5)
+ const mac = device.name.slice(-12)
if (device.name.slice(5, 17) == this.qrResult) {
this.deviceId = device.deviceId
this.name = device.name
diff --git a/page_components/blufi/xBlufi-wx-impl.js b/page_components/blufi/xBlufi-wx-impl.js
index e7cbc0d..9079193 100644
--- a/page_components/blufi/xBlufi-wx-impl.js
+++ b/page_components/blufi/xBlufi-wx-impl.js
@@ -118,7 +118,7 @@ function string2buffer(str) {
}
af += s;
var n1 = parseInt('110' + af.substring(0, 5), 2);
- var n2 = parseInt('110' + af.substring(5), 2);
+ var n2 = parseInt('110' + af.slice(-12), 2);
if (n1 > 127) n1 -= 256;
if (n2 > 127) n2 -= 256;
bytes.push(n1);
diff --git a/page_components/eletj.vue b/page_components/eletj.vue
index c237bc8..9bbda36 100644
--- a/page_components/eletj.vue
+++ b/page_components/eletj.vue
@@ -201,8 +201,8 @@
续单
- 立即支付
- 结束订单
+
+ 结束订单
@@ -457,7 +457,6 @@
}
// 格式化时间并打印到控制台
this.formattedTime = this.formatTime(this.timeday);
- // console.log(formattedTime, 'idsidsids');
}, 1000); // 每1000毫秒(1秒)执行一次
},
formatTime(timeObj) {
@@ -739,7 +738,16 @@
btnjieshu() {
// this.getprice()
// if (this.detaobj.suitFeeMode == 1) {
- if (this.onlineStatus == 1) {
+ let currentTime = new Date();
+ let endTimeString = this.detaobj.suitEndTime
+ let endTimeParts = endTimeString.split(/[- :]/)
+ let endTime = new Date(endTimeParts[0], endTimeParts[1] - 1, endTimeParts[2], endTimeParts[3], endTimeParts[4], endTimeParts[5]);
+ // 比较当前时间和结束时间
+ if (currentTime > endTime) {
+ uni.reLaunch({
+ url:'/pages/shouye/index'
+ })
+ }else if (this.onlineStatus == 1) {
let that = this
uni.showModal({
title: '提示',
@@ -985,7 +993,7 @@
// console.log(devicesarr, this.mac, '111')
devicesarr.forEach(device => {
const mac = device.name.substring(4)
- if (device.name.slice(5, 17) == this.qrResult) {
+ if (device.name.slice(-12) == this.qrResult) {
this.deviceId = device.deviceId
this.name = device.name
// console.log(device.name,this.mac,'222');
diff --git a/page_components/fuwu/index.vue b/page_components/fuwu/index.vue
index 121ffe5..7fc80e2 100644
--- a/page_components/fuwu/index.vue
+++ b/page_components/fuwu/index.vue
@@ -53,11 +53,15 @@
+
+
+ 第三:如以上还不行请重新进入小程序
+
+
我已知晓
-
选择服务
@@ -153,10 +157,29 @@
-
-
-
+
+
+
+
+ 温馨提示
+
+
+ 是否同意
+
+
+ 《用户服务协议》及《隐私政策》?
+
+
+
+ 取消
+
+
+ 确定
+
+
+
+
@@ -166,6 +189,7 @@
export default {
data() {
return {
+ yinsiflag:false,
flags:false,
jzflag:false,
progress: 0,
@@ -252,6 +276,9 @@
path: '/pages/shouye/index'
}
},
+ mounted() {
+ this.getMyLocation() // 获取并设置自身位置的覆盖物
+ },
onShow() {
// this.getuserinfo()
if(uni.getStorageSync('tcid')){
@@ -273,10 +300,12 @@
this.userId = res.data.userId
wx.openBluetoothAdapter({
success: function (res) {
+ this.lanyaflag = false
console.log('蓝牙适配器初始化成功');
// 你可以在这里继续调用其他蓝牙相关的API
},
fail: function (err) {
+ this.lanyaflag = true
console.error('蓝牙适配器初始化失败,可能是因为没有权限', err);
}
})
@@ -309,6 +338,18 @@
})
},
methods: {
+ // 获取自身位置从而获得附近店铺
+ getMyLocation() {
+ uni.getLocation({
+ type: 'wgs84',
+ success: (res) => {
+ console.log(res,'resresres');
+ },
+ fail: (err) => {
+ console.error('获取位置失败:', err);
+ }
+ })
+ },
//选择套餐
btnactive(item) {
console.log(item);
@@ -451,8 +492,24 @@
})
},
btnjxcz() {
- this.czflag = false
- this.getlanya()
+ wx.openBluetoothAdapter({
+ success: function (res) {
+ this.czflag = false
+ this.lanyaflag = false
+ this.getlanya()
+ console.log('蓝牙适配器初始化成功');
+ // 你可以在这里继续调用其他蓝牙相关的API
+ },
+ fail: function (err) {
+ this.lanyaflag = true
+ uni.showToast({
+ title: '蓝牙权限获取失败',
+ icon: 'none',
+ duration:2000
+ })
+ console.error('蓝牙适配器初始化失败,可能是因为没有权限', err);
+ }
+ })
},
call() {
@@ -614,24 +671,30 @@
}
})
}else if(this.checked == false) {
- let that = this
- uni.showModal({
- title: '温馨提示',
- content: '是否同意《用户服务协议》及《隐私政策》?',
- showCancel: true,
- success: function(res) {
- if (res.confirm) {
- that.checked = true
- that.getzhifu()
- } else if (res.cancel) {
- console.log('取消'); // 用户点击取消
- }
- }
- })
+ this.yinsiflag = true
+ // let that = this
+ // uni.showModal({
+ // title: '温馨提示',
+ // content: '是否同意《用户服务协议》及《隐私政策》?',
+ // showCancel: true,
+ // success: function(res) {
+ // if (res.confirm) {
+
+ // } else if (res.cancel) {
+ // console.log('取消'); // 用户点击取消
+ // }
+ // }
+ // })
} else{
this.getzhifu()
}
},
+ // 确定同意隐私政策
+ btnqd(){
+ this.yinsiflag = false
+ this.checked = true
+ this.getzhifu()
+ },
// 获取手机号
getPhoneNumber(e){
console.log(e)
@@ -1133,7 +1196,7 @@
console.log(devicesarr,this.mac,'111');
devicesarr.forEach(device => {
const mac = device.name.substring(4);
- if (device.name.slice(5, 17) == this.mac.slice(5, 17)) {
+ if (device.name.slice(-12) == this.mac.slice(-12)) {
this.deviceId = device.deviceId
this.name = device.name
// console.log(device.name,this.mac,'222');
@@ -1191,7 +1254,7 @@
break;
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
if (!options.result) {
- this.lanyaflag = true
+ console.log('蓝牙未开启');
// uni.showToast({
// title: '蓝牙未开启',
// icon: 'none',
@@ -1251,6 +1314,59 @@