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() {
// onShow onLoad
//
if (
!this.isPageLoading &&
this.skeletonControl &&
!this.skeletonControl.showSkeleton
) {
// 访
}
let currentService = uni.getStorageSync("currentService");
if (currentService) {
await this.handleGetServiceDetail(currentService.SERVERPART_ID);
@ -1016,52 +1009,7 @@ export default {
}
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: {
...mapGetters({
user: "user",
@ -1172,10 +1120,10 @@ export default {
SortStr: "OPERATE_DATE desc",
type: "encryption",
};
const data1 = await this.$api.$zzyLocalPost(
"/MallBasic/GetUSERDEFINEDTYPEList",
req
);
// const data1 = await this.$api.$zzyLocalPost(
// "/MallBasic/GetUSERDEFINEDTYPEList",
// req
// );
let req2 = {
SearchParameter: {
@ -1186,10 +1134,15 @@ export default {
SortStr: "OPERATE_DATE desc",
type: "encryption",
};
const data2 = await this.$api.$zzyLocalPost(
"/MallBasic/GetUSERDEFINEDTYPEList",
req2
);
// const data2 = await this.$api.$zzyLocalPost(
// "/MallBasic/GetUSERDEFINEDTYPEList",
// 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 res2 = data2.Result_Data.List;
@ -2276,7 +2229,7 @@ export default {
//
handleGoShopDetail(obj) {
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) {
item.COMMODITYLIST.forEach((subItem) => {
if (!idSet.has(subItem.COMMODITY_ID)) {
if (subItem.COMMODITY_NATURE === 7000) {
res2.push(subItem);
} else {
res.push(subItem);
if (subItem.IMAGE_PATH || subItem.IMAGE_PATHS) {
if (subItem.COMMODITY_NATURE === 7000) {
res2.push(subItem);
} else {
res.push(subItem);
}
}
idSet.add(subItem.COMMODITY_ID);
}

View File

@ -742,7 +742,13 @@
<div class="imgBox">
<image
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>
<text class="shopImgText"
@ -1307,7 +1313,7 @@ export default {
// uni.showLoading({
// title: ""
// })
//
await this.handleGetShopBigType();
//
@ -2102,7 +2108,9 @@ export default {
} else {
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 {
subItem.RETbigNumber = subItem.COMMODITY_RETAILPRICE;
}
shopList.push(subItem);
if (subItem.IMAGE_PATH || subItem.IMAGE_PATHS) {
shopList.push(subItem);
}
}
});
}
});
}
console.log("自有品牌", shopList);
this.todayOffersList = shopList;
},
//

View File

@ -720,7 +720,7 @@ export default {
this.handleGetUnionMallShopType();
} else {
//
this.handleGetShopType();
this.handleGetShopType(2);
//
// this.handleGetAllShopItem();
}
@ -770,7 +770,7 @@ export default {
this.handleGetUnionMallShopType();
} else {
//
this.handleGetShopType();
this.handleGetShopType(2);
//
// this.handleGetAllShopItem();
}
@ -831,7 +831,7 @@ export default {
await this.handleGetUnionMallShopType();
} else {
//
await this.handleGetShopType();
await this.handleGetShopType(1);
}
uni.hideLoading();
this.handleClosePricePopup();
@ -1268,12 +1268,13 @@ export default {
this.handleGetUnionMallShopType();
} else {
//
this.handleGetShopType();
this.handleGetShopType(1);
}
}
},
//
async handleGetShopType() {
async handleGetShopType(type) {
// 1 2
let _this = this;
let typeList = [];
let getWeChatGetMallGoodsType = uni.getStorageSync("getWeChatGetMallGoodsType");
@ -1290,7 +1291,7 @@ export default {
let newTypeList = data.Data.List;
if (JSON.stringify(newTypeList) !== JSON.stringify(typeList)) {
uni.setStorageSync("getWeChatGetMallGoodsType", newTypeList);
_this.handleGetShopTypeShowData(newTypeList);
_this.handleGetShopTypeShowData(newTypeList, type);
}
});
} else {
@ -1302,7 +1303,7 @@ export default {
typeList = data.Data.List;
}
this.handleGetShopTypeShowData(typeList);
this.handleGetShopTypeShowData(typeList, type);
},
// id
findRootIndexByUserdefinedTypeId(treeList, targetId) {
@ -1340,7 +1341,8 @@ export default {
return -1;
},
//
handleGetShopTypeShowData(typeList) {
handleGetShopTypeShowData(typeList, type) {
// type 1 2
let resList = [];
let indexOfList = [3186, 3175, 4597, 4797];
if (typeList && typeList.length > 0) {
@ -1369,7 +1371,7 @@ export default {
if (this.activeTabs === 999999) {
this.handleGoPointsMall();
} else {
this.handleGetAllShopItem(resList[this.activeTabs].UserdefinedType_Id);
this.handleGetAllShopItem(resList[this.activeTabs].UserdefinedType_Id, type);
}
},
// UserdefinedType_PIndex
@ -1390,45 +1392,57 @@ export default {
return [];
},
//
async handleGetAllShopItem(id) {
uni.showLoading({ title: "加载中" });
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"}`,
});
async handleGetAllShopItem(id, type) {
console.log("djaisdjasda", type);
// let url = this.pageType === "UnionMall" ? '/third-party/getWeChatGetMallGoodsInfo' : '/third-party/getWeChatGetMallGoodsInfoExclude'
// const 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()
// id id type 1 2
let data = [];
uni.showLoading({ title: "加载中" });
if (type === 1) {
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"}`,
});
} 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;
console.log("list接口返回的初始值", JSON.parse(JSON.stringify(list)));
console.log("this.shopTypeList ", JSON.parse(JSON.stringify(this.shopTypeList)));
let thisAllType = [];
if (this.shopTypeList && this.shopTypeList.length > 0) {
@ -1438,14 +1452,17 @@ export default {
}
});
}
console.log("thisAllTypethisAllType", JSON.parse(JSON.stringify(thisAllType)));
let haveAll = false;
//
list.unshift({
UserdefinedType_Name: "全部",
UserdefinedType_Id: -1,
});
// list.unshift({
// USERDEFINEDTYPE_NAME: "",
// USERDEFINEDTYPE_ID: -1,
// });
//
if (thisAllType && thisAllType.length > 0) {
thisAllType.forEach((item) => {
if (item.USERDEFINEDTYPE_NAME === "全部") {
@ -1461,12 +1478,27 @@ export default {
UserdefinedType_Id: -1,
});
}
// 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;
// if (this.pageType === "UnionMall" && this.leftId) {
// if (thisAllType && thisAllType.length > 0) {
// thisAllType.forEach((item, index) => {
// if (item.UserdefinedType_Id === Number(this.leftId)) {
// if (item.USERDEFINEDTYPE_ID === Number(this.leftId)) {
// 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 (thisAllType && thisAllType.length > 0) {
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 = [];
if (list && list.length > 0) {
console.log("listlistlistlist", JSON.parse(JSON.stringify(list)));
if (thisAllType && thisAllType.length > 0) {
//
let thisTypeAllShop = [];
// id
let allShopID = [];
list.forEach((item) => {
// thisTypeAllShop
thisAllType.forEach((item) => {
if (item.UserdefinedType_Name !== "全部") {
//
if (
item.COMMODITYLIST &&
item.COMMODITYLIST.length > 0 &&
(item.USERDEFINEDTYPE_PID === id || item.USERDEFINEDTYPE_ID === id)
(item.UserdefinedType_PId === id || item.UserdefinedType_Id === id)
) {
item.COMMODITYLIST.forEach((subItem) => {
if (allShopID.indexOf(subItem.COMMODITY_ID) === -1) {
@ -1529,19 +1564,19 @@ export default {
}
});
list[0].COMMODITYLIST = thisTypeAllShop;
thisAllType[0].COMMODITYLIST = thisTypeAllShop;
if (
leftIndex !== -1 &&
list[leftIndex] &&
list[leftIndex].COMMODITYLIST &&
list[leftIndex].COMMODITYLIST.length > 0
thisAllType[leftIndex] &&
thisAllType[leftIndex].COMMODITYLIST &&
thisAllType[leftIndex].COMMODITYLIST.length > 0
) {
if (this.pageType === "UnionMall" && this.leftId) {
if (this.leftId) {
let obj = {};
list.forEach((item) => {
thisAllType.forEach((item) => {
// (Number(item.USERDEFINEDTYPE_ID) === Number(this.leftId)) ||
if (
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;
} else {
shopList = [];
}
} else {
shopList = list[leftIndex - 1].COMMODITYLIST;
shopList = thisAllType[leftIndex - 1].COMMODITYLIST;
}
} else {
shopList = list[leftIndex].COMMODITYLIST;
shopList = thisAllType[leftIndex].COMMODITYLIST;
}
}
if (shopList && shopList.length > 0) {
shopList.forEach((item) => {
//
@ -1602,38 +1636,41 @@ export default {
let newList = [];
if (thisAllType && thisAllType.length > 0) {
thisAllType.forEach((item) => {
item.USERDEFINEDTYPE_ID = [];
// item.USERDEFINEDTYPE_ID = [];
item.USERDEFINEDTYPE_ID = item.UserdefinedType_Id;
item.USERDEFINEDTYPE_NAME = item.UserdefinedType_Name;
item.USERDEFINEDTYPE_PID = item.UserdefinedType_PId;
//
let isFound = false;
let res = {};
list.forEach((subItem) => {
if (item.UserdefinedType_Id === subItem.USERDEFINEDTYPE_ID) {
isFound = true;
res = subItem;
}
});
if (isFound) {
newList.push(res);
} else {
newList.push(item);
}
newList.push(item);
// //
// let isFound = false;
// let res = {};
// list.forEach((subItem) => {
// if (item.UserdefinedType_Id === subItem.UserdefinedType_Id) {
// isFound = true;
// res = subItem;
// }
// });
// if (isFound) {
// newList.push(res);
// } else {
// newList.push(item);
// }
});
}
console.log("newListnewListnewList", JSON.parse(JSON.stringify(newList)));
//
let allShopList = [];
// id
let allShopID2 = [];
if (newList && newList.length > 0) {
this.leftToView =
"left_" + leftIndex + "_" + newList[leftIndex].USERDEFINEDTYPE_ID;
"left_" + leftIndex + "_" + newList[leftIndex].UserdefinedType_Id;
newList.forEach((item) => {
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) {
item.COMMODITYLIST.forEach((subItem) => {
if (subItem.USERDEFINEDTYPE_NAME !== "全部") {
if (subItem.UserdefinedType_Name !== "全部") {
// allShopList.push(subItem);
if (allShopID2.indexOf(subItem.COMMODITY_ID) === -1) {
allShopList.push(subItem);
@ -1664,7 +1701,7 @@ export default {
//
showDetail(obj) {
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
@ -1764,7 +1801,7 @@ export default {
// url: `/pages/allFunPage/unionActivities`,
// });
// } 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;
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 _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 32));
var _vuex = __webpack_require__(/*! vuex */ 33);
@ -614,18 +615,14 @@ var _default = {
switch (_context2.prev = _context2.next) {
case 0:
// onShow 中不控制骨架屏,骨架屏只在 onLoad 中控制一次
// 如果不是首次加载,直接显示内容
if (!_this5.isPageLoading && _this5.skeletonControl && !_this5.skeletonControl.showSkeleton) {
// 非首次访问,确保内容显示
}
currentService = uni.getStorageSync("currentService");
if (!currentService) {
_context2.next = 10;
_context2.next = 9;
break;
}
_context2.next = 5;
_context2.next = 4;
return _this5.handleGetServiceDetail(currentService.SERVERPART_ID);
case 5:
case 4:
// this.serviceDetail = currentService;
obj = _this5.handleMergeDetail(currentService);
newObj = _objectSpread(_objectSpread({}, currentService), {}, {
@ -642,7 +639,7 @@ var _default = {
if (idList.indexOf(_this5.serviceDetail.SERVERPART_ID) !== -1) {
_this5.handleGetChargingStation(_this5.serviceDetail);
}
case 10:
case 9:
funList = uni.getStorageSync("funList2");
if (funList) {
newFunList = JSON.parse(funList);
@ -653,25 +650,7 @@ var _default = {
}
_this5.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();
// }
case 12:
case 11:
case "end":
return _context2.stop();
}
@ -679,33 +658,6 @@ var _default = {
}, _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)({
user: "user",
tableNum: "orderTable",
@ -826,7 +778,7 @@ var _default = {
handleGetAdvertisementData: function handleGetAdvertisementData() {
var _this8 = this;
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) {
while (1) {
switch (_context4.prev = _context4.next) {
@ -839,11 +791,10 @@ var _default = {
},
SortStr: "OPERATE_DATE desc",
type: "encryption"
};
_context4.next = 3;
return _this8.$api.$zzyLocalPost("/MallBasic/GetUSERDEFINEDTYPEList", req);
case 3:
data1 = _context4.sent;
}; // const data1 = await this.$api.$zzyLocalPost(
// "/MallBasic/GetUSERDEFINEDTYPEList",
// req
// );
req2 = {
SearchParameter: {
OWNERUNIT_ID: 911,
@ -852,11 +803,17 @@ var _default = {
},
SortStr: "OPERATE_DATE desc",
type: "encryption"
};
_context4.next = 7;
return _this8.$api.$zzyLocalPost("/MallBasic/GetUSERDEFINEDTYPEList", req2);
case 7:
data2 = _context4.sent;
}; // const data2 = await this.$api.$zzyLocalPost(
// "/MallBasic/GetUSERDEFINEDTYPEList",
// req2
// );
_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;
res2 = data2.Result_Data.List; // 修改一下 使用的是 当前时间在的范围内的第一个
firstObj1 = {};
@ -2083,7 +2040,7 @@ var _default = {
// 跳转商品详情
handleGoShopDetail: function handleGoShopDetail(obj) {
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) {
item.COMMODITYLIST.forEach(function (subItem) {
if (!idSet.has(subItem.COMMODITY_ID)) {
if (subItem.COMMODITY_NATURE === 7000) {
res2.push(subItem);
} else {
res.push(subItem);
if (subItem.IMAGE_PATH || subItem.IMAGE_PATHS) {
if (subItem.COMMODITY_NATURE === 7000) {
res2.push(subItem);
} else {
res.push(subItem);
}
}
idSet.add(subItem.COMMODITY_ID);
}

View File

@ -314,34 +314,45 @@ var render = function () {
: null
var l8 =
_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
var g32 = _vm.showContent
var g34 = _vm.showContent
? _vm.pageType !== "UnionMall" &&
_vm.productsList &&
_vm.productsList.length > 0
: null
var g33 =
_vm.showContent && g32 && _vm.pageType !== "UnionMall"
var g35 =
_vm.showContent && g34 && _vm.pageType !== "UnionMall"
? _vm.productsList.length
: null
var l9 =
_vm.showContent && _vm.pageType === "UnionMall"
? _vm.__map(_vm.showShopList, function (item, index) {
var $orig = _vm.__get_orig(item)
var g34 = item.IMAGE_PATH
var g36 = item.IMAGE_PATH
? item.IMAGE_PATH.split(",") &&
item.IMAGE_PATH.split(",").length > 1
: null
var g35 = item.IMAGE_PATH && g34 ? item.IMAGE_PATH.split(",") : null
var g37 = item.IMAGE_PATH && g36 ? item.IMAGE_PATH.split(",") : null
return {
$orig: $orig,
g34: g34,
g35: g35,
g36: g36,
g37: g37,
}
})
: null
var g36 =
var g38 =
_vm.showContent && _vm.pageType === "UnionMall"
? _vm.showShopList && _vm.showShopList.length > 0
: null
@ -413,10 +424,10 @@ var render = function () {
l7: l7,
g31: g31,
l8: l8,
g32: g32,
g33: g33,
g34: g34,
g35: g35,
l9: l9,
g36: g36,
g38: g38,
},
}
)
@ -1622,7 +1633,9 @@ var _default = {
} else {
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 {
subItem.RETbigNumber = subItem.COMMODITY_RETAILPRICE;
}
shopList.push(subItem);
if (subItem.IMAGE_PATH || subItem.IMAGE_PATHS) {
shopList.push(subItem);
}
}
});
}
});
}
console.log("自有品牌", 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();
} else {
// 拿到全部商品类型
this.handleGetShopType();
this.handleGetShopType(2);
// 拿到全部的商品
// this.handleGetAllShopItem();
}
@ -481,7 +481,7 @@ var _default = {
this.handleGetUnionMallShopType();
} else {
// 拿到全部商品类型
this.handleGetShopType();
this.handleGetShopType(2);
// 拿到全部的商品
// this.handleGetAllShopItem();
}
@ -554,7 +554,7 @@ var _default = {
break;
case 6:
_context2.next = 8;
return _this3.handleGetShopType();
return _this3.handleGetShopType(1);
case 8:
uni.hideLoading();
_this3.handleClosePricePopup();
@ -965,7 +965,7 @@ var _default = {
_this7.handleGetUnionMallShopType();
} else {
// 拿到全部商品类型
_this7.handleGetShopType();
_this7.handleGetShopType(1);
}
case 17:
case "end":
@ -974,7 +974,7 @@ var _default = {
}
}, _callee4);
}))();
}), (0, _defineProperty2.default)(_methods, "handleGetShopType", function handleGetShopType() {
}), (0, _defineProperty2.default)(_methods, "handleGetShopType", function handleGetShopType(type) {
var _this8 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
var _this, typeList, getWeChatGetMallGoodsType, data;
@ -982,6 +982,7 @@ var _default = {
while (1) {
switch (_context5.prev = _context5.next) {
case 0:
// 判断请求商品走新的 走老的 1 走老的 2走新的
_this = _this8;
typeList = [];
getWeChatGetMallGoodsType = uni.getStorageSync("getWeChatGetMallGoodsType");
@ -998,7 +999,7 @@ var _default = {
var newTypeList = data.Data.List;
if (JSON.stringify(newTypeList) !== JSON.stringify(typeList)) {
uni.setStorageSync("getWeChatGetMallGoodsType", newTypeList);
_this.handleGetShopTypeShowData(newTypeList);
_this.handleGetShopTypeShowData(newTypeList, type);
}
});
_context5.next = 12;
@ -1014,7 +1015,7 @@ var _default = {
data = _context5.sent;
typeList = data.Data.List;
case 12:
_this8.handleGetShopTypeShowData(typeList);
_this8.handleGetShopTypeShowData(typeList, type);
case 13:
case "end":
return _context5.stop();
@ -1051,7 +1052,8 @@ var _default = {
}
}
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 indexOfList = [3186, 3175, 4597, 4797];
if (typeList && typeList.length > 0) {
@ -1071,7 +1073,7 @@ var _default = {
if (this.activeTabs === 999999) {
this.handleGoPointsMall();
} else {
this.handleGetAllShopItem(resList[this.activeTabs].UserdefinedType_Id);
this.handleGetAllShopItem(resList[this.activeTabs].UserdefinedType_Id, type);
}
}), (0, _defineProperty2.default)(_methods, "handleSortLeftType", function handleSortLeftType(oldList) {
var list = oldList;
@ -1088,18 +1090,26 @@ var _default = {
return list;
}
return [];
}), (0, _defineProperty2.default)(_methods, "handleGetAllShopItem", function handleGetAllShopItem(id) {
}), (0, _defineProperty2.default)(_methods, "handleGetAllShopItem", function handleGetAllShopItem(id, type) {
var _this9 = this;
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) {
while (1) {
switch (_context6.prev = _context6.next) {
case 0:
console.log("djaisdjasda", type);
// id 为 商品分类的大类 id type 判断走缓存 还是走老的 1 走老的 2 走缓存
data = [];
uni.showLoading({
title: "加载中"
});
_context6.next = 3;
if (!(type === 1)) {
_context6.next = 9;
break;
}
_context6.next = 6;
return _this9.$api.getCoop({
action_type: "WeChat_GetMallGoodsInfo",
ownerUnitId: 911,
@ -1110,24 +1120,31 @@ var _default = {
// 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")
});
case 3:
case 6:
data = _context6.sent;
// let url = this.pageType === "UnionMall" ? '/third-party/getWeChatGetMallGoodsInfo' : '/third-party/getWeChatGetMallGoodsInfoExclude'
// const 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()
_context6.next = 13;
break;
case 9:
url = _this9.pageType === "UnionMall" ? "/third-party/getWeChatGetMallGoodsInfo" : "/third-party/getWeChatGetMallGoodsInfoExclude";
_context6.next = 12;
return _this9.$api.$javaGet(
// '/third-party/getExcludeWeChatGetMallGoodsInfo',
url, {
ownerUnitId: 911,
userdefinedTypeId: _this9.searchText ? "" : id,
userdefinedtypeId: _this9.searchText ? "" : id,
commodityName: _this9.searchText,
excludeNature: _this9.pageType === "UnionMall" ? "" : 5070,
commodityNature: _this9.pageType === "UnionMall" ? 5070 : ""
// justCommodity: 1,
});
case 12:
data = _context6.sent;
case 13:
uni.hideLoading();
list = data.Data.List;
console.log("list接口返回的初始值", JSON.parse(JSON.stringify(list)));
console.log("this.shopTypeList ", JSON.parse(JSON.stringify(_this9.shopTypeList)));
thisAllType = [];
if (_this9.shopTypeList && _this9.shopTypeList.length > 0) {
_this9.shopTypeList.forEach(function (item) {
@ -1136,11 +1153,13 @@ var _default = {
}
});
}
console.log("thisAllTypethisAllType", JSON.parse(JSON.stringify(thisAllType)));
haveAll = false; // 添加一个子类的全部
list.unshift({
UserdefinedType_Name: "全部",
UserdefinedType_Id: -1
});
// list.unshift({
// USERDEFINEDTYPE_NAME: "全部",
// USERDEFINEDTYPE_ID: -1,
// });
// 添加一个子类的全部
if (thisAllType && thisAllType.length > 0) {
thisAllType.forEach(function (item) {
if (item.USERDEFINEDTYPE_NAME === "全部") {
@ -1155,10 +1174,24 @@ var _default = {
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) {
// if (thisAllType && thisAllType.length > 0) {
// thisAllType.forEach((item, index) => {
// if (item.UserdefinedType_Id === Number(this.leftId)) {
// if (item.USERDEFINEDTYPE_ID === Number(this.leftId)) {
// 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 (thisAllType && thisAllType.length > 0) {
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 = [];
if (list && list.length > 0) {
console.log("listlistlistlist", JSON.parse(JSON.stringify(list)));
if (thisAllType && thisAllType.length > 0) {
// 这一大类的全部商品
thisTypeAllShop = []; // 当前的全部商品id
allShopID = [];
list.forEach(function (item) {
allShopID = []; // 这个遍历是拿全部商品 放在 thisTypeAllShop 里面
thisAllType.forEach(function (item) {
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) {
if (allShopID.indexOf(subItem.COMMODITY_ID) === -1) {
thisTypeAllShop.push(subItem);
@ -1207,27 +1241,27 @@ var _default = {
}
}
});
list[0].COMMODITYLIST = thisTypeAllShop;
if (leftIndex !== -1 && list[leftIndex] && list[leftIndex].COMMODITYLIST && list[leftIndex].COMMODITYLIST.length > 0) {
thisAllType[0].COMMODITYLIST = thisTypeAllShop;
if (leftIndex !== -1 && thisAllType[leftIndex] && thisAllType[leftIndex].COMMODITYLIST && thisAllType[leftIndex].COMMODITYLIST.length > 0) {
if (_this9.pageType === "UnionMall" && _this9.leftId) {
if (_this9.leftId) {
obj = {};
list.forEach(function (item) {
thisAllType.forEach(function (item) {
// (Number(item.USERDEFINEDTYPE_ID) === Number(this.leftId)) ||
if (Number(item.UserdefinedType_Id) === Number(_this9.leftId) || Number(item.UserdefinedType_Id) === -1) {
obj = item;
}
});
if (obj.USERDEFINEDTYPE_ID || obj.UserdefinedType_Id) {
if (obj.UserdefinedType_Id || obj.UserdefinedType_Id) {
shopList = obj.COMMODITYLIST;
} else {
shopList = [];
}
} else {
shopList = list[leftIndex - 1].COMMODITYLIST;
shopList = thisAllType[leftIndex - 1].COMMODITYLIST;
}
} else {
shopList = list[leftIndex].COMMODITYLIST;
shopList = thisAllType[leftIndex].COMMODITYLIST;
}
}
if (shopList && shopList.length > 0) {
@ -1260,36 +1294,39 @@ var _default = {
newList = [];
if (thisAllType && thisAllType.length > 0) {
thisAllType.forEach(function (item) {
item.USERDEFINEDTYPE_ID = [];
// item.USERDEFINEDTYPE_ID = [];
item.USERDEFINEDTYPE_ID = item.UserdefinedType_Id;
item.USERDEFINEDTYPE_NAME = item.UserdefinedType_Name;
item.USERDEFINEDTYPE_PID = item.UserdefinedType_PId;
// 判断这一项找到没
var isFound = false;
var res = {};
list.forEach(function (subItem) {
if (item.UserdefinedType_Id === subItem.USERDEFINEDTYPE_ID) {
isFound = true;
res = subItem;
}
});
if (isFound) {
newList.push(res);
} else {
newList.push(item);
}
newList.push(item);
// // 判断这一项找到没
// let isFound = false;
// let res = {};
// list.forEach((subItem) => {
// if (item.UserdefinedType_Id === subItem.UserdefinedType_Id) {
// isFound = true;
// res = subItem;
// }
// });
// if (isFound) {
// newList.push(res);
// } else {
// newList.push(item);
// }
});
}
console.log("newListnewListnewList", JSON.parse(JSON.stringify(newList)));
// 小类里面的全部商品类型
allShopList = []; // 当前的全部商品id
allShopID2 = [];
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) {
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) {
item.COMMODITYLIST.forEach(function (subItem) {
if (subItem.USERDEFINEDTYPE_NAME !== "全部") {
if (subItem.UserdefinedType_Name !== "全部") {
// allShopList.push(subItem);
if (allShopID2.indexOf(subItem.COMMODITY_ID) === -1) {
allShopList.push(subItem);
@ -1313,7 +1350,7 @@ var _default = {
_this9.rightShopList = [];
}
uni.hideLoading();
case 20:
case 35:
case "end":
return _context6.stop();
}
@ -1322,7 +1359,7 @@ var _default = {
}))();
}), (0, _defineProperty2.default)(_methods, "showDetail", function showDetail(obj) {
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) {
var _this10 = this;
@ -1412,7 +1449,7 @@ var _default = {
// url: `/pages/allFunPage/unionActivities`,
// });
// } 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) {
var _this11 = this;

View File

@ -383,28 +383,28 @@ var _default = {
_context.next = 16;
break;
}
console.log('this.isCollectthis.isCollect', _this2.isCollect);
console.log('this.good', _this2.good);
console.log("this.isCollectthis.isCollect", _this2.isCollect);
console.log("this.good", _this2.good);
req = {
COLLECTIONId: _this2.good.COLLECTION_ID,
type: "encryption"
}; // 同步收藏
console.log('reqreqreq', req);
console.log("reqreqreq", req);
_context.next = 11;
return _this2.$api.$zzyLocalPost("/Member/DeleteCOLLECTION", req);
case 11:
data = _context.sent;
console.log('data', data);
console.log("data", data);
if (data.Result_Code === 100) {
uni.showToast({
title: '取消成功!',
icon: 'none'
title: "取消成功!",
icon: "none"
});
_this2.isCollect = false;
} else {
uni.showToast({
title: data.Result_Desc,
icon: 'none'
icon: "none"
});
}
_context.next = 33;
@ -430,19 +430,19 @@ var _default = {
STAFF_NAME: _this2.user.MEMBERSHIP_NAME,
OPERATE_DATE: _this2.$moment.now().format("YYYY-MM-DD")
}; // 同步收藏
console.log('reqreqreq', _req);
console.log("reqreqreq", _req);
_context.next = 22;
return _this2.$api.$zzyLocalPost("/Member/SynchroCOLLECTION", _req);
case 22:
_data = _context.sent;
console.log('data', _data);
console.log("data", _data);
if (!(_data.Result_Code === 100)) {
_context.next = 32;
break;
}
uni.showToast({
title: '已添加至收藏夹',
icon: 'none'
title: "已添加至收藏夹",
icon: "none"
});
_this2.isCollect = true;
_context.next = 29;
@ -454,7 +454,7 @@ var _default = {
case 32:
uni.showToast({
title: _data.Result_Desc,
icon: 'none'
icon: "none"
});
case 33:
case "end":
@ -551,7 +551,7 @@ var _default = {
handleChangeSelectSKULIST: function handleChangeSelectSKULIST(value, obj) {
if (obj.COMMODITY_STOCK > 0) {
console.log("value", value);
// this.good.COMMODITY_RULE = value;
// this.good.COMMODITY_RULE = value;
this.good.COMMODITY_RULE = obj.COMMODITY_NAME;
this.good.RTCOMMODITY_MULTI_ID = value;
if (obj.COMMODITY_MEMBERPRICE) {
@ -565,7 +565,7 @@ var _default = {
} else {
uni.showToast({
title: "已售罄",
icon: 'error'
icon: "error"
});
}
},
@ -641,7 +641,7 @@ var _default = {
// 跳转对应的
handleExpentGo: function handleExpentGo(obj) {
if (obj.value === 1) {
if (this.pageType === 'UnionMall') {
if (this.pageType === "UnionMall") {
uni.switchTab({
url: "/pages/shopMallPage/tradeUnionMall/index"
});
@ -662,15 +662,15 @@ var _default = {
},
// 返回首页
handleBackIndex: function handleBackIndex() {
console.log('this.comethis.come', this.come);
if (this.come === 'buyOrder') {
console.log("this.comethis.come", this.come);
if (this.come === "buyOrder") {
uni.navigateBack({
delta: 1
});
} else {
// 根据传入的参数 判断是哪里来的 是返回 一层 还是 返回两层 还是 直接跳转去
// 根据传入的参数 判断是哪里来的 是返回 一层 还是 返回两层 还是 直接跳转去
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() {
var _this4 = this;
console.log('this.good', this.good);
console.log("this.good", this.good);
if (this.good.SKULIST && this.good.SKULIST.length > 0 &&
// (this.good.COMMODITY_RULE === "默认" || !this.good.COMMODITY_RULE)
!this.good.RTCOMMODITY_MULTI_ID) {
@ -732,22 +732,22 @@ var _default = {
return;
}
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) {
var nowShopList = [];
// 判断有没有一样的
var isSame = false;
var list = JSON.parse(JSON.stringify(this.shopCarList));
console.log('listlistlistlist', list);
console.log("listlistlistlist", list);
list.forEach(function (item) {
// 先看看有没有规格id 如果选了规格 不一样规格 算不同的商品
if (_this4.good.RTCOMMODITY_MULTI_ID) {
// 是多规格 看一下 当前购物车中 是否已经有了 这个规格的商品
// 是多规格 看一下 当前购物车中 是否已经有了 这个规格的商品
var filterRuleList = list.filter(function (item) {
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 = JSON.parse(JSON.stringify(list));
}
console.log('nowShopListnowShopListnowShopList', nowShopList);
console.log("nowShopListnowShopListnowShopList", nowShopList);
this.shopCarList = nowShopList;
// 区分一下 这个是工会商城的购物车 还是外面商城的购物车
@ -803,7 +803,7 @@ var _default = {
var good = JSON.parse(JSON.stringify(this.good));
_nowShopList.push(good);
this.shopCarList = [good];
console.log('nowShopListnowShopListnowShopList', this.shopCarList);
console.log("nowShopListnowShopListnowShopList", this.shopCarList);
if (this.pageType === "UnionMall") {
this.$store.commit("unionMyShopCar", _nowShopList);
} else {
@ -862,7 +862,7 @@ var _default = {
_context2.next = 16;
break;
}
console.log('this.goodthis.good', _this5.good);
console.log("this.goodthis.good", _this5.good);
uni.showToast({
title: "请先选择规格!",
icon: "none"
@ -1031,7 +1031,7 @@ var _default = {
},
decodeHTML: function decodeHTML(str) {
if (!str) {
return '';
return "";
}
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.AFTERSALE_NATRUE = res.Data.AFTERSALE_NATRUE ? res.Data.AFTERSALE_NATRUE.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.good = res.Data;
@ -1348,7 +1348,6 @@ var _default = {
},
/*
* 绘制多行文本自动换行超出添加...
*
str:要绘制的字符串
canvas:canvas对象
initX:绘制字符串起始x坐标
@ -1458,7 +1457,7 @@ var _default = {
},
handleGetIsCollect: function handleGetIsCollect() {
var _this7 = this;
var collectGoodList = uni.getStorageSync('collectGood');
var collectGoodList = uni.getStorageSync("collectGood");
if (collectGoodList && collectGoodList.length > 0) {
var haveSame = false;
collectGoodList.forEach(function (item) {
@ -1510,7 +1509,7 @@ var _default = {
while (1) {
switch (_context4.prev = _context4.next) {
case 0:
console.log('页面开始加载,骨架屏状态:', _this8.isPageLoading);
console.log("页面开始加载,骨架屏状态:", _this8.isPageLoading);
systemInfo = uni.getSystemInfoSync();
height = systemInfo.safeAreaInsets.bottom;
_this8.safeHeight = Number(height);
@ -1541,14 +1540,13 @@ var _default = {
_context4.next = 16;
return _this8.getDetail(option.id);
case 16:
// 数据加载完成,立即隐藏骨架屏
console.log("数据加载完成,隐藏骨架屏");
_this8.isPageLoading = false;
_this8.handleGetIsCollect();
_this8.$utils.addUserBehaviorNew({
behaviorRecordDesc: "\u67E5\u770B\u5546\u54C1\u3010".concat(_this8.good.COMMODITY_NAME, "\u3011\u8BE6\u60C5")
});
// 数据加载完成,立即隐藏骨架屏
console.log('数据加载完成,隐藏骨架屏');
_this8.isPageLoading = false;
// if (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 {
width: 100%;
height: 64rpx;
background: #F5F6F7;
background: #f5f6f7;
position: fixed;
z-index: 2;
left: 0;
@ -719,7 +719,7 @@ button.data-v-0dc4ca38:after {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #716F69;
color: #716f69;
line-height: 32rpx;
text-align: justify;
font-style: normal;

View File

@ -11,30 +11,9 @@
{
"name": "pages/shopMallPage/shopType/index",
"pathName": "pages/shopMallPage/shopType/index",
"query": "leftId=1253&pageType=UnionMall&selectIndex=0",
"launchMode": "default",
"scene": null
},
{
"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
"query": "indexDefaultLeftSelect=3201",
"scene": null,
"launchMode": "default"
}
]
}