aaa
This commit is contained in:
parent
6f69ad215d
commit
c7295caf71
|
|
@ -52,7 +52,8 @@
|
|||
立即支付
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -69,7 +70,10 @@
|
|||
expireTimeStr: '',
|
||||
zfobj: {},
|
||||
orderno: '',
|
||||
id:''
|
||||
id:'',
|
||||
czflag:false,
|
||||
sytime:0,
|
||||
datetime:0
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
|
@ -79,6 +83,11 @@
|
|||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
onShow() {
|
||||
if(this.orderno){
|
||||
this.gethuidaio()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
startTimer() {
|
||||
|
|
@ -129,14 +138,17 @@
|
|||
package: res.data.packageVal,
|
||||
signType: res.data.signType,
|
||||
paySign: res.data.paySign,
|
||||
success(res) {
|
||||
success: (res) => {
|
||||
console.log(res,'支付成功');
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
// 支付成功逻辑
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
uni.reLaunch({
|
||||
url:'/pages/shouye/index'
|
||||
})
|
||||
uni.setStorageSync('time', this.expireTimeStr)
|
||||
},
|
||||
fail(err) {
|
||||
// 支付失败逻辑
|
||||
|
|
@ -157,9 +169,11 @@
|
|||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
btnactive(item) {
|
||||
this.sytime = item.value
|
||||
this.zfobj = item
|
||||
this.indexactive = item.suitId;
|
||||
},
|
||||
|
|
@ -178,6 +192,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
// /deep/ .u-icon__icon{
|
||||
// padding-bottom: 41rpx;
|
||||
// }
|
||||
page {
|
||||
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
|
@ -192,6 +212,56 @@
|
|||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
.tip_box{
|
||||
position: fixed;
|
||||
left: 72rpx;
|
||||
top: 700rpx;
|
||||
width: 610rpx;
|
||||
// height: 282rpx;
|
||||
background: #F7FAFE;
|
||||
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
||||
z-index: 10000000;
|
||||
.top{
|
||||
padding: 52rpx 38rpx 42rpx 36rpx;
|
||||
.txt{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
}
|
||||
.bot{
|
||||
border-top: 2rpx solid #D8D8D8 ;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
height: 100%;
|
||||
.bot_left{
|
||||
width: 50%;
|
||||
height: 98rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.bot_right{
|
||||
width: 50%;
|
||||
height: 98rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
border-left: 2rpx solid #D8D8D8 ;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #8883F0;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-top: 40rpx;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
},
|
||||
onShow() {
|
||||
this.wateringList = []
|
||||
this.pagenum = 1
|
||||
this.getlist()
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -116,6 +117,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .uicon-nav-back{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
// background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
|
@ -164,7 +171,7 @@
|
|||
box-sizing: border-box;
|
||||
margin-bottom: 26rpx;
|
||||
position: fixed;
|
||||
top: 170rpx;
|
||||
top: 200rpx;
|
||||
.top{
|
||||
.yc{
|
||||
width: 178rpx;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<view class="inp">
|
||||
<input type="text" placeholder="请输入设备编号" style="padding-left: 20rpx;" v-model="deviceNo"/>
|
||||
</view>
|
||||
<view class="sm">
|
||||
<view class="sm" @click="scanQRCode">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uNX9Ls3s68OsYgOTQ8dD" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -63,10 +63,27 @@
|
|||
name:'',
|
||||
phone:'',
|
||||
dizhi:'',
|
||||
deviceNo:''
|
||||
deviceNo:'',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
scanQRCode() {
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
scanType: ['qrCode'],
|
||||
success: res => {
|
||||
console.log('扫描结果:', res);
|
||||
this.deviceNo = res.result;
|
||||
},
|
||||
fail: err => {
|
||||
console.error('扫描失败:', err);
|
||||
uni.showToast({
|
||||
title: '扫描失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
btnshangb(){
|
||||
let data = {
|
||||
|
|
@ -130,6 +147,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,6 +93,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,6 +91,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,6 +104,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
// background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -372,6 +372,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar title="我的店铺" :border-bottom="false" :background="bgc" title-color='#fff' title-size='36' back-icon-color="#fff"
|
||||
height='58'></u-navbar>
|
||||
<u-navbar title="我的店铺" :border-bottom="false" :background="bgc" title-color='#fff' title-size='36'
|
||||
back-icon-color="#fff" height='58'></u-navbar>
|
||||
<view class="box">
|
||||
<view class="top">
|
||||
<u-search placeholder="搜索" input-align="center" v-model="keyword" @custom="searchs"></u-search>
|
||||
<view class="cjshop" @click="creadshop">创建店铺</view>
|
||||
</view>
|
||||
|
||||
<view class="list" @scrolltolower="onReachBottom">
|
||||
<view class="list" @scrolltolower="onReachBottom">
|
||||
<view class="listitem" v-for="(item,index) in wateringList" :key="index">
|
||||
<view class="toptit">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uIKex42Zr1fwfzYGgGKz" mode=""></image>
|
||||
|
|
@ -67,11 +67,11 @@
|
|||
isLoading: false, // 是否正在加载数据
|
||||
noMoreData: false, // 是否没有更多数据
|
||||
total: 0,
|
||||
keyword:''
|
||||
keyword: ''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.wateringList = []
|
||||
|
|
@ -80,32 +80,34 @@
|
|||
methods: {
|
||||
// 请求店铺列表
|
||||
getlist() {
|
||||
if (this.isLoading || this.noMoreData) {
|
||||
return;
|
||||
}
|
||||
// if (this.isLoading || this.noMoreData) {
|
||||
// return;
|
||||
// }
|
||||
this.isLoading = true;
|
||||
this.$u.get("/app/store/list?pageNum=" + this.pagenum + '&pageSize='+this.pagesize + '&keyword=' + this.keyword).then(res => {
|
||||
this.$u.get("/app/store/list?pageNum=" + this.pagenum + '&pageSize=' + this.pagesize + '&keyword=' + this
|
||||
.keyword).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.total = res.total
|
||||
if (res.rows.length > 0) {
|
||||
// 有数据,追加到列表
|
||||
this.wateringList = this.wateringList.concat(res.rows)
|
||||
this.pagenum++
|
||||
|
||||
|
||||
// 计算创建到现在运行了多少天
|
||||
this.wateringList.forEach((item, index) => {
|
||||
var dateTime = new Date(item.createTime);
|
||||
if (isNaN(dateTime.getTime())) {
|
||||
console.error(`无法解析日期时间字符串: ${item.createTime}`);
|
||||
return;
|
||||
}
|
||||
var now = new Date().getTime();
|
||||
var differenceInMilliseconds = now - dateTime.getTime();
|
||||
var differenceInDays = Math.floor(differenceInMilliseconds / (1000 * 60 * 60 * 24));
|
||||
// 直接修改原数组中的对象,添加daysDifference属性
|
||||
item.daysDifference = differenceInDays;
|
||||
});
|
||||
|
||||
this.wateringList.forEach((item, index) => {
|
||||
var dateTime = new Date(item.createTime);
|
||||
if (isNaN(dateTime.getTime())) {
|
||||
console.error(`无法解析日期时间字符串: ${item.createTime}`);
|
||||
return;
|
||||
}
|
||||
var now = new Date().getTime();
|
||||
var differenceInMilliseconds = now - dateTime.getTime();
|
||||
var differenceInDays = Math.floor(differenceInMilliseconds / (1000 * 60 *
|
||||
60 * 24));
|
||||
// 直接修改原数组中的对象,添加daysDifference属性
|
||||
item.daysDifference = differenceInDays;
|
||||
});
|
||||
|
||||
} else {
|
||||
// 没有更多数据
|
||||
this.noMoreData = true;
|
||||
|
|
@ -117,15 +119,15 @@
|
|||
this.isLoading = false; // 加载失败也标记为完成
|
||||
})
|
||||
},
|
||||
|
||||
searchs(){
|
||||
|
||||
searchs() {
|
||||
this.wateringList = []
|
||||
this.getlist()
|
||||
},
|
||||
|
||||
|
||||
onReachBottom() {
|
||||
let sum = this.total / this.pagesize
|
||||
if (this.pagenum-1 < sum) {
|
||||
if (this.pagenum - 1 < sum) {
|
||||
this.getlist(); // 上拉加载更多
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
|
@ -151,6 +153,14 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title {
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
|
||||
/deep/ .uicon-nav-back {
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
|
||||
page {
|
||||
// background: linear-gradient(180deg, #F4F5F7 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
|
@ -160,13 +170,15 @@
|
|||
// position: fixed;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
height: 100vh;
|
||||
height: 100vh;
|
||||
|
||||
.box {
|
||||
width: 750rpx;
|
||||
// height: 100%;
|
||||
// background: #F4F5F7;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
padding-top: 150rpx;
|
||||
padding-top: 150rpx;
|
||||
|
||||
.list {
|
||||
// overflow-y: scroll;
|
||||
// height: 100vh;
|
||||
|
|
@ -310,8 +322,9 @@
|
|||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
position: fixed;
|
||||
position: fixed;
|
||||
top: 200rpx;
|
||||
|
||||
.cjshop {
|
||||
width: 200rpx;
|
||||
height: 64rpx;
|
||||
|
|
|
|||
|
|
@ -1,47 +1,47 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar title="设备列表" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
|
||||
height='58'></u-navbar>
|
||||
<view class="box">
|
||||
<view class="warp_box">
|
||||
<view class="swiper" :current='curtitidx' @change="swiperchange" @scrolltolower="onReachBottom">
|
||||
<view>
|
||||
<view class="swiper-item ">
|
||||
<view class="card_box" v-for="(item,index) in wateringList"
|
||||
:key="index">
|
||||
<view class="card">
|
||||
<view class="card_left">
|
||||
<view class="card_left_tit">
|
||||
{{item.deviceName}}
|
||||
</view>
|
||||
<view class="card_left_sta">
|
||||
<image
|
||||
src="https://api.ccttiot.com/smartmeter/img/static/uZSiz7XWpxcXEkl6sTwj"
|
||||
mode=""></image>
|
||||
<view class="sta_txt" v-if="item.status==3">
|
||||
维修中
|
||||
</view>
|
||||
<view class="sta_txt" v-if="item.status==2" style="color:#ccc;">
|
||||
使用中
|
||||
</view>
|
||||
<view class="sta_txt" v-if="item.status==1" style="color:seagreen;">
|
||||
正常
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_left_no">
|
||||
S/N码:{{item.deviceNo}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_right">
|
||||
<image :src="item.picture" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-navbar title="设备列表" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff"
|
||||
title-size='36' height='58'></u-navbar>
|
||||
<view class="box">
|
||||
<view class="warp_box">
|
||||
<view class="swiper" :current='curtitidx' @change="swiperchange" @scrolltolower="onReachBottom">
|
||||
<view>
|
||||
<view class="swiper-item ">
|
||||
<view class="card_box" v-for="(item,index) in wateringList" :key="index">
|
||||
<view class="card" @click="btnxq(item.deviceId)">
|
||||
<view class="card_left">
|
||||
<view class="card_left_tit">
|
||||
{{item.deviceName}}
|
||||
</view>
|
||||
<view class="card_left_sta">
|
||||
<image
|
||||
src="https://api.ccttiot.com/smartmeter/img/static/uZSiz7XWpxcXEkl6sTwj"
|
||||
mode=""></image>
|
||||
<view class="sta_txt" v-if="item.status==3">
|
||||
维修中
|
||||
</view>
|
||||
<view class="sta_txt" v-if="item.status==2" style="color:greenyellow;">
|
||||
使用中
|
||||
</view>
|
||||
<view class="sta_txt" v-if="item.status==1" style="color:seagreen;">
|
||||
正常
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_left_no">
|
||||
S/N码:{{item.deviceNo}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_right">
|
||||
<image v-if="item.customPicture" :src="item.customPicture" mode=""></image>
|
||||
<image v-else :src="item.picture" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -49,15 +49,15 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
curtitidx:0,
|
||||
storeId:{},
|
||||
curtitidx: 0,
|
||||
storeId: {},
|
||||
bgc: {
|
||||
backgroundColor: " #8883F0",
|
||||
},
|
||||
pagenum: 1,
|
||||
wateringList: [],
|
||||
pagesize: 10,
|
||||
isLoading: false,
|
||||
isLoading: false,
|
||||
noMoreData: false,
|
||||
total: 0
|
||||
}
|
||||
|
|
@ -67,28 +67,29 @@
|
|||
this.getlist()
|
||||
},
|
||||
methods: {
|
||||
swiperchange(e) {
|
||||
this.curtitidx = e.detail.current
|
||||
},
|
||||
getlist(){
|
||||
this.$u.get(`/app/device/listByStore/${this.storeId}?pageNum=${this.pagenum}&pageSize=${this.pagesize}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.total = res.total
|
||||
if (res.rows.length > 0) {
|
||||
// 有数据,追加到列表
|
||||
this.wateringList = this.wateringList.concat(res.rows)
|
||||
this.pagenum++
|
||||
} else {
|
||||
// 没有更多数据
|
||||
this.noMoreData = true;
|
||||
swiperchange(e) {
|
||||
this.curtitidx = e.detail.current
|
||||
},
|
||||
getlist() {
|
||||
this.$u.get(`/app/device/list?storeId=${this.storeId}&pageNum=${this.pagenum}&pageSize=${this.pagesize}`)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.total = res.total
|
||||
if (res.rows.length > 0) {
|
||||
// 有数据,追加到列表
|
||||
this.wateringList = this.wateringList.concat(res.rows)
|
||||
this.pagenum++
|
||||
} else {
|
||||
// 没有更多数据
|
||||
this.noMoreData = true;
|
||||
}
|
||||
this.isLoading = false;
|
||||
}
|
||||
this.isLoading = false;
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onReachBottom() {
|
||||
let sum = this.total / this.pagesize
|
||||
if (this.pagenum-1 < sum) {
|
||||
if (this.pagenum - 1 < sum) {
|
||||
this.getlist(); // 上拉加载更多
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
|
@ -98,26 +99,43 @@
|
|||
});
|
||||
}
|
||||
},
|
||||
btnxq(id) {
|
||||
uni.navigateTo({
|
||||
url: '/page_user/sbdetail?id=' + id
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title {
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
|
||||
/deep/ .u-icon__icon {
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 750rpx;
|
||||
padding-bottom: 200rpx;
|
||||
.box{
|
||||
|
||||
.box {
|
||||
width: 750rpx;
|
||||
background: #F4F5F7;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
padding-left: 40rpx;
|
||||
|
||||
.swiper {
|
||||
.swiper-item {
|
||||
height: 100%;
|
||||
|
||||
.card_box {
|
||||
margin-top: 34rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.card {
|
||||
display: flex;
|
||||
margin-top: 20rpx;
|
||||
|
|
@ -126,32 +144,32 @@
|
|||
background: #fff;
|
||||
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(255, 255, 255, 0);
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
|
||||
|
||||
.card_left {
|
||||
width: 310rpx;
|
||||
margin-top: 46rpx;
|
||||
margin-left: 50rpx;
|
||||
|
||||
|
||||
.card_left_tit {
|
||||
font-size: 44rpx;
|
||||
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
|
||||
font-weight: 500;
|
||||
color: #8883F0;
|
||||
}
|
||||
|
||||
|
||||
.card_left_sta {
|
||||
|
||||
|
||||
margin-top: 15rpx;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
|
||||
|
||||
image {
|
||||
width: 23.32rpx;
|
||||
height: 36.47rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
.sta_txt {
|
||||
margin-left: 15rpx;
|
||||
color: #262B37;
|
||||
|
|
@ -160,7 +178,7 @@
|
|||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.card_left_no {
|
||||
margin-top: 15rpx;
|
||||
font-size: 24rpx;
|
||||
|
|
@ -169,14 +187,16 @@
|
|||
color: #95989D;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.card_right {
|
||||
margin-top: 30rpx;
|
||||
margin-left: auto;
|
||||
margin-right: 40rpx;
|
||||
margin-right: 40rpx;
|
||||
|
||||
image {
|
||||
width: 180rpx;
|
||||
height: 230rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
var xBlufi = require("@/page_components/blufi/xBlufi.js");
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -51,13 +52,53 @@
|
|||
],
|
||||
show: false,
|
||||
storeId:'',
|
||||
listobj:{}
|
||||
listobj:{},
|
||||
deviceId:'',
|
||||
name:'',
|
||||
mac:''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
console.log(option);
|
||||
this.storeId = option.id
|
||||
this.getdetail()
|
||||
|
||||
// xBlufi.initXBlufi(1);
|
||||
// console.log("xBlufi", xBlufi.XMQTT_SYSTEM);
|
||||
// xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent);
|
||||
// xBlufi.notifyStartDiscoverBle({
|
||||
// 'isStart': true
|
||||
// });
|
||||
|
||||
// // 停止蓝牙搜索
|
||||
// setTimeout(() => {
|
||||
// xBlufi.notifyStartDiscoverBle({
|
||||
// 'isStart': false
|
||||
// });
|
||||
// xBlufi.notifyConnectBle({
|
||||
// isStart: true,
|
||||
// deviceId: this.deviceId,
|
||||
// name: this.name
|
||||
// });
|
||||
// }, 3000)
|
||||
|
||||
},
|
||||
onUnload: function() {
|
||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': false
|
||||
});
|
||||
},
|
||||
onHide(){
|
||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': false
|
||||
});
|
||||
},
|
||||
onBeforeUnmount() {
|
||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': false
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getdetail(){
|
||||
|
|
@ -95,6 +136,12 @@
|
|||
setTimeout(()=>{
|
||||
uni.navigateBack()
|
||||
},1500)
|
||||
}else if(res.code == 500){
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
|
|
@ -123,10 +170,32 @@
|
|||
console.log('扫描结果:', res);
|
||||
this.$u.get(`/app/device/${res.result}/bySn`).then((res) =>{
|
||||
if(res.code == 200){
|
||||
this.qrResult = res.data.mac
|
||||
uni.navigateTo({
|
||||
url:'/page_fenbao/device/lianjie?mac=' + this.qrResult + '&storeId=' + this.storeId
|
||||
})
|
||||
this.qrResult = 'CTKG-' + res.data.mac
|
||||
|
||||
// uni.navigateTo({
|
||||
// url:'/page_fenbao/device/lianjie?mac=' + this.qrResult + '&storeId=' + this.storeId
|
||||
// })
|
||||
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
|
||||
});
|
||||
}, 2000)
|
||||
uni.showLoading({ title: '连接中...' });
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
@ -140,11 +209,160 @@
|
|||
});
|
||||
},
|
||||
|
||||
funListenDeviceMsgEvent: function(options) {
|
||||
switch (options.type) {
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS:
|
||||
if (options.result) {
|
||||
let devicesarr = options.data
|
||||
console.log(devicesarr,'devicesarrdevicesarr');
|
||||
devicesarr.forEach(device => {
|
||||
const mac = device.name.substring(5);
|
||||
if (device.name == this.qrResult) {
|
||||
this.deviceId = device.deviceId
|
||||
this.name = device.name
|
||||
this.mac = device.name.substring(5)
|
||||
this.devicesList = uniqueDevicesList;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_CONNECTED:
|
||||
console.log("连接回调:" + JSON.stringify(options));
|
||||
if (options.result) {
|
||||
uni.hideLoading();
|
||||
// uni.showToast({
|
||||
// title: '连接成功',
|
||||
// icon: 'none'
|
||||
// });
|
||||
{
|
||||
console.log("连接回调options.data.deviceId:" + options.data.deviceId,
|
||||
"连接回调options.data.name:" + options.data.name);
|
||||
let name = ''
|
||||
let index = this.name.indexOf('-');
|
||||
if (index !== -1) {
|
||||
name = this.name.slice(index + 1);
|
||||
}
|
||||
let data = {
|
||||
storeId:this.storeId,
|
||||
mac:this.mac
|
||||
}
|
||||
this.$u.put('/app/device/bind', data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '绑定成功',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
uni.hideLoading();
|
||||
uni.removeStorageSync('mac');
|
||||
let systemInfo = uni.getSystemInfoSync();
|
||||
if (systemInfo.platform === 'android') {
|
||||
// 当前设备是 Android
|
||||
uni.navigateTo({
|
||||
url: '/page_components/wifilist/index?deviceId=' +
|
||||
options.data.deviceId + '&name=' + options.data.name
|
||||
})
|
||||
} else if (systemInfo.platform === 'ios') {
|
||||
// 当前设备是 iOS
|
||||
uni.navigateTo({
|
||||
url: '/page_fenbao/device/wifivideo?deviceId=' +
|
||||
options.data.deviceId + '&name=' + options.data.name
|
||||
})
|
||||
}
|
||||
|
||||
}else if(res.code == 500){
|
||||
uni.showToast({
|
||||
title: '该设备已被绑定',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '连接失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
// uni.navigateBack()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
|
||||
if (!options.result) {
|
||||
console.log("蓝牙未开启", options);
|
||||
uni.showToast({
|
||||
title: '蓝牙未开启',
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
});
|
||||
} else {
|
||||
// this.searching = true
|
||||
//蓝牙搜索开始
|
||||
// _this.setData({
|
||||
// searching: true
|
||||
// });
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_STOP:
|
||||
if (options.result) {
|
||||
let uniqueDevicesList = Array.from(new Set(this.devicesList));
|
||||
|
||||
// 将去重后的数组重新赋值给 this.devicesList
|
||||
this.devicesList = uniqueDevicesList;
|
||||
let list = []
|
||||
filteredDevices.forEach(device => {
|
||||
// 从设备名称中提取 MAC 地址(假设 MAC 地址是设备名称的后6个字符)
|
||||
let macFromName = device.name.substring(device.name.length - 12);
|
||||
// console.log(macFromName);
|
||||
// 与 this.mac 进行比较
|
||||
this.$u.get(`/app/device/${macFromName}/isBind`).then((res) => {
|
||||
if (res.data == false) {
|
||||
list.push(device)
|
||||
} else {
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.devicesList = list
|
||||
}, 200)
|
||||
|
||||
console.log('蓝牙停止搜索ok');
|
||||
} else {
|
||||
//蓝牙停止搜索失败
|
||||
console.log('蓝牙停止搜索失败');
|
||||
}
|
||||
this.searching = false
|
||||
// _this.setData({
|
||||
// searching: false
|
||||
// });
|
||||
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
page {
|
||||
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -248,9 +248,7 @@
|
|||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
uni.navigateBack()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -277,7 +275,7 @@
|
|||
success: (res) => {
|
||||
this.latitude = res.latitude;
|
||||
this.longitude = res.longitude;
|
||||
console.log(this.latitude, this.longitude);
|
||||
// console.log(this.latitude, this.longitude);
|
||||
},
|
||||
fail: function(err) {
|
||||
// 检查错误消息,看是否是用户取消了位置选择
|
||||
|
|
@ -334,6 +332,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,12 @@
|
|||
width: 25,
|
||||
height: 30,
|
||||
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
|
||||
distance: distance // 可以在这里也添加距离到覆盖物对象中,但通常只需要在店铺对象中
|
||||
distance: distance ,// 可以在这里也添加距离到覆盖物对象中,但通常只需要在店铺对象中
|
||||
label: {
|
||||
content: item.name,
|
||||
// anchorX:-20,
|
||||
textAlign: 'center'
|
||||
}
|
||||
};
|
||||
// console.log(this.gxlist);
|
||||
this.covers.push(shopCover); // 将店铺覆盖物添加到数组中
|
||||
|
|
@ -161,6 +166,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .map{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
|
|
|||
|
|
@ -118,6 +118,13 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .uicon-nav-back{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
|
||||
page {
|
||||
// background-color: ;
|
||||
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
|
|
|
|||
|
|
@ -38,6 +38,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar title="新增套餐" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
|
||||
<u-navbar title="套餐设置" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
|
||||
height='58'></u-navbar>
|
||||
<view class="box">
|
||||
<view class="list">
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
description: '',
|
||||
price: '',
|
||||
title: '',
|
||||
suitId:''
|
||||
suitId:'',
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
|
@ -154,6 +154,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,6 +90,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,6 +100,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
// background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,10 +24,7 @@
|
|||
@change="change" @confirm="confirm" @onclick="onclick" :listBackgroundColor='F7FAFE'></HM-dragSorts>
|
||||
|
||||
</view>
|
||||
<!-- <view class="btn" @click="sprice()">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uGAS855QnMnfJjPEKK5K" mode=""></image>
|
||||
新建分组
|
||||
</view> -->
|
||||
|
||||
<u-popup v-model="showpopup" mode="center" border-radius='20'>
|
||||
<view class="popcard" v-if="showremake">
|
||||
<view class="tit">
|
||||
|
|
@ -159,9 +156,14 @@
|
|||
},
|
||||
delgroup(id){
|
||||
this.$u.delete("/app/store/"+id).then((res) => {
|
||||
// this.$forceUpdate()
|
||||
if (res.code == 200) {
|
||||
this.getgroup();
|
||||
}else if(res.code == 500){
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration:2000
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -290,6 +292,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
background-color: #F7FAFE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,7 +159,12 @@
|
|||
longitude: item.lng,
|
||||
width: 25,
|
||||
height: 30,
|
||||
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4' // 你可以为每个店铺指定不同的图标
|
||||
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4' ,// 你可以为每个店铺指定不同的图标
|
||||
label: {
|
||||
content: item.name,
|
||||
// anchorX:-20,
|
||||
textAlign: 'center'
|
||||
}
|
||||
};
|
||||
this.covers.push(shopCover); // 将店铺覆盖物添加到数组中
|
||||
});
|
||||
|
|
@ -216,6 +221,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .map{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
|
|
|||
|
|
@ -105,6 +105,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
background: #F7FAFE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar :title="tittxt" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff' title-size='36'
|
||||
height='58' id="navbar">
|
||||
<u-navbar :title="tittxt" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff'
|
||||
title-size='36' height='58' id="navbar">
|
||||
</u-navbar>
|
||||
<view class="zhuhu">
|
||||
<view class="card1">
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
<view class="bot_right">
|
||||
<view class="cont" style="text-align: center;">
|
||||
<view class="tit">
|
||||
{{deviceInfo.orderCount}}
|
||||
{{deviceInfo.orderCount == null ? 0 : deviceInfo.orderCount}}
|
||||
</view>
|
||||
<view class="txt">
|
||||
订单数
|
||||
|
|
@ -182,6 +182,11 @@
|
|||
token: '',
|
||||
userImgs: '',
|
||||
imgflag: true,
|
||||
mac:"",
|
||||
name:'',
|
||||
deviceId:'',
|
||||
storeId:'',
|
||||
qrResult:''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
|
@ -198,48 +203,64 @@
|
|||
}, 1000)
|
||||
this.getQiniuToken()
|
||||
},
|
||||
onUnload: function() {
|
||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': false
|
||||
});
|
||||
},
|
||||
onHide() {
|
||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': false
|
||||
});
|
||||
},
|
||||
onBeforeUnmount() {
|
||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': false
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
async initChart() {
|
||||
let value = 100;
|
||||
let value2 = this.deviceInfo.orderAmount
|
||||
const option = {
|
||||
series: [{
|
||||
type: 'pie', // 饼图类型
|
||||
radius: ['98%', '70%'], // 饼图半径,第一个值是内半径,第二个值是外半径
|
||||
silent: true,
|
||||
clockwise: true,
|
||||
startAngle: 90, // 起始角度
|
||||
z: 0,
|
||||
zlevel: 0,
|
||||
data: [{
|
||||
value: value,
|
||||
name: '占比', // 数据项名称
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#8883F0', // 数据项颜色
|
||||
type: 'pie', // 饼图类型
|
||||
radius: ['98%', '70%'], // 饼图半径,第一个值是内半径,第二个值是外半径
|
||||
silent: true,
|
||||
clockwise: true,
|
||||
startAngle: 90, // 起始角度
|
||||
z: 0,
|
||||
zlevel: 0,
|
||||
data: [{
|
||||
value: value,
|
||||
name: '占比', // 数据项名称
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#8883F0', // 数据项颜色
|
||||
},
|
||||
},
|
||||
label: {
|
||||
normal: {
|
||||
position: 'center',
|
||||
formatter: ` {a|${value2 == null ? 0 : value2}}\n\n{b|订单金额}`, // 标签内容格式
|
||||
rich: {
|
||||
a: {
|
||||
fontSize: 15,
|
||||
fontWeight: '700',
|
||||
color: '#333',
|
||||
},
|
||||
},
|
||||
label: {
|
||||
normal: {
|
||||
position: 'center',
|
||||
formatter: ` {a|${value2}}\n\n{b|订单金额}`, // 标签内容格式
|
||||
rich: {
|
||||
a: {
|
||||
fontSize: 15,
|
||||
fontWeight: '700',
|
||||
color: '#333',
|
||||
},
|
||||
b: {
|
||||
fontSize: 11,
|
||||
color: '#888',
|
||||
},
|
||||
},
|
||||
b: {
|
||||
fontSize: 11,
|
||||
color: '#888',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
}, ],
|
||||
}, ],
|
||||
};
|
||||
|
||||
// console.log( this.$refs.chartRef,'1111');
|
||||
|
|
@ -281,7 +302,7 @@
|
|||
customPicture: _this.imglist
|
||||
}
|
||||
_this.putdevice(data)
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -292,6 +313,12 @@
|
|||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '修改成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}else if(res.code == 500){
|
||||
uni.showToast({
|
||||
title: '设备不在线',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
|
|
@ -305,6 +332,8 @@
|
|||
// this.$forceUpdate()
|
||||
if (res.code == 200) {
|
||||
this.deviceInfo = res.data
|
||||
this.storeId = res.data.storeId
|
||||
this.qrResult = 'CTKG-' + res.data.mac
|
||||
if (res.data.customPicture != '自定义图片路径') {
|
||||
this.imglist = res.data.customPicture
|
||||
} else {
|
||||
|
|
@ -316,7 +345,7 @@
|
|||
let expireTimePartsTime = expireTimeParts[1].split(":");
|
||||
let expireDate = new Date(expireDateParts[0], expireDateParts[1] - 1, expireDateParts[2],
|
||||
expireTimePartsTime[0], expireTimePartsTime[1], expireTimePartsTime[2]
|
||||
); // 注意月份是从0开始的,所以要减1
|
||||
); // 注意月份是从0开始的,所以要减1
|
||||
let now = new Date();
|
||||
let differenceInMs = expireDate - now;
|
||||
if (differenceInMs <= 0) {
|
||||
|
|
@ -414,13 +443,173 @@
|
|||
uni.navigateTo({
|
||||
url: '/page_user/setting?id=' + this.id
|
||||
})
|
||||
}else if(num == 5){
|
||||
} else if (num == 5) {
|
||||
console.log(this.deviceInfo);
|
||||
uni.navigateTo({
|
||||
url:'/page_fenbao/device/lianjie?mac=' + this.deviceInfo.mac + '&storeId=' + this.deviceInfo.storeId
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url: '/page_fenbao/device/lianjie?mac=' + this.deviceInfo.mac + '&storeId=' + this
|
||||
// .deviceInfo.storeId
|
||||
// })
|
||||
|
||||
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
|
||||
});
|
||||
}, 2000)
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
funListenDeviceMsgEvent: function(options) {
|
||||
switch (options.type) {
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS:
|
||||
if (options.result) {
|
||||
let devicesarr = options.data
|
||||
// console.log(devicesarr,'devicesarrdevicesarr');
|
||||
devicesarr.forEach(device => {
|
||||
const mac = device.name.substring(5);
|
||||
if (device.name == this.qrResult) {
|
||||
this.deviceId = device.deviceId
|
||||
this.name = device.name
|
||||
this.mac = device.name.slice(5,17)
|
||||
console.log(this.mac,'macmacmac');
|
||||
this.devicesList = uniqueDevicesList;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_CONNECTED:
|
||||
console.log("连接回调:" + JSON.stringify(options));
|
||||
if (options.result) {
|
||||
uni.hideLoading();
|
||||
// uni.showToast({
|
||||
// title: '连接成功',
|
||||
// icon: 'none'
|
||||
// });
|
||||
{
|
||||
console.log("连接回调options.data.deviceId:" + options.data.deviceId,
|
||||
"连接回调options.data.name:" + options.data.name);
|
||||
let name = ''
|
||||
let index = this.name.indexOf('-');
|
||||
if (index !== -1) {
|
||||
name = this.name.slice(index + 1);
|
||||
}
|
||||
let data = {
|
||||
storeId:this.storeId,
|
||||
mac:this.mac
|
||||
}
|
||||
this.$u.put('/app/device/bind', data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '绑定成功',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
uni.hideLoading();
|
||||
uni.removeStorageSync('mac');
|
||||
let systemInfo = uni.getSystemInfoSync();
|
||||
if (systemInfo.platform === 'android') {
|
||||
// 当前设备是 Android
|
||||
uni.navigateTo({
|
||||
url: '/page_components/wifilist/index?deviceId=' +
|
||||
options.data.deviceId + '&name=' + options.data.name
|
||||
})
|
||||
} else if (systemInfo.platform === 'ios') {
|
||||
// 当前设备是 iOS
|
||||
uni.navigateTo({
|
||||
url: '/page_fenbao/device/wifivideo?deviceId=' +
|
||||
options.data.deviceId + '&name=' + options.data.name
|
||||
})
|
||||
}
|
||||
|
||||
}else if(res.code == 500){
|
||||
uni.showToast({
|
||||
title: '该设备已被绑定',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '连接失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
// uni.navigateBack()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
|
||||
if (!options.result) {
|
||||
console.log("蓝牙未开启", options);
|
||||
uni.showToast({
|
||||
title: '蓝牙未开启',
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
});
|
||||
} else {
|
||||
// this.searching = true
|
||||
//蓝牙搜索开始
|
||||
// _this.setData({
|
||||
// searching: true
|
||||
// });
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_STOP:
|
||||
if (options.result) {
|
||||
let uniqueDevicesList = Array.from(new Set(this.devicesList));
|
||||
|
||||
// 将去重后的数组重新赋值给 this.devicesList
|
||||
this.devicesList = uniqueDevicesList;
|
||||
let list = []
|
||||
filteredDevices.forEach(device => {
|
||||
// 从设备名称中提取 MAC 地址(假设 MAC 地址是设备名称的后6个字符)
|
||||
let macFromName = device.name.substring(device.name.length - 12);
|
||||
this.$u.get(`/app/device/${macFromName}/isBind`).then((res) => {
|
||||
if (res.data == false) {
|
||||
list.push(device)
|
||||
} else {
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.devicesList = list
|
||||
}, 200)
|
||||
|
||||
console.log('蓝牙停止搜索ok');
|
||||
} else {
|
||||
//蓝牙停止搜索失败
|
||||
console.log('蓝牙停止搜索失败');
|
||||
}
|
||||
this.searching = false
|
||||
// _this.setData({
|
||||
// searching: false
|
||||
// });
|
||||
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -477,6 +666,7 @@
|
|||
image {
|
||||
width: 170rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -441,6 +441,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
background-color: #F7FAFE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,6 +87,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
background-color: #F7FAFE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
background-color: #F7FAFE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,6 +205,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
background-color: #F7FAFE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,7 +159,8 @@
|
|||
// this.$forceUpdate()
|
||||
if (res.code == 200) {
|
||||
this.userinfo=res.data
|
||||
console.log(this.userinfo);
|
||||
this.money = ''
|
||||
// console.log(this.userinfo);
|
||||
|
||||
}
|
||||
});
|
||||
|
|
@ -170,6 +171,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss" >
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page{
|
||||
background: #F7FAFE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -386,6 +386,14 @@
|
|||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "chongzhi",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#4473f6",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
}, {
|
||||
|
|
|
|||
|
|
@ -20,11 +20,15 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fd">
|
||||
<view class="fd" >
|
||||
<view class="fd_top">
|
||||
|
||||
<view class="fd_tit">
|
||||
{{titlist}}
|
||||
<view class="fd_da">
|
||||
<view class="fd_lt">
|
||||
<view class="fd_tit" v-for="(item,index) in groupLists" :key="index"
|
||||
:class="index==curtitidx?'act1':''" @click="changeidx(index)">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<!-- <view class="fd_set" @click="show = true">
|
||||
|
|
@ -50,7 +54,8 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="card_cont">
|
||||
<view class="cards" v-for="(item,index) in groupLists" :key="index" @click="changeGp(item)">
|
||||
<view class="cards" v-for="(item,index) in groupLists" :key="index" >
|
||||
<!-- //@click="changeGp(item)" -->
|
||||
<view class="txt">
|
||||
{{item.name}}
|
||||
</view>
|
||||
|
|
@ -63,47 +68,47 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="warp_box">
|
||||
<view class="swiper" style="height: 100%;" :current='curtitidx' @change="swiperchange">
|
||||
<view>
|
||||
<view class="swiper-item ">
|
||||
<view class="card_box" @scrolltolower="onReachBottom" @click="todetail(item.deviceId)"
|
||||
v-for="(item,index) in wateringList" :key="index">
|
||||
<view class="card">
|
||||
<view class="card_left">
|
||||
<view class="card_left_tit">
|
||||
{{item.deviceName}}
|
||||
|
||||
<swiper class="swiper" style="height: 100%;margin-top: 20rpx;" :current='curtitidx' @change="swiperchange" @scrolltolower="onReachBottom">
|
||||
<swiper-item v-for="(item,index) in groupLists" :key="index">
|
||||
<view class="" v-if="shujuflag">
|
||||
暂无设备...
|
||||
</view>
|
||||
<view class="swiper-item " >
|
||||
<view class="card_box" @click="todetail(item.deviceId)"
|
||||
v-for="(item,index) in wateringList" :key="index">
|
||||
<view class="card" >
|
||||
<view class="card_left">
|
||||
<view class="card_left_tit">
|
||||
{{item.deviceName}}
|
||||
</view>
|
||||
<view class="card_left_sta">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uZSiz7XWpxcXEkl6sTwj"
|
||||
mode=""></image>
|
||||
<view class="sta_txt" v-if="item.status==3">
|
||||
维修中
|
||||
</view>
|
||||
<view class="card_left_sta">
|
||||
<image
|
||||
src="https://api.ccttiot.com/smartmeter/img/static/uZSiz7XWpxcXEkl6sTwj"
|
||||
mode=""></image>
|
||||
<view class="sta_txt" v-if="item.status==3">
|
||||
维修中
|
||||
</view>
|
||||
<view class="sta_txt" v-if="item.status==2" style="color:#ccc;">
|
||||
使用中
|
||||
</view>
|
||||
<view class="sta_txt" v-if="item.status==1" style="color:seagreen;">
|
||||
正常
|
||||
</view>
|
||||
<view class="sta_txt" v-if="item.status==2" style="color:greenyellow;">
|
||||
使用中
|
||||
</view>
|
||||
<view class="card_left_no">
|
||||
S/N码:{{item.deviceNo}}
|
||||
<view class="sta_txt" v-if="item.status==1" style="color:seagreen;">
|
||||
正常
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_right">
|
||||
<image :src="item.picture" mode=""></image>
|
||||
<view class="card_left_no">
|
||||
S/N码:{{item.deviceNo}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_right">
|
||||
<image v-if="item.customPicture" :src="item.customPicture" mode="" style="border-radius: 20rpx;"></image>
|
||||
<image v-else :src="item.picture" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- <view style="margin-left:200rpx; color: #ccc;font-size: 36rpx;margin-top: 200rpx;width: 750rpx;">
|
||||
该店铺暂无设备...</view> -->
|
||||
</view>
|
||||
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
</view>
|
||||
|
||||
|
|
@ -185,14 +190,15 @@
|
|||
isLoading: false,
|
||||
noMoreData: false,
|
||||
total: 0,
|
||||
shujuflag:false
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.wateringList = []
|
||||
this.pagenum = 1
|
||||
this.wateringList = []
|
||||
this.logins();
|
||||
this.getgroup();
|
||||
this.deviceId = uni.getStorageSync('deviceIds');
|
||||
|
|
@ -237,6 +243,13 @@
|
|||
}, 2000);
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
tocz() {
|
||||
this.showtip = false
|
||||
uni.navigateTo({
|
||||
|
|
@ -344,9 +357,12 @@
|
|||
// 有数据,追加到列表
|
||||
this.wateringList = this.wateringList.concat(res.rows)
|
||||
this.pagenum++
|
||||
this.shujuflag = false
|
||||
uni.hideLoading()
|
||||
} else {
|
||||
// 没有更多数据
|
||||
|
||||
this.shujuflag = true
|
||||
uni.hideLoading()
|
||||
}
|
||||
this.isLoading = false;
|
||||
}
|
||||
|
|
@ -362,9 +378,12 @@
|
|||
// 有数据,追加到列表
|
||||
this.wateringList = this.wateringList.concat(res.rows)
|
||||
this.pagenum++
|
||||
this.shujuflag = false
|
||||
uni.hideLoading()
|
||||
} else {
|
||||
// 没有更多数据
|
||||
|
||||
this.shujuflag = true
|
||||
uni.hideLoading()
|
||||
}
|
||||
this.isLoading = false;
|
||||
}
|
||||
|
|
@ -415,7 +434,7 @@
|
|||
this.titlist = item.name
|
||||
this.$u.get(
|
||||
`/app/device/list?storeId=${item.storeId}&pageNum=${this.pagenum}&pageSize=${this.pagesize}`
|
||||
).then((res) => {
|
||||
).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.total = res.total
|
||||
if (res.rows.length > 0) {
|
||||
|
|
@ -695,8 +714,15 @@
|
|||
|
||||
},
|
||||
swiperchange(e) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
this.wateringList = []
|
||||
this.pagenum = 1
|
||||
this.curtitidx = e.detail.current
|
||||
// console.log(e, 'aaaa');
|
||||
// console.log(this.groupLists[this.curtitidx].storeId)
|
||||
this.storeId = this.groupLists[this.curtitidx].storeId
|
||||
this.getlist()
|
||||
},
|
||||
|
||||
getdevice() {
|
||||
|
|
@ -745,11 +771,19 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
page {
|
||||
background-color: #F7FAFE;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.page {
|
||||
height: 100%;
|
||||
padding-bottom: 200rpx;
|
||||
|
||||
.tip_box {
|
||||
|
|
@ -1214,20 +1248,52 @@
|
|||
flex-wrap: nowrap;
|
||||
// justify-content: space-between;
|
||||
align-items: center;
|
||||
// position: fixed;
|
||||
// top: 220rpx;
|
||||
// left: 50%;
|
||||
// transform: translateX(-50%);
|
||||
.fd_da {
|
||||
width: 600rpx;
|
||||
// overflow-x: scroll;
|
||||
overflow: hidden;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
-ms-overflow-style: none;
|
||||
/* 去除IE和Edge的默认滚动条 */
|
||||
scrollbar-width: none;
|
||||
|
||||
.fd_tit {
|
||||
// width: 40%;
|
||||
/* 去除Firefox的默认滚动条 */
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
margin-right: 20rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: 400;
|
||||
color: #666;
|
||||
.fd_lt {
|
||||
width: 100vh;
|
||||
display: flex;
|
||||
|
||||
.fd_tit {
|
||||
// width: 40%;
|
||||
text-align: center;
|
||||
// width: 100%;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
// margin-right: 20rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: 400;
|
||||
color: #666;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.act1 {
|
||||
color: #000000;
|
||||
font-weight: 700 !important;
|
||||
color: #000000 !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.right {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
|
|
@ -1249,12 +1315,24 @@
|
|||
}
|
||||
|
||||
}
|
||||
.shebei{
|
||||
width: 750rpx;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
text-align: center;
|
||||
padding-top: 300rpx;
|
||||
font-size: 32rpx;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
// height: 100vh;
|
||||
.swiper-item {
|
||||
|
||||
height: 100%;
|
||||
|
||||
height: 100vh;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 660rpx;
|
||||
.card_box {
|
||||
margin-top: 34rpx;
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -4,35 +4,39 @@
|
|||
<view class="useryonghu">
|
||||
<u-navbar :is-back="false" title="首页" :border-bottom="false" :background="bgc" title-color='#fff'
|
||||
title-size='44' height='58'></u-navbar>
|
||||
<!-- <view class="title">
|
||||
充电宝
|
||||
</view> -->
|
||||
<view class="ditu">
|
||||
<view class="dtxs">
|
||||
<map class='map' :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick"
|
||||
:show-location="true" :markers="covers" :scale="15"/>
|
||||
@scale="onMapScaleChange" :show-location="true" :markers="covers" :scale="mapScale" />
|
||||
</view>
|
||||
<view class="fujin">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u7HPhEwbIJqbLRpImBON" mode="" @click="btnindex(5)"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uGVN2tOaCq2hiWKy1cYl" mode="" @click="btnindex(6)" v-if="isMch"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uzSmYNgLYJRMEmo4TWyA" mode="" @click="btnindex(7)"
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u7HPhEwbIJqbLRpImBON" mode=""
|
||||
@click="btnindex(5)"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uGVN2tOaCq2hiWKy1cYl" mode=""
|
||||
@click="btnindex(6)" v-if="isMch"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uzSmYNgLYJRMEmo4TWyA" mode=""
|
||||
@click="btnindex(7)"
|
||||
style="width: 58rpx;height: 58rpx;position: fixed;top: 940rpx;right: 60rpx;"></image>
|
||||
</view>
|
||||
<view class="tubiao">
|
||||
<view class="gr" @click="btnindex(1)">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uJBKoGWpRH2lM1NpQU0I" mode="" style="width: 96rpx;height:98rpx;"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uJBKoGWpRH2lM1NpQU0I" mode=""
|
||||
style="width: 96rpx;height:98rpx;"></image>
|
||||
<!-- 个人中心 -->
|
||||
</view>
|
||||
<view class="gr" @click="btnindex(2)">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u8rWtdPtHabALkII23Zr" mode="" style="width: 96rpx;height:102rpx;"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u8rWtdPtHabALkII23Zr" mode=""
|
||||
style="width: 96rpx;height:102rpx;"></image>
|
||||
<!-- 我的订单 -->
|
||||
</view>
|
||||
<view class="gr" @click="btnindex(3)">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uphoDfOVnT6VEyj6glfF" mode="" style="width: 96rpx;height:98rpx;"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uphoDfOVnT6VEyj6glfF" mode=""
|
||||
style="width: 96rpx;height:98rpx;"></image>
|
||||
<!-- 附近门店 -->
|
||||
</view>
|
||||
<view class="gr" @click="btnindex(4)">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uBN46m7mPVlbbPth80FC" mode="" style="width: 96rpx;height:94rpx;"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uBN46m7mPVlbbPth80FC" mode=""
|
||||
style="width: 96rpx;height:94rpx;"></image>
|
||||
<!-- 联系客服 -->
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -41,10 +45,29 @@
|
|||
</view>
|
||||
<view class="saoma" @click="scanQRCode">
|
||||
<view>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uBh15vzRx6gV0wRQj7gi" mode=""></image>扫一扫
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uBh15vzRx6gV0wRQj7gi" mode=""></image>
|
||||
扫一扫
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tip_box" v-if="czflag">
|
||||
<view class="top">
|
||||
<view class="txt">
|
||||
系统检测到您的设备未联网或者为蓝牙版本,金额充值失败,请靠近设备进行蓝牙充值
|
||||
</view>
|
||||
</view>
|
||||
<view class="bot">
|
||||
<view class="bot_left" @click="czflag = false">
|
||||
取消
|
||||
</view>
|
||||
<view class="bot_right" @click="tocz()">
|
||||
蓝牙充值
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -69,33 +92,46 @@
|
|||
jinweidu: '',
|
||||
userType: '',
|
||||
isMch: false,
|
||||
imgad:''
|
||||
imgad: '',
|
||||
|
||||
mapScale: 15,
|
||||
czflag:false,
|
||||
datetime:0,
|
||||
dingobj:''
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
// this.initOtherCovers(); // 初始化其他覆盖物
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.logins();
|
||||
this.getad()
|
||||
this.gethuidaio()
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
onMapScaleChange(e) {
|
||||
// console.log(this.covers,'eeeeeeeee');
|
||||
this.mapScale = e.detail.scale; // 更新当前缩放级别
|
||||
this.getMyLocation()
|
||||
// this.covers.forEach(marker => {
|
||||
// marker.label.content = this.mapScale > 13 ? marker.label.content : '';
|
||||
// });
|
||||
},
|
||||
|
||||
scanQRCode() {
|
||||
|
||||
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
scanType: ['qrCode'],
|
||||
success: res => {
|
||||
// console.log('扫描结果:', res);
|
||||
let id = res.result
|
||||
this.$u.get(`/app/device/${res.result}/withSuitList`).then((res) =>{
|
||||
if(res.code == 200){
|
||||
this.$u.get(`/app/device/${res.result}/withSuitList`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.navigateTo({
|
||||
url: '/page_components/fuwu/index?id=' + id
|
||||
})
|
||||
|
|
@ -112,14 +148,16 @@
|
|||
});
|
||||
},
|
||||
|
||||
getad(){
|
||||
getad() {
|
||||
this.$u.get("/app/ad").then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.imgad = res.data.picture
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
btnindex(num) {
|
||||
if (num == 2) {
|
||||
|
|
@ -153,18 +191,21 @@
|
|||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
getMyLocation() {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: (res) => {
|
||||
console.log('我的位置:', res);
|
||||
// console.log('我的位置:', res);
|
||||
this.latitude = res.latitude;
|
||||
this.longitude = res.longitude;
|
||||
this.jinweidu = this.longitude + ',' + this.latitude;
|
||||
// 请求附近的店铺
|
||||
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(res => {
|
||||
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(
|
||||
res => {
|
||||
if (res.code == 200) {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
// 假设返回的店铺数据在res.rows中,并且每个店铺有latitude和longitude字段
|
||||
res.data.forEach(item => {
|
||||
const shopCover = {
|
||||
|
|
@ -173,11 +214,11 @@
|
|||
longitude: item.lng,
|
||||
width: 25,
|
||||
height: 30,
|
||||
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4' ,// 你可以为每个店铺指定不同的图标
|
||||
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4', // 你可以为每个店铺指定不同的图标
|
||||
label: {
|
||||
content: item.name,
|
||||
// anchorX:-20,
|
||||
textAlign:'center'
|
||||
// anchorX:-20,
|
||||
textAlign: 'center'
|
||||
}
|
||||
};
|
||||
this.covers.push(shopCover); // 将店铺覆盖物添加到数组中
|
||||
|
|
@ -252,6 +293,28 @@
|
|||
},
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
gethuidaio(){
|
||||
this.$u.get('/app/bill/recharge/device/fail/list').then(res => {
|
||||
if(res.code == 200){
|
||||
if(res.data.length > 0){
|
||||
this.czflag = true
|
||||
this.dingobj = res.data
|
||||
}else{
|
||||
uni.removeStorageSync('time')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
tocz(){
|
||||
this.czflag = false
|
||||
uni.navigateTo({
|
||||
url:'/page_fenbao/chongzhi?dingobj=' + JSON.stringify(this.dingobj)
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
|
|
@ -262,6 +325,13 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 41rpx;
|
||||
}
|
||||
|
||||
/deep/ .map {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
|
@ -282,11 +352,57 @@
|
|||
padding-left: 34rpx;
|
||||
padding-right: 34rpx;
|
||||
box-sizing: border-box;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
height: 100%;
|
||||
// 代理样式
|
||||
.tip_box{
|
||||
position: fixed;
|
||||
left: 72rpx;
|
||||
top: 700rpx;
|
||||
width: 610rpx;
|
||||
background: #F7FAFE;
|
||||
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
||||
z-index: 10000000;
|
||||
.top{
|
||||
padding: 52rpx 38rpx 42rpx 36rpx;
|
||||
.txt{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
}
|
||||
.bot{
|
||||
border-top: 2rpx solid #D8D8D8 ;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
height: 100%;
|
||||
.bot_left{
|
||||
width: 50%;
|
||||
height: 98rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.bot_right{
|
||||
width: 50%;
|
||||
height: 98rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
border-left: 2rpx solid #D8D8D8 ;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #8883F0;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.userdaili {
|
||||
.gongneng {
|
||||
width: 680rpx;
|
||||
|
|
@ -373,7 +489,6 @@
|
|||
display: inline-block;
|
||||
width: 148rpx;
|
||||
height: 84rpx;
|
||||
// background: #E1F3ED;
|
||||
text-align: center;
|
||||
line-height: 84rpx;
|
||||
}
|
||||
|
|
@ -465,7 +580,7 @@
|
|||
}
|
||||
|
||||
.guangg {
|
||||
|
||||
|
||||
image {
|
||||
border-radius: 30rpx;
|
||||
width: 680rpx;
|
||||
|
|
@ -510,7 +625,7 @@
|
|||
height: 980rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 38rpx 38rpx 38rpx 38rpx;
|
||||
margin-top: 34rpx;
|
||||
// margin-top: 34rpx;
|
||||
padding-top: 16rpx;
|
||||
|
||||
.fujin {
|
||||
|
|
|
|||
25
pages/tj.vue
25
pages/tj.vue
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar :is-back="false" title="统计" :border-bottom="false" :background="bgc" title-color='#fff'
|
||||
title-size='44' height='58' id="navbar">
|
||||
title-size='44' height='48' id="navbar">
|
||||
</u-navbar>
|
||||
|
||||
<view v-if="userType=='01'">
|
||||
|
|
@ -20,11 +20,12 @@
|
|||
本月收入{{recharge}}(元) 累计收入{{totalRecharge}}(元)
|
||||
</view>
|
||||
|
||||
<view class="echarts">
|
||||
<uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas" canvas-id="uni-ec-canvas" :ec="ec"></uni-ec-canvas>
|
||||
<view class="echarts" >
|
||||
<!-- <uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas" canvas-id="uni-ec-canvas" :ec="ec"></uni-ec-canvas> -->
|
||||
<uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas" canvas-id="uni-ec-canvas" :ec="ec"></uni-ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list" style="padding-bottom: 120rpx;">
|
||||
<view class="list" style="padding-bottom: 240rpx;">
|
||||
<view class="card_list" v-for="(item,index) in timelist" :key="index">
|
||||
<view class="left">
|
||||
{{yeartime.year + '年' + yeartime.month + '月' + item.createDay + '日'}}
|
||||
|
|
@ -101,7 +102,6 @@
|
|||
recharge: 0,
|
||||
bgc: {
|
||||
backgroundColor: "#8883f0",
|
||||
|
||||
},
|
||||
show: false,
|
||||
yeartime: {
|
||||
|
|
@ -171,7 +171,7 @@
|
|||
|
||||
year: this.yeartime.year,
|
||||
month: this.yeartime.month,
|
||||
groupBy: 'create_day'
|
||||
groupBy: 'create_date'
|
||||
}
|
||||
this.loging = false
|
||||
this.$u.get('app/bill/landlordCount', data).then((res) => {
|
||||
|
|
@ -426,6 +426,13 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.uni-ec-canvas {
|
||||
width: 100%;
|
||||
height: 320rpx;
|
||||
|
|
@ -462,7 +469,7 @@
|
|||
|
||||
.card {
|
||||
padding-top: 32rpx;
|
||||
margin-top: 46rpx;
|
||||
margin-top: 10rpx;
|
||||
width: 632rpx;
|
||||
height: 586rpx;
|
||||
background: #8883F0;
|
||||
|
|
@ -506,8 +513,8 @@
|
|||
// height: 80%;
|
||||
width: 588rpx;
|
||||
height: 320rpx;
|
||||
|
||||
|
||||
// overflow: hidden;
|
||||
// overflow-x: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user