From 93300872e24fb4078bce34dc67d8ef8043a395a1 Mon Sep 17 00:00:00 2001
From: "3321822538@qq.com" <3321822538@qq.com>
Date: Thu, 16 Jan 2025 18:03:08 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=85=B3=20=E8=93=9D=E7=89=99?=
=?UTF-8?q?=E5=85=A8=E9=9D=A2=E4=BC=98=E5=8C=96=20=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E5=BC=B9=E7=AA=97=E5=85=AC=E5=91=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/http.interceptor.js | 4 +-
page_components/blufi/xBlufi-wx-impl.js | 2 +-
page_components/eletj.vue | 361 +--
page_components/fuwu/index.vue | 230 +-
.../statulist/myshop/shopdetail/index.vue | 7 +-
page_user/sbdetail.vue | 271 +--
pages.json | 9 +
pages/login/login.vue | 4 +-
pages/shebeione.vue | 1987 +++++++++++++++++
pages/shouye/index.vue | 114 +-
pages/shuaxin.vue | 4 +-
pages/sjshiming.vue | 4 +-
pages/tj.vue | 16 +-
13 files changed, 2468 insertions(+), 545 deletions(-)
create mode 100644 pages/shebeione.vue
diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index 02416cc..ad96f00 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.1.4:10002',
- baseUrl: 'https://kg.chuangtewl.com/prod-api',
+ baseUrl: 'http://192.168.1.4:10002',
+ // baseUrl: 'https://kg.chuangtewl.com/prod-api',
// loadingText: '加载中...',
// loadingTime: 1000,
// 设置自定义头部content-type
diff --git a/page_components/blufi/xBlufi-wx-impl.js b/page_components/blufi/xBlufi-wx-impl.js
index 34b49b3..e7cbc0d 100644
--- a/page_components/blufi/xBlufi-wx-impl.js
+++ b/page_components/blufi/xBlufi-wx-impl.js
@@ -1145,7 +1145,7 @@ function init() {
// && devices.devices[0].name != 'SMART_R2XS'
// && devices.devices[0].name != 'SMART_R2XS'
// )
- if (devices.devices[0].name.indexOf("CTKG") != -1 || devices.devices[0].name.indexOf("CTPO") != -1 || devices.devices[0].name.indexOf("gjkg") != -1){
+ if (devices.devices[0].name.indexOf("CTKG") != -1 || devices.devices[0].name.indexOf("CTPO") != -1 || devices.devices[0].name.indexOf("gjkg") != -1 || devices.devices[0].name.indexOf("CCYK") != -1){
// console.log("跳过",devices.devices[0].name)
// isnotexist = false;
isnotexist = true;
diff --git a/page_components/eletj.vue b/page_components/eletj.vue
index 5d42279..c237bc8 100644
--- a/page_components/eletj.vue
+++ b/page_components/eletj.vue
@@ -34,6 +34,20 @@
+
+
+
+ 未连接
+
+
+
+ 连接中
+
+
+
+ 已连接
+
+
-
-
-
{{du}}度
{{formattedTime == '1秒' ? '0' : formattedTime}}
@@ -78,7 +84,6 @@
-
订单剩余
@@ -143,14 +148,6 @@
{{detaobj.suitStartTime == null ? '--' : detaobj.suitStartTime}}
-
店铺名称
@@ -322,21 +319,23 @@
timerone:null,
hasCalledGetczly:false,
timerIds: null ,
- formattedTime:''
+ formattedTime:'',
+ ver_data:null,
+ ver_dataflag:1
}
},
onLoad(option) {
- let id = option.id
- this.id = id
+ this.id = option.id
this.$u.put(`/app/bill/${this.id}/refreshPayResult`).then(res => {
this.getDevice()
})
+ if(this.ver_data == null){
+ this.getlanya()
+ }
if (option.flag) {
this.opflag = option.flag
}
setTimeout(()=>{
- // this.shuaxin()
- // this.gethuidaio()
this.startTimerone()
},1500)
@@ -408,9 +407,21 @@
methods: {
// 点击续单 跳转到重新下单
btnxudan(){
- uni.navigateTo({
- url:'/page_components/fuwu/index?id=' + this.sbobj.deviceNo
- })
+ let that = this
+ uni.showModal({
+ title: '温馨提示',
+ content: '您是否需要前去续单?',
+ showCancel: true,
+ success: function(res) {
+ if (res.confirm) {
+ uni.navigateTo({
+ url:'/page_components/fuwu/index?id=' + that.sbobj.deviceNo
+ })
+ } else if (res.cancel) {
+ console.log('取消'); // 用户点击取消
+ }
+ }
+ })
},
start() {
this.timerIds = setInterval(() => {
@@ -512,6 +523,7 @@
})
},
+
// 开启和关闭
btnkq() {
if (this.onlineStatus == 1) {
@@ -570,39 +582,15 @@
})
} else {
if (this.ver_data == null) {
- this.jieshufalg = true
- uni.showLoading({
- title: '切换中'
- })
- xBlufi.initXBlufi(1)
- xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
- xBlufi.notifyStartDiscoverBle({
- 'isStart': true
- })
- // 停止蓝牙搜索
- setTimeout(() => {
- xBlufi.notifyStartDiscoverBle({
- 'isStart': false
- })
- xBlufi.notifyConnectBle({
- isStart: true,
- deviceId: this.deviceId,
- name: this.name
- })
- xBlufi.notifyInitBleEsp32({
- deviceId: this.deviceId
- })
- let name = ''
- let index = this.name.indexOf('-')
- if (index !== -1) {
- name = this.name.slice(index + 1)
- }
- if (this.sbobj.powerStatus == 0) {
- this.imgflag = false
- } else {
- this.imgflag = true
- }
- }, 1000)
+ let that = this
+ uni.showModal({
+ title: '温馨提示',
+ content: '正在连接蓝牙,请尽量靠近设备',
+ showCancel: false,
+ success: function(res) {
+
+ }
+ })
} else {
// console.log(this.tdtxt,'020202');
if (this.tdtxt == '开启') {
@@ -616,6 +604,9 @@
// console.log('close关闭');
that.tdtxt = '关闭'
that.imgflag = false
+ xBlufi.notifySendCustomData({
+ customData: 'close'
+ })
xBlufi.notifySendCustomData({
customData: '11close'
})
@@ -647,6 +638,9 @@
// console.log('open开启');
that.tdtxt = '开启'
that.imgflag = true
+ xBlufi.notifySendCustomData({
+ customData: 'open'
+ })
xBlufi.notifySendCustomData({
customData: '11open'
})
@@ -670,7 +664,43 @@
}
}
}
+ }
+ },
+
+ getlanya(){
+ this.ver_dataflag = 2
+ xBlufi.initXBlufi(1)
+ xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
+ xBlufi.notifyStartDiscoverBle({
+ 'isStart': true
+ })
+ // 停止蓝牙搜索
+ setTimeout(() => {
+ xBlufi.notifyStartDiscoverBle({
+ 'isStart': false
+ })
+ xBlufi.notifyConnectBle({
+ isStart: true,
+ deviceId: this.deviceId,
+ name: this.name
+ })
+ xBlufi.notifyInitBleEsp32({
+ deviceId: this.deviceId
+ })
+ if (this.sbobj.powerStatus == 0) {
+ this.imgflag = false
+ } else {
+ this.imgflag = true
}
+ }, 2000)
+ setTimeout(()=>{
+ if(this.ver_data == null){
+ this.ver_dataflag = 1
+ setTimeout(()=>{
+ this.getlanya()
+ },3000)
+ }
+ },15000)
},
@@ -699,15 +729,6 @@
}
})
},
-
- // 获取channelId
- getzfqd(){
- // this.$u.get(`/app/channel/recharge/enabledList`).then(res =>{
- // if(res.code == 200){
- // this.channelId = res.data[0].channelId
- // }
- // })
- },
// 点击默认返回首页
btns() {
uni.reLaunch({
@@ -752,29 +773,16 @@
}
})
} else {
- if (this.temperature == null) {
- this.jieshufalg = true
+ if (this.ver_data == null) {
let that = this
- xBlufi.initXBlufi(1);
- xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent);
- xBlufi.notifyStartDiscoverBle({
- 'isStart': true
- })
- setTimeout(() => {
- xBlufi.notifyStartDiscoverBle({
- 'isStart': false
- })
- if (that.devicesList.length > 0) {
- xBlufi.notifyConnectBle({
- isStart: true,
- deviceId: that.deviceId,
- name: that.name
- })
- }
- }, 2000)
- uni.showLoading({
- title: '正在连接蓝牙'
- })
+ uni.showModal({
+ title: '温馨提示',
+ content: '正在连接蓝牙,请尽量靠近设备',
+ showCancel: false,
+ success: function(res) {
+
+ }
+ })
} else {
this.jieshufalg = true
let data = {
@@ -820,124 +828,6 @@
}
}
},
- // 分时段支付订单
- // btnbox() {
- // this.trueboxfalg = false
- // this.jieshuflag = true
- // if (this.onlineStatus == 1) {
- // let data = {
- // billId: this.billId
- // }
- // this.$u.put(`/app/bill/endUse`, data).then(res => {
- // if (res.code == 200) {
- // uni.showToast({
- // title: res.msg,
- // icon: 'success',
- // duration: 1000
- // })
- // setTimeout(() => {
- // this.jieshuflag = false
- // uni.reLaunch({
- // url: '/pages/shouye/index'
- // })
- // }, 1500)
- // } else {
- // this.getDevice()
- // this.jieshuflag = false
- // uni.showToast({
- // title: res.msg,
- // icon: 'none',
- // duration: 2000
- // })
- // }
- // })
- // } else {
- // // console.log(this.temperature,'this.temperature');
- // if (this.temperature == null) {
- // uni.showLoading({
- // title: '切换中'
- // })
- // let that = this
- // xBlufi.initXBlufi(1)
- // xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent);
- // xBlufi.notifyStartDiscoverBle({
- // 'isStart': true
- // })
- // setTimeout(() => {
- // xBlufi.notifyStartDiscoverBle({
- // 'isStart': false
- // })
- // if (that.devicesList.length > 0) {
- // xBlufi.notifyConnectBle({
- // isStart: true,
- // deviceId: that.deviceId,
- // name: that.name
- // })
- // }
- // }, 2000)
- // uni.showModal({
- // title: '温馨提示',
- // content: `检测到该设备未联网,为您切换为蓝牙模式,支付的时候靠近该设备,并打开蓝牙`,
- // showCancel: false,
- // success: function(res) {
-
- // }
- // })
- // } else {
- // let data = {
- // billId: this.billId,
- // totalEle: this.temperature
- // }
- // let that = this
- // this.$u.put(`/app/bill/endUse`, data).then(res => {
- // if (res.code == 200) {
- // uni.getNetworkType({
- // success(res) {
- // if (res.networkType !== 'none') {
- // uni.getConnectedBluetoothDevices({
- // success(res) {
- // setTimeout(() => {
- // xBlufi.notifySendCustomData({
- // customData: "time@" + 0
- // })
- // let datas = {
- // mac:that.qrResult,
- // reason:'用户结束订单操作',
- // command:'11close',
- // result:'成功'
- // }
- // console.log(datas,'111');
- // that.$u.post(`/app/commandLog/bluetooth`,datas).then(res => {})
- // setTimeout(() => {
- // that.jieshuflag = false
- // uni.reLaunch({
- // url: '/pages/shouye/index'
- // })
- // }, 1000)
- // }, 1500)
- // },
- // fail(err) {
- // console.error('获取已连接蓝牙设备信息失败:', err)
- // }
- // })
- // } else {
- // console.log('手机未连接网络')
- // }
- // }
- // })
- // } else {
- // this.jieshuflag = false
- // uni.showToast({
- // title: res.msg,
- // icon: 'none',
- // duration: 2000
- // })
- // }
- // })
- // }
- // }
- // },
-
// 每一分钟请求更新一次
startTimers() {
// 确保没有重复的定时器
@@ -1031,7 +921,6 @@
}
this.onlineStatus = res.data.onlineStatus
this.qrResult = res.data.mac
- // getApp().set_ble_mac(this.qrResult)
this.totalElectriQuantity = res.data.totalElectriQuantity
}
})
@@ -1087,41 +976,6 @@
seconds: seconds
}
},
- opendevice() {
- let stause = 0
- if (this.deviceInfo.powerStatus == 1) {
- stause = 0
- } else {
- stause = 1
- }
- this.$u.put(`/app/device/${this.deviceInfo.deviceId}/changePower?status=` + stause).then((res) => {
- if (res.code == 200) {
- setTimeout(() => {
- this.getDevice()
- }, 2000)
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- }
- })
- },
- opendevices() {
-
- },
- swiperchange(e) {
- this.curtitidx = e.detail.current
- // console.log(e, 'aaaa');
- },
- changeidx(index) {
- this.curtitidx = index
- },
- toydfx() {
- uni.navigateTo({
- url: "/page_components/eletj?id=" + this.id
- })
- },
funListenDeviceMsgEvent: function(options) {
switch (options.type) {
@@ -1166,6 +1020,7 @@
this.temperature = this.ver_data.temperature / 1000
setTimeout(() => {
// this.czflag = false
+ this.ver_dataflag = 3
this.jieshuflag = false
this.jieshufalg = false
uni.hideLoading()
@@ -1182,11 +1037,7 @@
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
if (!options.result) {
this.lanyaflag = true
- uni.showToast({
- title: '蓝牙未开启',
- icon: 'none',
- duration: 3000
- })
+ this.ver_dataflag = 1
return
} else {
this.lanyaflag = false
@@ -1258,6 +1109,20 @@
padding-bottom: 300rpx;
overflow: scroll;
}
+ .wz {
+ font-weight: 400;
+ font-size: 32rpx;
+ margin-top: 30rpx;
+ view{
+ display: flex;
+ align-items: center;
+ image{
+ width: 80rpx;
+ height: 80rpx;
+ margin-right: 10rpx;
+ }
+ }
+ }
.card2 {
padding-top: 40rpx;
diff --git a/page_components/fuwu/index.vue b/page_components/fuwu/index.vue
index 74b9ec4..6e08351 100644
--- a/page_components/fuwu/index.vue
+++ b/page_components/fuwu/index.vue
@@ -5,14 +5,23 @@
{{deviceobj.deviceName == undefined ? '--' : deviceobj.deviceName}}
- 蓝牙未连接
- 蓝牙连接中
- 蓝牙已连接
+
+
+ 未连接
+
+
+
+ 连接中
+
+
+
+ 已连接
+
-
+
联系客服
-
+
联系客服
@@ -298,7 +307,7 @@
xBlufi.notifyStartDiscoverBle({
'isStart': false
})
- },
+ },
methods: {
//选择套餐
btnactive(item) {
@@ -340,13 +349,15 @@
// 点击我已知晓隐藏防骗提示
btnswindleflag(){
this.swindleflag = false
- if(this.ver_data == ''){
- uni.showLoading({
- title: '蓝牙连接中'
- })
- }else{
- this.ver_dataflag = 3
- uni.hideLoading()
+ if(this.onlineStatus == 0){
+ if(this.ver_data == ''){
+ // uni.showLoading({
+ // title: '蓝牙连接中'
+ // })
+ }else{
+ this.ver_dataflag = 3
+ uni.hideLoading()
+ }
}
},
getzfqd(){
@@ -380,44 +391,7 @@
that.onlineStatus = res.data.onlineStatus
that.mac = 'CTKG-' + res.data.mac
if(that.onlineStatus == 0){
- if (this.ver_data == '') {
- this.czflag = true
- this.ver_dataflag = 2
- let that = this
- xBlufi.initXBlufi(1)
- xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent)
- xBlufi.notifyStartDiscoverBle({
- 'isStart': true
- })
- setTimeout(() => {
- xBlufi.notifyStartDiscoverBle({
- 'isStart': false
- })
- if (that.devicesList.length > 0) {
- xBlufi.notifyConnectBle({
- isStart: true,
- deviceId: that.deviceId,
- name: that.name
- })
- }
- }, 2000)
- setTimeout(()=>{
- if(this.ver_data == ''){
- // uni.showToast({
- // title: '未连接成功,如多次失败请点击右上角联系客服咨询',
- // icon: 'none',
- // duration: 5000
- // })
- this.ver_dataflag = 1
- this.czflag = false
- this.zhifuflag = false
- setTimeout(()=>{
- uni.hideLoading()
- },5000)
- }
- },13000)
-
- }
+ that.getlanya()
}
}
})
@@ -436,7 +410,40 @@
this.gettaoc()
},
-
+ getlanya(){
+ if (this.ver_data == '') {
+ this.czflag = true
+ this.ver_dataflag = 2
+ let that = this
+ xBlufi.initXBlufi(1)
+ xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent)
+ xBlufi.notifyStartDiscoverBle({
+ 'isStart': true
+ })
+ setTimeout(() => {
+ xBlufi.notifyStartDiscoverBle({
+ 'isStart': false
+ })
+ if (that.devicesList.length > 0) {
+ xBlufi.notifyConnectBle({
+ isStart: true,
+ deviceId: that.deviceId,
+ name: that.name
+ })
+ }
+ }, 2000)
+ setTimeout(()=>{
+ if(this.ver_data == ''){
+ this.ver_dataflag = 1
+ this.czflag = false
+ this.zhifuflag = false
+ setTimeout(()=>{
+ this.getlanya()
+ },3000)
+ }
+ },15000)
+ }
+ },
btnshouye(){
uni.reLaunch({
@@ -445,23 +452,7 @@
},
btnjxcz() {
this.czflag = false
- xBlufi.initXBlufi(1)
- xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent);
- xBlufi.notifyStartDiscoverBle({
- 'isStart': true
- })
- setTimeout(() => {
- xBlufi.notifyStartDiscoverBle({
- 'isStart': false
- })
- if (this.devicesList.length > 0) {
- xBlufi.notifyConnectBle({
- isStart: true,
- deviceId: this.deviceId,
- name: this.name
- })
- }
- }, 2000)
+ this.getlanya()
},
call() {
@@ -606,27 +597,27 @@
icon: 'none',
duration: 1000
})
- }else if(this.ver_data == ''){
+ }else if(this.ver_data == '' && this.onlineStatus == 0){
let that = this
uni.showModal({
title: '温馨提示',
- content: '您是否要重新连接蓝牙?',
- showCancel: true,
+ content: '蓝牙连接中,请尽量靠近设备!',
+ showCancel: false,
success: function(res) {
- if (res.confirm) {
- that.ver_data = ''
- that.ver_dataflag = 2
- that.getzhifu()
- } else if (res.cancel) {
- console.log('取消')
- }
+ // if (res.confirm) {
+ // that.ver_data = ''
+ // that.ver_dataflag = 2
+ // that.getzhifu()
+ // } else if (res.cancel) {
+ // console.log('取消')
+ // }
}
})
}else if(this.checked == false) {
let that = this
uni.showModal({
title: '温馨提示',
- content: '是否确定勾选用户服务协议?',
+ content: '是否同意《用户服务协议》及《隐私政策》?',
showCancel: true,
success: function(res) {
if (res.confirm) {
@@ -706,7 +697,7 @@
that.$u.put(`/app/bill/${that.payNo}/refreshPayResult`).then(res => {})
// 支付成功逻辑
uni.reLaunch({
- url:'/page_components/eletj?id=' + that.orderno
+ url:'/page_components/eletj?id=' + that.orderno + '&ver_data=' + this.ver_data
})
uni.setStorageSync('time', that.expireTimeStr)
},
@@ -753,7 +744,7 @@
that.$u.put(`/app/bill/${that.orderno}/refreshPayResult`).then(res => {})
// 支付成功逻辑
uni.reLaunch({
- url:'/page_components/eletj?id=' + that.orderno
+ url:'/page_components/eletj?id=' + that.orderno + '&ver_data=' + this.ver_data
})
uni.setStorageSync('time', that.expireTimeStr)
},
@@ -792,52 +783,7 @@
})
} else {
if (this.ver_data == '') {
- this.ver_dataflag = 2
- this.czflag = true
- let that = this
- xBlufi.initXBlufi(1)
- xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent)
- xBlufi.notifyStartDiscoverBle({
- 'isStart': true
- })
- setTimeout(() => {
- xBlufi.notifyStartDiscoverBle({
- 'isStart': false
- })
- if (that.devicesList.length > 0) {
- xBlufi.notifyConnectBle({
- isStart: true,
- deviceId: that.deviceId,
- name: that.name
- })
- }
- }, 2000)
- uni.showModal({
- title: '温馨提示',
- content: '检测到该设备未联网,为您切换为蓝牙模式,支付的时候靠近该设备,并打开蓝牙',
- showCancel: false,
- //是否显示取消按钮
- success: function(res) {
- uni.showLoading({
- title: '蓝牙连接中'
- })
- }
- })
- setTimeout(()=>{
- if(this.ver_data == ''){
- // uni.showToast({
- // title: '未连接成功,如多次失败请点击右上角联系客服咨询',
- // icon: 'none',
- // duration: 5000
- // })
- this.czflag = false
- this.zhifuflag = false
- this.ver_dataflag = 1
- setTimeout(()=>{
- uni.hideLoading()
- },5000)
- }
- },10000)
+
} else {
uni.showLoading({
title: '准备支付中...'
@@ -917,7 +863,7 @@
setTimeout(() => {
that.zhifuflag = false
uni.reLaunch({
- url:'/page_components/eletj?id=' + that.orderno
+ url:'/page_components/eletj?id=' + that.orderno + '&ver_data=' + this.ver_data
})
},1000)
},1500)
@@ -1078,7 +1024,7 @@
}else{
that.zhifuflag = false
uni.reLaunch({
- url:'/page_components/eletj?id=' + that.orderno
+ url:'/page_components/eletj?id=' + that.orderno + '&ver_data=' + this.ver_data
})
}
},1000)
@@ -1246,11 +1192,11 @@
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
if (!options.result) {
this.lanyaflag = true
- uni.showToast({
- title: '蓝牙未开启',
- icon: 'none',
- duration: 3000
- });
+ // uni.showToast({
+ // title: '蓝牙未开启',
+ // icon: 'none',
+ // duration: 3000
+ // });
return
} else {
this.lanyaflag = false
@@ -1459,7 +1405,8 @@
// padding-bottom: 41rpx;
// }
page {
- background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
+ background: linear-gradient(180deg,rgb(136, 131,240) 30%, rgba(255, 255, 255, 0) 100%);
+ // background-color: rgb(136, 131,240);
}
.active {
@@ -1539,7 +1486,7 @@
font-weight: 600;
font-size: 40rpx;
color: #fff;
- margin-bottom: 30rpx;
+ margin-bottom: 45rpx;
margin-top: 110rpx;
height: 126rpx;
@@ -1547,6 +1494,15 @@
font-weight: 400;
font-size: 32rpx;
margin-top: 30rpx;
+ view{
+ display: flex;
+ align-items: center;
+ image{
+ width: 80rpx;
+ height: 80rpx;
+ margin-right: 10rpx;
+ }
+ }
}
}
diff --git a/page_fenbao/statulist/myshop/shopdetail/index.vue b/page_fenbao/statulist/myshop/shopdetail/index.vue
index f09ae38..19381ca 100644
--- a/page_fenbao/statulist/myshop/shopdetail/index.vue
+++ b/page_fenbao/statulist/myshop/shopdetail/index.vue
@@ -51,7 +51,7 @@
-
+
@@ -158,6 +158,11 @@
}
},
methods: {
+ btnitem(id){
+ uni.navigateTo({
+ url:'/pages/shebeione?id=' + id
+ })
+ },
getlist() {
this.$u.get(`/app/device/list?storeId=${this.storeId}&pageNum=${this.pagenum}&pageSize=${this.pagesize}`)
.then((res) => {
diff --git a/page_user/sbdetail.vue b/page_user/sbdetail.vue
index ce96f49..3f10c5f 100644
--- a/page_user/sbdetail.vue
+++ b/page_user/sbdetail.vue
@@ -10,8 +10,9 @@
{{ deviceInfo.deviceName == null ? '' : deviceInfo.deviceName }}
- 蓝牙已连接
- 蓝牙未连接
+ 蓝牙已连接
+ 蓝牙连接中
+ 蓝牙未连接
@@ -55,13 +56,13 @@
实时参数
-
+
点击刷新
-
+
@@ -298,16 +299,12 @@
-
+
+
\ No newline at end of file
diff --git a/pages/shouye/index.vue b/pages/shouye/index.vue
index 33033d8..de23fa5 100644
--- a/pages/shouye/index.vue
+++ b/pages/shouye/index.vue
@@ -4,6 +4,17 @@
+
+
+
+
+
+ {{announcements.noticeTitle == null ? '暂无最新公告!!!' : announcements.noticeTitle}}
+
+
+
+
+
-
+
+
@@ -123,6 +137,19 @@
+
+
+
+ 创想物联公告
+
+
+ 公告标题
+
+
+
+
+
+
@@ -169,11 +196,12 @@
iconflag: false,
xuanzeflag:false,
isStaff:null,
- dlflag:false
- };
+ dlflag:false,
+ announcements: {},
+ gonggaoxq:{}
+ }
},
onLoad(option) {
- console.log(option,'000');
if (option.id) {
let id = option.id
let that = this
@@ -251,6 +279,7 @@
console.error('蓝牙适配器初始化失败,可能是因为没有权限', err);
}
})
+ this.getgonggao()
this.getad()
this.getzf()
this.gethuidaio()
@@ -277,6 +306,19 @@
},
methods: {
+ // 获取最新公告
+ getgonggao(){
+ this.$u.get("/app/notice/new").then(res =>{
+ if(res.code == 200){
+ this.announcements = res.data
+ this.$u.get(`/app/notice/${res.data.noticeId}`).then(resp =>{
+ if(resp.code == 200){
+ this.gonggaoxq = res.data
+ }
+ })
+ }
+ })
+ },
btnyc(){
this.xuanzeflag = false
},
@@ -880,6 +922,51 @@