This commit is contained in:
cclu 2025-04-18 17:01:02 +08:00
parent 43c98f63ab
commit d1d4334f07
84 changed files with 480 additions and 255 deletions

View File

@ -976,6 +976,7 @@
></view> ></view>
</view> </view>
</uni-popup> </uni-popup>
<CustomLoading :visible="isLoading" />
</view> </view>
</template> </template>
@ -1001,6 +1002,7 @@ export default {
styleType: 2, // 1 2 styleType: 2, // 1 2
currentBan: 0, // currentBan: 0, //
swiperHeight: [], // swiperHeight: [], //
isLoading: false,
}; };
}, },
props: { props: {
@ -1037,12 +1039,14 @@ export default {
type: Number, type: Number,
default: 2, default: 2,
}, },
reload: {
type: Boolean,
default: false,
},
}, },
// //
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
onReady() { onReady() {
console.log("onReady");
console.log("showType", this.showType);
let SERVERPART_TARGET = uni.getStorageSync("SERVERPART_TARGET"); let SERVERPART_TARGET = uni.getStorageSync("SERVERPART_TARGET");
if (SERVERPART_TARGET) { if (SERVERPART_TARGET) {
this.SERVERPART_TARGETOBJ = JSON.parse(SERVERPART_TARGET); this.SERVERPART_TARGETOBJ = JSON.parse(SERVERPART_TARGET);
@ -1052,7 +1056,6 @@ export default {
} }
this.handldGetData(); this.handldGetData();
console.log("pageStyleType", this.pageStyleType);
if (this.pageStyleType === 1) { if (this.pageStyleType === 1) {
this.styleType = 1; this.styleType = 1;
} }
@ -1060,8 +1063,6 @@ export default {
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP-PLUS
mounted() { mounted() {
console.log("onReady");
console.log("showType", this.showType);
if (this.pageStyleType === 1) { if (this.pageStyleType === 1) {
this.styleType = 1; this.styleType = 1;
} }
@ -1077,12 +1078,15 @@ export default {
watch: { watch: {
serviceAreaList: { serviceAreaList: {
handler(newVal) { handler(newVal) {
console.log("serviceAreaList 内容变化:", newVal);
this.handldGetData(); this.handldGetData();
}, },
deep: true, // deep: true, //
immediate: true, // immediate: true, //
}, },
reload: {
handler(newVal) {},
deep: true, //
},
}, },
// #endif // #endif
methods: { methods: {
@ -1091,8 +1095,6 @@ export default {
}, },
// //
handleGoDetail(id, obj) { handleGoDetail(id, obj) {
console.log("this.pageType", this.pageType);
if (this.pageType === "newMap") { if (this.pageType === "newMap") {
let res = this.handleChangeServiceInfo(obj); let res = this.handleChangeServiceInfo(obj);
// let res = { // let res = {
@ -1104,7 +1106,6 @@ export default {
// latitude: obj.SERVERPART_Y // latitude: obj.SERVERPART_Y
// } // }
uni.setStorageSync("currentService", res); // uni.setStorageSync("currentService", res); //
console.log("this.comeForm", this.comeForm);
if (this.comeForm === "home") { if (this.comeForm === "home") {
uni.navigateTo({ url: "/pages/serviceDetail/shopDetail/index" }); uni.navigateTo({ url: "/pages/serviceDetail/shopDetail/index" });
@ -1175,15 +1176,15 @@ export default {
obj[String(item.value)] = item.label; obj[String(item.value)] = item.label;
}); });
} }
console.log("obj", obj);
uni.setStorageSync("SERVERPART_TARGET", JSON.stringify(obj)); uni.setStorageSync("SERVERPART_TARGET", JSON.stringify(obj));
this.SERVERPART_TARGETOBJ = obj; this.SERVERPART_TARGETOBJ = obj;
}, },
async handldGetData() { async handldGetData() {
uni.showLoading({ // uni.showLoading({
title: "加载中...", // title: "...",
}); // });
this.isLoading = true;
// //
let businessReq = { let businessReq = {
action_type: "getCurHalfCollect", action_type: "getCurHalfCollect",
@ -1233,15 +1234,22 @@ export default {
uni.setStorageSync("serviceList", JSON.stringify(serviceList)); 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 _this = this;
let list = []; let list = [];
let nameList = []; let nameList = [];
let serverpartIdList = [];
if (_this.serviceAreaList && _this.serviceAreaList.length > 0) { if (_this.serviceAreaList && _this.serviceAreaList.length > 0) {
_this.serviceAreaList.forEach((item) => { _this.serviceAreaList.forEach((item) => {
nameList.push(item.split("服务区")[0]); nameList.push(item.split("服务区")[0]);
serverpartIdList.push(serverpart[item]);
if (serviceList && serviceList.length > 0) { if (serviceList && serviceList.length > 0) {
serviceList.forEach((subItem) => { serviceList.forEach((subItem) => {
@ -1763,8 +1771,6 @@ export default {
}); });
} }
console.log("_this.serviceAreaList", _this.serviceAreaList);
// key // key
const key = "6e96a801bcea5290d3dcbf100358a6b3"; const key = "6e96a801bcea5290d3dcbf100358a6b3";
// //
@ -1803,8 +1809,6 @@ export default {
res.data.route.paths && res.data.route.paths &&
res.data.route.paths.length > 0 res.data.route.paths.length > 0
) { ) {
console.log("res1", res);
resolve(res.data.route.paths[0] || {}); resolve(res.data.route.paths[0] || {});
} else { } else {
resolve(undefined); resolve(undefined);
@ -1812,8 +1816,6 @@ export default {
}, },
}); });
}); });
console.log("itemEnd", itemEnd);
console.log("res", res);
// if (res) { // if (res) {
// list[i].SERVERPART_DISTANCEGD = ( // list[i].SERVERPART_DISTANCEGD = (
@ -1826,8 +1828,6 @@ export default {
let chargeObj = this.handleHaveRandomData(); let chargeObj = this.handleHaveRandomData();
list[i].chargeObj = chargeObj; list[i].chargeObj = chargeObj;
console.log("item", item);
} }
let LXSum = 0; // let LXSum = 0; //
@ -1894,7 +1894,6 @@ export default {
if (this.showStore) { if (this.showStore) {
list = await this.handleGetListStore(list); list = await this.handleGetListStore(list);
} }
console.log("listasdsadasdas", list);
_this.detailObj = { _this.detailObj = {
// distanceNumber: distance, // distanceNumber: distance,
// hour: timeObj.hourStr, // hour: timeObj.hourStr,
@ -1906,20 +1905,229 @@ export default {
// _this.handleGetChargeData(list, ["", "", ""]); // _this.handleGetChargeData(list, ["", "", ""]);
// //
let newRes = []; let newRes = [];
newRes = await _this.handleGetChargeData(list, nameList); // newRes = await _this.handleGetChargeData(list, nameList);
// // //
newRes = await _this.handleTrafficControlData(newRes, nameList); // newRes = await _this.handleTrafficControlData(newRes, nameList);
// // //
newRes = await _this.handleGetStateGrid(newRes, nameList); // newRes = await _this.handleGetStateGrid(newRes, nameList);
newRes = await _this.handleGetChargeNewData(list, serverpartIdList);
if (this.pageType === "mapIndex") { if (this.pageType === "mapIndex") {
this.$emit("allChargeData", { res: newRes }); this.$emit("allChargeData", { res: newRes });
} }
this.detailObj.servicePart = 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) { async handleGetListStore(list) {
let heightList = []; let heightList = [];
@ -2015,7 +2223,6 @@ export default {
seq: "001", seq: "001",
token: "", token: "",
}); });
console.log("tokenData", tokenData);
// token // token
let token = tokenData.data.Data.AccessToken; let token = tokenData.data.Data.AccessToken;
@ -2030,7 +2237,6 @@ export default {
seq: "002", seq: "002",
token: token, token: token,
}); });
console.log("allStationList", allStationList);
let stationList = allStationList.data.Data.StationInfos; let stationList = allStationList.data.Data.StationInfos;
// 20 20 // 20 20
// //
@ -2042,7 +2248,6 @@ export default {
stationList = stationList.concat(remainData); stationList = stationList.concat(remainData);
} }
console.log("stationList32312312", stationList);
if (this.pageType === "mapIndex") { if (this.pageType === "mapIndex") {
this.$emit("allLXDataList", { res: stationList }); this.$emit("allLXDataList", { res: stationList });
} }
@ -2063,7 +2268,6 @@ export default {
} }
// //
console.log("newStationList", newStationList);
let stationIds = []; let stationIds = [];
// idkey // idkey
@ -2088,7 +2292,6 @@ export default {
token: token, token: token,
}); });
let statusList = stationInfo.data.Data.StationStatusInfos; let statusList = stationInfo.data.Data.StationStatusInfos;
console.log("statusList", statusList);
if (statusList && statusList.length > 0) { if (statusList && statusList.length > 0) {
statusList.forEach((item) => { statusList.forEach((item) => {
if (stationObj[item.StationID]) { if (stationObj[item.StationID]) {
@ -2097,7 +2300,6 @@ export default {
}); });
} }
} }
console.log("stationObj", stationObj);
// //
let haveStationList = []; let haveStationList = [];
@ -2107,8 +2309,6 @@ export default {
} }
} }
console.log("haveStationList", haveStationList);
if (serviceList && serviceList.length > 0) { if (serviceList && serviceList.length > 0) {
let newRes = JSON.parse(JSON.stringify(serviceList)); let newRes = JSON.parse(JSON.stringify(serviceList));
newRes.forEach((item) => { newRes.forEach((item) => {
@ -2206,7 +2406,6 @@ export default {
} }
}); });
console.log("newRes", newRes);
return newRes; return newRes;
// this.detailObj.servicePart = newRes; // this.detailObj.servicePart = newRes;
// this.$forceUpdate(); // this.$forceUpdate();
@ -2279,7 +2478,6 @@ export default {
} }
// //
// console.log("nameList", nameList);
// //
let nowServiceList = []; let nowServiceList = [];
@ -2310,7 +2508,6 @@ export default {
}); });
} }
console.log("nowServiceListssss", nowServiceList);
// nowServiceListssss // nowServiceListssss
// //
if (list && list.length > 0) { if (list && list.length > 0) {
@ -2390,7 +2587,6 @@ export default {
return newRes; return newRes;
// console.log("JKnewRes", newRes);
// this.detailObj.servicePart = newRes; // this.detailObj.servicePart = newRes;
// this.$forceUpdate(); // this.$forceUpdate();
} }
@ -2410,8 +2606,6 @@ export default {
const DataSecret = "fK7YzAq1R8Vp9hL0"; // fK7YzAq1R8Vp9hL0 DataSecret const DataSecret = "fK7YzAq1R8Vp9hL0"; // fK7YzAq1R8Vp9hL0 DataSecret
const DataSecretIV = "z3XnWl8FQ2pTm5Ba"; // z3XnWl8FQ2pTm5Ba DataSecretIV const DataSecretIV = "z3XnWl8FQ2pTm5Ba"; // z3XnWl8FQ2pTm5Ba DataSecretIV
console.log("nameList", nameList);
let newNameList = []; let newNameList = [];
if (nameList && nameList.length > 0) { if (nameList && nameList.length > 0) {
nameList.forEach((item) => { nameList.forEach((item) => {
@ -2429,7 +2623,6 @@ export default {
} }
); );
let newApiRes = JSON.parse(chargeData.data); let newApiRes = JSON.parse(chargeData.data);
console.log("newApiResnewApiResnewApiResnewApiRes", newApiRes);
// let url = `https://dipper.in.ah.cn/jgpt-gateway/third`; // let url = `https://dipper.in.ah.cn/jgpt-gateway/third`;
@ -2443,7 +2636,6 @@ export default {
// seq: "001", // seq: "001",
// token: "", // token: "",
// }); // });
// console.log("", tokenData);
// let token = tokenData.data.Data.AccessToken; // let token = tokenData.data.Data.AccessToken;
// let allStationList = []; // let allStationList = [];
@ -2472,7 +2664,6 @@ export default {
// // // //
// let allStationDataList = allStationList.data.Data.StationInfos; // let allStationDataList = allStationList.data.Data.StationInfos;
// console.log("allStationDataList", allStationDataList);
// //
let allStationDataList = newApiRes.data.StationInfos; let allStationDataList = newApiRes.data.StationInfos;
@ -2506,11 +2697,6 @@ export default {
}); });
} }
console.log(
"newStationListnewStationListnewStationListnewStationList",
newStationList
);
// //
if (list && list.length > 0) { if (list && list.length > 0) {
let newRes = JSON.parse(JSON.stringify(list)); let newRes = JSON.parse(JSON.stringify(list));
@ -2519,7 +2705,6 @@ export default {
let GWInfoList = []; let GWInfoList = [];
let thirdList = []; let thirdList = [];
let sortName = item.SERVERPART_NAME.split("服务区")[0]; let sortName = item.SERVERPART_NAME.split("服务区")[0];
console.log("sortName", sortName);
if (newStationList && newStationList.length > 0) { if (newStationList && newStationList.length > 0) {
newStationList.forEach((subItem) => { newStationList.forEach((subItem) => {
@ -2562,10 +2747,6 @@ export default {
}); });
} }
console.log("thirdList", thirdList);
console.log("GWCharge", GWCharge);
console.log("GWInfoList", GWInfoList);
// //
let GWEmpty = 0; let GWEmpty = 0;
// //
@ -2609,7 +2790,6 @@ export default {
}); });
return newRes; return newRes;
// console.log("GWnewRes", newRes);
// this.detailObj.servicePart = newRes; // this.detailObj.servicePart = newRes;
// this.$forceUpdate(); // this.$forceUpdate();
} }
@ -2631,7 +2811,6 @@ export default {
token: token, token: token,
}) })
.then((res) => { .then((res) => {
console.log("方法外的调用", res);
uni.setStorageSync("GWDataList", res); uni.setStorageSync("GWDataList", res);
}); });
}, },
@ -2669,8 +2848,6 @@ export default {
}, },
// //
handleOpenDetail(obj) { handleOpenDetail(obj) {
console.log("obj", obj);
this.nowCurrentObj = obj; this.nowCurrentObj = obj;
this.chargeDetailList = obj.LXInfoList; this.chargeDetailList = obj.LXInfoList;
@ -2702,7 +2879,6 @@ export default {
}, },
]; ];
console.log("this.chargeDetailList", this.chargeDetailList);
this.$refs.popup.open("bottom"); this.$refs.popup.open("bottom");
this.isShow = true; this.isShow = true;
}, },
@ -2722,8 +2898,6 @@ export default {
}, },
handleChangeSelectPopup(value) { handleChangeSelectPopup(value) {
this.selectPopup = value; this.selectPopup = value;
console.log("value", value);
console.log("this.nowCurrentObj", this.nowCurrentObj);
if (value === 1) { if (value === 1) {
// //
this.chargeDetailList = this.nowCurrentObj.LXInfoList; this.chargeDetailList = this.nowCurrentObj.LXInfoList;
@ -2736,7 +2910,6 @@ export default {
} else { } else {
this.chargeDetailList = []; this.chargeDetailList = [];
} }
console.log("this.chargeDetailList", this.chargeDetailList);
}, },
}, },
}; };
@ -3493,6 +3666,7 @@ export default {
.popupTab { .popupTab {
width: 100%; width: 100%;
height: 56rpx; height: 56rpx;
border-bottom: 1px solid #cecece;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@ -3503,10 +3677,10 @@ export default {
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #716f69; color: #716f69;
line-height: 40rpx; line-height: 50rpx;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
background: #f5f5f5; // background: #f5f5f5;
border-radius: 8rpx; border-radius: 8rpx;
display: flex; display: flex;
align-items: center; align-items: center;
@ -3516,7 +3690,7 @@ export default {
} }
.selectTabItem { .selectTabItem {
background: #f8f4ea; // background: #f8f4ea;
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 600; font-weight: 600;
font-size: 28rpx; font-size: 28rpx;
@ -3524,6 +3698,17 @@ export default {
line-height: 40rpx; line-height: 40rpx;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
position: relative;
}
.selectTabItem::after {
content: "";
width: 2rem;
height: 4rpx;
background: #ba922f;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
} }
} }

View File

@ -2,7 +2,7 @@
<view class="custom-loading" v-if="visible"> <view class="custom-loading" v-if="visible">
<view class="centerContent"> <view class="centerContent">
<image class="loading-icon" src="/static/icon/logotransparent.png" /> <image class="loading-icon" src="/static/icon/logotransparent.png" />
<text class="loading-text">{{ text }}</text> <!-- <text class="loading-text">{{ text }}</text> -->
</view> </view>
</view> </view>
</template> </template>
@ -41,14 +41,14 @@ export default {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background: rgba(0, 0, 0, 0.5); /* background: rgba(0, 0, 0, 0.5); */
border-radius: 18rpx; border-radius: 18rpx;
box-sizing: border-box; box-sizing: border-box;
padding: 16rpx; padding: 16rpx;
} }
.loading-icon { .loading-icon {
width: 50px; width: 60rpx;
height: 50px; height: 60rpx;
animation: spinZ 3s linear infinite; /* 添加旋转动画 */ animation: spinZ 3s linear infinite; /* 添加旋转动画 */
} }
@keyframes spinZ { @keyframes spinZ {

View File

@ -512,7 +512,7 @@
</div> </div>
</div> </div>
<tabbar :page="'/pages/home/index'" /> <tabbar :page="'/pages/home/index'" />
<CustomLoading :visible="isLoading" text="加载中..." /> <CustomLoading :visible="isLoading" :text="loadingText" />
</div> </div>
</template> </template>
<script> <script>
@ -733,6 +733,7 @@ export default {
}, },
], ],
isLoading: false, isLoading: false,
loadingText: "加载中...",
}; };
}, },
computed: { computed: {
@ -1632,9 +1633,11 @@ export default {
// longitude: 117.202392, // longitude: 117.202392,
// latitude: 31.833196, // latitude: 31.833196,
}; };
uni.showLoading({ // uni.showLoading({
title: "查找最近的服务区...", // title: "...",
}); // });
this.isLoading = true;
try { try {
const data = await this.$api.$get( const data = await this.$api.$get(
"/CommercialApi/BaseInfo/GetServerpartList", "/CommercialApi/BaseInfo/GetServerpartList",
@ -1678,7 +1681,11 @@ export default {
this.setprovinceCode(obj.ProvinceCode); this.setprovinceCode(obj.ProvinceCode);
this.setArea(obj); this.setArea(obj);
this.setOwnerUnitId(obj.OwnerUnitId); this.setOwnerUnitId(obj.OwnerUnitId);
uni.hideLoading(); // uni.hideLoading();
// loading
this.isLoading = false;
this.currentServicePart = obj; this.currentServicePart = obj;
this.serverPart = obj; this.serverPart = obj;

View File

@ -221,9 +221,14 @@
</view> </view>
</view> </view>
<scroll-view class="scrollListBox" :scroll-y="true"> <scroll-view
class="scrollListBox"
:scroll-y="true"
@scrolltolower="handleScrollToBottom"
>
<view v-if="showChargeList"> <view v-if="showChargeList">
<charge-box <charge-box
ref="chargeBoxRef"
:serviceAreaList="allServiceNameList" :serviceAreaList="allServiceNameList"
:pageStyleType="1" :pageStyleType="1"
:pageType="'mapList'" :pageType="'mapList'"
@ -236,6 +241,8 @@
<script> <script>
import ChargeBox from "../../components/chargeBox.vue"; import ChargeBox from "../../components/chargeBox.vue";
let systemInfo = uni.getSystemInfoSync();
export default { export default {
components: { ChargeBox }, components: { ChargeBox },
data() { data() {
@ -257,24 +264,23 @@ export default {
isTouchMove: false, // isTouchMove: false, //
loginType: "", loginType: "",
menu: {}, menu: {},
startX: 0, // X startX: 0, // X
startY: 0, // Y startY: 0, // Y
positionX: 16, // X positionX: systemInfo.safeArea.width - 130, // X
positionY: 60, // Y positionY: 180, // Y
isDragging: false, // isDragging: false, //
screenWidth: 0, // screenWidth: 0, //
screenHeight: 0, // screenHeight: 0, //
lastMoveTime: 0, // lastMoveTime: 0, //
lastMoveTime: 0, // lastMoveTime: 0, //
pageIndex: 1,
isHaveMore: false,
isShowAllData: true, // isShowAllData: true, //
}; };
}, },
onLoad() { onLoad() {
let systemInfo = uni.getSystemInfoSync(); let systemInfo = uni.getSystemInfoSync();
console.log("systemInfo", systemInfo);
// this.positionX = systemInfo.safeArea.width - 66; // this.positionX = systemInfo.safeArea.width - 66;
this.screenWidth = systemInfo.safeArea.width; this.screenWidth = systemInfo.safeArea.width;
@ -319,7 +325,6 @@ export default {
this.longitude = this.seatInfo.longitude; this.longitude = this.seatInfo.longitude;
this.latitude = this.seatInfo.latitude; this.latitude = this.seatInfo.latitude;
uni.createMapContext("myMap", this).moveToLocation({ uni.createMapContext("myMap", this).moveToLocation({
longitude: this.longitude, longitude: this.longitude,
latitude: this.latitude, latitude: this.latitude,
@ -394,12 +399,9 @@ export default {
let _this = this; let _this = this;
uni.scanCode({ uni.scanCode({
success: function (res) { success: function (res) {
console.log("条码类型:" + res.scanType);
console.log("条码内容:" + res.result);
let url = res.result; let url = res.result;
if (url.indexOf("lixiang") !== -1) { if (url.indexOf("lixiang") !== -1) {
let obj = _this.getQueryParams(url); let obj = _this.getQueryParams(url);
console.log("obj", obj);
uni.showModal({ uni.showModal({
title: "", title: "",
content: `识别二维码类型为【理想】,确认跳转?`, content: `识别二维码类型为【理想】,确认跳转?`,
@ -449,9 +451,24 @@ export default {
name.push(item.SERVERPART_NAME); name.push(item.SERVERPART_NAME);
}); });
} }
console.log("name", name); let res = JSON.parse(JSON.stringify(name));
this.allServiceNameList = name; this.defaultAllServiceNameList = res;
this.defaultAllServiceNameList = name; 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() { handleChangePageType() {
@ -478,7 +495,7 @@ export default {
req req
); );
let list = data.Result_Data.List; let list = data.Result_Data.List;
console.log("listlistlist", list); this.pageIndex = 1;
let obj = list[0]; let obj = list[0];
if (this.showListPage) { if (this.showListPage) {
this.showChargeList = true; this.showChargeList = true;
@ -548,7 +565,6 @@ export default {
}, },
// //
handleJKAddMarker(e) { handleJKAddMarker(e) {
console.log("交控的全部数据", e);
let stationList = e.res; let stationList = e.res;
let pointList = []; let pointList = [];
@ -586,7 +602,6 @@ export default {
// //
handleGWAddMarker(e) { handleGWAddMarker(e) {
let stationList = e.res.data.Data.StationInfos; let stationList = e.res.data.Data.StationInfos;
console.log("stationList国网国网", stationList);
let pointList = []; let pointList = [];
// //
@ -617,12 +632,10 @@ export default {
} }
}); });
} }
console.log("国网点位", pointList);
this.markers = this.markers.concat(pointList); this.markers = this.markers.concat(pointList);
}, },
// //
handleGetChargeData(e) { handleGetChargeData(e) {
console.log("当前服务区的充电数据", e);
let obj = e.res[0]; let obj = e.res[0];
// e[0] // e[0]
this.chargeData = obj; this.chargeData = obj;
@ -649,17 +662,14 @@ export default {
}, },
// //
handleClickMarker(e) { handleClickMarker(e) {
console.log("e", e);
const clickedMarker = this.markers.find( const clickedMarker = this.markers.find(
(item) => item.id === e.detail.markerId // id (item) => item.id === e.detail.markerId // id
); );
console.log("业务ID:", clickedMarker);
this.showChargeBox = false; this.showChargeBox = false;
const serviceDetail = this.serviceList.find( const serviceDetail = this.serviceList.find(
(item) => item.SERVERPART_ID === Number(clickedMarker.serviceId) // id (item) => item.SERVERPART_ID === Number(clickedMarker.serviceId) // id
); );
console.log("serviceDetail:", serviceDetail);
this.longitude = this.longitude; this.longitude = this.longitude;
this.latitude = this.latitude; this.latitude = this.latitude;
this.currentServiceObj = serviceDetail; this.currentServiceObj = serviceDetail;
@ -850,7 +860,7 @@ export default {
align-items: center; align-items: center;
top: 360rpx; top: 360rpx;
right: 16rpx; right: 16rpx;
z-index: 2; z-index: 1;
.localIcon { .localIcon {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
@ -883,7 +893,7 @@ export default {
// top: 0; // top: 0;
// left: 0; // left: 0;
// left: 0; // left: 0;
z-index: 2; z-index: 1;
.scanIconBox { .scanIconBox {
width: 100rpx; width: 100rpx;

View File

@ -1146,12 +1146,15 @@
</view> </view>
</view> </view>
</view> </view>
<CustomLoading :visible="isLoading" />
</view> </view>
</template> </template>
<script> <script>
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import customLoading from "../../components/customLoading.vue";
export default { export default {
components: { customLoading },
data() { data() {
return { return {
menu: {}, menu: {},
@ -1182,9 +1185,11 @@ export default {
loginType: "", loginType: "",
come: "", // come: "", //
isFirst: true, isFirst: true,
isLoading: false,
}; };
}, },
async onLoad(query) { async onLoad(query) {
this.isLoading = true;
let systemInfo = uni.getSystemInfoSync(); let systemInfo = uni.getSystemInfoSync();
let type = uni.getStorageSync("loginType"); let type = uni.getStorageSync("loginType");
this.loginType = type; this.loginType = type;
@ -1203,8 +1208,11 @@ export default {
await this.handleGetServerpartDetail(this.serverpart); await this.handleGetServerpartDetail(this.serverpart);
await this.handleGetMerchant(); await this.handleGetMerchant();
// this.isLoading = false;
}, },
async onShow() { async onShow() {
this.isLoading = true;
if (this.isFirst) { if (this.isFirst) {
this.isFirst = false; this.isFirst = false;
} else { } else {
@ -1280,9 +1288,9 @@ export default {
longitude: this.seatInfo.longitude, longitude: this.seatInfo.longitude,
excludeProperty: true, excludeProperty: true,
}; };
uni.showLoading({ // uni.showLoading({
title: "加载中...", // title: "...",
}); // });
const data = await this.$api.$get( const data = await this.$api.$get(
"/CommercialApi/BaseInfo/GetServerpartInfo", "/CommercialApi/BaseInfo/GetServerpartInfo",
req req
@ -1487,7 +1495,7 @@ export default {
// //
this.handleGetOilData(); this.handleGetOilData();
uni.hideLoading(); // uni.hideLoading();
}, },
// //
async handleGetOilData() { async handleGetOilData() {
@ -1561,9 +1569,9 @@ export default {
}, },
// //
async handleGetChargeData(name) { async handleGetChargeData(name) {
uni.showLoading({ // uni.showLoading({
title: "查询理想设备信息...", // title: "...",
}); // });
const LiOperatorSecret = "bGMyYwJFl17BqwD3"; const LiOperatorSecret = "bGMyYwJFl17BqwD3";
const LiOperCode = "MA7EBGWBX"; const LiOperCode = "MA7EBGWBX";
@ -1703,7 +1711,7 @@ export default {
LXSum: LXSum, LXSum: LXSum,
}; };
} }
uni.hideLoading(); // uni.hideLoading();
}, },
// //
goSelectServer() { goSelectServer() {
@ -1720,9 +1728,9 @@ export default {
}, },
// //
async handleGetMerchant() { async handleGetMerchant() {
uni.showLoading({ // uni.showLoading({
title: "加载中...", // title: "...",
}); // });
const data = await this.$api.getCoop({ const data = await this.$api.getCoop({
action_type: "GetSellerList", action_type: "GetSellerList",
showSales: 1, showSales: 1,
@ -1737,7 +1745,8 @@ export default {
let list = data.Data.List || []; let list = data.Data.List || [];
console.log("handleGetMerchant", list); console.log("handleGetMerchant", list);
this.merchantList = list; this.merchantList = list;
uni.hideLoading(); // uni.hideLoading();
this.isLoading = false;
}, },
goShop(item) { goShop(item) {
console.log("goShop", item); console.log("goShop", item);

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

File diff suppressed because one or more lines are too long

View File

@ -275,14 +275,14 @@
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background: rgba(0, 0, 0, 0.5); /* background: rgba(0, 0, 0, 0.5); */
border-radius: 18rpx; border-radius: 18rpx;
box-sizing: border-box; box-sizing: border-box;
padding: 16rpx; padding: 16rpx;
} }
.loading-icon { .loading-icon {
width: 50px; width: 60rpx;
height: 50px; height: 60rpx;
-webkit-animation: spinZ 3s linear infinite; -webkit-animation: spinZ 3s linear infinite;
animation: spinZ 3s linear infinite; /* 添加旋转动画 */ animation: spinZ 3s linear infinite; /* 添加旋转动画 */
} }

View File

@ -12342,7 +12342,7 @@ var mpUrl = 'https://eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx'; //
var webUrl = 'https://api.eshangtech.com'; // webapi var webUrl = 'https://api.eshangtech.com'; // webapi
// let webUrl = 'http://192.168.10.125:8900/' // webapi // let webUrl = 'http://192.168.10.125:8900/' // webapi
var staticImagePath = 'https://eshangtech.com/ShopICO'; 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 type = uni.getSystemInfoSync();
var loginType = ''; var loginType = '';
if (type.platform === "android" && type.uniPlatform === "app") { if (type.platform === "android" && type.uniPlatform === "app") {
@ -25851,21 +25851,20 @@ function _handleGetNearService() {
Province_Code: "340000", Province_Code: "340000",
longitude: longitude ? longitude : seatInfo.longitude ? seatInfo.longitude : '', longitude: longitude ? longitude : seatInfo.longitude ? seatInfo.longitude : '',
latitude: latitude ? latitude : seatInfo.latitude ? seatInfo.latitude : '' latitude: latitude ? latitude : seatInfo.latitude ? seatInfo.latitude : ''
}; }; // uni.showLoading({
uni.showLoading({ // title: "查找最近的服务区...",
title: "查找最近的服务区..." // });
}); _context4.next = 4;
_context4.next = 5;
return _this.$api.$get("/CommercialApi/BaseInfo/GetServerpartList", req); return _this.$api.$get("/CommercialApi/BaseInfo/GetServerpartList", req);
case 5: case 4:
data = _context4.sent; data = _context4.sent;
_data = data.Result_Data.List; _data = data.Result_Data.List;
obj = handleChangeServiceInfo(_data[0]); obj = handleChangeServiceInfo(_data[0]);
console.log('publicMethods', obj); console.log('publicMethods', obj);
uni.setStorageSync("currentService", obj); // 当前选中服务区信息 uni.setStorageSync("currentService", obj); // 当前选中服务区信息
uni.hideLoading(); // uni.hideLoading();
return _context4.abrupt("return", obj); return _context4.abrupt("return", obj);
case 12: case 10:
case "end": case "end":
return _context4.stop(); return _context4.stop();
} }

View File

@ -1,4 +1,4 @@
{ {
"component": true, "usingComponents": {},
"usingComponents": {} "component": true
} }

View File

@ -1,4 +1,4 @@
{ {
"component": true, "usingComponents": {},
"usingComponents": {} "component": true
} }

View File

@ -1,4 +1,4 @@
{ {
"component": true, "usingComponents": {},
"usingComponents": {} "component": true
} }

View File

@ -375,7 +375,8 @@ var _default = {
smallNumber: "", smallNumber: "",
oldPrice: "299" oldPrice: "299"
}], }],
isLoading: false isLoading: false,
loadingText: "加载中..."
}; };
}, },
computed: _objectSpread({}, (0, _vuex.mapGetters)({ computed: _objectSpread({}, (0, _vuex.mapGetters)({
@ -1404,11 +1405,11 @@ var _default = {
latitude: latitude latitude: latitude
// longitude: 117.202392, // longitude: 117.202392,
// latitude: 31.833196, // latitude: 31.833196,
}; }; // uni.showLoading({
// title: "查找最近的服务区...",
// });
uni.showLoading({ _this8.isLoading = true;
title: "查找最近的服务区..."
});
_context13.prev = 6; _context13.prev = 6;
_context13.next = 9; _context13.next = 9;
return _this8.$api.$get("/CommercialApi/BaseInfo/GetServerpartList", req); return _this8.$api.$get("/CommercialApi/BaseInfo/GetServerpartList", req);
@ -1448,7 +1449,10 @@ var _default = {
_this8.setprovinceCode(obj.ProvinceCode); _this8.setprovinceCode(obj.ProvinceCode);
_this8.setArea(obj); _this8.setArea(obj);
_this8.setOwnerUnitId(obj.OwnerUnitId); _this8.setOwnerUnitId(obj.OwnerUnitId);
uni.hideLoading(); // uni.hideLoading();
// loading 组件内容
_this8.isLoading = false;
_this8.currentServicePart = obj; _this8.currentServicePart = obj;
_this8.serverPart = obj; _this8.serverPart = obj;

File diff suppressed because one or more lines are too long

View File

@ -198,7 +198,15 @@ var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/r
var _vuex = __webpack_require__(/*! vuex */ 33); 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 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; } 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 = { var _default = {
components: {
customLoading: customLoading
},
data: function data() { data: function data() {
return { return {
menu: {}, menu: {},
@ -248,7 +256,8 @@ var _default = {
loginType: "", loginType: "",
come: "", come: "",
// 来自哪个页面 // 来自哪个页面
isFirst: true isFirst: true,
isLoading: false
}; };
}, },
onLoad: function onLoad(query) { onLoad: function onLoad(query) {
@ -259,6 +268,7 @@ var _default = {
while (1) { while (1) {
switch (_context.prev = _context.next) { switch (_context.prev = _context.next) {
case 0: case 0:
_this.isLoading = true;
systemInfo = uni.getSystemInfoSync(); systemInfo = uni.getSystemInfoSync();
type = uni.getStorageSync("loginType"); type = uni.getStorageSync("loginType");
_this.loginType = type; _this.loginType = type;
@ -274,12 +284,12 @@ var _default = {
if (query.come) { if (query.come) {
_this.come = query.come; _this.come = query.come;
} }
_context.next = 9; _context.next = 10;
return _this.handleGetServerpartDetail(_this.serverpart); return _this.handleGetServerpartDetail(_this.serverpart);
case 9: case 10:
_context.next = 11; _context.next = 12;
return _this.handleGetMerchant(); return _this.handleGetMerchant();
case 11: case 12:
case "end": case "end":
return _context.stop(); return _context.stop();
} }
@ -295,30 +305,31 @@ var _default = {
while (1) { while (1) {
switch (_context2.prev = _context2.next) { switch (_context2.prev = _context2.next) {
case 0: case 0:
_this2.isLoading = true;
if (!_this2.isFirst) { if (!_this2.isFirst) {
_context2.next = 4; _context2.next = 5;
break; break;
} }
_this2.isFirst = false; _this2.isFirst = false;
_context2.next = 14; _context2.next = 15;
break; break;
case 4: case 5:
currentService = uni.getStorageSync("currentService"); currentService = uni.getStorageSync("currentService");
console.log("onShow", currentService); console.log("onShow", currentService);
console.log("serverpart", _this2.serverpart); console.log("serverpart", _this2.serverpart);
console.log("come", _this2.come); console.log("come", _this2.come);
// && this.come !== "chargeBox" // && this.come !== "chargeBox"
if (!(currentService.SERVERPART_ID !== _this2.serverpart)) { if (!(currentService.SERVERPART_ID !== _this2.serverpart)) {
_context2.next = 14; _context2.next = 15;
break; break;
} }
_this2.serverpart = currentService.SERVERPART_ID; _this2.serverpart = currentService.SERVERPART_ID;
_context2.next = 12; _context2.next = 13;
return _this2.handleGetServerpartDetail(_this2.serverpart); return _this2.handleGetServerpartDetail(_this2.serverpart);
case 12: case 13:
_context2.next = 14; _context2.next = 15;
return _this2.handleGetMerchant(); return _this2.handleGetMerchant();
case 14: case 15:
case "end": case "end":
return _context2.stop(); return _context2.stop();
} }
@ -390,13 +401,12 @@ var _default = {
latitude: _this3.seatInfo.latitude, latitude: _this3.seatInfo.latitude,
longitude: _this3.seatInfo.longitude, longitude: _this3.seatInfo.longitude,
excludeProperty: true excludeProperty: true
}; }; // uni.showLoading({
uni.showLoading({ // title: "加载中...",
title: "加载中..." // });
}); _context3.next = 6;
_context3.next = 7;
return _this3.$api.$get("/CommercialApi/BaseInfo/GetServerpartInfo", req); return _this3.$api.$get("/CommercialApi/BaseInfo/GetServerpartInfo", req);
case 7: case 6:
data = _context3.sent; data = _context3.sent;
obj = data.Result_Data; obj = data.Result_Data;
sumObj = { sumObj = {
@ -625,8 +635,9 @@ var _default = {
// 拿到油价的数据 // 拿到油价的数据
_this3.handleGetOilData(); _this3.handleGetOilData();
uni.hideLoading();
case 30: // uni.hideLoading();
case 28:
case "end": case "end":
return _context3.stop(); return _context3.stop();
} }
@ -732,9 +743,9 @@ var _default = {
while (1) { while (1) {
switch (_context5.prev = _context5.next) { switch (_context5.prev = _context5.next) {
case 0: case 0:
uni.showLoading({ // uni.showLoading({
title: "查询理想设备信息..." // title: "查询理想设备信息...",
}); // });
LiOperatorSecret = "bGMyYwJFl17BqwD3"; LiOperatorSecret = "bGMyYwJFl17BqwD3";
LiOperCode = "MA7EBGWBX"; LiOperCode = "MA7EBGWBX";
LiSigSecret = "V7I6yvHvEk8STt0P"; LiSigSecret = "V7I6yvHvEk8STt0P";
@ -745,7 +756,7 @@ var _default = {
SigSecret = "bT8sWn2Aq0Jv6GvD"; // bT8sWn2Aq0Jv6GvD 签名秘钥SigSecret SigSecret = "bT8sWn2Aq0Jv6GvD"; // bT8sWn2Aq0Jv6GvD 签名秘钥SigSecret
DataSecret = "fK7YzAq1R8Vp9hL0"; // fK7YzAq1R8Vp9hL0 数据加密秘钥DataSecret DataSecret = "fK7YzAq1R8Vp9hL0"; // fK7YzAq1R8Vp9hL0 数据加密秘钥DataSecret
DataSecretIV = "z3XnWl8FQ2pTm5Ba"; // z3XnWl8FQ2pTm5Ba 初始化向量DataSecretIV DataSecretIV = "z3XnWl8FQ2pTm5Ba"; // z3XnWl8FQ2pTm5Ba 初始化向量DataSecretIV
_context5.next = 13; _context5.next = 12;
return _this5.$testApi.$post("/send", { return _this5.$testApi.$post("/send", {
url: "https://openapi.chehejia.com/lcp-inter-evio-service/evcs/v1/evio/query_token", url: "https://openapi.chehejia.com/lcp-inter-evio-service/evcs/v1/evio/query_token",
data: JSON.stringify({ data: JSON.stringify({
@ -756,12 +767,12 @@ var _default = {
seq: "001", seq: "001",
token: "" token: ""
}); });
case 13: case 12:
tokenData = _context5.sent; tokenData = _context5.sent;
console.log("tokenData", tokenData); console.log("tokenData", tokenData);
// token的实际值 // token的实际值
token = tokenData.Data.AccessToken; // 拿到所有站点的数据 token = tokenData.Data.AccessToken; // 拿到所有站点的数据
_context5.next = 18; _context5.next = 17;
return _this5.$testApi.$post("/send", { return _this5.$testApi.$post("/send", {
url: "https://openapi.chehejia.com/lcp-inter-evio-service/evcs/v1/evio/query_stations_info", url: "https://openapi.chehejia.com/lcp-inter-evio-service/evcs/v1/evio/query_stations_info",
data: JSON.stringify({ data: JSON.stringify({
@ -772,7 +783,7 @@ var _default = {
seq: "002", seq: "002",
token: token token: token
}); });
case 18: case 17:
allStationList = _context5.sent; allStationList = _context5.sent;
stationList = allStationList.Data.StationInfos; stationList = allStationList.Data.StationInfos;
console.log("stationList", stationList); console.log("stationList", stationList);
@ -800,10 +811,10 @@ var _default = {
// 查询具体状态 // 查询具体状态
if (!(stationIds && stationIds.length > 0)) { if (!(stationIds && stationIds.length > 0)) {
_context5.next = 34; _context5.next = 33;
break; break;
} }
_context5.next = 30; _context5.next = 29;
return _this5.$testApi.$post("/send", { return _this5.$testApi.$post("/send", {
url: "https://openapi.chehejia.com/lcp-inter-evio-service/evcs/v1/evio/query_station_status", url: "https://openapi.chehejia.com/lcp-inter-evio-service/evcs/v1/evio/query_station_status",
data: JSON.stringify({ data: JSON.stringify({
@ -813,7 +824,7 @@ var _default = {
seq: "003", seq: "003",
token: token token: token
}); });
case 30: case 29:
stationInfo = _context5.sent; stationInfo = _context5.sent;
statusList = stationInfo.Data.StationStatusInfos; statusList = stationInfo.Data.StationStatusInfos;
console.log("statusList", statusList); console.log("statusList", statusList);
@ -824,7 +835,7 @@ var _default = {
} }
}); });
} }
case 34: case 33:
console.log("stationObj", stationObj); console.log("stationObj", stationObj);
// 带有状态的充电站列表格式 // 带有状态的充电站列表格式
@ -868,8 +879,8 @@ var _default = {
LXSum: LXSum LXSum: LXSum
}; };
} }
uni.hideLoading(); // uni.hideLoading();
case 42: case 40:
case "end": case "end":
return _context5.stop(); return _context5.stop();
} }
@ -901,10 +912,7 @@ var _default = {
while (1) { while (1) {
switch (_context6.prev = _context6.next) { switch (_context6.prev = _context6.next) {
case 0: case 0:
uni.showLoading({ _context6.next = 2;
title: "加载中..."
});
_context6.next = 3;
return _this6.$api.getCoop({ return _this6.$api.getCoop({
action_type: "GetSellerList", action_type: "GetSellerList",
showSales: 1, showSales: 1,
@ -916,13 +924,14 @@ var _default = {
pageSize: 9999, pageSize: 9999,
pageIndex: 1 pageIndex: 1
}); });
case 3: case 2:
data = _context6.sent; data = _context6.sent;
list = data.Data.List || []; list = data.Data.List || [];
console.log("handleGetMerchant", list); console.log("handleGetMerchant", list);
_this6.merchantList = list; _this6.merchantList = list;
uni.hideLoading(); // uni.hideLoading();
case 8: _this6.isLoading = false;
case 7:
case "end": case "end":
return _context6.stop(); return _context6.stop();
} }

View File

@ -1,5 +1,7 @@
{ {
"navigationBarTitleText": "服务区详情", "navigationBarTitleText": "服务区详情",
"navigationStyle": "custom", "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

View File

@ -10,7 +10,7 @@ let webUrl = 'https://api.eshangtech.com' // webapi
// let webUrl = 'http://192.168.10.125:8900/' // webapi // let webUrl = 'http://192.168.10.125:8900/' // webapi
let staticImagePath = 'https://eshangtech.com/ShopICO' 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 type = uni.getSystemInfoSync();
let loginType = '' let loginType = ''

View File

@ -207,9 +207,9 @@ export async function handleGetNearService(_this, longitude, latitude) {
longitude: longitude ? longitude : seatInfo.longitude ? seatInfo.longitude : '', longitude: longitude ? longitude : seatInfo.longitude ? seatInfo.longitude : '',
latitude: latitude ? latitude : seatInfo.latitude ? seatInfo.latitude : '', latitude: latitude ? latitude : seatInfo.latitude ? seatInfo.latitude : '',
}; };
uni.showLoading({ // uni.showLoading({
title: "查找最近的服务区...", // title: "查找最近的服务区...",
}); // });
const data = await _this.$api.$get( const data = await _this.$api.$get(
"/CommercialApi/BaseInfo/GetServerpartList", "/CommercialApi/BaseInfo/GetServerpartList",
req req
@ -219,7 +219,7 @@ export async function handleGetNearService(_this, longitude, latitude) {
let obj = handleChangeServiceInfo(_data[0]); let obj = handleChangeServiceInfo(_data[0]);
console.log('publicMethods', obj); console.log('publicMethods', obj);
uni.setStorageSync("currentService", obj); // 当前选中服务区信息 uni.setStorageSync("currentService", obj); // 当前选中服务区信息
uni.hideLoading(); // uni.hideLoading();
return obj return obj
} }