11
This commit is contained in:
parent
0e15ecbf7b
commit
f26efacc59
|
|
@ -1145,7 +1145,7 @@ function init() {
|
||||||
// && devices.devices[0].name != 'SMART_R2XS'
|
// && devices.devices[0].name != 'SMART_R2XS'
|
||||||
// && 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){
|
if (devices.devices[0].name.indexOf("CTKG") != -1 || devices.devices[0].name.indexOf("CTPO") != -1 || devices.devices[0].name.indexOf("CCYK") != -1){
|
||||||
// console.log("跳过",devices.devices[0].name)
|
// console.log("跳过",devices.devices[0].name)
|
||||||
// isnotexist = false;
|
// isnotexist = false;
|
||||||
isnotexist = true;
|
isnotexist = true;
|
||||||
|
|
|
||||||
|
|
@ -276,7 +276,8 @@
|
||||||
totalElectriQuantity: '',
|
totalElectriQuantity: '',
|
||||||
suitStartEle: '',
|
suitStartEle: '',
|
||||||
sbobj: {},
|
sbobj: {},
|
||||||
jieshufalg:false
|
jieshufalg:false,
|
||||||
|
channelId:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
|
@ -360,6 +361,13 @@
|
||||||
this.stopTimer();
|
this.stopTimer();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getzfqd(){
|
||||||
|
this.$u.get(`/app/channel/recharge/enabledList`).then(res =>{
|
||||||
|
if(res.code == 200){
|
||||||
|
this.channelId = res.data[0].channelId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
btns() {
|
btns() {
|
||||||
// if(this.opflag){
|
// if(this.opflag){
|
||||||
// uni.navigateBack()
|
// uni.navigateBack()
|
||||||
|
|
@ -370,9 +378,10 @@
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
btnljzf() {
|
btnljzf() {
|
||||||
|
this.getzfqd()
|
||||||
let data = {
|
let data = {
|
||||||
billNo: this.orderno,
|
billNo: this.orderno,
|
||||||
channelId: 5
|
channelId: this.channelId
|
||||||
}
|
}
|
||||||
this.$u.put(`/app/bill/pay`, data).then((res) => {
|
this.$u.put(`/app/bill/pay`, data).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|
@ -420,6 +429,7 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
btnjieshu() {
|
btnjieshu() {
|
||||||
|
this.getzfqd()
|
||||||
if (this.detaobj.suitFeeMode == 1) {
|
if (this.detaobj.suitFeeMode == 1) {
|
||||||
if (this.onlineStatus == 1) {
|
if (this.onlineStatus == 1) {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
@ -495,6 +505,9 @@
|
||||||
xBlufi.notifySendCustomData({
|
xBlufi.notifySendCustomData({
|
||||||
customData: 'close'
|
customData: 'close'
|
||||||
})
|
})
|
||||||
|
xBlufi.notifySendCustomData({
|
||||||
|
customData: '11close'
|
||||||
|
})
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
|
|
@ -568,7 +581,7 @@
|
||||||
if (this.detaobj.status == 1) {
|
if (this.detaobj.status == 1) {
|
||||||
let data = {
|
let data = {
|
||||||
billNo: this.orderno,
|
billNo: this.orderno,
|
||||||
channelId: 5
|
channelId: this.channelId
|
||||||
}
|
}
|
||||||
this.$u.put(`/app/bill/pay`, data).then((res) => {
|
this.$u.put(`/app/bill/pay`, data).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|
@ -623,7 +636,7 @@
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
let data = {
|
let data = {
|
||||||
billNo: this.orderno,
|
billNo: this.orderno,
|
||||||
channelId: 5
|
channelId: this.channelId
|
||||||
}
|
}
|
||||||
this.$u.put(`/app/bill/pay`, data).then((res) => {
|
this.$u.put(`/app/bill/pay`, data).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|
@ -723,7 +736,10 @@
|
||||||
success(res) {
|
success(res) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
xBlufi.notifySendCustomData({
|
xBlufi.notifySendCustomData({
|
||||||
customData: 'close'
|
customData: 'close',
|
||||||
|
})
|
||||||
|
xBlufi.notifySendCustomData({
|
||||||
|
customData: '11close',
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.jieshuflag = false
|
this.jieshuflag = false
|
||||||
|
|
@ -767,12 +783,15 @@
|
||||||
success(res) {
|
success(res) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
xBlufi.notifySendCustomData({
|
xBlufi.notifySendCustomData({
|
||||||
customData: 'close'
|
customData: 'close',
|
||||||
|
})
|
||||||
|
xBlufi.notifySendCustomData({
|
||||||
|
customData: '11close',
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
let data = {
|
let data = {
|
||||||
billNo: that.orderno,
|
billNo: that.orderno,
|
||||||
channelId: 5
|
channelId: that.channelId
|
||||||
}
|
}
|
||||||
that.$u.put(`/app/bill/pay`,data).then((res) => {
|
that.$u.put(`/app/bill/pay`,data).then((res) => {
|
||||||
if (res.code ==200) {
|
if (res.code ==200) {
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,8 @@
|
||||||
suitGearTime:[],
|
suitGearTime:[],
|
||||||
suitPrice:'',
|
suitPrice:'',
|
||||||
payNo:'',
|
payNo:'',
|
||||||
q:''
|
q:'',
|
||||||
|
channelId:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
|
@ -216,6 +217,7 @@
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// this.getuserinfo()
|
// this.getuserinfo()
|
||||||
|
this.getzfqd()
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
if (this.id != '') {
|
if (this.id != '') {
|
||||||
this.$u.get("/app/user/userInfo").then((res) => {
|
this.$u.get("/app/user/userInfo").then((res) => {
|
||||||
|
|
@ -253,6 +255,21 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getzfqd(){
|
||||||
|
this.$u.get(`/app/channel/recharge/enabledList`).then(res =>{
|
||||||
|
if(res.code == 200){
|
||||||
|
this.channelId = res.data[0].channelId
|
||||||
|
uni.hideLoading()
|
||||||
|
}else{
|
||||||
|
uni.hideLoading()
|
||||||
|
uni.showToast({
|
||||||
|
title:res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration:2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
getone(){
|
getone(){
|
||||||
let that = this
|
let that = this
|
||||||
let data = {
|
let data = {
|
||||||
|
|
@ -421,6 +438,10 @@
|
||||||
duration: 1000
|
duration: 1000
|
||||||
})
|
})
|
||||||
} else if (this.onlineStatus == 1) {
|
} else if (this.onlineStatus == 1) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '准备支付中...'
|
||||||
|
})
|
||||||
|
this.getzfqd()
|
||||||
this.zhifuflag = false
|
this.zhifuflag = false
|
||||||
let that = this
|
let that = this
|
||||||
let data = {
|
let data = {
|
||||||
|
|
@ -451,7 +472,7 @@
|
||||||
if(this.suitFeeType == 3 || this.suitFeeType == 4){
|
if(this.suitFeeType == 3 || this.suitFeeType == 4){
|
||||||
let data = {
|
let data = {
|
||||||
billNo:that.orderno,
|
billNo:that.orderno,
|
||||||
channelId:5
|
channelId:that.channelId
|
||||||
}
|
}
|
||||||
that.$u.put(`/app/bill/payDeposit`,data).then(res => {
|
that.$u.put(`/app/bill/payDeposit`,data).then(res => {
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
|
@ -500,9 +521,9 @@
|
||||||
}else{
|
}else{
|
||||||
let data = {
|
let data = {
|
||||||
billNo:that.orderno,
|
billNo:that.orderno,
|
||||||
channelId:5
|
channelId:that.channelId
|
||||||
}
|
}
|
||||||
that.$u.put(`/app/bill/pay/`,data).then((res) => {
|
that.$u.put(`/app/bill/pay`,data).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
provider: 'wxpay',
|
provider: 'wxpay',
|
||||||
|
|
@ -600,6 +621,10 @@
|
||||||
}
|
}
|
||||||
},10000)
|
},10000)
|
||||||
} else {
|
} else {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '准备支付中...'
|
||||||
|
})
|
||||||
|
this.getzfqd()
|
||||||
this.zhifuflag = false
|
this.zhifuflag = false
|
||||||
let that = this
|
let that = this
|
||||||
let data = {
|
let data = {
|
||||||
|
|
@ -620,7 +645,7 @@
|
||||||
if(this.suitFeeType == 3 || this.suitFeeType == 4){
|
if(this.suitFeeType == 3 || this.suitFeeType == 4){
|
||||||
let data = {
|
let data = {
|
||||||
billNo:that.orderno,
|
billNo:that.orderno,
|
||||||
channelId:5
|
channelId:that.channelId
|
||||||
}
|
}
|
||||||
that.$u.put(`/app/bill/payDeposit`,data).then((res) => {
|
that.$u.put(`/app/bill/payDeposit`,data).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|
@ -655,6 +680,9 @@
|
||||||
xBlufi.notifySendCustomData({
|
xBlufi.notifySendCustomData({
|
||||||
customData: 'open'
|
customData: 'open'
|
||||||
})
|
})
|
||||||
|
xBlufi.notifySendCustomData({
|
||||||
|
customData: '11open'
|
||||||
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
that.zhifuflag = true
|
that.zhifuflag = true
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
|
|
@ -755,9 +783,9 @@
|
||||||
}else{
|
}else{
|
||||||
let data = {
|
let data = {
|
||||||
billNo:that.orderno,
|
billNo:that.orderno,
|
||||||
channelId:5
|
channelId:that.channelId
|
||||||
}
|
}
|
||||||
that.$u.put(`/app/bill/pay/`,data).then((res) => {
|
that.$u.put(`/app/bill/pay`,data).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
provider: 'wxpay',
|
provider: 'wxpay',
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -313,9 +313,20 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="btnmsk" style="width: 100%;height: 100vh;position: fixed;top: 0;left: 0;background-color: #000;opacity: .1;z-index: 999;">
|
<view v-if="btnmsk" style="width: 100%;height: 100vh;position: fixed;top: 0;left: 0;background-color: #000;opacity: .1;z-index: 98;">
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 弹出框 -->
|
||||||
|
<view class="tishi" style="width: 100%;height: 100%;background-color: #fff;position: fixed;top: 0;left: 0;z-index: 99;" v-if="contwzflag">
|
||||||
|
<view class="" style="margin-top: 180rpx;padding: 30rpx;box-sizing: border-box;overflow: scroll;height: 80vh;font-size: 32rpx;" v-html="contwz">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view @click="btnzx" class="btnzd" style="width: 650rpx;height: 90rpx;text-align: center;line-height: 90rpx;background-color: #8883F0;color: #fff;font-size: 36rpx;border-radius: 50rpx;margin: auto;">
|
||||||
|
我已知晓
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -423,8 +434,10 @@
|
||||||
pdvalue: '',
|
pdvalue: '',
|
||||||
dfvalue: '',
|
dfvalue: '',
|
||||||
jdvalue: '',
|
jdvalue: '',
|
||||||
timevalue: ''
|
timevalue: '',
|
||||||
|
contwz:'',
|
||||||
|
contwzflag:false,
|
||||||
|
contwzflags:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
|
@ -438,6 +451,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.getuser()
|
||||||
|
this.getxieyi()
|
||||||
if (uni.getStorageSync('tcidlist')) {
|
if (uni.getStorageSync('tcidlist')) {
|
||||||
this.deviceList = uni.getStorageSync('tcidlist')
|
this.deviceList = uni.getStorageSync('tcidlist')
|
||||||
}
|
}
|
||||||
|
|
@ -485,7 +500,158 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 用户协议
|
||||||
|
getxieyi(){
|
||||||
|
this.$u.get(`/app/article/licence/mch`).then(res => {
|
||||||
|
if(res.code == 200){
|
||||||
|
this.contwz = res.data.content
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 点击我已知晓
|
||||||
|
btnzx(){
|
||||||
|
this.$u.put(`/app/user/readMchLicence`).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.getuser()
|
||||||
|
this.btnmsk = false
|
||||||
|
this.contwzflag = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取用户信息
|
||||||
|
getuser(){
|
||||||
|
this.$u.get("/app/user/userInfo").then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
if(res.data.readMchLicence == false){
|
||||||
|
this.contwzflags = true
|
||||||
|
}else{
|
||||||
|
this.contwzflags = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
btnadd() {
|
||||||
|
let regex = /^\d+(\.\d{1,2})?$/
|
||||||
|
let regexs = /^\d+$/
|
||||||
|
if (this.description == '') {
|
||||||
|
uni.showToast({
|
||||||
|
title: '详细说明不能为空',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1000,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.btnmsk = true
|
||||||
|
if (this.title == '确定') {
|
||||||
|
if(this.contwzflags == false){
|
||||||
|
this.contwzflag = false
|
||||||
|
let colorMap = {
|
||||||
|
"#64B6A7": 0,
|
||||||
|
"#468DFF": 1,
|
||||||
|
"#8883F0": 2,
|
||||||
|
"#FF4444": 3
|
||||||
|
}
|
||||||
|
this.gearTime = []
|
||||||
|
this.backgroundColor.forEach(color => {
|
||||||
|
this.gearTime.push(colorMap[color]);
|
||||||
|
})
|
||||||
|
let arrs = [...this.deviceList.map(item => item.deviceId)]
|
||||||
|
if (this.feeType == 3 || this.feeType == 4) {
|
||||||
|
this.gearAmount = []
|
||||||
|
this.gearAmount.push(this.gdvalue, this.pdvalue, this.dfvalue, this.jdvalue)
|
||||||
|
}
|
||||||
|
let data = {
|
||||||
|
// deviceId: this.deviceId,
|
||||||
|
name: this.name,
|
||||||
|
value:this.feeType == 3 || this.feeType == 4 ? (this.duvalue = null) : this.duvalue,
|
||||||
|
price: this.qianvalue,
|
||||||
|
description: this.description,
|
||||||
|
timeUnit: this.feeType == 3 || this.feeType == 4 || this.feeType == 2 ? (this.timeUnit = null) : this.timeUnit,
|
||||||
|
deviceIds: arrs,
|
||||||
|
feeMode: this.feeMode,
|
||||||
|
feeType: this.feeType,
|
||||||
|
gearAmount: this.gearAmount,
|
||||||
|
gearTime: this.feeType === 3 || this.feeType === 4 ? this.gearTime : (this.gearTime = []),
|
||||||
|
enabledLowPowerClose:this.checked,
|
||||||
|
lowPower:this.power
|
||||||
|
}
|
||||||
|
this.$u.post('/app/suit', data).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.removeStorageSync('tcidlist')
|
||||||
|
uni.showToast({
|
||||||
|
title: '新建套餐成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 1000,
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
this.btnmsk = false
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 1000)
|
||||||
|
} else {
|
||||||
|
this.btnmsk = false
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1000,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.contwzflag = true
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let colorMap = {
|
||||||
|
"#64B6A7": 0,
|
||||||
|
"#468DFF": 1,
|
||||||
|
"#8883F0": 2,
|
||||||
|
"#FF4444": 3
|
||||||
|
}
|
||||||
|
this.gearTime = []
|
||||||
|
this.backgroundColor.forEach(color => {
|
||||||
|
this.gearTime.push(colorMap[color]);
|
||||||
|
})
|
||||||
|
let arrs = [...this.deviceList.map(item => item.deviceId)]
|
||||||
|
if (this.feeType == 3 || this.feeType == 4) {
|
||||||
|
this.gearAmount = []
|
||||||
|
this.gearAmount.push(this.gdvalue, this.pdvalue, this.dfvalue, this.jdvalue)
|
||||||
|
}
|
||||||
|
let data = {
|
||||||
|
suitId: this.suitId,
|
||||||
|
name: this.name,
|
||||||
|
value: this.duvalue,
|
||||||
|
price: this.qianvalue,
|
||||||
|
description: this.description,
|
||||||
|
timeUnit: this.timeUnit,
|
||||||
|
deviceIds: arrs,
|
||||||
|
feeMode: this.feeMode,
|
||||||
|
feeType: this.feeType,
|
||||||
|
gearAmount: this.gearAmount,
|
||||||
|
gearTime: this.feeType === 3 || this.feeType === 4 ? this.gearTime : (this.gearTime = []),
|
||||||
|
enabledLowPowerClose:this.checked,
|
||||||
|
lowPower:this.power
|
||||||
|
}
|
||||||
|
this.$u.put('/app/suit', data).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '修改套餐成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 1000,
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
this.btnmsk = false
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 1000)
|
||||||
|
} else {
|
||||||
|
this.btnmsk = false
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1000,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// 收费模式 单次and智能
|
// 收费模式 单次and智能
|
||||||
radioChange(e) {
|
radioChange(e) {
|
||||||
|
|
@ -616,8 +782,7 @@
|
||||||
// 跳转选择设备
|
// 跳转选择设备
|
||||||
btnaddsb() {
|
btnaddsb() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/page_components/shebeixz?id=' + this.suitId + '&title=' + this.title + '&list=' + JSON
|
url: '/page_components/shebeixz?id=' + this.suitId + '&title=' + this.title + '&list=' + JSON.stringify(this.deviceList)
|
||||||
.stringify(this.deviceList)
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
btnxl(index) {
|
btnxl(index) {
|
||||||
|
|
@ -640,6 +805,8 @@
|
||||||
this.duvalue = res.data.value
|
this.duvalue = res.data.value
|
||||||
this.description = res.data.description
|
this.description = res.data.description
|
||||||
this.deviceList = res.data.deviceList
|
this.deviceList = res.data.deviceList
|
||||||
|
this.checked = res.data.enabledLowPowerClose
|
||||||
|
this.power = res.data.lowPower
|
||||||
this.deviceList.forEach(item => {
|
this.deviceList.forEach(item => {
|
||||||
this.tcidlist.push(item.deviceId)
|
this.tcidlist.push(item.deviceId)
|
||||||
})
|
})
|
||||||
|
|
@ -753,121 +920,6 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
btnadd() {
|
|
||||||
console.log(this.backgroundColor, '121212');
|
|
||||||
let regex = /^\d+(\.\d{1,2})?$/
|
|
||||||
let regexs = /^\d+$/
|
|
||||||
if (this.description == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '详细说明不能为空',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 1000,
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.btnmsk = true
|
|
||||||
if (this.title == '确定') {
|
|
||||||
let colorMap = {
|
|
||||||
"#64B6A7": 0,
|
|
||||||
"#468DFF": 1,
|
|
||||||
"#8883F0": 2,
|
|
||||||
"#FF4444": 3
|
|
||||||
}
|
|
||||||
this.gearTime = []
|
|
||||||
this.backgroundColor.forEach(color => {
|
|
||||||
this.gearTime.push(colorMap[color]);
|
|
||||||
})
|
|
||||||
let arrs = [...this.deviceList.map(item => item.deviceId)]
|
|
||||||
if (this.feeType == 3 || this.feeType == 4) {
|
|
||||||
this.gearAmount = []
|
|
||||||
this.gearAmount.push(this.gdvalue, this.pdvalue, this.dfvalue, this.jdvalue)
|
|
||||||
}
|
|
||||||
let data = {
|
|
||||||
// deviceId: this.deviceId,
|
|
||||||
name: this.name,
|
|
||||||
value:this.feeType == 3 || this.feeType == 4 ? (this.duvalue = null) : this.duvalue,
|
|
||||||
price: this.qianvalue,
|
|
||||||
description: this.description,
|
|
||||||
timeUnit: this.feeType == 3 || this.feeType == 4 || this.feeType == 2 ? (this.timeUnit = null) : this.timeUnit,
|
|
||||||
deviceIds: arrs,
|
|
||||||
feeMode: this.feeMode,
|
|
||||||
feeType: this.feeType,
|
|
||||||
gearAmount: this.gearAmount,
|
|
||||||
gearTime: this.feeType === 3 || this.feeType === 4 ? this.gearTime : (this.gearTime = [])
|
|
||||||
}
|
|
||||||
this.$u.post('/app/suit', data).then((res) => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
uni.removeStorageSync('tcidlist')
|
|
||||||
uni.showToast({
|
|
||||||
title: '新建套餐成功',
|
|
||||||
icon: 'success',
|
|
||||||
duration: 1000,
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
this.btnmsk = false
|
|
||||||
uni.navigateBack()
|
|
||||||
}, 1000)
|
|
||||||
} else {
|
|
||||||
this.btnmsk = false
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 1000,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
let colorMap = {
|
|
||||||
"#64B6A7": 0,
|
|
||||||
"#468DFF": 1,
|
|
||||||
"#8883F0": 2,
|
|
||||||
"#FF4444": 3
|
|
||||||
}
|
|
||||||
this.gearTime = []
|
|
||||||
this.backgroundColor.forEach(color => {
|
|
||||||
this.gearTime.push(colorMap[color]);
|
|
||||||
})
|
|
||||||
let arrs = [...this.deviceList.map(item => item.deviceId)]
|
|
||||||
if (this.feeType == 3 || this.feeType == 4) {
|
|
||||||
this.gearAmount = []
|
|
||||||
this.gearAmount.push(this.gdvalue, this.pdvalue, this.dfvalue, this.jdvalue)
|
|
||||||
}
|
|
||||||
let data = {
|
|
||||||
suitId: this.suitId,
|
|
||||||
name: this.name,
|
|
||||||
value: this.duvalue,
|
|
||||||
price: this.qianvalue,
|
|
||||||
description: this.description,
|
|
||||||
timeUnit: this.timeUnit,
|
|
||||||
deviceIds: arrs,
|
|
||||||
feeMode: this.feeMode,
|
|
||||||
feeType: this.feeType,
|
|
||||||
gearAmount: this.gearAmount,
|
|
||||||
gearTime: this.feeType === 3 || this.feeType === 4 ? this.gearTime : (this.gearTime = [])
|
|
||||||
}
|
|
||||||
this.$u.put('/app/suit', data).then((res) => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '修改套餐成功',
|
|
||||||
icon: 'success',
|
|
||||||
duration: 1000,
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
this.btnmsk = false
|
|
||||||
uni.navigateBack()
|
|
||||||
}, 1000)
|
|
||||||
} else {
|
|
||||||
this.btnmsk = false
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 1000,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,14 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="dblist" v-for="(item, index) in devicesLists" :key="index">
|
<view class="dblist" v-for="(item, index) in devicesLists" :key="index">
|
||||||
<view class="cen">
|
<view class="cen" :id="item.deviceId" @click="createBLEConnections(item)">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<view class="">
|
<view class="">
|
||||||
状态:<text v-if="item.flags == true" style="color: #e10328;">已录入</text> <text v-else
|
状态:<text v-if="item.flags == true" style="color: #e10328;">已录入</text> <text v-else
|
||||||
style="color:seagreen;">未录入</text>
|
style="color:seagreen;">未录入</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="" style="display: flex;">
|
<view class="" style="display: flex;width: 100%;">
|
||||||
SN码: <input
|
SN码:{{item.sn == undefined ? '--' : item.sn}}
|
||||||
style="width: 200rpx;background-color: #ccc;padding: 5rpx;box-sizing: border-box;text-align: center;"
|
|
||||||
v-model="item.sn" placeholder="输入SN" />
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mac">
|
<view class="mac">
|
||||||
|
|
@ -25,15 +23,16 @@
|
||||||
<view class="" style="color: #8883F0;margin-top: 10rpx;margin-bottom: 10rpx;text-align: left;">
|
<view class="" style="color: #8883F0;margin-top: 10rpx;margin-bottom: 10rpx;text-align: left;">
|
||||||
蓝牙强度:{{item.RSSI}}
|
蓝牙强度:{{item.RSSI}}
|
||||||
</view>
|
</view>
|
||||||
<view @click="btnshows(item,index)"
|
<!-- <view @click="btnshows(item,index)"
|
||||||
style="color: #8883F0;margin-top: 10rpx;margin-bottom: 10rpx;text-align: left;">
|
style="color: #8883F0;margin-top: 10rpx;margin-bottom: 10rpx;text-align: left;">
|
||||||
型号选择:{{item.xuanz == undefined ? '--' : item.xuanz}}
|
型号选择:{{item.xuanz == undefined ? '--' : item.xuanz}}
|
||||||
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="rt" :id="item.deviceId" @click="createBLEConnections(item)">
|
||||||
<view class="rt">
|
<!-- <text style="margin-bottom: 10rpx;" :id="item.deviceId" @click="createBLEConnections(item)">{{item.lj}}</text> -->
|
||||||
<text style="margin-bottom: 10rpx;" :id="item.deviceId" @click="createBLEConnections(item)">{{item.lj}}</text>
|
<text style="margin-bottom: 10rpx;">选择</text>
|
||||||
<text @click="scanQRCode(item)" style="margin-bottom: 10rpx;">扫码</text>
|
<!-- <text @click="scanQRCode(item)" style="margin-bottom: 10rpx;">扫码</text>
|
||||||
<text :id="item.deviceId" @click="createBLEConnection(item)">录入</text>
|
<text :id="item.deviceId" @click="createBLEConnection(item)">录入</text> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -287,26 +286,37 @@
|
||||||
this.titleflag = true
|
this.titleflag = true
|
||||||
} else {
|
} else {
|
||||||
let arr = []
|
let arr = []
|
||||||
|
// console.log(this.devicesLists,'101010');
|
||||||
this.devicesLists.forEach(item => {
|
this.devicesLists.forEach(item => {
|
||||||
arr.push(item.name.slice(5))
|
arr.push(item.name.slice(5))
|
||||||
})
|
})
|
||||||
this.arrs = arr.join(',')
|
this.arrs = arr.join(',')
|
||||||
this.$u.get(`/app/device/getExistMac/${this.arrs}`).then(res => {
|
this.$u.get(`/app/device/getExistMac/${this.arrs}`).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200 && Array.isArray(res.data)) {
|
||||||
const existingDevices = new Set(res.data); // 将 res.data 转换为 Set,以提高查找效率
|
const existingDevices = new Map(res.data.map(item => [item.mac, true])); // 使用Map来存储已找到的MAC
|
||||||
|
|
||||||
this.devicesLists = this.devicesLists.map(device => {
|
this.devicesLists = this.devicesLists.map(device => {
|
||||||
const trimmedName = device.name.slice(5); // 假设前缀总是5个字符长
|
const trimmedName = device.name.slice(5); // 假设name中包含MAC地址的一部分
|
||||||
const flags = existingDevices.has(trimmedName); // true 如果存在,否则 false
|
const mac = trimmedName; // 如果trimmedName直接就是MAC,则不需要再处理
|
||||||
return {
|
device.found = existingDevices.has(mac); // 添加一个found属性来标记是否找到
|
||||||
...device,
|
if (device.found) {
|
||||||
flags, // 直接使用 flags 变量
|
const sn = res.data.find(val => val.mac === mac)?.sn; // 从res.data中找到匹配的sn
|
||||||
sn: '',
|
if (sn) {
|
||||||
lj:'连接'
|
device.sn = sn; // 设置sn
|
||||||
|
}
|
||||||
|
device.flags = true; // 设置flags为true,因为找到了匹配的MAC
|
||||||
|
} else {
|
||||||
|
device.flags = false; // 可选:如果你想要明确表示未找到
|
||||||
|
}
|
||||||
|
return device; // 但map函数仍然需要return来保持结构
|
||||||
|
});
|
||||||
|
this.devicesLists.sort((a, b) => {
|
||||||
|
if (a.found && !b.found) return 1; // b排在a前面(即a在后面)
|
||||||
|
if (!a.found && b.found) return -1; // a排在b前面
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
})
|
|
||||||
console.log(this.devicesLists,'0202')
|
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
},2000)
|
},2000)
|
||||||
|
|
@ -326,92 +336,104 @@
|
||||||
|
|
||||||
// 发送开关
|
// 发送开关
|
||||||
createBLEConnections(e) {
|
createBLEConnections(e) {
|
||||||
this.arrs = ''
|
let Bluetoothmac = e.name.substring(5)
|
||||||
this.qrResult = e.name //拿到所点击的mac号
|
uni.navigateTo({
|
||||||
if (this.ver_data == null) { //判断是否有连接蓝牙
|
url:'/page_fenbao/device/joinDevice?mac='+Bluetoothmac
|
||||||
xBlufi.initXBlufi(1)
|
|
||||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
|
||||||
xBlufi.notifyStartDiscoverBle({
|
|
||||||
'isStart': true
|
|
||||||
})
|
})
|
||||||
uni.showLoading({
|
|
||||||
title: '连接准备中...'
|
// this.arrs = ''
|
||||||
})
|
// this.qrResult = e.name //拿到所点击的mac号
|
||||||
// 停止蓝牙搜索
|
// if (this.ver_data == null) { //判断是否有连接蓝牙
|
||||||
setTimeout(() => {
|
// xBlufi.initXBlufi(1)
|
||||||
setTimeout(()=>{
|
// xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
||||||
uni.showLoading({
|
// xBlufi.notifyStartDiscoverBle({
|
||||||
title: '连接中...'
|
// 'isStart': true
|
||||||
})
|
// })
|
||||||
setTimeout(()=>{
|
// this.devicesList.forEach(device => {
|
||||||
uni.hideLoading()
|
// if (device.name == this.qrResult) {
|
||||||
uni.showToast({
|
// this.deviceId = device.deviceId
|
||||||
title: '连接成功',
|
// this.name = device.name
|
||||||
icon: 'success',
|
// this.mac = device.name.slice(5, 17)
|
||||||
duration: 2000
|
// }
|
||||||
})
|
// })
|
||||||
this.devicesLists.forEach(item => {
|
// uni.showLoading({
|
||||||
if (item.name == this.qrResult) {
|
// title: '连接准备中...'
|
||||||
item.lj = '开关'
|
// })
|
||||||
}
|
// // 停止蓝牙搜索
|
||||||
})
|
// setTimeout(() => {
|
||||||
},2000)
|
// setTimeout(()=>{
|
||||||
},500)
|
// uni.showLoading({
|
||||||
xBlufi.notifyStartDiscoverBle({
|
// title: '连接中...'
|
||||||
'isStart': false
|
// })
|
||||||
})
|
// setTimeout(()=>{
|
||||||
xBlufi.notifyConnectBle({
|
// uni.hideLoading()
|
||||||
isStart: true,
|
// uni.showToast({
|
||||||
deviceId: this.deviceId,
|
// title: '连接成功',
|
||||||
name: this.name
|
// icon: 'success',
|
||||||
})
|
// duration: 2000
|
||||||
xBlufi.notifyInitBleEsp32({
|
// })
|
||||||
deviceId: this.deviceId
|
// this.devicesLists.forEach(item => {
|
||||||
})
|
// if (item.name == this.qrResult) {
|
||||||
}, 1000)
|
// item.lj = '开关'
|
||||||
}else{ //有连接则发送命令
|
// }
|
||||||
uni.showLoading({
|
// })
|
||||||
title: '执行中...'
|
// },2000)
|
||||||
})
|
// },500)
|
||||||
let that = this //改变this指向
|
// xBlufi.notifyStartDiscoverBle({
|
||||||
uni.getNetworkType({
|
// 'isStart': false
|
||||||
success(res) {
|
// })
|
||||||
if (res.networkType !== 'none') {
|
// xBlufi.notifyConnectBle({
|
||||||
uni.getConnectedBluetoothDevices({
|
// isStart: true,
|
||||||
success(res) {
|
// deviceId: this.deviceId,
|
||||||
setTimeout(() => { //一秒后发送开启命令
|
// name: this.name
|
||||||
xBlufi.notifySendCustomData({
|
// })
|
||||||
customData: 'open'
|
// xBlufi.notifyInitBleEsp32({
|
||||||
})
|
// deviceId: this.deviceId
|
||||||
setTimeout(()=>{ //发送开启命令两秒后发送关闭命令
|
// })
|
||||||
xBlufi.notifySendCustomData({
|
// }, 1000)
|
||||||
customData: 'close'
|
// }else{ //有连接则发送命令
|
||||||
})
|
// uni.showLoading({
|
||||||
setTimeout(()=>{ //发送关闭命令后一秒后断开连接
|
// title: '执行中...'
|
||||||
uni.hideLoading()
|
// })
|
||||||
that.ver_data = null
|
// let that = this //改变this指向
|
||||||
xBlufi.listenDeviceMsgEvent(false, that.funListenDeviceMsgEvent);
|
// uni.getNetworkType({
|
||||||
wx.closeBLEConnection({
|
// success(res) {
|
||||||
deviceId: that.deviceId,
|
// if (res.networkType !== 'none') {
|
||||||
})
|
// uni.getConnectedBluetoothDevices({
|
||||||
that.devicesLists.forEach(item => {
|
// success(res) {
|
||||||
if (item.name == that.qrResult) {
|
// setTimeout(() => { //一秒后发送开启命令
|
||||||
item.lj = '连接'
|
// xBlufi.notifySendCustomData({
|
||||||
}
|
// customData: 'open'
|
||||||
})
|
// })
|
||||||
// console.log('guanbi');
|
// setTimeout(()=>{ //发送开启命令两秒后发送关闭命令
|
||||||
},1000)
|
// xBlufi.notifySendCustomData({
|
||||||
},2000)
|
// customData: 'close'
|
||||||
}, 1000)
|
// })
|
||||||
},
|
// setTimeout(()=>{ //发送关闭命令后一秒后断开连接
|
||||||
fail(err) {
|
// uni.hideLoading()
|
||||||
console.error('获取已连接蓝牙设备信息失败:', err)
|
// that.ver_data = null
|
||||||
}
|
// xBlufi.listenDeviceMsgEvent(false, that.funListenDeviceMsgEvent);
|
||||||
})
|
// wx.closeBLEConnection({
|
||||||
}
|
// deviceId: that.deviceId,
|
||||||
}
|
// })
|
||||||
})
|
// that.devicesLists.forEach(item => {
|
||||||
}
|
// if (item.name == that.qrResult) {
|
||||||
|
// item.lj = '连接'
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// // console.log('guanbi');
|
||||||
|
// },1000)
|
||||||
|
// },2000)
|
||||||
|
// }, 1000)
|
||||||
|
// },
|
||||||
|
// fail(err) {
|
||||||
|
// console.error('获取已连接蓝牙设备信息失败:', err)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
// 请求已经录入设备的mac
|
// 请求已经录入设备的mac
|
||||||
getluru() {
|
getluru() {
|
||||||
|
|
|
||||||
|
|
@ -2,87 +2,71 @@
|
||||||
<view class="pages">
|
<view class="pages">
|
||||||
<u-navbar title="咨询客服" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff"
|
<u-navbar title="咨询客服" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff"
|
||||||
title-size='36' height='50'></u-navbar>
|
title-size='36' height='50'></u-navbar>
|
||||||
<!-- <view class="leix">
|
<image class="topimg" src="https://api.ccttiot.com/smartmeter/img/static/uzjRZtHgttsXPNCWi4PF" mode=""></image>
|
||||||
<view class="title">
|
|
||||||
反馈类型 <text style="font-size: 36rpx; color: red; vertical-align: top;margin-left: 32rpx;">✲</text>
|
|
||||||
</view>
|
|
||||||
<view class="lxxz">
|
|
||||||
<view class="" :class="cutidx==1?'active':''" @click="cutidx=1">
|
|
||||||
功能异常
|
|
||||||
<image style="width: 31rpx;height: 19rpx; position: absolute; right: 0;bottom: 0;display: none;" src="https://api.ccttiot.com/smartmeter/img/static/uvHUjXUhUwA0OvSA0O9K" mode=""></image>
|
|
||||||
</view>
|
|
||||||
<view class="" :class="cutidx==2?'active':''" @click="cutidx=2">
|
|
||||||
意见与建议
|
|
||||||
<image style="width: 31rpx;height: 19rpx; position: absolute; right: 0;bottom: 0;display: none;" src="https://api.ccttiot.com/smartmeter/img/static/uvHUjXUhUwA0OvSA0O9K" mode=""></image>
|
|
||||||
</view>
|
|
||||||
<view class="" :class="cutidx==3?'active':''" @click="cutidx=3">
|
|
||||||
其他
|
|
||||||
<image style="width: 31rpx;height: 19rpx; position: absolute; right: 0;bottom: 0;display: none;" src="https://api.ccttiot.com/smartmeter/img/static/uvHUjXUhUwA0OvSA0O9K" mode=""></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="problem">
|
|
||||||
<view class="title">
|
|
||||||
问题描述 <text style="font-size: 36rpx; color: red; vertical-align: top;margin-left: 32rpx;">✲</text>
|
|
||||||
</view>
|
|
||||||
<view class="input-container">
|
|
||||||
<view class="placeholder" v-if="!textValue">请详细描述您的问题或建议</view>
|
|
||||||
<textarea class="custom-textarea" v-model="textValue" @focus="hidePlaceholder" style="border: none;"
|
|
||||||
@input="updateWordCount" @blur="showPlaceholder" maxlength="500"></textarea>
|
|
||||||
<text class="word-count">{{ currentCount }}/500</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="scpic">
|
|
||||||
<view class="title">
|
|
||||||
上传图片
|
|
||||||
</view>
|
|
||||||
<view class="icon">
|
|
||||||
<view class="imgbox" v-for="(item,index) in imglist " :key="index">
|
|
||||||
<image style="border-radius: 10rpx;" :src="item" mode=""></image>
|
|
||||||
</view>
|
|
||||||
<view class="imgbox" style="width: 17%;">
|
|
||||||
<button style="border: 0;outline: none;width: 143rpx;padding-left: 0rpx;height: 143rpx;border-radius: 16rpx;" @click="getImage">
|
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uY8CPw9YE6JxPzcHUaqf" mode=""></image>
|
|
||||||
</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<text>上传问题图片可以让问题快速解决哦!</text>
|
|
||||||
</view>
|
|
||||||
<view class="lxfs" v-if="stause">
|
|
||||||
<view class="title">
|
|
||||||
联系方式
|
|
||||||
</view>
|
|
||||||
<input type="text" v-model="contact" placeholder="请留下手机号/邮箱/微信号,以便我们回复您" />
|
|
||||||
</view>
|
|
||||||
<view class="btn" @click="sub()">提交</view>
|
|
||||||
<view v-if="btnmsk" style="width: 100%;height: 100vh;position: fixed;top: 0;left: 0;background-color: #000;opacity: .1;z-index: 999;"></view> -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 咨询客服 -->
|
<!-- 咨询客服 -->
|
||||||
<view class="kflist">
|
<view class="list" style="margin-top: 360rpx;">
|
||||||
|
<view v-for="(item, index) in list" :key="index" class="kflist">
|
||||||
|
<!-- 判断索引的奇偶性 -->
|
||||||
|
<template v-if="index % 2 === 0">
|
||||||
|
<!-- 当索引为偶数时,内容在左侧 -->
|
||||||
<view class="kflt">
|
<view class="kflt">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uB5DfzK5zYtvzXCU58uf" mode=""></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uMSwHVPLeC3CFbPtwt9c" mode=""></image>
|
||||||
<view class="kfname">小丁</view>
|
<view class="kfname">{{item.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="kfrt">
|
<view class="kfrt">
|
||||||
<view class="wz">
|
<view class="wz">
|
||||||
<view class="">
|
<view class="" style="z-index: 1;">
|
||||||
微信号:mozixuan1598
|
微信号:{{item.wx == null ? '--' : item.wx}}
|
||||||
</view>
|
</view>
|
||||||
<view class="fz" @click="btnfzwx">
|
<view class="fz" @click="btnfzwx(item.wx)">
|
||||||
复制
|
复制
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="wz">
|
<view class="wz">
|
||||||
<view class="">
|
<view class="" style="z-index: 1;">
|
||||||
手机号:13850396941
|
手机号:{{item.mobile == null ? '--' : item.mobile}}
|
||||||
</view>
|
</view>
|
||||||
<view class="fz" @click="btnfzsj">
|
<view class="fz" @click="btnfzsj(item.mobile)">
|
||||||
复制
|
复制
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uwX5ob5jDuugNnd8cCaX" mode=""></image>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<!-- 当索引为奇数时,内容在右侧 -->
|
||||||
|
<view class="kfrt">
|
||||||
|
<view class="wz">
|
||||||
|
<view class="" style="z-index: 1;">
|
||||||
|
微信号:{{item.wx == null ? '--' : item.wx}}
|
||||||
|
</view>
|
||||||
|
<view class="fz" @click="btnfzwx(item.wx)">
|
||||||
|
复制
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="wz">
|
||||||
|
<view class="" style="z-index: 1;">
|
||||||
|
手机号:{{item.mobile == null ? '--' : item.mobile}}
|
||||||
|
</view>
|
||||||
|
<view class="fz" @click="btnfzsj(item.mobile)">
|
||||||
|
复制
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<image src="https://api.ccttiot.com/smartmeter/img/static/ueTBM3ydsEvrLcm5Hp59" mode=""></image>
|
||||||
|
</view>
|
||||||
|
<view class="kflt">
|
||||||
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uMSwHVPLeC3CFbPtwt9c" mode=""></image>
|
||||||
|
<view class="kfname">{{item.name}}</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
<view class="" style="width: 100%;text-align: center;font-size: 30rpx;color: #3D3D3D;margin-top: 82rpx;">
|
||||||
|
复制可帮您快速拨打电话及搜索微信
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -101,7 +85,8 @@
|
||||||
imglist: [],
|
imglist: [],
|
||||||
token: '',
|
token: '',
|
||||||
contact: '',
|
contact: '',
|
||||||
stause: false
|
stause: false,
|
||||||
|
list:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -109,8 +94,7 @@
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
||||||
// this.getQiniuToken()
|
this.getstause()
|
||||||
// this.getstause()
|
|
||||||
},
|
},
|
||||||
// 分享到好友(会话)
|
// 分享到好友(会话)
|
||||||
onShareAppMessage: function() {
|
onShareAppMessage: function() {
|
||||||
|
|
@ -129,9 +113,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
btnfzsj() {
|
|
||||||
|
btnfzsj(text) {
|
||||||
uni.setClipboardData({
|
uni.setClipboardData({
|
||||||
data:'13850396941',
|
data:text,
|
||||||
success: () => {
|
success: () => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '复制成功',
|
title: '复制成功',
|
||||||
|
|
@ -141,9 +126,9 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
btnfzwx() {
|
btnfzwx(text) {
|
||||||
uni.setClipboardData({
|
uni.setClipboardData({
|
||||||
data:'mozixuan1598',
|
data:text,
|
||||||
success: () => {
|
success: () => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '复制成功',
|
title: '复制成功',
|
||||||
|
|
@ -155,14 +140,9 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
getstause() {
|
getstause() {
|
||||||
|
this.$u.get(`/app/customerService/list?pageSize=999&pageNum=1&orderByColumn=sort&isAsc=desc`).then((res) => {
|
||||||
this.$u.get('/app/config/wa').then((res) => {
|
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
console.log(res)
|
this.list = res.rows
|
||||||
this.stause = res.data
|
|
||||||
if (this.stause == true) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -270,14 +250,33 @@
|
||||||
/deep/ .u-icon__icon {
|
/deep/ .u-icon__icon {
|
||||||
padding-bottom: 22rpx;
|
padding-bottom: 22rpx;
|
||||||
}
|
}
|
||||||
|
.topimg{
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 498rpx;
|
||||||
|
}
|
||||||
|
.list{
|
||||||
|
position: fixed;
|
||||||
|
top: 30rpx;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
z-index: 1;
|
||||||
|
height: 71vh;
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
.kflist {
|
.kflist {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: 82rpx;
|
margin-top: 32rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 22rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
width: 662rpx;
|
||||||
.kflt {
|
.kflt {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-right: 16rpx;
|
// margin-right: 16rpx;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 118rpx;
|
width: 118rpx;
|
||||||
|
|
@ -286,29 +285,36 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.kfrt {
|
.kfrt {
|
||||||
width: 532rpx;
|
width:100%;
|
||||||
height: 154rpx;
|
height: 154rpx;
|
||||||
background: #8883F0;
|
|
||||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||||
padding: 8rpx 30rpx;
|
padding: 4rpx 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
|
image{
|
||||||
|
width: 500rpx;
|
||||||
|
height: 151rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
.wz {
|
.wz {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 20rpx;
|
padding-top: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #FFFFFF;
|
color: #3D3D3D;
|
||||||
|
|
||||||
.fz {
|
.fz {
|
||||||
width: 72rpx;
|
width: 72rpx;
|
||||||
height: 40rpx;
|
height: 38rpx;
|
||||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||||
border: 1rpx solid #FFFFFF;
|
border: 1rpx solid #8883F0;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #FFFFFF;
|
color: #8883F0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
z-index: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -316,7 +322,7 @@
|
||||||
.kfname {
|
.kfname {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #8883F0;
|
color: #3D3D3D;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -163,16 +163,27 @@
|
||||||
height: 80rpx;align-items: center;justify-content: space-between;background-color: #fff;border-radius: 20rpx;">
|
height: 80rpx;align-items: center;justify-content: space-between;background-color: #fff;border-radius: 20rpx;">
|
||||||
<view class="bot">手动操作:{{tdtxt}}</view>
|
<view class="bot">手动操作:{{tdtxt}}</view>
|
||||||
<view class="cont" @click="btnkq">
|
<view class="cont" @click="btnkq">
|
||||||
<view class="top">
|
<view class="top" style="padding-top: 10rpx;">
|
||||||
<u-switch v-model="checked" active-color="#8883F0"></u-switch>
|
<!-- <u-switch v-model="checked" active-color="#8883F0"></u-switch> -->
|
||||||
|
<view class="rt">
|
||||||
|
<image v-if="imgflag" style="width: 160rpx;height: 80rpx;"
|
||||||
|
src="https://api.ccttiot.com/smartmeter/img/static/uccaWar4FDp37op7haWM " mode="">
|
||||||
|
</image>
|
||||||
|
<image style="width: 160rpx;height: 80rpx;" v-else
|
||||||
|
src="https://api.ccttiot.com/smartmeter/img/static/ur9HRtZKY7YcxGewJARz" mode="">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="tanc" v-if="vipflag">
|
<view class="tanc" v-if="vipflag">
|
||||||
<view class="tit">请输入您需要充值的时长(分钟)</view>
|
<view class="tit">请输入您需要充值的时长或度数</view>
|
||||||
<input type="number" :focus="focus" v-model="cztime" />
|
<input type="number" :focus="focus" v-model="cztime" placeholder="请输入时长或度数" />
|
||||||
|
<input type="text" placeholder="请选择单位时长或度数" v-model="danwei" disabled="false" @click="showflag = true" />
|
||||||
|
<!-- <image class="picjt" src="https://api.ccttiot.com/smartmeter/img/static/uGSDXbga6budx5g6BZ1p" mode=""> -->
|
||||||
|
</image>
|
||||||
<view class="xian"></view>
|
<view class="xian"></view>
|
||||||
<view class="anniu">
|
<view class="anniu">
|
||||||
<text @click="btnqx">取消</text> <text style="border-left: 1px solid #D8D8D8;color: #8883F0;"
|
<text @click="btnqx">取消</text> <text style="border-left: 1px solid #D8D8D8;color: #8883F0;"
|
||||||
|
|
@ -212,6 +223,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 选择单位 -->
|
||||||
|
<u-select v-model="showflag" :list="listdanwei" title='选择单位' @confirm="btnconfirm"></u-select>
|
||||||
|
|
||||||
<!-- 展示二维码 -->
|
<!-- 展示二维码 -->
|
||||||
<view class="imgewm" v-if="wemflag" @longpress="saveCanvas">
|
<view class="imgewm" v-if="wemflag" @longpress="saveCanvas">
|
||||||
|
|
@ -245,10 +258,26 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
showflag: false,
|
||||||
|
imgflag: false,
|
||||||
wemflag: false,
|
wemflag: false,
|
||||||
btnmsk: false,
|
btnmsk: false,
|
||||||
bluetoothflag: false,
|
bluetoothflag: false,
|
||||||
shibaiflag: false,
|
shibaiflag: false,
|
||||||
|
danwei: '',
|
||||||
|
listdanwei: [{
|
||||||
|
value: 1,
|
||||||
|
label: '小时'
|
||||||
|
}, {
|
||||||
|
value: 2,
|
||||||
|
label: '分钟'
|
||||||
|
}, {
|
||||||
|
value: 3,
|
||||||
|
label: '秒钟'
|
||||||
|
}, {
|
||||||
|
value: 4,
|
||||||
|
label: '度'
|
||||||
|
}],
|
||||||
bgc: {
|
bgc: {
|
||||||
backgroundColor: "#8883f0",
|
backgroundColor: "#8883f0",
|
||||||
},
|
},
|
||||||
|
|
@ -283,12 +312,13 @@
|
||||||
timer: null,
|
timer: null,
|
||||||
url: "",
|
url: "",
|
||||||
deviceNo: '',
|
deviceNo: '',
|
||||||
modelId:[]
|
modelId: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
let id = option.id
|
let id = option.id
|
||||||
this.id = id
|
this.id = id
|
||||||
|
this.$u.get(`/app/device/${this.id}/refreshIot`).then((res) => {})
|
||||||
// this.getDevice(id)
|
// this.getDevice(id)
|
||||||
if (option.flag) {
|
if (option.flag) {
|
||||||
this.opflag = false
|
this.opflag = false
|
||||||
|
|
@ -362,6 +392,12 @@
|
||||||
this.drawCanvas()
|
this.drawCanvas()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 选择时长单位
|
||||||
|
btnconfirm(e) {
|
||||||
|
this.danwei = e[0].label
|
||||||
|
this.damweiid = e[0].value
|
||||||
|
},
|
||||||
|
|
||||||
capture() {
|
capture() {
|
||||||
var pages = getCurrentPages(); //获取当前页面信息
|
var pages = getCurrentPages(); //获取当前页面信息
|
||||||
var page = pages[pages.length - 1];
|
var page = pages[pages.length - 1];
|
||||||
|
|
@ -454,14 +490,16 @@
|
||||||
this.$u.put(`/app/device/${this.id}/changePower?status=0`).then((res) => {
|
this.$u.put(`/app/device/${this.id}/changePower?status=0`).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.tdtxt = '关闭'
|
this.tdtxt = '关闭'
|
||||||
this.checked = false
|
this.imgflag = false
|
||||||
|
this.deviceInfo.status = 1
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.checked = false
|
this.imgflag = true
|
||||||
|
this.tdtxt = '开启'
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
@ -472,15 +510,17 @@
|
||||||
} else {
|
} else {
|
||||||
this.$u.put(`/app/device/${this.id}/changePower?status=1`).then((res) => {
|
this.$u.put(`/app/device/${this.id}/changePower?status=1`).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.checked = true
|
this.imgflag = true
|
||||||
this.tdtxt = '开启'
|
this.tdtxt = '开启'
|
||||||
|
this.deviceInfo.status = 2
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.checked = false
|
this.imgflag = false
|
||||||
|
this.tdtxt = '关闭'
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
@ -518,9 +558,9 @@
|
||||||
name = this.name.slice(index + 1)
|
name = this.name.slice(index + 1)
|
||||||
}
|
}
|
||||||
if (this.deviceInfo.powerStatus == 0) {
|
if (this.deviceInfo.powerStatus == 0) {
|
||||||
this.checked = false
|
this.imgflag = false
|
||||||
} else {
|
} else {
|
||||||
this.checked = true
|
this.imgflag = true
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -535,10 +575,14 @@
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// console.log('close关闭');
|
// console.log('close关闭');
|
||||||
that.tdtxt = '关闭'
|
that.tdtxt = '关闭'
|
||||||
that.checked = false
|
that.imgflag = false
|
||||||
|
that.deviceInfo.status = 1
|
||||||
xBlufi.notifySendCustomData({
|
xBlufi.notifySendCustomData({
|
||||||
customData: 'close'
|
customData: 'close'
|
||||||
})
|
})
|
||||||
|
xBlufi.notifySendCustomData({
|
||||||
|
customData: '11close'
|
||||||
|
})
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
|
|
@ -558,10 +602,14 @@
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// console.log('open开启');
|
// console.log('open开启');
|
||||||
that.tdtxt = '开启'
|
that.tdtxt = '开启'
|
||||||
that.checked = true
|
that.imgflag = true
|
||||||
|
that.deviceInfo.status = 2
|
||||||
xBlufi.notifySendCustomData({
|
xBlufi.notifySendCustomData({
|
||||||
customData: 'open'
|
customData: 'open'
|
||||||
})
|
})
|
||||||
|
xBlufi.notifySendCustomData({
|
||||||
|
customData: '11open'
|
||||||
|
})
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
|
|
@ -682,10 +730,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (res.data.powerStatus == 0) {
|
if (res.data.powerStatus == 0) {
|
||||||
this.checked = false
|
this.imgflag = false
|
||||||
this.tdtxt = '关闭'
|
this.tdtxt = '关闭'
|
||||||
} else {
|
} else {
|
||||||
this.checked = true
|
this.imgflag = true
|
||||||
this.tdtxt = '开启'
|
this.tdtxt = '开启'
|
||||||
}
|
}
|
||||||
this.loadings = true
|
this.loadings = true
|
||||||
|
|
@ -801,7 +849,7 @@
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
that.getDevice(that.id)
|
that.getDevice(that.id)
|
||||||
this.checked = false
|
this.imgflag = false
|
||||||
this.tdtxt = '关闭'
|
this.tdtxt = '关闭'
|
||||||
} else if (res.msg == '设备剩余时间不足,无需归零') {
|
} else if (res.msg == '设备剩余时间不足,无需归零') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -815,37 +863,6 @@
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
// uni.showLoading({
|
|
||||||
// title: '充值中...'
|
|
||||||
// })
|
|
||||||
// let vm = this; // 将外部的 this 绑定到 vm 上
|
|
||||||
// uni.getNetworkType({
|
|
||||||
// success(res) {
|
|
||||||
// if (res.networkType !== 'none') {
|
|
||||||
// uni.getConnectedBluetoothDevices({
|
|
||||||
// success(res) {
|
|
||||||
// console.log('已连接的蓝牙设备信息:', res);
|
|
||||||
// xBlufi.notifySendCustomData({
|
|
||||||
// customData: "time@" + 0
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// fail(err) {
|
|
||||||
// console.error('获取已连接蓝牙设备信息失败:', err);
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// // vm.$u.get(`/app/bill/recharge/${vm.billNo}/bluetoothSuccess`).then(res => {
|
|
||||||
// // if(res.code == 200){
|
|
||||||
// // setTimeout(()=>{
|
|
||||||
// // uni.hideLoading()
|
|
||||||
// // uni.navigateBack()
|
|
||||||
// // },1000)
|
|
||||||
// // }
|
|
||||||
// // })
|
|
||||||
// } else {
|
|
||||||
// console.log('手机未连接网络');
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (res.cancel) {
|
} else if (res.cancel) {
|
||||||
|
|
@ -877,7 +894,7 @@
|
||||||
this.btnmsk = false
|
this.btnmsk = false
|
||||||
this.shibaiflag = false
|
this.shibaiflag = false
|
||||||
this.bluetoothflag = true
|
this.bluetoothflag = true
|
||||||
console.log(this.deviceId,'idididididdidii');
|
console.log(this.deviceId, 'idididididdidii');
|
||||||
if (this.setMode == null) {
|
if (this.setMode == null) {
|
||||||
xBlufi.initXBlufi(1)
|
xBlufi.initXBlufi(1)
|
||||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
||||||
|
|
@ -917,12 +934,14 @@
|
||||||
if (systemInfo.platform == 'android') {
|
if (systemInfo.platform == 'android') {
|
||||||
// 当前设备是 Android
|
// 当前设备是 Android
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/page_components/wifilist/index?deviceId=' + this.deviceId + '&name=' + this.name
|
url: '/page_components/wifilist/index?deviceId=' + this
|
||||||
|
.deviceId + '&name=' + this.name
|
||||||
})
|
})
|
||||||
} else if (systemInfo.platform == 'ios') {
|
} else if (systemInfo.platform == 'ios') {
|
||||||
// 当前设备是 iOS
|
// 当前设备是 iOS
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/page_fenbao/device/wifivideo?deviceId=' + this.deviceId + '&name=' + this.name
|
url: '/page_fenbao/device/wifivideo?deviceId=' + this
|
||||||
|
.deviceId + '&name=' + this.name
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else if (res.msg == '设备编号和mac不能同时为空') {
|
} else if (res.msg == '设备编号和mac不能同时为空') {
|
||||||
|
|
@ -968,12 +987,14 @@
|
||||||
if (systemInfo.platform == 'android') {
|
if (systemInfo.platform == 'android') {
|
||||||
// 当前设备是 Android
|
// 当前设备是 Android
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/page_components/wifilist/index?deviceId=' + this.deviceId +'&name=' + this.name
|
url: '/page_components/wifilist/index?deviceId=' + this.deviceId +
|
||||||
|
'&name=' + this.name
|
||||||
})
|
})
|
||||||
} else if (systemInfo.platform == 'ios') {
|
} else if (systemInfo.platform == 'ios') {
|
||||||
// 当前设备是 iOS
|
// 当前设备是 iOS
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/page_fenbao/device/wifivideo?deviceId=' + this.deviceId +'&name=' + this.name
|
url: '/page_fenbao/device/wifivideo?deviceId=' + this.deviceId +
|
||||||
|
'&name=' + this.name
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1013,6 +1034,7 @@
|
||||||
}
|
}
|
||||||
let id = this.deviceInfo.deviceId
|
let id = this.deviceInfo.deviceId
|
||||||
this.vipflag = false
|
this.vipflag = false
|
||||||
|
if (this.deviceInfo.onlineStatus == 1) {
|
||||||
this.$u.put('/app/device/addTime/' + id + '?amount=' + this.cztime).then(res => {
|
this.$u.put('/app/device/addTime/' + id + '?amount=' + this.cztime).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -1028,36 +1050,59 @@
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
// let vm = this; // 将外部的 this 绑定到 vm 上
|
|
||||||
// uni.getNetworkType({
|
|
||||||
// success(res) {
|
|
||||||
// if (res.networkType !== 'none') {
|
|
||||||
// uni.getConnectedBluetoothDevices({
|
|
||||||
// success(res) {
|
|
||||||
// console.log('已连接的蓝牙设备信息:', res);
|
|
||||||
// xBlufi.notifySendCustomData({
|
|
||||||
// customData: "time@" + vm.setMode + vm.cztime
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// fail(err) {
|
|
||||||
// console.error('获取已连接蓝牙设备信息失败:', err);
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// // vm.$u.get(`/app/bill/recharge/${vm.billNo}/bluetoothSuccess`).then(res => {
|
|
||||||
// // if(res.code == 200){
|
|
||||||
// // setTimeout(()=>{
|
|
||||||
// // uni.hideLoading()
|
|
||||||
// // uni.navigateBack()
|
|
||||||
// // },1000)
|
|
||||||
// // }
|
|
||||||
// // })
|
|
||||||
// } else {
|
|
||||||
// console.log('手机未连接网络');
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
if (this.setMode == null) {
|
||||||
|
this.btnmsk = false
|
||||||
|
this.shibaiflag = false
|
||||||
|
this.bluetoothflag = true
|
||||||
|
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
|
||||||
|
})
|
||||||
|
}, 1000)
|
||||||
|
} else {
|
||||||
|
let that = this
|
||||||
|
uni.getNetworkType({
|
||||||
|
success(res) {
|
||||||
|
if (res.networkType !== 'none') {
|
||||||
|
uni.getConnectedBluetoothDevices({
|
||||||
|
success(res) {
|
||||||
|
setTimeout(() => {
|
||||||
|
that.deviceInfo.status = 2
|
||||||
|
that.imgflag = true
|
||||||
|
xBlufi.notifySendCustomData({
|
||||||
|
customData: '11open'
|
||||||
|
})
|
||||||
|
xBlufi.notifySendCustomData({
|
||||||
|
customData: 'open'
|
||||||
|
})
|
||||||
|
}, 1000)
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
console.error('获取已连接蓝牙设备信息失败:', err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
btnqx() {
|
btnqx() {
|
||||||
this.vipflag = false
|
this.vipflag = false
|
||||||
|
|
@ -1080,14 +1125,14 @@
|
||||||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS:
|
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS:
|
||||||
if (options.result) {
|
if (options.result) {
|
||||||
let devicesarr = options.data
|
let devicesarr = options.data
|
||||||
console.log(devicesarr,'devicesarrdevicesarr')
|
console.log(devicesarr, 'devicesarrdevicesarr')
|
||||||
devicesarr.forEach(device => {
|
devicesarr.forEach(device => {
|
||||||
const mac = device.name.substring(5)
|
const mac = device.name.substring(5)
|
||||||
if (device.name.slice(5, 17) == this.qrResult) {
|
if (device.name.slice(5, 17) == this.qrResult) {
|
||||||
this.deviceId = device.deviceId
|
this.deviceId = device.deviceId
|
||||||
this.name = device.name
|
this.name = device.name
|
||||||
this.mac = device.name.slice(5, 17)
|
this.mac = device.name.slice(5, 17)
|
||||||
console.log(this.mac,this.deviceId,this.name, 'macmacmac')
|
// console.log(this.mac, this.deviceId, this.name, 'macmacmac')
|
||||||
// this.devicesList = uniqueDevicesList
|
// this.devicesList = uniqueDevicesList
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -1301,6 +1346,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.picjt {
|
||||||
|
position: fixed;
|
||||||
|
top: 190rpx;
|
||||||
|
right: 60rpx;
|
||||||
|
width: 16rpx;
|
||||||
|
height: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.bluetoothbox {
|
.bluetoothbox {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
|
@ -1417,7 +1470,7 @@
|
||||||
|
|
||||||
.tanc {
|
.tanc {
|
||||||
width: 610rpx;
|
width: 610rpx;
|
||||||
height: 282rpx;
|
max-height: 360rpx;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<u-navbar title="余额提现" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff"
|
<u-navbar :custom-back="btnback" title="余额提现" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff"
|
||||||
title-size='36' height='50'></u-navbar>
|
title-size='36' height='50'></u-navbar>
|
||||||
<view class="cont">
|
<view class="cont">
|
||||||
<view class="top_box">
|
<view class="top_box">
|
||||||
|
|
@ -143,7 +143,11 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
btnback(){
|
||||||
|
uni.switchTab({
|
||||||
|
url:'/pages/my'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
change() {
|
change() {
|
||||||
if (this.serviceType == 2) {
|
if (this.serviceType == 2) {
|
||||||
|
|
@ -210,6 +214,11 @@
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
|
setTimeout(()=>{
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/page_components/shiming'
|
||||||
|
})
|
||||||
|
},1000)
|
||||||
}else{
|
}else{
|
||||||
if (this.userinfo.isReal == true) {
|
if (this.userinfo.isReal == true) {
|
||||||
if (this.money > this.userinfo.balance) {
|
if (this.money > this.userinfo.balance) {
|
||||||
|
|
@ -245,7 +254,11 @@
|
||||||
})
|
})
|
||||||
this.serviceRates = 0
|
this.serviceRates = 0
|
||||||
this.btnmsk = false
|
this.btnmsk = false
|
||||||
} else {
|
}else if(res.code == 10001){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/page_components/shiming'
|
||||||
|
})
|
||||||
|
}else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
|
||||||
19
pages.json
19
pages.json
|
|
@ -24,6 +24,17 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/shuaxin",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "我的",
|
||||||
|
// "enablePullDownRefresh": true,
|
||||||
|
"navigationBarBackgroundColor": "#3996FD",
|
||||||
|
"navigationBarTextStyle": "#FFFFFF",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/tj",
|
"path": "pages/tj",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -53,6 +64,14 @@
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/sjshiming",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2152,7 +2152,8 @@
|
||||||
padding-bottom: 20rpx;
|
padding-bottom: 20rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(255, 255, 255, 0);
|
// box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(255, 255, 255, 0);
|
||||||
|
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
|
||||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||||
|
|
||||||
.card_left {
|
.card_left {
|
||||||
|
|
|
||||||
|
|
@ -146,6 +146,13 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 点击进行商家实名
|
||||||
|
// btnsm(){
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url:'/pages/sjshiming'
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
|
||||||
btnguanli(){
|
btnguanli(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/page_components/newtaocan'
|
url:'/page_components/newtaocan'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user