flinfo/dc-App/pages/index/index.vue
2025-03-01 10:26:49 +08:00

518 lines
8.5 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="content">
</view>
</template>
<script>
import headers from '../../components/header/headers.vue'
import tabbar from '../../components/tabbar/tabbar.vue'
// import newMap from './newMap.nvue'
import {
getToken
} from '@/utils/auth'
import request from '../../utils/request'
export default {
data() {
return {
type: 1,
bindex: 0,
is_focus: false,
showLeft: true,
titles: "首页",
msg: "1",
controls: [],
latitude: 23.099994,
longitude: 113.324520,
markers: [{
id: 0,
latitude: 23.099994,
longitude: 113.324520,
width: 30,
height: 30,
}],
show: false,
status: 'loading',
}
},
onShow() {
this.getBaseInfo()
},
components: {
headers,
tabbar,
// newMap
},
methods: {
// 获取用户信息
getBaseInfo() {
request({
url: 'system/user/getUserBaseInfo',
method: 'get',
}).then(res => {
console.log(288);
if (res.code == 200) {
uni.reLaunch({
url:'/pages/index/nIndex'
})
console.log(res.data);
uni.setStorageSync('user_info', res.data);
}else{
uni.reLaunch({
url:'/pages/login/login'
})
}
})
},
// 跳转
goqb() {
uni.navigateTo({
url: '/pages/my/MyWallet'
})
},
// 改变状态
interactiveType(num) {
this.type = num
if (num == 0) {
uni.showToast({
title: "Sorry, it is currently in the development stage",
icon: 'none'
})
}
},
// 去搜索
goSearch() {
uni.navigateTo({
url: '/pages/index/search'
})
},
getLatLon() {
let _this = this;
uni.getLocation({
// 谷歌使用wgs84 其他使用gcj02
type: 'gcj02', // 使用国测局坐标系
geocode: true,
success: function(res) {
uni.setStorageSync("lon", res.longitude)
uni.setStorageSync("lat", res.latitude)
console.log('经度: ' + res.longitude);
console.log('纬度: ' + res.latitude);
_this.longitude = res.longitude
_this.latitude = res.latitude
_this.markers = [{
id: 0,
latitude: res.latitude,
longitude: res.longitude,
width: 100,
height: 100,
}]
},
fail: function(err) {
console.log('获取位置信息失败: ' + err.errMsg);
uni.setStorageSync("isGetAddress", false)
}
});
},
showDrawer(e) {
this.$refs[e].open()
console.log(e, 138);
},
change(e, type) {
console.log((type === 'showLeft' ? '左窗口' : '右窗口') + (e ? '打开' : '关闭'));
this[type] = e
},
goback() {
uni.navigateBack()
}
},
onNavigationBarButtonTap(e) {
if (this.showLeft) {
this.$refs.showLeft.close()
} else {
this.$refs.showLeft.open()
}
},
// app端拦截返回事件 仅app端生效
onBackPress() {
if (this.showRight || this.showLeft) {
this.$refs.showLeft.close()
this.$refs.showRight.close()
return true
}
}
}
</script>
<style scoped lang="scss">
.input {
flex: 1;
border: 1px solid #ccc;
padding: 5px 10px;
z-index: 999;
}
.map_cavs {
position: relative;
box-sizing: border-box;
}
#map {
z-index: -99999999999999999999999999999999999999999999999999;
}
.left_icon {
height: 35px;
width: 35px;
background: #fff;
color: #41a863;
background: transparent;
margin: 15px;
z-index: 9999999999999999999999;
margin-top: 44px;
display: flex;
align-items: center;
justify-content: center;
}
.po-input {
z-index: 999999;
width: 90%;
height: 60px;
background: #FFFFFF;
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
border-radius: 6px 6px 6px 6px;
box-sizing: border-box;
// padding: 15px;
display: flex;
align-items: center;
position: fixed;
left: 50%;
top: 44px;
transform: translate(-50%, -50%);
}
.co-input {
width: 90%;
height: 60px;
background: #FFFFFF;
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
border-radius: 6px 6px 6px 6px;
box-sizing: border-box;
// padding: 15px;
display: flex;
align-items: center;
position: fixed;
left: 50%;
transform: translate(-50%, -50%);
z-index: 999999;
top: 68px;
// margin: 5px auto;
// margin-top: 44px;
}
.bottom_pr {
min-height: 80px;
width: 100%;
background: #FFFFFF;
box-shadow: 0px -5px 10px 0px rgba(0, 0, 0, 0.1);
border-radius: 18px 18px 0px 0px;
position: fixed;
left: 0px;
bottom: 68px;
overflow: hidden;
}
.bottom_time {
position: fixed;
left: 50%;
bottom: 55px;
transform: translate(-50%, -50%);
width: 90%;
height: 106px;
background: #FFFFFF;
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.05);
border-radius: 6px 6px 6px 6px;
box-sizing: border-box;
padding: 15px;
display: flex;
align-items: center;
justify-content: space-around;
}
.bottom_po {
min-height: 80px;
width: 100%;
background: #FFFFFF;
box-shadow: 0px -5px 10px 0px rgba(0, 0, 0, 0.1);
border-radius: 18px 18px 0px 0px;
position: fixed;
left: 0px;
bottom: 68px;
display: flex;
align-items: center;
justify-content: space-around;
}
.b_an {
width: 40%;
height: 48px;
font-size: 16px;
border-radius: 6px 6px 6px 6px;
border: 1px solid #E8E8E8;
display: flex;
align-items: center;
justify-content: center;
color: #000;
}
.avc_ {
background: #32714F !important;
color: #fff !important;
}
.i_anniu {
width: 95%;
margin: 15px auto;
box-sizing: border-box;
padding: 15px;
background: #32714F;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
border-radius: 4px;
}
.z_hang {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 15px;
border-bottom: 1px solid #F2F2F2;
}
.z_icon {
width: 15%;
height: 35px;
image {
width: 50px;
height: 23px;
}
}
.z_right {
width: 80%;
display: flex;
align-items: center;
justify-content: space-between;
}
.z_title {
font-weight: bold;
font-size: 14px;
color: #333333;
}
.z_time {
text-align: center;
color: #DDDDDD;
}
.g_ {
width: 1px;
height: 74px;
background: #E8E8E8;
}
.sm_size {
width: 100%;
text-align: center;
font-weight: 500;
font-size: 12px;
}
.max-size {
width: 100%;
text-align: center;
font-weight: 600;
font-size: 18px;
color: #333333;
margin: 10px auto;
line-height: 18px;
}
.po_back {
position: fixed;
top: 54px;
left: 15px;
image {
width: 30px;
height: 30px;
}
}
.po_dw {
position: fixed;
top: 18%;
right: 15px;
image {
width: 35px;
height: 35px;
}
}
.introduce_ {
width: 95%;
z-index: 999999;
background: #FFFFFF;
box-sizing: border-box;
padding: 15px;
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.05);
border-radius: 6px 6px 6px 6px;
position: fixed;
left: 50%;
bottom: 15%;
transform: translate(-50%, -50%);
}
.p_1 {
font-weight: bold;
font-size: 16px;
color: #333333;
margin-bottom: 10px;
}
.p_2 {
font-weight: 500;
font-size: 12px;
color: #333333;
margin-bottom: 10px;
}
.p_3 {
font-weight: bold;
font-size: 12px;
color: #333333;
margin-bottom: 10px;
}
.p_4 {
font-weight: 500;
font-size: 10px;
color: #999999;
margin-bottom: 10px;
}
.h_bs {
width: 90%;
margin: 10px auto;
display: flex;
align-items: center;
justify-content: space-around;
}
.zy_ {
text-align: center;
image {
width: 30px;
height: 30px;
}
}
.bs_ {
width: 100%;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 15px;
justify-content: space-between;
}
.ds_ {
display: flex;
align-items: center;
image {
width: 50px;
height: 23px;
margin-right: 10px;
}
}
.dhuang {
font-weight: bold;
font-size: 16px;
color: #FFA629;
}
.h_ds {
display: flex;
align-items: center;
box-sizing: border-box;
padding: 15px;
border-bottom: 1px solid #F2F2F2;
font-family: PingFang SC, PingFang SC;
font-weight: bold;
font-size: 16px;
color: #242E42;
}
.user_box {
width: 100%;
background: #F7F8FA;
box-sizing: border-box;
padding: 15px;
display: flex;
align-items: center;
justify-content: space-between;
}
.touxiang {
image {
width: 50px;
height: 50px;
border-radius: 50%;
margin-right: 10px;
}
}
.c-input {
background: red;
width: 90%;
position: absolute;
bottom: 15%;
left: 50%;
transform: translateX(-50%);
z-index: 99999999999999999999999999999999;
background-color: #FFFFFF;
}
</style>