This commit is contained in:
ylj20011123 2025-12-19 15:27:54 +08:00
parent ea9fa9cb4d
commit 9d00b8a53f
18 changed files with 882 additions and 715 deletions

View File

@ -975,14 +975,7 @@ export default {
}, },
async onShow() { async onShow() {
// onShow onLoad // onShow onLoad
//
if (
!this.isPageLoading &&
this.skeletonControl &&
!this.skeletonControl.showSkeleton
) {
// 访
}
let currentService = uni.getStorageSync("currentService"); let currentService = uni.getStorageSync("currentService");
if (currentService) { if (currentService) {
await this.handleGetServiceDetail(currentService.SERVERPART_ID); await this.handleGetServiceDetail(currentService.SERVERPART_ID);
@ -1016,52 +1009,7 @@ export default {
} }
this.funList = newFunList; this.funList = newFunList;
} }
// if (new Date("2025-03-02 8:00:00").getTime() < new Date().getTime()) {
// this.isChangeIcon = false;
// }
// if (this.isChangeIcon) {
// let fun = this.funList;
// fun.forEach((item) => {
// if (item.value === 15) {
// item.label = "";
// item.src = "https://eshangtech.com/minTestImg/GoddessFestival.png";
// item.springSrc =
// "https://eshangtech.com/minTestImg/GoddessFestival.png";
// }
// });
// this.funList = fun;
// this.$forceUpdate();
// }
}, },
// async onPullDownRefresh() {
// // await this.handleReloadFunIndex()
// const seatInfo = await this.handleGetNewPosition()
// // handleGetNearService(seatInfo.longitude, seatInfo.latitude)
// let objInfo = await this.handleGetNearService(seatInfo.longitude, seatInfo.latitude)
// let obj = await this.handleGetServiceDetail(objInfo.SERVERPART_ID);
// let newObj = {
// ...objInfo,
// sumDetail: obj,
// haveREFUELINGGUN: obj.haveREFUELINGGUN,
// HASCHARGE: obj.HASCHARGE,
// havePARKING: obj.havePARKING,
// haveWC: obj.haveWC,
// HASMOTHER: obj.HASMOTHER,
// HASPILOTLOUNGE: obj.HASPILOTLOUNGE,
// }
// console.log('newObjnewObjnewObjnewObj', newObj);
// this.serviceDetail = newObj
// let idList = [1212, 1222, 1139, 1215];
// if (idList.indexOf(nearService.SERVERPART_ID) !== -1) {
// this.handleGetChargingStation(nearService);
// }
// uni.stopPullDownRefresh()
// },
computed: { computed: {
...mapGetters({ ...mapGetters({
user: "user", user: "user",
@ -1172,10 +1120,10 @@ export default {
SortStr: "OPERATE_DATE desc", SortStr: "OPERATE_DATE desc",
type: "encryption", type: "encryption",
}; };
const data1 = await this.$api.$zzyLocalPost( // const data1 = await this.$api.$zzyLocalPost(
"/MallBasic/GetUSERDEFINEDTYPEList", // "/MallBasic/GetUSERDEFINEDTYPEList",
req // req
); // );
let req2 = { let req2 = {
SearchParameter: { SearchParameter: {
@ -1186,10 +1134,15 @@ export default {
SortStr: "OPERATE_DATE desc", SortStr: "OPERATE_DATE desc",
type: "encryption", type: "encryption",
}; };
const data2 = await this.$api.$zzyLocalPost( // const data2 = await this.$api.$zzyLocalPost(
"/MallBasic/GetUSERDEFINEDTYPEList", // "/MallBasic/GetUSERDEFINEDTYPEList",
req2 // req2
); // );
const [data1, data2] = await Promise.all([
this.$api.$zzyLocalPost("/MallBasic/GetUSERDEFINEDTYPEList", req),
this.$api.$zzyLocalPost("/MallBasic/GetUSERDEFINEDTYPEList", req2),
]);
let res1 = data1.Result_Data.List; let res1 = data1.Result_Data.List;
let res2 = data2.Result_Data.List; let res2 = data2.Result_Data.List;
@ -2276,7 +2229,7 @@ export default {
// //
handleGoShopDetail(obj) { handleGoShopDetail(obj) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/shopPages/shopDetail/index?id=${obj.COMMODITY_ID}`, url: `/pages/shopPages/shopDetail/index?id=${obj.COMMODITY_ID}&come=buyOrder`,
}); });
}, },
// //
@ -2324,10 +2277,12 @@ export default {
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) { if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) {
item.COMMODITYLIST.forEach((subItem) => { item.COMMODITYLIST.forEach((subItem) => {
if (!idSet.has(subItem.COMMODITY_ID)) { if (!idSet.has(subItem.COMMODITY_ID)) {
if (subItem.COMMODITY_NATURE === 7000) { if (subItem.IMAGE_PATH || subItem.IMAGE_PATHS) {
res2.push(subItem); if (subItem.COMMODITY_NATURE === 7000) {
} else { res2.push(subItem);
res.push(subItem); } else {
res.push(subItem);
}
} }
idSet.add(subItem.COMMODITY_ID); idSet.add(subItem.COMMODITY_ID);
} }

View File

@ -742,7 +742,13 @@
<div class="imgBox"> <div class="imgBox">
<image <image
class="shopImg" class="shopImg"
:src="item.IMAGE_PATH || '/static/images/home/defultImg.png'" :src="
item.IMAGE_PATH
? item.IMAGE_PATH
: item.IMAGE_PATHS && item.IMAGE_PATHS.split(',').length > 1
? item.IMAGE_PATHS.split(',')[0]
: '/static/images/home/defultImg.png'
"
/> />
</div> </div>
<text class="shopImgText" <text class="shopImgText"
@ -2102,7 +2108,9 @@ export default {
} else { } else {
subItem.RETbigNumber = subItem.COMMODITY_RETAILPRICE; subItem.RETbigNumber = subItem.COMMODITY_RETAILPRICE;
} }
shopList.push(subItem); if (subItem.IMAGE_PATH || subItem.IMAGE_PATHS) {
shopList.push(subItem);
}
}); });
} }
}); });
@ -2232,12 +2240,16 @@ export default {
} else { } else {
subItem.RETbigNumber = subItem.COMMODITY_RETAILPRICE; subItem.RETbigNumber = subItem.COMMODITY_RETAILPRICE;
} }
shopList.push(subItem); if (subItem.IMAGE_PATH || subItem.IMAGE_PATHS) {
shopList.push(subItem);
}
} }
}); });
} }
}); });
} }
console.log("自有品牌", shopList);
this.todayOffersList = shopList; this.todayOffersList = shopList;
}, },
// //

View File

@ -720,7 +720,7 @@ export default {
this.handleGetUnionMallShopType(); this.handleGetUnionMallShopType();
} else { } else {
// //
this.handleGetShopType(); this.handleGetShopType(2);
// //
// this.handleGetAllShopItem(); // this.handleGetAllShopItem();
} }
@ -770,7 +770,7 @@ export default {
this.handleGetUnionMallShopType(); this.handleGetUnionMallShopType();
} else { } else {
// //
this.handleGetShopType(); this.handleGetShopType(2);
// //
// this.handleGetAllShopItem(); // this.handleGetAllShopItem();
} }
@ -831,7 +831,7 @@ export default {
await this.handleGetUnionMallShopType(); await this.handleGetUnionMallShopType();
} else { } else {
// //
await this.handleGetShopType(); await this.handleGetShopType(1);
} }
uni.hideLoading(); uni.hideLoading();
this.handleClosePricePopup(); this.handleClosePricePopup();
@ -1268,12 +1268,13 @@ export default {
this.handleGetUnionMallShopType(); this.handleGetUnionMallShopType();
} else { } else {
// //
this.handleGetShopType(); this.handleGetShopType(1);
} }
} }
}, },
// //
async handleGetShopType() { async handleGetShopType(type) {
// 1 2
let _this = this; let _this = this;
let typeList = []; let typeList = [];
let getWeChatGetMallGoodsType = uni.getStorageSync("getWeChatGetMallGoodsType"); let getWeChatGetMallGoodsType = uni.getStorageSync("getWeChatGetMallGoodsType");
@ -1290,7 +1291,7 @@ export default {
let newTypeList = data.Data.List; let newTypeList = data.Data.List;
if (JSON.stringify(newTypeList) !== JSON.stringify(typeList)) { if (JSON.stringify(newTypeList) !== JSON.stringify(typeList)) {
uni.setStorageSync("getWeChatGetMallGoodsType", newTypeList); uni.setStorageSync("getWeChatGetMallGoodsType", newTypeList);
_this.handleGetShopTypeShowData(newTypeList); _this.handleGetShopTypeShowData(newTypeList, type);
} }
}); });
} else { } else {
@ -1302,7 +1303,7 @@ export default {
typeList = data.Data.List; typeList = data.Data.List;
} }
this.handleGetShopTypeShowData(typeList); this.handleGetShopTypeShowData(typeList, type);
}, },
// id // id
findRootIndexByUserdefinedTypeId(treeList, targetId) { findRootIndexByUserdefinedTypeId(treeList, targetId) {
@ -1340,7 +1341,8 @@ export default {
return -1; return -1;
}, },
// //
handleGetShopTypeShowData(typeList) { handleGetShopTypeShowData(typeList, type) {
// type 1 2
let resList = []; let resList = [];
let indexOfList = [3186, 3175, 4597, 4797]; let indexOfList = [3186, 3175, 4597, 4797];
if (typeList && typeList.length > 0) { if (typeList && typeList.length > 0) {
@ -1369,7 +1371,7 @@ export default {
if (this.activeTabs === 999999) { if (this.activeTabs === 999999) {
this.handleGoPointsMall(); this.handleGoPointsMall();
} else { } else {
this.handleGetAllShopItem(resList[this.activeTabs].UserdefinedType_Id); this.handleGetAllShopItem(resList[this.activeTabs].UserdefinedType_Id, type);
} }
}, },
// UserdefinedType_PIndex // UserdefinedType_PIndex
@ -1390,45 +1392,57 @@ export default {
return []; return [];
}, },
// //
async handleGetAllShopItem(id) { async handleGetAllShopItem(id, type) {
uni.showLoading({ title: "加载中" }); console.log("djaisdjasda", type);
const data = await this.$api.getCoop({
action_type: "WeChat_GetMallGoodsInfo",
ownerUnitId: 911,
userdefinedtypeId: this.searchText ? "" : id,
commodityName: this.searchText,
excludeNature: this.pageType === "UnionMall" ? "" : 5070,
commodityNature: this.pageType === "UnionMall" ? 5070 : "",
// justCommodity: 1,
sortStr: `${
this.selectShopSort === 0
? "COMMODITY_INDEX,COMMODITY_EN,COMMODITY_MEMBERPRICE,OPERATE_DATE"
: this.selectShopSort === 1
? "COMMODITY_MEMBERPRICE"
: this.selectShopSort === 2
? "COMMODITY_EN"
: this.selectShopSort === 3
? "OPERATE_DATE"
: ""
} ${this.selectSortType === 0 ? "asc" : "desc"}`,
});
// let url = this.pageType === "UnionMall" ? '/third-party/getWeChatGetMallGoodsInfo' : '/third-party/getWeChatGetMallGoodsInfoExclude' // id id type 1 2
// const data = await this.$api.$javaGet( let data = [];
// // '/third-party/getExcludeWeChatGetMallGoodsInfo', uni.showLoading({ title: "加载中" });
// url, if (type === 1) {
// { data = await this.$api.getCoop({
// ownerUnitId: 911, action_type: "WeChat_GetMallGoodsInfo",
// userdefinedTypeId: this.searchText ? "" : id, ownerUnitId: 911,
// userdefinedtypeId: this.searchText ? "" : id, userdefinedtypeId: this.searchText ? "" : id,
// commodityName: this.searchText, commodityName: this.searchText,
// excludeNature: this.pageType === "UnionMall" ? "" : 5070, excludeNature: this.pageType === "UnionMall" ? "" : 5070,
// commodityNature: this.pageType === "UnionMall" ? 5070 : "", commodityNature: this.pageType === "UnionMall" ? 5070 : "",
// // justCommodity: 1, // justCommodity: 1,
// } sortStr: `${
// ) this.selectShopSort === 0
// uni.hideLoading() ? "COMMODITY_INDEX,COMMODITY_EN,COMMODITY_MEMBERPRICE,OPERATE_DATE"
: this.selectShopSort === 1
? "COMMODITY_MEMBERPRICE"
: this.selectShopSort === 2
? "COMMODITY_EN"
: this.selectShopSort === 3
? "OPERATE_DATE"
: ""
} ${this.selectSortType === 0 ? "asc" : "desc"}`,
});
} else {
let url =
this.pageType === "UnionMall"
? "/third-party/getWeChatGetMallGoodsInfo"
: "/third-party/getWeChatGetMallGoodsInfoExclude";
data = await this.$api.$javaGet(
// '/third-party/getExcludeWeChatGetMallGoodsInfo',
url,
{
ownerUnitId: 911,
userdefinedTypeId: this.searchText ? "" : id,
userdefinedtypeId: this.searchText ? "" : id,
commodityName: this.searchText,
excludeNature: this.pageType === "UnionMall" ? "" : 5070,
commodityNature: this.pageType === "UnionMall" ? 5070 : "",
// justCommodity: 1,
}
);
}
uni.hideLoading();
let list = data.Data.List; let list = data.Data.List;
console.log("list接口返回的初始值", JSON.parse(JSON.stringify(list)));
console.log("this.shopTypeList ", JSON.parse(JSON.stringify(this.shopTypeList)));
let thisAllType = []; let thisAllType = [];
if (this.shopTypeList && this.shopTypeList.length > 0) { if (this.shopTypeList && this.shopTypeList.length > 0) {
@ -1438,14 +1452,17 @@ export default {
} }
}); });
} }
console.log("thisAllTypethisAllType", JSON.parse(JSON.stringify(thisAllType)));
let haveAll = false; let haveAll = false;
// //
list.unshift({ // list.unshift({
UserdefinedType_Name: "全部", // USERDEFINEDTYPE_NAME: "",
UserdefinedType_Id: -1, // USERDEFINEDTYPE_ID: -1,
}); // });
//
if (thisAllType && thisAllType.length > 0) { if (thisAllType && thisAllType.length > 0) {
thisAllType.forEach((item) => { thisAllType.forEach((item) => {
if (item.USERDEFINEDTYPE_NAME === "全部") { if (item.USERDEFINEDTYPE_NAME === "全部") {
@ -1462,11 +1479,26 @@ export default {
}); });
} }
// thisAllType thisAllType
if (thisAllType && thisAllType.length > 0) {
thisAllType.forEach((item) => {
if (list && list.length > 0) {
list.forEach((subItem) => {
if (item.UserdefinedType_Id === subItem.USERDEFINEDTYPE_ID) {
item.COMMODITYLIST = subItem.COMMODITYLIST;
}
});
}
});
}
console.log("thisAllTypethisAllType2", JSON.parse(JSON.stringify(thisAllType)));
let leftIndex = -1; let leftIndex = -1;
// if (this.pageType === "UnionMall" && this.leftId) { // if (this.pageType === "UnionMall" && this.leftId) {
// if (thisAllType && thisAllType.length > 0) { // if (thisAllType && thisAllType.length > 0) {
// thisAllType.forEach((item, index) => { // thisAllType.forEach((item, index) => {
// if (item.UserdefinedType_Id === Number(this.leftId)) { // if (item.USERDEFINEDTYPE_ID === Number(this.leftId)) {
// leftIndex = index; // leftIndex = index;
// } // }
// }); // });
@ -1482,16 +1514,6 @@ export default {
} }
} }
console.log("leftIndexleftIndexleftIndex", JSON.parse(JSON.stringify(leftIndex)));
if (leftIndex === -1) {
leftIndex = this.leftSelectIndex;
}
console.log(
"indexDefaultLeftSelectindexDefaultLeftSelectindexDefaultLeftSelect",
this.indexDefaultLeftSelect
);
if (this.indexDefaultLeftSelect !== -1) { if (this.indexDefaultLeftSelect !== -1) {
if (thisAllType && thisAllType.length > 0) { if (thisAllType && thisAllType.length > 0) {
thisAllType.forEach((item, index) => { thisAllType.forEach((item, index) => {
@ -1502,22 +1524,35 @@ export default {
} }
} }
console.log("leftIndexleftIndexleftIndex2", JSON.parse(JSON.stringify(leftIndex)));
console.log(
"thisAllTypethisAllTypethisAllType2",
JSON.parse(JSON.stringify(thisAllType))
);
if (leftIndex === -1) {
leftIndex = this.leftSelectIndex;
}
// //
let shopList = []; let shopList = [];
if (list && list.length > 0) { console.log("listlistlistlist", JSON.parse(JSON.stringify(list)));
if (thisAllType && thisAllType.length > 0) {
// //
let thisTypeAllShop = []; let thisTypeAllShop = [];
// id // id
let allShopID = []; let allShopID = [];
list.forEach((item) => { // thisTypeAllShop
thisAllType.forEach((item) => {
if (item.UserdefinedType_Name !== "全部") { if (item.UserdefinedType_Name !== "全部") {
// //
if ( if (
item.COMMODITYLIST && item.COMMODITYLIST &&
item.COMMODITYLIST.length > 0 && item.COMMODITYLIST.length > 0 &&
(item.USERDEFINEDTYPE_PID === id || item.USERDEFINEDTYPE_ID === id) (item.UserdefinedType_PId === id || item.UserdefinedType_Id === id)
) { ) {
item.COMMODITYLIST.forEach((subItem) => { item.COMMODITYLIST.forEach((subItem) => {
if (allShopID.indexOf(subItem.COMMODITY_ID) === -1) { if (allShopID.indexOf(subItem.COMMODITY_ID) === -1) {
@ -1529,19 +1564,19 @@ export default {
} }
}); });
list[0].COMMODITYLIST = thisTypeAllShop; thisAllType[0].COMMODITYLIST = thisTypeAllShop;
if ( if (
leftIndex !== -1 && leftIndex !== -1 &&
list[leftIndex] && thisAllType[leftIndex] &&
list[leftIndex].COMMODITYLIST && thisAllType[leftIndex].COMMODITYLIST &&
list[leftIndex].COMMODITYLIST.length > 0 thisAllType[leftIndex].COMMODITYLIST.length > 0
) { ) {
if (this.pageType === "UnionMall" && this.leftId) { if (this.pageType === "UnionMall" && this.leftId) {
if (this.leftId) { if (this.leftId) {
let obj = {}; let obj = {};
list.forEach((item) => { thisAllType.forEach((item) => {
// (Number(item.USERDEFINEDTYPE_ID) === Number(this.leftId)) || // (Number(item.USERDEFINEDTYPE_ID) === Number(this.leftId)) ||
if ( if (
Number(item.UserdefinedType_Id) === Number(this.leftId) || Number(item.UserdefinedType_Id) === Number(this.leftId) ||
@ -1551,20 +1586,19 @@ export default {
} }
}); });
if (obj.USERDEFINEDTYPE_ID || obj.UserdefinedType_Id) { if (obj.UserdefinedType_Id || obj.UserdefinedType_Id) {
shopList = obj.COMMODITYLIST; shopList = obj.COMMODITYLIST;
} else { } else {
shopList = []; shopList = [];
} }
} else { } else {
shopList = list[leftIndex - 1].COMMODITYLIST; shopList = thisAllType[leftIndex - 1].COMMODITYLIST;
} }
} else { } else {
shopList = list[leftIndex].COMMODITYLIST; shopList = thisAllType[leftIndex].COMMODITYLIST;
} }
} }
if (shopList && shopList.length > 0) { if (shopList && shopList.length > 0) {
shopList.forEach((item) => { shopList.forEach((item) => {
// //
@ -1602,38 +1636,41 @@ export default {
let newList = []; let newList = [];
if (thisAllType && thisAllType.length > 0) { if (thisAllType && thisAllType.length > 0) {
thisAllType.forEach((item) => { thisAllType.forEach((item) => {
item.USERDEFINEDTYPE_ID = []; // item.USERDEFINEDTYPE_ID = [];
item.USERDEFINEDTYPE_ID = item.UserdefinedType_Id; item.USERDEFINEDTYPE_ID = item.UserdefinedType_Id;
item.USERDEFINEDTYPE_NAME = item.UserdefinedType_Name; item.USERDEFINEDTYPE_NAME = item.UserdefinedType_Name;
item.USERDEFINEDTYPE_PID = item.UserdefinedType_PId; item.USERDEFINEDTYPE_PID = item.UserdefinedType_PId;
// newList.push(item);
let isFound = false; // //
let res = {}; // let isFound = false;
list.forEach((subItem) => { // let res = {};
if (item.UserdefinedType_Id === subItem.USERDEFINEDTYPE_ID) { // list.forEach((subItem) => {
isFound = true; // if (item.UserdefinedType_Id === subItem.UserdefinedType_Id) {
res = subItem; // isFound = true;
} // res = subItem;
}); // }
if (isFound) { // });
newList.push(res); // if (isFound) {
} else { // newList.push(res);
newList.push(item); // } else {
} // newList.push(item);
// }
}); });
} }
console.log("newListnewListnewList", JSON.parse(JSON.stringify(newList)));
// //
let allShopList = []; let allShopList = [];
// id // id
let allShopID2 = []; let allShopID2 = [];
if (newList && newList.length > 0) { if (newList && newList.length > 0) {
this.leftToView = this.leftToView =
"left_" + leftIndex + "_" + newList[leftIndex].USERDEFINEDTYPE_ID; "left_" + leftIndex + "_" + newList[leftIndex].UserdefinedType_Id;
newList.forEach((item) => { newList.forEach((item) => {
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) { if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) {
item.COMMODITYLIST.forEach((subItem) => { item.COMMODITYLIST.forEach((subItem) => {
if (subItem.USERDEFINEDTYPE_NAME !== "全部") { if (subItem.UserdefinedType_Name !== "全部") {
// allShopList.push(subItem); // allShopList.push(subItem);
if (allShopID2.indexOf(subItem.COMMODITY_ID) === -1) { if (allShopID2.indexOf(subItem.COMMODITY_ID) === -1) {
allShopList.push(subItem); allShopList.push(subItem);
@ -1664,7 +1701,7 @@ export default {
// //
showDetail(obj) { showDetail(obj) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/shopPages/shopDetail/index?id=${obj.COMMODITY_ID}&pageType=${this.pageType}`, url: `/pages/shopPages/shopDetail/index?id=${obj.COMMODITY_ID}&pageType=${this.pageType}&come=buyOrder`,
}); });
}, },
// leftAllTypeObj // leftAllTypeObj
@ -1764,7 +1801,7 @@ export default {
// url: `/pages/allFunPage/unionActivities`, // url: `/pages/allFunPage/unionActivities`,
// }); // });
// } else { // } else {
this.handleGetAllShopItem(this.shopTypeList[index].UserdefinedType_Id); this.handleGetAllShopItem(this.shopTypeList[index].UserdefinedType_Id, 2);
// } // }
}, },
// //

File diff suppressed because it is too large Load Diff

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

@ -277,6 +277,7 @@ Object.defineProperty(exports, "__esModule", {
}); });
exports.default = void 0; exports.default = void 0;
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 30)); var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 30));
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11)); var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 32)); var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 32));
var _vuex = __webpack_require__(/*! vuex */ 33); var _vuex = __webpack_require__(/*! vuex */ 33);
@ -614,18 +615,14 @@ var _default = {
switch (_context2.prev = _context2.next) { switch (_context2.prev = _context2.next) {
case 0: case 0:
// onShow 中不控制骨架屏,骨架屏只在 onLoad 中控制一次 // onShow 中不控制骨架屏,骨架屏只在 onLoad 中控制一次
// 如果不是首次加载,直接显示内容
if (!_this5.isPageLoading && _this5.skeletonControl && !_this5.skeletonControl.showSkeleton) {
// 非首次访问,确保内容显示
}
currentService = uni.getStorageSync("currentService"); currentService = uni.getStorageSync("currentService");
if (!currentService) { if (!currentService) {
_context2.next = 10; _context2.next = 9;
break; break;
} }
_context2.next = 5; _context2.next = 4;
return _this5.handleGetServiceDetail(currentService.SERVERPART_ID); return _this5.handleGetServiceDetail(currentService.SERVERPART_ID);
case 5: case 4:
// this.serviceDetail = currentService; // this.serviceDetail = currentService;
obj = _this5.handleMergeDetail(currentService); obj = _this5.handleMergeDetail(currentService);
newObj = _objectSpread(_objectSpread({}, currentService), {}, { newObj = _objectSpread(_objectSpread({}, currentService), {}, {
@ -642,7 +639,7 @@ var _default = {
if (idList.indexOf(_this5.serviceDetail.SERVERPART_ID) !== -1) { if (idList.indexOf(_this5.serviceDetail.SERVERPART_ID) !== -1) {
_this5.handleGetChargingStation(_this5.serviceDetail); _this5.handleGetChargingStation(_this5.serviceDetail);
} }
case 10: case 9:
funList = uni.getStorageSync("funList2"); funList = uni.getStorageSync("funList2");
if (funList) { if (funList) {
newFunList = JSON.parse(funList); newFunList = JSON.parse(funList);
@ -653,25 +650,7 @@ var _default = {
} }
_this5.funList = newFunList; _this5.funList = newFunList;
} }
case 11:
// if (new Date("2025-03-02 8:00:00").getTime() < new Date().getTime()) {
// this.isChangeIcon = false;
// }
// if (this.isChangeIcon) {
// let fun = this.funList;
// fun.forEach((item) => {
// if (item.value === 15) {
// item.label = "女神活动";
// item.src = "https://eshangtech.com/minTestImg/GoddessFestival.png";
// item.springSrc =
// "https://eshangtech.com/minTestImg/GoddessFestival.png";
// }
// });
// this.funList = fun;
// this.$forceUpdate();
// }
case 12:
case "end": case "end":
return _context2.stop(); return _context2.stop();
} }
@ -679,33 +658,6 @@ var _default = {
}, _callee2); }, _callee2);
}))(); }))();
}, },
// async onPullDownRefresh() {
// // await this.handleReloadFunIndex()
// const seatInfo = await this.handleGetNewPosition()
// // handleGetNearService(seatInfo.longitude, seatInfo.latitude)
// let objInfo = await this.handleGetNearService(seatInfo.longitude, seatInfo.latitude)
// let obj = await this.handleGetServiceDetail(objInfo.SERVERPART_ID);
// let newObj = {
// ...objInfo,
// sumDetail: obj,
// haveREFUELINGGUN: obj.haveREFUELINGGUN,
// HASCHARGE: obj.HASCHARGE,
// havePARKING: obj.havePARKING,
// haveWC: obj.haveWC,
// HASMOTHER: obj.HASMOTHER,
// HASPILOTLOUNGE: obj.HASPILOTLOUNGE,
// }
// console.log('newObjnewObjnewObjnewObj', newObj);
// this.serviceDetail = newObj
// let idList = [1212, 1222, 1139, 1215];
// if (idList.indexOf(nearService.SERVERPART_ID) !== -1) {
// this.handleGetChargingStation(nearService);
// }
// uni.stopPullDownRefresh()
// },
computed: _objectSpread({}, (0, _vuex.mapGetters)({ computed: _objectSpread({}, (0, _vuex.mapGetters)({
user: "user", user: "user",
tableNum: "orderTable", tableNum: "orderTable",
@ -826,7 +778,7 @@ var _default = {
handleGetAdvertisementData: function handleGetAdvertisementData() { handleGetAdvertisementData: function handleGetAdvertisementData() {
var _this8 = this; var _this8 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() { return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
var req, data1, req2, data2, res1, res2, firstObj1, i, item, firstObj2, _i, _item; var req, req2, _yield$Promise$all, _yield$Promise$all2, data1, data2, res1, res2, firstObj1, i, item, firstObj2, _i, _item;
return _regenerator.default.wrap(function _callee4$(_context4) { return _regenerator.default.wrap(function _callee4$(_context4) {
while (1) { while (1) {
switch (_context4.prev = _context4.next) { switch (_context4.prev = _context4.next) {
@ -839,11 +791,10 @@ var _default = {
}, },
SortStr: "OPERATE_DATE desc", SortStr: "OPERATE_DATE desc",
type: "encryption" type: "encryption"
}; }; // const data1 = await this.$api.$zzyLocalPost(
_context4.next = 3; // "/MallBasic/GetUSERDEFINEDTYPEList",
return _this8.$api.$zzyLocalPost("/MallBasic/GetUSERDEFINEDTYPEList", req); // req
case 3: // );
data1 = _context4.sent;
req2 = { req2 = {
SearchParameter: { SearchParameter: {
OWNERUNIT_ID: 911, OWNERUNIT_ID: 911,
@ -852,11 +803,17 @@ var _default = {
}, },
SortStr: "OPERATE_DATE desc", SortStr: "OPERATE_DATE desc",
type: "encryption" type: "encryption"
}; }; // const data2 = await this.$api.$zzyLocalPost(
_context4.next = 7; // "/MallBasic/GetUSERDEFINEDTYPEList",
return _this8.$api.$zzyLocalPost("/MallBasic/GetUSERDEFINEDTYPEList", req2); // req2
case 7: // );
data2 = _context4.sent; _context4.next = 4;
return Promise.all([_this8.$api.$zzyLocalPost("/MallBasic/GetUSERDEFINEDTYPEList", req), _this8.$api.$zzyLocalPost("/MallBasic/GetUSERDEFINEDTYPEList", req2)]);
case 4:
_yield$Promise$all = _context4.sent;
_yield$Promise$all2 = (0, _slicedToArray2.default)(_yield$Promise$all, 2);
data1 = _yield$Promise$all2[0];
data2 = _yield$Promise$all2[1];
res1 = data1.Result_Data.List; res1 = data1.Result_Data.List;
res2 = data2.Result_Data.List; // 修改一下 使用的是 当前时间在的范围内的第一个 res2 = data2.Result_Data.List; // 修改一下 使用的是 当前时间在的范围内的第一个
firstObj1 = {}; firstObj1 = {};
@ -2083,7 +2040,7 @@ var _default = {
// 跳转商品详情 // 跳转商品详情
handleGoShopDetail: function handleGoShopDetail(obj) { handleGoShopDetail: function handleGoShopDetail(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, "&come=buyOrder")
}); });
}, },
// 跳转商品列表接口 // 跳转商品列表接口
@ -2126,10 +2083,12 @@ var _default = {
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) { if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) {
item.COMMODITYLIST.forEach(function (subItem) { item.COMMODITYLIST.forEach(function (subItem) {
if (!idSet.has(subItem.COMMODITY_ID)) { if (!idSet.has(subItem.COMMODITY_ID)) {
if (subItem.COMMODITY_NATURE === 7000) { if (subItem.IMAGE_PATH || subItem.IMAGE_PATHS) {
res2.push(subItem); if (subItem.COMMODITY_NATURE === 7000) {
} else { res2.push(subItem);
res.push(subItem); } else {
res.push(subItem);
}
} }
idSet.add(subItem.COMMODITY_ID); idSet.add(subItem.COMMODITY_ID);
} }

View File

@ -314,34 +314,45 @@ var render = function () {
: null : null
var l8 = var l8 =
_vm.showContent && _vm.pageType !== "UnionMall" _vm.showContent && _vm.pageType !== "UnionMall"
? _vm.todayOffersList.slice(0, 10) ? _vm.__map(_vm.todayOffersList.slice(0, 10), function (item, index) {
var $orig = _vm.__get_orig(item)
var g32 = !item.IMAGE_PATH
? item.IMAGE_PATHS && item.IMAGE_PATHS.split(",").length > 1
: null
var g33 = !item.IMAGE_PATH && g32 ? item.IMAGE_PATHS.split(",") : null
return {
$orig: $orig,
g32: g32,
g33: g33,
}
})
: null : null
var g32 = _vm.showContent var g34 = _vm.showContent
? _vm.pageType !== "UnionMall" && ? _vm.pageType !== "UnionMall" &&
_vm.productsList && _vm.productsList &&
_vm.productsList.length > 0 _vm.productsList.length > 0
: null : null
var g33 = var g35 =
_vm.showContent && g32 && _vm.pageType !== "UnionMall" _vm.showContent && g34 && _vm.pageType !== "UnionMall"
? _vm.productsList.length ? _vm.productsList.length
: null : null
var l9 = var l9 =
_vm.showContent && _vm.pageType === "UnionMall" _vm.showContent && _vm.pageType === "UnionMall"
? _vm.__map(_vm.showShopList, function (item, index) { ? _vm.__map(_vm.showShopList, function (item, index) {
var $orig = _vm.__get_orig(item) var $orig = _vm.__get_orig(item)
var g34 = item.IMAGE_PATH var g36 = item.IMAGE_PATH
? item.IMAGE_PATH.split(",") && ? item.IMAGE_PATH.split(",") &&
item.IMAGE_PATH.split(",").length > 1 item.IMAGE_PATH.split(",").length > 1
: null : null
var g35 = item.IMAGE_PATH && g34 ? item.IMAGE_PATH.split(",") : null var g37 = item.IMAGE_PATH && g36 ? item.IMAGE_PATH.split(",") : null
return { return {
$orig: $orig, $orig: $orig,
g34: g34, g36: g36,
g35: g35, g37: g37,
} }
}) })
: null : null
var g36 = var g38 =
_vm.showContent && _vm.pageType === "UnionMall" _vm.showContent && _vm.pageType === "UnionMall"
? _vm.showShopList && _vm.showShopList.length > 0 ? _vm.showShopList && _vm.showShopList.length > 0
: null : null
@ -413,10 +424,10 @@ var render = function () {
l7: l7, l7: l7,
g31: g31, g31: g31,
l8: l8, l8: l8,
g32: g32, g34: g34,
g33: g33, g35: g35,
l9: l9, l9: l9,
g36: g36, g38: g38,
}, },
} }
) )
@ -1622,7 +1633,9 @@ var _default = {
} else { } else {
subItem.RETbigNumber = subItem.COMMODITY_RETAILPRICE; subItem.RETbigNumber = subItem.COMMODITY_RETAILPRICE;
} }
shopList.push(subItem); if (subItem.IMAGE_PATH || subItem.IMAGE_PATHS) {
shopList.push(subItem);
}
}); });
} }
}); });
@ -1742,12 +1755,15 @@ var _default = {
} else { } else {
subItem.RETbigNumber = subItem.COMMODITY_RETAILPRICE; subItem.RETbigNumber = subItem.COMMODITY_RETAILPRICE;
} }
shopList.push(subItem); if (subItem.IMAGE_PATH || subItem.IMAGE_PATHS) {
shopList.push(subItem);
}
} }
}); });
} }
}); });
} }
console.log("自有品牌", shopList);
this.todayOffersList = shopList; this.todayOffersList = shopList;
}, },
// 跳转积分商城 // 跳转积分商城

