This commit is contained in:
3321822538@qq.com 2024-06-03 16:47:25 +08:00
parent ff2f195174
commit 64a6a1dc07
32 changed files with 410 additions and 333 deletions

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="用电分析" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff' title-size='36'
height='58' id="navbar"></u-navbar>
height='50' id="navbar"></u-navbar>
<view class="card">
<view class="xzsj">
<u-picker mode="time" v-model="show" :params="params" @confirm="confirm"></u-picker>
@ -338,6 +338,13 @@
</script>
<style lang="scss">
/deep/ .u-title {
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon {
padding-bottom: 22rpx;
}
page {
background-color: #F7FAFE;
}

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="充值" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff"
title-size='36' height='58'></u-navbar>
title-size='36' height='50'></u-navbar>
<view class="title">
设备名称{{deviceobj.deviceName}}
</view>
@ -208,7 +208,7 @@
<style lang="scss">
/deep/ .u-title {
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
// /deep/ .u-icon__icon{

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="常见问题" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="box">
<view class="title">
{{listobj.title}}
@ -40,10 +40,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 20rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 40rpx;
padding-bottom: 20rpx;
}
page {
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);

View File

@ -1,7 +1,7 @@
<template>
<view class="pages">
<u-navbar title="蓝牙充值" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff"
title-size='38' height='58'></u-navbar>
title-size='38' height='50'></u-navbar>
<view class="card" v-for="(item,index) in devicesList" :key="index">
<view class="card_left">
<image src="https://api.ccttiot.com/smartmeter/img/static/uoQO0pUZ1UHcW5uVKkuR" mode=""></image>
@ -492,11 +492,11 @@
<style lang="scss">
/deep/ .u-title {
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon {
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="关于我们" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="box">
<view class="title">
{{obj.title}}
@ -42,10 +42,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="设备故障" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="box">
<view class="nav">
<view class="top">
@ -132,10 +132,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .uicon-nav-back{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
// background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
@ -181,11 +181,11 @@
width: 750rpx;
// height: 180rpx;
background: #FFFFFF;
padding: 32rpx 36rpx;
padding: 50rpx 36rpx;
box-sizing: border-box;
margin-bottom: 26rpx;
// margin-bottom: 26rpx;
position: fixed;
top: 200rpx;
top: 170rpx;
.top{
.yc{
width: 178rpx;

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="上报异常" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="box">
<view class="list">
<view class="sbbh">
@ -155,10 +155,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);

View File

@ -1,9 +1,9 @@
<template>
<view class="page">
<u-navbar title="商家合作" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="title">
请输入您的真实有效信息我们将在第一时间联系
请输入您的真实有效信息我们将在第一时间联系
</view>
<view class="box">
<view class="name">
@ -12,8 +12,8 @@
<input type="text" placeholder="请输入您的真实姓名" v-model="name" />
</view>
<view class="photo">
<image src="https://api.ccttiot.com/smartmeter/img/static/uyQd0mrdyjuMZFMUx4sh" mode=""></image>
<input type="text" placeholder="微信绑定手机号" v-model="phone" />
<image src="https://api.ccttiot.com/smartmeter/img/static/uWvCbMLwjsdweRjOO1ZW" mode=""></image>
<input type="text" placeholder="请输入您的手机号" v-model="phone" />
</view>
<view class="photos">
<!-- <image src="../../../static/image/a1.png" mode=""></image> -->
@ -94,10 +94,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .uicon-nav-back{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
@ -111,11 +111,11 @@
left: 0;
.title{
width: 100%;
height: 180rpx;
height: 120rpx;
padding: 30rpx;
box-sizing: border-box;
font-size: 30rpx;
color: #3D3D3D;
color: #fff;
}
.box{
width: 750rpx;

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="订单详情" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="box">
<view class="listxq">
<view class="nav">
@ -107,10 +107,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="我的订单" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="box">
<view class="list" @scrolltolower="onReachBottom" v-for="(item,index) in wateringList" :key="index" @click="btndetail(item)">
<view class="list_val">
@ -37,11 +37,10 @@
</view>
</view>
<view class="" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 100rpx;text-align: center;"
v-if="showflag">
<view class="" v-if="showflag" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 170rpx;text-align: center;">
<image style="width: 448rpx;height: 448rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode=""></image>
<view class="" style="font-size: 30rpx;color: #ccc;margin-top: 30rpx;">暂无更多订单记录...</view>
<view class="" style="font-size: 36rpx;color: #808080;margin-top: 30rpx;">暂无更多订单记录...</view>
</view>
</view>
@ -119,13 +118,13 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
// background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
background: #F4F5F7;
}
.page {

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="修改店铺" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="box">
<view class="list">
<view class="listval">
@ -373,10 +373,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="我的店铺" :border-bottom="false" :background="bgc" title-color='#fff' title-size='36'
back-icon-color="#fff" height='58'></u-navbar>
back-icon-color="#fff" height='50'></u-navbar>
<view class="box">
<view class="top">
<u-search placeholder="搜索" input-align="center" v-model="keyword" @custom="searchs"></u-search>
@ -163,11 +163,11 @@
<style lang="scss">
/deep/ .u-title {
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .uicon-nav-back {
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
@ -325,14 +325,14 @@
.top {
width: 750rpx;
height: 136rpx;
height: 150rpx;
background: #FFFFFF;
padding: 32rpx 36rpx;
padding: 45rpx 36rpx;
box-sizing: border-box;
display: flex;
justify-content: space-between;
position: fixed;
top: 200rpx;
top: 170rpx;
.cjshop {
width: 200rpx;

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="设备列表" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff"
title-size='36' height='58'></u-navbar>
title-size='36' height='50'></u-navbar>
<view class="box">
<view class="warp_box">
<view class="swiper" :current='curtitidx' @change="swiperchange" @scrolltolower="onReachBottom">
@ -122,11 +122,11 @@
<style lang="scss">
/deep/ .u-title {
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon {
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page{
background: #F4F5F7;

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="店铺详情" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff"
title-size='36' height='58'></u-navbar>
title-size='36' height='50'></u-navbar>
<view class="box">
<view class="shopname">
{{listobj.name}}
@ -387,16 +387,13 @@
<style lang="scss">
/deep/ .u-title {
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon {
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon {
padding-bottom: 40rpx;
}
page {
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="创建店铺" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="box">
<view class="list">
<view class="listval">
@ -333,10 +333,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);

View File

@ -1,15 +1,18 @@
<template>
<view class="page">
<u-navbar title="附近共享" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='44' height='58'></u-navbar>
<view class="dtxs">
<!-- <map class='map' :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick" :markers="covers" :show-location="true" :scale="mapScale"/> -->
<map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick"
:show-location="true" :markers="covers" :scale="mapScale" />
</view>
<u-navbar title="附近共享" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff"
title-size='44' height='50'></u-navbar>
<view class="dtxs">
<!-- <map class='map' :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick" :markers="covers" :show-location="true" :scale="mapScale"/> -->
<map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick"
:show-location="true" :markers="covers" :scale="mapScale" />
</view>
<view class="listbox">
<view class="moshi">
<image src="https://api.ccttiot.com/smartmeter/img/static/uCux5cJrpLFhwYjVTz4J" mode="" @click="btndt(1)" class="img"></image>
<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/uGVN2tOaCq2hiWKy1cYl" mode="" @click="btndt(2)" v-if="isMch"></image> -->
<image src="https://api.ccttiot.com/smartmeter/img/static/uCux5cJrpLFhwYjVTz4J" mode=""
@click="btndt(1)" class="img"></image>
<image @click="onControltap" style="width: 66rpx;height: 66rpx;position: absolute;right: 40rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/uOS9p7Sy1K9WpVQgD3b9" mode=""></image>
</view>
<view class="list" v-for="(item,index) in gxlist" :key="index">
<view class="pic" @click="btndts(item)">
@ -20,6 +23,7 @@
{{item.name}}
</view>
<view class="cenb">
<image src="https://api.ccttiot.com/smartmeter/img/static/uHK2aJHvzEm3nbOPwpdr" mode=""></image>
{{item.address}}
</view>
<view class="cenc">
@ -27,12 +31,13 @@
</view>
</view>
<view class="right">
<image src="https://api.ccttiot.com/smartmeter/img/static/uraUDWkEx5OvJB29kMnS" mode="" @click="mapFun(item)"></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/uraUDWkEx5OvJB29kMnS" mode=""
@click="mapFun(item)"></image>
<text>{{String(item.distance).split('.')[0]}}m</text>
</view>
</view>
</view>
</view>
</view>
</template>
@ -40,12 +45,12 @@
export default {
data() {
return {
latitude: '',
longitude: '',
covers: [],
index:1,
isMch:false,
gxlist:[],
latitude: '',
longitude: '',
covers: [],
index: 1,
isMch: false,
gxlist: [],
bgc: {
backgroundColor: " #8883F0",
},
@ -97,7 +102,7 @@
longitude: item.lng,
width: 25,
height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
};
this.covers.push(shopCover);
});
@ -113,7 +118,7 @@
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
label: {
content: item.name,
anchorX:this.calculateAnchorX(item.name),
anchorX: this.calculateAnchorX(item.name),
fontWeight: 700,
color: '#8883F0',
textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white',
@ -122,165 +127,177 @@
this.covers.push(shopCover);
});
},
calculateAnchorX(name) {
let chineseLength = 0;
let englishLength = 0;
for (let i = 0; i < name.length; i++) {
const charCode = name.charCodeAt(i);
//
if (charCode >= 0x4e00 && charCode <= 0x9fa5) {
chineseLength++;
} else if (/[a-zA-Z]/.test(name[i])) { //
englishLength = englishLength+0.3; // 1
calculateAnchorX(name) {
let chineseLength = 0;
let englishLength = 0;
for (let i = 0; i < name.length; i++) {
const charCode = name.charCodeAt(i);
//
if (charCode >= 0x4e00 && charCode <= 0x9fa5) {
chineseLength++;
} else if (/[a-zA-Z]/.test(name[i])) { //
englishLength = englishLength + 0.3; // 1
// console.log(englishLength);
}
}
const totalLength = chineseLength + englishLength * 2; //
return -totalLength * 6.5; // anchorX -7
}
}
const totalLength = chineseLength + englishLength * 2; //
return -totalLength * 6.5; // anchorX -7
},
onControltap(control) {
uni.createMapContext("map", this).moveToLocation({
longitude: this.longitude,
latitude: this.latitude
});
},
//
mapFun(item) {
uni.openLocation({
latitude: item.lat,
longitude: item.lng,
longitude: item.lng,
name: item.county,
address: item.address
});
},
getshanghu(){
getshanghu() {
this.$u.get("/app/user/userInfo").then((res) => {
if (res.code == 200) {
this.isMch = res.data.isMch
}
})
},
getMyLocation() {
uni.getLocation({
type: 'wgs84',
success: (res) => {
this.latitude = res.latitude;
this.longitude = res.longitude;
this.jinweidu = this.longitude + ',' + this.latitude;
//
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(response => {
if (response.code == 200) {
this.listmap = response.data
this.gxlist = response.data;
this.gxlist.forEach(item => {
//
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/uZXgsJE6hXbRSwbKILB4',
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',
}
};
// console.log(this.gxlist);
this.covers.push(shopCover); //
});
}
}).catch(error => {
console.error('请求店铺列表失败:', error);
});
},
fail: (err) => {
console.error('获取位置失败:', err);
}
});
getMyLocation() {
uni.getLocation({
type: 'wgs84',
success: (res) => {
this.jinweidu = res.longitude + ',' + res.latitude
this.latitude = Number(res.latitude.toFixed(5)) - 0.005
this.longitude = Number(res.longitude.toFixed(5)) + 0.005
//
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(
response => {
if (response.code == 200) {
this.listmap = response.data
this.gxlist = response.data;
this.gxlist.forEach(item => {
//
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/uZXgsJE6hXbRSwbKILB4',
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',
}
};
// console.log(this.gxlist);
this.covers.push(shopCover); //
});
}
}).catch(error => {
console.error('请求店铺列表失败:', error);
});
},
fail: (err) => {
console.error('获取位置失败:', err);
}
});
},
getDistance(lat1, lon1, lat2, lon2) {
const R = 6371000; //
const phi1 = lat1 * Math.PI / 180; // φ,
const phi2 = lat2 * Math.PI / 180;
const deltaPhi = (lat2 - lat1) * Math.PI / 180;
const deltaLambda = (lon2 - lon1) * Math.PI / 180;
const a = Math.sin(deltaPhi / 2) * Math.sin(deltaPhi / 2) + Math.cos(phi1) * Math.cos(phi2) * Math.sin(deltaLambda / 2) * Math.sin(deltaLambda / 2);
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
const distance = R * c;
return distance;
getDistance(lat1, lon1, lat2, lon2) {
const R = 6371000; //
const phi1 = lat1 * Math.PI / 180; // φ,
const phi2 = lat2 * Math.PI / 180;
const deltaPhi = (lat2 - lat1) * Math.PI / 180;
const deltaLambda = (lon2 - lon1) * Math.PI / 180;
const a = Math.sin(deltaPhi / 2) * Math.sin(deltaPhi / 2) + Math.cos(phi1) * Math.cos(phi2) * Math.sin(
deltaLambda / 2) * Math.sin(deltaLambda / 2);
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
const distance = R * c;
return distance;
},
handleMarkerClick(event) {
const markerId = event.markerId;
uni.navigateTo({
url: '/page_user/mapditu/index?markerId=' + markerId
})
},
btndts(item){
btndts(item) {
const markerId = item.storeId;
uni.navigateTo({
url: '/page_user/mapditu/index?markerId=' + markerId
})
},
btntab(num){
btntab(num) {
this.index = num
},
btndt(num){
if(num == 1){
btndt(num) {
if (num == 1) {
uni.navigateTo({
url:'/page_user/mapditu/index'
url: '/page_user/mapditu/index'
})
}else if(num == 2){
} else if (num == 2) {
console.log(111);
uni.switchTab({
url:'/pages/index/index'
url: '/pages/index/index'
})
}
}
},
mounted() {
this.getMyLocation();
this.getMyLocation();
}
}
</script>
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
/deep/ .u-title {
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
/deep/ .u-icon__icon {
padding-bottom: 22rpx;
}
/deep/ .map{
/deep/ .map {
width: 100%;
height: 100%;
}
page {
background: linear-gradient(180deg, #D9D8FF 0%, rgba(255, 255, 255, 0) 100%);
border-radius: 0rpx 0rpx 0rpx 0rpx;
@ -288,10 +305,11 @@
.page {
width: 750rpx;
position: fixed;
position: fixed;
top: 0;
left: 0;
.dtxs{
.dtxs {
width: 100%;
height: 70vh;
position: fixed;
@ -299,34 +317,38 @@
left: 0;
z-index: -1;
}
.listbox{
.listbox {
margin-top: 850rpx;
background: #FFFFFF;
border-radius: 64rpx 64rpx 0 0;
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08);
padding-top: 40rpx;
border-radius: 64rpx 64rpx 0 0;
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
padding-left: 32rpx;
padding-right: 32rpx;
box-sizing: border-box;
height:40vh;
height: 40vh;
overflow-y: scroll;
padding-bottom: 400rpx;
.moshi{
.moshi {
position: fixed;
bottom: 37vh;
left: 30rpx;
z-index: 99;
image{
width: 100%;
image {
width: 210rpx;
height: 62rpx;
}
.img{
.img {
height: 50rpx;
margin-bottom: 8rpx;
}
}
.title{
border-radius: 64rpx 64rpx 0 0;
.title {
border-radius: 64rpx 64rpx 0 0;
display: flex;
justify-content: space-between;
font-weight: 500;
@ -342,68 +364,90 @@
left: 0;
padding-bottom: 20rpx;
}
.list{
.list {
display: flex;
// justify-content: space-between;
margin-top: 44rpx;
border-bottom: 1px solid #eee;
padding-bottom: 16rpx;
.pic{
.pic {
width: 134rpx;
height: 134rpx;
background-color: #D9D8FF;
border-radius: 10rpx;
margin-right: 20rpx;
border-radius: 20rpx;
image{
image {
width: 100%;
height: 100%;
border-radius: 20rpx;
}
}
.cen{
.cen {
width: 488rpx;
.cena{
.cena {
font-weight: 700 !important;
font-size: 28rpx;
color: #3D3D3D;
line-height: 38rpx;
}
.cenb{
.cenb {
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
line-height: 32rpx;
margin-top: 14rpx;
padding-right: 30rpx;
box-sizing: border-box;
image {
display: inline-block;
width: 22rpx;
height: 22rpx;
margin-right: 6rpx;
}
}
.cenc{
.cenc {
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
line-height: 32rpx;
margin-top: 14rpx;
text{
text {
display: inline-block;
padding: 4rpx 18rpx;
box-sizing: border-box;
border-radius: 20rpx;
}
.bu{
margin-left: 10rpx;
background:#D9D8FF;
.bu {
margin-left: 32rpx;
background: #D9D8FF;
color: #4D48B5;
font-size: 20rpx;
}
}
}
.right{
.right {
padding-top: 40rpx;
text-align: center;
image{
width: 40rpx;
height: 40rpx;
image {
width: 48rpx;
height: 48rpx;
margin-bottom: 8rpx;
}
text{
text {
display: block;
font-weight: 400;
font-size: 20rpx;
@ -414,7 +458,8 @@
}
}
}
.active{
.active {
border-bottom: 10rpx solid #D9D8FF;
border-radius: 7rpx;
padding-bottom: 10rpx;

View File

@ -1,9 +1,9 @@
<template>
<view class="page">
<u-navbar title="常见问题" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="serch">
<u-search placeholder="搜索问题" height="72" :showAction="false" v-model="keyword" @change="sousuo"></u-search>
<u-search placeholder="搜索问题" height="72" :showAction="false" v-model="keyword" @change="sousuo" shape="square"></u-search>
</view>
<view class="list" v-if="!listitem.length == 0">
@ -21,10 +21,10 @@
<image src="https://api.ccttiot.com/smartmeter/img/static/uQyHxbK49U3S5f4uLU6m" mode=""></image> 换一换
</view>
</view>
<view class="" v-if="listitem.length == 0" style="width: 100%;margin-top: 50rpx;text-align: center;">
<view class="" v-if="flag" style="width: 100%;margin-top: 170rpx;text-align: center;">
<image src="https://api.ccttiot.com/smartmeter/img/static/uO8bv6yv8Icg5hlbKccj" mode="" style="width: 430rpx;height: 430rpx;"></image>
<text
style="display: block;font-size: 36rpx;color: #666;margin-top: 30rpx;font-weight: 600;">您搜索的问题暂无相关分类</text>
style="display: block;font-size: 32rpx;color: #808080;margin-top: 30rpx;font-weight: 400;">您搜索的问题暂无相关分类</text>
</view>
</view>
@ -39,7 +39,8 @@
classifyId: '',
listitem: [],
huanindex: 1,
keyword: ''
keyword: '',
flag:false
}
},
onLoad() {
@ -58,6 +59,12 @@
this.$u.get('/app/article/problem/list', {
keyword: this.keyword
}).then(res => {
let sum = res.total
if(sum > 0){
this.flag = false
}else{
this.flag = true
}
if (res.rows.length != 0) {
this.list = res.rows.map(row => ({
name: row.classifyName,
@ -119,10 +126,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .uicon-nav-back{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
@ -141,7 +148,7 @@
left: 0;
.serch {
margin-top: 44rpx;
margin-top:20rpx;
}
.list {
@ -149,7 +156,7 @@
height: 654rpx;
background: #FFFFFF;
margin-top: 46rpx;
border-radius: 50rpx;
border-radius: 20rpx;
padding: 10rpx 32rpx;
box-sizing: border-box;
overflow: hidden;

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="疑问解答" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="box">
<view class="title">
{{listobj.title}}
@ -39,10 +39,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="套餐设置" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="box">
<view class="list">
<view class="title">
@ -155,10 +155,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="套餐列表" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="box">
<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in list" :key="index" @click="click(item)" @open="open" :options="options">
<view class="boxlist" @click="btnedit(item)">
@ -91,10 +91,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="充值记录" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="box">
<view class="list" @scrolltolower="onReachBottom" v-for="(item,index) in wateringList" :key="index">
<view class="list_val">
@ -101,10 +101,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
// background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="店铺管理" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff' title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="fzbox">
<!-- 禁用 -->
<view class="card" :class="{fixed: index === 0}" v-for="(item,index) in groupList " :key="index" v-if="index==0">
@ -293,10 +293,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
background-color: #F7FAFE;

View File

@ -1,15 +1,14 @@
<template>
<view class="page">
<u-navbar title="地图模式" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='44' height='58'></u-navbar>
<u-navbar title="地图模式" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='44' height='50'></u-navbar>
<view class="dtxs">
<!-- <map class='map' :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick" :markers="covers" :show-location="true" :scale="mapScale" /> -->
<map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick"
:show-location="true" :markers="covers" :scale="mapScale" />
</view>
<view class="listbox" v-if="falga">
<view class="moshi">
<image src="https://api.ccttiot.com/smartmeter/img/static/u7HPhEwbIJqbLRpImBON" mode="" @click="btndt(1)"></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/uGVN2tOaCq2hiWKy1cYl" mode="" @click="btndt(2)" v-if="isMch"></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/udwYRUCox5uxQ8nHfvST" mode="" @click="btndt(1)"></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/u7yxUJZqgPzESeI4tmiz" mode="" @click="btndt(2)" v-if="isMch"></image>
</view>
<view class="saoyisao">
<view @click="scanQRCode">
@ -28,7 +27,7 @@
{{listobj.name}}
</view>
<view class="cenb">
{{listobj.address}}
<image src="https://api.ccttiot.com/smartmeter/img/static/uHK2aJHvzEm3nbOPwpdr" mode=""></image> {{listobj.address}}
</view>
<view class="cenc">
共享时间{{listobj.businessTimeStart}}-{{listobj.businessTimeEnd}} <text class="bu">{{listobj.availableDeviceCount}}台可共享</text>
@ -40,12 +39,12 @@
本店共有{{listobj.deviceCount}}台共享设备
</view>
<view class="">
查看 <u-icon name="arrow-right" color="#6863D9" size="20" style="margin-left: 10rpx;"></u-icon>
查看 <u-icon name="arrow-right" color="#6863D9" size="24" style="margin-left: 10rpx;"></u-icon>
</view>
</view>
<view class="anniu">
<view class="" @click="mapFun">
<image class="picsm" src="https://api.ccttiot.com/smartmeter/img/static/u9Z7DXlWfjJtIrq5OEty" mode=""></image> 到这去
<image style="height: 39rpx;width: 38rpx;" class="picsm" src="https://api.ccttiot.com/smartmeter/img/static/u9Z7DXlWfjJtIrq5OEty" mode=""></image> 到这去
</view>
<view class="" style="color: #fff;background-color: #8883F0;" @click="scanQRCode">
<image class="picsm" src="https://api.ccttiot.com/smartmeter/img/static/uvrsmSxGunHTI9S51ujn" mode=""></image> 扫一扫
@ -235,10 +234,10 @@
uni.getLocation({
type: 'wgs84',
success: (res) => {
console.log('我的位置:', res);
this.latitude = res.latitude;
this.longitude = res.longitude;
this.jinweidu = this.longitude + ',' + this.latitude;
// console.log('', res);
this.jinweidu = res.longitude + ',' + res.latitude
this.latitude = Number(res.latitude.toFixed(5)) - 0.005
this.longitude = Number(res.longitude.toFixed(5)) + 0.005
//
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(res => {
if (res.code == 200) {
@ -326,10 +325,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .map{
width: 100%;
@ -352,7 +351,7 @@
left: 50%;
transform: translateX(-50%);
width: 706rpx;
height: 400rpx;
height: 420rpx;
background: #FFFFFF;
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08);
border-radius: 20rpx;
@ -378,7 +377,7 @@
.anniu{
display: flex;
justify-content: space-between;
margin-top: 10rpx;
margin-top: 20rpx;
view{
width: 300rpx;
height: 82rpx;
@ -397,13 +396,13 @@
padding-bottom: 16rpx;
.pic{
width: 150rpx;
height: 134rpx;
height: 150rpx;
// background-color: #D9D8FF;
border-radius: 20rpx;
// margin-right: 28rpx;
image{
width: 100%;
height: 100%;
width: 150rpx;
height: 150rpx;
mode: "aspectFill";
margin-top: 10rpx;
border-radius: 20rpx;
@ -414,7 +413,7 @@
margin-left: 20rpx;
.cena{
font-weight: 500;
font-size: 28rpx;
font-size: 30rpx;
color: #3D3D3D;
line-height: 38rpx;
}
@ -424,6 +423,12 @@
color: #3D3D3D;
line-height: 32rpx;
margin-top: 14rpx;
image{
display: inline-block;
width: 22rpx;
height: 22rpx;
margin-right: 6rpx;
}
}
.cenc{
font-weight: 400;
@ -439,7 +444,7 @@
border-radius: 20rpx;
}
.bu{
margin-left: 10rpx;
margin-left: 32rpx;
background:#D9D8FF;
color: #4D48B5;
}
@ -519,7 +524,7 @@
z-index: 99;
image{
width: 210rpx;
height: 62rpx;
height: 74rpx;
}
}
.title{

View File

@ -1,7 +1,7 @@
<template>
<view>
<u-navbar title="账单详情" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff' title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="cont">
<view class="order_card">
<view class="cardtop">
@ -106,10 +106,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
background: #F7FAFE;

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar :title="tittxt" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff'
title-size='36' height='58' id="navbar">
title-size='36' height='50' id="navbar">
</u-navbar>
<view class="zhuhu">
<view class="card1">
@ -638,6 +638,12 @@
</script>
<style lang="scss">
/deep/ .u-title{
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 22rpx;
}
page {
background-color: #F7FAFE;
}

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="设置" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff' title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="card">
<view class="li" @click.stop="sremakemc()">
<view class="tit">
@ -442,10 +442,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
background-color: #F7FAFE;

View File

@ -1,7 +1,7 @@
<template>
<view class="pages">
<u-navbar title="收支明细" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff' title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="cards" v-for="(item,index) in wateringList" :key="index" @click="btndetail(item.billId)" @scrolltolower="onReachBottom">
@ -101,10 +101,10 @@
<style lang="scss" scoped>
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
background-color: #F7FAFE;

View File

@ -1,7 +1,7 @@
<template>
<view class="pages">
<u-navbar title="提现记录" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff' title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<!-- <view class="tops">
<view class="tit">提现记录</view>
@ -60,10 +60,10 @@
<style lang="scss" scoped>
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
background-color: #F7FAFE;

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar title="设置" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff' title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="card">
<view class="li">
<view class="tit">
@ -206,10 +206,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
background-color: #F7FAFE;

View File

@ -1,7 +1,7 @@
<template>
<view>
<u-navbar title="收款账户" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='58'></u-navbar>
height='50'></u-navbar>
<view class="cont">
<view class="top_box">
<view class="tip">账户余额()</view>
@ -42,7 +42,7 @@
</view>
</view>
<view class="box_right" :class="currentindex==0?'act1':''">
<span v-if="currentindex==0"> </span>
<span v-if="currentindex==0" style="color: #fff;"> <u-icon style="margin-top: 22rpx;" name="checkbox-mark" color="#fff" size="28"></u-icon> </span>
</view>
</view>
<!-- <view class="type_box" @click="pay(1,'2')">
@ -172,10 +172,10 @@
<style lang="scss" >
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page{
background: #F7FAFE;

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<u-navbar :is-back="false" :title="tittxt" :border-bottom="false" :background="bgc" title-color='#fff'
title-size='44' height='58' id="navbar">
title-size='44' height='50' id="navbar">
</u-navbar>
<u-mask :show="showtip" @click="show = false" :z-index='1000' />
<view class="tip_box" v-if="showtip">
@ -71,7 +71,7 @@
<swiper class="swiper" style="height: 100%;margin-top: 20rpx;" :current='curtitidx' @change="swiperchange" @scrolltolower="onReachBottom">
<swiper-item v-for="(item,index) in groupLists" :key="index">
<view style="width: 100%;padding-top: 300rpx;text-align: center;font-size: 32rpx;font-weight: 600;color: #ccc;" class="" v-if="shujuflag">
<view style="width: 100%;padding-top: 300rpx;text-align: center;font-size: 32rpx;font-weight: 400;color: #808080;" class="" v-if="shujuflag">
<image style="width: 432rpx;height: 432rpx;display: block;padding-left: 100rpx;margin-bottom: 30rpx;" src="https://api.ccttiot.com/smartmeter/img/static/unju6N2PoHUv2pyLegfV" mode=""></image>
该店铺暂无设备...
</view>
@ -774,10 +774,10 @@
<style lang="scss">
/deep/ .u-title{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
page {
background-color: #F7FAFE;

View File

@ -3,20 +3,19 @@
<!-- 用户首页显示 -->
<view class="useryonghu">
<u-navbar :is-back="false" title="首页" :border-bottom="false" :background="bgc" title-color='#fff'
title-size='44' height='58'></u-navbar>
title-size='44' height='50'></u-navbar>
<view class="ditu">
<view class="dtxs">
<map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick"
:show-location="true" :markers="covers" :scale="mapScale" />
</view>
<view class="fujin">
<image src="https://api.ccttiot.com/smartmeter/img/static/u7HPhEwbIJqbLRpImBON" mode=""
<image src="https://api.ccttiot.com/smartmeter/img/static/udwYRUCox5uxQ8nHfvST" mode=""
@click="btnindex(5)"></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/uGVN2tOaCq2hiWKy1cYl" mode=""
<image src="https://api.ccttiot.com/smartmeter/img/static/u7yxUJZqgPzESeI4tmiz" mode=""
@click="btnindex(6)" v-if="isMch"></image>
<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/uzSmYNgLYJRMEmo4TWyA" mode=""
@click="btnindex(7)"
style="width: 58rpx;height: 58rpx;position: fixed;top: 940rpx;right: 60rpx;"></image> -->
<image @click="onControltap" style="width: 66rpx;height: 66rpx;position: absolute;right: 40rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/uOS9p7Sy1K9WpVQgD3b9" mode=""></image>
</view>
<view class="tubiao">
<view class="gr" @click="btnindex(1)">
@ -100,6 +99,9 @@
dingobj: '',
mapContext: null,
mapScaleInterval: null,
bgc: {
backgroundColor: "#8883F0",
},
};
},
onLoad() {
@ -122,22 +124,22 @@
}
},
methods: {
btnad(){
btnad() {
this.$u.get("/app/ad").then((res) => {
if (res.code == 200) {
if(res.data.urlType == 1){
if (res.data.urlType == 1) {
uni.navigateTo({
url:'/page_fenbao/webview?url=' + res.data.url
url: '/page_fenbao/webview?url=' + res.data.url
})
}else{
uni.navigateTo({
} else {
uni.navigateTo({
url: res.data.url
})
}
}
})
},
updateMarkers() {
this.mapContext.getScale({
success: (res) => {
@ -162,7 +164,7 @@
longitude: item.lng,
width: 25,
height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
};
this.covers.push(shopCover);
});
@ -178,30 +180,30 @@
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
label: {
content: item.name,
anchorX:this.calculateAnchorX(item.name),
anchorX: this.calculateAnchorX(item.name),
fontWeight: 700,
color: '#8883F0',
textShadow: '2px 2px 0px #000, -2px -2px 0px #000, 2px -2px 0px #000, -2px 2px 0px #000',
rotate:20
rotate: 20
}
}
this.covers.push(shopCover);
});
},
calculateAnchorX(name) {
let chineseLength = 0;
let englishLength = 0;
for (let i = 0; i < name.length; i++) {
const charCode = name.charCodeAt(i);
if (charCode >= 0x4e00 && charCode <= 0x9fa5) {
chineseLength++;
} else if (/[a-zA-Z]/.test(name[i])) {
englishLength = englishLength+0.3; // 1
calculateAnchorX(name) {
let chineseLength = 0;
let englishLength = 0;
for (let i = 0; i < name.length; i++) {
const charCode = name.charCodeAt(i);
if (charCode >= 0x4e00 && charCode <= 0x9fa5) {
chineseLength++;
} else if (/[a-zA-Z]/.test(name[i])) {
englishLength = englishLength + 0.3; // 1
// console.log(englishLength);
}
}
const totalLength = chineseLength + englishLength * 2;
return -totalLength * 6.5; // anchorX -7
}
}
const totalLength = chineseLength + englishLength * 2;
return -totalLength * 6.5; // anchorX -7
},
scanQRCode() {
@ -217,7 +219,7 @@
let sceneValue = res.result
let decodedValue = decodeURIComponent(sceneValue);
let id = getQueryParam(decodedValue, 's')
console.log(res,id);
console.log(res, id);
this.$u.get(`/app/device/${id}/withSuitList`).then((res) => {
if (res.code == 200) {
uni.navigateTo({
@ -279,16 +281,23 @@
}
},
onControltap(control) {
uni.createMapContext("map", this).moveToLocation({
longitude: this.longitude,
latitude: this.latitude
})
},
getMyLocation() {
uni.getLocation({
type: 'wgs84',
success: (res) => {
// console.log('', res);
this.latitude = res.latitude;
this.longitude = res.longitude;
this.jinweidu = this.longitude + ',' + this.latitude;
// this.jinweidu = res.longitude + ',' + res.latitude;
// this.latitude = res.latitude;
// this.longitude = res.longitude;
this.jinweidu = res.longitude + ',' + res.latitude
this.latitude = Number(res.latitude.toFixed(5)) - 0.005
this.longitude = Number(res.longitude.toFixed(5)) + 0.005
//
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(
res => {
@ -439,11 +448,11 @@
<style lang="scss">
/deep/ .u-title {
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon {
padding-bottom: 41rpx;
padding-bottom: 22rpx;
}
/deep/ .map {
@ -457,7 +466,7 @@
page {
// background-color: ;
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
background: linear-gradient(180deg, #8883F0 10%, rgba(255, 255, 255, 0) 100%);
border-radius: 0rpx 0rpx 0rpx 0rpx;
}
@ -701,6 +710,8 @@
}
.guangg {
margin-top: 24rpx;
margin-bottom: 28rpx;
image {
border-radius: 30rpx;
@ -713,9 +724,8 @@
width: 750rpx;
height: 186rpx;
background: #FFFFFF;
position: fixed;
bottom: 0;
left: 0;
position: relative;
left: -34rpx;
padding-top: 38rpx;
border-radius: 54rpx 54rpx 0 0;
@ -746,17 +756,18 @@
height: 980rpx;
background: #FFFFFF;
border-radius: 38rpx 38rpx 38rpx 38rpx;
// margin-top: 34rpx;
padding-top: 16rpx;
position: relative;
.fujin {
position: fixed;
top: 940rpx;
position: absolute;
top: 730rpx;
padding-left: 30rpx;
width: 100%;
image {
width: 210rpx;
height: 62rpx;
height: 74rpx;
}
}
@ -770,10 +781,10 @@
.tubiao {
display: flex;
justify-content: space-between;
padding: 0 50rpx;
padding: 30rpx 50rpx;
box-sizing: border-box;
padding-top: 20rpx;
padding-bottom: 24rpx;
// padding-top: 20rpx;
// padding-bottom: 24rpx;
.gr {
text-align: center;