修改图片路径
This commit is contained in:
parent
b3fa374038
commit
977e01fa07
@ -1,27 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<map id="mapRef" ref="mapRef" style="width: 100%;height: 100vh;" show-location :longitude="location.longitude"
|
<map id="mapRef" ref="mapRef" style="width: 100%;height: 100vh;" show-location :longitude="location.longitude"
|
||||||
:latitude="location.latitude" :markers="markers" :scale="scale" :polygons="polygons" :polyline="polylines"
|
:latitude="location.latitude" :markers="markers" :scale="scale" :polygons="polygons" :polyline="polylines"
|
||||||
:circles="circles" />
|
:circles="circles" @markertap="fnshowBikeInfo" />
|
||||||
<div v-if="!showBikeInfo" class="divMapTools" style="left: 10px;">
|
<div v-if="!showBikeInfo" class="divMapTools" style="left: 10px;">
|
||||||
<div>
|
<div>
|
||||||
<image class="divImg" src="/static/userui/home/localtion.png" @click="refresh" />
|
<image class="divImg" :src='imgPath+"static/userui/home/localtion.png"' @click="refresh" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<image class="divImg" src="/static/userui/home/fault.png" @click="reportFault" />
|
<image class="divImg" :src='imgPath+"static/userui/home/fault.png"' @click="reportFault" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!showBikeInfo" class="divMapTools" style="right: 10px;">
|
<div v-if="!showBikeInfo" class="divMapTools" style="right: 10px;">
|
||||||
<div>
|
<div>
|
||||||
<image class="divImg" src="/static/userui/home/packing.png" @click="getSite" />
|
<image class="divImg" :src='imgPath+"static/userui/home/packing.png"' @click="getSite" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<image class="divImg" src="/static/userui/home/mine.png" @click="getMine" />
|
<image class="divImg" :src='imgPath+"static/userui/home/mine.png"' @click="getMine" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="hasOrder" class="divMapOrder" @click="showOrderInfo">
|
<div v-if="hasOrder" class="divMapOrder" @click="showOrderInfo">
|
||||||
<div>
|
<div>
|
||||||
<image style="width: 15px;height: 15px;margin-left: 15px;margin-right: 10px;"
|
<image style="width: 15px;height: 15px;margin-left: 15px;margin-right: 10px;"
|
||||||
src="/static/userui/home/speaker.png" />
|
:src='imgPath+"static/userui/home/speaker.png"' />
|
||||||
<label>有骑行订单未支付,请查看</label>
|
<label>有骑行订单未支付,请查看</label>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-right: 15px;">
|
<div style="margin-right: 15px;">
|
||||||
@ -37,7 +37,7 @@
|
|||||||
<div v-if="showOrder" class="divOrder">
|
<div v-if="showOrder" class="divOrder">
|
||||||
<div class="divOrderRow">
|
<div class="divOrderRow">
|
||||||
<div class="divOrderCell">
|
<div class="divOrderCell">
|
||||||
<image class="divOrderImg" src="/static/userui/home/money.png" />
|
<image class="divOrderImg" :src='imgPath+"static/userui/home/money.png"' />
|
||||||
<label>费用:</label>
|
<label>费用:</label>
|
||||||
<label>{{order.money}}元</label>
|
<label>{{order.money}}元</label>
|
||||||
</div>
|
</div>
|
||||||
@ -47,25 +47,24 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="divOrderRow" style="font-size: 12px;">
|
<div class="divOrderRow" style="font-size: 12px;">
|
||||||
<div class="divOrderCell">
|
<div class="divOrderCell">
|
||||||
<image class="divOrderImg" src="/static/userui/home/timer.png" />
|
<image class="divOrderImg" :src='imgPath+"static/userui/home/timer.png"' />
|
||||||
<label>计时:</label>
|
<label>计时:</label>
|
||||||
<label style="color: #61D246;">{{order.time}}</label>
|
<label style="color: #61D246;">{{order.time}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="divOrderCell2">
|
<div class="divOrderCell2">
|
||||||
<image class="divOrderImg" src="/static/userui/home/bike.png" />
|
<image class="divOrderImg" :src='imgPath+"static/userui/home/bike.png"' />
|
||||||
<label>骑行:</label>
|
<label>骑行:</label>
|
||||||
<label style="color: #61D246;">{{order.mileage}}</label>
|
<label style="color: #61D246;">{{order.mileage}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="divOderBtn">
|
<div class="divOderBtn">
|
||||||
<image v-if="orderState==0" style="width: 120px;height: 40px;" src="/static/userui/home/lock.png"
|
<image v-if="orderState==0" style="width: 120px;height: 40px;" :src='imgPath+"static/userui/home/lock.png"'
|
||||||
@click="lockRiding" />
|
@click="lockRiding" />
|
||||||
<image v-if="orderState==1" style="width: 120px;height: 40px;" src="/static/userui/home/run.png"
|
<image v-if="orderState==1" style="width: 120px;height: 40px;" :src=' imgPath+"static/userui/home/run.png"'
|
||||||
@click="continueRiding" />
|
@click="continueRiding" />
|
||||||
<image style="width: 160px;height: 40px;" src="/static/userui/home/end.png" @click="endRiding" />
|
<image style="width: 160px;height: 40px;" :src='imgPath+"static/userui/home/end.png"' @click="endRiding" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="showMess!=1" class="divMess">
|
<div v-if="showMess!=1" class="divMess">
|
||||||
<uni-card>
|
<uni-card>
|
||||||
<uni-list border>
|
<uni-list border>
|
||||||
@ -124,8 +123,12 @@
|
|||||||
callOperateApi
|
callOperateApi
|
||||||
} from "@/utils/api.js";
|
} from "@/utils/api.js";
|
||||||
|
|
||||||
import { findIndex } from 'lodash';
|
import {
|
||||||
|
findIndex
|
||||||
|
} from 'lodash';
|
||||||
|
import config from '@/utils/config';
|
||||||
|
|
||||||
|
const imgPath = config.imgPath;
|
||||||
|
|
||||||
const location = ref({
|
const location = ref({
|
||||||
longitude: "",
|
longitude: "",
|
||||||
@ -175,12 +178,20 @@
|
|||||||
longitude
|
longitude
|
||||||
} = res;
|
} = res;
|
||||||
location.value = {
|
location.value = {
|
||||||
longitude:103.975457,latitude:30.633199
|
longitude: 103.975457,
|
||||||
|
latitude: 30.633199
|
||||||
|
};
|
||||||
|
const params = {
|
||||||
|
longitude: 103.975457,
|
||||||
|
latitude: 30.633199
|
||||||
};
|
};
|
||||||
const params={longitude:103.975457,latitude:30.633199};
|
|
||||||
callOrdereApi("userOrders/bikeList", params, "post").then(res => {
|
callOrdereApi("userOrders/bikeList", params, "post").then(res => {
|
||||||
console.log("11111111111111111", "userOrders/bikeList", res);
|
console.log("11111111111111111", "userOrders/bikeList", res);
|
||||||
const{code,data,message}=res;
|
const {
|
||||||
|
code,
|
||||||
|
data,
|
||||||
|
message
|
||||||
|
} = res;
|
||||||
if (code != 200) {
|
if (code != 200) {
|
||||||
showModelMessage(message);
|
showModelMessage(message);
|
||||||
return;
|
return;
|
||||||
@ -188,10 +199,17 @@
|
|||||||
arrBikeData = data || [];
|
arrBikeData = data || [];
|
||||||
const arrData = markers.value || [];
|
const arrData = markers.value || [];
|
||||||
arrBikeData.map((item) => {
|
arrBikeData.map((item) => {
|
||||||
const{longitude,latitude}=item;
|
const {
|
||||||
let index=findIndex(arrData,{longitude,latitude});
|
longitude,
|
||||||
|
latitude
|
||||||
|
} = item;
|
||||||
|
let index = findIndex(arrData, {
|
||||||
|
longitude,
|
||||||
|
latitude
|
||||||
|
});
|
||||||
index = index == -1 ? arrData.length : index;
|
index = index == -1 ? arrData.length : index;
|
||||||
arrData[index]=addMarker(index, longitude, latitude, "mapbike.png",true);
|
arrData[index] = addMarker(index, longitude, latitude, "mapbike.png",
|
||||||
|
true);
|
||||||
})
|
})
|
||||||
markers.value = arrData;
|
markers.value = arrData;
|
||||||
|
|
||||||
@ -220,7 +238,9 @@
|
|||||||
tologin();
|
tologin();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showModelMessage("该功能暂未实现!");
|
uni.navigateTo({
|
||||||
|
url: "/pages/user/login/TroubleReportUser"
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//站点
|
//站点
|
||||||
@ -234,7 +254,9 @@
|
|||||||
tologin();
|
tologin();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showModelMessage("该功能暂未实现!");
|
uni.navigateTo({
|
||||||
|
url: "/pages/user/mine/MePage"
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//扫描
|
//扫描
|
||||||
@ -318,8 +340,7 @@
|
|||||||
completeRiding();
|
completeRiding();
|
||||||
hasOrder.value = true;
|
hasOrder.value = true;
|
||||||
return;
|
return;
|
||||||
}
|
} else if (status != 0) {
|
||||||
else if(status!=0){
|
|
||||||
completeRiding();
|
completeRiding();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -335,7 +356,9 @@
|
|||||||
function getTracking() {
|
function getTracking() {
|
||||||
const {
|
const {
|
||||||
bikeCode,
|
bikeCode,
|
||||||
createdAt,ridePoint, returnPoint
|
createdAt,
|
||||||
|
ridePoint,
|
||||||
|
returnPoint
|
||||||
} = orderData;
|
} = orderData;
|
||||||
const params = {
|
const params = {
|
||||||
ebikeCode: bikeCode,
|
ebikeCode: bikeCode,
|
||||||
@ -376,7 +399,9 @@
|
|||||||
|
|
||||||
const arrMakers = markers.value || [];
|
const arrMakers = markers.value || [];
|
||||||
const id = 10000000;
|
const id = 10000000;
|
||||||
let index=findIndex(arrMakers,{id});
|
let index = findIndex(arrMakers, {
|
||||||
|
id
|
||||||
|
});
|
||||||
index = index == -1 ? arrMakers.length : index;
|
index = index == -1 ? arrMakers.length : index;
|
||||||
arrMakers[index] = addMarker(id, lng, lat, "mapstart.png");
|
arrMakers[index] = addMarker(id, lng, lat, "mapstart.png");
|
||||||
markers.value = arrMakers[index];
|
markers.value = arrMakers[index];
|
||||||
@ -409,13 +434,22 @@
|
|||||||
//结束用车
|
//结束用车
|
||||||
function endRiding() {
|
function endRiding() {
|
||||||
showModelMessage("该功能暂未实现!");
|
showModelMessage("该功能暂未实现!");
|
||||||
const {userId}=oUser;
|
const {
|
||||||
|
userId
|
||||||
|
} = oUser;
|
||||||
const {
|
const {
|
||||||
bikeCode
|
bikeCode
|
||||||
} = orderData;
|
} = orderData;
|
||||||
const params={userId,bikeCode}
|
const params = {
|
||||||
|
userId,
|
||||||
|
bikeCode
|
||||||
|
}
|
||||||
callOrdereApi("userOrders/doneRide", params, "post").then(res => {
|
callOrdereApi("userOrders/doneRide", params, "post").then(res => {
|
||||||
const{code,data,message}=res;
|
const {
|
||||||
|
code,
|
||||||
|
data,
|
||||||
|
message
|
||||||
|
} = res;
|
||||||
console.log("111111111111111111111111", "endRiding", res);
|
console.log("111111111111111111111111", "endRiding", res);
|
||||||
if (code != 200) {
|
if (code != 200) {
|
||||||
showModelMessage(message);
|
showModelMessage(message);
|
||||||
@ -433,6 +467,12 @@
|
|||||||
//getOrder();
|
//getOrder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//查看车辆信息
|
||||||
|
function fnshowBikeInfo() {
|
||||||
|
showModelMessage("该功能暂未实现!");
|
||||||
|
showBikeInfo.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
getLoalcationData();
|
getLoalcationData();
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
const config = {
|
const config = {
|
||||||
apiUrl: "https://attiya.fun/ebike/",
|
apiUrl: "http://192.168.2.156:10010/",
|
||||||
cdnPath: "/",
|
cdnPath: "/",
|
||||||
ERR_OK: 200,
|
ERR_OK: 200,
|
||||||
sm2PublicKey: "04f5084ee12767d932f293508e30e3b0100185042ec0f061dedaf92b793b93f79fd6179d5e47e25b7aec98e00cf90dd56df1f8191012537187e7bbfd2d1de299fc" //f8209a2ebe6691e41e1f2b667bfe71f0b511716cc0f7c4452502fc12ec3957e4
|
sm2PublicKey: "04f5084ee12767d932f293508e30e3b0100185042ec0f061dedaf92b793b93f79fd6179d5e47e25b7aec98e00cf90dd56df1f8191012537187e7bbfd2d1de299fc", //f8209a2ebe6691e41e1f2b667bfe71f0b511716cc0f7c4452502fc12ec3957e4
|
||||||
|
imgPath:"https://attiya.fun/ebike-file/cdn-bucket/maintenance/"
|
||||||
}
|
}
|
||||||
export default config;
|
export default config;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user