优化页面

This commit is contained in:
3321822538@qq.com 2024-08-28 18:00:25 +08:00
parent 6459e028e4
commit 0280c4bf9b
11 changed files with 483 additions and 229 deletions

View File

@ -20,8 +20,8 @@ const install = (Vue, vm) => {
// }, // },
// }); // });
Vue.prototype.$u.http.setConfig({ Vue.prototype.$u.http.setConfig({
baseUrl: 'http://192.168.2.8:3302', // baseUrl: 'http://192.168.2.8:3302',
// baseUrl: 'https://kang.chuangtewl.com/prod-api', baseUrl: 'https://kang.chuangtewl.com/prod-api',
loadingText: '努力加载中~', loadingText: '努力加载中~',
loadingTime: 800, loadingTime: 800,
// 设置自定义头部content-type // 设置自定义头部content-type

View File

@ -6,17 +6,17 @@
<view class="box"> <view class="box">
<view class="one"> <view class="one">
<view class="name">角色名称</view> <view class="name">角色名称</view>
<view class="name_inp"> <view class="name_inp" @click="show=true">
<input type="text" placeholder="请选择角色名称" v-model="name" disabled="true"/> <input type="text" placeholder="请选择角色名称" v-model="name" disabled="true"/>
<image src="https://api.ccttiot.com/smartmeter/img/static/uqHhYENBVzNQmTp5pmrR" mode="" @click="show=true"></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uqHhYENBVzNQmTp5pmrR" mode=""></image>
</view> </view>
</view> </view>
<view class="one" style="margin-top: 30rpx;" v-if="flag"> <view class="one" style="margin-top: 30rpx;" v-if="flag">
<view class="name" style="margin-right: 80rpx;">投资人</view> <view class="name" style="margin-right: 80rpx;">投资人</view>
<view class="name_inp"> <view class="name_inp" @click="shows=true">
<input type="text" placeholder="请选择投资人" v-model="touzi" disabled="true"/> <input type="text" placeholder="请选择投资人" v-model="touzi" disabled="true"/>
<image src="https://api.ccttiot.com/smartmeter/img/static/uqHhYENBVzNQmTp5pmrR" mode="" @click="shows=true"></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uqHhYENBVzNQmTp5pmrR" mode=""></image>
</view> </view>
</view> </view>
@ -28,7 +28,7 @@
</view> </view>
<view class="tishi"> <view class="tishi">
被推广人分成比例不能超过自身分成比例 被推广人分成比例不能超过自身分成比例
</view> </view>
</view> </view>
<u-select v-model="show" :list="list" @confirm="confirm"></u-select> <u-select v-model="show" :list="list" @confirm="confirm"></u-select>

View File

@ -60,7 +60,7 @@
</view> </view>
<view class="jy"> <view class="jy">
<view class="one">所在房间</view> <view class="one">所在房间</view>
<view class="two">{{obj.room == undefined ? '--' : obj.room}}</view> <view class="two">{{obj.room == undefined ? '--' : obj.room}}</view>
</view> </view>
</view> </view>
<!-- 设备规格 --> <!-- 设备规格 -->

View File

@ -75,7 +75,7 @@
<view class="gn_list"> <view class="gn_list">
<view class="list_val" @click="btnpage(5)" v-if="infoobj.type == 2"> <view class="list_val" @click="btnpage(5)" v-if="infoobj.type == 2">
<view class="lt"> <view class="lt">
<image src="https://api.ccttiot.com/smartmeter/img/static/umjPUc8nDKf1JwVqRAeb" mode=""></image> <text>套餐管理</text> <image src="https://api.ccttiot.com/smartmeter/img/static/uQHtkI3xcBe7f1W5YFTO" mode=""></image> <text>套餐管理</text>
</view> </view>
<view class="rt"> <view class="rt">
<u-icon name="arrow-right" color="#3D3D3D" size="28"></u-icon> <u-icon name="arrow-right" color="#3D3D3D" size="28"></u-icon>
@ -315,11 +315,13 @@
} }
.gn_list{ .gn_list{
width: 658rpx; width: 658rpx;
max-height: 420rpx; max-height: 430rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;
margin-top: 20rpx; margin-top: 20rpx;
border-radius: 20rpx; border-radius: 20rpx;
padding-top: 10rpx;
box-sizing: border-box;
.list_val{ .list_val{
width: 100%; width: 100%;
display: flex; display: flex;
@ -327,6 +329,7 @@
align-items: center; align-items: center;
padding: 18rpx 36rpx; padding: 18rpx 36rpx;
box-sizing: border-box; box-sizing: border-box;
font-size: 28rpx;
} }
.lt{ .lt{
display: flex; display: flex;

View File

@ -3,95 +3,100 @@
<u-navbar title="订单详情" :border-bottom="false" :background="bgc" title-color='#3D3D3D' back-icon-color="#3D3D3D" <u-navbar title="订单详情" :border-bottom="false" :background="bgc" title-color='#3D3D3D' back-icon-color="#3D3D3D"
title-size='36' height='44'></u-navbar> title-size='36' height='44'></u-navbar>
<view class="shengyu"> <view class="shengyu">
剩余时长 剩余时长
</view> </view>
<view class="time"> <view class="time">
{{formattedTime}} {{formattedTime}}
</view> </view>
<view class="setmeal"> <view class="setmeal">
<view class="lt"> <view class="lt">
<image src="https://api.ccttiot.com/smartmeter/img/static/ujJcBAlIiMjakFEBQV8O" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/ujJcBAlIiMjakFEBQV8O" mode=""></image>
<view class="quan"> <view class="quan">
<view class="one"> <view class="one">
{{detailobj.suitTime == undefined ? '--' : detailobj.suitTime}}小时 {{detailobj.suitTime == undefined ? '--' : detailobj.suitTime}}小时
</view>
<view class="two">
套餐时长
</view>
</view> </view>
</view> <view class="two">
<view class="cen"></view> 套餐时长
<view class="rt">
<image src="https://api.ccttiot.com/smartmeter/img/static/u9hyl89RRMfuvTFnuVbi" mode=""></image>
<view class="quan">
<view class="one">
{{detailobj.money == undefined ? '--' : detailobj.money}}
</view>
<view class="two">
实付金额
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="cen"></view>
<view class="list_item"> <view class="rt">
<view class="top"> <image src="https://api.ccttiot.com/smartmeter/img/static/u9hyl89RRMfuvTFnuVbi" mode=""></image>
<view class="bh"> <view class="quan">
设备编号{{detailobj.deviceNo == undefined ? '--' : detailobj.deviceNo}} <view class="one">
</view> {{detailobj.money == undefined ? '--' : detailobj.money}}
<!-- <view class="wc"> </view>
<view class="two">
实付金额
</view>
</view>
</view>
</view>
<view class="list_item">
<view class="top">
<view class="bh">
设备编号{{detailobj.deviceNo == undefined ? '--' : detailobj.deviceNo}}
</view>
<!-- <view class="wc">
已完成 已完成
</view> --> </view> -->
</view>
<view class="item_xx">
<view class="">
订单号
</view>
<view class="">
{{detailobj.billNo == undefined ? '--' : detailobj.billNo}}
</view>
</view>
<view class="item_xx">
<view class="">
购买套餐
</view>
<view class="">
{{detailobj.suitName == undefined ? '--' : detailobj.suitName}}
</view>
</view>
<view class="item_xx">
<view class="">
金额
</view>
<view class="">
{{detailobj.money == undefined ? '--' : detailobj.money}}
</view>
</view>
<view class="item_xx">
<view class="">
租借店铺
</view>
<view class="">
{{detailobj.storeName == undefined ? '--' : detailobj.storeName}}
</view>
</view>
<view class="item_xx">
<view class="">
支付时间
</view>
<view class="">
{{detailobj.payTime == undefined ? '--' : detailobj.payTime}}
</view>
</view>
</view>
<view class="guangg" @click="btnad">
<image :src="imgad" mode=""></image>
</view> </view>
<view class="item_xx">
<view class="">
订单号
</view>
<view class="">
{{detailobj.billNo == undefined ? '--' : detailobj.billNo}}
</view>
</view>
<view class="item_xx">
<view class="">
购买套餐
</view>
<view class="">
{{detailobj.suitName == undefined ? '--' : detailobj.suitName}}
</view>
</view>
<view class="item_xx">
<view class="">
金额
</view>
<view class="">
{{detailobj.money == undefined ? '--' : detailobj.money}}
</view>
</view>
<view class="item_xx">
<view class="">
租借店铺
</view>
<view class="">
{{detailobj.storeName == undefined ? '--' : detailobj.storeName}}
</view>
</view>
<view class="item_xx">
<view class="">
支付时间
</view>
<view class="">
{{detailobj.payTime == undefined ? '--' : detailobj.payTime}}
</view>
</view>
</view>
<view class="del" @click="btndel" v-if="flag">
删除订单
</view>
<view class="del" v-else>
删除订单
</view>
<view class="" style="position: fixed;top: 0;left: 0;width: 100%;height: 100vh;z-index: -1;"> <view class="" style="position: fixed;top: 0;left: 0;width: 100%;height: 100vh;z-index: -1;">
<image style="width: 100%;height: 100vh;" src="https://api.ccttiot.com/smartmeter/img/static/u5AWkMT3khOhGPKrUPMH" mode=""></image> <image style="width: 100%;height: 100vh;"
src="https://api.ccttiot.com/smartmeter/img/static/u5AWkMT3khOhGPKrUPMH" mode=""></image>
</view> </view>
</view> </view>
</template> </template>
@ -100,59 +105,98 @@
export default { export default {
data() { data() {
return { return {
imgad:'', imgad: '',
detailobj:{}, detailobj: {},
billId:'', billId: '',
timeday: '', timeday: '',
flag: true
} }
}, },
onLoad(option) { onLoad(option) {
if(option.billId){ if (option.billId) {
this.billId = option.billId this.billId = option.billId
this.getlist() this.getlist()
this.getad() // this.getad()
}else{ } else {
this.billId = option.id this.billId = option.id
this.getlist() this.getlist()
this.getad() // this.getad()
} }
}, },
// //
onShareAppMessage: function () { onShareAppMessage: function() {
return { return {
title: '创亿康', title: '创亿康',
path: '/pages/index/index' path: '/pages/index/index'
} }
}, },
// //
onShareTimeline: function () { onShareTimeline: function() {
return { return {
title: '创亿康', title: '创亿康',
query: '', query: '',
path: '/pages/index/index' path: '/pages/index/index'
} }
}, },
computed: { computed: {
formattedTime() { formattedTime() {
if (this.timeday.days > 0) { if (this.timeday.days > 0) {
// //
return `${this.timeday.days}${this.timeday.hours}小时` return `${this.timeday.days}${this.timeday.hours}小时`
} else if (this.timeday.hours > 0) { } else if (this.timeday.hours > 0) {
// //
return `${this.timeday.hours}小时${this.timeday.minutes}分钟` return `${this.timeday.hours}小时${this.timeday.minutes}分钟`
} else if (this.timeday.minutes > 0) { } else if (this.timeday.minutes > 0) {
// //
return `${this.timeday.minutes}分钟${this.timeday.seconds}` return `${this.timeday.minutes}分钟${this.timeday.seconds}`
} else { } else {
// 00 // 00
return this.timeday.seconds > 0 ? `${this.timeday.seconds}` : '0' return this.timeday.seconds > 0 ? `${this.timeday.seconds}` : '0'
} }
} }
}, },
methods: { methods: {
btndel() {
let that = this
uni.showModal({
title: '提示',
content: '您确定要删除此订单吗?',
success: function(res) {
if (res.confirm) {
that.flag = false
that.$u.delete(`/app/bill/${that.billId}`).then(res => {
if (res.code == 200) {
uni.showToast({
title: res.msg,
icon: 'success',
duration: 1000
})
setTimeout(() => {
that.flag = true
uni.navigateBack()
}, 1500)
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 1000
})
setTimeout(() => {
that.flag = true
}, 1500)
}
})
} else if (res.cancel) {
console.log('用户点击取消');
//
}
}
})
},
// //
getlist(){ getlist() {
this.$u.get(`/app/bill/${this.billId}`).then((res) => { this.$u.get(`/app/bill/${this.billId}`).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.detailobj = res.data this.detailobj = res.data
@ -170,7 +214,7 @@
if (differenceInMs <= 0) { if (differenceInMs <= 0) {
this.timeday = 0 this.timeday = 0
} else { } else {
if(this.timeday == ''){ if (this.timeday == '') {
this.timeday = this.formatMilliseconds(differenceInMs) this.timeday = this.formatMilliseconds(differenceInMs)
this.startTimer() this.startTimer()
} }
@ -220,30 +264,6 @@
seconds: seconds seconds: seconds
} }
}, },
btnad() {
this.$u.get("/app/ad").then((res) => {
if (res.code == 200) {
if (res.data.urlType == 1) {
uni.navigateTo({
url: '/pages/webview?url=' + res.data.url
})
} else {
uni.navigateTo({
url: res.data.url
})
}
}
})
},
getad() {
this.$u.get("/app/ad").then((res) => {
if (res.code == 200) {
this.imgad = res.data.picture
}
})
},
} }
} }
</script> </script>
@ -256,53 +276,82 @@
/deep/ .u-icon__icon { /deep/ .u-icon__icon {
padding-bottom: 15rpx; padding-bottom: 15rpx;
} }
page {
background: #F4F5F7; page {
} background: #F4F5F7;
}
.del {
position: fixed;
bottom: 100rpx;
left: 50%;
transform: translateX(-50%);
// background-color: #fff;
// background: linear-gradient(to right, #FFEFEF 20%, #D9F6FF 100%);
background-color: red;
padding-left: 50rpx;
padding-right: 50rpx;
width: 650rpx;
height: 84rpx;
// background: red;
filter: blur(0px);
text-align: center;
line-height: 84rpx;
font-size: 36rpx;
color: #fff;
border-radius: 50rpx;
}
.page { .page {
width: 750rpx; width: 750rpx;
height: 100vh; height: 100vh;
overflow: hidden; overflow: hidden;
padding: 0 46rpx; padding: 0 46rpx;
box-sizing: border-box; box-sizing: border-box;
.guangg { .guangg {
margin-top: 30rpx; margin-top: 30rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
image { image {
border-radius: 30rpx; border-radius: 30rpx;
width: 100%; width: 100%;
height: 218rpx; height: 218rpx;
} }
} }
.list_item{
.list_item {
width: 658rpx; width: 658rpx;
height: 380rpx; height: 380rpx;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42,130,228,0.1); box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42, 130, 228, 0.1);
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;
margin: auto; margin: auto;
margin-top: 30rpx; margin-top: 30rpx;
padding: 24rpx 30rpx; padding: 24rpx 30rpx;
box-sizing: border-box; box-sizing: border-box;
.top{
.top {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
border-bottom: 1px solid #D8D8D8; border-bottom: 1px solid #D8D8D8;
padding-bottom: 20rpx; padding-bottom: 20rpx;
box-sizing: border-box; box-sizing: border-box;
.bh{
.bh {
font-size: 28rpx; font-size: 28rpx;
color: #3D3D3D; color: #3D3D3D;
} }
.wc{
.wc {
font-size: 28rpx; font-size: 28rpx;
color: #8883F0; color: #8883F0;
} }
} }
.bot{
.bot {
margin-top: 22rpx; margin-top: 22rpx;
width: 100%; width: 100%;
display: flex; display: flex;
@ -312,11 +361,13 @@
padding-top: 20rpx; padding-top: 20rpx;
box-sizing: border-box; box-sizing: border-box;
border-top: 1px solid #D8D8D8; border-top: 1px solid #D8D8D8;
.time{
.time {
font-size: 24rpx; font-size: 24rpx;
color: #808080; color: #808080;
} }
.pagexq{
.pagexq {
width: 142rpx; width: 142rpx;
height: 48rpx; height: 48rpx;
background: #8883F0; background: #8883F0;
@ -328,7 +379,8 @@
border-radius: 20rpx; border-radius: 20rpx;
} }
} }
.item_xx{
.item_xx {
margin-top: 22rpx; margin-top: 22rpx;
width: 100%; width: 100%;
display: flex; display: flex;
@ -338,21 +390,24 @@
color: #3D3D3D; color: #3D3D3D;
} }
} }
.shengyu{
.shengyu {
font-size: 40rpx; font-size: 40rpx;
color: #3D3D3D; color: #3D3D3D;
margin-top: 46rpx; margin-top: 46rpx;
} }
.time{
.time {
font-size: 48rpx; font-size: 48rpx;
color: #8883F0; color: #8883F0;
margin-top: 12rpx; margin-top: 12rpx;
} }
.setmeal{
.setmeal {
margin-top: 38rpx; margin-top: 38rpx;
width: 658rpx; width: 658rpx;
height: 150rpx; height: 150rpx;
background: rgba(136,131,240,0.1); background: rgba(136, 131, 240, 0.1);
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;
border-image: linear-gradient(180deg, rgba(255, 255, 255, 0.07999999821186066), rgba(156.31499379873276, 140.25000303983688, 255, 0.23999999463558197)) 2 2; border-image: linear-gradient(180deg, rgba(255, 255, 255, 0.07999999821186066), rgba(156.31499379873276, 140.25000303983688, 255, 0.23999999463558197)) 2 2;
display: flex; display: flex;
@ -360,45 +415,54 @@
align-items: center; align-items: center;
padding: 0 42rpx; padding: 0 42rpx;
box-sizing: border-box; box-sizing: border-box;
.cen{
.cen {
width: 2rpx; width: 2rpx;
height: 108rpx; height: 108rpx;
border: 2rpx solid #8883F0; border: 2rpx solid #8883F0;
opacity: 0.5; opacity: 0.5;
} }
.lt{
.lt {
display: flex; display: flex;
align-items: center; align-items: center;
text-align: center; text-align: center;
image{
image {
width: 84rpx; width: 84rpx;
height: 84rpx; height: 84rpx;
margin-right: 30rpx; margin-right: 30rpx;
} }
.one{
.one {
font-size: 32rpx; font-size: 32rpx;
color: #3D3D3D; color: #3D3D3D;
} }
.two{
.two {
font-size: 24rpx; font-size: 24rpx;
color: #3D3D3D; color: #3D3D3D;
margin-top: 8rpx; margin-top: 8rpx;
} }
} }
.rt{
.rt {
display: flex; display: flex;
align-items: center; align-items: center;
text-align: center; text-align: center;
image{
image {
width: 84rpx; width: 84rpx;
height: 84rpx; height: 84rpx;
margin-right: 30rpx; margin-right: 30rpx;
} }
.one{
.one {
font-size: 32rpx; font-size: 32rpx;
color: #3D3D3D; color: #3D3D3D;
} }
.two{
.two {
font-size: 24rpx; font-size: 24rpx;
color: #3D3D3D; color: #3D3D3D;
margin-top: 8rpx; margin-top: 8rpx;

View File

@ -3,7 +3,7 @@
<u-navbar title="我的订单" :border-bottom="false" :background="bgc" title-color='#3D3D3D' back-icon-color="#3D3D3D" <u-navbar title="我的订单" :border-bottom="false" :background="bgc" title-color='#3D3D3D' back-icon-color="#3D3D3D"
title-size='36' height='44'></u-navbar> title-size='36' height='44'></u-navbar>
<scroll-view class="list" scroll-y="true" @scrolltolower="onScrollToLower" style="height: 90vh;"> <scroll-view class="list" scroll-y="true" @scrolltolower="onScrollToLower" style="height: 90vh;">
<view class="list_item" v-for="(item,index) in wateringList" :key="index" @scrolltolower="onReachBottom"> <view class="list_item" v-for="(item,index) in wateringList" :key="index" @scrolltolower="onReachBottom" @click="btnxq(item.billId)">
<view class="top"> <view class="top">
<view class="bh"> <view class="bh">
设备编号{{item.deviceNo}} 设备编号{{item.deviceNo}}
@ -66,7 +66,7 @@
<view class="time"> <view class="time">
{{item.createTime}} {{item.createTime}}
</view> </view>
<view class="pagexq" @click="btnxq(item.billId)"> <view class="pagexq">
订单详情 订单详情
</view> </view>
</view> </view>
@ -101,6 +101,11 @@
} }
}, },
onLoad(option) { onLoad(option) {
},
onShow() {
this.wateringList = []
this.pagenum = 1
this.getlist() this.getlist()
}, },
// //

View File

@ -138,8 +138,8 @@
this.pagenum = 1 this.pagenum = 1
this.getlist() this.getlist()
}else if(num == 2){ }else if(num == 2){
this.isUsing = false this.isUsing = true
this.isFinished = true this.isFinished = false
this.wateringList = [] this.wateringList = []
this.pagenum = 1 this.pagenum = 1
this.getlist() this.getlist()
@ -239,8 +239,9 @@
background-color: #F7FAFE !important; background-color: #F7FAFE !important;
height: 100vh; height: 100vh;
width: 100%; width: 100%;
overflow: hidden;
.order_list{ .order_list{
padding-bottom: 100rpx; padding-bottom: 350rpx;
box-sizing: border-box; box-sizing: border-box;
height: 1020rpx; height: 1020rpx;
overflow: scroll; overflow: scroll;

View File

@ -71,7 +71,7 @@
},{ },{
"path": "pages/webview", "path": "pages/webview",
"style": { "style": {
"navigationBarTitleText": "上传", "navigationBarTitleText": "",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
} }

View File

@ -7,25 +7,28 @@
<view class="ditu"> <view class="ditu">
<view class="dtxs"> <view class="dtxs">
<map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick" <map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick"
:show-location="true" :markers="covers" :scale="mapScale" /> :show-location="true" :markers="covers" :scale="mapScale" @tap="onMapTap"/>
</view> </view>
<!-- 正在进行中的订单 --> <!-- 正在进行中的订单 -->
<view class="ongoing_order" v-if="sylist.length > 0"> <view class="ongoing_order" v-if="sylist.length > 0">
<view class="order_top"> <view class="order_top">
<view class="order_lt"> <view class="order_lt">
<image src="https://api.ccttiot.com/smartmeter/img/static/uFNuOet0fB5Bwe1c26sk" mode=""> <image src="https://api.ccttiot.com/smartmeter/img/static/u9ZhnYLz3vsCwamX3Gvv" mode="">
</image> </image>
<text>您有正在使用中的设备...</text> <text>您有正在使用中的设备...</text>
</view> </view>
<image @click="btnorder" v-if="!listflag" <!-- <image @click="btnorder" v-if="!listflag"
src="https://api.ccttiot.com/smartmeter/img/static/ublEB3HEjyfZbnKS2Ai9" mode=""></image> src="https://api.ccttiot.com/smartmeter/img/static/ublEB3HEjyfZbnKS2Ai9" mode=""></image> -->
<image @click="btnorders" v-if="listflag" style="transform: rotate(180deg);margin-top: 20rpx;" <u-icon @click="btnorder" v-if="!listflag" name="arrow-down" color="#000" size="28"></u-icon>
src="https://api.ccttiot.com/smartmeter/img/static/ublEB3HEjyfZbnKS2Ai9" mode=""></image> <!-- <image @click="btnorders" v-if="listflag" style="transform: rotate(180deg);margin-top: 20rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/ublEB3HEjyfZbnKS2Ai9" mode=""></image> -->
<u-icon @click="btnorders" v-if="listflag" name="arrow-up" color="#000" size="28"></u-icon>
</view> </view>
<view class="order_list" v-for="(item,index) in sylist" :key="index" v-if="listflag" <view class="order_list" v-for="(item,index) in sylist" :key="index" v-if="listflag"
@click="btnitem(item.billId)"> @click="btnitem(item.billId)">
<text>{{item.deviceName}}</text> <text>{{item.deviceName}}</text>
<image src="https://api.ccttiot.com/smartmeter/img/static/uZoBXJ0MLrGUSBFk5lGp" mode=""></image> <!-- <image src="https://api.ccttiot.com/smartmeter/img/static/uZoBXJ0MLrGUSBFk5lGp" mode=""></image> -->
<u-icon name="arrow-right" color="#000" size="28"></u-icon>
</view> </view>
</view> </view>
<!-- 正在进行中的订单结束 --><!-- 正在进行中的订单结束 --> <!-- 正在进行中的订单结束 --><!-- 正在进行中的订单结束 -->
@ -159,8 +162,8 @@
indicatorDots: true, indicatorDots: true,
autoplay: true, autoplay: true,
interval: 6000, interval: 5000,
duration: 2000, duration: 500,
c: '', //广 c: '', //广
tgobj: {}, tgobj: {},
@ -182,7 +185,7 @@
let decodedValue = decodeURIComponent(sceneValue) let decodedValue = decodeURIComponent(sceneValue)
let id = getQueryParam(decodedValue, 'c') let id = getQueryParam(decodedValue, 'c')
this.c = id this.c = id
console.log('接收到的参数:', this.c) // console.log(':', this.c)
this.$u.get(`/app/shareCode/byCode/${this.c}`).then((res) => { this.$u.get(`/app/shareCode/byCode/${this.c}`).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.tgobj = res.data this.tgobj = res.data
@ -347,9 +350,9 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/webview?url=' + item.url url: '/pages/webview?url=' + item.url
}) })
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: item.url url: '/' + item.url
}) })
} }
} }
@ -399,15 +402,14 @@
} }
that.$u.get(`/app/device/isBind?deviceNo=${id}`).then(res => { that.$u.get(`/app/device/isBind?deviceNo=${id}`).then(res => {
if (res.data == 2) { if (res.data == 2) {
that.$u.get(`/app/device/${id}/withSuitList`).then( that.$u.get(`/app/device/${id}/withSuitList`).then((res) => {
(res) => {
if (res.code == 200) { if (res.code == 200) {
uni.navigateTo({ uni.navigateTo({
url: '/page_user/fuwu?id=' + id url: '/page_user/fuwu?id=' + id
}) })
} }
}) })
}else if (res.data == 0) { } else if (res.data == 0) {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '该设备未录入,你需进行录入吗?', content: '该设备未录入,你需进行录入吗?',
@ -515,6 +517,64 @@
onControltap(control) { onControltap(control) {
this.setMapScale() this.setMapScale()
}, },
//
onMapTap(e){
this.jinweidu = e.detail.longitude + ',' + e.detail.latitude
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(
res => {
if (res.code == 200) {
this.listmap = res.data
res.data.forEach(item => {
// if (item.deviceCount !== null && item.deviceCount > 0) {
const shopCover = {
id: parseFloat(item.storeId),
latitude: item.lat,
longitude: item.lng,
width: 25,
height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY',
// iconPath:item.picture
label: {
content: item.name,
anchorX: (() => {
if (item.name.length <= 2) {
return -12
} else if (item.name.length <=
3) {
return -20
} else if (item.name.length <=
4) {
return -25
} else if (item.name.length <=
5) {
return -30
} else if (item.name.length <=
6) {
return -35
} else if (item.name.length <=
8) {
return -40
} else if (item.name.length <=
10) {
return -45
} else {
return -item.name.length *
6
}
})(),
fontWeight: 700,
color: '#8883F0',
borderColor: '#fff',
borderRadius: 5,
bgColor: '#fff'
}
}
this.covers.push(shopCover)
// }
})
}
})
},
// //
async setMapScale(e, val) { async setMapScale(e, val) {
let mapContext = uni.createMapContext('map', this); let mapContext = uni.createMapContext('map', this);
@ -558,7 +618,7 @@
longitude: item.lng, longitude: item.lng,
width: 25, width: 25,
height: 30, height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/ukj9VG7nQkBdZ4SKfQ6E', iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY',
// iconPath:item.picture // iconPath:item.picture
label: { label: {
content: item.name, content: item.name,
@ -630,7 +690,7 @@
longitude: item.lng, longitude: item.lng,
width: 25, width: 25,
height: 30, height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/ukj9VG7nQkBdZ4SKfQ6E', iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY',
borderColor: '#fff', borderColor: '#fff',
borderRadius: 5, borderRadius: 5,
bgColor: '#fff' bgColor: '#fff'
@ -648,7 +708,7 @@
longitude: item.lng, longitude: item.lng,
width: 25, width: 25,
height: 30, height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/ukj9VG7nQkBdZ4SKfQ6E', iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY',
label: { label: {
content: item.name, content: item.name,
anchorX: this.calculateAnchorX(item.name), anchorX: this.calculateAnchorX(item.name),
@ -686,7 +746,7 @@
} else { } else {
this.jmlogin() this.jmlogin()
} }
}) })
}, },
jmlogin() { jmlogin() {
@ -1109,8 +1169,8 @@
.ongoing_order { .ongoing_order {
width: 622rpx; width: 622rpx;
max-height: 100%; max-height: 100%;
background-color: rgba(0, 0, 0, 0.4); // background-color: rgba(0, 0, 0, 0.4);
// background: linear-gradient(to right, #FFEFEF 20%, #D9F6FF 100%); background: linear-gradient(to right, #FFEFEF 20%, #D9F6FF 100%);
border-radius: 40rpx 40rpx 40rpx 40rpx; border-radius: 40rpx 40rpx 40rpx 40rpx;
// opacity: 0.6; // opacity: 0.6;
position: absolute; position: absolute;
@ -1127,7 +1187,7 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
font-size: 36rpx; font-size: 36rpx;
color: #fff; color: #3D3D3D;
padding: 0 38rpx; padding: 0 38rpx;
padding-right: 56rpx; padding-right: 56rpx;
box-sizing: border-box; box-sizing: border-box;
@ -1144,8 +1204,8 @@
width: 622rpx; width: 622rpx;
height: 94rpx; height: 94rpx;
background: rgba(0, 0, 0, 0.4); background: rgba(0, 0, 0, 0.4);
// background: linear-gradient(to right, #FFEFEF 20%, #D9F6FF 100%); background: linear-gradient(to right, #FFEFEF 20%, #D9F6FF 100%);
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(0, 0, 0, 0.3); // box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(0, 0, 0, 0.3);
border-radius: 40rpx 40rpx 40rpx 40rpx; border-radius: 40rpx 40rpx 40rpx 40rpx;
display: flex; display: flex;
align-items: center; align-items: center;
@ -1154,7 +1214,7 @@
box-sizing: border-box; box-sizing: border-box;
font-weight: 400; font-weight: 400;
font-size: 36rpx; font-size: 36rpx;
color: #fff; color: #3D3D3D;
.order_lt { .order_lt {
display: flex; display: flex;

View File

@ -4,7 +4,7 @@
title-size='44' height='44'></u-navbar> title-size='44' height='44'></u-navbar>
<view class="dtxs"> <view class="dtxs">
<map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick" <map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick"
:show-location="true" :markers="covers" :scale="mapScale" /> :show-location="true" :markers="covers" :scale="mapScale" @tap="onMapTap"/>
</view> </view>
<view class="listbox" v-if="falga"> <view class="listbox" v-if="falga">
<!-- <view class="moshi"> <!-- <view class="moshi">
@ -36,13 +36,13 @@
</view> </view>
<view class="cenc"> <view class="cenc">
经营时间{{listobj.businessTimeStart == undefined ? '--' : listobj.businessTimeStart}}-{{listobj.businessTimeEnd == undefined ? '--' : listobj.businessTimeEnd}} <text 经营时间{{listobj.businessTimeStart == undefined ? '--' : listobj.businessTimeStart}}-{{listobj.businessTimeEnd == undefined ? '--' : listobj.businessTimeEnd}} <text
class="bu">{{listobj.availableDeviceCount}}台可使用</text> class="bu">可使用{{listobj.availableDeviceCount}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="chakan" @click="btnchak(listobj.storeId)"> <view class="chakan" @click="btnchak(listobj.storeId)">
<view class=""> <view class="">
本店共有{{listobj.deviceCount == undefined ? '--' : listobj.deviceCount}}设备 本店共有{{listobj.deviceCount == undefined ? '--' : listobj.deviceCount}}设备
</view> </view>
<view class=""> <view class="">
查看 <u-icon name="arrow-right" color="#6863D9" size="24" style="margin-left: 10rpx;"></u-icon> 查看 <u-icon name="arrow-right" color="#6863D9" size="24" style="margin-left: 10rpx;"></u-icon>
@ -147,7 +147,7 @@
longitude: item.lng, longitude: item.lng,
width: 25, width: 25,
height: 30, height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/ukj9VG7nQkBdZ4SKfQ6E', iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY',
borderColor:'#fff', borderColor:'#fff',
borderRadius:5, borderRadius:5,
bgColor: '#fff' bgColor: '#fff'
@ -165,7 +165,7 @@
longitude: item.lng, longitude: item.lng,
width: 25, width: 25,
height: 30, height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/ukj9VG7nQkBdZ4SKfQ6E', iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY',
label: { label: {
content: item.name, content: item.name,
anchorX: this.calculateAnchorX(item.name), anchorX: this.calculateAnchorX(item.name),
@ -282,6 +282,59 @@
}, },
}) })
}, },
onMapTap(e){
this.jinweidu = e.detail.longitude + ',' + e.detail.latitude
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(
res => {
if (res.code == 200) {
this.listmap = res.data
// res.rowslatitudelongitude
res.data.forEach(item => {
if (item.deviceCount !== null && item.deviceCount > 0) {
const shopCover = {
id: parseFloat(item.storeId),
latitude: item.lat,
longitude: item.lng,
width: 25,
height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY',
label: {
content: item.name,
anchorX: (() => {
if (item.name.length <= 2) {
return -12
} else if (item.name.length <= 3) {
return -20
} else if (item.name.length <= 4) {
return -25
} else if (item.name.length <= 5) {
return -30
} else if (item.name.length <= 6) {
return -35
} else if (item.name.length <= 8) {
return -40
} else if (item.name.length <= 10) {
return -45
} else {
return -item.name.length * 5
}
})(),
fontWeight: 700,
color: '#8883F0',
textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white',
borderColor:'#fff',
borderRadius:5,
bgColor: '#fff'
}
};
this.covers.push(shopCover);
}
});
}
});
},
getMyLocation() { getMyLocation() {
uni.getLocation({ uni.getLocation({
@ -305,7 +358,7 @@
longitude: item.lng, longitude: item.lng,
width: 25, width: 25,
height: 30, height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/ukj9VG7nQkBdZ4SKfQ6E', iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY',
label: { label: {
content: item.name, content: item.name,
anchorX: (() => { anchorX: (() => {

View File

@ -4,7 +4,7 @@
title-size='44' height='44'></u-navbar> title-size='44' height='44'></u-navbar>
<view class="dtxs"> <view class="dtxs">
<map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick" <map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick"
:show-location="true" :markers="covers" :scale="mapScale" /> :show-location="true" :markers="covers" :scale="mapScale" @tap="onMapTap"/>
</view> </view>
<view class="listbox"> <view class="listbox">
<view class="moshi"> <view class="moshi">
@ -26,7 +26,7 @@
{{item.address}} {{item.address}}
</view> </view>
<view class="cenc"> <view class="cenc">
经营时间{{item.businessTimeStart}}-{{item.businessTimeEnd}}<text class="bu">可使用</text> 经营时间{{item.businessTimeStart}}-{{item.businessTimeEnd}}<text class="bu">可使用{{item.deviceCount}}</text>
</view> </view>
</view> </view>
<view class="right"> <view class="right">
@ -97,6 +97,74 @@
} }
}, },
methods: { methods: {
//
onMapTap(e){
this.gxlist = []
this.jinweidu = e.detail.longitude + ',' + e.detail.latitude
//
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(
response => {
if (response.code == 200) {
this.listmap = response.data
let gxlist = response.data
gxlist.forEach(item => {
// if (item.deviceCount !== null && item.deviceCount > 0) {
//
const distance = this.getDistance(this.latitude, this.longitude, item.lat, item.lng)
//
item.distance = distance
//
const shopCover = {
id: parseFloat(item.storeId),
latitude: item.lat,
longitude: item.lng,
width: 25,
height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY',
distance: distance, //
label: {
content: item.name,
anchorX: (() => {
if (item.name.length <= 2) {
return -12
} else if (item.name.length <=
3) {
return -20
} else if (item.name.length <=
4) {
return -25
} else if (item.name.length <=
5) {
return -30
} else if (item.name.length <=
6) {
return -35
} else if (item.name.length <=
8) {
return -40
} else if (item.name.length <=
10) {
return -45
} else {
return -item.name.length *
5
}
})(),
fontWeight: 700,
color: '#8883F0',
textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white',
borderRadius:5,
bgColor: '#fff'
}
}
this.covers.push(shopCover)
this.gxlist.push(item)
// }
})
}
})
},
updateMarkers() { updateMarkers() {
this.mapContext.getScale({ this.mapContext.getScale({
success: (res) => { success: (res) => {
@ -122,7 +190,7 @@
longitude: item.lng, longitude: item.lng,
width: 25, width: 25,
height: 30, height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/ukj9VG7nQkBdZ4SKfQ6E', iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY',
borderRadius:5, borderRadius:5,
bgColor: '#fff' bgColor: '#fff'
} }
@ -140,7 +208,7 @@
longitude: item.lng, longitude: item.lng,
width: 25, width: 25,
height: 30, height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/ukj9VG7nQkBdZ4SKfQ6E', iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY',
label: { label: {
content: item.name, content: item.name,
anchorX: this.calculateAnchorX(item.name), anchorX: this.calculateAnchorX(item.name),
@ -243,7 +311,7 @@
longitude: item.lng, longitude: item.lng,
width: 25, width: 25,
height: 30, height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/ukj9VG7nQkBdZ4SKfQ6E', iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY',
distance: distance, // distance: distance, //
label: { label: {
content: item.name, content: item.name,