茶室
|
@ -29,7 +29,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { number } from 'echarts'
|
||||
// import { number } from 'echarts'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
|
@ -229,7 +229,7 @@
|
|||
let data = {
|
||||
ruleId:this.ruleId,
|
||||
mode:this.type,
|
||||
hours:1,
|
||||
hours:this.huor,
|
||||
price:this.price,
|
||||
minHours:this.mintime,
|
||||
explain:this.explain,
|
||||
|
@ -348,6 +348,9 @@
|
|||
padding-bottom: 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 30rpx;
|
||||
input{
|
||||
width: 85%;
|
||||
}
|
||||
}
|
||||
.del{
|
||||
position: absolute;
|
||||
|
|
|
@ -39,13 +39,13 @@
|
|||
onLoad(option) {
|
||||
if(option.roomId){ //房间and大厅
|
||||
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){ //大门-店铺
|
||||
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){ //厕所
|
||||
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)
|
||||
this.qrFun()
|
||||
|
|
|
@ -324,7 +324,7 @@
|
|||
}
|
||||
}
|
||||
width: 680rpx;
|
||||
height: 1260rpx;
|
||||
max-height: 1260rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(72,137,59,0.1);
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
<view class="tishi" style="margin-top: 0;">
|
||||
押金收费
|
||||
</view>
|
||||
<view class="wz">
|
||||
注:押金套餐订单提前结束、押金剩多少退还多少
|
||||
</view>
|
||||
<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="shoufei">
|
||||
|
@ -29,7 +32,7 @@
|
|||
套餐收费
|
||||
</view>
|
||||
<view class="wz">
|
||||
注:订单提前结束剩余消费时长、金额不返还
|
||||
注:套餐订单提前结束剩余消费时长、金额不返还
|
||||
</view>
|
||||
<view class="item_list" v-for="(item,index) in modelist" :key="index" @click="btnedit(item,2)">
|
||||
<view class="shoufei">
|
||||
|
|
|
@ -232,7 +232,7 @@
|
|||
},
|
||||
// 点击开店门
|
||||
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 => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
|
@ -249,7 +249,10 @@
|
|||
}
|
||||
})
|
||||
}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) {
|
||||
uni.showToast({
|
||||
title: '开启店门成功',
|
||||
|
|
|
@ -15,8 +15,6 @@
|
|||
</view>
|
||||
<input type="text" class="ips" v-model="storeId" placeholder="请扫描设备上的二维码" style="margin-left: 32rpx;"
|
||||
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 class="machao">
|
||||
MAC号:{{obj.mac == undefined ? '--' : obj.mac}}
|
||||
|
@ -25,7 +23,7 @@
|
|||
电压:{{obj.voltage == undefined ? '--' : obj.voltage}}V
|
||||
</view>
|
||||
<view class="machao">
|
||||
功率:{{obj.realTimePower == undefined ? '--' : obj.realTimePower}}KW
|
||||
功率:{{obj.realTimePower == undefined ? '--' : obj.realTimePower}}W
|
||||
</view>
|
||||
<view class="machao">
|
||||
电流:{{obj.electricity == undefined ? '--' : obj.electricity}}A
|
||||
|
@ -41,10 +39,14 @@
|
|||
<view class="machao">
|
||||
版本号:{{obj.version == undefined ? '--' : obj.version}}
|
||||
</view>
|
||||
<view class="machao">
|
||||
最后更新时间:{{obj.lastPullTime == undefined ? '--' : obj.lastPullTime}}
|
||||
</view>
|
||||
<view class="machao">
|
||||
最后在线时间:{{obj.lastOnlineTime == undefined ? '--' : obj.lastOnlineTime}}
|
||||
</view>
|
||||
|
||||
|
||||
<view class="jiaozhun">
|
||||
<view class="input">
|
||||
<button @click="btnjian">-</button>
|
||||
|
@ -57,6 +59,17 @@
|
|||
</view>
|
||||
|
||||
<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="anniu" @click="btnkq">
|
||||
开启
|
||||
|
@ -65,7 +78,7 @@
|
|||
关闭
|
||||
</view>
|
||||
<view class="anniu" @click="btnsx">
|
||||
刷新
|
||||
同步
|
||||
</view>
|
||||
</view>
|
||||
<view class="fanhui" @click="btnfh">
|
||||
|
@ -116,16 +129,93 @@
|
|||
}
|
||||
},
|
||||
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(){
|
||||
this.valuedian = Number(this.valuedian) - 1
|
||||
},
|
||||
// 点击加电压
|
||||
btnadd(){
|
||||
this.valuedian = Number(this.valuedian) + 1
|
||||
},
|
||||
// 点击校准电压
|
||||
btnjiaozhun(){
|
||||
console.log(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)
|
||||
this.x = this.x.toFixed(3)
|
||||
this.$u.put(`/app/device/admin/${this.obj.deviceId}/vxs?vxs=${this.x}`).then(res => {
|
||||
if(res.code == 200){
|
||||
uni.showToast({
|
||||
|
@ -142,12 +232,13 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 点击返回录入页
|
||||
btnmy() {
|
||||
uni.reLaunch({
|
||||
url: '/page_user/luru'
|
||||
url: '/page_shanghu/index'
|
||||
})
|
||||
},
|
||||
// 点击扫码
|
||||
qrcode() {
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
|
@ -160,7 +251,7 @@
|
|||
}
|
||||
let sceneValue = res.result
|
||||
let decodedValue = decodeURIComponent(sceneValue)
|
||||
let id = getQueryParam(decodedValue, 'sn')
|
||||
let id = getQueryParam(decodedValue, 's')
|
||||
this.storeId = id
|
||||
this.getsn()
|
||||
},
|
||||
|
@ -173,13 +264,13 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 请求设备详情
|
||||
getsn() {
|
||||
this.$u.get(`/app/device/admin/get?sn=${this.storeId}`).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.obj = res.data
|
||||
this.id = res.data.deviceId
|
||||
if(res.data.vxs == null){
|
||||
if(res.data.vxs == null || res.data.vxs == 0){
|
||||
this.xshu = 1
|
||||
}else{
|
||||
this.xshu = res.data.vxs
|
||||
|
@ -224,9 +315,6 @@
|
|||
})
|
||||
this.$u.put(`/app/device/admin/${this.id}/switch?open=true`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// setTimeout(()=>{
|
||||
// this.btnsx()
|
||||
// },1000)
|
||||
uni.showToast({
|
||||
title: '开启成功',
|
||||
icon: 'success',
|
||||
|
@ -267,20 +355,19 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
// 刷新
|
||||
// 同步
|
||||
btnsx() {
|
||||
|
||||
this.$u.get(`/app/device/v2/refreshIot?deviceNo=${this.storeId}`).then((res) => {
|
||||
this.$u.get(`/app/device/v2/refreshIot?sn=${this.storeId}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.getsn()
|
||||
uni.showToast({
|
||||
title: '刷新成功',
|
||||
title: '同步成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '刷新失败',
|
||||
title: '同步失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
|
@ -338,13 +425,12 @@
|
|||
.anniulist {
|
||||
width: 658rpx;
|
||||
margin: auto;
|
||||
margin-top: 200rpx;
|
||||
margin-top: 20rpx;
|
||||
text-align: left;
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.anniu {
|
||||
margin-right: 20rpx;
|
||||
width: 30%;
|
||||
height: 90rpx;
|
||||
border-radius: 20rpx;
|
||||
|
|
|
@ -270,8 +270,8 @@
|
|||
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
|
||||
}
|
||||
// 判断是 storeCode 还是 roomCode
|
||||
let storeCode = getQueryParam(decodedValue, 'storeCode');
|
||||
let roomCode = getQueryParam(decodedValue, 'roomCode');
|
||||
let storeCode = getQueryParam(decodedValue, 'd');
|
||||
let roomCode = getQueryParam(decodedValue, 'f');
|
||||
if (storeCode) {
|
||||
this.$u.get(`app/getId?storeCode=${storeCode}`).then(resp =>{
|
||||
if(resp.code == 200){
|
||||
|
|
|
@ -282,7 +282,7 @@
|
|||
}else{
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'success',
|
||||
icon: 'none',
|
||||
duration:2000
|
||||
})
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 160 KiB |
Before Width: | Height: | Size: 1007 B |
Before Width: | Height: | Size: 769 B |