初始化提交

main
jinna 3 years ago
parent a9ea0e053b
commit 5289cf52bb
  1. BIN
      dist.zip
  2. 9499
      package-lock.json
  3. 3
      package.json
  4. 7
      public/index.html
  5. 17
      src/App.vue
  6. 38
      src/api/base.js
  7. BIN
      src/assets/image/beijixing_down.png
  8. BIN
      src/assets/image/bolanzhongxin_down.png
  9. BIN
      src/assets/image/bowuguan_down.png
  10. BIN
      src/assets/image/chijia_up.png
  11. BIN
      src/assets/image/diyihaishuiyucang_updown.png
  12. BIN
      src/assets/image/dongpozhi_down.png
  13. BIN
      src/assets/image/down_1.jpg
  14. BIN
      src/assets/image/down_10.jpg
  15. BIN
      src/assets/image/down_11.jpg
  16. BIN
      src/assets/image/down_12.jpg
  17. BIN
      src/assets/image/down_13.jpg
  18. BIN
      src/assets/image/down_14.jpg
  19. BIN
      src/assets/image/down_2.jpg
  20. BIN
      src/assets/image/down_3.jpg
  21. BIN
      src/assets/image/down_4.jpg
  22. BIN
      src/assets/image/down_5.jpg
  23. BIN
      src/assets/image/down_6.jpg
  24. BIN
      src/assets/image/down_7.jpg
  25. BIN
      src/assets/image/down_8.jpg
  26. BIN
      src/assets/image/down_9.jpg
  27. BIN
      src/assets/image/huochezhan_down.png
  28. BIN
      src/assets/image/jinlongqiao_down.png
  29. BIN
      src/assets/image/nansanlu_down.png
  30. BIN
      src/assets/image/peixunzhongxin_up.png
  31. BIN
      src/assets/image/shigoutun_down.png
  32. BIN
      src/assets/image/up_1.jpg
  33. BIN
      src/assets/image/up_10.jpg
  34. BIN
      src/assets/image/up_11.jpg
  35. BIN
      src/assets/image/up_12.jpg
  36. BIN
      src/assets/image/up_13.jpg
  37. BIN
      src/assets/image/up_14.jpg
  38. BIN
      src/assets/image/up_2.jpg
  39. BIN
      src/assets/image/up_3.jpg
  40. BIN
      src/assets/image/up_4.jpg
  41. BIN
      src/assets/image/up_5.jpg
  42. BIN
      src/assets/image/up_6.jpg
  43. BIN
      src/assets/image/up_7.jpg
  44. BIN
      src/assets/image/up_8.jpg
  45. BIN
      src/assets/image/up_9.jpg
  46. BIN
      src/assets/image/yueliangwan_down.png
  47. BIN
      src/assets/image/yueliangwan_up.png
  48. BIN
      src/assets/image/组-1.gif
  49. BIN
      src/assets/img/act_bag.png
  50. BIN
      src/assets/img/back.png
  51. BIN
      src/assets/img/bag.png
  52. BIN
      src/assets/img/bagg.jpg
  53. BIN
      src/assets/img/bagg.png
  54. BIN
      src/assets/img/blue.png
  55. BIN
      src/assets/img/car.png
  56. BIN
      src/assets/img/car_bag.png
  57. BIN
      src/assets/img/car_cen.gif
  58. BIN
      src/assets/img/center_bag.png
  59. BIN
      src/assets/img/fire.png
  60. BIN
      src/assets/img/gray.png
  61. BIN
      src/assets/img/gray_blue.png
  62. BIN
      src/assets/img/green.png
  63. BIN
      src/assets/img/notice.png
  64. BIN
      src/assets/img/pink_bag.png
  65. BIN
      src/assets/img/scenery.png
  66. BIN
      src/assets/img/speed.png
  67. BIN
      src/assets/img/stop_bag.png
  68. BIN
      src/assets/img/tips.png
  69. BIN
      src/assets/img/tipss.png
  70. BIN
      src/assets/img/wait_bag.png
  71. BIN
      src/assets/img/wea.png
  72. BIN
      src/assets/img/weather.png
  73. BIN
      src/assets/img/ye_car.png
  74. BIN
      src/assets/img/yell_car.png
  75. BIN
      src/assets/img/yellow.png
  76. BIN
      src/assets/img/yibiao.png
  77. 14
      src/main.js
  78. 32
      src/router/index.js
  79. 52
      src/util/axios.js
  80. 1041
      src/views/AboutView.vue
  81. 242
      src/views/HomeView.vue
  82. 75
      src/views/index.html
  83. 104
      src/views/stopView.vue
  84. 144
      src/views/trafficView.vue
  85. 114
      src/views/waitView.vue
  86. 52
      vue.config.js

