This commit is contained in:
ylj20011123 2025-06-04 17:57:33 +08:00
parent 1e23557f7b
commit 6030eb7626
60 changed files with 100 additions and 228 deletions

View File

@ -494,10 +494,9 @@ export default {
}, },
async onLoad() { async onLoad() {
let stronge = uni.getStorageSync("showIndexPoster"); let stronge = uni.getStorageSync("showIndexPoster");
console.log("stronge", stronge);
// this.$refs.noticeRef.open("center"); // this.$refs.noticeRef.open("center");
if (new Date("2025-05-29 00:00:00").getTime() < new Date().getTime() && new Date("2025-06-05 23:59:59").getTime() > new Date().getTime()) { if (new Date("2025-06-05 00:00:00").getTime() < new Date().getTime() && new Date("2025-06-12 23:59:59").getTime() > new Date().getTime()) {
this.$refs.noticeRef.open("center"); this.$refs.noticeRef.open("center");
let _this = this let _this = this
setTimeout(() => { setTimeout(() => {
@ -510,12 +509,10 @@ export default {
this.menu = uni.getMenuButtonBoundingClientRect(); this.menu = uni.getMenuButtonBoundingClientRect();
let systemInfo = uni.getSystemInfoSync(); let systemInfo = uni.getSystemInfoSync();
console.log("systemInfo", systemInfo);
// //
if (systemInfo.osName === "ios") { if (systemInfo.osName === "ios") {
// let height = systemInfo.safeArea.bottom - systemInfo.safeArea.height; // let height = systemInfo.safeArea.bottom - systemInfo.safeArea.height;
let height = systemInfo.safeAreaInsets.bottom; let height = systemInfo.safeAreaInsets.bottom;
console.log("height", height);
this.safeHeight = Number(height); this.safeHeight = Number(height);
uni.setStorageSync("safeHeight", height); uni.setStorageSync("safeHeight", height);
} }
@ -533,7 +530,6 @@ export default {
} }
let funList = uni.getStorageSync("funList"); let funList = uni.getStorageSync("funList");
if (funList) { if (funList) {
console.log("newFunList", JSON.parse(funList));
let newFunList = JSON.parse(funList); let newFunList = JSON.parse(funList);
if (newFunList && newFunList.length > 0) { if (newFunList && newFunList.length > 0) {
newFunList.forEach((item, index) => { newFunList.forEach((item, index) => {
@ -544,7 +540,6 @@ export default {
} else { } else {
uni.setStorageSync("funList", JSON.stringify(this.funList)); uni.setStorageSync("funList", JSON.stringify(this.funList));
} }
console.log("this.serviceDetail", this.serviceDetail);
// //
this.handleGetHighwayHeadlines(); this.handleGetHighwayHeadlines();
@ -564,14 +559,11 @@ export default {
await this.handleGetServiceDetail(currentService.SERVERPART_ID); await this.handleGetServiceDetail(currentService.SERVERPART_ID);
// this.serviceDetail = currentService; // this.serviceDetail = currentService;
// this.serviceDetail.sumDetail = this.handleMergeDetail(currentService); // this.serviceDetail.sumDetail = this.handleMergeDetail(currentService);
// console.log("this.serviceDetail", this.serviceDetail);
this.handleGetChargingStation(this.serviceDetail); this.handleGetChargingStation(this.serviceDetail);
} }
console.log("onShow", this.user);
let funList = uni.getStorageSync("funList"); let funList = uni.getStorageSync("funList");
if (funList) { if (funList) {
console.log("newFunList", JSON.parse(funList));
let newFunList = JSON.parse(funList); let newFunList = JSON.parse(funList);
if (newFunList && newFunList.length > 0) { if (newFunList && newFunList.length > 0) {
newFunList.forEach((item, index) => { newFunList.forEach((item, index) => {
@ -579,7 +571,6 @@ export default {
}); });
} }
this.funList = newFunList; this.funList = newFunList;
console.log("this.funList", this.funList);
} }
// if (new Date("2025-03-02 8:00:00").getTime() < new Date().getTime()) { // if (new Date("2025-03-02 8:00:00").getTime() < new Date().getTime()) {
@ -595,7 +586,6 @@ export default {
// "https://eshangtech.com/minTestImg/GoddessFestival.png"; // "https://eshangtech.com/minTestImg/GoddessFestival.png";
// } // }
// }); // });
// console.log("fun", fun);
// this.funList = fun; // this.funList = fun;
// this.$forceUpdate(); // this.$forceUpdate();
@ -642,24 +632,17 @@ export default {
type: 'encryption' type: 'encryption'
} }
let str = JSON.stringify(req) let str = JSON.stringify(req)
console.log('strstrstrstrstr', str)
// let jiami = encryptAES(str) // let jiami = encryptAES(str)
// console.log('jiamijiamijiamijiami', jiami)
// let jiemi = decryptAES(jiami) // let jiemi = decryptAES(jiami)
// console.log('jiemijiemijiemijiemijiemi', jiemi)
const data = await this.$api.$zzyLocalPost( const data = await this.$api.$zzyLocalPost(
"/WeChat/ExpressQuery", "/WeChat/ExpressQuery",
req req
); );
console.log('dhsiadhashda', data)
}, },
// //
handleGetNewPosition() { handleGetNewPosition() {
console.log('1231');
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.getLocation({ uni.getLocation({
type: "gcj02", type: "gcj02",
@ -687,15 +670,14 @@ export default {
}, },
// //
async handleReloadFunIndex() { async handleReloadFunIndex() {
console.log('handleReloadFunIndex');
this.triggered = true this.triggered = true
let _this = this let _this = this
const seatInfo = await this.handleGetNewPosition() const seatInfo = await this.handleGetNewPosition()
console.log('seatInfo', seatInfo);
uni.setStorageSync("seatInfo", JSON.stringify(seatInfo)); uni.setStorageSync("seatInfo", JSON.stringify(seatInfo));
uni.setStorageSync("actualLocation", JSON.stringify(seatInfo)); uni.setStorageSync("actualLocation", JSON.stringify(seatInfo));
await _this.handleGetNearService(seatInfo.longitude, seatInfo.latitude) await _this.handleGetNearService(seatInfo.latitude, seatInfo.longitude)
return new Promise((resolve) => { return new Promise((resolve) => {
@ -849,7 +831,6 @@ export default {
url: "https://xny.yciccloud.com/interconnect/api/interconnection/open/getConnectList", // url: "https://xny.yciccloud.com/interconnect/api/interconnection/open/getConnectList", //
method: "POST", method: "POST",
success: (res) => { success: (res) => {
console.log("查询现在的充电桩", res.data);
let list = res.data; let list = res.data;
let result = []; let result = [];
if (list && list.length > 0) { if (list && list.length > 0) {
@ -868,8 +849,6 @@ export default {
} }
}); });
} }
console.log("result", result);
console.log("obj", obj);
let sum = 0; let sum = 0;
let have = 0; let have = 0;
let use = 0; let use = 0;
@ -881,24 +860,20 @@ export default {
} }
}); });
} }
console.log("sum", sum);
if (sum > 0) { if (sum > 0) {
use = sum; use = sum;
if (obj.sumDetail.STATEGRIDCHARGE > 0) { if (obj.sumDetail.STATEGRIDCHARGE > 0) {
console.log("1");
if (obj.sumDetail.STATEGRIDCHARGE < result.length) { if (obj.sumDetail.STATEGRIDCHARGE < result.length) {
have = result.length; have = result.length;
} else { } else {
have = obj.sumDetail.STATEGRIDCHARGE; have = obj.sumDetail.STATEGRIDCHARGE;
} }
} else { } else {
console.log("2");
have = result.length; have = result.length;
} }
} else { } else {
have = obj.sumDetail.LIVESTOCKPACKING; have = obj.sumDetail.LIVESTOCKPACKING;
let rank = Number(uni.getStorageSync("rankNumber")); let rank = Number(uni.getStorageSync("rankNumber"));
console.log("rank", rank);
if (rank > 0) { if (rank > 0) {
} else { } else {
rank = Math.random() * (0.7 - 0.5) + 0.5; rank = Math.random() * (0.7 - 0.5) + 0.5;
@ -910,8 +885,6 @@ export default {
have: have, have: have,
use: use, use: use,
}; };
console.log("_this.chargingObj", _this.chargingObj);
_this.$forceUpdate(); _this.$forceUpdate();
}, },
}); });
@ -931,10 +904,8 @@ export default {
req req
); );
let obj = data.Result_Data; let obj = data.Result_Data;
console.log("detail", obj);
this.serviceDetail = obj; this.serviceDetail = obj;
this.serviceDetail.sumDetail = this.handleMergeDetail(obj); this.serviceDetail.sumDetail = this.handleMergeDetail(obj);
console.log("this.serviceDetail", this.serviceDetail);
}, },
// //
handleShowPreview(obj) { handleShowPreview(obj) {
@ -962,7 +933,6 @@ export default {
}, },
// //
handleFunClick(obj) { handleFunClick(obj) {
console.log("obj", obj);
// //
if (obj.value === 1) { if (obj.value === 1) {
uni.navigateTo({ uni.navigateTo({
@ -1050,16 +1020,12 @@ export default {
// //
uni.scanCode({ uni.scanCode({
success: function (res) { success: function (res) {
console.log("条码类型:" + res.scanType);
console.log("条码内容:" + res.result);
}, },
}); });
} else if (obj.value === 14) { } else if (obj.value === 14) {
// 尿 // 尿
uni.scanCode({ uni.scanCode({
success: function (res) { success: function (res) {
console.log("条码类型:" + res.scanType);
console.log("条码内容:" + res.result);
}, },
}); });
} else if (obj.value === 15) { } else if (obj.value === 15) {
@ -1101,7 +1067,6 @@ export default {
uni.navigateTo({ url: "/pages/newMap/index/index?comeForm=home" }); uni.navigateTo({ url: "/pages/newMap/index/index?comeForm=home" });
}, },
getLocalServer() { getLocalServer() {
console.log("getLocation");
// //
let _this = this; let _this = this;
@ -1109,7 +1074,6 @@ export default {
type: "gcj02", type: "gcj02",
altitude: true, altitude: true,
success: (res) => { success: (res) => {
console.log("rewrwqerwq", res);
let seatInfo = { let seatInfo = {
latitude: res.latitude, latitude: res.latitude,
longitude: res.longitude, longitude: res.longitude,
@ -1117,15 +1081,12 @@ export default {
uni.setStorageSync("seatInfo", JSON.stringify(seatInfo)); uni.setStorageSync("seatInfo", JSON.stringify(seatInfo));
uni.setStorageSync("actualLocation", JSON.stringify(seatInfo)); uni.setStorageSync("actualLocation", JSON.stringify(seatInfo));
_this.seat = seatInfo; _this.seat = seatInfo;
console.log("1");
let latitude = res.latitude; let latitude = res.latitude;
let longitude = res.longitude; let longitude = res.longitude;
console.log("2");
_this.handleGetNearService(latitude, longitude); _this.handleGetNearService(latitude, longitude);
}, },
fail: (err) => { fail: (err) => {
console.log("err", err);
}, },
}); });
}, },
@ -1249,7 +1210,6 @@ export default {
showservice: true, showservice: true,
appId: "wxee018fb96955552a", appId: "wxee018fb96955552a",
}; };
console.log("handleGetNearService", req);
uni.showLoading({ uni.showLoading({
title: "查找最近的服务区...", title: "查找最近的服务区...",
}); });
@ -1260,13 +1220,11 @@ export default {
const data = await this.$api.$javaGet('/third-party/getServerPartList', req) const data = await this.$api.$javaGet('/third-party/getServerPartList', req)
this.serverPartList = data.Result_Data.List; this.serverPartList = data.Result_Data.List;
console.log("this.serverPartList", this.serverPartList);
let nearService = this.serverPartList[0]; let nearService = this.serverPartList[0];
nearService.sumDetail = this.handleMergeDetail(nearService); nearService.sumDetail = this.handleMergeDetail(nearService);
this.serviceDetail = nearService; this.serviceDetail = nearService;
uni.setStorageSync("currentService", nearService); uni.setStorageSync("currentService", nearService);
console.log("serviceDetail", this.serviceDetail);
let idList = [1212, 1222, 1139, 1215]; let idList = [1212, 1222, 1139, 1215];
if (idList.indexOf(nearService.SERVERPART_ID) !== -1) { if (idList.indexOf(nearService.SERVERPART_ID) !== -1) {
@ -1299,8 +1257,6 @@ export default {
sign_type: "RSA2", sign_type: "RSA2",
}; };
let signText = `app_id=${req.app_id}&biz_content=${req.biz_content}&charset=UTF-8&pid=${req.app_id}&service=trawe.eats.etc&utc_timestamp=${req.utc_timestamp}&version=1.0`; let signText = `app_id=${req.app_id}&biz_content=${req.biz_content}&charset=UTF-8&pid=${req.app_id}&service=trawe.eats.etc&utc_timestamp=${req.utc_timestamp}&version=1.0`;
console.log("handleGetHighwayHeadlines", req);
console.log("signText", signText);
// //
const sign = await new Promise((resolve, reject) => { const sign = await new Promise((resolve, reject) => {
@ -1316,12 +1272,10 @@ export default {
"content-type": "application/json", "content-type": "application/json",
}, },
success(res) { success(res) {
console.log("resresresresresresres", res);
resolve(res.data.data); resolve(res.data.data);
}, },
}); });
}); });
console.log("sign", sign);
req.sign = sign; req.sign = sign;
@ -1335,10 +1289,6 @@ export default {
"content-type": "application/x-www-form-urlencoded", "content-type": "application/x-www-form-urlencoded",
}, },
success(res) { success(res) {
console.log(
"resresresresresresresresres",
res
);
if (res.data.response.data) { if (res.data.response.data) {
resolve(res.data.response.data.data.tweets); resolve(res.data.response.data.data.tweets);
} else { } else {
@ -1354,7 +1304,6 @@ export default {
}); });
}); });
console.log("tweetsData", tweetsData);
// if (tweetsData && tweetsData.length > 0) { // if (tweetsData && tweetsData.length > 0) {
// this.roadStatusList = tweetsData; // this.roadStatusList = tweetsData;
// } else { // } else {
@ -1376,7 +1325,6 @@ export default {
newReq newReq
); );
let list = newData.Result_Data.List; let list = newData.Result_Data.List;
console.log("handleGetHighwayHeadlines", list);
// if (list && list.length > 0) { // if (list && list.length > 0) {
// } else { // } else {
@ -1405,7 +1353,6 @@ export default {
excludeNature: 5070, excludeNature: 5070,
justCommodity: 1, justCommodity: 1,
}); });
console.log("handleGetSpecialOffers", data);
let list = data.Data.List; let list = data.Data.List;
let shopList = []; let shopList = [];
if (list && list.length > 0) { if (list && list.length > 0) {
@ -1417,7 +1364,6 @@ export default {
} }
}); });
} }
console.log("特价优惠", shopList);
if (shopList && shopList.length > 0) { if (shopList && shopList.length > 0) {
this.specialOffersList = shopList.slice(0, 2); this.specialOffersList = shopList.slice(0, 2);
} else { } else {
@ -1451,7 +1397,6 @@ export default {
} else { } else {
this.productsList = []; this.productsList = [];
} }
console.log("甄选商品", list);
}, },
// 3000 // 3000
async handleGetShoppingMall() { async handleGetShoppingMall() {
@ -1496,7 +1441,6 @@ export default {
}); });
} }
this.shoppingMall = shopList; this.shoppingMall = shopList;
console.log("商城精选", shopList);
}, },
// //
handleGoMap() { handleGoMap() {
@ -1507,16 +1451,13 @@ export default {
name: this.serviceDetail.SERVERPART_NAME, name: this.serviceDetail.SERVERPART_NAME,
// address: "", // // address: "", //
success(data) { success(data) {
console.log(data);
}, },
fail(err) { fail(err) {
console.log(err);
}, },
}); });
}, },
// //
handleGoShopDetail(obj) { handleGoShopDetail(obj) {
console.log("obj", obj);
uni.navigateTo({ uni.navigateTo({
url: `/pages/shopPages/shopDetail/index?id=${obj.COMMODITY_ID}`, url: `/pages/shopPages/shopDetail/index?id=${obj.COMMODITY_ID}`,
}); });

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

@ -365,11 +365,8 @@ var _default = {
while (1) { while (1) {
switch (_context.prev = _context.next) { switch (_context.prev = _context.next) {
case 0: case 0:
stronge = uni.getStorageSync("showIndexPoster"); stronge = uni.getStorageSync("showIndexPoster"); // this.$refs.noticeRef.open("center");
console.log("stronge", stronge); if (new Date("2025-06-05 00:00:00").getTime() < new Date().getTime() && new Date("2025-06-12 23:59:59").getTime() > new Date().getTime()) {
// this.$refs.noticeRef.open("center");
if (new Date("2025-05-29 00:00:00").getTime() < new Date().getTime() && new Date("2025-06-05 23:59:59").getTime() > new Date().getTime()) {
_this2.$refs.noticeRef.open("center"); _this2.$refs.noticeRef.open("center");
_this = _this2; _this = _this2;
setTimeout(function () { setTimeout(function () {
@ -379,13 +376,10 @@ var _default = {
_this2.showPoster = false; _this2.showPoster = false;
} }
_this2.menu = uni.getMenuButtonBoundingClientRect(); _this2.menu = uni.getMenuButtonBoundingClientRect();
systemInfo = uni.getSystemInfoSync(); systemInfo = uni.getSystemInfoSync(); // 判断如果是苹果手机 那么把它底部的安全距离存起来
console.log("systemInfo", systemInfo);
// 判断如果是苹果手机 那么把它底部的安全距离存起来
if (systemInfo.osName === "ios") { if (systemInfo.osName === "ios") {
// let height = systemInfo.safeArea.bottom - systemInfo.safeArea.height; // let height = systemInfo.safeArea.bottom - systemInfo.safeArea.height;
height = systemInfo.safeAreaInsets.bottom; height = systemInfo.safeAreaInsets.bottom;
console.log("height", height);
_this2.safeHeight = Number(height); _this2.safeHeight = Number(height);
uni.setStorageSync("safeHeight", height); uni.setStorageSync("safeHeight", height);
} }
@ -402,7 +396,6 @@ var _default = {
} }
funList = uni.getStorageSync("funList"); funList = uni.getStorageSync("funList");
if (funList) { if (funList) {
console.log("newFunList", JSON.parse(funList));
newFunList = JSON.parse(funList); newFunList = JSON.parse(funList);
if (newFunList && newFunList.length > 0) { if (newFunList && newFunList.length > 0) {
newFunList.forEach(function (item, index) { newFunList.forEach(function (item, index) {
@ -413,7 +406,6 @@ var _default = {
} else { } else {
uni.setStorageSync("funList", JSON.stringify(_this2.funList)); uni.setStorageSync("funList", JSON.stringify(_this2.funList));
} }
console.log("this.serviceDetail", _this2.serviceDetail);
// 高速头条播报 // 高速头条播报
_this2.handleGetHighwayHeadlines(); _this2.handleGetHighwayHeadlines();
@ -426,7 +418,7 @@ var _default = {
// this.handleAes() // this.handleAes()
_this2.$utils.addUserBehaviorNew(); _this2.$utils.addUserBehaviorNew();
case 19: case 16:
case "end": case "end":
return _context.stop(); return _context.stop();
} }
@ -452,13 +444,10 @@ var _default = {
case 4: case 4:
// this.serviceDetail = currentService; // this.serviceDetail = currentService;
// this.serviceDetail.sumDetail = this.handleMergeDetail(currentService); // this.serviceDetail.sumDetail = this.handleMergeDetail(currentService);
// console.log("this.serviceDetail", this.serviceDetail);
_this3.handleGetChargingStation(_this3.serviceDetail); _this3.handleGetChargingStation(_this3.serviceDetail);
case 5: case 5:
console.log("onShow", _this3.user);
funList = uni.getStorageSync("funList"); funList = uni.getStorageSync("funList");
if (funList) { if (funList) {
console.log("newFunList", JSON.parse(funList));
newFunList = JSON.parse(funList); newFunList = JSON.parse(funList);
if (newFunList && newFunList.length > 0) { if (newFunList && newFunList.length > 0) {
newFunList.forEach(function (item, index) { newFunList.forEach(function (item, index) {
@ -466,7 +455,6 @@ var _default = {
}); });
} }
_this3.funList = newFunList; _this3.funList = newFunList;
console.log("this.funList", _this3.funList);
} }
// if (new Date("2025-03-02 8:00:00").getTime() < new Date().getTime()) { // if (new Date("2025-03-02 8:00:00").getTime() < new Date().getTime()) {
@ -482,12 +470,11 @@ var _default = {
// "https://eshangtech.com/minTestImg/GoddessFestival.png"; // "https://eshangtech.com/minTestImg/GoddessFestival.png";
// } // }
// }); // });
// console.log("fun", fun);
// this.funList = fun; // this.funList = fun;
// this.$forceUpdate(); // this.$forceUpdate();
// } // }
case 8: case 7:
case "end": case "end":
return _context2.stop(); return _context2.stop();
} }
@ -556,19 +543,13 @@ var _default = {
mobile: "15558136957", mobile: "15558136957",
type: 'encryption' type: 'encryption'
}; };
str = JSON.stringify(req); str = JSON.stringify(req); // let jiami = encryptAES(str)
console.log('strstrstrstrstr', str);
// let jiami = encryptAES(str)
// console.log('jiamijiamijiamijiami', jiami)
// let jiemi = decryptAES(jiami) // let jiemi = decryptAES(jiami)
// console.log('jiemijiemijiemijiemijiemi', jiemi) _context4.next = 4;
_context4.next = 5;
return _this5.$api.$zzyLocalPost("/WeChat/ExpressQuery", req); return _this5.$api.$zzyLocalPost("/WeChat/ExpressQuery", req);
case 5: case 4:
data = _context4.sent; data = _context4.sent;
console.log('dhsiadhashda', data); case 5:
case 7:
case "end": case "end":
return _context4.stop(); return _context4.stop();
} }
@ -578,7 +559,6 @@ var _default = {
}, },
// 重新获取经纬度位置 // 重新获取经纬度位置
handleGetNewPosition: function handleGetNewPosition() { handleGetNewPosition: function handleGetNewPosition() {
console.log('1231');
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
uni.getLocation({ uni.getLocation({
type: "gcj02", type: "gcj02",
@ -624,19 +604,17 @@ var _default = {
while (1) { while (1) {
switch (_context6.prev = _context6.next) { switch (_context6.prev = _context6.next) {
case 0: case 0:
console.log('handleReloadFunIndex');
_this6.triggered = true; _this6.triggered = true;
_this = _this6; _this = _this6;
_context6.next = 5; _context6.next = 4;
return _this6.handleGetNewPosition(); return _this6.handleGetNewPosition();
case 5: case 4:
seatInfo = _context6.sent; seatInfo = _context6.sent;
console.log('seatInfo', seatInfo);
uni.setStorageSync("seatInfo", JSON.stringify(seatInfo)); uni.setStorageSync("seatInfo", JSON.stringify(seatInfo));
uni.setStorageSync("actualLocation", JSON.stringify(seatInfo)); uni.setStorageSync("actualLocation", JSON.stringify(seatInfo));
_context6.next = 11; _context6.next = 9;
return _this.handleGetNearService(seatInfo.longitude, seatInfo.latitude); return _this.handleGetNearService(seatInfo.latitude, seatInfo.longitude);
case 11: case 9:
return _context6.abrupt("return", new Promise(function (resolve) { return _context6.abrupt("return", new Promise(function (resolve) {
setTimeout(function () { setTimeout(function () {
_this.funList = [{ _this.funList = [{
@ -741,7 +719,7 @@ var _default = {
resolve(true); resolve(true);
}, 300); }, 300);
})); }));
case 12: case 10:
case "end": case "end":
return _context6.stop(); return _context6.stop();
} }
@ -785,7 +763,6 @@ var _default = {
//仅为示例,并非真实接口地址。 //仅为示例,并非真实接口地址。
method: "POST", method: "POST",
success: function success(res) { success: function success(res) {
console.log("查询现在的充电桩", res.data);
var list = res.data; var list = res.data;
var result = []; var result = [];
if (list && list.length > 0) { if (list && list.length > 0) {
@ -795,8 +772,6 @@ var _default = {
} }
}); });
} }
console.log("result", result);
console.log("obj", obj);
var sum = 0; var sum = 0;
var have = 0; var have = 0;
var use = 0; var use = 0;
@ -807,24 +782,20 @@ var _default = {
} }
}); });
} }
console.log("sum", sum);
if (sum > 0) { if (sum > 0) {
use = sum; use = sum;
if (obj.sumDetail.STATEGRIDCHARGE > 0) { if (obj.sumDetail.STATEGRIDCHARGE > 0) {
console.log("1");
if (obj.sumDetail.STATEGRIDCHARGE < result.length) { if (obj.sumDetail.STATEGRIDCHARGE < result.length) {
have = result.length; have = result.length;
} else { } else {
have = obj.sumDetail.STATEGRIDCHARGE; have = obj.sumDetail.STATEGRIDCHARGE;
} }
} else { } else {
console.log("2");
have = result.length; have = result.length;
} }
} else { } else {
have = obj.sumDetail.LIVESTOCKPACKING; have = obj.sumDetail.LIVESTOCKPACKING;
var rank = Number(uni.getStorageSync("rankNumber")); var rank = Number(uni.getStorageSync("rankNumber"));
console.log("rank", rank);
if (rank > 0) {} else { if (rank > 0) {} else {
rank = Math.random() * (0.7 - 0.5) + 0.5; rank = Math.random() * (0.7 - 0.5) + 0.5;
uni.setStorageSync("rankNumber", rank); uni.setStorageSync("rankNumber", rank);
@ -835,7 +806,6 @@ var _default = {
have: have, have: have,
use: use use: use
}; };
console.log("_this.chargingObj", _this.chargingObj);
_this.$forceUpdate(); _this.$forceUpdate();
} }
}); });
@ -872,11 +842,9 @@ var _default = {
case 5: case 5:
data = _context8.sent; data = _context8.sent;
obj = data.Result_Data; obj = data.Result_Data;
console.log("detail", obj);
_this8.serviceDetail = obj; _this8.serviceDetail = obj;
_this8.serviceDetail.sumDetail = _this8.handleMergeDetail(obj); _this8.serviceDetail.sumDetail = _this8.handleMergeDetail(obj);
console.log("this.serviceDetail", _this8.serviceDetail); case 9:
case 11:
case "end": case "end":
return _context8.stop(); return _context8.stop();
} }
@ -911,7 +879,6 @@ var _default = {
}, },
// 功能列表 // 功能列表
handleFunClick: function handleFunClick(obj) { handleFunClick: function handleFunClick(obj) {
console.log("obj", obj);
// 服务区 // 服务区
if (obj.value === 1) { if (obj.value === 1) {
uni.navigateTo({ uni.navigateTo({
@ -998,18 +965,12 @@ var _default = {
} else if (obj.value === 13) { } else if (obj.value === 13) {
// 加水 // 加水
uni.scanCode({ uni.scanCode({
success: function success(res) { success: function success(res) {}
console.log("条码类型:" + res.scanType);
console.log("条码内容:" + res.result);
}
}); });
} else if (obj.value === 14) { } else if (obj.value === 14) {
// 尿素 // 尿素
uni.scanCode({ uni.scanCode({
success: function success(res) { success: function success(res) {}
console.log("条码类型:" + res.scanType);
console.log("条码内容:" + res.result);
}
}); });
} else if (obj.value === 15) { } else if (obj.value === 15) {
if (this.isChangeIcon) { if (this.isChangeIcon) {
@ -1051,15 +1012,12 @@ var _default = {
}); });
}, },
getLocalServer: function getLocalServer() { getLocalServer: function getLocalServer() {
console.log("getLocation");
// 根据定位获取周边服务区 // 根据定位获取周边服务区
var _this = this; var _this = this;
uni.getLocation({ uni.getLocation({
type: "gcj02", type: "gcj02",
altitude: true, altitude: true,
success: function success(res) { success: function success(res) {
console.log("rewrwqerwq", res);
var seatInfo = { var seatInfo = {
latitude: res.latitude, latitude: res.latitude,
longitude: res.longitude longitude: res.longitude
@ -1067,15 +1025,11 @@ var _default = {
uni.setStorageSync("seatInfo", JSON.stringify(seatInfo)); uni.setStorageSync("seatInfo", JSON.stringify(seatInfo));
uni.setStorageSync("actualLocation", JSON.stringify(seatInfo)); uni.setStorageSync("actualLocation", JSON.stringify(seatInfo));
_this.seat = seatInfo; _this.seat = seatInfo;
console.log("1");
var latitude = res.latitude; var latitude = res.latitude;
var longitude = res.longitude; var longitude = res.longitude;
console.log("2");
_this.handleGetNearService(latitude, longitude); _this.handleGetNearService(latitude, longitude);
}, },
fail: function fail(err) { fail: function fail(err) {}
console.log("err", err);
}
}); });
}, },
// 合并服务区数据 // 合并服务区数据
@ -1226,7 +1180,6 @@ var _default = {
showservice: true, showservice: true,
appId: "wxee018fb96955552a" appId: "wxee018fb96955552a"
}; };
console.log("handleGetNearService", req);
uni.showLoading({ uni.showLoading({
title: "查找最近的服务区..." title: "查找最近的服务区..."
}); });
@ -1234,23 +1187,21 @@ var _default = {
// "/CommercialApi/BaseInfo/GetServerpartList", // "/CommercialApi/BaseInfo/GetServerpartList",
// req // req
// ); // );
_context9.next = 5; _context9.next = 4;
return _this9.$api.$javaGet('/third-party/getServerPartList', req); return _this9.$api.$javaGet('/third-party/getServerPartList', req);
case 5: case 4:
data = _context9.sent; data = _context9.sent;
_this9.serverPartList = data.Result_Data.List; _this9.serverPartList = data.Result_Data.List;
console.log("this.serverPartList", _this9.serverPartList);
nearService = _this9.serverPartList[0]; nearService = _this9.serverPartList[0];
nearService.sumDetail = _this9.handleMergeDetail(nearService); nearService.sumDetail = _this9.handleMergeDetail(nearService);
_this9.serviceDetail = nearService; _this9.serviceDetail = nearService;
uni.setStorageSync("currentService", nearService); uni.setStorageSync("currentService", nearService);
console.log("serviceDetail", _this9.serviceDetail);
idList = [1212, 1222, 1139, 1215]; idList = [1212, 1222, 1139, 1215];
if (idList.indexOf(nearService.SERVERPART_ID) !== -1) { if (idList.indexOf(nearService.SERVERPART_ID) !== -1) {
_this9.handleGetChargingStation(nearService); _this9.handleGetChargingStation(nearService);
} }
uni.hideLoading(); uni.hideLoading();
case 16: case 13:
case "end": case "end":
return _context9.stop(); return _context9.stop();
} }
@ -1285,12 +1236,8 @@ var _default = {
version: "1.0", version: "1.0",
sign_type: "RSA2" sign_type: "RSA2"
}; };
signText = "app_id=".concat(req.app_id, "&biz_content=").concat(req.biz_content, "&charset=UTF-8&pid=").concat(req.app_id, "&service=trawe.eats.etc&utc_timestamp=").concat(req.utc_timestamp, "&version=1.0"); signText = "app_id=".concat(req.app_id, "&biz_content=").concat(req.biz_content, "&charset=UTF-8&pid=").concat(req.app_id, "&service=trawe.eats.etc&utc_timestamp=").concat(req.utc_timestamp, "&version=1.0"); // 签名
console.log("handleGetHighwayHeadlines", req); _context10.next = 8;
console.log("signText", signText);
// 签名
_context10.next = 10;
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
uni.request({ uni.request({
url: "https://admin.es.eshangtech.com/prod-api/RSA/sign", url: "https://admin.es.eshangtech.com/prod-api/RSA/sign",
@ -1303,18 +1250,16 @@ var _default = {
"content-type": "application/json" "content-type": "application/json"
}, },
success: function success(res) { success: function success(res) {
console.log("resresresresresresres", res);
resolve(res.data.data); resolve(res.data.data);
} }
}); });
}); });
case 10: case 8:
sign = _context10.sent; sign = _context10.sent;
console.log("sign", sign);
req.sign = sign; req.sign = sign;
// 推文数据 // 推文数据
_context10.next = 15; _context10.next = 12;
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
uni.request({ uni.request({
url: "https://sxgzh.etclife.cn/etc/api/v1/gzh/point/tweets", url: "https://sxgzh.etclife.cn/etc/api/v1/gzh/point/tweets",
@ -1324,7 +1269,6 @@ var _default = {
"content-type": "application/x-www-form-urlencoded" "content-type": "application/x-www-form-urlencoded"
}, },
success: function success(res) { success: function success(res) {
console.log("resresresresresresresresres", res);
if (res.data.response.data) { if (res.data.response.data) {
resolve(res.data.response.data.data.tweets); resolve(res.data.response.data.data.tweets);
} else { } else {
@ -1339,9 +1283,8 @@ var _default = {
} }
}); });
}); });
case 15: case 12:
tweetsData = _context10.sent; tweetsData = _context10.sent;
console.log("tweetsData", tweetsData);
// if (tweetsData && tweetsData.length > 0) { // if (tweetsData && tweetsData.length > 0) {
// this.roadStatusList = tweetsData; // this.roadStatusList = tweetsData;
// } else { // } else {
@ -1357,14 +1300,11 @@ var _default = {
PageSize: 10, PageSize: 10,
appId: "wxee018fb96955552a" appId: "wxee018fb96955552a"
}; };
_context10.next = 20; _context10.next = 16;
return _this10.$api.$post("/EShangApiMain/Notice/GetNOTICEINFOList", newReq); return _this10.$api.$post("/EShangApiMain/Notice/GetNOTICEINFOList", newReq);
case 20: case 16:
newData = _context10.sent; newData = _context10.sent;
list = newData.Result_Data.List; list = newData.Result_Data.List; // if (list && list.length > 0) {
console.log("handleGetHighwayHeadlines", list);
// if (list && list.length > 0) {
// } else { // } else {
// this.roadStatusList = []; // this.roadStatusList = [];
// } // }
@ -1374,7 +1314,7 @@ var _default = {
// this.roadStatusList.unshift({ // this.roadStatusList.unshift({
// NOTICEINFO_TITLE: "最新放假通知调休2天免费8天", // NOTICEINFO_TITLE: "最新放假通知调休2天免费8天",
// }); // });
case 24: case 19:
case "end": case "end":
return _context10.stop(); return _context10.stop();
} }
@ -1407,7 +1347,6 @@ var _default = {
}); });
case 2: case 2:
data = _context11.sent; data = _context11.sent;
console.log("handleGetSpecialOffers", data);
list = data.Data.List; list = data.Data.List;
shopList = []; shopList = [];
if (list && list.length > 0) { if (list && list.length > 0) {
@ -1419,13 +1358,12 @@ var _default = {
} }
}); });
} }
console.log("特价优惠", shopList);
if (shopList && shopList.length > 0) { if (shopList && shopList.length > 0) {
_this11.specialOffersList = shopList.slice(0, 2); _this11.specialOffersList = shopList.slice(0, 2);
} else { } else {
_this11.specialOffersList = []; _this11.specialOffersList = [];
} }
case 9: case 7:
case "end": case "end":
return _context11.stop(); return _context11.stop();
} }
@ -1468,8 +1406,7 @@ var _default = {
} else { } else {
_this12.productsList = []; _this12.productsList = [];
} }
console.log("甄选商品", list); case 7:
case 8:
case "end": case "end":
return _context12.stop(); return _context12.stop();
} }
@ -1520,8 +1457,7 @@ var _default = {
}); });
} }
_this13.shoppingMall = shopList; _this13.shoppingMall = shopList;
console.log("商城精选", shopList); case 7:
case 8:
case "end": case "end":
return _context13.stop(); return _context13.stop();
} }
@ -1538,17 +1474,12 @@ var _default = {
// 缩放比例 // 缩放比例
name: this.serviceDetail.SERVERPART_NAME, name: this.serviceDetail.SERVERPART_NAME,
// address: "", // 这个可能会影响地图的定位,所以可以选择不填 // address: "", // 这个可能会影响地图的定位,所以可以选择不填
success: function success(data) { success: function success(data) {},
console.log(data); fail: function fail(err) {}
},
fail: function fail(err) {
console.log(err);
}
}); });
}, },
// 跳转商品详情 // 跳转商品详情
handleGoShopDetail: function handleGoShopDetail(obj) { handleGoShopDetail: function handleGoShopDetail(obj) {
console.log("obj", obj);
uni.navigateTo({ uni.navigateTo({
url: "/pages/shopPages/shopDetail/index?id=".concat(obj.COMMODITY_ID) url: "/pages/shopPages/shopDetail/index?id=".concat(obj.COMMODITY_ID)
}); });