update
This commit is contained in:
parent
43c98f63ab
commit
d1d4334f07
@ -976,6 +976,7 @@
|
||||
></view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<CustomLoading :visible="isLoading" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -1001,6 +1002,7 @@ export default {
|
||||
styleType: 2, // 1 为老款样式 2 为蓝湖新的样式
|
||||
currentBan: 0, // 当前的轮播框 显示内容
|
||||
swiperHeight: [], // 高度数组
|
||||
isLoading: false,
|
||||
};
|
||||
},
|
||||
props: {
|
||||
@ -1037,12 +1039,14 @@ export default {
|
||||
type: Number,
|
||||
default: 2,
|
||||
},
|
||||
reload: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
// 更新内容的时候 看好 有两版内容 样式需要改两个地方 暂时这样 后续可以变为一个
|
||||
// #ifdef MP-WEIXIN
|
||||
onReady() {
|
||||
console.log("onReady");
|
||||
console.log("showType", this.showType);
|
||||
let SERVERPART_TARGET = uni.getStorageSync("SERVERPART_TARGET");
|
||||
if (SERVERPART_TARGET) {
|
||||
this.SERVERPART_TARGETOBJ = JSON.parse(SERVERPART_TARGET);
|
||||
@ -1052,7 +1056,6 @@ export default {
|
||||
}
|
||||
this.handldGetData();
|
||||
|
||||
console.log("pageStyleType", this.pageStyleType);
|
||||
if (this.pageStyleType === 1) {
|
||||
this.styleType = 1;
|
||||
}
|
||||
@ -1060,8 +1063,6 @@ export default {
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
mounted() {
|
||||
console.log("onReady");
|
||||
console.log("showType", this.showType);
|
||||
if (this.pageStyleType === 1) {
|
||||
this.styleType = 1;
|
||||
}
|
||||
@ -1077,12 +1078,15 @@ export default {
|
||||
watch: {
|
||||
serviceAreaList: {
|
||||
handler(newVal) {
|
||||
console.log("serviceAreaList 内容变化:", newVal);
|
||||
this.handldGetData();
|
||||
},
|
||||
deep: true, // 深度监听
|
||||
immediate: true, // 立即触发一次
|
||||
},
|
||||
reload: {
|
||||
handler(newVal) {},
|
||||
deep: true, // 深度监听
|
||||
},
|
||||
},
|
||||
// #endif
|
||||
methods: {
|
||||
@ -1091,8 +1095,6 @@ export default {
|
||||
},
|
||||
// 选择的服务区详情
|
||||
handleGoDetail(id, obj) {
|
||||
console.log("this.pageType", this.pageType);
|
||||
|
||||
if (this.pageType === "newMap") {
|
||||
let res = this.handleChangeServiceInfo(obj);
|
||||
// let res = {
|
||||
@ -1104,7 +1106,6 @@ export default {
|
||||
// latitude: obj.SERVERPART_Y
|
||||
// }
|
||||
uni.setStorageSync("currentService", res); // 当前选中服务区信息
|
||||
console.log("this.comeForm", this.comeForm);
|
||||
|
||||
if (this.comeForm === "home") {
|
||||
uni.navigateTo({ url: "/pages/serviceDetail/shopDetail/index" });
|
||||
@ -1175,15 +1176,15 @@ export default {
|
||||
obj[String(item.value)] = item.label;
|
||||
});
|
||||
}
|
||||
console.log("obj", obj);
|
||||
uni.setStorageSync("SERVERPART_TARGET", JSON.stringify(obj));
|
||||
this.SERVERPART_TARGETOBJ = obj;
|
||||
},
|
||||
async handldGetData() {
|
||||
uni.showLoading({
|
||||
title: "加载中...",
|
||||
});
|
||||
// uni.showLoading({
|
||||
// title: "加载中...",
|
||||
// });
|
||||
|
||||
this.isLoading = true;
|
||||
// 先去请求一下服务区的繁忙度
|
||||
let businessReq = {
|
||||
action_type: "getCurHalfCollect",
|
||||
@ -1233,15 +1234,22 @@ export default {
|
||||
uni.setStorageSync("serviceList", JSON.stringify(serviceList));
|
||||
}
|
||||
|
||||
console.log("serviceList32321321321", serviceList);
|
||||
let serverpart = {};
|
||||
if (serviceList && serviceList.length > 0) {
|
||||
serviceList.forEach((item) => {
|
||||
serverpart[item.SERVERPART_NAME] = item.SERVERPART_ID;
|
||||
});
|
||||
}
|
||||
|
||||
let _this = this;
|
||||
|
||||
let list = [];
|
||||
let nameList = [];
|
||||
let serverpartIdList = [];
|
||||
if (_this.serviceAreaList && _this.serviceAreaList.length > 0) {
|
||||
_this.serviceAreaList.forEach((item) => {
|
||||
nameList.push(item.split("服务区")[0]);
|
||||
serverpartIdList.push(serverpart[item]);
|
||||
|
||||
if (serviceList && serviceList.length > 0) {
|
||||
serviceList.forEach((subItem) => {
|
||||
@ -1763,8 +1771,6 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
console.log("_this.serviceAreaList", _this.serviceAreaList);
|
||||
|
||||
// 高德key
|
||||
const key = "6e96a801bcea5290d3dcbf100358a6b3";
|
||||
// 起点经纬度
|
||||
@ -1803,8 +1809,6 @@ export default {
|
||||
res.data.route.paths &&
|
||||
res.data.route.paths.length > 0
|
||||
) {
|
||||
console.log("res1", res);
|
||||
|
||||
resolve(res.data.route.paths[0] || {});
|
||||
} else {
|
||||
resolve(undefined);
|
||||
@ -1812,8 +1816,6 @@ export default {
|
||||
},
|
||||
});
|
||||
});
|
||||
console.log("itemEnd", itemEnd);
|
||||
console.log("res", res);
|
||||
|
||||
// if (res) {
|
||||
// list[i].SERVERPART_DISTANCEGD = (
|
||||
@ -1826,8 +1828,6 @@ export default {
|
||||
|
||||
let chargeObj = this.handleHaveRandomData();
|
||||
list[i].chargeObj = chargeObj;
|
||||
|
||||
console.log("item", item);
|
||||
}
|
||||
|
||||
let LXSum = 0; // 理想
|
||||
@ -1894,7 +1894,6 @@ export default {
|
||||
if (this.showStore) {
|
||||
list = await this.handleGetListStore(list);
|
||||
}
|
||||
console.log("listasdsadasdas", list);
|
||||
_this.detailObj = {
|
||||
// distanceNumber: distance,
|
||||
// hour: timeObj.hourStr,
|
||||
@ -1906,20 +1905,229 @@ export default {
|
||||
// _this.handleGetChargeData(list, ["新桥", "丰乐", "肥东"]);
|
||||
// 理想
|
||||
let newRes = [];
|
||||
newRes = await _this.handleGetChargeData(list, nameList);
|
||||
// 交控
|
||||
newRes = await _this.handleTrafficControlData(newRes, nameList);
|
||||
// 国网
|
||||
newRes = await _this.handleGetStateGrid(newRes, nameList);
|
||||
// newRes = await _this.handleGetChargeData(list, nameList);
|
||||
// // 交控
|
||||
// newRes = await _this.handleTrafficControlData(newRes, nameList);
|
||||
// // 国网
|
||||
// newRes = await _this.handleGetStateGrid(newRes, nameList);
|
||||
newRes = await _this.handleGetChargeNewData(list, serverpartIdList);
|
||||
|
||||
if (this.pageType === "mapIndex") {
|
||||
this.$emit("allChargeData", { res: newRes });
|
||||
}
|
||||
|
||||
this.detailObj.servicePart = newRes;
|
||||
uni.hideLoading();
|
||||
// uni.hideLoading();
|
||||
this.isLoading = false;
|
||||
},
|
||||
// 新的请求充电的方法
|
||||
async handleGetChargeNewData(serviceList, idList) {
|
||||
const data = await this.$api.$javaPost("/charge/stationinfo/queryByIds", {
|
||||
ids: idList,
|
||||
brands: [],
|
||||
});
|
||||
// 理想
|
||||
let LXData = [];
|
||||
let LXInfoList = [];
|
||||
// 交控
|
||||
let JKData = [];
|
||||
let JKInfoList = [];
|
||||
// 国网
|
||||
let GWData = [];
|
||||
let GWInfoList = [];
|
||||
|
||||
if (data && data.length > 0) {
|
||||
data.forEach((item) => {
|
||||
if (item.brand === "理想") {
|
||||
LXData.push(item);
|
||||
} else if (item.brand === "交控") {
|
||||
JKData.push(item);
|
||||
} else if (item.brand === "国网") {
|
||||
GWData.push(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (serviceList && serviceList.length > 0) {
|
||||
serviceList.forEach((item) => {
|
||||
// 理想
|
||||
let LXRes = [];
|
||||
if (LXData && LXData.length > 0) {
|
||||
let thisServiceRes = LXData.filter(
|
||||
(filterItem) => filterItem.serverpartId === item.SERVERPART_ID
|
||||
);
|
||||
if (thisServiceRes && thisServiceRes.length > 0) {
|
||||
thisServiceRes.forEach((subItem) => {
|
||||
if (subItem.equipments && subItem.equipments.length > 0) {
|
||||
subItem.equipments.forEach((thirdItem) => {
|
||||
if (
|
||||
thirdItem.connectors &&
|
||||
thirdItem.connectors.length > 0
|
||||
) {
|
||||
thirdItem.connectors.forEach((fourthItem) => {
|
||||
LXRes.push(fourthItem);
|
||||
LXInfoList.push({
|
||||
...fourthItem,
|
||||
Status: fourthItem.status,
|
||||
Power: Number(fourthItem.powerMax),
|
||||
ConnectorID: fourthItem.connectorCode,
|
||||
ConnectorType: Number(fourthItem.connectorType),
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// 空多少个
|
||||
let LXEmpty = 0;
|
||||
// 一共多少个
|
||||
let LXSum = 0;
|
||||
if (LXRes && LXRes.length > 0) {
|
||||
LXRes.forEach((subItem) => {
|
||||
if (subItem.status !== 3) {
|
||||
LXEmpty += 1;
|
||||
}
|
||||
LXSum += 1;
|
||||
});
|
||||
}
|
||||
item.LXDetail = {
|
||||
LXSum: LXSum,
|
||||
LXEmpty: LXEmpty,
|
||||
};
|
||||
|
||||
// 交控
|
||||
let JKRes = [];
|
||||
if (JKData && JKData.length > 0) {
|
||||
let thisServiceRes = JKData.filter(
|
||||
(filterItem) => filterItem.serverpartId === item.SERVERPART_ID
|
||||
);
|
||||
if (thisServiceRes && thisServiceRes.length > 0) {
|
||||
thisServiceRes.forEach((subItem) => {
|
||||
if (subItem.equipments && subItem.equipments.length > 0) {
|
||||
subItem.equipments.forEach((thirdItem) => {
|
||||
if (
|
||||
thirdItem.connectors &&
|
||||
thirdItem.connectors.length > 0
|
||||
) {
|
||||
thirdItem.connectors.forEach((fourthItem) => {
|
||||
JKRes.push(fourthItem);
|
||||
JKInfoList.push({
|
||||
...fourthItem,
|
||||
Status: fourthItem.status,
|
||||
Power: Number(fourthItem.powerMax),
|
||||
ConnectorID: fourthItem.connectorCode,
|
||||
ConnectorType: Number(fourthItem.connectorType),
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// 空多少个
|
||||
let JKEmpty = 0;
|
||||
// 一共多少个
|
||||
let JKSum = 0;
|
||||
if (JKRes && JKRes.length > 0) {
|
||||
JKRes.forEach((subItem) => {
|
||||
if (subItem.status !== 3) {
|
||||
JKEmpty += 1;
|
||||
}
|
||||
JKSum += 1;
|
||||
});
|
||||
}
|
||||
item.JKDetail = {
|
||||
JKEmpty: JKEmpty,
|
||||
JKSum: JKSum,
|
||||
};
|
||||
|
||||
// 国网
|
||||
let GWRes = [];
|
||||
if (GWData && GWData.length > 0) {
|
||||
let thisServiceRes = GWData.filter(
|
||||
(filterItem) => filterItem.serverpartId === item.SERVERPART_ID
|
||||
);
|
||||
if (thisServiceRes && thisServiceRes.length > 0) {
|
||||
thisServiceRes.forEach((subItem) => {
|
||||
if (subItem.equipments && subItem.equipments.length > 0) {
|
||||
subItem.equipments.forEach((thirdItem) => {
|
||||
if (
|
||||
thirdItem.connectors &&
|
||||
thirdItem.connectors.length > 0
|
||||
) {
|
||||
thirdItem.connectors.forEach((fourthItem) => {
|
||||
GWRes.push(fourthItem);
|
||||
GWInfoList.push({
|
||||
...fourthItem,
|
||||
Status: fourthItem.status,
|
||||
Power: Number(fourthItem.powerMax),
|
||||
ConnectorID: fourthItem.connectorCode,
|
||||
ConnectorType: Number(fourthItem.connectorType),
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// 空多少个
|
||||
let GWEmpty = 0;
|
||||
// 一共多少个
|
||||
let GWSum = 0;
|
||||
if (GWRes && GWRes.length > 0) {
|
||||
GWRes.forEach((subItem) => {
|
||||
if (subItem.status !== 3) {
|
||||
GWEmpty += 1;
|
||||
}
|
||||
GWSum += 1;
|
||||
});
|
||||
}
|
||||
item.GWDetail = {
|
||||
GWEmpty: GWEmpty,
|
||||
GWSum: GWSum,
|
||||
};
|
||||
|
||||
// 蔚来
|
||||
// 空多少个
|
||||
let WLEmpty = 0;
|
||||
// 一共多少个
|
||||
let WLSum = 0;
|
||||
|
||||
item.WLDetail = {
|
||||
WLEmpty: WLEmpty,
|
||||
WLSum: WLSum,
|
||||
};
|
||||
|
||||
item.allChargeDetail = {
|
||||
allSum:
|
||||
Number(
|
||||
item.LXDetail && item.LXDetail.LXSum ? item.LXDetail.LXSum : 0
|
||||
) +
|
||||
Number(item.WLDetail.WLSum || 0) +
|
||||
Number(item.JKDetail.JKSum || 0) +
|
||||
Number(item.GWDetail.GWSum || 0),
|
||||
empty:
|
||||
Number(
|
||||
item.LXDetail && item.LXDetail.LXEmpty
|
||||
? item.LXDetail.LXEmpty
|
||||
: 0
|
||||
) +
|
||||
Number(item.WLDetail.WLEmpty || 0) +
|
||||
Number(item.JKDetail.JKEmpty || 0) +
|
||||
Number(item.GWDetail.GWEmpty || 0),
|
||||
};
|
||||
|
||||
item.LXInfoList = LXInfoList;
|
||||
item.JKInfoList = JKInfoList;
|
||||
item.GWInfoList = GWInfoList;
|
||||
});
|
||||
}
|
||||
|
||||
return serviceList;
|
||||
},
|
||||
// 给数组加上他的精选商家
|
||||
async handleGetListStore(list) {
|
||||
let heightList = [];
|
||||
@ -2015,7 +2223,6 @@ export default {
|
||||
seq: "001",
|
||||
token: "",
|
||||
});
|
||||
console.log("tokenData", tokenData);
|
||||
// token的实际值
|
||||
let token = tokenData.data.Data.AccessToken;
|
||||
|
||||
@ -2030,7 +2237,6 @@ export default {
|
||||
seq: "002",
|
||||
token: token,
|
||||
});
|
||||
console.log("allStationList", allStationList);
|
||||
let stationList = allStationList.data.Data.StationInfos;
|
||||
// 判断 因为 理想的数据 是一页20个 20个的返回的 所以需要我们去遍历 拿到 他的全部数据
|
||||
// 那么就需要 看看这次有多少页 然后遍历去拿
|
||||
@ -2042,7 +2248,6 @@ export default {
|
||||
stationList = stationList.concat(remainData);
|
||||
}
|
||||
|
||||
console.log("stationList32312312", stationList);
|
||||
if (this.pageType === "mapIndex") {
|
||||
this.$emit("allLXDataList", { res: stationList });
|
||||
}
|
||||
@ -2063,7 +2268,6 @@ export default {
|
||||
}
|
||||
|
||||
// 这段是和自己最近的三个服务区的 理想充电筛出来的数据
|
||||
console.log("newStationList", newStationList);
|
||||
|
||||
let stationIds = [];
|
||||
// 创建吧id当key的对象
|
||||
@ -2088,7 +2292,6 @@ export default {
|
||||
token: token,
|
||||
});
|
||||
let statusList = stationInfo.data.Data.StationStatusInfos;
|
||||
console.log("statusList", statusList);
|
||||
if (statusList && statusList.length > 0) {
|
||||
statusList.forEach((item) => {
|
||||
if (stationObj[item.StationID]) {
|
||||
@ -2097,7 +2300,6 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
console.log("stationObj", stationObj);
|
||||
|
||||
// 带有状态的充电站列表格式
|
||||
let haveStationList = [];
|
||||
@ -2107,8 +2309,6 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
console.log("haveStationList", haveStationList);
|
||||
|
||||
if (serviceList && serviceList.length > 0) {
|
||||
let newRes = JSON.parse(JSON.stringify(serviceList));
|
||||
newRes.forEach((item) => {
|
||||
@ -2206,7 +2406,6 @@ export default {
|
||||
}
|
||||
});
|
||||
|
||||
console.log("newRes", newRes);
|
||||
return newRes;
|
||||
// this.detailObj.servicePart = newRes;
|
||||
// this.$forceUpdate();
|
||||
@ -2279,7 +2478,6 @@ export default {
|
||||
}
|
||||
|
||||
// 拿到现在查询的这几个服务区数据
|
||||
// console.log("nameList", nameList);
|
||||
// 现在查询的几个服务区的数据
|
||||
let nowServiceList = [];
|
||||
|
||||
@ -2310,7 +2508,6 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
console.log("nowServiceListssss", nowServiceList);
|
||||
// nowServiceListssss 就是当前查询的这几个服务区里面的 充电桩数据
|
||||
// 接下来就是将它的数据 放到我们显示的数组里面
|
||||
if (list && list.length > 0) {
|
||||
@ -2390,7 +2587,6 @@ export default {
|
||||
|
||||
return newRes;
|
||||
|
||||
// console.log("JKnewRes", newRes);
|
||||
// this.detailObj.servicePart = newRes;
|
||||
// this.$forceUpdate();
|
||||
}
|
||||
@ -2410,8 +2606,6 @@ export default {
|
||||
const DataSecret = "fK7YzAq1R8Vp9hL0"; // fK7YzAq1R8Vp9hL0 数据加密秘钥(DataSecret)
|
||||
const DataSecretIV = "z3XnWl8FQ2pTm5Ba"; // z3XnWl8FQ2pTm5Ba 初始化向量(DataSecretIV)
|
||||
|
||||
console.log("nameList", nameList);
|
||||
|
||||
let newNameList = [];
|
||||
if (nameList && nameList.length > 0) {
|
||||
nameList.forEach((item) => {
|
||||
@ -2429,7 +2623,6 @@ export default {
|
||||
}
|
||||
);
|
||||
let newApiRes = JSON.parse(chargeData.data);
|
||||
console.log("newApiResnewApiResnewApiResnewApiRes", newApiRes);
|
||||
|
||||
// let url = `https://dipper.in.ah.cn/jgpt-gateway/third`;
|
||||
|
||||
@ -2443,7 +2636,6 @@ export default {
|
||||
// seq: "001",
|
||||
// token: "",
|
||||
// });
|
||||
// console.log("国网", tokenData);
|
||||
// let token = tokenData.data.Data.AccessToken;
|
||||
|
||||
// let allStationList = [];
|
||||
@ -2472,7 +2664,6 @@ export default {
|
||||
|
||||
// // 老的
|
||||
// let allStationDataList = allStationList.data.Data.StationInfos;
|
||||
// console.log("allStationDataList", allStationDataList);
|
||||
|
||||
// 新的
|
||||
let allStationDataList = newApiRes.data.StationInfos;
|
||||
@ -2506,11 +2697,6 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
console.log(
|
||||
"newStationListnewStationListnewStationListnewStationList",
|
||||
newStationList
|
||||
);
|
||||
|
||||
// 当前这几个服务区的全部充电数据 按照服务区分类
|
||||
if (list && list.length > 0) {
|
||||
let newRes = JSON.parse(JSON.stringify(list));
|
||||
@ -2519,7 +2705,6 @@ export default {
|
||||
let GWInfoList = [];
|
||||
let thirdList = [];
|
||||
let sortName = item.SERVERPART_NAME.split("服务区")[0];
|
||||
console.log("sortName", sortName);
|
||||
|
||||
if (newStationList && newStationList.length > 0) {
|
||||
newStationList.forEach((subItem) => {
|
||||
@ -2562,10 +2747,6 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
console.log("thirdList", thirdList);
|
||||
|
||||
console.log("GWCharge", GWCharge);
|
||||
console.log("GWInfoList", GWInfoList);
|
||||
// 空多少个
|
||||
let GWEmpty = 0;
|
||||
// 一共多少个
|
||||
@ -2609,7 +2790,6 @@ export default {
|
||||
});
|
||||
|
||||
return newRes;
|
||||
// console.log("GWnewRes", newRes);
|
||||
// this.detailObj.servicePart = newRes;
|
||||
// this.$forceUpdate();
|
||||
}
|
||||
@ -2631,7 +2811,6 @@ export default {
|
||||
token: token,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("方法外的调用", res);
|
||||
uni.setStorageSync("GWDataList", res);
|
||||
});
|
||||
},
|
||||
@ -2669,8 +2848,6 @@ export default {
|
||||
},
|
||||
// 打开对应的悬浮框
|
||||
handleOpenDetail(obj) {
|
||||
console.log("obj", obj);
|
||||
|
||||
this.nowCurrentObj = obj;
|
||||
this.chargeDetailList = obj.LXInfoList;
|
||||
|
||||
@ -2702,7 +2879,6 @@ export default {
|
||||
},
|
||||
];
|
||||
|
||||
console.log("this.chargeDetailList", this.chargeDetailList);
|
||||
this.$refs.popup.open("bottom");
|
||||
this.isShow = true;
|
||||
},
|
||||
@ -2722,8 +2898,6 @@ export default {
|
||||
},
|
||||
handleChangeSelectPopup(value) {
|
||||
this.selectPopup = value;
|
||||
console.log("value", value);
|
||||
console.log("this.nowCurrentObj", this.nowCurrentObj);
|
||||
if (value === 1) {
|
||||
// 理想
|
||||
this.chargeDetailList = this.nowCurrentObj.LXInfoList;
|
||||
@ -2736,7 +2910,6 @@ export default {
|
||||
} else {
|
||||
this.chargeDetailList = [];
|
||||
}
|
||||
console.log("this.chargeDetailList", this.chargeDetailList);
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -3493,6 +3666,7 @@ export default {
|
||||
.popupTab {
|
||||
width: 100%;
|
||||
height: 56rpx;
|
||||
border-bottom: 1px solid #cecece;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
@ -3503,10 +3677,10 @@ export default {
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #716f69;
|
||||
line-height: 40rpx;
|
||||
line-height: 50rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
background: #f5f5f5;
|
||||
// background: #f5f5f5;
|
||||
border-radius: 8rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -3516,7 +3690,7 @@ export default {
|
||||
}
|
||||
|
||||
.selectTabItem {
|
||||
background: #f8f4ea;
|
||||
// background: #f8f4ea;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
@ -3524,6 +3698,17 @@ export default {
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
position: relative;
|
||||
}
|
||||
.selectTabItem::after {
|
||||
content: "";
|
||||
width: 2rem;
|
||||
height: 4rpx;
|
||||
background: #ba922f;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<view class="custom-loading" v-if="visible">
|
||||
<view class="centerContent">
|
||||
<image class="loading-icon" src="/static/icon/logotransparent.png" />
|
||||
<text class="loading-text">{{ text }}</text>
|
||||
<!-- <text class="loading-text">{{ text }}</text> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -41,14 +41,14 @@ export default {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
/* background: rgba(0, 0, 0, 0.5); */
|
||||
border-radius: 18rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 16rpx;
|
||||
}
|
||||
.loading-icon {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
animation: spinZ 3s linear infinite; /* 添加旋转动画 */
|
||||
}
|
||||
@keyframes spinZ {
|
||||
|
||||
@ -512,7 +512,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<tabbar :page="'/pages/home/index'" />
|
||||
<CustomLoading :visible="isLoading" text="加载中..." />
|
||||
<CustomLoading :visible="isLoading" :text="loadingText" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -733,6 +733,7 @@ export default {
|
||||
},
|
||||
],
|
||||
isLoading: false,
|
||||
loadingText: "加载中...",
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -1632,9 +1633,11 @@ export default {
|
||||
// longitude: 117.202392,
|
||||
// latitude: 31.833196,
|
||||
};
|
||||
uni.showLoading({
|
||||
title: "查找最近的服务区...",
|
||||
});
|
||||
// uni.showLoading({
|
||||
// title: "查找最近的服务区...",
|
||||
// });
|
||||
this.isLoading = true;
|
||||
|
||||
try {
|
||||
const data = await this.$api.$get(
|
||||
"/CommercialApi/BaseInfo/GetServerpartList",
|
||||
@ -1678,7 +1681,11 @@ export default {
|
||||
this.setprovinceCode(obj.ProvinceCode);
|
||||
this.setArea(obj);
|
||||
this.setOwnerUnitId(obj.OwnerUnitId);
|
||||
uni.hideLoading();
|
||||
// uni.hideLoading();
|
||||
|
||||
// loading 组件内容
|
||||
this.isLoading = false;
|
||||
|
||||
this.currentServicePart = obj;
|
||||
this.serverPart = obj;
|
||||
|
||||
|
||||
@ -221,9 +221,14 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view class="scrollListBox" :scroll-y="true">
|
||||
<scroll-view
|
||||
class="scrollListBox"
|
||||
:scroll-y="true"
|
||||
@scrolltolower="handleScrollToBottom"
|
||||
>
|
||||
<view v-if="showChargeList">
|
||||
<charge-box
|
||||
ref="chargeBoxRef"
|
||||
:serviceAreaList="allServiceNameList"
|
||||
:pageStyleType="1"
|
||||
:pageType="'mapList'"
|
||||
@ -236,6 +241,8 @@
|
||||
|
||||
<script>
|
||||
import ChargeBox from "../../components/chargeBox.vue";
|
||||
let systemInfo = uni.getSystemInfoSync();
|
||||
|
||||
export default {
|
||||
components: { ChargeBox },
|
||||
data() {
|
||||
@ -257,24 +264,23 @@ export default {
|
||||
isTouchMove: false, // 用于判断是否开始拖动
|
||||
loginType: "",
|
||||
menu: {},
|
||||
|
||||
startX: 0, // 拖动开始时的 X 坐标
|
||||
startY: 0, // 拖动开始时的 Y 坐标
|
||||
positionX: 16, // 元素当前的 X 坐标
|
||||
positionY: 60, // 元素当前的 Y 坐标
|
||||
positionX: systemInfo.safeArea.width - 130, // 元素当前的 X 坐标
|
||||
positionY: 180, // 元素当前的 Y 坐标
|
||||
isDragging: false, // 是否正在拖动
|
||||
screenWidth: 0, // 屏幕宽度
|
||||
screenHeight: 0, // 屏幕高度
|
||||
lastMoveTime: 0, // 上次移动的时间戳,用于节流
|
||||
lastMoveTime: 0, // 上次移动的时间戳,用于节流
|
||||
|
||||
pageIndex: 1,
|
||||
isHaveMore: false,
|
||||
isShowAllData: true, // 判断是否点击了服务区 没有点击 就显示全部的数据 点击了 就显示单个服务区的具体每个品牌的数据
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
let systemInfo = uni.getSystemInfoSync();
|
||||
|
||||
console.log("systemInfo", systemInfo);
|
||||
// this.positionX = systemInfo.safeArea.width - 66;
|
||||
|
||||
this.screenWidth = systemInfo.safeArea.width;
|
||||
@ -319,7 +325,6 @@ export default {
|
||||
this.longitude = this.seatInfo.longitude;
|
||||
this.latitude = this.seatInfo.latitude;
|
||||
|
||||
|
||||
uni.createMapContext("myMap", this).moveToLocation({
|
||||
longitude: this.longitude,
|
||||
latitude: this.latitude,
|
||||
@ -394,12 +399,9 @@ export default {
|
||||
let _this = this;
|
||||
uni.scanCode({
|
||||
success: function (res) {
|
||||
console.log("条码类型:" + res.scanType);
|
||||
console.log("条码内容:" + res.result);
|
||||
let url = res.result;
|
||||
if (url.indexOf("lixiang") !== -1) {
|
||||
let obj = _this.getQueryParams(url);
|
||||
console.log("obj", obj);
|
||||
uni.showModal({
|
||||
title: "",
|
||||
content: `识别二维码类型为【理想】,确认跳转?`,
|
||||
@ -449,9 +451,24 @@ export default {
|
||||
name.push(item.SERVERPART_NAME);
|
||||
});
|
||||
}
|
||||
console.log("name", name);
|
||||
this.allServiceNameList = name;
|
||||
this.defaultAllServiceNameList = name;
|
||||
let res = JSON.parse(JSON.stringify(name));
|
||||
this.defaultAllServiceNameList = res;
|
||||
this.allServiceNameList = name.splice(0, this.pageIndex * 10 - 1);
|
||||
},
|
||||
// 滚动到底部
|
||||
async handleScrollToBottom() {
|
||||
if (this.isHaveMore) {
|
||||
return;
|
||||
}
|
||||
this.isHaveMore = true;
|
||||
this.pageIndex = this.pageIndex += 1;
|
||||
let res = JSON.parse(JSON.stringify(this.defaultAllServiceNameList));
|
||||
this.allServiceNameList = res.splice(0, this.pageIndex * 10 - 1);
|
||||
|
||||
|
||||
await this.$refs.chargeBoxRef.handldGetData();
|
||||
this.isHaveMore = false;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
// 改变页面显示的内容
|
||||
handleChangePageType() {
|
||||
@ -478,7 +495,7 @@ export default {
|
||||
req
|
||||
);
|
||||
let list = data.Result_Data.List;
|
||||
console.log("listlistlist", list);
|
||||
this.pageIndex = 1;
|
||||
let obj = list[0];
|
||||
if (this.showListPage) {
|
||||
this.showChargeList = true;
|
||||
@ -548,7 +565,6 @@ export default {
|
||||
},
|
||||
// 给交控的充电站标点
|
||||
handleJKAddMarker(e) {
|
||||
console.log("交控的全部数据", e);
|
||||
let stationList = e.res;
|
||||
|
||||
let pointList = [];
|
||||
@ -586,7 +602,6 @@ export default {
|
||||
// 给国网的充电站标点
|
||||
handleGWAddMarker(e) {
|
||||
let stationList = e.res.data.Data.StationInfos;
|
||||
console.log("stationList国网国网", stationList);
|
||||
|
||||
let pointList = [];
|
||||
// 确保一个服务区点位 只用加一个
|
||||
@ -617,12 +632,10 @@ export default {
|
||||
}
|
||||
});
|
||||
}
|
||||
console.log("国网点位", pointList);
|
||||
this.markers = this.markers.concat(pointList);
|
||||
},
|
||||
// 拿到当前服务区的充电数据
|
||||
handleGetChargeData(e) {
|
||||
console.log("当前服务区的充电数据", e);
|
||||
let obj = e.res[0];
|
||||
// 因为只返回一个服务区 所以直接e[0]就可以拿到服务区数据
|
||||
this.chargeData = obj;
|
||||
@ -649,17 +662,14 @@ export default {
|
||||
},
|
||||
// 点击地图上的锚点
|
||||
handleClickMarker(e) {
|
||||
console.log("e", e);
|
||||
const clickedMarker = this.markers.find(
|
||||
(item) => item.id === e.detail.markerId // 用小程序返回的id匹配
|
||||
);
|
||||
console.log("业务ID:", clickedMarker);
|
||||
this.showChargeBox = false;
|
||||
|
||||
const serviceDetail = this.serviceList.find(
|
||||
(item) => item.SERVERPART_ID === Number(clickedMarker.serviceId) // 用小程序返回的id匹配
|
||||
);
|
||||
console.log("serviceDetail:", serviceDetail);
|
||||
this.longitude = this.longitude;
|
||||
this.latitude = this.latitude;
|
||||
this.currentServiceObj = serviceDetail;
|
||||
@ -850,7 +860,7 @@ export default {
|
||||
align-items: center;
|
||||
top: 360rpx;
|
||||
right: 16rpx;
|
||||
z-index: 2;
|
||||
z-index: 1;
|
||||
.localIcon {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
@ -883,7 +893,7 @@ export default {
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
// left: 0;
|
||||
z-index: 2;
|
||||
z-index: 1;
|
||||
|
||||
.scanIconBox {
|
||||
width: 100rpx;
|
||||
|
||||
@ -1146,12 +1146,15 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<CustomLoading :visible="isLoading" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
import customLoading from "../../components/customLoading.vue";
|
||||
export default {
|
||||
components: { customLoading },
|
||||
data() {
|
||||
return {
|
||||
menu: {},
|
||||
@ -1182,9 +1185,11 @@ export default {
|
||||
loginType: "",
|
||||
come: "", // 来自哪个页面
|
||||
isFirst: true,
|
||||
isLoading: false,
|
||||
};
|
||||
},
|
||||
async onLoad(query) {
|
||||
this.isLoading = true;
|
||||
let systemInfo = uni.getSystemInfoSync();
|
||||
let type = uni.getStorageSync("loginType");
|
||||
this.loginType = type;
|
||||
@ -1203,8 +1208,11 @@ export default {
|
||||
|
||||
await this.handleGetServerpartDetail(this.serverpart);
|
||||
await this.handleGetMerchant();
|
||||
|
||||
// this.isLoading = false;
|
||||
},
|
||||
async onShow() {
|
||||
this.isLoading = true;
|
||||
if (this.isFirst) {
|
||||
this.isFirst = false;
|
||||
} else {
|
||||
@ -1280,9 +1288,9 @@ export default {
|
||||
longitude: this.seatInfo.longitude,
|
||||
excludeProperty: true,
|
||||
};
|
||||
uni.showLoading({
|
||||
title: "加载中...",
|
||||
});
|
||||
// uni.showLoading({
|
||||
// title: "加载中...",
|
||||
// });
|
||||
const data = await this.$api.$get(
|
||||
"/CommercialApi/BaseInfo/GetServerpartInfo",
|
||||
req
|
||||
@ -1487,7 +1495,7 @@ export default {
|
||||
// 拿到油价的数据
|
||||
this.handleGetOilData();
|
||||
|
||||
uni.hideLoading();
|
||||
// uni.hideLoading();
|
||||
},
|
||||
// 拿到油价数据
|
||||
async handleGetOilData() {
|
||||
@ -1561,9 +1569,9 @@ export default {
|
||||
},
|
||||
// 拿到充电的理想数据
|
||||
async handleGetChargeData(name) {
|
||||
uni.showLoading({
|
||||
title: "查询理想设备信息...",
|
||||
});
|
||||
// uni.showLoading({
|
||||
// title: "查询理想设备信息...",
|
||||
// });
|
||||
|
||||
const LiOperatorSecret = "bGMyYwJFl17BqwD3";
|
||||
const LiOperCode = "MA7EBGWBX";
|
||||
@ -1703,7 +1711,7 @@ export default {
|
||||
LXSum: LXSum,
|
||||
};
|
||||
}
|
||||
uni.hideLoading();
|
||||
// uni.hideLoading();
|
||||
},
|
||||
// 跳转到选择服务区
|
||||
goSelectServer() {
|
||||
@ -1720,9 +1728,9 @@ export default {
|
||||
},
|
||||
// 拿到精选商家数据
|
||||
async handleGetMerchant() {
|
||||
uni.showLoading({
|
||||
title: "加载中...",
|
||||
});
|
||||
// uni.showLoading({
|
||||
// title: "加载中...",
|
||||
// });
|
||||
const data = await this.$api.getCoop({
|
||||
action_type: "GetSellerList",
|
||||
showSales: 1,
|
||||
@ -1737,7 +1745,8 @@ export default {
|
||||
let list = data.Data.List || [];
|
||||
console.log("handleGetMerchant", list);
|
||||
this.merchantList = list;
|
||||
uni.hideLoading();
|
||||
// uni.hideLoading();
|
||||
this.isLoading = false;
|
||||
},
|
||||
goShop(item) {
|
||||
console.log("goShop", item);
|
||||
|
||||
6
unpackage/dist/build/app-plus/app-service.js
vendored
6
unpackage/dist/build/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
2
unpackage/dist/build/app-plus/app-view.js
vendored
2
unpackage/dist/build/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -275,14 +275,14 @@
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
/* background: rgba(0, 0, 0, 0.5); */
|
||||
border-radius: 18rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 16rpx;
|
||||
}
|
||||
.loading-icon {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
-webkit-animation: spinZ 3s linear infinite;
|
||||
animation: spinZ 3s linear infinite; /* 添加旋转动画 */
|
||||
}
|
||||
|
||||
17
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
17
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
@ -12342,7 +12342,7 @@ var mpUrl = 'https://eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx'; //
|
||||
var webUrl = 'https://api.eshangtech.com'; // webapi
|
||||
// let webUrl = 'http://192.168.10.125:8900/' // webapi
|
||||
var staticImagePath = 'https://eshangtech.com/ShopICO';
|
||||
var javaUrl = "https://admin.es.eshangtech.com";
|
||||
var javaUrl = "https://admin.es.eshangtech.com/prod-api";
|
||||
var type = uni.getSystemInfoSync();
|
||||
var loginType = '';
|
||||
if (type.platform === "android" && type.uniPlatform === "app") {
|
||||
@ -25851,21 +25851,20 @@ function _handleGetNearService() {
|
||||
Province_Code: "340000",
|
||||
longitude: longitude ? longitude : seatInfo.longitude ? seatInfo.longitude : '',
|
||||
latitude: latitude ? latitude : seatInfo.latitude ? seatInfo.latitude : ''
|
||||
};
|
||||
uni.showLoading({
|
||||
title: "查找最近的服务区..."
|
||||
});
|
||||
_context4.next = 5;
|
||||
}; // uni.showLoading({
|
||||
// title: "查找最近的服务区...",
|
||||
// });
|
||||
_context4.next = 4;
|
||||
return _this.$api.$get("/CommercialApi/BaseInfo/GetServerpartList", req);
|
||||
case 5:
|
||||
case 4:
|
||||
data = _context4.sent;
|
||||
_data = data.Result_Data.List;
|
||||
obj = handleChangeServiceInfo(_data[0]);
|
||||
console.log('publicMethods', obj);
|
||||
uni.setStorageSync("currentService", obj); // 当前选中服务区信息
|
||||
uni.hideLoading();
|
||||
// uni.hideLoading();
|
||||
return _context4.abrupt("return", obj);
|
||||
case 12:
|
||||
case 10:
|
||||
case "end":
|
||||
return _context4.stop();
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"component": true
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"component": true
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"component": true
|
||||
}
|
||||
16
unpackage/dist/dev/mp-weixin/pages/home/index.js
vendored
16
unpackage/dist/dev/mp-weixin/pages/home/index.js
vendored
@ -375,7 +375,8 @@ var _default = {
|
||||
smallNumber: "",
|
||||
oldPrice: "299"
|
||||
}],
|
||||
isLoading: false
|
||||
isLoading: false,
|
||||
loadingText: "加载中..."
|
||||
};
|
||||
},
|
||||
computed: _objectSpread({}, (0, _vuex.mapGetters)({
|
||||
@ -1404,11 +1405,11 @@ var _default = {
|
||||
latitude: latitude
|
||||
// longitude: 117.202392,
|
||||
// latitude: 31.833196,
|
||||
};
|
||||
}; // uni.showLoading({
|
||||
// title: "查找最近的服务区...",
|
||||
// });
|
||||
|
||||
uni.showLoading({
|
||||
title: "查找最近的服务区..."
|
||||
});
|
||||
_this8.isLoading = true;
|
||||
_context13.prev = 6;
|
||||
_context13.next = 9;
|
||||
return _this8.$api.$get("/CommercialApi/BaseInfo/GetServerpartList", req);
|
||||
@ -1448,7 +1449,10 @@ var _default = {
|
||||
_this8.setprovinceCode(obj.ProvinceCode);
|
||||
_this8.setArea(obj);
|
||||
_this8.setOwnerUnitId(obj.OwnerUnitId);
|
||||
uni.hideLoading();
|
||||
// uni.hideLoading();
|
||||
|
||||
// loading 组件内容
|
||||
_this8.isLoading = false;
|
||||
_this8.currentServicePart = obj;
|
||||
_this8.serverPart = obj;
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -198,7 +198,15 @@ var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/r
|
||||
var _vuex = __webpack_require__(/*! vuex */ 33);
|
||||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
||||
var customLoading = function customLoading() {
|
||||
__webpack_require__.e(/*! require.ensure | components/customLoading */ "components/customLoading").then((function () {
|
||||
return resolve(__webpack_require__(/*! ../../components/customLoading.vue */ 53));
|
||||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||||
};
|
||||
var _default = {
|
||||
components: {
|
||||
customLoading: customLoading
|
||||
},
|
||||
data: function data() {
|
||||
return {
|
||||
menu: {},
|
||||
@ -248,7 +256,8 @@ var _default = {
|
||||
loginType: "",
|
||||
come: "",
|
||||
// 来自哪个页面
|
||||
isFirst: true
|
||||
isFirst: true,
|
||||
isLoading: false
|
||||
};
|
||||
},
|
||||
onLoad: function onLoad(query) {
|
||||
@ -259,6 +268,7 @@ var _default = {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_this.isLoading = true;
|
||||
systemInfo = uni.getSystemInfoSync();
|
||||
type = uni.getStorageSync("loginType");
|
||||
_this.loginType = type;
|
||||
@ -274,12 +284,12 @@ var _default = {
|
||||
if (query.come) {
|
||||
_this.come = query.come;
|
||||
}
|
||||
_context.next = 9;
|
||||
_context.next = 10;
|
||||
return _this.handleGetServerpartDetail(_this.serverpart);
|
||||
case 9:
|
||||
_context.next = 11;
|
||||
case 10:
|
||||
_context.next = 12;
|
||||
return _this.handleGetMerchant();
|
||||
case 11:
|
||||
case 12:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
@ -295,30 +305,31 @@ var _default = {
|
||||
while (1) {
|
||||
switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
_this2.isLoading = true;
|
||||
if (!_this2.isFirst) {
|
||||
_context2.next = 4;
|
||||
_context2.next = 5;
|
||||
break;
|
||||
}
|
||||
_this2.isFirst = false;
|
||||
_context2.next = 14;
|
||||
_context2.next = 15;
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
currentService = uni.getStorageSync("currentService");
|
||||
console.log("onShow", currentService);
|
||||
console.log("serverpart", _this2.serverpart);
|
||||
console.log("come", _this2.come);
|
||||
// && this.come !== "chargeBox"
|
||||
if (!(currentService.SERVERPART_ID !== _this2.serverpart)) {
|
||||
_context2.next = 14;
|
||||
_context2.next = 15;
|
||||
break;
|
||||
}
|
||||
_this2.serverpart = currentService.SERVERPART_ID;
|
||||
_context2.next = 12;
|
||||
_context2.next = 13;
|
||||
return _this2.handleGetServerpartDetail(_this2.serverpart);
|
||||
case 12:
|
||||
_context2.next = 14;
|
||||
case 13:
|
||||
_context2.next = 15;
|
||||
return _this2.handleGetMerchant();
|
||||
case 14:
|
||||
case 15:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
@ -390,13 +401,12 @@ var _default = {
|
||||
latitude: _this3.seatInfo.latitude,
|
||||
longitude: _this3.seatInfo.longitude,
|
||||
excludeProperty: true
|
||||
};
|
||||
uni.showLoading({
|
||||
title: "加载中..."
|
||||
});
|
||||
_context3.next = 7;
|
||||
}; // uni.showLoading({
|
||||
// title: "加载中...",
|
||||
// });
|
||||
_context3.next = 6;
|
||||
return _this3.$api.$get("/CommercialApi/BaseInfo/GetServerpartInfo", req);
|
||||
case 7:
|
||||
case 6:
|
||||
data = _context3.sent;
|
||||
obj = data.Result_Data;
|
||||
sumObj = {
|
||||
@ -625,8 +635,9 @@ var _default = {
|
||||
|
||||
// 拿到油价的数据
|
||||
_this3.handleGetOilData();
|
||||
uni.hideLoading();
|
||||
case 30:
|
||||
|
||||
// uni.hideLoading();
|
||||
case 28:
|
||||
case "end":
|
||||
return _context3.stop();
|
||||
}
|
||||
@ -732,9 +743,9 @@ var _default = {
|
||||
while (1) {
|
||||
switch (_context5.prev = _context5.next) {
|
||||
case 0:
|
||||
uni.showLoading({
|
||||
title: "查询理想设备信息..."
|
||||
});
|
||||
// uni.showLoading({
|
||||
// title: "查询理想设备信息...",
|
||||
// });
|
||||
LiOperatorSecret = "bGMyYwJFl17BqwD3";
|
||||
LiOperCode = "MA7EBGWBX";
|
||||
LiSigSecret = "V7I6yvHvEk8STt0P";
|
||||
@ -745,7 +756,7 @@ var _default = {
|
||||
SigSecret = "bT8sWn2Aq0Jv6GvD"; // bT8sWn2Aq0Jv6GvD 签名秘钥(SigSecret)
|
||||
DataSecret = "fK7YzAq1R8Vp9hL0"; // fK7YzAq1R8Vp9hL0 数据加密秘钥(DataSecret)
|
||||
DataSecretIV = "z3XnWl8FQ2pTm5Ba"; // z3XnWl8FQ2pTm5Ba 初始化向量(DataSecretIV)
|
||||
_context5.next = 13;
|
||||
_context5.next = 12;
|
||||
return _this5.$testApi.$post("/send", {
|
||||
url: "https://openapi.chehejia.com/lcp-inter-evio-service/evcs/v1/evio/query_token",
|
||||
data: JSON.stringify({
|
||||
@ -756,12 +767,12 @@ var _default = {
|
||||
seq: "001",
|
||||
token: ""
|
||||
});
|
||||
case 13:
|
||||
case 12:
|
||||
tokenData = _context5.sent;
|
||||
console.log("tokenData", tokenData);
|
||||
// token的实际值
|
||||
token = tokenData.Data.AccessToken; // 拿到所有站点的数据
|
||||
_context5.next = 18;
|
||||
_context5.next = 17;
|
||||
return _this5.$testApi.$post("/send", {
|
||||
url: "https://openapi.chehejia.com/lcp-inter-evio-service/evcs/v1/evio/query_stations_info",
|
||||
data: JSON.stringify({
|
||||
@ -772,7 +783,7 @@ var _default = {
|
||||
seq: "002",
|
||||
token: token
|
||||
});
|
||||
case 18:
|
||||
case 17:
|
||||
allStationList = _context5.sent;
|
||||
stationList = allStationList.Data.StationInfos;
|
||||
console.log("stationList", stationList);
|
||||
@ -800,10 +811,10 @@ var _default = {
|
||||
|
||||
// 查询具体状态
|
||||
if (!(stationIds && stationIds.length > 0)) {
|
||||
_context5.next = 34;
|
||||
_context5.next = 33;
|
||||
break;
|
||||
}
|
||||
_context5.next = 30;
|
||||
_context5.next = 29;
|
||||
return _this5.$testApi.$post("/send", {
|
||||
url: "https://openapi.chehejia.com/lcp-inter-evio-service/evcs/v1/evio/query_station_status",
|
||||
data: JSON.stringify({
|
||||
@ -813,7 +824,7 @@ var _default = {
|
||||
seq: "003",
|
||||
token: token
|
||||
});
|
||||
case 30:
|
||||
case 29:
|
||||
stationInfo = _context5.sent;
|
||||
statusList = stationInfo.Data.StationStatusInfos;
|
||||
console.log("statusList", statusList);
|
||||
@ -824,7 +835,7 @@ var _default = {
|
||||
}
|
||||
});
|
||||
}
|
||||
case 34:
|
||||
case 33:
|
||||
console.log("stationObj", stationObj);
|
||||
|
||||
// 带有状态的充电站列表格式
|
||||
@ -868,8 +879,8 @@ var _default = {
|
||||
LXSum: LXSum
|
||||
};
|
||||
}
|
||||
uni.hideLoading();
|
||||
case 42:
|
||||
// uni.hideLoading();
|
||||
case 40:
|
||||
case "end":
|
||||
return _context5.stop();
|
||||
}
|
||||
@ -901,10 +912,7 @@ var _default = {
|
||||
while (1) {
|
||||
switch (_context6.prev = _context6.next) {
|
||||
case 0:
|
||||
uni.showLoading({
|
||||
title: "加载中..."
|
||||
});
|
||||
_context6.next = 3;
|
||||
_context6.next = 2;
|
||||
return _this6.$api.getCoop({
|
||||
action_type: "GetSellerList",
|
||||
showSales: 1,
|
||||
@ -916,13 +924,14 @@ var _default = {
|
||||
pageSize: 9999,
|
||||
pageIndex: 1
|
||||
});
|
||||
case 3:
|
||||
case 2:
|
||||
data = _context6.sent;
|
||||
list = data.Data.List || [];
|
||||
console.log("handleGetMerchant", list);
|
||||
_this6.merchantList = list;
|
||||
uni.hideLoading();
|
||||
case 8:
|
||||
// uni.hideLoading();
|
||||
_this6.isLoading = false;
|
||||
case 7:
|
||||
case "end":
|
||||
return _context6.stop();
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "服务区详情",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {}
|
||||
"usingComponents": {
|
||||
"custom-loading": "/components/customLoading"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -10,7 +10,7 @@ let webUrl = 'https://api.eshangtech.com' // webapi
|
||||
// let webUrl = 'http://192.168.10.125:8900/' // webapi
|
||||
let staticImagePath = 'https://eshangtech.com/ShopICO'
|
||||
|
||||
let javaUrl = `https://admin.es.eshangtech.com`
|
||||
let javaUrl = `https://admin.es.eshangtech.com/prod-api`
|
||||
|
||||
let type = uni.getSystemInfoSync();
|
||||
let loginType = ''
|
||||
|
||||
@ -207,9 +207,9 @@ export async function handleGetNearService(_this, longitude, latitude) {
|
||||
longitude: longitude ? longitude : seatInfo.longitude ? seatInfo.longitude : '',
|
||||
latitude: latitude ? latitude : seatInfo.latitude ? seatInfo.latitude : '',
|
||||
};
|
||||
uni.showLoading({
|
||||
title: "查找最近的服务区...",
|
||||
});
|
||||
// uni.showLoading({
|
||||
// title: "查找最近的服务区...",
|
||||
// });
|
||||
const data = await _this.$api.$get(
|
||||
"/CommercialApi/BaseInfo/GetServerpartList",
|
||||
req
|
||||
@ -219,7 +219,7 @@ export async function handleGetNearService(_this, longitude, latitude) {
|
||||
let obj = handleChangeServiceInfo(_data[0]);
|
||||
console.log('publicMethods', obj);
|
||||
uni.setStorageSync("currentService", obj); // 当前选中服务区信息
|
||||
uni.hideLoading();
|
||||
// uni.hideLoading();
|
||||
return obj
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user