茶室
This commit is contained in:
parent
bdb5acf275
commit
a3f28e8053
|
@ -20,7 +20,7 @@ const install = (Vue, vm) => {
|
|||
// },
|
||||
// https://yxd.ccttiot.com/prod-api});
|
||||
Vue.prototype.$u.http.setConfig({
|
||||
// baseUrl: 'http://192.168.2.116:8089',
|
||||
// baseUrl: 'http://192.168.2.43:8089',
|
||||
baseUrl: 'https://testcha.chuangtewl.com/prod-api',
|
||||
loadingText: '努力加载中~',
|
||||
loadingTime: 800,
|
||||
|
|
|
@ -63,7 +63,8 @@
|
|||
"appid" : "wx38be729b2bb6de33",
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"minified" : true
|
||||
"minified" : true,
|
||||
"es6" : true
|
||||
},
|
||||
"usingComponents" : true,
|
||||
"optimization" : {
|
||||
|
|
194
page_fenbaotwo/duizhangdan.vue
Normal file
194
page_fenbaotwo/duizhangdan.vue
Normal file
|
@ -0,0 +1,194 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar title="对账单" :border-bottom="false" :background="bgc" back-icon-color="#262B37" title-color='#262B37'
|
||||
title-size='36' height='50' id="navbar">
|
||||
</u-navbar>
|
||||
<view class="toptab">
|
||||
<view class="" @click="show = true">
|
||||
时间范围<u-icon name="arrow-down-fill" color="#3D3D3D" size="24"></u-icon>
|
||||
</view>
|
||||
<view class="">
|
||||
<text class="one" @click="btntime(1)">{{kstime}}</text>--<text class="one" @click="btntime(2)">{{jstime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<u-picker mode="time" v-model="showtime" :params="params" @confirm='confirmkstime'></u-picker>
|
||||
<scroll-view class="list"
|
||||
scroll-y="true"
|
||||
:scroll-with-animation="true"
|
||||
@scrolltolower="handleScrollToLower">
|
||||
<view class="list_item" v-for="(item,index) in 2" :key="index" @click="btnxq(item.orderNo)">
|
||||
<view class="top">
|
||||
2024-04-28
|
||||
</view>
|
||||
<view class="wz">
|
||||
<view class=""><text>支付金额:</text>¥0.00</view> <view class=""><text>已退款:</text>¥0.00</view>
|
||||
</view>
|
||||
<view class="wz">
|
||||
<view class=""><text>押金:</text>¥0.00</view> <view class=""><text>收入:</text>¥0.00</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="width: 100%;text-align: center;font-size: 32rpx;color: #ccc;margin-top: 30rpx;">
|
||||
没有更多账单啦...
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
bgc: {
|
||||
backgroundColor: "#fff",
|
||||
},
|
||||
kstime:'',
|
||||
jstime:'',
|
||||
num:'',
|
||||
orderlist:[],
|
||||
pagenum:1,
|
||||
pagesize:10,
|
||||
total:0,
|
||||
params: {
|
||||
year: true,
|
||||
month: true,
|
||||
day: true,
|
||||
hour: false,
|
||||
minute: false,
|
||||
second: false
|
||||
},
|
||||
showtime: false,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.pagenum = 1
|
||||
this.orderlist = []
|
||||
this.getlist()
|
||||
},
|
||||
methods: {
|
||||
// 监听滚动到底部
|
||||
handleScrollToLower() {
|
||||
if(this.total == this.orderlist.length){
|
||||
uni.showToast({
|
||||
title: '没有更多订单了',
|
||||
icon: 'none',
|
||||
duration:2000
|
||||
})
|
||||
}else{
|
||||
this.getlist()
|
||||
}
|
||||
},
|
||||
// 点击选择时间
|
||||
btntime(num){
|
||||
this.showtime = true
|
||||
this.num = num
|
||||
},
|
||||
// 筛选开始时间
|
||||
confirmkstime(e){
|
||||
if(this.num == 1){
|
||||
this.kstime = e.year + '-' + e.month + '-' + e.day
|
||||
if(this.jstime != ''){
|
||||
this.pagenum = 1
|
||||
this.orderlist = []
|
||||
this.getlist()
|
||||
}
|
||||
}else{
|
||||
this.jstime = e.year + '-' + e.month + '-' + e.day
|
||||
if(this.kstime != ''){
|
||||
this.pagenum = 1
|
||||
this.orderlist = []
|
||||
this.getlist()
|
||||
}
|
||||
}
|
||||
},
|
||||
// 请求订单列表
|
||||
getlist(){
|
||||
this.$u.get(`/app/order/orderList?pageNum=${this.pagenum}&pageSize=${this.pagesize}&statusList=${this.zttxtid}&startTime=${this.kstime}&endTime=${this.jstime}`).then(res =>{
|
||||
if(res.code == 200){
|
||||
this.total = res.total
|
||||
if(this.pagenum > 1){
|
||||
this.pagenum++
|
||||
this.orderlist = this.orderlist.concat(res.rows)
|
||||
}else{
|
||||
this.pagenum++
|
||||
this.orderlist = res.rows
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .uicon-nav-back,
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
/deep/ .uicon-arrow-down-fill{
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
.list{
|
||||
width: 100%;
|
||||
height: 80vh;
|
||||
overflow: scroll;
|
||||
.list_item{
|
||||
width: 750rpx;
|
||||
max-height: 420rpx;
|
||||
background: #FFFFFF;
|
||||
margin-top: 20rpx;
|
||||
padding-bottom: 40rpx;
|
||||
box-sizing: border-box;
|
||||
.top{
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
border-bottom: 1px solid #D8D8D8;
|
||||
padding:22rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 26rpx;
|
||||
}
|
||||
.wz{
|
||||
display: flex;
|
||||
width: 100%;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 10rpx;
|
||||
view{
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
.toptab{
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 50rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
view{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.one{
|
||||
display: inline-block;
|
||||
width: 200rpx;
|
||||
height: 50rpx;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 10rpx;
|
||||
line-height: 50rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
|
@ -7,10 +7,10 @@
|
|||
<view class="top_box">
|
||||
<view class="tip">账户余额(元)</view>
|
||||
<view class="txt">
|
||||
¥1256
|
||||
¥0
|
||||
</view>
|
||||
<view class="tip" style="display: flex;justify-content: space-between;">
|
||||
<text>累计提现:¥2356</text>
|
||||
<text>累计提现:¥0</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tit">
|
||||
|
|
335
page_fenbaotwo/wifipz.vue
Normal file
335
page_fenbaotwo/wifipz.vue
Normal file
|
@ -0,0 +1,335 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar title="WIFI配置" :border-bottom="false" :background="bgc" back-icon-color="#262B37" title-color='#262B37'
|
||||
title-size='36' height='50' id="navbar">
|
||||
</u-navbar>
|
||||
<view class="box">
|
||||
<view class="orderqx">
|
||||
<view class="top">
|
||||
<view class="one">
|
||||
WIFI设置
|
||||
</view>
|
||||
<view class="two" @click="delflag = !delflag">
|
||||
编辑
|
||||
</view>
|
||||
</view>
|
||||
<view class="toptab">
|
||||
<view class="">WIFI名称</view>
|
||||
<view class="">WIFI密码</view>
|
||||
<view class="" v-if="delflag">操作</view>
|
||||
</view>
|
||||
<view class="bottab" v-for="(item,index) in 3" :key="index">
|
||||
<view class="">chuangteA</view>
|
||||
<view class="">123456789</view>
|
||||
<view class="" v-if="delflag">
|
||||
<text style="color: #000;" @click="btnxg">编辑</text> <text>删除</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="addpz" @click="flag = true">
|
||||
添加WIFI
|
||||
</view>
|
||||
</view>
|
||||
<view class="wifilist">
|
||||
<view class="name">
|
||||
WIFI配置
|
||||
</view>
|
||||
<view class="list_item" v-for="(item,index) in 6" :key="index" @click="btnroom">
|
||||
<view class="">
|
||||
房间{{index}}
|
||||
</view>
|
||||
<view class="">
|
||||
chuangteA <u-icon name="arrow-right" color="#7C7C7C" size="28"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="anniu">
|
||||
<view class="">
|
||||
保存
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="mask" v-if="flag"></view>
|
||||
<view class="addwifi" v-if="flag">
|
||||
<view class="name">
|
||||
添加WIFI
|
||||
</view>
|
||||
<view class="one">
|
||||
<view class="">
|
||||
WIFI名称
|
||||
</view>
|
||||
<input type="text" placeholder="输入WIFI名称"/>
|
||||
</view>
|
||||
<view class="one">
|
||||
<view class="">
|
||||
WIFI密码
|
||||
</view>
|
||||
<input type="text" placeholder="输入WIFI密码"/>
|
||||
</view>
|
||||
<view class="baocun">
|
||||
保存
|
||||
</view>
|
||||
<view class="cha" @click="flag = false">×</view>
|
||||
</view>
|
||||
<view class="mask" v-if="editflag"></view>
|
||||
<view class="addwifi" v-if="editflag">
|
||||
<view class="name">
|
||||
修改WIFI
|
||||
</view>
|
||||
<view class="one">
|
||||
<view class="">
|
||||
WIFI名称
|
||||
</view>
|
||||
<input type="text" placeholder="输入WIFI名称"/>
|
||||
</view>
|
||||
<view class="one">
|
||||
<view class="">
|
||||
WIFI密码
|
||||
</view>
|
||||
<input type="text" placeholder="输入WIFI密码"/>
|
||||
</view>
|
||||
<view class="baocun">
|
||||
修改
|
||||
</view>
|
||||
<view class="cha" @click="editflag = false">×</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
bgc: {
|
||||
backgroundColor: "#fff",
|
||||
},
|
||||
flag:false,
|
||||
delflag:false,
|
||||
editflag:false
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 点击修改WIFI
|
||||
btnxg(){
|
||||
this.editflag = true
|
||||
},
|
||||
// 点击房间或者大厅配置WIFI
|
||||
btnroom(){
|
||||
uni.navigateTo({
|
||||
url:'/page_fenbaotwo/wifixz'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .uicon-nav-back,
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.addwifi{
|
||||
width: 750rpx;
|
||||
height: 598rpx;
|
||||
background: #FFFFFF;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
border-radius: 50rpx 50rpx 0 0;
|
||||
padding: 0 72rpx;
|
||||
box-sizing: border-box;
|
||||
.cha{
|
||||
color: #3D3D3D;
|
||||
font-size: 50rpx;
|
||||
font-weight: 600;
|
||||
position: absolute;
|
||||
top: 30rpx;
|
||||
right: 30rpx;
|
||||
}
|
||||
.baocun{
|
||||
width: 680rpx;
|
||||
height: 104rpx;
|
||||
background: #48893B;
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
line-height: 104rpx;
|
||||
border-radius: 24rpx;
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: 32rpx;
|
||||
}
|
||||
.one{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 34rpx;
|
||||
border-bottom: 1px solid #D8D8D8;
|
||||
margin-top: 58rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
input{
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
.name{
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 42rpx;
|
||||
margin-bottom: 86rpx;
|
||||
}
|
||||
}
|
||||
.mask{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #000;
|
||||
opacity: .2;
|
||||
}
|
||||
.wifilist{
|
||||
width: 680rpx;
|
||||
max-height: 111308rpx;
|
||||
background: #FFFFFF;
|
||||
margin: auto;
|
||||
border-radius: 24rpx;
|
||||
margin-top: 22rpx;
|
||||
padding: 36rpx 34rpx;
|
||||
box-sizing: border-box;
|
||||
.list_item{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 30rpx;
|
||||
padding-bottom: 30rpx;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #D8D8D8;
|
||||
}
|
||||
.name{
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.list_item{
|
||||
|
||||
}
|
||||
}
|
||||
.box{
|
||||
height: 86vh;
|
||||
overflow: scroll;
|
||||
padding-bottom: 100rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.anniu{
|
||||
width: 750rpx;
|
||||
height: 152rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0,0,0,0.3);
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
padding-top: 24rpx;
|
||||
box-sizing: border-box;
|
||||
view{
|
||||
width: 680rpx;
|
||||
height: 104rpx;
|
||||
background: #48893B;
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
line-height: 104rpx;
|
||||
border-radius: 24rpx;
|
||||
}
|
||||
}
|
||||
.addpz{
|
||||
font-size: 28rpx;
|
||||
color: #48893B;
|
||||
text-align: center;
|
||||
line-height: 66rpx;
|
||||
width: 100%;
|
||||
height: 66rpx;
|
||||
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
||||
border: 1rpx dashed #48893B;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.orderqx{
|
||||
width: 680rpx;
|
||||
max-height: 49200rpx;
|
||||
background: #FFFFFF;
|
||||
margin: auto;
|
||||
margin-top: 22rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 36rpx 34rpx;
|
||||
padding-bottom: 28rpx;
|
||||
box-sizing: border-box;
|
||||
.tongzhi{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 34rpx;
|
||||
padding-bottom: 20rpx;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #D8D8D8;
|
||||
}
|
||||
.bottab{
|
||||
width: 100%;
|
||||
height: 76rpx;
|
||||
line-height: 76rpx;
|
||||
background: #fff;
|
||||
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
||||
display: flex;
|
||||
view{
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
text{
|
||||
display: inline-block;
|
||||
margin-left: 20rpx;
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
}
|
||||
.toptab{
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
height: 76rpx;
|
||||
line-height: 76rpx;
|
||||
background: #F0F0F0;
|
||||
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
||||
display: flex;
|
||||
view{
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.top{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.one{
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.two{
|
||||
font-size: 28rpx;
|
||||
color: #48893B;
|
||||
}
|
||||
}
|
||||
}
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
115
page_fenbaotwo/wifixz.vue
Normal file
115
page_fenbaotwo/wifixz.vue
Normal file
|
@ -0,0 +1,115 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar title="WiFi选择" :border-bottom="false" :background="bgc" back-icon-color="#262B37" title-color='#262B37'
|
||||
title-size='36' height='50' id="navbar">
|
||||
</u-navbar>
|
||||
<view class="list">
|
||||
<view class="name">
|
||||
WiFi列表
|
||||
</view>
|
||||
<view class="list_wifi">
|
||||
<view class="item_wifi" v-for="(item,index) in 5" :key="index">
|
||||
chuangteA
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="anniu">
|
||||
<view class="">
|
||||
确认选择
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
bgc: {
|
||||
backgroundColor: "#fff",
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .u-iconfont,
|
||||
/deep/ .u-title{
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.anniu{
|
||||
width: 750rpx;
|
||||
height: 152rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0,0,0,0.3);
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
padding-top: 20rpx;
|
||||
box-sizing: border-box;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
view{
|
||||
width: 680rpx;
|
||||
height: 104rpx;
|
||||
background: #48893B;
|
||||
text-align: center;
|
||||
line-height: 104rpx;
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
margin: auto;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
.list{
|
||||
width: 680rpx;
|
||||
max-height: 76vh;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
margin: auto;
|
||||
margin-top: 22rpx;
|
||||
padding: 36rpx 34rpx;
|
||||
box-sizing: border-box;
|
||||
.list_wifi{
|
||||
width: 100%;
|
||||
height: 70vh;
|
||||
overflow: scroll;
|
||||
padding-bottom: 50rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 16rpx;
|
||||
box-sizing: border-box;
|
||||
.item_wifi{
|
||||
width: 100%;
|
||||
height: 92rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.15);
|
||||
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
padding-left: 34rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
}
|
||||
.name{
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
}
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
|
@ -2,18 +2,12 @@
|
|||
<view class="page">
|
||||
<u-navbar title="保洁管理" :border-bottom="false" :background="bgc" title-color='#000' back-icon-color="#000" title-size='36' height='50'></u-navbar>
|
||||
<view class="box">
|
||||
<!-- <view class="serch">
|
||||
<view class="lt">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uaG7R4JLfYOzBhWfDN0j" mode=""></image><input type="text" v-model="keyword" placeholder="搜索"/> <view class="sousuo" @click="btnsousuo">搜索</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="list" v-for="(item,index) in 2" :key="index" @click="btnxq(index)">
|
||||
<view class="list" v-for="(item,index) in wateringList" :key="index" @click="btnxq(index)">
|
||||
<view class="top">
|
||||
<view class="lt" style="display: flex;align-items: center;">
|
||||
<image style="margin-right: 10rpx;width: 32rpx;
|
||||
height: 32rpx;" src="https://api.ccttiot.com/smartmeter/img/static/uSjKq6xJU3oPNzMRfaYp" mode=""></image>
|
||||
<view v-if="item.userName" class="" style="font-weight: 500;font-size: 24rpx;color: #3D3D3D;">{{item.userName}}-保洁</view>
|
||||
<view v-else class="" style="font-weight: 500;font-size: 24rpx;color: red;" @click.stop="qrFun(item.employId)">点击扫码绑定</view>
|
||||
<view style="font-weight: 500;font-size: 24rpx;color: #3D3D3D;">{{item.realName == null ? '--' : item.realName}}-保洁</view>
|
||||
</view>
|
||||
<view class="rt" >
|
||||
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;display: inline-block;background-color: #575B66;"></text>
|
||||
|
@ -21,8 +15,8 @@
|
|||
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;display: inline-block;background-color: #575B66;"></text>
|
||||
</view>
|
||||
<view class="bianji" style="display: none;" :id="tabindex == index ? 'active' : ''">
|
||||
<view class="" @click="btnedit(item.employId)">编辑保洁</view>
|
||||
<view class="" style="border: 0;color: #FF1C1C;" @click="btnshanchu(item.employId)">删除保洁</view>
|
||||
<view class="" @click="btnedit(item)">编辑保洁</view>
|
||||
<view class="" style="border: 0;color: #FF1C1C;" @click="btnshanchu(item.userId)">删除保洁</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="width: 680rpx;height: 1px;background: #F0F0F0;margin-left: -30rpx;margin-top: 14rpx;"></view>
|
||||
|
@ -33,103 +27,51 @@
|
|||
</view>
|
||||
<view class="list_shebei">
|
||||
<view class="" style="font-size: 24rpx;color: #808080;">所属店铺</view>
|
||||
<view class="" style="font-weight: 600;font-size: 28rpx;color: #3D3D3D;margin-top:18rpx;">租车行</view>
|
||||
<view class="" style="font-weight: 600;font-size: 28rpx;color: #3D3D3D;margin-top:18rpx;">{{item.storeName == null ? '--' : item.storeName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
联系电话:18855566655
|
||||
联系电话:{{item.phonenumber}}
|
||||
</view>
|
||||
<view class="" style="width: 680rpx;height: 1px;background: #F0F0F0;margin-left: -30rpx;margin-top: 14rpx;"></view>
|
||||
<view class="" style="font-size: 24rpx;color: #3D3D3D;margin-top: 10rpx;width: 100%;display: flex;justify-content: space-between;">
|
||||
<text>{{item.createTime}}</text> <text>分成比例:{{item.point}}%</text>
|
||||
<text>{{item.createTime == null ? '--' : item.createTime}}</text> <text></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 100rpx;text-align: center;"
|
||||
v-if="showflag">
|
||||
<view class="" style="font-size: 30rpx;color: #ccc;margin-top: 30rpx;">暂无更多保洁...</view>
|
||||
<view class="" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 100rpx;text-align: center;">
|
||||
<view class="" style="font-size: 30rpx;color: #ccc;margin-top: 30rpx;">没有更多保洁啦...</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="imgewm" v-if="imgflag">
|
||||
<canvas canvas-id="qrcode" style="height: 100%;margin: 0 auto;" />
|
||||
<view class="" style="width: 100%;text-align: center;font-size: 30rpx;">
|
||||
请扫描二维码进行绑定
|
||||
</view>
|
||||
</view>
|
||||
<view class="imgewmflag" v-if="imgflag"></view>
|
||||
|
||||
<view class="xinjian" @click="btnadd">
|
||||
新建保洁
|
||||
</view>
|
||||
<view class="xinjians" v-if="imgflag" @click="imgflag = false">
|
||||
关闭二维码
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uQRCode from '@/common/uqrcode.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
bgc: {
|
||||
backgroundColor: " #fff"
|
||||
backgroundColor: "#fff"
|
||||
},
|
||||
pagenum: 1,
|
||||
wateringList: [],
|
||||
pagesize: 10, // 一页多少数据
|
||||
isLoading: false, // 是否正在加载数据
|
||||
noMoreData: false, // 是否没有更多数据
|
||||
total: 0,
|
||||
keyword:'',
|
||||
showflag: false,
|
||||
tabindex:-1,
|
||||
imgflag:false,
|
||||
storeId:''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.storeId = option.storeId
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
onShow() {
|
||||
// this.pagenum = 1
|
||||
// this.wateringList = []
|
||||
// this.tabindex = -1
|
||||
// this.getlist()
|
||||
},
|
||||
onShareAppMessage: function() {
|
||||
return {
|
||||
title: '创想物联',
|
||||
path: '/pages/shouye/index'
|
||||
}
|
||||
},
|
||||
|
||||
// 分享到朋友圈
|
||||
onShareTimeline: function() {
|
||||
return {
|
||||
title: '创想物联',
|
||||
query: '',
|
||||
path: '/pages/shouye/index'
|
||||
}
|
||||
this.tabindex = -1
|
||||
this.getlist()
|
||||
},
|
||||
methods: {
|
||||
//**生成二维码**//
|
||||
qrFun: function(employId) {
|
||||
this.imgflag = true
|
||||
uQRCode.make({
|
||||
canvasId: 'qrcode',
|
||||
text: 'https://kg.chuangtewl.com/h?i=' + employId,
|
||||
size: 300,
|
||||
margin: 0,
|
||||
backgroundColor: '#ffffff',
|
||||
foregroundColor: '#000000',
|
||||
fileType: 'jpg',
|
||||
errorCorrectLevel: uQRCode.errorCorrectLevel.H,
|
||||
})
|
||||
},
|
||||
// 点击删除保洁
|
||||
btnshanchu(employId){
|
||||
let employids = employId
|
||||
btnshanchu(userId){
|
||||
let employids = userId
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
|
@ -137,10 +79,8 @@
|
|||
showCancel: true,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.$u.delete(`/mch/storeStaff/${employids}`).then(res => {
|
||||
that.$u.delete(`/app/user/${userId}`).then(res => {
|
||||
if (res.code == 200) {
|
||||
that.pagenum = 1
|
||||
that.wateringList = []
|
||||
that.tabindex = -1
|
||||
that.getlist()
|
||||
uni.showToast({
|
||||
|
@ -163,12 +103,11 @@
|
|||
})
|
||||
},
|
||||
// 点击跳转编辑保洁
|
||||
btnedit(employId){
|
||||
btnedit(item){
|
||||
uni.navigateTo({
|
||||
url:'/page_moban/baojieadd?employId=' + employId + '&storeId=' + this.storeId
|
||||
url:'/page_moban/baojieadd?item=' + JSON.stringify(item)
|
||||
})
|
||||
},
|
||||
|
||||
btnxq(index){
|
||||
if(this.tabindex == index){
|
||||
this.tabindex = -1
|
||||
|
@ -182,43 +121,12 @@
|
|||
})
|
||||
},
|
||||
getlist() {
|
||||
this.$u.get("/mch/storeStaff/list?pageNum=" + this.pagenum + '&pageSize=' + this.pagesize + '&keyword=' + this.keyword).then(res => {
|
||||
this.$u.get(`/app/user/list`).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.total = res.total
|
||||
if (this.total > 0) {
|
||||
this.showflag = false
|
||||
} else {
|
||||
this.showflag = true
|
||||
}
|
||||
if (res.rows.length > 0) {
|
||||
// 有数据,追加到列表
|
||||
this.wateringList = this.wateringList.concat(res.rows)
|
||||
this.pagenum++
|
||||
} else {
|
||||
// 没有更多数据
|
||||
this.noMoreData = true
|
||||
}
|
||||
this.isLoading = false
|
||||
this.wateringList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
searchs(){
|
||||
this.pagenum = 1
|
||||
this.wateringList = []
|
||||
this.getlist()
|
||||
},
|
||||
onReachBottom() {
|
||||
let sum = this.total / this.pagesize
|
||||
if (this.pagenum-1 < sum) {
|
||||
this.getlist(); // 上拉加载更多
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '没有更多代理人员了',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
<view class="list_val">
|
||||
<view class="" style="padding-top:12rpx">保洁名称</view> <input type="text" v-model="level" placeholder="请输入保洁名称" />
|
||||
</view>
|
||||
<!-- <view class="list_val">
|
||||
<view class="" style="padding-top:12rpx">分成比例</view> <input type="text" v-model="ratio" placeholder="请输入分成比例%" />
|
||||
</view> -->
|
||||
<view class="list_val">
|
||||
<view class="" style="padding-top:12rpx">手机号码</view> <input type="text" v-model="tel" placeholder="请输入手机号码" />
|
||||
</view>
|
||||
|
@ -32,64 +29,33 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
list:[
|
||||
{name:'展示分成比例',tit:'是否展示分成比例',checked:false,txt:1},
|
||||
{name:'设备管理显示',tit:'是否展示设备管理',checked:false,txt:2},
|
||||
{name:'设备操作',tit:'是否允许设备操作',checked:false,txt:3},
|
||||
{name:'订单管理',tit:'是否展示订单管理',checked:false,txt:4}
|
||||
],
|
||||
show:false,
|
||||
bgc: {
|
||||
backgroundColor: " #fff",
|
||||
},
|
||||
level:'',
|
||||
name:'',
|
||||
ratio:'',
|
||||
tel:'',
|
||||
sheng:'请选择店铺',
|
||||
arr:[],
|
||||
arrqx:[],
|
||||
agentLevel:'',
|
||||
storeId:'',
|
||||
employId:'',
|
||||
tit:'创建保洁',
|
||||
storeId:''
|
||||
storeId:'',
|
||||
userId:''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.storeId = option.storeId
|
||||
if(option.employId){
|
||||
if(option.item){
|
||||
this.tit = '编辑保洁'
|
||||
this.employId = option.employId
|
||||
this.getedit()
|
||||
let obj = JSON.parse(option.item)
|
||||
this.level = obj.userName
|
||||
this.tel = obj.phonenumber
|
||||
this.sheng = obj.storeName
|
||||
this.storeId = obj.storeId
|
||||
this.userId = obj.userId
|
||||
}
|
||||
this.getlist()
|
||||
},
|
||||
methods: {
|
||||
// 请求编辑的保洁
|
||||
getedit(){
|
||||
this.$u.get(`/mch/storeStaff/${this.employId}`).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.storeId = this.storeId
|
||||
this.ratio = res.data.point
|
||||
this.level = res.data.remark
|
||||
this.arrqx = res.data.permissions
|
||||
this.sheng = res.data.storeName
|
||||
const txtToItemMap = {}
|
||||
this.list.forEach(item => {
|
||||
txtToItemMap[item.txt] = item
|
||||
})
|
||||
this.arrqx.forEach(txt => {
|
||||
const item = txtToItemMap[txt]
|
||||
if (item) {
|
||||
item.checked = true
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 请求所有店铺
|
||||
getlist() {
|
||||
this.$u.get(`/app/store/list?pageNum=1&pageSize=990&keyword=`).then(res => {
|
||||
|
@ -104,22 +70,13 @@
|
|||
},
|
||||
// 点击创建
|
||||
btncj(){
|
||||
this.arrqx = []
|
||||
if(this.tit == '创建保洁'){
|
||||
this.list.forEach(item => {
|
||||
if(item.checked == true){
|
||||
this.arrqx.push(item.txt)
|
||||
}
|
||||
})
|
||||
let data = {
|
||||
storeId:this.storeId,
|
||||
role:1,
|
||||
point:this.ratio,
|
||||
remark:this.level,
|
||||
enabled: true,
|
||||
permissions:this.arrqx
|
||||
phonenumber:this.tel,
|
||||
realName:this.level,
|
||||
storeId:this.storeId
|
||||
}
|
||||
this.$u.post(`/mch/storeStaff/`,data).then(res => {
|
||||
this.$u.post(`/app/user/addCleaner`,data).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '创建成功',
|
||||
|
@ -138,21 +95,13 @@
|
|||
}
|
||||
})
|
||||
}else{
|
||||
this.list.forEach(item => {
|
||||
if(item.checked == true){
|
||||
this.arrqx.push(item.txt)
|
||||
}
|
||||
})
|
||||
let data = {
|
||||
employId:this.employId,
|
||||
userId:this.userId,
|
||||
storeId:this.storeId,
|
||||
role:1,
|
||||
point:this.ratio,
|
||||
remark:this.level,
|
||||
enabled: true,
|
||||
permissions:this.arrqx
|
||||
realName:this.level,
|
||||
phonenumber:this.tel
|
||||
}
|
||||
this.$u.put(`/mch/storeStaff/`,data).then(res => {
|
||||
this.$u.put(`/app/user/editCleaner`,data).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '编辑成功',
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<view @click="btntab(1)" :class="tabindex == 1 ? 'active' : ''">
|
||||
待保洁
|
||||
</view>
|
||||
<view @click="btntab(2)" :class="tabindex == 2 ? 'active' : ''">
|
||||
<view @click="btntab(3)" :class="tabindex == 2 ? 'active' : ''">
|
||||
已保洁
|
||||
</view>
|
||||
</view>
|
||||
|
@ -23,9 +23,15 @@
|
|||
<view class="item_list" v-for="(item,index) in orderlist" :key="index">
|
||||
<view class="top">
|
||||
<view class="lt">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/upHnI7g3Y6IAzV0LdRyP" mode=""></image> 2025-01-01 16:00
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/upHnI7g3Y6IAzV0LdRyP" mode=""></image> {{item.startTime}}
|
||||
</view>
|
||||
<view class="rt">
|
||||
<view class="rt" style="color: #FC902A;" v-if="item.status == 1">
|
||||
待保洁
|
||||
</view>
|
||||
<view class="rt" style="color: #FC902A;" v-if="item.status == 2">
|
||||
保洁中
|
||||
</view>
|
||||
<view class="rt" v-if="item.status == 3">
|
||||
已保洁
|
||||
</view>
|
||||
</view>
|
||||
|
@ -42,19 +48,20 @@
|
|||
包厢名称:竹韵
|
||||
</view>
|
||||
<view class="">
|
||||
开始时间:2025-01-01 16:00
|
||||
</view>
|
||||
<view class="">
|
||||
预计结束时间:2025-01-01 16:30
|
||||
预计结束时间:{{item.endTime}}
|
||||
</view>
|
||||
<view class="">
|
||||
完成时间:--
|
||||
</view>
|
||||
</view>
|
||||
<view class="bot">
|
||||
<view class="bot" v-if="item.status == 2">
|
||||
<view class=""></view>
|
||||
<view class="wc">完成保洁</view>
|
||||
</view>
|
||||
<view class="bot" v-if="item.status == 1">
|
||||
<view class=""></view>
|
||||
<view class="wc">开始保洁</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 100%;text-align: center;font-size: 32rpx;color: #ccc;font-weight: 600;margin-top: 30rpx;">
|
||||
没有更多保洁订单啦...
|
||||
|
@ -76,6 +83,7 @@
|
|||
pagenum:1,
|
||||
pagesize:10,
|
||||
total:0,
|
||||
keyword:''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
@ -85,10 +93,13 @@
|
|||
// 点击切换列表状态
|
||||
btntab(num){
|
||||
this.tabindex = num
|
||||
this.orderlist = []
|
||||
this.pagenum = 1
|
||||
this.getlist()
|
||||
},
|
||||
// 请求保洁记录列表
|
||||
getlist(){
|
||||
this.$u.get(`/app/clean/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}`).then(res =>{
|
||||
this.$u.get(`/app/clean/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}&status=${this.tabindex}&keyword${this.keyword}`).then(res =>{
|
||||
if(res.code == 200){
|
||||
this.total = res.total
|
||||
if(this.pagenum > 1){
|
||||
|
|
|
@ -188,19 +188,19 @@
|
|||
退款
|
||||
</view>
|
||||
<view class="one">
|
||||
金额总数 <input type="text" placeholder="50" :disabled="true" /> 元
|
||||
金额总数 <input type="text" :placeholder="orderobj.totalFee" :disabled="true" /> 元
|
||||
</view>
|
||||
<view class="one">
|
||||
退还金额 <input type="text" placeholder="20" /> 元
|
||||
退款金额 <input type="text" v-model="pricetk" placeholder="输入退款金额" /> 元
|
||||
</view>
|
||||
<view class="one">
|
||||
退还备注 <input type="text" placeholder="如有备注,请在此填写" />
|
||||
退款备注 <input type="text" v-model="reason" placeholder="如有备注,请在此填写" />
|
||||
</view>
|
||||
<view class="bot">
|
||||
<view class="myxiang" @click="maskflag = false">
|
||||
我在想想
|
||||
</view>
|
||||
<view class="tuihuan">
|
||||
<view class="tuihuan" @click="btntuik">
|
||||
确定退还
|
||||
</view>
|
||||
</view>
|
||||
|
@ -218,7 +218,9 @@
|
|||
maskflag:false,
|
||||
orderNo:'',
|
||||
orderobj:{},
|
||||
timesc:''
|
||||
timesc:'',
|
||||
reason:'',
|
||||
pricetk:''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
@ -226,6 +228,30 @@
|
|||
this.getxq()
|
||||
},
|
||||
methods: {
|
||||
// 点击确认退款
|
||||
btntuik(){
|
||||
let data = {
|
||||
amount:this.pricetk,
|
||||
payId: this.orderobj.payId,
|
||||
reason:this.reason
|
||||
}
|
||||
this.$u.post(`/app/refund`,data).then(res =>{
|
||||
if(res.code == 200){
|
||||
uni.showToast({
|
||||
title: '退款成功',
|
||||
icon: 'success',
|
||||
duration:2000
|
||||
})
|
||||
this.getxq()
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration:2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询订单详情
|
||||
getxq(){
|
||||
this.$u.get(`/appVerify/orderInfo?orderNo=${this.orderNo}`).then(res =>{
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<view class="top">
|
||||
货柜商品管理
|
||||
</view>
|
||||
<view class="listul">
|
||||
<view class="listul" @click="btnwei">
|
||||
<view class="listul_item">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u3WvXWhreMnYuHWBYanZ" mode=""></image>
|
||||
<view class="wz">货柜管理</view>
|
||||
|
@ -76,15 +76,15 @@
|
|||
其他
|
||||
</view>
|
||||
<view class="listul">
|
||||
<view class="listul_item">
|
||||
<view class="listul_item" @click="btnpage(8)">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uhOXbEruUPi4LwobH5j2" mode=""></image>
|
||||
<view class="wz">对账单</view>
|
||||
</view>
|
||||
<view class="listul_item">
|
||||
<view class="listul_item" @click="btnwei">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uUG8zQFENJMs5azjCMuQ" mode=""></image>
|
||||
<view class="wz">杆柜管理</view>
|
||||
</view>
|
||||
<view class="listul_item">
|
||||
<view class="listul_item" @click="btnwei">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uYxzaUTodBMnHowtv7bl" mode=""></image>
|
||||
<view class="wz">杆柜订单</view>
|
||||
</view>
|
||||
|
@ -104,6 +104,10 @@
|
|||
<image src="https://api.ccttiot.com/smartmeter/img/static/uHQtbhwpFAMPjWkn0kw5" mode=""></image>
|
||||
<view class="wz">基础设置</view>
|
||||
</view>
|
||||
<view class="listul_item" @click="btnpage(9)">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uRVPQmCpO1AxdDfDFKda" mode=""></image>
|
||||
<view class="wz">WIFI配置</view>
|
||||
</view>
|
||||
<view class="listul_item" @click="btnluru">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uHQtbhwpFAMPjWkn0kw5" mode=""></image>
|
||||
<view class="wz">设备录入</view>
|
||||
|
@ -138,6 +142,14 @@
|
|||
})
|
||||
},
|
||||
methods: {
|
||||
// 点击这些提示未开放
|
||||
btnwei(){
|
||||
uni.showToast({
|
||||
title: '此功能暂未开放',
|
||||
icon: 'none',
|
||||
duration:2000
|
||||
})
|
||||
},
|
||||
// 点击进行设备录入
|
||||
btnluru(){
|
||||
uni.navigateTo({
|
||||
|
@ -174,6 +186,14 @@
|
|||
uni.navigateTo({
|
||||
url:'/page_moban/baojieorder'
|
||||
})
|
||||
}else if(num == 8){ //跳转到对账单页面
|
||||
uni.navigateTo({
|
||||
url:'/page_fenbaotwo/duizhangdan'
|
||||
})
|
||||
}else if(num == 9){ //跳转到配置WIFI页面
|
||||
uni.navigateTo({
|
||||
url:'/page_fenbaotwo/wifipz'
|
||||
})
|
||||
}
|
||||
},
|
||||
// 跳转到收费模版
|
||||
|
@ -253,6 +273,8 @@
|
|||
margin: auto;
|
||||
overflow: scroll;
|
||||
margin-top: 38rpx;
|
||||
padding-bottom: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.imgbj{
|
||||
width: 750rpx;
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
<view class="">
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<view class="myname">
|
||||
姓名
|
||||
{{user.userName == null ? '--' : user.userName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="mytel">
|
||||
15566665555
|
||||
{{user.phonenumber == null ? '--' : user.phonenumber}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -27,11 +27,11 @@
|
|||
账户余额(元)
|
||||
</view>
|
||||
<view class="yuan">
|
||||
1523
|
||||
{{user.balance == null ? '0' : user.balance}}
|
||||
</view>
|
||||
<view class="leiji">
|
||||
<view class="one">
|
||||
累计提现:1232
|
||||
累计提现:{{user.totalWithdrawAmount == null ? '--' : user.totalWithdrawAmount}}
|
||||
</view>
|
||||
<view class="two" @click="btntx">
|
||||
立即提现
|
||||
|
@ -52,14 +52,14 @@
|
|||
<u-icon name="arrow-right" color="#3D3D3D" size="28"></u-icon>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="list_val" @click="btnhhr">
|
||||
<!-- <view class="list_val" @click="btnhhr">
|
||||
<view class="lt">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/urBjYFve4o3hKteeFkRj" mode=""></image> <text>合伙人管理</text>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-icon name="arrow-right" color="#3D3D3D" size="28"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="list_val" @click="btnaqzx">
|
||||
<view class="lt">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uoywyTJbYhd7Iim7KW1Q" mode=""></image> <text>安全中心</text>
|
||||
|
@ -105,15 +105,24 @@
|
|||
bgc: {
|
||||
backgroundColor: "",
|
||||
},
|
||||
user:{}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
onShow() {
|
||||
|
||||
this.getinfo()
|
||||
},
|
||||
methods: {
|
||||
// 查询个人信息
|
||||
getinfo(){
|
||||
this.$u.get(`/getAppInfo`).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.user = res.user
|
||||
}
|
||||
})
|
||||
},
|
||||
// 点击跳转提现
|
||||
btntx(){
|
||||
uni.navigateTo({
|
||||
|
|
|
@ -1,34 +1,490 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar :is-back="false" title="运营" :border-bottom="false" back-icon-color="000" :background="bgc" title-color='#000' title-size='36'
|
||||
height='40' id="navbar">
|
||||
</u-navbar>
|
||||
<tab-bars :indexs='1' style=""></tab-bars>
|
||||
<u-navbar :is-back="false" title="运营" :border-bottom="false" back-icon-color="000" :background="bgc"
|
||||
title-color='#000' title-size='36' height='40' id="navbar">
|
||||
</u-navbar>
|
||||
<tab-bars :indexs='1' style=""></tab-bars>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/umtXLN0X6kijXgwlI4bg" class="imgbj" mode=""></image>
|
||||
<view class="box">
|
||||
<view class="shouru">
|
||||
<view class="name">
|
||||
收入统计
|
||||
</view>
|
||||
<view class="tongji">
|
||||
<view class="one">
|
||||
<view class="bot">
|
||||
今日收入
|
||||
</view>
|
||||
<view class="top">
|
||||
0
|
||||
</view>
|
||||
<view class="bot">
|
||||
今日订单数
|
||||
</view>
|
||||
<view class="top">
|
||||
0
|
||||
</view>
|
||||
</view>
|
||||
<view class="one">
|
||||
<view class="bot">
|
||||
本周收入
|
||||
</view>
|
||||
<view class="top">
|
||||
0
|
||||
</view>
|
||||
<view class="bot">
|
||||
本周订单数
|
||||
</view>
|
||||
<view class="top">
|
||||
0
|
||||
</view>
|
||||
</view>
|
||||
<view class="one">
|
||||
<view class="bot">
|
||||
本月收入
|
||||
</view>
|
||||
<view class="top">
|
||||
0
|
||||
</view>
|
||||
<view class="bot">
|
||||
本月订单数
|
||||
</view>
|
||||
<view class="top">
|
||||
0
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="gailan">
|
||||
<view class="name">
|
||||
运营概览
|
||||
</view>
|
||||
<view class="top">
|
||||
<view class="lt">
|
||||
经营概况
|
||||
</view>
|
||||
<view class="rt">
|
||||
<view @click="btntab(1)" :class="tabindex == 1 ? 'actives' : ''">
|
||||
近30天
|
||||
</view>
|
||||
<view @click="btntab(2)" :class="tabindex == 2 ? 'actives' : ''">
|
||||
近七天
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zhixian">
|
||||
<l-echart class="line-chart" ref="lineChart2"></l-echart>
|
||||
<view class="shuom">
|
||||
<view class="">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uk2PaAnt4mMTrYhbM7PY" mode="">
|
||||
</image>订单营收
|
||||
</view>
|
||||
<view class="">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/ubLD9khOF4jiHmD9O9QA" mode="">
|
||||
</image>订单数
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bijiao">
|
||||
<view class="lt" style="border-right: 1px solid #D8D8D8;">
|
||||
<view class="price">
|
||||
1359
|
||||
</view>
|
||||
<view class="wz">
|
||||
订单营收(元)
|
||||
</view>
|
||||
</view>
|
||||
<view class="lt" style="padding-left: 34rpx;box-sizing: border-box;">
|
||||
<view class="price">
|
||||
1359
|
||||
</view>
|
||||
<view class="wz">
|
||||
订单数(单)
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="shebei">
|
||||
<view class="name">
|
||||
当前运营情况 <image @click="smflag = !smflag" src="https://api.ccttiot.com/smartmeter/img/static/uvgciot52bbI8bBduvPK" mode=""></image> <text v-if="smflag">使用数/总数</text>
|
||||
</view>
|
||||
<view class="bd">
|
||||
<view class="one">
|
||||
<view class="">
|
||||
房间
|
||||
</view>
|
||||
<view class="cu">
|
||||
<text>2</text>/10
|
||||
</view>
|
||||
</view>
|
||||
<view class="one">
|
||||
<view class="">
|
||||
大厅设施
|
||||
</view>
|
||||
<view class="cu">
|
||||
<text>3</text>/10
|
||||
</view>
|
||||
</view>
|
||||
<view class="one" style="border: none;">
|
||||
<view class="">
|
||||
设备总数
|
||||
</view>
|
||||
<view class="cu">
|
||||
<text>5</text>/20
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from '@/uni_modules/lime-echart/static/echarts.min.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
bgc: {
|
||||
backgroundColor: "",
|
||||
},
|
||||
bgc: {
|
||||
backgroundColor: "",
|
||||
},
|
||||
tabindex: 1,
|
||||
smflag:false
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
onShow() {
|
||||
//加载折线图数据
|
||||
this.loadLineData2()
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 点击切换周还是月
|
||||
btntab(num) {
|
||||
this.tabindex = num
|
||||
},
|
||||
//加载折线图数据
|
||||
loadLineData2() {
|
||||
//这里请求服务器拿到数据
|
||||
let res = {
|
||||
//x轴数据
|
||||
xData: ['6/11', '6/12', '6/13', '6/14', '6/15', '6/16', '6/17'],
|
||||
//y轴数据
|
||||
yData: [50, 120, 150, 220, 180, 300, 130], //订单数
|
||||
yData1: [2000, 1820, 2350, 1200, 800, 3000, 2190], //营收
|
||||
}
|
||||
let option = {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
// x轴数据文字颜色
|
||||
axisLabel: {
|
||||
color: '#a7a7a7'
|
||||
},
|
||||
// x轴那天坐标轴线的颜色
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#f1f1f1',
|
||||
}
|
||||
},
|
||||
//x轴上面刻度线隐藏
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
//这里是x轴数据
|
||||
data: res.xData
|
||||
},
|
||||
//设置网格
|
||||
grid: {
|
||||
top: 40,
|
||||
bottom: 30,
|
||||
},
|
||||
//y轴设置
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
//y轴标签文字颜色
|
||||
axisLabel: {
|
||||
color: '#a7a7a7'
|
||||
},
|
||||
// y轴分割线设置为虚线
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
type: 'dashed'
|
||||
}
|
||||
}
|
||||
},
|
||||
//设置提示为点击时
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
triggerOn: 'click',
|
||||
formatter: '{b}: \n {a0}: {c0} \n {a1}: {c1}'
|
||||
},
|
||||
//设置曲线的颜色
|
||||
color: ['#A9D2FF', '#B1A5FF'],
|
||||
series: [{
|
||||
name: "订单营收",
|
||||
//这里是数据
|
||||
data: res.yData1,
|
||||
type: 'line',
|
||||
//设置为平滑,默认为折线
|
||||
smooth: false,
|
||||
},
|
||||
{
|
||||
name: "订单数",
|
||||
//这里是数据
|
||||
data: res.yData,
|
||||
type: 'line',
|
||||
//设置为平滑,默认为折线
|
||||
smooth: false,
|
||||
}
|
||||
]
|
||||
}
|
||||
this.$refs.lineChart2.init(echarts, chart => {
|
||||
chart.setOption(option);
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #fff;
|
||||
.page {
|
||||
// background: #fff;
|
||||
}
|
||||
|
||||
.actives {
|
||||
background: #fff !important;
|
||||
box-shadow: 0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.15) !important;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 100%;
|
||||
height: 80vh;
|
||||
overflow: scroll;
|
||||
}
|
||||
.shebei{
|
||||
width: 680rpx;
|
||||
margin: auto;
|
||||
margin-top: 34rpx;
|
||||
.name{
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text{
|
||||
width: 184rpx;
|
||||
height: 54rpx;
|
||||
background: #E8E8E8;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
line-height: 54rpx;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
color: #3D3D3D;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
image{
|
||||
margin-left: 10rpx;
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
}
|
||||
.bd{
|
||||
width: 680rpx;
|
||||
height: 172rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(72,137,59,0.1);
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
.one{
|
||||
border-right: 1px solid #C7C7C7;
|
||||
width: 33%;
|
||||
view{
|
||||
font-size: 24rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.cu{
|
||||
font-weight: 600;
|
||||
font-size: 40rpx;
|
||||
color: #3D3D3D;
|
||||
margin-top: 8rpx;
|
||||
text{
|
||||
color: #48893B;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.gailan {
|
||||
width: 680rpx;
|
||||
max-height: 1868rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(72, 137, 59, 0.1);
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
margin: auto;
|
||||
margin-top: 34rpx;
|
||||
padding: 0 30rpx;
|
||||
padding-top: 38rpx;
|
||||
padding-bottom: 24rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.bijiao {
|
||||
width: 636rpx;
|
||||
max-height: 204rpx;
|
||||
background: #DEF1DA;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
display: flex;
|
||||
padding: 24rpx 40rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 34rpx;
|
||||
|
||||
.lt {
|
||||
width: 50%;
|
||||
|
||||
.price {
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
.wz {
|
||||
font-size: 24rpx;
|
||||
color: #3D3D3D;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 10rpx;
|
||||
|
||||
image {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.zhixian {
|
||||
.shuom {
|
||||
margin-top: 26rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 76rpx;
|
||||
box-sizing: border-box;
|
||||
justify-content: space-between;
|
||||
|
||||
view {
|
||||
font-size: 24rpx;
|
||||
color: #3D3D3D;
|
||||
|
||||
image {
|
||||
width: 76rpx;
|
||||
height: 18rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 66rpx;
|
||||
line-height: 66rpx;
|
||||
align-items: center;
|
||||
margin-top: 24rpx;
|
||||
|
||||
.lt {
|
||||
border-left: 10rpx solid #48893B;
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
padding-left: 16rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.rt {
|
||||
width: 236rpx;
|
||||
height: 66rpx;
|
||||
background: #F6F6F6;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
view {
|
||||
width: 116rpx;
|
||||
height: 58rpx;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
text-align: center;
|
||||
line-height: 58rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.name {
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.shouru {
|
||||
width: 680rpx;
|
||||
max-height: 838rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(72, 137, 59, 0.1);
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
margin: auto;
|
||||
margin-top: 24rpx;
|
||||
padding: 26rpx 32rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.tongji {
|
||||
display: flex;
|
||||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
box-sizing: border-box;
|
||||
justify-content: space-between;
|
||||
|
||||
.one {
|
||||
.top {
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #48893B;
|
||||
}
|
||||
|
||||
.bot {
|
||||
font-size: 28rpx;
|
||||
color: #7C7C7C;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.name {
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
}
|
||||
|
||||
.imgbj {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
</style>
|
21
pages.json
21
pages.json
|
@ -639,6 +639,27 @@
|
|||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "duizhangdan",
|
||||
"style": {
|
||||
"navigationBarTitleText": "上传",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "wifipz",
|
||||
"style": {
|
||||
"navigationBarTitleText": "上传",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "wifixz",
|
||||
"style": {
|
||||
"navigationBarTitleText": "上传",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
}, {
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
没有账户? <text @click="btnljdl">去注册</text>
|
||||
</view>
|
||||
<view class="wxlogo">
|
||||
—————— 其他登录方式 ——————
|
||||
————— 其他登录方式 —————
|
||||
</view>
|
||||
<button class="lofo" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uxWMldLMb888YHm0qOgN" mode=""></image>
|
||||
|
|
1
uni_modules/lime-echart/static/ecStat.min.js
vendored
1
uni_modules/lime-echart/static/ecStat.min.js
vendored
File diff suppressed because one or more lines are too long
17
uni_modules/lime-echart/static/echarts.min.js
vendored
Normal file
17
uni_modules/lime-echart/static/echarts.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,129 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
html,
|
||||
body,
|
||||
.canvas {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow-y: hidden;
|
||||
background-color: transparent;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="canvas" id="limeChart"></div>
|
||||
<script type="text/javascript" src="./uni.webview.1.5.3.js"></script>
|
||||
<script type="text/javascript" src="https://api.ccttiot.com/smartmeter/img/static/uQzbnbo3S5UrSsVBAYYw"></script>
|
||||
<script type="text/javascript" src="./ecStat.min.js"></script>
|
||||
<!-- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts-liquidfill@latest/dist/echarts-liquidfill.min.js"></script> -->
|
||||
<script>
|
||||
let chart = null;
|
||||
let cache = [];
|
||||
console.log = function(...agrs) {
|
||||
postMessage(agrs)
|
||||
}
|
||||
function emit(event, data) {
|
||||
let dataStr = JSON.stringify(data, stringify)
|
||||
postMessage({
|
||||
event,
|
||||
data: dataStr
|
||||
})
|
||||
cache = []
|
||||
}
|
||||
function postMessage(data) {
|
||||
uni.postMessage({
|
||||
data
|
||||
});
|
||||
}
|
||||
function stringify(key, value) {
|
||||
if (typeof value === 'object' && value !== null) {
|
||||
if (cache.indexOf(value) !== -1) {
|
||||
return;
|
||||
}
|
||||
cache.push(value);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
function parse(name, callback, options) {
|
||||
const optionNameReg = /[\w]+\.setOption\(([\w]+\.)?([\w]+)\)/
|
||||
if (optionNameReg.test(callback)) {
|
||||
const optionNames = callback.match(optionNameReg)
|
||||
if(optionNames[1]) {
|
||||
const _this = optionNames[1].split('.')[0]
|
||||
window[_this] = {}
|
||||
window[_this][optionNames[2]] = options
|
||||
return optionNames[2]
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
function init(callback, options, opts = {}, theme = null) {
|
||||
if(!chart) {
|
||||
chart = echarts.init(document.getElementById('limeChart'), theme, opts)
|
||||
if(options) {
|
||||
chart.setOption(options)
|
||||
}
|
||||
// const name = parse('a', callback, options)
|
||||
// console.log('options::', callback)
|
||||
// if(name) this[name] = options
|
||||
// eval(`a = ${callback};`)
|
||||
// if(a) {a(chart)}
|
||||
}
|
||||
}
|
||||
|
||||
function setChart(callback, options) {
|
||||
if(!callback) return
|
||||
if(chart && callback && options) {
|
||||
var r = null
|
||||
const name = parse('r', callback, options)
|
||||
if(name) this[name] = options
|
||||
eval(`r = ${callback};`)
|
||||
if(r) {r(chart)}
|
||||
}
|
||||
}
|
||||
function setOption(data) {
|
||||
if (chart) chart.setOption(data[0], data[1])
|
||||
}
|
||||
function showLoading(data) {
|
||||
if (chart) chart.showLoading(data[0], data[1])
|
||||
}
|
||||
|
||||
function hideLoading() {
|
||||
if (chart) chart.hideLoading()
|
||||
}
|
||||
|
||||
function clear() {
|
||||
if (chart) chart.clear()
|
||||
|
||||
}
|
||||
|
||||
function dispose() {
|
||||
if (chart) chart.dispose()
|
||||
}
|
||||
function resize(size) {
|
||||
if (chart) chart.resize(size)
|
||||
}
|
||||
|
||||
function canvasToTempFilePath(opt = {}) {
|
||||
if (chart) {
|
||||
const src = chart.getDataURL(opt)
|
||||
postMessage({
|
||||
file: true,
|
||||
data: src
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,177 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
html,
|
||||
body,
|
||||
.canvas {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow-y: hidden;
|
||||
background-color: transparent;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="canvas" id="limeChart"></div>
|
||||
<script type="text/javascript" src="./uni.webview.1.5.3.js"></script>
|
||||
<script type="text/javascript" src="https://api.ccttiot.com/smartmeter/img/static/uQzbnbo3S5UrSsVBAYYw"></script>
|
||||
<script type="text/javascript" src="./ecStat.min.js"></script>
|
||||
<!-- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts-liquidfill@latest/dist/echarts-liquidfill.min.js"></script> -->
|
||||
<script>
|
||||
let chart = null;
|
||||
let cache = [];
|
||||
console.log = function(...agrs) {
|
||||
postMessage(agrs)
|
||||
}
|
||||
|
||||
function emit(event, data) {
|
||||
let dataStr = JSON.stringify(data, stringify)
|
||||
postMessage({
|
||||
event,
|
||||
data: dataStr
|
||||
})
|
||||
cache = []
|
||||
}
|
||||
|
||||
function postMessage(data) {
|
||||
uni.postMessage({
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
function stringify(key, value) {
|
||||
if (typeof value === 'object' && value !== null) {
|
||||
if (cache.indexOf(value) !== -1) {
|
||||
return;
|
||||
}
|
||||
cache.push(value);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function parse(name, callback, options) {
|
||||
const optionNameReg = /[\w]+\.setOption\(([\w]+\.)?([\w]+)\)/
|
||||
if (optionNameReg.test(callback)) {
|
||||
const optionNames = callback.match(optionNameReg)
|
||||
if (optionNames[1]) {
|
||||
const _this = optionNames[1].split('.')[0]
|
||||
window[_this] = {}
|
||||
window[_this][optionNames[2]] = options
|
||||
return optionNames[2]
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
function init(callback, options, opts = {}, theme = null) {
|
||||
if (!chart) {
|
||||
chart = echarts.init(document.getElementById('limeChart'), theme, opts)
|
||||
if (options) {
|
||||
chart.setOption(options)
|
||||
}
|
||||
// const name = parse('a', callback, options)
|
||||
// console.log('options::', callback)
|
||||
// if(name) this[name] = options
|
||||
// eval(`a = ${callback};`)
|
||||
// if(a) {a(chart)}
|
||||
}
|
||||
}
|
||||
|
||||
function setChart(callback, options) {
|
||||
if (!callback) return
|
||||
if (chart && callback && options) {
|
||||
var r = null
|
||||
const name = parse('r', callback, options)
|
||||
if (name) this[name] = options
|
||||
eval(`r = ${callback};`)
|
||||
if (r) {
|
||||
r(chart)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setOption(data) {
|
||||
if (chart) chart.setOption(data[0], data[1])
|
||||
}
|
||||
|
||||
function showLoading(data) {
|
||||
if (chart) chart.showLoading(data[0], data[1])
|
||||
}
|
||||
|
||||
function hideLoading() {
|
||||
if (chart) chart.hideLoading()
|
||||
}
|
||||
|
||||
function clear() {
|
||||
if (chart) chart.clear()
|
||||
|
||||
}
|
||||
|
||||
function dispose() {
|
||||
if (chart) chart.dispose()
|
||||
}
|
||||
|
||||
function resize(size) {
|
||||
if (chart) chart.resize(size)
|
||||
}
|
||||
|
||||
function canvasToTempFilePath(opt = {}) {
|
||||
if (chart) {
|
||||
const src = chart.getDataURL(opt)
|
||||
postMessage({
|
||||
file: true,
|
||||
data: src
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function on(data) {
|
||||
if (chart && data.length > 0) {
|
||||
const [type, query] = data
|
||||
const useQuery = query && typeof query != 'function'
|
||||
const key = `${type}${useQuery ? JSON.stringify(query): '' }`
|
||||
if (query) {
|
||||
chart.on(type, query, (options) => {
|
||||
const obj = {}
|
||||
Object.keys(options).forEach(key => {
|
||||
if (key != 'event') {
|
||||
obj[key] = options[key]
|
||||
}
|
||||
})
|
||||
emit(`@${key}`, {
|
||||
event: key,
|
||||
options: obj
|
||||
})
|
||||
})
|
||||
} else {
|
||||
chart.on(type, (options) => {
|
||||
|
||||
const obj = {}
|
||||
Object.keys(options).forEach(key => {
|
||||
if (key != 'event') {
|
||||
obj[key] = options[key]
|
||||
}
|
||||
|
||||
})
|
||||
emit(`@${key}`, {
|
||||
event: key,
|
||||
options: obj
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,173 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
html,
|
||||
body,
|
||||
.canvas {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow-y: hidden;
|
||||
background-color: transparent;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="canvas" id="limeChart"></div>
|
||||
<script type="text/javascript" src="./uni.webview.1.5.5.js"></script>
|
||||
<script type="text/javascript" src="https://api.ccttiot.com/smartmeter/img/static/uQzbnbo3S5UrSsVBAYYw"></script>
|
||||
<script type="text/javascript" src="./ecStat.min.js"></script>
|
||||
<!-- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts-liquidfill@latest/dist/echarts-liquidfill.min.js"></script> -->
|
||||
<script>
|
||||
let chart = null;
|
||||
let cache = [];
|
||||
console.log = function(...agrs) {
|
||||
emit('log', {
|
||||
log: agrs,
|
||||
})
|
||||
}
|
||||
|
||||
function emit(event, data) {
|
||||
postMessage({
|
||||
// event,
|
||||
data
|
||||
})
|
||||
cache = []
|
||||
}
|
||||
|
||||
function postMessage(data) {
|
||||
window.__uniapp_x_.postMessage(JSON.stringify(data))
|
||||
};
|
||||
|
||||
function stringify(key, value) {
|
||||
if (typeof value === 'object' && value !== null) {
|
||||
if (cache.indexOf(value) !== -1) {
|
||||
return;
|
||||
}
|
||||
cache.push(value);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function parse(name, callback, options) {
|
||||
const optionNameReg = /[\w]+\.setOption\(([\w]+\.)?([\w]+)\)/
|
||||
if (optionNameReg.test(callback)) {
|
||||
const optionNames = callback.match(optionNameReg)
|
||||
if (optionNames[1]) {
|
||||
const _this = optionNames[1].split('.')[0]
|
||||
window[_this] = {}
|
||||
window[_this][optionNames[2]] = options
|
||||
return optionNames[2]
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
function init(callback, options, opts = {}, theme = null) {
|
||||
if (!chart) {
|
||||
chart = echarts.init(document.getElementById('limeChart'), theme, opts)
|
||||
|
||||
if (options) {
|
||||
chart.setOption(options)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function on(data) {
|
||||
if (chart && data.length > 0) {
|
||||
const [type, query] = data
|
||||
const key = `${type}${JSON.stringify(query??'')}`
|
||||
if (query) {
|
||||
chart.on(type, query, (options) => {
|
||||
const obj = {}
|
||||
Object.keys(options).forEach(key => {
|
||||
if (key != 'event') {
|
||||
obj[key] = options[key]
|
||||
}
|
||||
|
||||
})
|
||||
emit(key, {
|
||||
event: key,
|
||||
options: obj
|
||||
})
|
||||
})
|
||||
} else {
|
||||
chart.on(type, (options) => {
|
||||
const obj = {}
|
||||
Object.keys(options).forEach(key => {
|
||||
if (key != 'event') {
|
||||
obj[key] = options[key]
|
||||
}
|
||||
|
||||
})
|
||||
emit(key, {
|
||||
event: key,
|
||||
options: obj
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function setChart(callback, options) {
|
||||
if (!callback) return
|
||||
if (chart && callback && options) {
|
||||
var r = null
|
||||
const name = parse('r', callback, options)
|
||||
if (name) this[name] = options
|
||||
eval(`r = ${callback};`)
|
||||
if (r) {
|
||||
r(chart)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setOption(data) {
|
||||
if (chart) chart.setOption(data[0], data[1])
|
||||
}
|
||||
|
||||
function showLoading(data) {
|
||||
if (chart) chart.showLoading(data[0], data[1])
|
||||
}
|
||||
|
||||
function hideLoading() {
|
||||
if (chart) chart.hideLoading()
|
||||
}
|
||||
|
||||
function clear() {
|
||||
if (chart) chart.clear()
|
||||
|
||||
}
|
||||
|
||||
function dispose() {
|
||||
if (chart) chart.dispose()
|
||||
}
|
||||
|
||||
function resize(size) {
|
||||
if (chart) chart.resize(size)
|
||||
}
|
||||
|
||||
function canvasToTempFilePath(opt = {}) {
|
||||
if (chart) {
|
||||
|
||||
delete opt.success
|
||||
const src = chart.getDataURL(opt)
|
||||
postMessage({
|
||||
// event: 'file',
|
||||
file: file
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user