File diff suppressed because one or more lines are too long

View File

@ -420,7 +420,7 @@ var _default = {
this.handleGetUnionMallShopType(); this.handleGetUnionMallShopType();
} else { } else {
// 拿到全部商品类型 // 拿到全部商品类型
this.handleGetShopType(); this.handleGetShopType(2);
// 拿到全部的商品 // 拿到全部的商品
// this.handleGetAllShopItem(); // this.handleGetAllShopItem();
} }
@ -481,7 +481,7 @@ var _default = {
this.handleGetUnionMallShopType(); this.handleGetUnionMallShopType();
} else { } else {
// 拿到全部商品类型 // 拿到全部商品类型
this.handleGetShopType(); this.handleGetShopType(2);
// 拿到全部的商品 // 拿到全部的商品
// this.handleGetAllShopItem(); // this.handleGetAllShopItem();
} }
@ -554,7 +554,7 @@ var _default = {
break; break;
case 6: case 6:
_context2.next = 8; _context2.next = 8;
return _this3.handleGetShopType(); return _this3.handleGetShopType(1);
case 8: case 8:
uni.hideLoading(); uni.hideLoading();
_this3.handleClosePricePopup(); _this3.handleClosePricePopup();
@ -965,7 +965,7 @@ var _default = {
_this7.handleGetUnionMallShopType(); _this7.handleGetUnionMallShopType();
} else { } else {
// 拿到全部商品类型 // 拿到全部商品类型
_this7.handleGetShopType(); _this7.handleGetShopType(1);
} }
case 17: case 17:
case "end": case "end":
@ -974,7 +974,7 @@ var _default = {
} }
}, _callee4); }, _callee4);
}))(); }))();
}), (0, _defineProperty2.default)(_methods, "handleGetShopType", function handleGetShopType() { }), (0, _defineProperty2.default)(_methods, "handleGetShopType", function handleGetShopType(type) {
var _this8 = this; var _this8 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() { return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
var _this, typeList, getWeChatGetMallGoodsType, data; var _this, typeList, getWeChatGetMallGoodsType, data;
@ -982,6 +982,7 @@ var _default = {
while (1) { while (1) {
switch (_context5.prev = _context5.next) { switch (_context5.prev = _context5.next) {
case 0: case 0:
// 判断请求商品走新的 走老的 1 走老的 2走新的
_this = _this8; _this = _this8;
typeList = []; typeList = [];
getWeChatGetMallGoodsType = uni.getStorageSync("getWeChatGetMallGoodsType"); getWeChatGetMallGoodsType = uni.getStorageSync("getWeChatGetMallGoodsType");
@ -998,7 +999,7 @@ var _default = {
var newTypeList = data.Data.List; var newTypeList = data.Data.List;
if (JSON.stringify(newTypeList) !== JSON.stringify(typeList)) { if (JSON.stringify(newTypeList) !== JSON.stringify(typeList)) {
uni.setStorageSync("getWeChatGetMallGoodsType", newTypeList); uni.setStorageSync("getWeChatGetMallGoodsType", newTypeList);
_this.handleGetShopTypeShowData(newTypeList); _this.handleGetShopTypeShowData(newTypeList, type);
} }
}); });
_context5.next = 12; _context5.next = 12;
@ -1014,7 +1015,7 @@ var _default = {
data = _context5.sent; data = _context5.sent;
typeList = data.Data.List; typeList = data.Data.List;
case 12: case 12:
_this8.handleGetShopTypeShowData(typeList); _this8.handleGetShopTypeShowData(typeList, type);
case 13: case 13:
case "end": case "end":
return _context5.stop(); return _context5.stop();
@ -1051,7 +1052,8 @@ var _default = {
} }
} }
return -1; return -1;
}), (0, _defineProperty2.default)(_methods, "handleGetShopTypeShowData", function handleGetShopTypeShowData(typeList) { }), (0, _defineProperty2.default)(_methods, "handleGetShopTypeShowData", function handleGetShopTypeShowData(typeList, type) {
// type 判断商品走新的 走老的 1 走老的 2走新的
var resList = []; var resList = [];
var indexOfList = [3186, 3175, 4597, 4797]; var indexOfList = [3186, 3175, 4597, 4797];
if (typeList && typeList.length > 0) { if (typeList && typeList.length > 0) {
@ -1071,7 +1073,7 @@ var _default = {
if (this.activeTabs === 999999) { if (this.activeTabs === 999999) {
this.handleGoPointsMall(); this.handleGoPointsMall();
} else { } else {
this.handleGetAllShopItem(resList[this.activeTabs].UserdefinedType_Id); this.handleGetAllShopItem(resList[this.activeTabs].UserdefinedType_Id, type);
} }
}), (0, _defineProperty2.default)(_methods, "handleSortLeftType", function handleSortLeftType(oldList) { }), (0, _defineProperty2.default)(_methods, "handleSortLeftType", function handleSortLeftType(oldList) {
var list = oldList; var list = oldList;
@ -1088,18 +1090,26 @@ var _default = {
return list; return list;
} }
return []; return [];
}), (0, _defineProperty2.default)(_methods, "handleGetAllShopItem", function handleGetAllShopItem(id) { }), (0, _defineProperty2.default)(_methods, "handleGetAllShopItem", function handleGetAllShopItem(id, type) {
var _this9 = this; var _this9 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() { return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
var data, list, thisAllType, haveAll, leftIndex, shopList, thisTypeAllShop, allShopID, obj, newList, allShopList, allShopID2; var data, url, list, thisAllType, haveAll, leftIndex, shopList, thisTypeAllShop, allShopID, obj, newList, allShopList, allShopID2;
return _regenerator.default.wrap(function _callee6$(_context6) { return _regenerator.default.wrap(function _callee6$(_context6) {
while (1) { while (1) {
switch (_context6.prev = _context6.next) { switch (_context6.prev = _context6.next) {
case 0: case 0:
console.log("djaisdjasda", type);
// id 为 商品分类的大类 id type 判断走缓存 还是走老的 1 走老的 2 走缓存
data = [];
uni.showLoading({ uni.showLoading({
title: "加载中" title: "加载中"
}); });
_context6.next = 3; if (!(type === 1)) {
_context6.next = 9;
break;
}
_context6.next = 6;
return _this9.$api.getCoop({ return _this9.$api.getCoop({
action_type: "WeChat_GetMallGoodsInfo", action_type: "WeChat_GetMallGoodsInfo",
ownerUnitId: 911, ownerUnitId: 911,
@ -1110,24 +1120,31 @@ var _default = {
// justCommodity: 1, // justCommodity: 1,
sortStr: "".concat(_this9.selectShopSort === 0 ? "COMMODITY_INDEX,COMMODITY_EN,COMMODITY_MEMBERPRICE,OPERATE_DATE" : _this9.selectShopSort === 1 ? "COMMODITY_MEMBERPRICE" : _this9.selectShopSort === 2 ? "COMMODITY_EN" : _this9.selectShopSort === 3 ? "OPERATE_DATE" : "", " ").concat(_this9.selectSortType === 0 ? "asc" : "desc") sortStr: "".concat(_this9.selectShopSort === 0 ? "COMMODITY_INDEX,COMMODITY_EN,COMMODITY_MEMBERPRICE,OPERATE_DATE" : _this9.selectShopSort === 1 ? "COMMODITY_MEMBERPRICE" : _this9.selectShopSort === 2 ? "COMMODITY_EN" : _this9.selectShopSort === 3 ? "OPERATE_DATE" : "", " ").concat(_this9.selectSortType === 0 ? "asc" : "desc")
}); });
case 3: case 6:
data = _context6.sent; data = _context6.sent;
// let url = this.pageType === "UnionMall" ? '/third-party/getWeChatGetMallGoodsInfo' : '/third-party/getWeChatGetMallGoodsInfoExclude' _context6.next = 13;
// const data = await this.$api.$javaGet( break;
// // '/third-party/getExcludeWeChatGetMallGoodsInfo', case 9:
// url, url = _this9.pageType === "UnionMall" ? "/third-party/getWeChatGetMallGoodsInfo" : "/third-party/getWeChatGetMallGoodsInfoExclude";
// { _context6.next = 12;
// ownerUnitId: 911, return _this9.$api.$javaGet(
// userdefinedTypeId: this.searchText ? "" : id, // '/third-party/getExcludeWeChatGetMallGoodsInfo',
// userdefinedtypeId: this.searchText ? "" : id, url, {
// commodityName: this.searchText, ownerUnitId: 911,
// excludeNature: this.pageType === "UnionMall" ? "" : 5070, userdefinedTypeId: _this9.searchText ? "" : id,
// commodityNature: this.pageType === "UnionMall" ? 5070 : "", userdefinedtypeId: _this9.searchText ? "" : id,
// // justCommodity: 1, commodityName: _this9.searchText,
// } excludeNature: _this9.pageType === "UnionMall" ? "" : 5070,
// ) commodityNature: _this9.pageType === "UnionMall" ? 5070 : ""
// uni.hideLoading() // justCommodity: 1,
});
case 12:
data = _context6.sent;
case 13:
uni.hideLoading();
list = data.Data.List; list = data.Data.List;
console.log("list接口返回的初始值", JSON.parse(JSON.stringify(list)));
console.log("this.shopTypeList ", JSON.parse(JSON.stringify(_this9.shopTypeList)));
thisAllType = []; thisAllType = [];
if (_this9.shopTypeList && _this9.shopTypeList.length > 0) { if (_this9.shopTypeList && _this9.shopTypeList.length > 0) {
_this9.shopTypeList.forEach(function (item) { _this9.shopTypeList.forEach(function (item) {
@ -1136,11 +1153,13 @@ var _default = {
} }
}); });
} }
console.log("thisAllTypethisAllType", JSON.parse(JSON.stringify(thisAllType)));
haveAll = false; // 添加一个子类的全部 haveAll = false; // 添加一个子类的全部
list.unshift({ // list.unshift({
UserdefinedType_Name: "全部", // USERDEFINEDTYPE_NAME: "全部",
UserdefinedType_Id: -1 // USERDEFINEDTYPE_ID: -1,
}); // });
// 添加一个子类的全部
if (thisAllType && thisAllType.length > 0) { if (thisAllType && thisAllType.length > 0) {
thisAllType.forEach(function (item) { thisAllType.forEach(function (item) {
if (item.USERDEFINEDTYPE_NAME === "全部") { if (item.USERDEFINEDTYPE_NAME === "全部") {
@ -1155,10 +1174,24 @@ var _default = {
UserdefinedType_Id: -1 UserdefinedType_Id: -1
}); });
} }
// thisAllType 里面的值 才是当前商城分类的实际 类型 所以应该是把对应的商品拼到 thisAllType 里面去
if (thisAllType && thisAllType.length > 0) {
thisAllType.forEach(function (item) {
if (list && list.length > 0) {
list.forEach(function (subItem) {
if (item.UserdefinedType_Id === subItem.USERDEFINEDTYPE_ID) {
item.COMMODITYLIST = subItem.COMMODITYLIST;
}
});
}
});
}
console.log("thisAllTypethisAllType2", JSON.parse(JSON.stringify(thisAllType)));
leftIndex = -1; // if (this.pageType === "UnionMall" && this.leftId) { leftIndex = -1; // if (this.pageType === "UnionMall" && this.leftId) {
// if (thisAllType && thisAllType.length > 0) { // if (thisAllType && thisAllType.length > 0) {
// thisAllType.forEach((item, index) => { // thisAllType.forEach((item, index) => {
// if (item.UserdefinedType_Id === Number(this.leftId)) { // if (item.USERDEFINEDTYPE_ID === Number(this.leftId)) {
// leftIndex = index; // leftIndex = index;
// } // }
// }); // });
@ -1173,11 +1206,6 @@ var _default = {
}); });
} }
} }
console.log("leftIndexleftIndexleftIndex", JSON.parse(JSON.stringify(leftIndex)));
if (leftIndex === -1) {
leftIndex = _this9.leftSelectIndex;
}
console.log("indexDefaultLeftSelectindexDefaultLeftSelectindexDefaultLeftSelect", _this9.indexDefaultLeftSelect);
if (_this9.indexDefaultLeftSelect !== -1) { if (_this9.indexDefaultLeftSelect !== -1) {
if (thisAllType && thisAllType.length > 0) { if (thisAllType && thisAllType.length > 0) {
thisAllType.forEach(function (item, index) { thisAllType.forEach(function (item, index) {
@ -1187,17 +1215,23 @@ var _default = {
}); });
} }
} }
console.log("leftIndexleftIndexleftIndex2", JSON.parse(JSON.stringify(leftIndex)));
console.log("thisAllTypethisAllTypethisAllType2", JSON.parse(JSON.stringify(thisAllType)));
if (leftIndex === -1) {
leftIndex = _this9.leftSelectIndex;
}
// 当前选中的商品列表 // 当前选中的商品列表
shopList = []; shopList = [];
if (list && list.length > 0) { console.log("listlistlistlist", JSON.parse(JSON.stringify(list)));
if (thisAllType && thisAllType.length > 0) {
// 这一大类的全部商品 // 这一大类的全部商品
thisTypeAllShop = []; // 当前的全部商品id thisTypeAllShop = []; // 当前的全部商品id
allShopID = []; allShopID = []; // 这个遍历是拿全部商品 放在 thisTypeAllShop 里面
list.forEach(function (item) { thisAllType.forEach(function (item) {
if (item.UserdefinedType_Name !== "全部") { if (item.UserdefinedType_Name !== "全部") {
// //
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0 && (item.USERDEFINEDTYPE_PID === id || item.USERDEFINEDTYPE_ID === id)) { if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0 && (item.UserdefinedType_PId === id || item.UserdefinedType_Id === id)) {
item.COMMODITYLIST.forEach(function (subItem) { item.COMMODITYLIST.forEach(function (subItem) {
if (allShopID.indexOf(subItem.COMMODITY_ID) === -1) { if (allShopID.indexOf(subItem.COMMODITY_ID) === -1) {
thisTypeAllShop.push(subItem); thisTypeAllShop.push(subItem);
@ -1207,27 +1241,27 @@ var _default = {
} }
} }
}); });
list[0].COMMODITYLIST = thisTypeAllShop; thisAllType[0].COMMODITYLIST = thisTypeAllShop;
if (leftIndex !== -1 && list[leftIndex] && list[leftIndex].COMMODITYLIST && list[leftIndex].COMMODITYLIST.length > 0) { if (leftIndex !== -1 && thisAllType[leftIndex] && thisAllType[leftIndex].COMMODITYLIST && thisAllType[leftIndex].COMMODITYLIST.length > 0) {
if (_this9.pageType === "UnionMall" && _this9.leftId) { if (_this9.pageType === "UnionMall" && _this9.leftId) {
if (_this9.leftId) { if (_this9.leftId) {
obj = {}; obj = {};
list.forEach(function (item) { thisAllType.forEach(function (item) {
// (Number(item.USERDEFINEDTYPE_ID) === Number(this.leftId)) || // (Number(item.USERDEFINEDTYPE_ID) === Number(this.leftId)) ||
if (Number(item.UserdefinedType_Id) === Number(_this9.leftId) || Number(item.UserdefinedType_Id) === -1) { if (Number(item.UserdefinedType_Id) === Number(_this9.leftId) || Number(item.UserdefinedType_Id) === -1) {
obj = item; obj = item;
} }
}); });
if (obj.USERDEFINEDTYPE_ID || obj.UserdefinedType_Id) { if (obj.UserdefinedType_Id || obj.UserdefinedType_Id) {
shopList = obj.COMMODITYLIST; shopList = obj.COMMODITYLIST;
} else { } else {
shopList = []; shopList = [];
} }
} else { } else {
shopList = list[leftIndex - 1].COMMODITYLIST; shopList = thisAllType[leftIndex - 1].COMMODITYLIST;
} }
} else { } else {
shopList = list[leftIndex].COMMODITYLIST; shopList = thisAllType[leftIndex].COMMODITYLIST;
} }
} }
if (shopList && shopList.length > 0) { if (shopList && shopList.length > 0) {
@ -1260,36 +1294,39 @@ var _default = {
newList = []; newList = [];
if (thisAllType && thisAllType.length > 0) { if (thisAllType && thisAllType.length > 0) {
thisAllType.forEach(function (item) { thisAllType.forEach(function (item) {
item.USERDEFINEDTYPE_ID = []; // item.USERDEFINEDTYPE_ID = [];
item.USERDEFINEDTYPE_ID = item.UserdefinedType_Id; item.USERDEFINEDTYPE_ID = item.UserdefinedType_Id;
item.USERDEFINEDTYPE_NAME = item.UserdefinedType_Name; item.USERDEFINEDTYPE_NAME = item.UserdefinedType_Name;
item.USERDEFINEDTYPE_PID = item.UserdefinedType_PId; item.USERDEFINEDTYPE_PID = item.UserdefinedType_PId;
// 判断这一项找到没 newList.push(item);
var isFound = false; // // 判断这一项找到没
var res = {}; // let isFound = false;
list.forEach(function (subItem) { // let res = {};
if (item.UserdefinedType_Id === subItem.USERDEFINEDTYPE_ID) { // list.forEach((subItem) => {
isFound = true; // if (item.UserdefinedType_Id === subItem.UserdefinedType_Id) {
res = subItem; // isFound = true;
} // res = subItem;
}); // }
if (isFound) { // });
newList.push(res); // if (isFound) {
} else { // newList.push(res);
newList.push(item); // } else {
} // newList.push(item);
// }
}); });
} }
console.log("newListnewListnewList", JSON.parse(JSON.stringify(newList)));
// 小类里面的全部商品类型 // 小类里面的全部商品类型
allShopList = []; // 当前的全部商品id allShopList = []; // 当前的全部商品id
allShopID2 = []; allShopID2 = [];
if (newList && newList.length > 0) { if (newList && newList.length > 0) {
_this9.leftToView = "left_" + leftIndex + "_" + newList[leftIndex].USERDEFINEDTYPE_ID; _this9.leftToView = "left_" + leftIndex + "_" + newList[leftIndex].UserdefinedType_Id;
newList.forEach(function (item) { newList.forEach(function (item) {
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) { if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) {
item.COMMODITYLIST.forEach(function (subItem) { item.COMMODITYLIST.forEach(function (subItem) {
if (subItem.USERDEFINEDTYPE_NAME !== "全部") { if (subItem.UserdefinedType_Name !== "全部") {
// allShopList.push(subItem); // allShopList.push(subItem);
if (allShopID2.indexOf(subItem.COMMODITY_ID) === -1) { if (allShopID2.indexOf(subItem.COMMODITY_ID) === -1) {
allShopList.push(subItem); allShopList.push(subItem);
@ -1313,7 +1350,7 @@ var _default = {
_this9.rightShopList = []; _this9.rightShopList = [];
} }
uni.hideLoading(); uni.hideLoading();
case 20: case 35:
case "end": case "end":
return _context6.stop(); return _context6.stop();
} }
@ -1322,7 +1359,7 @@ var _default = {
}))(); }))();
}), (0, _defineProperty2.default)(_methods, "showDetail", function showDetail(obj) { }), (0, _defineProperty2.default)(_methods, "showDetail", function showDetail(obj) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/shopPages/shopDetail/index?id=".concat(obj.COMMODITY_ID, "&pageType=").concat(this.pageType) url: "/pages/shopPages/shopDetail/index?id=".concat(obj.COMMODITY_ID, "&pageType=").concat(this.pageType, "&come=buyOrder")
}); });
}), (0, _defineProperty2.default)(_methods, "handleUpdateLeftAllTypeObj", function handleUpdateLeftAllTypeObj(list) { }), (0, _defineProperty2.default)(_methods, "handleUpdateLeftAllTypeObj", function handleUpdateLeftAllTypeObj(list) {
var _this10 = this; var _this10 = this;
@ -1412,7 +1449,7 @@ var _default = {
// url: `/pages/allFunPage/unionActivities`, // url: `/pages/allFunPage/unionActivities`,
// }); // });
// } else { // } else {
this.handleGetAllShopItem(this.shopTypeList[index].UserdefinedType_Id); this.handleGetAllShopItem(this.shopTypeList[index].UserdefinedType_Id, 2);
// } // }
}), (0, _defineProperty2.default)(_methods, "catClickFn", function catClickFn(e, index, obj) { }), (0, _defineProperty2.default)(_methods, "catClickFn", function catClickFn(e, index, obj) {
var _this11 = this; var _this11 = this;

View File

@ -383,28 +383,28 @@ var _default = {
_context.next = 16; _context.next = 16;
break; break;
} }
console.log('this.isCollectthis.isCollect', _this2.isCollect); console.log("this.isCollectthis.isCollect", _this2.isCollect);
console.log('this.good', _this2.good); console.log("this.good", _this2.good);
req = { req = {
COLLECTIONId: _this2.good.COLLECTION_ID, COLLECTIONId: _this2.good.COLLECTION_ID,
type: "encryption" type: "encryption"
}; // 同步收藏 }; // 同步收藏
console.log('reqreqreq', req); console.log("reqreqreq", req);
_context.next = 11; _context.next = 11;
return _this2.$api.$zzyLocalPost("/Member/DeleteCOLLECTION", req); return _this2.$api.$zzyLocalPost("/Member/DeleteCOLLECTION", req);
case 11: case 11:
data = _context.sent; data = _context.sent;
console.log('data', data); console.log("data", data);
if (data.Result_Code === 100) { if (data.Result_Code === 100) {
uni.showToast({ uni.showToast({
title: '取消成功!', title: "取消成功!",
icon: 'none' icon: "none"
}); });
_this2.isCollect = false; _this2.isCollect = false;
} else { } else {
uni.showToast({ uni.showToast({
title: data.Result_Desc, title: data.Result_Desc,
icon: 'none' icon: "none"
}); });
} }
_context.next = 33; _context.next = 33;
@ -430,19 +430,19 @@ var _default = {
STAFF_NAME: _this2.user.MEMBERSHIP_NAME, STAFF_NAME: _this2.user.MEMBERSHIP_NAME,
OPERATE_DATE: _this2.$moment.now().format("YYYY-MM-DD") OPERATE_DATE: _this2.$moment.now().format("YYYY-MM-DD")
}; // 同步收藏 }; // 同步收藏
console.log('reqreqreq', _req); console.log("reqreqreq", _req);
_context.next = 22; _context.next = 22;
return _this2.$api.$zzyLocalPost("/Member/SynchroCOLLECTION", _req); return _this2.$api.$zzyLocalPost("/Member/SynchroCOLLECTION", _req);
case 22: case 22:
_data = _context.sent; _data = _context.sent;
console.log('data', _data); console.log("data", _data);
if (!(_data.Result_Code === 100)) { if (!(_data.Result_Code === 100)) {
_context.next = 32; _context.next = 32;
break; break;
} }
uni.showToast({ uni.showToast({
title: '已添加至收藏夹', title: "已添加至收藏夹",
icon: 'none' icon: "none"
}); });
_this2.isCollect = true; _this2.isCollect = true;
_context.next = 29; _context.next = 29;
@ -454,7 +454,7 @@ var _default = {
case 32: case 32:
uni.showToast({ uni.showToast({
title: _data.Result_Desc, title: _data.Result_Desc,
icon: 'none' icon: "none"
}); });
case 33: case 33:
case "end": case "end":
@ -565,7 +565,7 @@ var _default = {
} else { } else {
uni.showToast({ uni.showToast({
title: "已售罄", title: "已售罄",
icon: 'error' icon: "error"
}); });
} }
}, },
@ -641,7 +641,7 @@ var _default = {
// 跳转对应的 // 跳转对应的
handleExpentGo: function handleExpentGo(obj) { handleExpentGo: function handleExpentGo(obj) {
if (obj.value === 1) { if (obj.value === 1) {
if (this.pageType === 'UnionMall') { if (this.pageType === "UnionMall") {
uni.switchTab({ uni.switchTab({
url: "/pages/shopMallPage/tradeUnionMall/index" url: "/pages/shopMallPage/tradeUnionMall/index"
}); });
@ -662,15 +662,15 @@ var _default = {
}, },
// 返回首页 // 返回首页
handleBackIndex: function handleBackIndex() { handleBackIndex: function handleBackIndex() {
console.log('this.comethis.come', this.come); console.log("this.comethis.come", this.come);
if (this.come === 'buyOrder') { if (this.come === "buyOrder") {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
} else { } else {
// 根据传入的参数 判断是哪里来的 是返回 一层 还是 返回两层 还是 直接跳转去 // 根据传入的参数 判断是哪里来的 是返回 一层 还是 返回两层 还是 直接跳转去
uni.switchTab({ uni.switchTab({
url: this.pageType === 'UnionMall' ? "/pages/shopMallPage/tradeUnionMall/index" : "/pages/shopMallPage/index/index" url: this.pageType === "UnionMall" ? "/pages/shopMallPage/tradeUnionMall/index" : "/pages/shopMallPage/index/index"
}); });
} }
}, },
@ -698,7 +698,7 @@ var _default = {
// 加入购物车方法 // 加入购物车方法
handleAddShopCar: function handleAddShopCar() { handleAddShopCar: function handleAddShopCar() {
var _this4 = this; var _this4 = this;
console.log('this.good', this.good); console.log("this.good", this.good);
if (this.good.SKULIST && this.good.SKULIST.length > 0 && if (this.good.SKULIST && this.good.SKULIST.length > 0 &&
// (this.good.COMMODITY_RULE === "默认" || !this.good.COMMODITY_RULE) // (this.good.COMMODITY_RULE === "默认" || !this.good.COMMODITY_RULE)
!this.good.RTCOMMODITY_MULTI_ID) { !this.good.RTCOMMODITY_MULTI_ID) {
@ -732,14 +732,14 @@ var _default = {
return; return;
} }
console.log("this.good", this.good); console.log("this.good", this.good);
console.log('this.shopCarList', JSON.parse(JSON.stringify(this.shopCarList))); console.log("this.shopCarList", JSON.parse(JSON.stringify(this.shopCarList)));
// 当前购物车的数据 // 当前购物车的数据
if (this.shopCarList && this.shopCarList.length > 0) { if (this.shopCarList && this.shopCarList.length > 0) {
var nowShopList = []; var nowShopList = [];
// 判断有没有一样的 // 判断有没有一样的
var isSame = false; var isSame = false;
var list = JSON.parse(JSON.stringify(this.shopCarList)); var list = JSON.parse(JSON.stringify(this.shopCarList));
console.log('listlistlistlist', list); console.log("listlistlistlist", list);
list.forEach(function (item) { list.forEach(function (item) {
// 先看看有没有规格id 如果选了规格 不一样规格 算不同的商品 // 先看看有没有规格id 如果选了规格 不一样规格 算不同的商品
if (_this4.good.RTCOMMODITY_MULTI_ID) { if (_this4.good.RTCOMMODITY_MULTI_ID) {
@ -747,7 +747,7 @@ var _default = {
var filterRuleList = list.filter(function (item) { var filterRuleList = list.filter(function (item) {
return item.RTCOMMODITY_MULTI_ID === _this4.good.RTCOMMODITY_MULTI_ID; return item.RTCOMMODITY_MULTI_ID === _this4.good.RTCOMMODITY_MULTI_ID;
}); });
console.log('filterRuleList', JSON.parse(JSON.stringify(filterRuleList))); console.log("filterRuleList", JSON.parse(JSON.stringify(filterRuleList)));
// 如果有一样规格的 就替换值 没有 就等于新增商品 // 如果有一样规格的 就替换值 没有 就等于新增商品
// 如果原本已经有了 那么就是当前购物车的数量 + 本次的数量 // 如果原本已经有了 那么就是当前购物车的数量 + 本次的数量
@ -788,7 +788,7 @@ var _default = {
// nowShopList = this.shopCarList; // nowShopList = this.shopCarList;
nowShopList = JSON.parse(JSON.stringify(list)); nowShopList = JSON.parse(JSON.stringify(list));
} }
console.log('nowShopListnowShopListnowShopList', nowShopList); console.log("nowShopListnowShopListnowShopList", nowShopList);
this.shopCarList = nowShopList; this.shopCarList = nowShopList;
// 区分一下 这个是工会商城的购物车 还是外面商城的购物车 // 区分一下 这个是工会商城的购物车 还是外面商城的购物车
@ -803,7 +803,7 @@ var _default = {
var good = JSON.parse(JSON.stringify(this.good)); var good = JSON.parse(JSON.stringify(this.good));
_nowShopList.push(good); _nowShopList.push(good);
this.shopCarList = [good]; this.shopCarList = [good];
console.log('nowShopListnowShopListnowShopList', this.shopCarList); console.log("nowShopListnowShopListnowShopList", this.shopCarList);
if (this.pageType === "UnionMall") { if (this.pageType === "UnionMall") {
this.$store.commit("unionMyShopCar", _nowShopList); this.$store.commit("unionMyShopCar", _nowShopList);
} else { } else {
@ -862,7 +862,7 @@ var _default = {
_context2.next = 16; _context2.next = 16;
break; break;
} }
console.log('this.goodthis.good', _this5.good); console.log("this.goodthis.good", _this5.good);
uni.showToast({ uni.showToast({
title: "请先选择规格!", title: "请先选择规格!",
icon: "none" icon: "none"
@ -1031,7 +1031,7 @@ var _default = {
}, },
decodeHTML: function decodeHTML(str) { decodeHTML: function decodeHTML(str) {
if (!str) { if (!str) {
return ''; return "";
} }
return str.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/&quot;/g, '"').replace(/&nbsp;/g, " "); return str.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/&quot;/g, '"').replace(/&nbsp;/g, " ");
}, },
@ -1059,7 +1059,7 @@ var _default = {
res.Data.SEND_MODE = res.Data.SEND_MODE ? res.Data.SEND_MODE.toString() : ""; res.Data.SEND_MODE = res.Data.SEND_MODE ? res.Data.SEND_MODE.toString() : "";
res.Data.AFTERSALE_NATRUE = res.Data.AFTERSALE_NATRUE ? res.Data.AFTERSALE_NATRUE.toString() : ""; res.Data.AFTERSALE_NATRUE = res.Data.AFTERSALE_NATRUE ? res.Data.AFTERSALE_NATRUE.toString() : "";
res.Data.DUTY_PARAGRAPH = res.Data.DUTY_PARAGRAPH ? res.Data.DUTY_PARAGRAPH.toString() : ""; res.Data.DUTY_PARAGRAPH = res.Data.DUTY_PARAGRAPH ? res.Data.DUTY_PARAGRAPH.toString() : "";
if (res.Data.COLLECTION_STATE === '1') { if (res.Data.COLLECTION_STATE === "1") {
_this.isCollect = true; _this.isCollect = true;
} }
_this.good = res.Data; _this.good = res.Data;
@ -1348,7 +1348,6 @@ var _default = {
}, },
/* /*
* 绘制多行文本自动换行超出添加... * 绘制多行文本自动换行超出添加...
*
str:要绘制的字符串 str:要绘制的字符串
canvas:canvas对象 canvas:canvas对象
initX:绘制字符串起始x坐标 initX:绘制字符串起始x坐标
@ -1458,7 +1457,7 @@ var _default = {
}, },
handleGetIsCollect: function handleGetIsCollect() { handleGetIsCollect: function handleGetIsCollect() {
var _this7 = this; var _this7 = this;
var collectGoodList = uni.getStorageSync('collectGood'); var collectGoodList = uni.getStorageSync("collectGood");
if (collectGoodList && collectGoodList.length > 0) { if (collectGoodList && collectGoodList.length > 0) {
var haveSame = false; var haveSame = false;
collectGoodList.forEach(function (item) { collectGoodList.forEach(function (item) {
@ -1510,7 +1509,7 @@ var _default = {
while (1) { while (1) {
switch (_context4.prev = _context4.next) { switch (_context4.prev = _context4.next) {
case 0: case 0:
console.log('页面开始加载,骨架屏状态:', _this8.isPageLoading); console.log("页面开始加载,骨架屏状态:", _this8.isPageLoading);
systemInfo = uni.getSystemInfoSync(); systemInfo = uni.getSystemInfoSync();
height = systemInfo.safeAreaInsets.bottom; height = systemInfo.safeAreaInsets.bottom;
_this8.safeHeight = Number(height); _this8.safeHeight = Number(height);
@ -1541,14 +1540,13 @@ var _default = {
_context4.next = 16; _context4.next = 16;
return _this8.getDetail(option.id); return _this8.getDetail(option.id);
case 16: case 16:
// 数据加载完成,立即隐藏骨架屏
console.log("数据加载完成,隐藏骨架屏");
_this8.isPageLoading = false;
_this8.handleGetIsCollect(); _this8.handleGetIsCollect();
_this8.$utils.addUserBehaviorNew({ _this8.$utils.addUserBehaviorNew({
behaviorRecordDesc: "\u67E5\u770B\u5546\u54C1\u3010".concat(_this8.good.COMMODITY_NAME, "\u3011\u8BE6\u60C5") behaviorRecordDesc: "\u67E5\u770B\u5546\u54C1\u3010".concat(_this8.good.COMMODITY_NAME, "\u3011\u8BE6\u60C5")
}); });
// 数据加载完成,立即隐藏骨架屏
console.log('数据加载完成,隐藏骨架屏');
_this8.isPageLoading = false;
// if (option.scene) { // if (option.scene) {
// // 是否是商品分享码扫入的 带有他人的邀请码 // // 是否是商品分享码扫入的 带有他人的邀请码
// let scene = decodeURIComponent(option.scene); // let scene = decodeURIComponent(option.scene);

File diff suppressed because one or more lines are too long

View File

@ -711,7 +711,7 @@ button.data-v-0dc4ca38:after {
.offShopDown.data-v-0dc4ca38 { .offShopDown.data-v-0dc4ca38 {
width: 100%; width: 100%;
height: 64rpx; height: 64rpx;
background: #F5F6F7; background: #f5f6f7;
position: fixed; position: fixed;
z-index: 2; z-index: 2;
left: 0; left: 0;
@ -719,7 +719,7 @@ button.data-v-0dc4ca38:after {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #716F69; color: #716f69;
line-height: 32rpx; line-height: 32rpx;
text-align: justify; text-align: justify;
font-style: normal; font-style: normal;

View File

@ -11,30 +11,9 @@
{ {
"name": "pages/shopMallPage/shopType/index", "name": "pages/shopMallPage/shopType/index",
"pathName": "pages/shopMallPage/shopType/index", "pathName": "pages/shopMallPage/shopType/index",
"query": "leftId=1253&pageType=UnionMall&selectIndex=0", "query": "indexDefaultLeftSelect=3201",
"launchMode": "default", "scene": null,
"scene": null "launchMode": "default"
},
{
"name": "pages/user/index",
"pathName": "pages/user/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/pointsRedemption/index",
"pathName": "pages/pointsRedemption/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/pointsRedemption/index",
"pathName": "pages/pointsRedemption/index",
"query": "",
"launchMode": "default",
"scene": null
} }
] ]
} }