no message
This commit is contained in:
75
unpackage/dist/dev/mp-alipay/pages/index/index.acss
vendored
Normal file
75
unpackage/dist/dev/mp-alipay/pages/index/index.acss
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
.map_content {
|
||||
width: 750rpx;
|
||||
height: 100vh;
|
||||
height: calc(100vh - 100rpx);
|
||||
}
|
||||
.map-location {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
left: 30rpx;
|
||||
bottom: 570rpx;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 5px 11px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.map-location image {
|
||||
width: 45rpx;
|
||||
height: 45rpx;
|
||||
}
|
||||
.callout {
|
||||
box-sizing: border-box;
|
||||
background: rgba(15, 75, 203, 0.26);
|
||||
border-radius: 15rpx 15rpx 15rpx 0;
|
||||
padding: 10rpx 15rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: start;
|
||||
}
|
||||
.callout_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: start;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.callout_item_img {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
.callout_item:nth-child(1) {
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
.recharge {
|
||||
width: 690rpx;
|
||||
background-color: #fff;
|
||||
min-height: 300rpx;
|
||||
position: fixed;
|
||||
left: 30rpx;
|
||||
bottom: 250rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
box-shadow: 0 5px 11px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.recharge_title {
|
||||
font-size: 36rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.recharge_con {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.map_box {
|
||||
width: 690rpx;
|
||||
position: fixed;
|
||||
left: 30rpx;
|
||||
bottom: 230rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/pages/index/index.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/pages/index/index.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="content"><map id="map" longitude="{{a}}" onMarkerTap="{{b}}" onCalloutTap="{{c}}" onRegionChange="{{d}}" height="90" width="90" markers="{{e}}" latitude="{{f}}" class="map_content"></map><uni-transition u-s="{{['d']}}" ref="__r" u-r="{{i}}" u-i="1a922a9b-0" onVI="__l" u-p="{{j}}"><view class="map-location" onTap="{{h}}"><image src="{{g}}" mode="widthFix"></image></view></uni-transition><uni-transition u-s="{{['d']}}" u-i="1a922a9b-1" onVI="__l" u-p="{{l}}"><view class="map_box"><order-list u-i="1a922a9b-2,1a922a9b-1" onVI="__l" u-p="{{k}}"/></view></uni-transition><tabbar u-i="1a922a9b-3" onVI="__l" u-p="{{m}}"></tabbar></view>
|
||||
168
unpackage/dist/dev/mp-alipay/pages/index/index.js
vendored
Normal file
168
unpackage/dist/dev/mp-alipay/pages/index/index.js
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
if (!Array) {
|
||||
const _easycom_uni_transition2 = common_vendor.resolveComponent("uni-transition");
|
||||
const _easycom_orderList2 = common_vendor.resolveComponent("orderList");
|
||||
const _easycom_tabbar2 = common_vendor.resolveComponent("tabbar");
|
||||
(_easycom_uni_transition2 + _easycom_orderList2 + _easycom_tabbar2)();
|
||||
}
|
||||
const _easycom_uni_transition = () => "../../uni_modules/uni-transition/components/uni-transition/uni-transition.js";
|
||||
const _easycom_orderList = () => "../../components/orderList/orderList.js";
|
||||
const _easycom_tabbar = () => "../../components/tabbar/tabbar.js";
|
||||
if (!Math) {
|
||||
(_easycom_uni_transition + _easycom_orderList + _easycom_tabbar)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
let longitude = common_vendor.ref(113.675688);
|
||||
let latitude = common_vendor.ref(34.75527700365562);
|
||||
let mapContext = common_vendor.ref(null);
|
||||
let mapBox = common_vendor.ref(false);
|
||||
let mapLocationRef = common_vendor.ref();
|
||||
let infoDz = common_vendor.ref([]);
|
||||
let markList = common_vendor.ref([]);
|
||||
common_vendor.onLoad(async () => {
|
||||
common_vendor.index.hideTabBar();
|
||||
mapContext.value = common_vendor.index.createMapContext("map");
|
||||
const { longitude: lon, latitude: lat } = await common_vendor.index.getLocation({
|
||||
type: "gcj02"
|
||||
// 根据实际需要选择坐标系
|
||||
});
|
||||
latitude.value = lat;
|
||||
longitude.value = lon;
|
||||
getInfo();
|
||||
setTimeout(() => {
|
||||
mapLocation();
|
||||
}, 300);
|
||||
});
|
||||
let getInfo = async () => {
|
||||
let _res = await api_api.aroundAreaMap({
|
||||
orderByType: 1,
|
||||
lat: latitude.value,
|
||||
lon: longitude.value
|
||||
});
|
||||
let list = _res.map((item, index) => {
|
||||
return {
|
||||
id: item.id,
|
||||
longitude: item.location.lng,
|
||||
latitude: item.location.lat,
|
||||
iconPath: "/static/icon/marker-pointer.png",
|
||||
width: 20,
|
||||
height: 23,
|
||||
content: "2",
|
||||
gunUseCount: item.gunUseCount,
|
||||
gunCount: item.gunCount,
|
||||
customCallout: {
|
||||
display: "ALWAYS",
|
||||
// 显示方式
|
||||
anchorX: 60,
|
||||
// 锚点X轴
|
||||
anchorY: 12
|
||||
// 锚点Y轴
|
||||
}
|
||||
};
|
||||
});
|
||||
list.unshift({
|
||||
longitude: longitude.value,
|
||||
latitude: latitude.value,
|
||||
iconPath: "/static/icon/my-location-default.png",
|
||||
width: 45,
|
||||
height: 45,
|
||||
id: -1
|
||||
});
|
||||
markList.value = list;
|
||||
};
|
||||
const mapLocation = () => {
|
||||
const log = longitude.value;
|
||||
const lat = latitude.value;
|
||||
mapContext.value.moveToLocation({
|
||||
longitude: log,
|
||||
latitude: lat
|
||||
});
|
||||
};
|
||||
const regionchange = (e) => {
|
||||
if (e.type == "end") {
|
||||
console.log(e);
|
||||
console.log(e.detail.scale);
|
||||
mapBox.value = false;
|
||||
mapLocationRefStep(false);
|
||||
}
|
||||
};
|
||||
const markerClick = async (e) => {
|
||||
var _a;
|
||||
if (e.markerId == -1) {
|
||||
return;
|
||||
}
|
||||
common_vendor.index.showLoading();
|
||||
let _res = await api_api.infoAroundApi({
|
||||
id: e.markerId
|
||||
});
|
||||
let data = (_a = _res == null ? void 0 : _res.priceList) == null ? void 0 : _a.find((val) => val.isCurrent == 1);
|
||||
infoDz.value = _res;
|
||||
infoDz.value.priceAmount = data.totalAmount;
|
||||
common_vendor.index.hideLoading();
|
||||
mapBox.value = true;
|
||||
mapLocationRefStep(true);
|
||||
};
|
||||
const mapLocationRefStep = (type) => {
|
||||
if (type) {
|
||||
mapLocationRef.value.step(
|
||||
{
|
||||
translateY: "-200rpx"
|
||||
},
|
||||
{
|
||||
timingFunction: "ease-in",
|
||||
duration: 100
|
||||
}
|
||||
);
|
||||
} else {
|
||||
mapLocationRef.value.step(
|
||||
{
|
||||
translateY: "0rpx"
|
||||
},
|
||||
{
|
||||
timingFunction: "ease",
|
||||
duration: 500
|
||||
}
|
||||
);
|
||||
}
|
||||
mapLocationRef.value.run();
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.unref(longitude),
|
||||
b: common_vendor.o(markerClick),
|
||||
c: common_vendor.o(markerClick),
|
||||
d: common_vendor.o(regionchange),
|
||||
e: common_vendor.unref(markList),
|
||||
f: common_vendor.unref(latitude),
|
||||
g: common_assets._imports_0$1,
|
||||
h: common_vendor.o(mapLocation),
|
||||
i: () => ({
|
||||
r: mapLocationRef,
|
||||
k: "mapLocationRef"
|
||||
}),
|
||||
j: common_vendor.p({
|
||||
show: true
|
||||
}),
|
||||
k: common_vendor.p({
|
||||
toNav: true,
|
||||
Image: true,
|
||||
info: common_vendor.unref(infoDz),
|
||||
list: common_vendor.unref(infoDz).pictures
|
||||
}),
|
||||
l: common_vendor.p({
|
||||
modeClass: "fade",
|
||||
show: common_vendor.unref(mapBox)
|
||||
}),
|
||||
m: common_vendor.p({
|
||||
path: "/pages/index/index"
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
my.createPage(_sfc_main);
|
||||
10
unpackage/dist/dev/mp-alipay/pages/index/index.json
vendored
Normal file
10
unpackage/dist/dev/mp-alipay/pages/index/index.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultTitle": "",
|
||||
"transparentTitle": "always",
|
||||
"titlePenetrate": "YES",
|
||||
"usingComponents": {
|
||||
"uni-transition": "../../uni_modules/uni-transition/components/uni-transition/uni-transition",
|
||||
"order-list": "../../components/orderList/orderList",
|
||||
"tabbar": "../../components/tabbar/tabbar"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user