Binary file not shown.

9499
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -8,7 +8,10 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"axios": "^1.3.4",
"core-js": "^3.8.3",
"element-ui": "^2.15.13",
"vue": "^2.6.14",
"vue-router": "^3.5.1",
"vuex": "^3.6.2"

@ -6,8 +6,13 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<script type="text/javascript">
window._AMapSecurityConfig = {
securityJsCode: "e51946ed1718ac5b4e7cbe6b7e3c57b8",
}
</script>
</head>
<body>
<body style="margin: 0px;">
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>

@ -1,9 +1,5 @@
<template>
<div id="app">
<nav>
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
</nav>
<router-view/>
</div>
</template>
@ -16,17 +12,4 @@
text-align: center;
color: #2c3e50;
}
nav {
padding: 30px;
a {
font-weight: bold;
color: #2c3e50;
&.router-link-exact-active {
color: #42b983;
}
}
}
</style>

@ -0,0 +1,38 @@
import request from "@/util/axios";
// 获取天气
export const queryWeath = () =>
request({
url: "/weather/v1/?district_id=370600&data_type=all&ak=YtoEHZgdNk1iyWzsU8Hj11YChF2fbaDD",
method: "get",
});
// 获取车牌号
export const getCarNum = () =>
request({
url: "/api/blade-business/common-api/get-car-no",
method: "get",
});
// 获取车速
export const getCarSpeed = (query) =>
request({
url: "/api/blade-business/common-api/get-car-speed",
method: "get",
params: query,
});
// 获取早晚高峰
export const getPeak = () =>
request({
url: "/api/blade-business/common-api/get-rush-hour",
method: "get",
});
// 获取车站及相关信息
export const getSiteInfo = (query) =>
request({
url: "/api/blade-business/common-api/get-site",
method: "get",
params: query,
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

@ -1,7 +1,11 @@
import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
Vue.use(ElementUI);
Vue.config.productionTip = false;
@ -9,4 +13,4 @@ new Vue({
router,
store,
render: (h) => h(App),
}).$mount('#app');
}).$mount("#app");

@ -1,27 +1,41 @@
import Vue from 'vue';
import VueRouter from 'vue-router';
import HomeView from '../views/HomeView.vue';
import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";
import AboutView from "../views/AboutView.vue";
import stopView from "../views/stopView.vue";
import trafficView from "../views/trafficView.vue";
Vue.use(VueRouter);
const routes = [
{
path: '/',
name: 'home',
path: "/home",
name: "home",
component: HomeView,
},
{
path: '/about',
name: 'about',
path: "/",
name: "about",
component: AboutView,
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue'),
// component: () => import(/* webpackChunkName: "about" */ "../views/AboutView.vue"),
},
{
path: "/stop",
name: "stop",
component: stopView,
},
{
path: "/traffic",
name: "traffic",
component: trafficView,
},
];
const router = new VueRouter({
mode: 'history',
mode: "history",
base: process.env.BASE_URL,
routes,
});

