no message

This commit is contained in:
PC-202306242200\Administrator
2026-03-28 23:00:29 +08:00
commit 4d06351f6a
2830 changed files with 166480 additions and 0 deletions

View File

@@ -0,0 +1,182 @@
"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_cc_myTabbar2 = common_vendor.resolveComponent("cc-myTabbar");
(_easycom_uni_transition2 + _easycom_orderList2 + _easycom_cc_myTabbar2)();
}
const _easycom_uni_transition = () => "../../uni_modules/uni-transition/components/uni-transition/uni-transition.js";
const _easycom_orderList = () => "../../components/orderList/orderList.js";
const _easycom_cc_myTabbar = () => "../../uni_modules/cc-myTabbar/components/cc-myTabbar/cc-myTabbar.js";
if (!Math) {
(_easycom_uni_transition + _easycom_orderList + _easycom_cc_myTabbar)();
}
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 () => {
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,
distance: item.distance,
customCallout: {
display: "ALWAYS",
// 显示方式
anchorX: 0,
// 锚点X轴
anchorY: -10
// 锚点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") {
common_vendor.index.__f__("log", "at pages/index/index.vue:125", e);
common_vendor.index.__f__("log", "at pages/index/index.vue:126", e.detail.scale);
mapBox.value = false;
mapLocationRefStep(false);
}
};
const markerClick = async (e) => {
var _a;
common_vendor.index.__f__("log", "at pages/index/index.vue:134", e, "eeeeeee");
if (e.markerId == -1) {
return;
}
common_vendor.index.showLoading();
let _res = await api_api.infoAroundApi({
id: e.markerId
});
let markerInfo = markList.value.find((val) => val.id == e.markerId);
let data = (_a = _res == null ? void 0 : _res.priceList) == null ? void 0 : _a.find((val) => val.isCurrent == 1);
infoDz.value = {
..._res,
distance: markerInfo.distance,
priceAmount: data.totalAmount
};
common_vendor.index.__f__("log", "at pages/index/index.vue:153", infoDz, "infoDzinfoDz");
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.f(common_vendor.unref(markList), (item, index, i0) => {
return {
a: common_vendor.t(item.gunUseCount || 0),
b: common_vendor.t(item.gunCount || 0),
c: item.id
};
}),
b: common_assets._imports_0$1,
c: common_vendor.unref(longitude),
d: common_vendor.o(markerClick),
e: common_vendor.o(markerClick),
f: common_vendor.o(regionchange),
g: common_vendor.unref(markList),
h: common_vendor.unref(latitude),
i: common_assets._imports_1$1,
j: common_vendor.o(mapLocation),
k: common_vendor.sr(mapLocationRef, "1a922a9b-0", {
"k": "mapLocationRef"
}),
l: common_vendor.p({
show: true
}),
m: common_vendor.p({
toNav: true,
Image: true,
info: common_vendor.unref(infoDz),
list: common_vendor.unref(infoDz).pictures
}),
n: common_vendor.p({
modeClass: "fade",
show: common_vendor.unref(mapBox)
}),
o: common_vendor.p({
tabBarShow: 1
})
};
};
}
};
wx.createPage(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map

View File

@@ -0,0 +1,9 @@
{
"navigationBarTitleText": "",
"navigationStyle": "custom",
"usingComponents": {
"uni-transition": "../../uni_modules/uni-transition/components/uni-transition/uni-transition",
"order-list": "../../components/orderList/orderList",
"cc-my-tabbar": "../../uni_modules/cc-myTabbar/components/cc-myTabbar/cc-myTabbar"
}
}

View File

@@ -0,0 +1 @@
<view class="content"><map id="map" longitude="{{c}}" bindmarkertap="{{d}}" bindcallouttap="{{e}}" bindregionchange="{{f}}" height="90" width="90" markers="{{g}}" latitude="{{h}}" class="map_content"><cover-view slot="callout"><block wx:for="{{a}}" wx:for-item="item"><cover-view class="callout" marker-id="{{item.c}}"><cover-view class="callout_item"><cover-image class="callout_item_img" src="{{b}}"></cover-image><cover-view class="callout_item_view">闲 {{item.a}}/{{item.b}}</cover-view></cover-view></cover-view></block></cover-view></map><uni-transition wx:if="{{l}}" class="r" u-s="{{['d']}}" u-r="mapLocationRef" u-i="1a922a9b-0" bind:__l="__l" u-p="{{l}}"><view class="map-location" bindtap="{{j}}"><image src="{{i}}" mode="widthFix"></image></view></uni-transition><uni-transition wx:if="{{n}}" u-s="{{['d']}}" u-i="1a922a9b-1" bind:__l="__l" u-p="{{n}}"><view class="map_box"><order-list wx:if="{{m}}" u-i="1a922a9b-2,1a922a9b-1" bind:__l="__l" u-p="{{m}}"/></view></uni-transition><cc-my-tabbar wx:if="{{o}}" u-i="1a922a9b-3" bind:__l="__l" u-p="{{o}}"></cc-my-tabbar></view>

View File

@@ -0,0 +1,74 @@
.map_content {
width: 750rpx;
height: 100vh;
}
.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;
}