2024-12-20 09:02:40 +08:00
|
|
|
|
<template>
|
|
|
|
|
<view class="page">
|
|
|
|
|
<u-navbar :is-back="false" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36'
|
|
|
|
|
height='8'></u-navbar>
|
2025-02-20 14:34:21 +08:00
|
|
|
|
<image src="https://api.ccttiot.com/smartmeter/img/static/u3lZnmhqSqkMd7gHKtMD" mode="" class="imgbj"></image>
|
2025-02-15 14:15:09 +08:00
|
|
|
|
<view class="title">
|
|
|
|
|
<text v-if="userType != 00" @click="btnshanghu">商户中心</text>
|
2024-12-20 09:02:40 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="serchshop">
|
|
|
|
|
<view class="dingwei" @click="btnweizhi">
|
2025-02-20 14:34:21 +08:00
|
|
|
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uSDeC51wazjnZ9cFQx6l" mode="" class="dwimg">
|
|
|
|
|
</image>
|
2024-12-20 09:02:40 +08:00
|
|
|
|
{{tit}}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
<image src="https://api.ccttiot.com/smartmeter/img/static/u0FZH7ZLG168c7W0FUMk" mode="" class="xlimg">
|
|
|
|
|
</image>
|
2024-12-20 09:02:40 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="search">
|
2025-02-20 14:34:21 +08:00
|
|
|
|
<input type="text" v-model="sousuovalue" @confirm="confirm" placeholder="搜索门店" />
|
2024-12-20 09:02:40 +08:00
|
|
|
|
<u-icon name="search"></u-icon>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2025-01-02 18:04:30 +08:00
|
|
|
|
<view class="" style="margin-top: 48rpx;">
|
|
|
|
|
<view class="tabqh">
|
2025-03-05 17:42:13 +08:00
|
|
|
|
<view @click="btntabindex(0)" :class="tabindex == 0 ? 'activetab' : ''">
|
|
|
|
|
<text>全部</text>
|
|
|
|
|
<image v-if="tabindex == 0" src="https://api.ccttiot.com/smartmeter/img/static/uHFOqckZJiCEP9JOtMvj"
|
2025-02-20 14:34:21 +08:00
|
|
|
|
mode=""></image>
|
2024-12-20 09:02:40 +08:00
|
|
|
|
</view>
|
2025-01-02 18:04:30 +08:00
|
|
|
|
<view @click="btntabindex(2)" :class="tabindex == 2 ? 'activetab' : ''">
|
|
|
|
|
<text>棋牌</text>
|
2025-02-20 14:34:21 +08:00
|
|
|
|
<image v-if="tabindex == 2" src="https://api.ccttiot.com/smartmeter/img/static/uQ6c41aBHWUOD02aK9WQ"
|
|
|
|
|
mode=""></image>
|
2025-01-02 18:04:30 +08:00
|
|
|
|
</view>
|
2025-03-05 17:42:13 +08:00
|
|
|
|
<view @click="btntabindex(1)" :class="tabindex == 1 ? 'activetab' : ''">
|
|
|
|
|
<text>茶室</text>
|
|
|
|
|
<image v-if="tabindex == 1" src="https://api.ccttiot.com/smartmeter/img/static/uQ6c41aBHWUOD02aK9WQ"
|
|
|
|
|
mode=""></image>
|
|
|
|
|
</view>
|
2025-01-02 18:04:30 +08:00
|
|
|
|
<view @click="btntabindex(3)" style="width: 34%;" :class="tabindex == 3 ? 'activetab' : ''">
|
|
|
|
|
<text>台球</text>
|
2025-02-20 14:34:21 +08:00
|
|
|
|
<image v-if="tabindex == 3" style="transform: rotateY(180deg)"
|
2025-03-05 17:42:13 +08:00
|
|
|
|
src="https://api.ccttiot.com/smartmeter/img/static/uQ6c41aBHWUOD02aK9WQ" mode=""></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view @click="btntabindex(4)" :class="tabindex == 4? 'activetab' : ''">
|
|
|
|
|
<text>其他</text>
|
|
|
|
|
<image v-if="tabindex == 4" src="https://api.ccttiot.com/smartmeter/img/static/uHFOqckZJiCEP9JOtMvj"
|
|
|
|
|
mode=""></image>
|
2025-01-02 18:04:30 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2025-02-20 14:34:21 +08:00
|
|
|
|
<view class="shoplist" @touchstart="onTouchStart" @touchend="onTouchEnd" @touchcancel="onTouchCancel">
|
|
|
|
|
<view class="shop_item" v-for="(item,index) in listshop" :key="index"
|
|
|
|
|
@click="btndetail(item.storeId,item)">
|
2025-01-02 18:04:30 +08:00
|
|
|
|
<view class="lt">
|
2025-01-21 17:13:46 +08:00
|
|
|
|
<image :src="item.pictures[0]" mode="aspectFill"></image>
|
2024-12-30 18:02:38 +08:00
|
|
|
|
</view>
|
2025-01-02 18:04:30 +08:00
|
|
|
|
<view class="rt">
|
|
|
|
|
<view class="name">
|
|
|
|
|
{{item.name == undefined ? '--' : item.name}}
|
2024-12-20 09:02:40 +08:00
|
|
|
|
</view>
|
2025-01-02 18:04:30 +08:00
|
|
|
|
<view class="dizhi">
|
2025-02-12 17:59:03 +08:00
|
|
|
|
{{item.address.length > 13 ? item.address.slice(0,13) + '...' : item.address}}
|
2025-01-02 18:04:30 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="storebq">
|
2025-02-20 14:34:21 +08:00
|
|
|
|
<image v-if="item.typeTags && item.typeTags.some(tag => tag == 1)"
|
|
|
|
|
src="https://api.ccttiot.com/smartmeter/img/static/u7ilmXTNlXUbbvfSgOa1" mode="">
|
|
|
|
|
</image>
|
|
|
|
|
<image v-if="item.typeTags && item.typeTags.some(tag => tag == 2)"
|
|
|
|
|
src="https://api.ccttiot.com/smartmeter/img/static/umA2EUZkovZEA0hCLmP3" mode="">
|
|
|
|
|
</image>
|
|
|
|
|
<image v-if="item.typeTags && item.typeTags.some(tag => tag == 3)"
|
|
|
|
|
src="https://api.ccttiot.com/smartmeter/img/static/uPjeCCnwjiJlCNqURltX" mode="">
|
|
|
|
|
</image>
|
2025-03-05 17:42:13 +08:00
|
|
|
|
<image v-if="item.typeTags && item.typeTags.some(tag => tag == 4)"
|
|
|
|
|
src="https://api.ccttiot.com/smartmeter/img/static/uvbY7v6slwyqVghulsZW" mode="">
|
|
|
|
|
</image>
|
2025-01-02 18:04:30 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="juli">
|
|
|
|
|
<view class="kmjuli">
|
|
|
|
|
距我{{item.distance == undefined ? '--' : item.distance}}km
|
|
|
|
|
</view>
|
|
|
|
|
<view class="juliimg">
|
2025-02-20 14:34:21 +08:00
|
|
|
|
<image @click.stop="btndaohang(item.lng,item.lat,item.name,item.address)"
|
|
|
|
|
src="https://api.ccttiot.com/smartmeter/img/static/ufhdTzq4mHUlHgCKgI5Y" mode="">
|
|
|
|
|
</image>
|
|
|
|
|
<image @click.stop="btntel(item.serverPhone)"
|
|
|
|
|
src="https://api.ccttiot.com/smartmeter/img/static/uOxtHZOxGREoFVXEv73f" mode="">
|
|
|
|
|
</image>
|
2025-01-02 18:04:30 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="yuding">
|
2025-02-20 14:34:21 +08:00
|
|
|
|
<image src="https://api.ccttiot.com/smartmeter/img/static/u7zHXOY1SGwic7jQESUR" mode=""
|
|
|
|
|
class="one"></image>
|
2025-01-02 18:04:30 +08:00
|
|
|
|
预定包间
|
2025-02-20 14:34:21 +08:00
|
|
|
|
<image src="https://api.ccttiot.com/smartmeter/img/static/urIGUWi7cHWqp9qem3Ag" mode=""
|
|
|
|
|
class="two"></image>
|
2024-12-20 09:02:40 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2025-02-15 16:46:08 +08:00
|
|
|
|
<view class="" style="width: 100%;text-align: center;margin-top: 40rpx;font-size: 34rpx;color: #ccc;">
|
2025-01-02 18:04:30 +08:00
|
|
|
|
没有更多门店啦,敬请期待吧...
|
|
|
|
|
</view>
|
2024-12-20 09:02:40 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2025-02-15 16:46:08 +08:00
|
|
|
|
<view class="jiameng" v-if="guangaoflag" @click="btnjiameng">
|
|
|
|
|
<view class="gb" @click.stop="guangaoflag = false">
|
|
|
|
|
关闭 <text>×</text>
|
|
|
|
|
</view>
|
2024-12-30 18:02:38 +08:00
|
|
|
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uuoqWaq7HnXBteQayaz4" mode=""></image>
|
2024-12-20 09:02:40 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="xuanfu" v-if="imgflag">
|
2025-02-20 14:34:21 +08:00
|
|
|
|
<image @click="btnopen(1)" src="https://api.ccttiot.com/smartmeter/img/static/uKeCHdot1z4QJldDe3UL" mode="">
|
|
|
|
|
</image>
|
|
|
|
|
<image @click="btnopen(2)" src="https://api.ccttiot.com/smartmeter/img/static/u4lmGbm77OWC2Uik2737" mode="">
|
|
|
|
|
</image>
|
|
|
|
|
<image @click="btnopen(3)" src="https://api.ccttiot.com/smartmeter/img/static/uUjamKC7Kvd9KMLLOeBD" mode="">
|
|
|
|
|
</image>
|
2025-03-05 17:42:13 +08:00
|
|
|
|
<image @click="btnopen(6)" src="https://api.ccttiot.com/smartmeter/img/static/un3Pb0hkKl0Nu9SnaW3W" mode="">
|
2025-02-20 14:34:21 +08:00
|
|
|
|
</image>
|
2025-03-05 17:42:13 +08:00
|
|
|
|
<image @click="btnopen(4)" src="https://api.ccttiot.com/smartmeter/img/static/uh58EYwwWo92FYNe19Yx" mode="">
|
2025-02-20 14:34:21 +08:00
|
|
|
|
</image>
|
|
|
|
|
<image @click="btnopen(5)" src="https://api.ccttiot.com/smartmeter/img/static/uONMVGcplNBtVnjlHaeh" mode="">
|
|
|
|
|
</image>
|
2024-12-20 09:02:40 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="xuanfus" v-else>
|
2025-02-20 14:34:21 +08:00
|
|
|
|
<image @click="btnopen(1)" src="https://api.ccttiot.com/smartmeter/img/static/uKeCHdot1z4QJldDe3UL" mode="">
|
|
|
|
|
</image>
|
|
|
|
|
<image @click="btnopen(2)" src="https://api.ccttiot.com/smartmeter/img/static/u4lmGbm77OWC2Uik2737" mode="">
|
|
|
|
|
</image>
|
2025-03-05 17:42:13 +08:00
|
|
|
|
<image @click="btnopen(6)" src="https://api.ccttiot.com/smartmeter/img/static/un3Pb0hkKl0Nu9SnaW3W" mode="">
|
2025-02-20 14:34:21 +08:00
|
|
|
|
</image>
|
|
|
|
|
<image @click="btnopen(3)" src="https://api.ccttiot.com/smartmeter/img/static/uUjamKC7Kvd9KMLLOeBD" mode="">
|
|
|
|
|
</image>
|
2025-03-05 17:42:13 +08:00
|
|
|
|
<image @click="btnopen(4)" src="https://api.ccttiot.com/smartmeter/img/static/uh58EYwwWo92FYNe19Yx" mode="">
|
2025-02-20 14:34:21 +08:00
|
|
|
|
</image>
|
|
|
|
|
<image @click="btnopen(5)" src="https://api.ccttiot.com/smartmeter/img/static/uONMVGcplNBtVnjlHaeh" mode="">
|
|
|
|
|
</image>
|
2024-12-20 09:02:40 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="karaokeroom" v-if="jinxinflag">
|
|
|
|
|
<view class="top">
|
|
|
|
|
正在进行中的订单
|
|
|
|
|
</view>
|
|
|
|
|
<view class="roomlist">
|
2025-02-20 14:34:21 +08:00
|
|
|
|
<view class="room_item" v-for="(item,index) in jinxinglist" :key="index"
|
|
|
|
|
:id="mdindex == index ? 'active' : ''" @click="btnmd(index,item)">
|
|
|
|
|
<view class="lt">
|
|
|
|
|
<image :src="item.picture" mode=""></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="rt" style="font-size: 22rpx;">
|
|
|
|
|
<view class="">
|
|
|
|
|
<text>预约门店:</text> <text>{{item.storeName == null ? '--' : item.storeName}}</text>
|
|
|
|
|
</view>
|
2024-12-20 09:02:40 +08:00
|
|
|
|
<view class="">
|
|
|
|
|
<text>预约包厢:</text> <text>{{item.roomName == null ? '--' : item.roomName}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="">
|
2025-02-20 14:34:21 +08:00
|
|
|
|
<text>开始时间:</text>
|
|
|
|
|
<text>{{item.reserveStartTime == null ? '--' : item.reserveStartTime}}</text>
|
2024-12-20 09:02:40 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="">
|
|
|
|
|
<text>结束时间:</text> <text>{{item.reserveEndTime == null ? '--' : item.reserveEndTime}}</text>
|
|
|
|
|
</view>
|
2025-02-20 14:34:21 +08:00
|
|
|
|
</view>
|
2024-12-20 09:02:40 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="anniu" @click="btnanniu">
|
|
|
|
|
{{jinxintxt}}
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2025-02-20 14:34:21 +08:00
|
|
|
|
<image v-if="jinxinflag" @click="jinxinflag = false" class="jinxinx"
|
|
|
|
|
src="https://api.ccttiot.com/smartmeter/img/static/uH5fAInJQYhf3wlXkuYI" mode=""></image>
|
2024-12-20 09:02:40 +08:00
|
|
|
|
<view class="mask" v-if="jinxinflag"></view>
|
2025-02-15 14:15:09 +08:00
|
|
|
|
<!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 -->
|
|
|
|
|
<view class="cesuoul" v-if="cesuoflag">
|
|
|
|
|
<view class="cesuoli" v-for="(item,index) in cesuolist" :key="index">
|
|
|
|
|
<view class="caocuo">
|
|
|
|
|
<view class="name">
|
|
|
|
|
{{item.name}}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="kaiguan" @click="btncs(item)">
|
|
|
|
|
开门
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="anniuqx" @click="cesuoflag = false">
|
|
|
|
|
取消
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="mask" v-if="cesuoflag"></view>
|
2025-03-05 17:42:13 +08:00
|
|
|
|
<view class="lxlanya" v-if="lanyaflag">
|
|
|
|
|
<view class="lxtit">
|
|
|
|
|
蓝牙控制开关
|
|
|
|
|
</view>
|
|
|
|
|
<view class="cha" @click.stop="btncha">
|
|
|
|
|
×
|
|
|
|
|
</view>
|
|
|
|
|
<view class="lxzt">
|
|
|
|
|
<view v-if="ver_dataflag == 1" style="color: red;">
|
|
|
|
|
<image src="https://api.ccttiot.com/smartmeter/img/static/u6akzRBuxxP94XlUcMtV" mode=""></image>
|
|
|
|
|
<text>未连接</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="ver_dataflag == 2" style="color: #ccc;">
|
|
|
|
|
<image src="https://api.ccttiot.com/smartmeter/img/static/u6akzRBuxxP94XlUcMtV" mode=""></image>
|
|
|
|
|
<text>连接中</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="ver_dataflag == 3" style="color: #48893B;">
|
|
|
|
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uU0nfPcXVEhbEsvECEQg" mode=""></image>
|
|
|
|
|
<text>已连接</text>
|
|
|
|
|
</view>
|
2025-03-12 17:06:06 +08:00
|
|
|
|
</view>
|
2025-03-05 17:42:13 +08:00
|
|
|
|
<view class="kongzhi">
|
|
|
|
|
<!-- <view class="lxkai" @click.stop="btngb">
|
|
|
|
|
关闭
|
|
|
|
|
</view> -->
|
|
|
|
|
<view class="lxkai" @click.stop="btnkq">
|
|
|
|
|
开启
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="mask" v-if="lanyaflag"></view>
|
2024-12-20 09:02:40 +08:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
2025-03-05 17:42:13 +08:00
|
|
|
|
var xBlufi = require("@/components/blufi/xBlufi.js");
|
2024-12-20 09:02:40 +08:00
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2025-02-20 14:34:21 +08:00
|
|
|
|
guangaoflag: true,
|
|
|
|
|
jinxintxt: '开包厢',
|
|
|
|
|
imgflag: true,
|
|
|
|
|
longitude: '',
|
|
|
|
|
latitude: '',
|
|
|
|
|
tit: '',
|
|
|
|
|
listshop: [],
|
|
|
|
|
cityid: '',
|
|
|
|
|
pagesum: 1,
|
|
|
|
|
pagesize: 10,
|
|
|
|
|
touchStartX: 0, // 触屏起始点x
|
|
|
|
|
touchStartY: 0, // 触屏起始点y
|
|
|
|
|
xiaflag: true,
|
|
|
|
|
total: '',
|
|
|
|
|
qingqiuflag: true,
|
|
|
|
|
jinxinglist: [],
|
|
|
|
|
mdindex: -1,
|
|
|
|
|
viewType: '',
|
|
|
|
|
jinxinflag: false,
|
|
|
|
|
sousuovalue: '',
|
2025-03-05 17:42:13 +08:00
|
|
|
|
tabindex: 0,
|
|
|
|
|
type: 0,
|
2025-02-20 14:34:21 +08:00
|
|
|
|
userType: '00',
|
|
|
|
|
cesuolist: [],
|
|
|
|
|
cesuoflag: false,
|
|
|
|
|
csindex: -1,
|
2025-03-05 17:42:13 +08:00
|
|
|
|
ver_dataflag:2,
|
|
|
|
|
devicesarr:[],
|
|
|
|
|
deviceIds:'',
|
|
|
|
|
name:'',
|
|
|
|
|
deviceId:'',
|
|
|
|
|
lanyaflag:false,
|
|
|
|
|
lanyamac:'',
|
|
|
|
|
lanyaobj:{}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 分享到好友(会话)
|
|
|
|
|
onShareAppMessage: function() {
|
|
|
|
|
return {
|
|
|
|
|
title: '共享时光屋',
|
|
|
|
|
path: '/pages/nearbystores/index'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 分享到朋友圈
|
|
|
|
|
onShareTimeline: function() {
|
|
|
|
|
return {
|
|
|
|
|
title: '共享时光屋',
|
|
|
|
|
query: '',
|
|
|
|
|
path: '/pages/nearbystores/index'
|
2024-12-20 09:02:40 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad(option) {
|
2025-03-05 17:42:13 +08:00
|
|
|
|
wx.openBluetoothAdapter({
|
|
|
|
|
success: function (res) {
|
|
|
|
|
console.log('蓝牙适配器初始化成功')
|
|
|
|
|
xBlufi.initXBlufi(1)
|
|
|
|
|
},
|
|
|
|
|
fail: function (err) {
|
|
|
|
|
console.error('蓝牙适配器初始化失败,可能是因为没有权限', err)
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-02-20 14:34:21 +08:00
|
|
|
|
if (option.cityId) {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
this.cityid = option.cityId
|
|
|
|
|
this.tit = option.cityName
|
|
|
|
|
this.longitude = ''
|
|
|
|
|
this.latitude = ''
|
|
|
|
|
this.getweizhi()
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
this.getweizhi()
|
|
|
|
|
}
|
2025-03-05 17:42:13 +08:00
|
|
|
|
if(option.q){
|
|
|
|
|
function getQueryParam(url, paramName) {
|
|
|
|
|
let regex = new RegExp(`[?&]${paramName}=([^&]*)`)
|
|
|
|
|
let results = regex.exec(url);
|
|
|
|
|
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null
|
|
|
|
|
}
|
|
|
|
|
let sceneValue = option.q
|
|
|
|
|
let decodedValue = decodeURIComponent(sceneValue)
|
|
|
|
|
let id = getQueryParam(decodedValue, 'sn')
|
|
|
|
|
console.log(id);
|
|
|
|
|
let that = this
|
|
|
|
|
let data = {
|
|
|
|
|
sn: id,
|
|
|
|
|
}
|
|
|
|
|
that.$u.get(`/app/device/isBind?deviceNo=${id}`).then(res => {
|
|
|
|
|
if (res.data == 2) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '该设备已被绑定',
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
} else if (res.data == 1) {
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: '该设备未绑定,你需进行绑定吗?',
|
|
|
|
|
success: function(res) {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
that.$u.put("/app/device/bind", data).then(res => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '绑定成功',
|
|
|
|
|
icon: 'success',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
that.userType = '01'
|
|
|
|
|
}else{
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res.msg,
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else if (res.data == 0) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '该设备为录入,请先录入',
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
this.getinfo()
|
2024-12-20 09:02:40 +08:00
|
|
|
|
this.getorder()
|
|
|
|
|
},
|
2025-02-15 16:46:08 +08:00
|
|
|
|
onShow() {
|
|
|
|
|
this.guangaoflag = true
|
2025-03-05 17:42:13 +08:00
|
|
|
|
xBlufi.notifyStartDiscoverBle({'isStart': true})
|
|
|
|
|
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
2025-02-15 16:46:08 +08:00
|
|
|
|
},
|
2024-12-20 09:02:40 +08:00
|
|
|
|
methods: {
|
2025-03-05 17:42:13 +08:00
|
|
|
|
// 蓝牙开启
|
|
|
|
|
btnkq(){
|
|
|
|
|
if(this.lanyaobj.gateUnlockMode == 1){
|
|
|
|
|
xBlufi.notifySendCustomData({
|
|
|
|
|
customData: '11km' + this.lanyaobj.gateUnlockTime + '@'
|
|
|
|
|
})
|
|
|
|
|
let data = {
|
|
|
|
|
mac:this.lanyamac,
|
|
|
|
|
reason:'正常开门',
|
|
|
|
|
command:'11km' + this.lanyaobj.gateUnlockTime + '@',
|
|
|
|
|
result:true
|
|
|
|
|
}
|
|
|
|
|
this.$u.post(`/app/commandLog/bluetooth`,data).then(res => {})
|
|
|
|
|
}else if(this.lanyaobj.gateUnlockMode == 2){
|
|
|
|
|
xBlufi.notifySendCustomData({
|
|
|
|
|
customData: '11gm' + this.lanyaobj.gateUnlockTime + '@'
|
|
|
|
|
})
|
|
|
|
|
let data = {
|
|
|
|
|
mac:this.lanyamac,
|
|
|
|
|
reason:'反向开门',
|
|
|
|
|
command:'11gm' + this.lanyaobj.gateUnlockTime + '@',
|
|
|
|
|
result:true
|
|
|
|
|
}
|
|
|
|
|
this.$u.post(`/app/commandLog/bluetooth`,data).then(res => {})
|
|
|
|
|
}else if(this.lanyaobj.unlockMode == 1){
|
|
|
|
|
xBlufi.notifySendCustomData({
|
|
|
|
|
customData: '11km' + this.lanyaobj.unlockTime + '@'
|
|
|
|
|
})
|
|
|
|
|
let data = {
|
|
|
|
|
mac:this.lanyamac,
|
|
|
|
|
reason:'正常开门',
|
|
|
|
|
command:'11km' + this.lanyaobj.unlockTime + '@',
|
|
|
|
|
result:true
|
|
|
|
|
}
|
|
|
|
|
this.$u.post(`/app/commandLog/bluetooth`,data).then(res => {})
|
|
|
|
|
}else{
|
|
|
|
|
xBlufi.notifySendCustomData({
|
|
|
|
|
customData: '11gm' + this.lanyaobj.unlockTime + '@'
|
|
|
|
|
})
|
|
|
|
|
let data = {
|
|
|
|
|
mac:this.lanyamac,
|
|
|
|
|
reason:'反向开门',
|
|
|
|
|
command:'11gm' + this.lanyaobj.unlockTime + '@',
|
|
|
|
|
result:true
|
|
|
|
|
}
|
|
|
|
|
this.$u.post(`/app/commandLog/bluetooth`,data).then(res => {})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 蓝牙关闭
|
|
|
|
|
btngb(){
|
|
|
|
|
xBlufi.notifySendCustomData({
|
|
|
|
|
customData: '11close'
|
|
|
|
|
})
|
|
|
|
|
let data = {
|
|
|
|
|
mac:this.lanyamac,
|
|
|
|
|
reason:'关闭',
|
|
|
|
|
command:'11close',
|
|
|
|
|
result:true
|
|
|
|
|
}
|
|
|
|
|
this.$u.post(`/app/commandLog/bluetooth`,data).then(res => {})
|
|
|
|
|
},
|
|
|
|
|
// 点击蓝牙弹出隐藏
|
|
|
|
|
btncha(){
|
|
|
|
|
this.lanyaflag = false
|
|
|
|
|
this.ver_dataflag = 2
|
|
|
|
|
xBlufi.notifyConnectBle({
|
|
|
|
|
isStart: false,
|
|
|
|
|
deviceId: this.deviceId,
|
|
|
|
|
name: this.name
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 连接蓝牙函数
|
|
|
|
|
getlanya() {
|
|
|
|
|
if (this.ver_dataflag != 3) {
|
|
|
|
|
this.ver_dataflag = 2
|
|
|
|
|
let that = this
|
|
|
|
|
if (that.deviceId != '') {
|
|
|
|
|
let systemInfo = uni.getSystemInfoSync()
|
|
|
|
|
if (systemInfo.platform == 'android') {
|
|
|
|
|
that.lanyaflag = true
|
|
|
|
|
that.deviceId = that.deviceId.match(/.{2}/g).reverse().join(':')
|
|
|
|
|
xBlufi.notifyStartDiscoverBle({
|
|
|
|
|
'isStart': false
|
|
|
|
|
})
|
|
|
|
|
console.log("进入蓝牙连接", that.deviceId)
|
|
|
|
|
console.log("进入that.name", that.name)
|
|
|
|
|
xBlufi.notifyConnectBle({
|
|
|
|
|
isStart: true,
|
|
|
|
|
deviceId: that.deviceId,
|
|
|
|
|
name: that.name
|
|
|
|
|
})
|
|
|
|
|
} else if (systemInfo.platform == 'ios') {
|
|
|
|
|
// 当前设备是 iOS
|
|
|
|
|
that.lanyaflag = true
|
|
|
|
|
that.findDevice()
|
|
|
|
|
}else{
|
|
|
|
|
// that.lanyaflag = true
|
|
|
|
|
console.log('其他');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
findDevice() {
|
|
|
|
|
const matchedDevice = this.devicesarr.find(device => {
|
|
|
|
|
console.log(device.name, '111')
|
|
|
|
|
console.log("IOSMAC", device)
|
|
|
|
|
return device.name.slice(-12) == this.deviceId.slice(-12)
|
|
|
|
|
})
|
|
|
|
|
if (matchedDevice) {
|
|
|
|
|
xBlufi.notifyStartDiscoverBle({
|
|
|
|
|
'isStart': false
|
|
|
|
|
})
|
|
|
|
|
xBlufi.notifyConnectBle({
|
|
|
|
|
isStart: true,
|
|
|
|
|
deviceId: matchedDevice.deviceId,
|
|
|
|
|
name: matchedDevice.name
|
|
|
|
|
})
|
|
|
|
|
this.deviceId = matchedDevice.deviceId
|
|
|
|
|
this.name = matchedDevice.name
|
|
|
|
|
console.log(this.deviceId, '11221')
|
|
|
|
|
} else {
|
|
|
|
|
console.log("未找到匹配的设备,继续查找...")
|
|
|
|
|
setTimeout(this.findDevice.bind(this), 1000) // 使用 bind 保持 this 上下文
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 获取附近蓝牙设备列表
|
|
|
|
|
funListenDeviceMsgEvent: function (options) {
|
|
|
|
|
switch (options.type) {
|
|
|
|
|
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS:
|
|
|
|
|
if (options.result) {
|
|
|
|
|
this.devicesarr = options.data
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case xBlufi.XBLUFI_TYPE.TYPE_CONNECTED:
|
|
|
|
|
console.log("连接回调:" + JSON.stringify(options))
|
|
|
|
|
if (options.result == true) {
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
this.ver_dataflag = 3
|
|
|
|
|
},2000)
|
|
|
|
|
xBlufi.notifyInitBleEsp32({
|
|
|
|
|
deviceId: this.deviceId
|
|
|
|
|
})
|
|
|
|
|
this.deviceIds = options.data.deviceId
|
|
|
|
|
this.name = this.name
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA:
|
|
|
|
|
this.ver_dataflag = 3
|
|
|
|
|
console.log("1收到设备发来的自定义数据结果:", options.data)
|
|
|
|
|
break;
|
|
|
|
|
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
|
|
|
|
|
if (!options.result) {
|
|
|
|
|
console.log('蓝牙未开启')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-12-30 18:02:38 +08:00
|
|
|
|
// 点击切换门店类型
|
2025-02-20 14:34:21 +08:00
|
|
|
|
btntabindex(num) {
|
2024-12-30 18:02:38 +08:00
|
|
|
|
this.tabindex = num
|
2024-12-31 18:01:36 +08:00
|
|
|
|
this.type = num
|
|
|
|
|
this.pagesum = 1
|
|
|
|
|
this.listshop = []
|
|
|
|
|
this.getshop()
|
2024-12-30 18:02:38 +08:00
|
|
|
|
},
|
2024-12-20 09:02:40 +08:00
|
|
|
|
// 点击跳转到商户中心
|
2025-02-20 14:34:21 +08:00
|
|
|
|
btnshanghu() {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
uni.navigateTo({
|
2025-02-20 14:34:21 +08:00
|
|
|
|
url: '/page_shanghu/index'
|
2024-12-20 09:02:40 +08:00
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 点击选择开包厢
|
2025-02-20 14:34:21 +08:00
|
|
|
|
btnmd(index, item) {
|
2025-03-05 17:42:13 +08:00
|
|
|
|
this.lanyaobj = item
|
2025-02-15 14:15:09 +08:00
|
|
|
|
this.viewType = item.reType
|
2024-12-20 09:02:40 +08:00
|
|
|
|
this.mdindex = index
|
|
|
|
|
},
|
|
|
|
|
// 请求正在进行中的订单
|
2025-02-20 14:34:21 +08:00
|
|
|
|
getorder() {
|
|
|
|
|
this.$u.get(`/app/order/getInProgressOrderList`).then(res => {
|
|
|
|
|
if (res.code == 200) {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
this.jinxinglist = res.data
|
2025-03-05 17:42:13 +08:00
|
|
|
|
this.lanyaobj = res.data[0]
|
2024-12-20 09:02:40 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 点击进行导航
|
2025-02-20 14:34:21 +08:00
|
|
|
|
btndaohang(lng, lat, name, addres) {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
uni.openLocation({
|
2025-02-20 14:34:21 +08:00
|
|
|
|
latitude: lat, //纬度-目的地/坐标点
|
|
|
|
|
longitude: lng, //经度-目的地/坐标点
|
|
|
|
|
name: name, //地点名称
|
|
|
|
|
address: addres //详细地点名称
|
2024-12-20 09:02:40 +08:00
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 点击拨打电话
|
2025-02-20 14:34:21 +08:00
|
|
|
|
btntel(serverPhone) {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
uni.makePhoneCall({
|
|
|
|
|
phoneNumber: serverPhone,
|
|
|
|
|
success: function(res) {
|
|
|
|
|
console.log('拨打电话成功', res)
|
|
|
|
|
},
|
|
|
|
|
fail: function(err) {
|
|
|
|
|
console.error('拨打电话失败', err)
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '取消拨打电话',
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 选择订单后进行操作
|
2025-02-20 14:34:21 +08:00
|
|
|
|
btnanniu() {
|
|
|
|
|
if (this.jinxintxt == '开店门') {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
let storeId = this.jinxinglist[this.mdindex].storeId
|
2025-02-20 14:34:21 +08:00
|
|
|
|
console.log(this.jinxinglist[this.mdindex], this.mdindex);
|
2024-12-20 09:02:40 +08:00
|
|
|
|
this.$u.get(`app/store/openGate/${storeId}`).then(res => {
|
2025-02-20 14:34:21 +08:00
|
|
|
|
if (res.code == 200) {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
this.jinxinflag = false
|
2024-12-31 18:01:36 +08:00
|
|
|
|
this.mdindex = -1
|
2024-12-20 09:02:40 +08:00
|
|
|
|
uni.showToast({
|
2025-02-20 14:34:21 +08:00
|
|
|
|
title: '开启店门成功',
|
|
|
|
|
icon: 'success',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
2025-03-05 17:42:13 +08:00
|
|
|
|
} else if(res.code == 501){
|
|
|
|
|
this.jinxinflag = false
|
|
|
|
|
this.mdindex = -1
|
|
|
|
|
this.deviceId = res.msg
|
|
|
|
|
this.lanyamac = res.msg
|
|
|
|
|
this.getlanya()
|
|
|
|
|
}else{
|
2024-12-31 18:01:36 +08:00
|
|
|
|
this.mdindex = -1
|
2024-12-20 09:02:40 +08:00
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res.msg,
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else if (this.jinxintxt == '开包厢') {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
let roomId = this.jinxinglist[this.mdindex].roomId
|
2025-03-12 17:06:06 +08:00
|
|
|
|
this.$u.post(`/app/device/adminAll/${roomId}/switch?open=true&orderNo=${this.jinxinglist[this.mdindex].orderNo}`).then(res => {
|
2025-02-20 14:34:21 +08:00
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.jinxinflag = false
|
|
|
|
|
this.mdindex = -1
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '开启包厢门成功',
|
|
|
|
|
icon: 'success',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.mdindex = -1
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res.msg,
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-12-20 09:02:40 +08:00
|
|
|
|
})
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else if (this.jinxintxt == '去续单') {
|
2024-12-31 18:01:36 +08:00
|
|
|
|
this.jinxinflag = false
|
2024-12-20 09:02:40 +08:00
|
|
|
|
let roomId = this.jinxinglist[this.mdindex].roomId
|
|
|
|
|
let orderNo = this.jinxinglist[this.mdindex].orderNo
|
|
|
|
|
uni.navigateTo({
|
2025-03-05 17:42:13 +08:00
|
|
|
|
url: '/page_user/xudan?roomId=' + roomId + '&orderNo=' + orderNo + '&viewType=' + this.viewType
|
2024-12-20 09:02:40 +08:00
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 点击进行开店门开包厢等操作
|
2025-02-20 14:34:21 +08:00
|
|
|
|
btnopen(num) {
|
|
|
|
|
if (num == 1) {
|
|
|
|
|
if (this.jinxinglist.length > 1) {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
this.jinxinflag = true
|
|
|
|
|
this.jinxintxt = '开店门'
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else if (this.jinxinglist.length == 1) {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
let storeId = this.jinxinglist[0].storeId
|
|
|
|
|
this.$u.get(`app/store/openGate/${storeId}`).then(res => {
|
2025-02-20 14:34:21 +08:00
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '开启店门成功',
|
|
|
|
|
icon: 'success',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
2025-03-05 17:42:13 +08:00
|
|
|
|
} else if(res.code == 501){
|
|
|
|
|
this.deviceId = res.msg
|
|
|
|
|
this.lanyamac = res.msg
|
|
|
|
|
this.getlanya()
|
|
|
|
|
}else{
|
2025-02-20 14:34:21 +08:00
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res.msg,
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({
|
2024-12-20 09:02:40 +08:00
|
|
|
|
title: '您当前没有订单',
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else if (num == 2) {
|
|
|
|
|
if (this.jinxinglist.length > 1) {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
this.jinxinflag = true
|
|
|
|
|
this.jinxintxt = '开包厢'
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else if (this.jinxinglist.length == 1) {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
let roomId = this.jinxinglist[0].roomId
|
2025-03-12 17:06:06 +08:00
|
|
|
|
this.$u.post(`/app/device/adminAll/${roomId}/switch?open=true&orderNo=${this.jinxinglist[0].orderNo}`).then(res => {
|
2025-02-20 14:34:21 +08:00
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '开启包厢门成功',
|
|
|
|
|
icon: 'success',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res.msg,
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-12-20 09:02:40 +08:00
|
|
|
|
})
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '您当前没有订单',
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else if (num == 3) {
|
|
|
|
|
if (this.jinxinglist.length > 1) {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
this.jinxinflag = true
|
|
|
|
|
this.jinxintxt = '去续单'
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else if (this.jinxinglist.length == 1) {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
let roomId = this.jinxinglist[0].roomId
|
|
|
|
|
let orderNo = this.jinxinglist[0].orderNo
|
|
|
|
|
uni.navigateTo({
|
2025-02-20 14:34:21 +08:00
|
|
|
|
url: '/page_user/xudan?roomId=' + roomId + '&orderNo=' + orderNo
|
2024-12-20 09:02:40 +08:00
|
|
|
|
})
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '您当前没有订单',
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else if (num == 4) {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
uni.scanCode({
|
|
|
|
|
onlyFromCamera: true,
|
|
|
|
|
scanType: ['qrCode'],
|
|
|
|
|
success: res => {
|
2025-02-15 14:15:09 +08:00
|
|
|
|
function getQueryParam(url, paramName) {
|
|
|
|
|
let regex = new RegExp(`[?&]${paramName}=([^&]*)`)
|
|
|
|
|
let results = regex.exec(url);
|
|
|
|
|
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null
|
|
|
|
|
}
|
|
|
|
|
console.log(res);
|
|
|
|
|
let sceneValue = res.result
|
|
|
|
|
let decodedValue = decodeURIComponent(sceneValue)
|
|
|
|
|
let id = getQueryParam(decodedValue, 'sn')
|
2025-03-12 17:06:06 +08:00
|
|
|
|
let storeCode = getQueryParam(decodedValue, 'd')
|
|
|
|
|
let roomCode = getQueryParam(decodedValue, 'f')
|
2025-02-20 14:34:21 +08:00
|
|
|
|
if (id) {
|
2025-02-15 14:15:09 +08:00
|
|
|
|
let that = this
|
|
|
|
|
let data = {
|
|
|
|
|
sn: id,
|
|
|
|
|
}
|
|
|
|
|
that.$u.get(`/app/device/isBind?deviceNo=${id}`).then(res => {
|
|
|
|
|
if (res.data == 2) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '该设备已被绑定',
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
} else if (res.data == 1) {
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: '该设备未绑定,你需进行绑定吗?',
|
|
|
|
|
success: function(res) {
|
|
|
|
|
if (res.confirm) {
|
2025-03-05 17:42:13 +08:00
|
|
|
|
that.$u.put("/app/device/bind", data).then(res => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '绑定成功',
|
|
|
|
|
icon: 'success',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
that.userType = '01'
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-02-15 14:15:09 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else if (res.data == 0) {
|
2025-02-15 14:15:09 +08:00
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '该设备为录入,请先录入',
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else if (storeCode) {
|
|
|
|
|
this.$u.get(`app/getId?storeCode=${storeCode}`).then(resp => {
|
|
|
|
|
if (resp.code == 200) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url:'/pages/index/index?storeId=' + resp.data
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res.msg,
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else if (roomCode) {
|
|
|
|
|
this.$u.get(`app/getId?roomCode=${roomCode}`).then(resp => {
|
|
|
|
|
if (resp.code == 200) {
|
|
|
|
|
console.log('这是 roomId:', resp.data);
|
|
|
|
|
let roomId = resp.data
|
|
|
|
|
this.$u.get(`/app/order/getInProgressOrderList`).then(res => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
if (res.data == null || res.data.length == 0) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pages/myorder/index?roomId=' + roomId
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/page_user/dingdanxq?orderNo=' + res.data[0].orderNo + '&viewType=' + res.data[0].roomType2
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
} else if (res.code == 401) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pages/login/index'
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res.msg,
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res.msg,
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
2025-03-12 17:06:06 +08:00
|
|
|
|
console.log('URL 中未找到 storeCode 或 roomCode')
|
2025-02-15 14:15:09 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else if (num == 5) {
|
2025-02-15 14:15:09 +08:00
|
|
|
|
uni.switchTab({
|
2025-02-20 14:34:21 +08:00
|
|
|
|
url: '/pages/tj'
|
2025-02-15 14:15:09 +08:00
|
|
|
|
})
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else if (num == 6) {
|
|
|
|
|
if (this.jinxinglist.length > 0) {
|
2025-02-15 14:15:09 +08:00
|
|
|
|
let storeId = this.jinxinglist[0].storeId
|
2025-02-20 14:34:21 +08:00
|
|
|
|
this.$u.get(`/app/toilet/list?storeId=${storeId}`).then(res => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
if (res.rows == null || res.rows.length == 0) {
|
2025-02-15 14:15:09 +08:00
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '暂无卫生间',
|
|
|
|
|
icon: 'none',
|
2025-02-20 14:34:21 +08:00
|
|
|
|
duration: 2000
|
2025-02-15 14:15:09 +08:00
|
|
|
|
})
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else {
|
2025-02-15 14:15:09 +08:00
|
|
|
|
this.cesuolist = res.rows
|
2025-03-05 17:42:13 +08:00
|
|
|
|
this.lanyaobj = res.rows[0]
|
2025-02-20 14:34:21 +08:00
|
|
|
|
if (this.cesuolist.length == 1) {
|
2025-03-05 17:42:13 +08:00
|
|
|
|
this.$u.get(`/app/room/openToilet/${this.cesuolist[0].toiletId}`).then(res => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '打开成功',
|
|
|
|
|
icon: 'success',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
this.cesuoflag = false
|
|
|
|
|
} else if(res.code == 501){
|
|
|
|
|
this.deviceId = res.msg
|
|
|
|
|
this.lanyamac = res.msg
|
|
|
|
|
this.getlanya()
|
|
|
|
|
}else{
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res.msg,
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else {
|
2025-02-15 14:15:09 +08:00
|
|
|
|
this.cesuoflag = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else {
|
2025-02-15 14:15:09 +08:00
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '当前没有订单,请先下单',
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 点击打开厕所门
|
2025-02-20 14:34:21 +08:00
|
|
|
|
btncs(item) {
|
2025-03-05 17:42:13 +08:00
|
|
|
|
this.lanyaobj = item
|
2025-02-15 14:15:09 +08:00
|
|
|
|
console.log(item);
|
2025-02-20 14:34:21 +08:00
|
|
|
|
if (item.deviceId == null) {
|
2025-02-15 14:15:09 +08:00
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '该厕所未安装设备',
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else {
|
2025-02-15 14:15:09 +08:00
|
|
|
|
this.$u.get(`/app/room/openToilet/${item.toiletId}`).then(res => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '打开成功',
|
|
|
|
|
icon: 'success',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
this.cesuoflag = false
|
2025-03-05 17:42:13 +08:00
|
|
|
|
}else if(res.code == 501){
|
|
|
|
|
this.cesuoflag = false
|
|
|
|
|
this.deviceId = res.msg
|
|
|
|
|
this.lanyamac = res.msg
|
|
|
|
|
this.getlanya()
|
|
|
|
|
}else{
|
2024-12-20 09:02:40 +08:00
|
|
|
|
uni.showToast({
|
2025-02-15 14:15:09 +08:00
|
|
|
|
title: res.msg,
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
2024-12-20 09:02:40 +08:00
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 点击输入框确定执行搜索
|
2025-02-20 14:34:21 +08:00
|
|
|
|
confirm() {
|
2025-02-15 16:46:08 +08:00
|
|
|
|
this.pagesum = 1
|
2024-12-20 09:02:40 +08:00
|
|
|
|
this.getshop()
|
2025-03-12 17:06:06 +08:00
|
|
|
|
console.log(this.sousuovalue,11)
|
2024-12-20 09:02:40 +08:00
|
|
|
|
},
|
|
|
|
|
// 根据定位来获取门店
|
2025-02-20 14:34:21 +08:00
|
|
|
|
getshop() {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
let data = {
|
2025-02-20 14:34:21 +08:00
|
|
|
|
phoneLon: this.longitude,
|
|
|
|
|
phoneLat: this.latitude,
|
|
|
|
|
cityId: this.cityid,
|
|
|
|
|
keyword: this.sousuovalue,
|
|
|
|
|
type: this.type
|
2024-12-20 09:02:40 +08:00
|
|
|
|
}
|
2025-03-05 17:42:13 +08:00
|
|
|
|
this.$u.post(`/app/getStoreListByLocation?pageNum=${this.pagesum}&pageSize=${this.pagesize}`, data).then(res => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.xiaflag = true
|
|
|
|
|
this.total = res.total
|
|
|
|
|
if (this.pagesum > 1) {
|
|
|
|
|
this.pagesum++
|
|
|
|
|
this.listshop = this.listshop.concat(res.rows)
|
|
|
|
|
this.qingqiuflag = true
|
|
|
|
|
} else {
|
|
|
|
|
this.pagesum++
|
|
|
|
|
this.listshop = res.rows
|
|
|
|
|
this.qingqiuflag = true
|
2025-02-20 14:34:21 +08:00
|
|
|
|
}
|
2025-03-05 17:42:13 +08:00
|
|
|
|
console.log(this.listshop)
|
|
|
|
|
}
|
|
|
|
|
})
|
2024-12-20 09:02:40 +08:00
|
|
|
|
},
|
|
|
|
|
// 获取用户详情
|
2025-02-20 14:34:21 +08:00
|
|
|
|
getinfo() {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
this.$u.get(`/getAppInfo`).then(res => {
|
2025-02-20 14:34:21 +08:00
|
|
|
|
if (res.code == 200) {
|
2025-02-15 14:15:09 +08:00
|
|
|
|
this.userType = res.user.userType
|
2024-12-20 09:02:40 +08:00
|
|
|
|
uni.setStorageSync('user', res.data)
|
2025-02-20 14:34:21 +08:00
|
|
|
|
} else if (res.code == 401) {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
this.jingmo()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 静默登录
|
2025-02-20 14:34:21 +08:00
|
|
|
|
jingmo() {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
let that = this
|
|
|
|
|
wx.login({
|
2025-02-20 14:34:21 +08:00
|
|
|
|
success(res) {
|
|
|
|
|
if (res.code) {
|
|
|
|
|
console.log('登录!', res)
|
|
|
|
|
let data = {
|
|
|
|
|
jsCode: res.code,
|
|
|
|
|
}
|
|
|
|
|
that.$u.post(`/loginByopenid?jsCode=${res.code}`, data).then(res => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
console.log("老用户登录", res)
|
2025-02-15 14:15:09 +08:00
|
|
|
|
that.getinfo()
|
2024-12-20 09:02:40 +08:00
|
|
|
|
wx.setStorageSync('token', res.token)
|
2025-03-05 17:42:13 +08:00
|
|
|
|
}else{
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: '温馨提示',
|
|
|
|
|
content: '您还未登录,是否前去登录?',
|
|
|
|
|
success: function (res) {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
uni.reLaunch({
|
|
|
|
|
url:'/pages/login/index'
|
|
|
|
|
})
|
|
|
|
|
} else if (res.cancel) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-02-20 14:34:21 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-12-20 09:02:40 +08:00
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 获取自身当前经纬度
|
2025-02-20 14:34:21 +08:00
|
|
|
|
getweizhi() {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
uni.getLocation({
|
2025-02-20 14:34:21 +08:00
|
|
|
|
type: 'wgs84',
|
|
|
|
|
success: res => {
|
|
|
|
|
this.longitude = res.longitude
|
|
|
|
|
this.latitude = res.latitude
|
|
|
|
|
this.getshop()
|
|
|
|
|
this.$u.get(`app/getCity?lon=${this.longitude}&lat=${this.latitude}`).then(res => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
if (this.cityid == '') {
|
|
|
|
|
this.tit = res.data.cityName
|
|
|
|
|
}
|
2024-12-20 09:02:40 +08:00
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
fail: err => {
|
|
|
|
|
// 获取失败,err为错误信息
|
|
|
|
|
console.log('getLocation err:', err)
|
|
|
|
|
}
|
2024-12-20 09:02:40 +08:00
|
|
|
|
})
|
|
|
|
|
},
|
2025-02-20 14:34:21 +08:00
|
|
|
|
// 按下滑动
|
|
|
|
|
onTouchStart(e) {
|
|
|
|
|
this.imgflag = false
|
2025-02-12 17:59:03 +08:00
|
|
|
|
this.touchStartX = e.touches[0].clientX
|
|
|
|
|
this.touchStartY = e.touches[0].clientY
|
2025-02-20 14:34:21 +08:00
|
|
|
|
},
|
|
|
|
|
// 松开滑动
|
|
|
|
|
onTouchEnd(e) {
|
|
|
|
|
this.imgflag = true
|
|
|
|
|
let deltaX = e.changedTouches[0].clientX - this.touchStartX
|
|
|
|
|
let deltaY = e.changedTouches[0].clientY - this.touchStartY
|
|
|
|
|
if (Math.abs(deltaX) > 50 && Math.abs(deltaX) > Math.abs(deltaY)) {
|
|
|
|
|
if (deltaX >= 0) {
|
|
|
|
|
// console.log("左滑")
|
|
|
|
|
} else {
|
|
|
|
|
// console.log("右滑")
|
|
|
|
|
}
|
|
|
|
|
} else if (Math.abs(deltaY) > 50 && Math.abs(deltaX) < Math.abs(deltaY)) {
|
|
|
|
|
if (deltaY < 100) {
|
|
|
|
|
if (this.qingqiuflag == true) {
|
|
|
|
|
let sum = (this.pagesum - 1) * this.pagesize
|
|
|
|
|
console.log(sum, this.total)
|
|
|
|
|
if (this.total > sum) {
|
|
|
|
|
this.qingqiuflag = false
|
|
|
|
|
this.getshop()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
console.log("下滑")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 滑动取消
|
|
|
|
|
onTouchCancel() {
|
|
|
|
|
this.imgflag = true
|
|
|
|
|
},
|
|
|
|
|
// 点击跳转门店详情页
|
|
|
|
|
btndetail(storeId, item) {
|
|
|
|
|
uni.reLaunch({
|
2025-03-05 17:42:13 +08:00
|
|
|
|
url: '/pages/index/index?storeId=' + storeId + '&tit=' + item.name + '&distance=' + item.distance
|
2025-02-20 14:34:21 +08:00
|
|
|
|
})
|
|
|
|
|
},
|
2024-12-20 09:02:40 +08:00
|
|
|
|
// 点击跳转到加盟合作页
|
2025-02-20 14:34:21 +08:00
|
|
|
|
btnjiameng() {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
uni.navigateTo({
|
2025-02-20 14:34:21 +08:00
|
|
|
|
url: '/page_user/zhaoshang'
|
2024-12-20 09:02:40 +08:00
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 点击选择定位位置
|
2025-02-20 14:34:21 +08:00
|
|
|
|
btnweizhi() {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
uni.navigateTo({
|
2025-02-20 14:34:21 +08:00
|
|
|
|
url: '/page_user/city'
|
2024-12-20 09:02:40 +08:00
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
2025-03-05 17:42:13 +08:00
|
|
|
|
// 离线蓝牙开关
|
|
|
|
|
.lxlanya{
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 40%;
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
width: 500rpx;
|
|
|
|
|
max-height:600rpx;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border-radius: 30rpx;
|
|
|
|
|
z-index: 9;
|
|
|
|
|
padding: 30rpx 40rpx;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
.cha{
|
|
|
|
|
font-size: 50rpx;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 20rpx;
|
|
|
|
|
right: 30rpx;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
|
|
|
|
.lxzt{
|
|
|
|
|
margin-top: 30rpx;
|
|
|
|
|
padding: 0 20rpx;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
view{
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
image{
|
|
|
|
|
width: 80rpx;
|
|
|
|
|
height: 80rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.lxtit{
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
width: 100%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin-top: 30rpx;
|
|
|
|
|
}
|
|
|
|
|
.kongzhi{
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
margin-top: 30rpx;
|
|
|
|
|
.lxkai{
|
|
|
|
|
width: 200rpx;
|
|
|
|
|
height: 80rpx;
|
|
|
|
|
background-color: #48893B;
|
|
|
|
|
color: #fff;
|
|
|
|
|
text-align: center;
|
|
|
|
|
line-height: 80rpx;
|
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-12-20 09:02:40 +08:00
|
|
|
|
page {
|
|
|
|
|
background: #fff;
|
|
|
|
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
#active {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
border: 1px solid #226914 !important;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
background-color: #226914 !important;
|
2024-12-20 09:02:40 +08:00
|
|
|
|
color: #fff !important;
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.activetab {
|
2024-12-30 18:02:38 +08:00
|
|
|
|
font-weight: 600 !important;
|
2025-03-05 17:42:13 +08:00
|
|
|
|
font-size: 32rpx !important;
|
2024-12-30 18:02:38 +08:00
|
|
|
|
color: #3D3D3D !important;
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.cesuoul {
|
2025-02-15 14:15:09 +08:00
|
|
|
|
width: 260rpx;
|
|
|
|
|
max-height: 500rpx;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border-radius: 30rpx;
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 50%;
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
z-index: 99;
|
|
|
|
|
padding: 30rpx;
|
|
|
|
|
box-sizing: border-box;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.anniuqx {
|
2025-02-15 14:15:09 +08:00
|
|
|
|
width: 100%;
|
|
|
|
|
height: 80rpx;
|
|
|
|
|
border: 1px solid #226914;
|
|
|
|
|
text-align: center;
|
|
|
|
|
line-height: 80rpx;
|
|
|
|
|
color: #226914;
|
|
|
|
|
margin-top: 30rpx;
|
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.cesuoli {
|
2025-02-15 14:15:09 +08:00
|
|
|
|
width: 100%;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.caocuo {
|
|
|
|
|
.name {
|
2025-02-15 14:15:09 +08:00
|
|
|
|
width: 100%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin-top: 20rpx;
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.kaiguan {
|
2025-02-15 14:15:09 +08:00
|
|
|
|
padding: 10rpx;
|
|
|
|
|
background-color: #226914;
|
|
|
|
|
color: #fff;
|
|
|
|
|
border-radius: 10rpx;
|
|
|
|
|
margin: auto;
|
|
|
|
|
margin-top: 20rpx;
|
|
|
|
|
width: 100rpx;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.tabqh {
|
2024-12-30 18:02:38 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 84rpx;
|
|
|
|
|
background-color: #DEF1DA;
|
2025-01-02 18:04:30 +08:00
|
|
|
|
position: relative;
|
2024-12-30 18:02:38 +08:00
|
|
|
|
border-radius: 30rpx 30rpx 0 0;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
view {
|
2024-12-30 18:02:38 +08:00
|
|
|
|
font-weight: 600;
|
2025-03-05 17:42:13 +08:00
|
|
|
|
font-size: 28rpx;
|
2024-12-30 18:02:38 +08:00
|
|
|
|
color: #7C7C7C;
|
|
|
|
|
text-align: center;
|
|
|
|
|
width: 33%;
|
|
|
|
|
height: 84rpx;
|
|
|
|
|
line-height: 84rpx;
|
|
|
|
|
position: relative;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
text {
|
2025-01-02 18:04:30 +08:00
|
|
|
|
position: absolute;
|
|
|
|
|
z-index: 1;
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
image {
|
2024-12-30 18:02:38 +08:00
|
|
|
|
height: 84rpx;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.jinxinx {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 60rpx;
|
|
|
|
|
height: 60rpx;
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 1216rpx;
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
z-index: 2;
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.karaokeroom {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
position: fixed;
|
|
|
|
|
top: 332rpx;
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
z-index: 2;
|
|
|
|
|
width: 674rpx;
|
|
|
|
|
height: 828rpx;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
background: linear-gradient(180deg, #DEF1DA 0%, #FFFFFF 100%, #FFFFFF 100%);
|
2024-12-20 09:02:40 +08:00
|
|
|
|
border-radius: 36rpx 36rpx 36rpx 36rpx;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.top {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
font-weight: 600;
|
|
|
|
|
font-size: 44rpx;
|
|
|
|
|
color: #48893B;
|
|
|
|
|
width: 100%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin-top: 52rpx;
|
|
|
|
|
margin-bottom: 44rpx;
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.anniu {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 584rpx;
|
|
|
|
|
height: 86rpx;
|
|
|
|
|
background: #48893B;
|
|
|
|
|
border-radius: 43rpx 43rpx 43rpx 43rpx;
|
|
|
|
|
font-size: 36rpx;
|
|
|
|
|
color: #FFFFFF;
|
|
|
|
|
text-align: center;
|
|
|
|
|
line-height: 86rpx;
|
|
|
|
|
margin: auto;
|
|
|
|
|
position: fixed;
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
bottom: 72rpx;
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.roomlist {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
height: 480rpx;
|
|
|
|
|
overflow: scroll;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.room_item {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 584rpx;
|
|
|
|
|
height: 224rpx;
|
|
|
|
|
border: 2rpx solid #969696;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
margin: auto;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
padding: 34rpx;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
margin-top: 26rpx;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.lt {
|
|
|
|
|
image {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 154rpx;
|
|
|
|
|
height: 154rpx;
|
|
|
|
|
margin-right: 22rpx;
|
2024-12-31 18:01:36 +08:00
|
|
|
|
border-radius: 20rpx;
|
2024-12-20 09:02:40 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.mask {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
background-color: #000;
|
|
|
|
|
opacity: .2;
|
|
|
|
|
}
|
|
|
|
|
.page {
|
|
|
|
|
width: 750rpx;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.xuanfu {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
position: fixed;
|
|
|
|
|
top: 38%;
|
|
|
|
|
right: 30rpx;
|
|
|
|
|
animation: fadeInDowns .5s ease-out forwards;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
image {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 90rpx;
|
|
|
|
|
height: 90rpx;
|
|
|
|
|
display: block;
|
|
|
|
|
margin-bottom: 44rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@keyframes fadeInDowns {
|
|
|
|
|
from {
|
|
|
|
|
opacity: 0;
|
|
|
|
|
transform: translateX(50px);
|
|
|
|
|
}
|
|
|
|
|
to {
|
|
|
|
|
opacity: 1;
|
|
|
|
|
transform: translateX(0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@keyframes fadeInDown {
|
|
|
|
|
from {
|
|
|
|
|
opacity: 0;
|
|
|
|
|
transform: translateX(-50px);
|
|
|
|
|
}
|
|
|
|
|
to {
|
|
|
|
|
opacity: 1;
|
|
|
|
|
transform: translateX(0);
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.xuanfus {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
position: fixed;
|
|
|
|
|
top: 34%;
|
|
|
|
|
right: -80rpx;
|
|
|
|
|
animation: fadeInDown .5s ease-out forwards;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
image {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 90rpx;
|
|
|
|
|
height: 90rpx;
|
|
|
|
|
display: block;
|
|
|
|
|
margin-top: 44rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.jiameng {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 100%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
margin: auto;
|
|
|
|
|
position: fixed;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 0;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.gb {
|
2025-02-15 16:46:08 +08:00
|
|
|
|
width: 100rpx;
|
|
|
|
|
height: 40rpx;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
background-color: rgba(0, 0, 0, 0.15);
|
2025-02-15 16:46:08 +08:00
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
right: 22rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
border-radius: 0 30rpx 0 0;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
text {
|
2025-02-15 16:46:08 +08:00
|
|
|
|
font-size: 34rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
image {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 710rpx;
|
|
|
|
|
height: 196rpx;
|
2025-02-15 16:46:08 +08:00
|
|
|
|
border-radius: 30rpx;
|
2024-12-20 09:02:40 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.shoplist {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 750rpx;
|
2025-01-02 18:04:30 +08:00
|
|
|
|
max-height: 1250rpx;
|
2024-12-20 09:02:40 +08:00
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
overflow: scroll;
|
|
|
|
|
padding-bottom: 240rpx !important;
|
|
|
|
|
box-sizing: border-box;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.shop_item {
|
2025-01-02 18:04:30 +08:00
|
|
|
|
margin: auto;
|
2024-12-20 09:02:40 +08:00
|
|
|
|
display: flex;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
margin-top: 30rpx;
|
2024-12-20 09:02:40 +08:00
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
width: 674rpx;
|
2025-02-15 14:15:09 +08:00
|
|
|
|
height: 330rpx;
|
2024-12-20 09:02:40 +08:00
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
padding: 20rpx 18rpx;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(0, 0, 0, 0.15);
|
2024-12-20 09:02:40 +08:00
|
|
|
|
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.rt {
|
|
|
|
|
.storebq {
|
2024-12-30 18:02:38 +08:00
|
|
|
|
margin-top: 16rpx;
|
|
|
|
|
display: flex;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
image {
|
2025-03-05 17:42:13 +08:00
|
|
|
|
width: 100rpx;
|
2024-12-30 18:02:38 +08:00
|
|
|
|
height: 40rpx;
|
|
|
|
|
margin-right: 10rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.yuding {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
color: #48893B;
|
|
|
|
|
margin-top: 26rpx;
|
|
|
|
|
margin-left: 248rpx;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.one {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 32rpx;
|
|
|
|
|
height: 32rpx;
|
|
|
|
|
margin-right: 10rpx;
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.two {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 14rpx;
|
|
|
|
|
height: 36rpx;
|
|
|
|
|
margin-left: 10rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.juli {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
2024-12-30 18:02:38 +08:00
|
|
|
|
margin-top: 16rpx;
|
2024-12-20 09:02:40 +08:00
|
|
|
|
align-items: center;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.kmjuli {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 210rpx;
|
|
|
|
|
height: 40rpx;
|
|
|
|
|
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
|
|
|
|
border: 2rpx solid #48893B;
|
|
|
|
|
text-align: center;
|
|
|
|
|
line-height: 36rpx;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
color: #48893B;
|
2024-12-20 09:02:40 +08:00
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.juliimg {
|
|
|
|
|
image {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 60rpx;
|
|
|
|
|
height: 60rpx;
|
|
|
|
|
margin-left: 26rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.dizhi {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
color: #7C7C7C;
|
|
|
|
|
margin-top: 16rpx;
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.name {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
font-weight: 600;
|
|
|
|
|
font-size: 36rpx;
|
|
|
|
|
color: #3D3D3D;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.lt {
|
2025-03-05 17:42:13 +08:00
|
|
|
|
margin-right: 30rpx;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
image {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 186rpx;
|
2025-02-15 14:15:09 +08:00
|
|
|
|
height: 220rpx;
|
2024-12-20 09:02:40 +08:00
|
|
|
|
border-radius: 10rpx;
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.hour {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
color: #48893B;
|
|
|
|
|
margin-top: 32rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.serchshop {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
margin-top: 40rpx;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
padding-left: 34rpx;
|
|
|
|
|
padding-right: 34rpx;
|
|
|
|
|
box-sizing: border-box;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.search {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 468rpx;
|
|
|
|
|
height: 72rpx;
|
|
|
|
|
line-height: 72rpx;
|
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
|
|
|
|
position: relative;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
input {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
margin-left: 94rpx;
|
|
|
|
|
height: 72rpx;
|
|
|
|
|
line-height: 72rpx;
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
/deep/ .uicon-search {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
position: absolute;
|
|
|
|
|
top: 24rpx !important;
|
|
|
|
|
left: 26rpx !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.dingwei {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
color: #48893B;
|
|
|
|
|
align-items: center;
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.dwimg {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 40rpx;
|
|
|
|
|
height: 40rpx;
|
|
|
|
|
margin-right: 12rpx;
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.xlimg {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 26rpx;
|
|
|
|
|
height: 14rpx;
|
|
|
|
|
margin-left: 12rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.title {
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
font-size: 36rpx;
|
|
|
|
|
color: #226914;
|
|
|
|
|
line-height: 50rpx;
|
2025-02-15 14:15:09 +08:00
|
|
|
|
height: 50rpx;
|
2024-12-20 09:02:40 +08:00
|
|
|
|
padding-left: 34rpx;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
}
|
2025-02-20 14:34:21 +08:00
|
|
|
|
.imgbj {
|
2024-12-20 09:02:40 +08:00
|
|
|
|
width: 750rpx;
|
|
|
|
|
height: 610rpx;
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
z-index: -1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|