@ -0,0 +1,52 @@
import axios from "axios";
//默认超时时间
// axios.defaults.timeout = 1000 * 60 *;
//跨域请求,允许保存cookie
axios.defaults.withCredentials = true;
//返回其他状态码
axios.defaults.validateStatus = function (status) {
return status >= 200 && status <= 500;
};
//HTTP Request拦截
axios.interceptors.request.use(
(config) => {
if (config.headers["Content-Type"] != undefined) {
config.headers["Content-Type"] = "application/x-www-form-urlencoded";
} else {
config.headers["Content-Type"] = "application/json";
}
return config;
},
(error) => {
console.error("Request interceptors:", error);
return Promise.reject(error);
}
);
//HTTP Response拦截
axios.interceptors.response.use(
(res) => {
const ok = res.data.Success || res.data.status == "200" || false,
status = res.status || 200,
message =
res.data.AllMessages ||
res.data.errorMessage ||
res.data.message ||
"Internal Server Error!";
if (!ok && !status) {
return Promise.reject(new Error(message));
}
return res.data;
},
(error) => {
console.error("Response interceptors:", error);
return Promise.reject(error);
}
);
export default axios;

File diff suppressed because it is too large Load Diff

@ -1,18 +1,242 @@
<template>
<div class="home">
<img alt="Vue logo" src="../assets/logo.png">
<HelloWorld msg="Welcome to Your Vue.js App"/>
<div class="container">
<div class="top_box">
<div class="left_top">
<img style="margin-left:10px" src="@/assets/img/car.png" alt="">
<div class="time_txt">{{date}} {{time}}</div>
<div class="traffic_txt">拥堵</div>
<div class="speed_txt">{{speed}}KM/H</div>
</div>
<div class="right_top">
<img src="@/assets/img/weather.png" alt="">
<div style="margin: 0 20px">5~20</div>
</div>
</div>
<!-- <div class="bag">
<img src="@/assets/img/scenery.png" alt="">
</div> -->
<div class="bottom_box">
<div class="top_bottom">
<div class="box_left">下一站山东商务职业技术学院</div>
<div class="box_right">施工中路不拥堵心情随意逛</div>
</div>
<div class="bot">
<div class="top_bot">
<div class="left_bot">
<img class="img" src="@/assets/img/fire.png" alt="">
<div>{{tips}}</div>
</div>
<div class="left_bot">
<img class="img" src="@/assets/img/notice.png" alt="">
<div class="txt">{{tip}}</div>
</div>
</div>
<div class="bot_box">
<div class="point_box">景点</div>
<div>烟台世界设计公园就在附近艺展公园烽火公园逐浪公园等主题公园应有尽有</div>
</div>
</div>
</div>
</div>
</template>
<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue';
export default {
name: 'HomeView',
components: {
HelloWorld,
data() {
return {
time:'',
timer:null,
timer1:null,
date:'',
speed:'32',
tips:'向前跑,带着赤子的骄傲,生命的闪耀不坚持怎能看到',
tip:'4.13-17烟台春季车站在国际博览中心!',
}
},
created() {
this.getTime();
this.getText()
},
methods: {
getTime() {
//
this.timer = setInterval(() => {
var date = new Date();
var year = date.getFullYear(); //
var month = date.getMonth(); //
var data = date.getDate(); //
var hours = date.getHours(); //
var minute = date.getMinutes(); //
var second = date.getSeconds(); //
this.day = date.getDay(); //
this.time = this.fn(hours) + ":" + this.fn(minute) + ":" + this.fn(second);
this.date = year + "/" + (month + 1) + "/" + data;
this.speed = Math.floor(Math.random() * 90) + 10;
}, 1000);
},
fn(str) {
let num = null;
str >= 10 ? (num = str) : (num = "0" + str);
return num;
},
getText(){
this.timer1 = setInterval(() => {
if(this.tips == "向前跑,带着赤子的骄傲,生命的闪耀不坚持怎能看到"){
this.tips = "探索自然奥秘,感受地质瑰丽"
}else{
this.tips = '向前跑,带着赤子的骄傲,生命的闪耀不坚持怎能看到'
}
if(this.tip == "4.13-17烟台春季车站在国际博览中心!"){
this.tip = '4.13-17烟台地质博物馆所有展览全年免费向公众开放'
}else{
this.tip = "4.13-17烟台春季车站在国际博览中心!"
}
}, 5000);
},
},
};
</script>
<style lang="scss" scoped>
.container{
width: 100%;
height: 100%;
position: absolute;
.top_box{
width: 100%;
height: 6%;
background: #333;
display: flex;
align-items: center;
justify-content: space-between;
color: #fff;
font-size: 18px;
.left_top{
height: 100%;
display: flex;
align-items: center;
.time_txt{
margin: 0 20px;
}
.traffic_txt{
width: 60px;
height: 65%;
background: #c00000;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20px;
}
.speed_txt{
width: 100px;
height: 65%;
background: #548235;
display: flex;
align-items: center;
justify-content: center;
}
}
.right_top{
display: flex;
}
}
.bag{
position: absolute;
bottom: 16%;
}
.bottom_box{
width: 100%;
height: 15%;
position: absolute;
bottom: 0;
.top_bottom{
width: 100%;
height: 30%;
display: flex;
color: #fff;
font-size: 18px;
.box_left{
width: 25%;
height: 100%;
background: #2baaf7;
display: flex;
align-items: center;
justify-content: center;
}
.box_right{
width: 75%;
height: 100%;
background: #f04840;
display: flex;
align-items: center;
justify-content: center;
}
}
.bot{
width: 100%;
height: 70%;
background: #333;
font-size: 18px;
color: #fff;
.top_bot{
width: 100%;
height: 50%;
display: flex;
.left_bot{
width: 50%;
height: 100%;
display: flex;
align-items: center;
letter-spacing: 2px;
font-size: 22px;
.txt{
color: #f3b700;
}
.img{
margin: 0 10px;
}
}
}
.bot_box{
display: flex;
align-items: center;
height: 50%;
width: 100%;
font-size: 22px;
letter-spacing: 2px;
color: rgb(126,126,119);
.point_box{
width: 100px;
height: 75%;
background: #ffc000;
display: flex;
align-items: center;
justify-content: center;
margin: 0 10px;
color: #fff;
}
}
}
}
}
</style>

@ -0,0 +1,75 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<style>
.container {
width: 100%;
height: 100%;
position: absolute;
margin: -8px;
background-color: rgba(0, 0, 0, 0);
}
.top_box {
width: 100%;
height: 6%;
background: #333;
display: flex;
align-items: center;
justify-content: space-between;
color: #fff;
font-size: 18px;
}
.left_top {
height: 100%;
display: flex;
align-items: center;
}
.time_txt {
margin: 0 20px;
}
.traffic_txt {
width: 60px;
height: 65%;
background: #c00000;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20px;
}
.speed_txt {
width: 100px;
height: 65%;
background: #548235;
display: flex;
align-items: center;
justify-content: center;
}
.right_top {
display: flex;
}
</style>
<body>
<div class="container">
<div class="top_box">
<div class="left_top">
<img style="margin-left: 10px" src="@/assets/img/car.png" alt="" />
<div class="time_txt">2023-03-28 14:05:40</div>
<div class="traffic_txt">拥堵</div>
<div class="speed_txt">37KM/H</div>
</div>
<div class="right_top">
<img src="@/assets/img/weather.png" alt="" />
<div style="margin: 0 20px">5~20℃</div>
</div>
</div>
</div>
</body>
</html>

@ -0,0 +1,104 @@
<template>
<div class="container">
<div class="center_box">
<div class="top_box">
<div class="top_txt">车辆正在休息</div>
<div class="bot_txt">请稍等片刻</div>
</div>
<div class="bot_box"><span class="txt">{{date}} {{time}}</span></div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
date:'',
time:''
}
},
created() {
this.getTime()
},
methods: {
getTime() {
//
this.timer = setInterval(() => {
var date = new Date();
var year = date.getFullYear(); //
var month = date.getMonth(); //
var data = date.getDate(); //
var hours = date.getHours(); //
var minute = date.getMinutes(); //
var second = date.getSeconds(); //
this.day = date.getDay(); //
this.time = this.fn(hours) + ":" + this.fn(minute) + ":" + this.fn(second);
this.date = year + "/" + (month + 1) + "/" + data;
// this.speedValue = Math.floor(Math.random() * 90) + 10;
}, 1000);
},
fn(str) {
let num = null;
str >= 10 ? (num = str) : (num = "0" + str);
return num;
},
},
}
</script>
<style lang="scss" scoped>
.container{
width: 100%;
height: 100%;
position: absolute;
background: url("@/assets/img/stop_bag.png");
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: center;
background-repeat: no-repeat;
.center_box{
width: 529px;
height: 642px;
background: url("@/assets/img/center_bag.png");
background-repeat: no-repeat;
background-size: 100% 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
.top_box{
margin-top: 25%;
}
.top_txt{
font-size: 48px;
color: #0a8b56;
font-weight: bold;
}
.bot_txt{
font-size: 28px;
color: #0a8b56;
margin-top: 10px;
}
.bot_box{
width: 100%;
height: 17%;
display: flex;
align-items: center;
justify-content: center;
font-size: 32px;
color: #fff7cc;
font-weight: 300;
.txt{
text-shadow: 2px 2px 4px #390910;
}
}
}
}
</style>

