aaa
This commit is contained in:
parent
8525034d41
commit
1512ad95cc
|
|
@ -1,26 +1,6 @@
|
|||
const install = (Vue, vm) => {
|
||||
|
||||
// Vue.prototype.$u.http.setConfig({
|
||||
|
||||
// baseURL: 'https://yruibao.com/admin',
|
||||
|
||||
// // baseUrl: 'http://192.168.10.104:8088',
|
||||
// method: 'POST',
|
||||
// // 设置为json,返回后会对数据进行一次JSON.parse()
|
||||
// dataType: 'json',
|
||||
// showLoading: true, // 是否显示请求中的loading
|
||||
// loadingText: '...', // 请求loading中的文字提示
|
||||
// loadingTime: 800, // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
|
||||
// originalData: false, // 是否在拦截器中返回服务端的原始数据
|
||||
// loadingMask: true, // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
|
||||
// // 配置请求头信息
|
||||
// header: {
|
||||
// 'content-type': 'application/json;charset=UTF-8',
|
||||
|
||||
// },
|
||||
// });
|
||||
Vue.prototype.$u.http.setConfig({
|
||||
baseUrl: 'http://192.168.2.23/dev-api',
|
||||
baseUrl: 'http://192.168.2.243:3100/dev-api',
|
||||
// baseUrl: 'https://znb.ccttiot.com',
|
||||
loadingText: '努力加载中~',
|
||||
loadingTime: 800,
|
||||
|
|
@ -34,23 +14,7 @@ const install = (Vue, vm) => {
|
|||
|
||||
// 请求拦截部分,如配置,每次请求前都会执行
|
||||
Vue.prototype.$u.http.interceptor.request = (config) => {
|
||||
// 引用token
|
||||
// 方式一,存放在vuex的token,假设使用了uView封装的vuex方式
|
||||
// 见:https://uviewui.com/components/globalVariable.html
|
||||
// config.header.token = vm.token;
|
||||
|
||||
// 方式二,如果没有使用uView封装的vuex方法,那么需要使用$store.state获取
|
||||
// config.header.token = vm.$store.state.token;
|
||||
|
||||
// 方式三,如果token放在了globalData,通过getApp().globalData获取
|
||||
|
||||
// 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的
|
||||
// 所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值
|
||||
const token = uni.getStorageSync('token');
|
||||
|
||||
// const token = " eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImE1ZmE2YzM0LWM0Y2YtNGEwMS05YjY2LTE1M2M4YWY1YzU1YSJ9.Wze_tAjY7cCfw2K6mtDpTSd-QFLRF4A49Fx7bq7g2tVLKL4v5bqqHfpG0VQy7_a_CUQch5RPBTBIKMVCDupIqg"
|
||||
|
||||
// console.log("我是token", token)
|
||||
config.header.Authorization = token;
|
||||
// config.header.Tenant-Id=1
|
||||
// #ifdef H5
|
||||
|
|
@ -67,42 +31,10 @@ const install = (Vue, vm) => {
|
|||
|
||||
// 响应拦截,如配置,每次请求结束都会执行本方法
|
||||
Vue.prototype.$u.http.interceptor.response = (res) => {
|
||||
// if(res.code == 10022 || res.code == 10023) {
|
||||
// // res为服务端返回值,可能有code,result等字段
|
||||
// // 这里对res.result进行返回,将会在this.$u.post(url).then(res => {})的then回调中的res的到
|
||||
// // 如果配置了originalData为true,请留意这里的返回值
|
||||
// uni.redirectTo({
|
||||
// url:"/pages/login/login",
|
||||
// fail:function(mes){
|
||||
// console.log(mes)
|
||||
// },
|
||||
// success:function(mes){
|
||||
// console.log(mes)
|
||||
// }
|
||||
// })
|
||||
// // return res.result;
|
||||
// }
|
||||
if(res.code == 401) {
|
||||
// res为服务端返回值,可能有code,result等字段
|
||||
// 这里对res.result进行返回,将会在this.$u.post(url).then(res => {})的then回调中的res的到
|
||||
// 如果配置了originalData为true,请留意这里的返回值
|
||||
|
||||
// return res.result;
|
||||
|
||||
uni.login({
|
||||
success: function(ret) {
|
||||
console.log("main.js==>res", ret)
|
||||
// vm.$u.post('/user/login',{"js_code": ret.code}).then(res=>{
|
||||
// if (res.code == 10003) {
|
||||
// // console.log("新用户登录")
|
||||
// uni.setStorageSync('token', res.data);
|
||||
|
||||
// } else if (res.code == 200) {
|
||||
// // console.log("老用户登录",res.data)
|
||||
// uni.setStorageSync('token', res.data);
|
||||
|
||||
// }
|
||||
// });
|
||||
}
|
||||
});
|
||||
wx.login({
|
||||
|
|
@ -134,19 +66,6 @@ const install = (Vue, vm) => {
|
|||
|
||||
}
|
||||
return res;
|
||||
// else if(res.code == 201) {
|
||||
// // 假设201为token失效,这里跳转登录
|
||||
// vm.$u.toast('验证失败,请重新登录');
|
||||
// setTimeout(() => {
|
||||
// // 此为uView的方法,详见路由相关文档
|
||||
// vm.$u.route('/pages/user/login')
|
||||
// }, 1500)
|
||||
// return false;
|
||||
// } else {
|
||||
// // 如果返回false,则会调用Promise的reject回调,
|
||||
// // 并将进入this.$u.post(url).then().catch(res=>{})的catch回调中,res为服务端的返回值
|
||||
// return false;
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,13 @@
|
|||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {},
|
||||
"modules" : {
|
||||
"Geolocation" : {},
|
||||
"Maps" : {},
|
||||
"Payment" : {},
|
||||
"Barcode" : {},
|
||||
"Camera" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
|
|
@ -43,7 +49,28 @@
|
|||
/* ios打包配置 */
|
||||
"ios" : {},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {}
|
||||
"sdkConfigs" : {
|
||||
"geolocation" : {
|
||||
"baidu" : {
|
||||
"__platform__" : [ "ios", "android" ],
|
||||
"appkey_ios" : "",
|
||||
"appkey_android" : ""
|
||||
}
|
||||
},
|
||||
"maps" : {
|
||||
"baidu" : {
|
||||
"appkey_ios" : "",
|
||||
"appkey_android" : ""
|
||||
}
|
||||
},
|
||||
"payment" : {
|
||||
"weixin" : {
|
||||
"__platform__" : [ "ios", "android" ],
|
||||
"appid" : "wx0fec9148db16a4bc",
|
||||
"UniversalLinks" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
|
|
@ -51,9 +78,10 @@
|
|||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"libVersion" : "latest",
|
||||
"appid" : "wx3914d4d7441fb438",
|
||||
"appid" : "wxbbe52b5414ab65ac",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
"urlCheck" : false,
|
||||
"minified" : true
|
||||
},
|
||||
"usingComponents" : true,
|
||||
"optimization" : {
|
||||
|
|
@ -63,7 +91,8 @@
|
|||
"scope.userLocation" : {
|
||||
"desc" : "获取位置查看周围的充电宝设备"
|
||||
}
|
||||
}
|
||||
},
|
||||
"requiredPrivateInfos" : [ "getLocation", "chooseAddress", "chooseLocation" ]
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
|
|
|
|||
92
page_user/about.vue
Normal file
92
page_user/about.vue
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar :title="tit" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
|
||||
height='38'></u-navbar>
|
||||
<view class="box">
|
||||
<view class="title">
|
||||
{{obj.title}}
|
||||
</view>
|
||||
|
||||
<view class="js" v-html="obj.content">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
obj:{},
|
||||
tit:''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.tit = option.tit
|
||||
this.getabout()
|
||||
},
|
||||
methods: {
|
||||
getabout(){
|
||||
let type = 'about'
|
||||
this.$u.get(`/app/article/licence/${type}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.obj= res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 750rpx;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
.box{
|
||||
width: 750rpx;
|
||||
height: 1440rpx;
|
||||
background: #F4F5F7;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
padding: 40rpx 34rpx;
|
||||
box-sizing: border-box;
|
||||
.title{
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.tit{
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
.nav_top{
|
||||
width: 680rpx;
|
||||
height: 322rpx;
|
||||
background: #EEEEEE;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
margin: auto;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
.js{
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
.nav_bom{
|
||||
width: 680rpx;
|
||||
height: 322rpx;
|
||||
background: #EEEEEE;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
margin: auto;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
393
page_user/ditu.vue
Normal file
393
page_user/ditu.vue
Normal file
|
|
@ -0,0 +1,393 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar title="附近门店" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' height='38'></u-navbar>
|
||||
<view class="dtxs">
|
||||
<map class='map' :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick" :markers="covers" :show-location="true"/>
|
||||
</view>
|
||||
<!-- <view class="listbox">
|
||||
<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>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="list_item">
|
||||
<view class="list">
|
||||
<view class="pic">
|
||||
<image :src="listobj.picture" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="cen">
|
||||
<view class="cena" style="font-weight: 600;">
|
||||
{{listobj.name}}
|
||||
</view>
|
||||
<view class="cenb">
|
||||
{{listobj.address}}
|
||||
</view>
|
||||
<view class="cenc">
|
||||
营业时间:{{listobj.businessTimeStart}}-{{listobj.businessTimeEnd}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="chakan">
|
||||
<view class="wz" style="color: #109F64;" v-if="listobj.availableDeviceCount > 0">可租借</view>
|
||||
<view class="wz" style="color: #109F64;" v-if="num > 0">可归还</view>
|
||||
<view class="wz" style="background-color: #FFEFEF;color: #FF4444;" v-if="num == 0">已还满</view>
|
||||
</view>
|
||||
<view class="anniu">
|
||||
<view class="" @click="mapFun">
|
||||
到这去
|
||||
</view>
|
||||
<view class="" style="color: #fff;background-color: #25CE88;" @click="scanQRCode">
|
||||
扫码充电
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
latitude: 31.02, // 初始纬度
|
||||
longitude: 112.12, // 初始经度
|
||||
covers: [], // 覆盖物数组
|
||||
index:1,
|
||||
falga:true,
|
||||
falgb:false,
|
||||
storeId:'',
|
||||
listobj:{},
|
||||
mapname:'',
|
||||
mapaddress:'',
|
||||
isMch:'',
|
||||
num:0
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.storeId = option.markerId
|
||||
if(option.markerId){
|
||||
this.falga = false
|
||||
this.falgb = true
|
||||
}
|
||||
this.getxq()
|
||||
},
|
||||
methods: {
|
||||
scanQRCode() {
|
||||
uni.navigateTo({
|
||||
url: '/page_user/yajin/index'
|
||||
})
|
||||
// uni.scanCode({
|
||||
// onlyFromCamera: true,
|
||||
// scanType: ['qrCode'],
|
||||
// success: res => {
|
||||
// console.log('扫描结果:', res);
|
||||
// },
|
||||
// fail: err => {
|
||||
// console.error('扫描失败:', err);
|
||||
// uni.showToast({
|
||||
// title: '扫描失败',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
},
|
||||
|
||||
getxq(){
|
||||
this.$u.get("/app/store/" + this.storeId).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.listobj = res.data
|
||||
this.num = this.listobj.slotCount - this.listobj.deviceCount
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
mapFun() {
|
||||
uni.openLocation({
|
||||
latitude: this.listobj.lat,
|
||||
longitude: this.listobj.lng,
|
||||
name:this.mapname,
|
||||
address: this.mapaddress
|
||||
});
|
||||
},
|
||||
|
||||
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.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(res => {
|
||||
if (res.code == 200) {
|
||||
// 假设返回的店铺数据在res.rows中,并且每个店铺有latitude和longitude字段
|
||||
res.data.forEach(item => {
|
||||
const shopCover = {
|
||||
id:parseFloat(item.storeId),
|
||||
latitude: item.lat,
|
||||
longitude: item.lng,
|
||||
width: 25,
|
||||
height: 30,
|
||||
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uI3B6yPwtiUBD3vafLtw'
|
||||
};
|
||||
this.covers.push(shopCover);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('获取位置失败:', err);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
handleMarkerClick(e){
|
||||
this.$u.get("/app/store/" + e.markerId).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.listobj = res.data
|
||||
this.mapname = res.data.city
|
||||
this.mapaddress = res.data.address
|
||||
}
|
||||
})
|
||||
this.falga = false
|
||||
this.falgb = true
|
||||
},
|
||||
|
||||
|
||||
btntab(num){
|
||||
this.index = num
|
||||
},
|
||||
|
||||
btndt(num){
|
||||
if(num == 1){
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
|
||||
btnitem(){
|
||||
this.falga = false
|
||||
this.falgb = true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getMyLocation();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .map{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
page {
|
||||
// background-color: ;
|
||||
background: linear-gradient(180deg, #25CE88 0%, rgba(255, 255, 255, 0) 100%);
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 750rpx;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
.list_item{
|
||||
position: fixed;
|
||||
bottom: 84rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 706rpx;
|
||||
height: 400rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08);
|
||||
border-radius: 20rpx;
|
||||
margin: auto;
|
||||
padding: 46rpx 40rpx;
|
||||
box-sizing: border-box;
|
||||
.chakan{
|
||||
display: flex;
|
||||
margin-bottom: 10rpx;
|
||||
// justify-content: space-between;
|
||||
padding-left: 145rpx;
|
||||
width: 625rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
.wz{
|
||||
font-size: 20rpx;
|
||||
// width: 96rpx;
|
||||
// height: 34rpx;
|
||||
background: #B7FFE1;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
padding: 4rpx 16rpx;
|
||||
box-sizing: border-box;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
.anniu{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 10rpx;
|
||||
view{
|
||||
width: 300rpx;
|
||||
height: 82rpx;
|
||||
line-height: 82rpx;
|
||||
border-radius: 45rpx 45rpx 45rpx 45rpx;
|
||||
border: 2rpx solid #25CE88;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #25CE88;;
|
||||
}
|
||||
}
|
||||
.list{
|
||||
display: flex;
|
||||
// margin-top: 44rpx;
|
||||
padding-bottom: 16rpx;
|
||||
.pic{
|
||||
width: 150rpx;
|
||||
height: 134rpx;
|
||||
// background-color: #D9D8FF;
|
||||
border-radius: 10rpx;
|
||||
// margin-right: 28rpx;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
mode: "aspectFill";
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
.cen{
|
||||
// margin-right: 140rpx;
|
||||
margin-left: 20rpx;
|
||||
.cena{
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
line-height: 38rpx;
|
||||
}
|
||||
.cenb{
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #3D3D3D;
|
||||
line-height: 32rpx;
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
.cenc{
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #3D3D3D;
|
||||
line-height: 32rpx;
|
||||
margin-top: 14rpx;
|
||||
text{
|
||||
display: inline-block;
|
||||
padding: 4rpx 18rpx;
|
||||
box-sizing: border-box;
|
||||
// border: 1px solid #ccc;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.bu{
|
||||
margin-left: 10rpx;
|
||||
background:#D9D8FF;
|
||||
color: #25CE88;
|
||||
}
|
||||
}
|
||||
}
|
||||
.right{
|
||||
padding-top: 40rpx;
|
||||
image{
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
text{
|
||||
display: block;
|
||||
font-weight: 400;
|
||||
font-size: 20rpx;
|
||||
color: #808080;
|
||||
line-height: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dtxs{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
.listbox{
|
||||
background: #FFFFFF;
|
||||
border-radius: 64rpx 64rpx 0 0;
|
||||
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08);
|
||||
height:186rpx;
|
||||
width: 100%;
|
||||
overflow-y: scroll;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
.saoyisao{
|
||||
margin-top: 44rpx;
|
||||
view{
|
||||
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
||||
text-align: center;
|
||||
width: 676rpx;
|
||||
height: 102rpx;
|
||||
background: linear-gradient( 90deg, #25CE88 0%, #25CE88 100%);
|
||||
line-height: 102rpx;
|
||||
margin: auto;
|
||||
image{
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
margin-bottom: 12rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
text{
|
||||
font-weight: 500;
|
||||
font-size: 40rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
.moshi{
|
||||
position: fixed;
|
||||
bottom:210rpx;
|
||||
left: 30rpx;
|
||||
z-index: 99;
|
||||
image{
|
||||
width: 210rpx;
|
||||
height: 62rpx;
|
||||
}
|
||||
}
|
||||
.title{
|
||||
border-radius: 64rpx 64rpx 0 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
line-height: 160rpx;
|
||||
padding: 0 76rpx;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
height: 160rpx;
|
||||
top: 40vh;
|
||||
left: 0;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.active{
|
||||
border-bottom: 10rpx solid #D9D8FF;
|
||||
border-radius: 7rpx;
|
||||
padding-bottom: 10rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
</style>
|
||||
155
page_user/hezuo/index.vue
Normal file
155
page_user/hezuo/index.vue
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar title="合作加盟" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
|
||||
height='38'></u-navbar>
|
||||
<view class="box">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u7CKiZqacBOcqYyDWDGF" mode="" class="pic"></image>
|
||||
<view class="inp" style="margin-top: 46rpx;">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uft7OxFUV7v09RCwhpfo" mode=""></image>
|
||||
<view class="one">您的手机号</view>
|
||||
<input type="text" placeholder="请输入您的手机号" />
|
||||
</view>
|
||||
<view class="inp" style="position: relative;">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uft7OxFUV7v09RCwhpfo" mode=""></image>
|
||||
<view class="one">验证码</view>
|
||||
<input type="text" placeholder="请输入验证码" />
|
||||
<view class="hq">获取验证码</view>
|
||||
</view>
|
||||
<view class="inp">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uft7OxFUV7v09RCwhpfo" mode=""></image>
|
||||
<view class="one">合作意向</view>
|
||||
<input type="text" :placeholder="tit" disabled="false" @click="btnxz" />
|
||||
</view>
|
||||
|
||||
<view class="anniu">
|
||||
马上加盟
|
||||
</view>
|
||||
<u-select v-model="show" :list="list" @confirm="confirm"></u-select>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
bgc: {
|
||||
background: '#25CE88'
|
||||
},
|
||||
show: false,
|
||||
tit:'请选择您的合作意向',
|
||||
list: [{
|
||||
value: '1',
|
||||
label: '成为充电合作商'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '门店铺设充电宝'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '贴牌OEM'
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
btnxz() {
|
||||
this.show = true
|
||||
},
|
||||
confirm(e){
|
||||
this.tit = e[0].label
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
// background: linear-gradient(180deg, #25CE88 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 750rpx;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
.box {
|
||||
width: 750rpx;
|
||||
height: 1440rpx;
|
||||
background: #F4F5F7;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
|
||||
.anniu {
|
||||
width: 558rpx;
|
||||
height: 90rpx;
|
||||
background: linear-gradient(270deg, #54DAA1 0%, #19CD82 100%);
|
||||
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
margin: auto;
|
||||
margin-top: 84rpx;
|
||||
margin-bottom: 218rpx;
|
||||
}
|
||||
|
||||
.pic {
|
||||
width: 748rpx;
|
||||
height: 768rpx;
|
||||
|
||||
}
|
||||
|
||||
.inp {
|
||||
display: flex;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
padding: 10rpx 60rpx;
|
||||
box-sizing: border-box;
|
||||
color: #3D3D3D;
|
||||
|
||||
.one {
|
||||
width: 154rpx;
|
||||
}
|
||||
|
||||
.hq {
|
||||
width: 136rpx;
|
||||
height: 50rpx;
|
||||
background: #38D492;
|
||||
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
||||
text-align: center;
|
||||
// line-height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
padding: 4rpx 8rpx;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
top: 14rpx;
|
||||
right: 67rpx;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 14rpx;
|
||||
height: 14rpx;
|
||||
margin-top: 12rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 400rpx;
|
||||
height: 52rpx;
|
||||
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
||||
border: 2rpx solid #979797;
|
||||
padding-left: 20rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #979797;
|
||||
margin-left: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
249
page_user/jifei.vue
Normal file
249
page_user/jifei.vue
Normal file
|
|
@ -0,0 +1,249 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar title="计费规则" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
|
||||
height='38'></u-navbar>
|
||||
<view class="box">
|
||||
<view class="listobj">
|
||||
<view class="inps">
|
||||
<view class="">计费模式</view>
|
||||
<view class=""><u-radio-group v-model="value">
|
||||
<u-radio @change="radioChange" v-for="(item, index) in list" :key="index" :name="item.name" active-color="#25CE88"
|
||||
:disabled="item.disabled">
|
||||
{{item.name}}
|
||||
</u-radio>
|
||||
</u-radio-group></view>
|
||||
</view>
|
||||
<view class="inp">
|
||||
计费金额 <input type="text" placeholder="请输入计费金额" /> 元/小时
|
||||
</view>
|
||||
<view class="inp">
|
||||
封顶金额 <input type="text" placeholder="请输入封顶金额" /> 元/天
|
||||
</view>
|
||||
<view class="inp">
|
||||
免费时长 <input type="text" placeholder="请输入免费时长" /> 分钟
|
||||
</view>
|
||||
</view>
|
||||
<view class="baocun">
|
||||
保存
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
vipflag: false,
|
||||
list: [{
|
||||
name: '半小时',
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
name: '一小时',
|
||||
disabled: false
|
||||
}
|
||||
],
|
||||
value: '半小时',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
radioChange(e) {
|
||||
console.log(e);
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: linear-gradient(180deg, #25CE88 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 750rpx;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
.box {
|
||||
width: 750rpx;
|
||||
height: 1440rpx;
|
||||
background: #F4F5F7;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
padding-top: 40rpx;
|
||||
|
||||
.mask {
|
||||
width: 750rpx;
|
||||
height: 100vh;
|
||||
background: #000000;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
opacity: 0.2;
|
||||
z-index: 1;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.tanc {
|
||||
width: 610rpx;
|
||||
height: 282rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
||||
position: fixed;
|
||||
top: 628rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 2;
|
||||
|
||||
.tit {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 28rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 504rpx;
|
||||
height: 62rpx;
|
||||
background: #EEEEEE;
|
||||
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
||||
margin: auto;
|
||||
margin-top: 22rpx;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.xian {
|
||||
width: 610rpx;
|
||||
height: 2rpx;
|
||||
background: #D8D8D8;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
|
||||
.anniu {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 98rpx;
|
||||
|
||||
text {
|
||||
padding: 24rpx;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.baocun {
|
||||
width: 584rpx;
|
||||
height: 90rpx;
|
||||
background: linear-gradient(270deg, #54DAA1 0%, #19CD82 100%);
|
||||
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
font-weight: 500;
|
||||
font-size: 40rpx;
|
||||
color: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 458rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.listobj {
|
||||
width: 680rpx;
|
||||
height: 362rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
margin: auto;
|
||||
padding: 22rpx 48rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.vipry {
|
||||
margin-top: 106rpx;
|
||||
text-align: center;
|
||||
overflow-y: scroll;
|
||||
height: 220rpx;
|
||||
|
||||
.tit {
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
.listvip {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 28rpx;
|
||||
color: #808080;
|
||||
margin-top: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.xian {
|
||||
width: 680rpx;
|
||||
height: 2rpx;
|
||||
background: #F0F0F0;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
position: fixed;
|
||||
left: 37rpx;
|
||||
margin-top: 76rpx;
|
||||
}
|
||||
|
||||
.addvip {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 74rpx;
|
||||
|
||||
view {
|
||||
width: 250rpx;
|
||||
height: 86rpx;
|
||||
background: #D8D8D8;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
text-align: center;
|
||||
line-height: 86rpx;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
}
|
||||
.inps {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 28rpx;
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
.inp {
|
||||
display: flex;
|
||||
margin-top: 28rpx;
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
line-height: 50rpx;
|
||||
|
||||
input {
|
||||
width: 313rpx;
|
||||
height: 50rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
background: #F0F0F0;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
padding-left: 14rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
228
page_user/shopdetail.vue
Normal file
228
page_user/shopdetail.vue
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar title="店铺详情" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
|
||||
height='38'></u-navbar>
|
||||
<view class="box">
|
||||
<view class="shopname">
|
||||
{{listobj.name}}
|
||||
</view>
|
||||
<view class="shoplist">
|
||||
<view class="tit">
|
||||
基本信息
|
||||
</view>
|
||||
<view class="jiben">
|
||||
<text class="qian">绑定设备:</text> <text class="shen">{{listobj.deviceCount}}</text>
|
||||
</view>
|
||||
<view class="jiben">
|
||||
<text class="qian">营业时间:</text> <text class="shen">{{listobj.businessTimeStart}}~{{listobj.businessTimeEnd}}</text>
|
||||
</view>
|
||||
<view class="jiben">
|
||||
<text class="qian">详细地址:</text> <text class="shen">{{listobj.address}}</text>
|
||||
</view>
|
||||
<view class="jiben">
|
||||
<text class="qian">创建时间:</text> <text class="shen">{{listobj.createTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="icons">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uZEG6wcsyjAlik8iKnBZ" mode="" @click="btnpag(1)"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u3GbElGkYzgolFDVMcRF" mode="" @click="btnpag(2)"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/umSzDeyl29aEeJDXY3lT" mode="" @click="btnpag(3)"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u54XmWWxo1l0yY1mZtcG" mode="" @click="btnpag(4)"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/urIxP74GyW2Puz4uqfN9" style="width: 54rpx;" mode="" @click="btnpag(5)"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
storeId:'',
|
||||
listobj:{}
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
console.log(option);
|
||||
this.storeId = option.id
|
||||
// this.getdetail()
|
||||
},
|
||||
methods: {
|
||||
getdetail(){
|
||||
this.$u.get("/app/store/mch/" + this.storeId).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.listobj = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
btnpag(num){
|
||||
if(num == 1){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/jifei'
|
||||
})
|
||||
}else if(num == 2){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/shopedit'
|
||||
})
|
||||
}else if(num == 3){
|
||||
let vm = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '你确定要注销这个店铺吗?',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
vm.$u.delete("/app/store/" + vm.storeId).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '删除成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack()
|
||||
},1500)
|
||||
}
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击了取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}else if(num == 4){
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
scanType: ['qrCode'],
|
||||
success: res => {
|
||||
console.log('扫描结果:', res);
|
||||
},
|
||||
fail: err => {
|
||||
console.error('扫描失败:', err);
|
||||
uni.showToast({
|
||||
title: '扫描失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
}else if(num == 5){
|
||||
uni.navigateTo({
|
||||
url:'/pages/agentpages/devicemanagement/chargepallist/index'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
confirm(e) {
|
||||
let type = e[0].value
|
||||
if (type == '1') {
|
||||
this.scanQRCode()
|
||||
} else if (type == '2') {
|
||||
uni.navigateTo({
|
||||
url: '/page_fenbao/device/index'
|
||||
})
|
||||
}
|
||||
},
|
||||
scanQRCode() {
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
scanType: ['qrCode'],
|
||||
success: res => {
|
||||
console.log('扫描结果:', res);
|
||||
this.qrResult = res.result; // 将扫描结果存储在数据中
|
||||
},
|
||||
fail: err => {
|
||||
console.error('扫描失败:', err);
|
||||
uni.showToast({
|
||||
title: '扫描失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: linear-gradient(180deg, #54DAA1 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 750rpx;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
.box{
|
||||
width: 750rpx;
|
||||
height: 1440rpx;
|
||||
background: #F4F5F7;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
padding: 22rpx 36rpx;
|
||||
box-sizing: border-box;
|
||||
.shopname{
|
||||
width: 680rpx;
|
||||
height: 102rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
margin: auto;
|
||||
padding-left: 30rpx;
|
||||
padding-top: 30rpx;
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.shoplist{
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
width: 680rpx;
|
||||
height: 376rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
margin-top: 24rpx;
|
||||
.tit{
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.jiben{
|
||||
margin-top: 16rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.qian{
|
||||
font-size: 24rpx;
|
||||
color: #808080;
|
||||
width: 40%;
|
||||
// margin-right: 20rpx;
|
||||
}
|
||||
.shen{
|
||||
font-size: 24rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
}
|
||||
}
|
||||
.icons{
|
||||
padding-top: 30rpx;
|
||||
padding-left: 50rpx;
|
||||
padding-right: 50rpx;
|
||||
box-sizing: border-box;
|
||||
flex-wrap: wrap;
|
||||
width: 680rpx;
|
||||
height: 170rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 26rpx;
|
||||
image{
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
164
page_user/shopedit.vue
Normal file
164
page_user/shopedit.vue
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar title="修改店铺" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
|
||||
height='38'></u-navbar>
|
||||
<view class="box">
|
||||
<view class="list">
|
||||
<view class="listval">
|
||||
<view class="tit"> 店铺名称</view> <view class="but"> <input type="text" placeholder="请输入店铺名称" /> </view>
|
||||
</view>
|
||||
<view class="listvals">
|
||||
<view class="tit"> 店铺类型</view> <view class="but"> <input disabled="false" type="text" placeholder="请选择店铺类型" /> <u-icon name="arrow-down" style="position: absolute;top: 30%;right: 14rpx;"></u-icon> </view>
|
||||
</view>
|
||||
<view class="listval">
|
||||
<view class="tit"> 营业时间</view> <view class="but"> <input type="text" placeholder="请输入营业时间" /> </view>
|
||||
</view>
|
||||
<view class="listvals">
|
||||
<view class="tit"> 省市区</view> <view class="but"> <input disabled="false" type="text" placeholder="请选择省市区" /> <u-icon name="arrow-down" style="position: absolute;top: 30%;right: 14rpx;"></u-icon> </view>
|
||||
</view>
|
||||
|
||||
<view class="jinwei">
|
||||
<view class="tit"> 经纬度</view>
|
||||
<view class="but" style="position:relative;">
|
||||
<input type="text" placeholder="请选择经度" />
|
||||
<input type="text" placeholder="请选择纬度" />
|
||||
<u-icon name="map-fill" size="32" style="position: absolute;top: 44rpx;right: 22rpx;z-index: 99;"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="listval">
|
||||
<view class="tit"> 详细地址</view> <view class="but"> <input type="text" placeholder="请输入详细地址" /> </view>
|
||||
</view>
|
||||
<view class="listval">
|
||||
<view class="tit"> 联系人</view> <view class="but"> <input type="text" placeholder="请输入联系人" /> </view>
|
||||
</view>
|
||||
<view class="listval">
|
||||
<view class="tit"> 联系电话</view> <view class="but"> <input type="text" placeholder="请输入联系电话" /> </view>
|
||||
</view>
|
||||
<view class="baocun">
|
||||
保存修改
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: linear-gradient(180deg, #25CE88 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 750rpx;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
.box{
|
||||
width: 750rpx;
|
||||
height: 1440rpx;
|
||||
background: #F4F5F7;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
padding-top: 40rpx;
|
||||
.list{
|
||||
width: 680rpx;
|
||||
height: 1154rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
margin: auto;
|
||||
padding-top: 44rpx;
|
||||
padding-left: 38rpx;
|
||||
padding-right: 38rpx;
|
||||
box-sizing: border-box;
|
||||
.baocun{
|
||||
width: 584rpx;
|
||||
height: 90rpx;
|
||||
background: linear-gradient( 270deg, #54DAA1 0%, #19CD82 100%);
|
||||
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
margin-top: 82rpx;
|
||||
font-weight: 500;
|
||||
font-size: 40rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.jinwei{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 34rpx;
|
||||
.tit{
|
||||
margin-top: 40rpx;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.but{
|
||||
width: 462rpx;
|
||||
height: 140rpx;
|
||||
background: #F0F0F0;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
input{
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
padding-left: 22rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.listvals{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 34rpx;
|
||||
|
||||
.tit{
|
||||
margin-top: 12rpx;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.but{
|
||||
width: 462rpx;
|
||||
height: 70rpx;
|
||||
background: #F0F0F0;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
position: relative;
|
||||
input{
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
padding-left: 22rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.listval{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 34rpx;
|
||||
.tit{
|
||||
margin-top: 12rpx;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.but{
|
||||
width: 462rpx;
|
||||
height: 70rpx;
|
||||
background: #F0F0F0;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
input{
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
padding-left: 22rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -8,10 +8,10 @@
|
|||
<image src="https://api.ccttiot.com/smartmeter/img/static/u5rNGPmNiFGOZmCmovYF" mode=""></image>
|
||||
<text>流水分析</text>
|
||||
</view>
|
||||
<view class="lisy_val" @click="btnpage(2)">
|
||||
<!-- <view class="lisy_val" @click="btnpage(2)">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uYGHmiJ5O7hHLsiiUJAC" mode=""></image>
|
||||
<text>门店流水</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="lisy_val" @click="btnpage(3)">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uquhtDd1oxIqYdAGF44t" mode=""></image>
|
||||
<text>门店收益</text>
|
||||
|
|
@ -33,11 +33,15 @@
|
|||
methods: {
|
||||
btnpage(num){
|
||||
if(num == 1){
|
||||
|
||||
uni.navigateTo({
|
||||
url:'/page_user/shuju/lsfx'
|
||||
})
|
||||
}else if(num == 2){
|
||||
|
||||
}else if(num == 3){
|
||||
|
||||
uni.navigateTo({
|
||||
url:'/pages/income/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -66,13 +70,14 @@
|
|||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// justify-content: space-between;
|
||||
padding: 54rpx 78rpx;
|
||||
box-sizing: border-box;
|
||||
margin: auto;
|
||||
.lisy_val{
|
||||
width: 94rpx;
|
||||
text-align: center;
|
||||
margin-right: 60rpx;
|
||||
image{
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
|
|
|
|||
209
page_user/shuju/lsfx.vue
Normal file
209
page_user/shuju/lsfx.vue
Normal file
|
|
@ -0,0 +1,209 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar title="维修申报" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
|
||||
height='38'></u-navbar>
|
||||
<view class="box">
|
||||
<view class="date">
|
||||
<text @click="btnks(1)">{{firsTime}}</text> -- <text @click="btnks(2)">{{lasTime}}</text>
|
||||
</view>
|
||||
<view style="width: 750rpx;height: 1px;background-color: #F0F0F0;"></view>
|
||||
<view class="zongls">
|
||||
<view class="hz">
|
||||
<view class="">总流水</view>
|
||||
<view class="" style="color: #4C97E7;">589</view>
|
||||
</view>
|
||||
<view class="hz">
|
||||
<view class="">总收益</view>
|
||||
<view class="" style="color: #25CE88;">589</view>
|
||||
</view>
|
||||
<view class="hz">
|
||||
<view class="">总订单</view>
|
||||
<view class="" style="color: #FF8157;">589</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 750rpx;height: 1px;background-color: #F0F0F0;"></view>
|
||||
<view class="dates">
|
||||
<view class="">日期</view>
|
||||
<view class="ls" @click="shows = true">{{tit}} <u-icon name="arrow-down"></u-icon> </view>
|
||||
</view>
|
||||
<view class="list" v-for="(item,index) in 6" :key="index">
|
||||
<view class="">04/05</view>
|
||||
<view class="ls">115 元</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-select v-model="shows" :list="list" @confirm="confirms"></u-select>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
bgc: {
|
||||
background: '#25CE88'
|
||||
},
|
||||
params: {
|
||||
year: true,
|
||||
month: true,
|
||||
day: true,
|
||||
hour: false,
|
||||
minute: false,
|
||||
second: false
|
||||
},
|
||||
show: false,
|
||||
num: '',
|
||||
dateindex: 1,
|
||||
firsTime: '',
|
||||
lasTime: '',
|
||||
shows: false,
|
||||
tit:'流水',
|
||||
list: [{
|
||||
value: '1',
|
||||
label: '流水'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '收益'
|
||||
},{
|
||||
value: '3',
|
||||
label: '订单'
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let today = new Date();
|
||||
this.firsTime = this.formatDate(today);
|
||||
this.lasTime = this.formatDate(today);
|
||||
},
|
||||
methods: {
|
||||
confirms(e){
|
||||
this.tit = e[0].label
|
||||
},
|
||||
|
||||
formatDate(date) {
|
||||
let year = date.getFullYear();
|
||||
let month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
let day = String(date.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
},
|
||||
btnks(num) {
|
||||
this.show = true
|
||||
if (num == 1) {
|
||||
this.num = 1
|
||||
} else {
|
||||
this.num = 2
|
||||
}
|
||||
},
|
||||
confirm(e) {
|
||||
if (this.num == 1) {
|
||||
this.firsTime = e.year + '-' + e.month + '-' + e.day
|
||||
} else {
|
||||
this.lasTime = e.year + '-' + e.month + '-' + e.day
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
// background: linear-gradient(180deg, #25CE88 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 750rpx;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
.box {
|
||||
width: 750rpx;
|
||||
height: 1440rpx;
|
||||
background: #F4F5F7;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
|
||||
.list {
|
||||
width: 750rpx;
|
||||
height: 92rpx;
|
||||
line-height: 46rpx;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 52rpx;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #F0F0F0;
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
.dates {
|
||||
width: 750rpx;
|
||||
height: 92rpx;
|
||||
line-height: 46rpx;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 52rpx;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #F0F0F0;
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
|
||||
.ls {
|
||||
width: 128rpx;
|
||||
height: 46rpx;
|
||||
background: #F0F0F0;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #808080;
|
||||
}
|
||||
}
|
||||
|
||||
.zongls {
|
||||
width: 750rpx;
|
||||
height: 164rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 34rpx 66rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
|
||||
.hz {
|
||||
width: 154rpx;
|
||||
height: 100rpx;
|
||||
background: #F0F0F0;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
text-align: center;
|
||||
padding: 14rpx 34rpx;
|
||||
box-sizing: border-box;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.date {
|
||||
padding-left: 80rpx;
|
||||
padding-right: 80rpx;
|
||||
padding-top: 50rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 150rpx;
|
||||
background-color: #fff;
|
||||
|
||||
text {
|
||||
height: 50rpx;
|
||||
padding: 6rpx 18rpx;
|
||||
box-sizing: border-box;
|
||||
background: #eee;
|
||||
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #808080;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
395
page_user/yajin/index.vue
Normal file
395
page_user/yajin/index.vue
Normal file
|
|
@ -0,0 +1,395 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar title="押金" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
|
||||
height='38'></u-navbar>
|
||||
<view class="box">
|
||||
<view class="listobj">
|
||||
<view class="title">适用接口</view>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uFde2uGCtvfA3RS2C7q4" mode="" class="pica">
|
||||
</image>
|
||||
<view class="wz">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/urpodioxdcaz8ukriOZN" mode=""></image>
|
||||
支持免押服务
|
||||
</view>
|
||||
<view class="wz">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/urpodioxdcaz8ukriOZN" mode=""></image>
|
||||
3元/小时,租借5分钟内免费
|
||||
</view>
|
||||
<view class="wz">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/urpodioxdcaz8ukriOZN" mode=""></image>
|
||||
不足一小时按一小时计算
|
||||
</view>
|
||||
<view class="wz">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/urpodioxdcaz8ukriOZN" mode=""></image>
|
||||
每24小时封顶30元,总分顶99元
|
||||
</view>
|
||||
<view class="mianyj" @click="btnzu">
|
||||
免押金租借
|
||||
</view>
|
||||
<view class="zffen">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u48314R0s5J6QUXKpTYp" mode=""></image>
|
||||
微信支付分 | 550分以上优享
|
||||
</view>
|
||||
<view class="wts">
|
||||
点击即同意<text>《委托扣款授权书》</text>
|
||||
</view>
|
||||
</view>
|
||||
<image src="../../static/image/a5.png" mode="" class="pic"></image>
|
||||
</view>
|
||||
<!-- 遮罩层 -->
|
||||
<u-mask :show="show" @click="show = false"></u-mask>
|
||||
|
||||
<!-- 支付分未达标 -->
|
||||
<view class="weidabiao" v-if="depositfalse">
|
||||
<view class="" style="text-align: right;margin-right: 40rpx;font-size: 40rpx;" @click="btnyc">X</view>
|
||||
<view class="tit">你的微信支付分未达标 </view>
|
||||
<view class="tit"> 微信支付分要求:550分以上</view>
|
||||
<view class="zfyj">需支付押金</view>
|
||||
<view class="je">¥99.00</view>
|
||||
<view class="fw">
|
||||
<view class="wz">服务商家</view>
|
||||
<view class="gl">创特</view>
|
||||
</view>
|
||||
<view style="width: 626rpx;height: 1px;background-color:#D8D8D8;margin: auto;margin-top: 42rpx;"></view>
|
||||
<view class="fw">
|
||||
<view class="wz">服务说明</view>
|
||||
<view class="gl">归还后从押金扣除实际产生的费用</view>
|
||||
</view>
|
||||
<view class="yuedu">
|
||||
请仔细阅读《微信支付分押金规则》,同意协议请 点击按钮
|
||||
</view>
|
||||
<view class="anniu">
|
||||
确认并支付
|
||||
</view>
|
||||
</view>
|
||||
<!-- 支付分达标 -->
|
||||
<view class="dabiao" v-if="deposittrue">
|
||||
<view class="" style="text-align: right;margin-right: 40rpx;font-size: 40rpx;" @click="btnyc">X</view>
|
||||
<view class="fen">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uW2U0U93W2oTmDlLf7mA" mode=""></image>
|
||||
<text>611</text>
|
||||
</view>
|
||||
<view class="tit">你的微信支付分已达标 </view>
|
||||
<view class="tit">可享租借充电宝免押金¥99.00</view>
|
||||
<view style="width: 626rpx;height: 1px;background-color:#D8D8D8;margin: auto;margin-top: 42rpx;"></view>
|
||||
<view class="fw">
|
||||
<view class="wz">服务商家</view>
|
||||
<view class="gl">创特</view>
|
||||
</view>
|
||||
<view class="fw">
|
||||
<view class="wz">服务说明</view>
|
||||
<view class="gl">租借充电宝时免除押金,归还后自动支付实际产生的费用</view>
|
||||
</view>
|
||||
<view class="yuedu">
|
||||
请仔细阅读《微信支付分押金规则》,同意协议请 点击按钮
|
||||
</view>
|
||||
<view class="anniu">
|
||||
确认并支付
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
bgc: {
|
||||
background: '#25CE88'
|
||||
},
|
||||
show: false,
|
||||
depositfalse: false,
|
||||
deposittrue:false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
btnzu() {
|
||||
// this.depositfalse = true
|
||||
this.deposittrue = true
|
||||
},
|
||||
btnyc() {
|
||||
this.depositfalse = false
|
||||
this.deposittrue = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
// background: linear-gradient(180deg, #25CE88 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 750rpx;
|
||||
.dabiao {
|
||||
width: 750rpx;
|
||||
height: 1168rpx;
|
||||
background: #FFFFFF;
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: 0;
|
||||
padding-top: 78rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 50rpx 50rpx 0 0;
|
||||
.fen{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
text{
|
||||
font-weight: 700;
|
||||
font-size: 40rpx;
|
||||
color: #1DBE7B;
|
||||
position: absolute;
|
||||
top: 50rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-58%);
|
||||
}
|
||||
image{
|
||||
width: 168rpx;
|
||||
height: 152rpx;
|
||||
}
|
||||
}
|
||||
// text-align: center;
|
||||
.anniu {
|
||||
width: 558rpx;
|
||||
height: 90rpx;
|
||||
background: linear-gradient(270deg, #54DAA1 0%, #19CD82 100%);
|
||||
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
||||
color: #fff;
|
||||
font-size: 40rpx;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
margin: auto;
|
||||
margin-top: 74rpx;
|
||||
margin-bottom: 104rpx;
|
||||
}
|
||||
|
||||
.yuedu {
|
||||
margin-top: 144rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
padding: 0 64rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.fw {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 64rpx;
|
||||
margin-top: 34rpx;
|
||||
box-sizing: border-box;
|
||||
.wz {
|
||||
font-size: 28rpx;
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.gl {
|
||||
width: 414rpx;
|
||||
text-align: left;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.je {
|
||||
font-weight: 600;
|
||||
font-size: 60rpx;
|
||||
color: #3D3D3D;
|
||||
margin-top: 24rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.zfyj {
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
margin-top: 82rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tit {
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
margin-top: 12rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.weidabiao {
|
||||
width: 750rpx;
|
||||
height: 1168rpx;
|
||||
background: #FFFFFF;
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: 0;
|
||||
padding-top: 78rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 50rpx 50rpx 0 0;
|
||||
|
||||
// text-align: center;
|
||||
.anniu {
|
||||
width: 558rpx;
|
||||
height: 90rpx;
|
||||
background: linear-gradient(270deg, #54DAA1 0%, #19CD82 100%);
|
||||
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
||||
color: #fff;
|
||||
font-size: 40rpx;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
margin: auto;
|
||||
margin-top: 74rpx;
|
||||
margin-bottom: 104rpx;
|
||||
}
|
||||
|
||||
.yuedu {
|
||||
margin-top: 144rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
padding: 0 64rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.fw {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 64rpx;
|
||||
margin-top: 34rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.wz {
|
||||
font-size: 28rpx;
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.gl {
|
||||
width: 414rpx;
|
||||
text-align: left;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.je {
|
||||
font-weight: 600;
|
||||
font-size: 60rpx;
|
||||
color: #3D3D3D;
|
||||
margin-top: 24rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.zfyj {
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
margin-top: 82rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tit {
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
margin-top: 12rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 750rpx;
|
||||
// height: 1440rpx;
|
||||
background: #F4F5F7;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
padding-top: 30rpx;
|
||||
|
||||
.pic {
|
||||
width: 680rpx;
|
||||
height: 238rpx;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
margin-left: 36rpx;
|
||||
margin-top: 34rpx;
|
||||
}
|
||||
|
||||
.listobj {
|
||||
width: 680rpx;
|
||||
height: 918rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 38rpx 38rpx 38rpx 38rpx;
|
||||
margin: auto;
|
||||
padding-top: 48rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.wts {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
color: #3D3D3D;
|
||||
margin-top: 12rpx;
|
||||
|
||||
text {
|
||||
color: #25CE88;
|
||||
}
|
||||
}
|
||||
|
||||
.zffen {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
color: #3D3D3D;
|
||||
margin-top: 38rpx;
|
||||
|
||||
image {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
vertical-align: middle;
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.mianyj {
|
||||
width: 558rpx;
|
||||
height: 90rpx;
|
||||
background: linear-gradient(270deg, #54DAA1 0%, #19CD82 100%);
|
||||
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
||||
margin: auto;
|
||||
margin-top: 48rpx;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
font-size: 40rpx;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
|
||||
.wz {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
margin-top: 12rpx;
|
||||
padding-left: 72rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
image {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
vertical-align: middle;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.pica {
|
||||
width: 650rpx;
|
||||
height: 296rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 680rpx;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
font-size: 40rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
58
pages.json
58
pages.json
|
|
@ -406,7 +406,65 @@
|
|||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "shuju/lsfx",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "ditu",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "yajin/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "shopdetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "shopedit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "jifei",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "hezuo/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "about",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,17 +10,17 @@
|
|||
<view class="list">
|
||||
<view class="listitem" v-for="(item,index) in 10" :key="index">
|
||||
<view class="toptit">
|
||||
<u-icon name="calendar-fill"></u-icon>
|
||||
<u-icon name="calendar-fill" size="36"></u-icon>
|
||||
<view class="tit">
|
||||
星途自助台球棋 牌室
|
||||
</view>
|
||||
<view class="bd">
|
||||
<!-- <view class="bd">
|
||||
绑定设备
|
||||
</view>
|
||||
<view class="bd">
|
||||
</view> -->
|
||||
<view class="bd" @click="btnjifei">
|
||||
计费规则
|
||||
</view>
|
||||
<view class="yuan">
|
||||
<view class="yuan" @click="btnxq">
|
||||
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></text>
|
||||
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></text>
|
||||
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></text>
|
||||
|
|
@ -64,7 +64,16 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
btnxq(){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/shopdetail'
|
||||
})
|
||||
},
|
||||
btnjifei(){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/jifei'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -164,7 +173,7 @@
|
|||
padding-bottom: 12rpx;
|
||||
box-sizing: border-box;
|
||||
.tit{
|
||||
width: 236rpx;
|
||||
width: 350rpx;
|
||||
background: #DBFAED;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
font-weight: 600;
|
||||
|
|
@ -174,7 +183,7 @@
|
|||
box-sizing: border-box;
|
||||
}
|
||||
.bd{
|
||||
margin-top: 28rpx;
|
||||
margin-top: 18rpx;
|
||||
height:100%;
|
||||
font-size: 20rpx;
|
||||
color: #FFFFFF;
|
||||
|
|
@ -184,7 +193,7 @@
|
|||
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
||||
}
|
||||
.yuan{
|
||||
margin-top: 20rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,14 +50,14 @@
|
|||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="grlist" @click="btnpage(3)" style="border: 0;">
|
||||
<!-- <view class="grlist" @click="btnpage(3)" style="border: 0;">
|
||||
<view class="">
|
||||
<image src="../../../static/image/dlwx.png" mode=""></image> <text class="wz">绑定微信</text>
|
||||
</view>
|
||||
<view class="">
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<view class="anniu">
|
||||
|
|
@ -249,7 +249,7 @@
|
|||
margin: auto;
|
||||
padding: 18rpx 54rpx;
|
||||
box-sizing: border-box;
|
||||
height: 290rpx;
|
||||
height: 240rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
|
||||
border-radius: 34rpx 34rpx 34rpx 34rpx;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
<view class="shoppm">
|
||||
<view class="shopname">
|
||||
<view class="one">店铺名称</view>
|
||||
<view class="two">¥收益金额(元)</view>
|
||||
<view class="two">¥收益金额(元)
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/usFoZqC3MrePH4pqCJe7" mode="" style="display: inline-block;width: 46rpx;height: 46rpx;vertical-align: middle;"></image> </view>
|
||||
</view>
|
||||
<view class="listshop" v-for="(item,index) in 11" :key="index">
|
||||
<view class="nikename">
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
</view>
|
||||
<view class="ditu">
|
||||
<view class="dtxs">
|
||||
<map class='map' :latitude="latitude" :longitude="longitude" @click="handleMapClick"
|
||||
:show-location="true" :markers="covers" />
|
||||
<map class='map' :latitude="latitude" :longitude="longitude" @markertap="handleMapClick"
|
||||
:show-location="true" :markers="covers" :scale="15" />
|
||||
</view>
|
||||
<view class="tubiao">
|
||||
<view class="gr" @click="btnindex(1)">
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
<view class="guangg">
|
||||
<image src="../../static/image/a5.png" mode=""></image>
|
||||
</view>
|
||||
<view class="saoma">
|
||||
<view class="saoma" @click="scanQRCode">
|
||||
<view>
|
||||
<image src="../../static/image/sm.png" mode=""></image>扫码充电
|
||||
</view>
|
||||
|
|
@ -57,12 +57,34 @@
|
|||
},
|
||||
dateindex: 1,
|
||||
|
||||
latitude: 27.109017527965676, // 初始纬度
|
||||
longitude: 120.25287434763894, // 初始经度
|
||||
latitude: '', // 初始纬度
|
||||
longitude: '', // 初始经度
|
||||
covers: [], // 覆盖物数组
|
||||
jinweidu: ''
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
scanQRCode() {
|
||||
uni.navigateTo({
|
||||
url: '/page_user/yajin/index'
|
||||
})
|
||||
// uni.scanCode({
|
||||
// onlyFromCamera: true,
|
||||
// scanType: ['qrCode'],
|
||||
// success: res => {
|
||||
// console.log('扫描结果:', res);
|
||||
// },
|
||||
// fail: err => {
|
||||
// console.error('扫描失败:', err);
|
||||
// uni.showToast({
|
||||
// title: '扫描失败',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
},
|
||||
|
||||
|
||||
btnindex(num) {
|
||||
if (num == 2) {
|
||||
uni.navigateTo({
|
||||
|
|
@ -95,82 +117,70 @@
|
|||
},
|
||||
|
||||
getMyLocation() {
|
||||
const self = this;
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: (res) => {
|
||||
console.log('我的位置:', res);
|
||||
self.latitude = res.latitude;
|
||||
self.longitude = res.longitude;
|
||||
// 创建表示当前位置的覆盖物对象
|
||||
const myLocationCover = {
|
||||
latitude: res.latitude,
|
||||
longitude: res.longitude,
|
||||
width: 20,
|
||||
height: 40,
|
||||
iconPath: '../../static/image/icon1.png' // 替换为你的图标路径
|
||||
this.latitude = res.latitude;
|
||||
this.longitude = res.longitude;
|
||||
this.jinweidu = this.longitude + ',' + this.latitude;
|
||||
// 请求附近的店铺
|
||||
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(
|
||||
res => {
|
||||
if (res.code == 200) {
|
||||
res.data.forEach(item => {
|
||||
const shopCover = {
|
||||
id: parseFloat(item.storeId),
|
||||
latitude: item.lat,
|
||||
longitude: item.lng,
|
||||
width: 25,
|
||||
height: 30,
|
||||
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uI3B6yPwtiUBD3vafLtw'
|
||||
};
|
||||
// 将当前位置的覆盖物添加到covers数组中
|
||||
self.covers.push(myLocationCover);
|
||||
// 如果需要刷新地图或覆盖物,可以在这里调用相应的方法
|
||||
this.covers.push(shopCover);
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('获取位置失败:', err);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 假设这个方法用于初始化其他覆盖物(如充电宝图标)
|
||||
initOtherCovers() {
|
||||
this.covers = [{
|
||||
latitude: 27.1040175279,
|
||||
longitude: 120.22287435634,
|
||||
width: 40,
|
||||
height: 50,
|
||||
iconPath: '../../static/image/tb.png'
|
||||
},
|
||||
{
|
||||
latitude: 27.10801752796,
|
||||
longitude: 120.26287434763,
|
||||
width: 40,
|
||||
height: 50,
|
||||
iconPath: '../../static/image/tb.png'
|
||||
// 未登录调静默获取token
|
||||
jmlogin() {
|
||||
let taht = this
|
||||
wx.login({
|
||||
success(res) {
|
||||
if (res.code) {
|
||||
let data = {
|
||||
loginCode: res.code,
|
||||
};
|
||||
taht.$u.post('/app/auth/wxLogin', data).then(res => {
|
||||
if (res.code == 10003) {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/login/login'
|
||||
// })
|
||||
} else if (res.code == 200) {
|
||||
uni.setStorageSync('token', res.token);
|
||||
taht.getMyLocation()
|
||||
}
|
||||
];
|
||||
},
|
||||
|
||||
handleMapClick(e) {
|
||||
const {
|
||||
latitude,
|
||||
longitude
|
||||
} = e.detail;
|
||||
const clickedCover = this.covers.find(cover => {
|
||||
// 假设覆盖物是以其中心点为基准的矩形
|
||||
const left = cover.longitude - cover.width / 2;
|
||||
const right = cover.longitude + cover.width / 2;
|
||||
const top = cover.latitude + cover.height / 2;
|
||||
const bottom = cover.latitude - cover.height / 2;
|
||||
|
||||
// 检查点击的经纬度是否在覆盖物的矩形范围内
|
||||
return longitude >= left && longitude <= right && latitude >= bottom && latitude <= top;
|
||||
});
|
||||
|
||||
if (clickedCover) {
|
||||
uni.showToast({
|
||||
title: `点击了店铺`,
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '点击了地图其他位置',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
handleMapClick(event) {
|
||||
console.log(event);
|
||||
const markerId = event.markerId;
|
||||
uni.navigateTo({
|
||||
url: '/page_user/ditu?markerId=' + markerId
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.initOtherCovers(); // 初始化其他覆盖物
|
||||
this.getMyLocation(); // 获取并设置自身位置的覆盖物
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,7 +10,10 @@
|
|||
授权登录
|
||||
</button>
|
||||
<view class="tip">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u4LEl3cUFgF9uN30ESnF" mode=""></image>
|
||||
<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/u4LEl3cUFgF9uN30ESnF" mode=""></image> -->
|
||||
<u-checkbox-group>
|
||||
<u-checkbox v-model="checked" active-color="#25CE88"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
我已同意并阅读《服务条款》《法律条款及隐私政策》
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -21,12 +24,13 @@
|
|||
data() {
|
||||
return {
|
||||
bgc: {
|
||||
backgroundColor: "#fff",
|
||||
backgroundColor: "#25CE88",
|
||||
},
|
||||
tittxt:"登录",
|
||||
chooseType:true,
|
||||
usertype:'',
|
||||
login:false
|
||||
login:false,
|
||||
checked:false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -49,8 +53,7 @@
|
|||
if (res.code) {
|
||||
console.log('登录!', res);
|
||||
let data = {
|
||||
wxOpenId: res.code,
|
||||
userType: that.usertype,
|
||||
loginCode: res.code,
|
||||
mobileCode: e.detail.code,
|
||||
};
|
||||
resolve(data);
|
||||
|
|
@ -67,14 +70,8 @@
|
|||
wxLoginAsync()
|
||||
.then(async (data) => {
|
||||
this.$u.post("/app/auth/wxLogin",data).then((res) => {
|
||||
|
||||
|
||||
|
||||
|
||||
// this.$forceUpdate()
|
||||
if (res.code == 200) {
|
||||
console.log(res,'resres');
|
||||
wx.setStorageSync('token', res.token);
|
||||
uni.setStorageSync('token', res.token);
|
||||
that.ceshi()
|
||||
}
|
||||
});
|
||||
|
|
@ -84,7 +81,7 @@
|
|||
console.error(err);
|
||||
});
|
||||
},
|
||||
async ceshi() {
|
||||
ceshi() {
|
||||
this.$u.get("/app/user/userInfo").then((res) => {
|
||||
console.log('进入跳转');
|
||||
uni.switchTab({
|
||||
|
|
@ -119,7 +116,7 @@
|
|||
margin-top: 200rpx;
|
||||
width: 586rpx;
|
||||
height: 90rpx;
|
||||
background: #4C97E7;
|
||||
background: #25CE88;
|
||||
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
||||
font-weight: 500;
|
||||
font-size: 40rpx;
|
||||
|
|
@ -132,12 +129,8 @@
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 400;
|
||||
font-size: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #979797;
|
||||
image{
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,34 +1,31 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar title="附近门店" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' height='38'></u-navbar>
|
||||
<u-navbar title="附近共享" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' height='38'></u-navbar>
|
||||
<view class="dtxs">
|
||||
<map class='map' :latitude="latitude" :show-location="true" :longitude="longitude" :markers="covers" />
|
||||
<map class='map' :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick" :markers="covers" :show-location="true" />
|
||||
</view>
|
||||
<view class="listbox">
|
||||
<view class="title">
|
||||
<text :class="index == 1 ? 'active' : ''" @click="btntab(1)">可租借</text> <text :class="index == 2 ? 'active' : ''" @click="btntab(2)">可归还</text> <text :class="index == 3 ? 'active' : ''" @click="btntab(3)">全部门店</text>
|
||||
</view>
|
||||
<view class="list" v-for="(item,index) in 10" :key="index">
|
||||
<view class="list" v-for="(item,index) in gxlist" :key="index">
|
||||
<view class="pic">
|
||||
<image src="../../static/image/sm.png" mode=""></image>
|
||||
<image :src="item.picture" mode=""></image>
|
||||
</view>
|
||||
<view class="cen">
|
||||
<view class="cena">
|
||||
老福鼎传统菜
|
||||
<view class="cena" style="font-weight: 600;">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="cenb">
|
||||
育贤路太姥商住楼东侧约160米
|
||||
{{item.address}}
|
||||
</view>
|
||||
<view class="cenc">
|
||||
营业时间:08:00-21:00
|
||||
</view>
|
||||
<view class="rt">
|
||||
<text class="ke">可租借</text><text class="gui">可归还</text><text class="man">即将还满</text><text class="bu">不可还</text>
|
||||
营业时间:{{item.businessTimeStart}}-{{item.businessTimeEnd}}
|
||||
<view class="wz" style="color: #109F64;" v-if="item.availableDeviceCount > 0">可租借</view>
|
||||
<view class="wz" style="color: #109F64;" v-if="item.slotCount - item.deviceCount > 0">可归还</view>
|
||||
<view class="wz" style="background-color: #FFEFEF;color: #FF4444;" v-if="item.slotCount - item.deviceCount == 0">已还满</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<image src="../../static/image/lx.png" mode="" @click="mapFun"></image>
|
||||
<text>337m</text>
|
||||
<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>
|
||||
|
|
@ -40,34 +37,98 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
latitude: 31.02,
|
||||
longitude:112.12,
|
||||
covers: [{
|
||||
latitude: 31.02,
|
||||
longitude: 112.12,
|
||||
width: '50rpx'
|
||||
}],
|
||||
index:1
|
||||
latitude: '',
|
||||
longitude: '',
|
||||
covers: [],
|
||||
isMch:false,
|
||||
gxlist:[]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.getshanghu()
|
||||
},
|
||||
methods: {
|
||||
mapFun() {
|
||||
// 跳转导航
|
||||
mapFun(item) {
|
||||
uni.openLocation({
|
||||
latitude: this.latitude,
|
||||
//纬度 - 目的地/坐标点
|
||||
longitude: this.longitude,
|
||||
//经度 - 目的地/坐标点
|
||||
name: "荆门市",
|
||||
address: "一夜城"
|
||||
latitude: item.lat,
|
||||
longitude: item.lng,
|
||||
name: item.county,
|
||||
address: item.address
|
||||
});
|
||||
},
|
||||
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.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/uI3B6yPwtiUBD3vafLtw',
|
||||
distance: distance // 可以在这里也添加距离到覆盖物对象中,但通常只需要在店铺对象中
|
||||
};
|
||||
// console.log(this.gxlist);
|
||||
this.covers.push(shopCover); // 将店铺覆盖物添加到数组中
|
||||
});
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('请求店铺列表失败:', error);
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('获取位置失败:', err);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
btntab(num){
|
||||
this.index = num
|
||||
}
|
||||
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
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.getMyLocation();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -78,8 +139,7 @@
|
|||
height: 100%;
|
||||
}
|
||||
page {
|
||||
// background-color: ;
|
||||
background: linear-gradient(180deg, #25CE88 0%, rgba(255, 255, 255, 0) 100%);
|
||||
background: linear-gradient(180deg, #25D088 0%, rgba(255, 255, 255, 0) 100%);
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
}
|
||||
|
||||
|
|
@ -90,24 +150,38 @@
|
|||
left: 0;
|
||||
.dtxs{
|
||||
width: 100%;
|
||||
height: 40vh;
|
||||
height: 50vh;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
.listbox{
|
||||
margin-top: 450rpx;
|
||||
margin-top: 480rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 64rpx 64rpx 0 0;
|
||||
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08);
|
||||
padding-top: 140rpx;
|
||||
padding-top: 40rpx;
|
||||
padding-left: 32rpx;
|
||||
padding-right: 32rpx;
|
||||
box-sizing: border-box;
|
||||
height: 70vh;
|
||||
overflow-y: scroll;
|
||||
padding-bottom: 140rpx;
|
||||
padding-bottom: 400rpx;
|
||||
.moshi{
|
||||
position: fixed;
|
||||
top: 570rpx;
|
||||
left: 30rpx;
|
||||
z-index: 99;
|
||||
image{
|
||||
width: 210rpx;
|
||||
height: 62rpx;
|
||||
}
|
||||
.img{
|
||||
height: 50rpx;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
}
|
||||
.title{
|
||||
border-radius: 64rpx 64rpx 0 0;
|
||||
display: flex;
|
||||
|
|
@ -121,20 +195,20 @@
|
|||
background-color: #fff;
|
||||
position: fixed;
|
||||
height: 160rpx;
|
||||
top: 35vh;
|
||||
top: 40vh;
|
||||
left: 0;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.list{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// justify-content: space-between;
|
||||
margin-top: 44rpx;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding-bottom: 16rpx;
|
||||
.pic{
|
||||
width: 134rpx;
|
||||
height: 134rpx;
|
||||
background-color: #25CE88;
|
||||
background-color: #D9D8FF;
|
||||
border-radius: 10rpx;
|
||||
margin-right: 20rpx;
|
||||
image{
|
||||
|
|
@ -143,7 +217,7 @@
|
|||
}
|
||||
}
|
||||
.cen{
|
||||
// margin-right: 140rpx;
|
||||
width: 488rpx;
|
||||
.cena{
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
|
|
@ -163,39 +237,31 @@
|
|||
color: #3D3D3D;
|
||||
line-height: 32rpx;
|
||||
margin-top: 14rpx;
|
||||
display: flex;
|
||||
.wz{
|
||||
margin-left: 5rpx;
|
||||
padding: 4rpx;
|
||||
box-sizing: border-box;
|
||||
width:100rpx;
|
||||
border-radius: 30rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.rt{
|
||||
font-weight: 500;
|
||||
font-size: 20rpx;
|
||||
margin-top: 24rpx;
|
||||
text{
|
||||
display: inline-block;
|
||||
padding: 4rpx 18rpx;
|
||||
box-sizing: border-box;
|
||||
// border: 1px solid #ccc;
|
||||
border-radius: 20rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.ke{
|
||||
background: #B7FFE1;
|
||||
color: #109F64;
|
||||
}
|
||||
.gui{
|
||||
background: #B7FFE1;
|
||||
color: #109F64;
|
||||
}
|
||||
.man{
|
||||
background:#FFEFEF;
|
||||
color: #FF4444;
|
||||
}
|
||||
.bu{
|
||||
background:#E1E1E1;
|
||||
color: #666666;
|
||||
margin-left: 10rpx;
|
||||
background:#D9D8FF;
|
||||
color: #4D48B5;
|
||||
}
|
||||
}
|
||||
}
|
||||
.right{
|
||||
padding-top: 40rpx;
|
||||
text-align: center;
|
||||
image{
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
|
|
@ -212,7 +278,7 @@
|
|||
}
|
||||
}
|
||||
.active{
|
||||
border-bottom: 10rpx solid #3AEEA3;
|
||||
border-bottom: 10rpx solid #D9D8FF;
|
||||
border-radius: 7rpx;
|
||||
padding-bottom: 10rpx;
|
||||
font-weight: 700;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@
|
|||
</view>
|
||||
|
||||
</view>
|
||||
<view class="rightewm">
|
||||
<!-- <view class="rightewm">
|
||||
查看二维码 <u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<view class="gerenbd">
|
||||
|
|
@ -117,6 +117,22 @@
|
|||
uni.navigateTo({
|
||||
url:'/pages/agentpages/index/index'
|
||||
})
|
||||
}else if(num == 6){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/hezuo/index'
|
||||
})
|
||||
}else if(num == 3){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/about?tit=' + '用户协议'
|
||||
})
|
||||
}else if(num == 4){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/about?tit=' + '隐私政策'
|
||||
})
|
||||
}else if(num == 5){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/about?tit=' + '关于我们'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user