This commit is contained in:
3321822538@qq.com 2025-02-20 14:34:21 +08:00
parent 518f1a9aa8
commit 6a3bdd7f05
17 changed files with 663 additions and 407 deletions

View File

@ -29,7 +29,7 @@
</template> </template>
<script> <script>
import { number } from 'echarts' // import { number } from 'echarts'
export default { export default {
data() { data() {

View File

@ -229,7 +229,7 @@
let data = { let data = {
ruleId:this.ruleId, ruleId:this.ruleId,
mode:this.type, mode:this.type,
hours:1, hours:this.huor,
price:this.price, price:this.price,
minHours:this.mintime, minHours:this.mintime,
explain:this.explain, explain:this.explain,
@ -348,6 +348,9 @@
padding-bottom: 30rpx; padding-bottom: 30rpx;
box-sizing: border-box; box-sizing: border-box;
margin-top: 30rpx; margin-top: 30rpx;
input{
width: 85%;
}
} }
.del{ .del{
position: absolute; position: absolute;

View File

@ -39,13 +39,13 @@
onLoad(option) { onLoad(option) {
if(option.roomId){ //and if(option.roomId){ //and
this.roomId = option.roomId this.roomId = option.roomId
this.https = 'https://testcha.chuangtewl.com?roomCode=' + this.roomId this.https = 'https://testcha.chuangtewl.com?f=' + this.roomId
}else if(option.storeId){ //- }else if(option.storeId){ //-
this.storeId = option.storeId this.storeId = option.storeId
this.https = 'https://testcha.chuangtewl.com?storeCode=' + this.storeId this.https = 'https://testcha.chuangtewl.com?d=' + this.storeId
}else if(option.toiletId){ // }else if(option.toiletId){ //
this.toiletId = option.toiletId this.toiletId = option.toiletId
this.https = 'https://testcha.chuangtewl.com?toiletId=' + this.toiletId this.https = 'https://testcha.chuangtewl.com?w=' + this.toiletId
} }
console.log(option) console.log(option)
this.qrFun() this.qrFun()

View File

@ -324,7 +324,7 @@
} }
} }
width: 680rpx; width: 680rpx;
height: 1260rpx; max-height: 1260rpx;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(72,137,59,0.1); box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(72,137,59,0.1);
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;

View File

@ -7,6 +7,9 @@
<view class="tishi" style="margin-top: 0;"> <view class="tishi" style="margin-top: 0;">
押金收费 押金收费
</view> </view>
<view class="wz">
押金套餐订单提前结束押金剩多少退还多少
</view>
<view class="" v-for="(item,index) in tclist" :key="index" @click="btnedit(item,1)"> <view class="" v-for="(item,index) in tclist" :key="index" @click="btnedit(item,1)">
<view class="item_list" v-if="item.mode == 1"> <view class="item_list" v-if="item.mode == 1">
<view class="shoufei"> <view class="shoufei">
@ -29,7 +32,7 @@
套餐收费 套餐收费
</view> </view>
<view class="wz"> <view class="wz">
订单提前结束剩余消费时长金额不返还 套餐订单提前结束剩余消费时长金额不返还
</view> </view>
<view class="item_list" v-for="(item,index) in modelist" :key="index" @click="btnedit(item,2)"> <view class="item_list" v-for="(item,index) in modelist" :key="index" @click="btnedit(item,2)">
<view class="shoufei"> <view class="shoufei">

View File

@ -232,7 +232,7 @@
}, },
// //
btnkdm(){ btnkdm(){
if(this.orderobj.userId != this.user.userId){ if(this.orderobj.userId == this.user.userId){
this.$u.get(`app/store/openGate/${this.orderobj.storeId}`).then(res => { this.$u.get(`app/store/openGate/${this.orderobj.storeId}`).then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
@ -249,7 +249,10 @@
} }
}) })
}else{ }else{
this.$u.get(`app/store/openGate/${this.orderobj.storeId}&isVerify=false`).then(res => { let data = {
isVerify:false
}
this.$u.get(`app/store/openGate/${this.orderobj.storeId}`,data).then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
title: '开启店门成功', title: '开启店门成功',

View File

@ -15,8 +15,6 @@
</view> </view>
<input type="text" class="ips" v-model="storeId" placeholder="请扫描设备上的二维码" style="margin-left: 32rpx;" <input type="text" class="ips" v-model="storeId" placeholder="请扫描设备上的二维码" style="margin-left: 32rpx;"
placeholder-class="my-placeholder"/> placeholder-class="my-placeholder"/>
<!-- <input type="text" class="ips" v-model="storeIds" v-if="storeIds" placeholder="请扫描设备上的二维码" style="margin-left: 32rpx;"
placeholder-class="my-placeholder" /> -->
</view> </view>
<view class="machao"> <view class="machao">
MAC号{{obj.mac == undefined ? '--' : obj.mac}} MAC号{{obj.mac == undefined ? '--' : obj.mac}}
@ -25,7 +23,7 @@
电压{{obj.voltage == undefined ? '--' : obj.voltage}}V 电压{{obj.voltage == undefined ? '--' : obj.voltage}}V
</view> </view>
<view class="machao"> <view class="machao">
功率{{obj.realTimePower == undefined ? '--' : obj.realTimePower}}KW 功率{{obj.realTimePower == undefined ? '--' : obj.realTimePower}}W
</view> </view>
<view class="machao"> <view class="machao">
电流{{obj.electricity == undefined ? '--' : obj.electricity}}A 电流{{obj.electricity == undefined ? '--' : obj.electricity}}A
@ -41,10 +39,14 @@
<view class="machao"> <view class="machao">
版本号{{obj.version == undefined ? '--' : obj.version}} 版本号{{obj.version == undefined ? '--' : obj.version}}
</view> </view>
<view class="machao">
最后更新时间{{obj.lastPullTime == undefined ? '--' : obj.lastPullTime}}
</view>
<view class="machao"> <view class="machao">
最后在线时间{{obj.lastOnlineTime == undefined ? '--' : obj.lastOnlineTime}} 最后在线时间{{obj.lastOnlineTime == undefined ? '--' : obj.lastOnlineTime}}
</view> </view>
<view class="jiaozhun"> <view class="jiaozhun">
<view class="input"> <view class="input">
<button @click="btnjian">-</button> <button @click="btnjian">-</button>
@ -57,6 +59,17 @@
</view> </view>
<view class="list"> <view class="list">
<view class="anniulist">
<view class="anniu" @click="btnkaim">
开门
</view>
<view class="anniu" @click="btncq">
重启
</view>
<view class="anniu" @click="btnsxs">
刷新
</view>
</view>
<view class="anniulist"> <view class="anniulist">
<view class="anniu" @click="btnkq"> <view class="anniu" @click="btnkq">
开启 开启
@ -65,7 +78,7 @@
关闭 关闭
</view> </view>
<view class="anniu" @click="btnsx"> <view class="anniu" @click="btnsx">
刷新 同步
</view> </view>
</view> </view>
<view class="fanhui" @click="btnfh"> <view class="fanhui" @click="btnfh">
@ -116,16 +129,93 @@
} }
}, },
methods: { methods: {
//
btnkaim(){
this.$u.put(`/app/device/admin/openDoor?sn=${this.storeId}`).then(res =>{
if(res.code == 200){
uni.showToast({
title: '开门成功',
icon: 'success',
duration:2000
})
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration:2000
})
}
})
},
//
btncq(){
this.$u.put(`/app/device/admin/reboot?sn=${this.storeId}`).then(res =>{
if(res.code == 200){
uni.showToast({
title: '重启成功',
icon: 'success',
duration:2000
})
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration:2000
})
}
})
},
//
btnsxs(){
this.$u.put(`/app/device/admin/uploadData?sn=${this.storeId}`).then(res =>{
if(res.code == 200){
console.log(res.data.vxs);
this.obj = res.data
this.id = res.data.deviceId
if(res.data.vxs == null || res.data.vxs == 0){
this.xshu = 1
}else{
this.xshu = res.data.vxs
}
if (res.data.onlineStatus == 0) {
this.onlineStatus = '离线'
} else if (res.data.onlineStatus == 1) {
this.onlineStatus = '在线'
}
if (res.data.powerStatus == 0) {
this.powerStatus = '关闭'
} else if (res.data.powerStatus == 1) {
this.powerStatus = '开启'
}
uni.showToast({
title: res.msg,
icon: 'success',
duration: 2000,
})
uni.hideLoading()
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration:2000
})
}
})
},
//
btnjian(){ btnjian(){
this.valuedian = Number(this.valuedian) - 1 this.valuedian = Number(this.valuedian) - 1
}, },
//
btnadd(){ btnadd(){
this.valuedian = Number(this.valuedian) + 1 this.valuedian = Number(this.valuedian) + 1
}, },
//
btnjiaozhun(){ btnjiaozhun(){
console.log(this.valuedian,this.obj.voltage,this.xshu );
this.x = this.valuedian / this.obj.voltage * this.xshu this.x = this.valuedian / this.obj.voltage * this.xshu
this.x = this.x.toFixed(3)
console.log(this.x) console.log(this.x)
this.x = this.x.toFixed(3)
this.$u.put(`/app/device/admin/${this.obj.deviceId}/vxs?vxs=${this.x}`).then(res => { this.$u.put(`/app/device/admin/${this.obj.deviceId}/vxs?vxs=${this.x}`).then(res => {
if(res.code == 200){ if(res.code == 200){
uni.showToast({ uni.showToast({
@ -142,12 +232,13 @@
} }
}) })
}, },
//
btnmy() { btnmy() {
uni.reLaunch({ uni.reLaunch({
url: '/page_user/luru' url: '/page_shanghu/index'
}) })
}, },
//
qrcode() { qrcode() {
uni.scanCode({ uni.scanCode({
onlyFromCamera: true, onlyFromCamera: true,
@ -160,7 +251,7 @@
} }
let sceneValue = res.result let sceneValue = res.result
let decodedValue = decodeURIComponent(sceneValue) let decodedValue = decodeURIComponent(sceneValue)
let id = getQueryParam(decodedValue, 'sn') let id = getQueryParam(decodedValue, 's')
this.storeId = id this.storeId = id
this.getsn() this.getsn()
}, },
@ -173,13 +264,13 @@
} }
}) })
}, },
//
getsn() { getsn() {
this.$u.get(`/app/device/admin/get?sn=${this.storeId}`).then(res => { this.$u.get(`/app/device/admin/get?sn=${this.storeId}`).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.obj = res.data this.obj = res.data
this.id = res.data.deviceId this.id = res.data.deviceId
if(res.data.vxs == null){ if(res.data.vxs == null || res.data.vxs == 0){
this.xshu = 1 this.xshu = 1
}else{ }else{
this.xshu = res.data.vxs this.xshu = res.data.vxs
@ -224,9 +315,6 @@
}) })
this.$u.put(`/app/device/admin/${this.id}/switch?open=true`).then((res) => { this.$u.put(`/app/device/admin/${this.id}/switch?open=true`).then((res) => {
if (res.code == 200) { if (res.code == 200) {
// setTimeout(()=>{
// this.btnsx()
// },1000)
uni.showToast({ uni.showToast({
title: '开启成功', title: '开启成功',
icon: 'success', icon: 'success',
@ -267,20 +355,19 @@
} }
}) })
}, },
// //
btnsx() { btnsx() {
this.$u.get(`/app/device/v2/refreshIot?sn=${this.storeId}`).then((res) => {
this.$u.get(`/app/device/v2/refreshIot?deviceNo=${this.storeId}`).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.getsn() this.getsn()
uni.showToast({ uni.showToast({
title: '刷新成功', title: '同步成功',
icon: 'success', icon: 'success',
duration: 2000 duration: 2000
}) })
} else { } else {
uni.showToast({ uni.showToast({
title: '刷新失败', title: '同步失败',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
@ -338,13 +425,12 @@
.anniulist { .anniulist {
width: 658rpx; width: 658rpx;
margin: auto; margin: auto;
margin-top: 200rpx; margin-top: 20rpx;
text-align: left; text-align: left;
font-size: 32rpx; font-size: 32rpx;
display: flex; display: flex;
justify-content: space-between;
.anniu { .anniu {
margin-right: 20rpx;
width: 30%; width: 30%;
height: 90rpx; height: 90rpx;
border-radius: 20rpx; border-radius: 20rpx;

View File

@ -270,8 +270,8 @@
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null; return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
} }
// storeCode roomCode // storeCode roomCode
let storeCode = getQueryParam(decodedValue, 'storeCode'); let storeCode = getQueryParam(decodedValue, 'd');
let roomCode = getQueryParam(decodedValue, 'roomCode'); let roomCode = getQueryParam(decodedValue, 'f');
if (storeCode) { if (storeCode) {
this.$u.get(`app/getId?storeCode=${storeCode}`).then(resp =>{ this.$u.get(`app/getId?storeCode=${storeCode}`).then(resp =>{
if(resp.code == 200){ if(resp.code == 200){

File diff suppressed because it is too large Load Diff

View File

@ -282,7 +282,7 @@
}else{ }else{
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'success', icon: 'none',
duration:2000 duration:2000
}) })
} }

Binary file not shown.

Before

(image error) Size: 2.7 KiB

Binary file not shown.

Before

(image error) Size: 2.6 KiB

Binary file not shown.

Before

(image error) Size: 2.8 KiB

Binary file not shown.

Before

(image error) Size: 3.2 KiB

Binary file not shown.

Before

(image error) Size: 160 KiB

Binary file not shown.

Before

(image error) Size: 1007 B

Binary file not shown.

Before

(image error) Size: 769 B