@ -0,0 +1,144 @@
<template>
<div class="container">
<div class="map_box" id="map"></div>
</div>
</template>
<script>
import AMapLoader from '@amap/amap-jsapi-loader';
export default {
data() {
return {
}
},
created() {
},
mounted() {
this.initMap()
},
methods: {
initMap(){
AMapLoader.load({
key:"af4c1cf82cc9aacefbadb4fc91d76ef9", // WebKey load
version:"2.0", // JSAPI 1.4.15
plugins:['AMap.LineSearch'], // 使'AMap.Scale'
}).then((AMap)=>{
this.map = new AMap.Map("map",{ //id
viewMode:"2D", //3D
zoom:15, //
center: [121.39975,37.542694], //
// mapStyle: "amap://styles/blue",
});
this.map.panBy(300,120,0)
var marker = new AMap.Marker({
position: new AMap.LngLat(121.39975, 37.542694), // [116.39, 39.9]
title: ''
});
//
// console.log(traffic)
// this.getLine();
//线
this.map.plugin(["AMap.LineSearch"], () => {
var linesearch = new AMap.LineSearch({
pageIndex: 1, //1
pageSize: 1, //2050
city: "烟台", ///
extensions: "all" //线base
});
console.log(linesearch)
//线
linesearch.search('17', (status, result)=> {
//statusresult
console.log(status, result);
if (status === 'complete' && result.info === 'OK') {
console.log('result', result)
this.lineSearchData(result);
} else {
alert(result);
}
});
})
this.map.add(marker);
}).catch(e=>{
console.log(e);
})
},
lineSearchData(data) {
var lineArr = data.lineInfo;
var lineNum = data.lineInfo.length;
if (lineNum == 0) {
} else {
for (var i = 0; i < lineNum; i++) {
var pathArr = lineArr[i].path;
var stops = lineArr[i].via_stops;
var startPot = stops[0].location;
var endPot = stops[stops.length - 1].location;
if (i == 0) //线
this.drawbusLine(startPot, endPot, pathArr);
}
}
},
drawbusLine(startPot, endPot, BusArr) {
//
// new AMap.Marker({
// map: this.map,
// position: startPot, //
// icon: "https://webapi.amap.com/theme/v1.3/markers/n/start.png",
// zIndex: 10
// });
// new AMap.Marker({
// map: this.map,
// position: endPot, //
// icon: "https://webapi.amap.com/theme/v1.3/markers/n/end.png",
// zIndex: 10
// });
//线
var busPolyline = null;
busPolyline = new AMap.Polyline({
map: this.map,
path: BusArr,
strokeColor: "#ff3c00",//线
strokeOpacity: 0.4,//线
isOutline:true,
outlineColor:'white',
strokeWeight: 8//线
});
// this.map.setFitView();
var traffic = new AMap.TileLayer.Traffic({
'autoRefresh': true, //,false
'interval': 180, //,180s
});
this.map.add(traffic)
},
},
}
</script>
<style lang="scss" scoped>
.container{
width: 100%;
height: 100%;
position: absolute;
.map_box{
margin: 10px 0 0 10px;
width: 680px;
height: 310px;
// background: red;
}
}
</style>

@ -0,0 +1,114 @@
<template>
<div class="container">
<div class="center_box" v-loading="loading" element-loading-spinner="el-icon-loading"
element-loading-background="rgba(255, 255, 255, 0)">
<div class="top_box">
<div class="top_txt">加载中...</div>
<div class="bot_txt">请耐心等待</div>
</div>
<div class="bot_box"><span class="txt">{{date}} {{time}}</span></div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
date:'',
time:'',
loading:true
}
},
created() {
this.getTime()
},
methods: {
getTime() {
//
this.timer = setInterval(() => {
var date = new Date();
var year = date.getFullYear(); //
var month = date.getMonth(); //
var data = date.getDate(); //
var hours = date.getHours(); //
var minute = date.getMinutes(); //
var second = date.getSeconds(); //
this.day = date.getDay(); //
this.time = this.fn(hours) + ":" + this.fn(minute) + ":" + this.fn(second);
this.date = year + "/" + (month + 1) + "/" + data;
// this.speedValue = Math.floor(Math.random() * 90) + 10;
}, 1000);
},
fn(str) {
let num = null;
str >= 10 ? (num = str) : (num = "0" + str);
return num;
},
},
}
</script>
<style lang="scss" scoped>
.container{
width: 100%;
height: 100%;
position: absolute;
background: url("@/assets/img/stop_bag.png");
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: center;
background-repeat: no-repeat;
.center_box{
width: 529px;
height: 642px;
background: url("@/assets/img/wait_bag.png");
background-repeat: no-repeat;
background-size: 100% 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
.top_box{
margin-top: 25%;
}
.top_txt{
font-size: 48px;
color: #c47516;
font-weight: bold;
}
.bot_txt{
font-size: 28px;
color: #c47516;
margin-top: 10px;
}
.bot_box{
width: 100%;
height: 17%;
display: flex;
align-items: center;
justify-content: center;
font-size: 32px;
color: #fff7cc;
font-weight: 300;
.txt{
text-shadow: 2px 2px 4px #390910;
}
}
::v-deep .el-loading-spinner{
top: 5% !important;
i{
color: #fff;
font-size: 85px;
}
}
}
}
</style>

@ -1,5 +1,55 @@
const { defineConfig } = require('@vue/cli-service');
const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: false,
publicPath: "/",
productionSourceMap: false,
devServer: {
port: 8080,
proxy: {
"/api": {
// target: "http://192.168.3.81:8002",
target: "http://42.192.165.208:8002",
changeOrigin: true,
ws: true,
pathRewrite: {
"/api": "",
},
},
// '/gatewayapi': {
// target: 'https://gatewayapi.lunz.cn/api',
// changeOrigin: true,
// ws: true,
// pathRewrite: {
// '/gatewayapi': ''
// }
// },
"/weather": {
target: "https://api.map.baidu.com",
changeOrigin: true,
ws: true,
// pathRewrite: {
// "/weather": "",
// },
},
// '/sjapi': {
// target: 'http://192.168.1.38:8210',
// // target: 'http://127.0.0.1:8210',
// changeOrigin: true,
// ws: true,
// pathRewrite: {
// '/sjapi': ''
// }
// },
// '/pollapi': {
// target: 'https://poll.kuaidi100.com',
// changeOrigin: true,
// ws: true,
// pathRewrite: {
// '/pollapi': ''
// }
// },
},
},
});

Loading…
Cancel
Save