This commit is contained in:
ylj20011123 2026-01-08 18:15:57 +08:00
parent 9d00b8a53f
commit d110deb91b
67 changed files with 1467 additions and 1543 deletions

View File

@ -7,13 +7,13 @@
? `url(https://eshangtech.com/minTestImg/springPageBg.png)`
: `url(https://eshangtech.com/minTestImg/pageBg.png)`,
}"
>
>
<view
class="topBox"
:style="{
height: menu.bottom + 14 + 'px',
backgroundImage:
pageType === 'spring'
pageType === 'spring'
? `url(https://eshangtech.com/minTestImg/springPageBg.png)`
: `url(https://eshangtech.com/minTestImg/pageBg.png)`,
}"

File diff suppressed because it is too large Load Diff

View File

@ -3,43 +3,27 @@
<div class="header" :style="{ paddingTop: menu.top + 'px' }">
<view class="headerTop" :style="{ height: menu.height + 'px' }">
<view class="backArrowBox">
<image
class="backArrow"
:src="
pageType === 'UnionMall'
? '/static/images/home/backArrowblack.svg'
: '/static/images/home/backArrowblack.svg'
"
@click="handleBackHome"
/>
<image class="backArrow" :src="pageType === 'UnionMall'
? '/static/images/home/backArrowblack.svg'
: '/static/images/home/backArrowblack.svg'
" @click="handleBackHome" />
<view class="line"></view>
<!-- <image class="img" src="/static/images/home/export.svg" @click="handleShowExportBox" /> -->
<image
class="img"
style="width: 40rpx; height: 40rpx; margin-left: 8rpx"
src="https://eshangtech.com/cyy_DIB/backHomeICon.png"
@click="handleShowExportBox"
/>
<image class="img" style="width: 40rpx; height: 40rpx; margin-left: 8rpx"
src="https://eshangtech.com/cyy_DIB/backHomeICon.png" @click="handleShowExportBox" />
</view>
<!-- <image class="backArrow"
:src="pageType === 'UnionMall' ? '/static/images/home/backArrowblack.svg' : '/static/images/home/backArrowblack.svg'"
@click="handleBackHome" /> -->
<view
class="pageName"
:style="{ color: pageType === 'UnionMall' ? '#000' : '#000' }"
>{{ pageType === "UnionMall" ? "工会之家" : "分类" }}</view
>
<view class="pageName" :style="{ color: pageType === 'UnionMall' ? '#000' : '#000' }">{{ pageType ===
"UnionMall" ? "工会之家" : "分类" }}</view>
<view class="backArrowBox" style="border: none; background: transparent"></view>
</view>
<!-- <div class="pageTitle" :style="{ height: menu.height + 'px', lineHeight: menu.height + 'px' }">分类</div> -->
<div style="width: 100%; display: flex; align-items: center; margin-top: 28rpx">
<div
class="pageSearch"
@click="handleGoSearchShopPage"
style="width: calc(100% - 150rpx)"
>
<div class="pageSearch" @click="handleGoSearchShopPage" style="width: calc(100% - 150rpx)">
<!-- <input placeholder="请搜索商品" class="serach_input" v-model="searchText" confirm-type="search"
@confirm="handleSearch" /> -->
<div class="serach_input">请搜索商品</div>
@ -87,98 +71,64 @@
</view>
</view>
<!-- {{ visibleList.length }} -->
<div
class="pageContent"
v-if="showContent"
:style="{
height: `calc(100vh - 50px - ${safeHeight}px - ${
menu.top + 32 + 32 + 12 + 12
<div class="pageContent" v-if="showContent" :style="{
height: `calc(100vh - 50px - ${safeHeight}px - ${menu.top + 32 + 32 + 12 + 12
}px)`,
}"
>
<scroll-view
class="bigTabBox"
scroll-x
:scroll-into-view="bigTypeScroll"
:style="{ background: pageType === 'UnionMall' ? 'transparent' : 'transparent' }"
>
}">
<scroll-view class="bigTabBox" scroll-x :scroll-into-view="bigTypeScroll"
:style="{ background: pageType === 'UnionMall' ? 'transparent' : 'transparent' }">
<div class="scrollBox">
<!-- :style="{ width: (shopTypeList.length + 2) * 70 + 'px' }" -->
<div
class="bigTabItem"
@click="handleGoUnionMall"
v-if="pageType !== 'UnionMall' && user && user.INDUSTRY_MEMBERSHIP_ID"
>
<div class="bigTabItem" @click="handleGoUnionMall"
v-if="pageType !== 'UnionMall' && user && user.INDUSTRY_MEMBERSHIP_ID">
<!-- && user && user.INDUSTRY_MEMBERSHIP_ID -->
<!-- style="width: 70px" -->
<div class="itemBox">
<div class="normal">
<div class="imgBox">
<image
style="width: 100%; height: 100%"
src="https://eshangtech.com/caiyunyiImg/home/unionMallIcon.svg"
></image>
<image style="width: 100%; height: 100%"
src="https://eshangtech.com/caiyunyiImg/home/unionMallIcon.svg"></image>
</div>
</div>
<div class="tab_txt_normal">工会之家</div>
</div>
</div>
<div
class="bigTabItem"
:id="'item-' + item.UserdefinedType_Id"
v-for="(item, index) in shopTypeList"
:key="index"
@click="handleToggleTab(index)"
>
<div class="bigTabItem" :id="'item-' + item.UserdefinedType_Id" v-for="(item, index) in shopTypeList"
:key="index" @click="handleToggleTab(index)">
<!-- style="width: 70px" -->
<div class="itemBox">
<div :class="activeTabs === index ? 'tab_active normal' : 'normal'">
<div class="imgBox">
<image
style="width: 100%; height: 100%"
:src="item.UserdefinedType_ICO || '/static/images/home/defultImg.png'"
></image>
<image style="width: 100%; height: 100%"
:src="item.UserdefinedType_ICO || '/static/images/home/defultImg.png'"></image>
</div>
</div>
<div
:class="
activeTabs === index
? 'tab_txt_active tab_txt_normal'
: 'tab_txt_normal'
"
class="tab_txt"
>
<div :class="activeTabs === index
? 'tab_txt_active tab_txt_normal'
: 'tab_txt_normal'
" class="tab_txt">
{{ item.UserdefinedType_Name }}
</div>
</div>
</div>
<div
class="bigTabItem"
@click="handleGoPointsMall"
v-if="pageType !== 'UnionMall'"
>
<div class="bigTabItem" @click="handleGoPointsMall" v-if="pageType !== 'UnionMall'">
<!-- style="width: 70px" -->
<div class="itemBox">
<div :class="activeTabs === 999999 ? 'tab_active normal' : 'normal'">
<div class="imgBox">
<image
style="width: 100%; height: 100%"
:src="'https://eshangtech.com/caiyunyiImg/home/markShopIcon.png'"
></image>
<image style="width: 100%; height: 100%"
:src="'https://eshangtech.com/caiyunyiImg/home/markShopIcon.png'"></image>
</div>
</div>
<div
:class="
activeTabs === 999999
? 'tab_txt_active tab_txt_normal'
: 'tab_txt_normal'
"
>
<div :class="activeTabs === 999999
? 'tab_txt_active tab_txt_normal'
: 'tab_txt_normal'
">
积分商城
</div>
</div>
@ -189,82 +139,49 @@
<div class="shopListBox">
<!-- 左侧商品种类 -->
<div class="smallShopList">
<scroll-view
class="scrollShopBox"
scroll-y
scroll-with-animation="true"
:scroll-into-view="leftToView"
:show-scrollbar="false"
>
<div
:class="
leftToView === 'left_' + index + '_' + item.USERDEFINEDTYPE_ID
? 'smallShopItem selectShopItem'
: 'smallShopItem'
"
v-for="(item, index) in leftTypeList"
:key="index"
:id="'left_' + index + '_' + item.USERDEFINEDTYPE_ID"
@click="catClickFn($event, index, item)"
>
<scroll-view class="scrollShopBox" scroll-y scroll-with-animation="true" :scroll-into-view="leftToView"
:show-scrollbar="false">
<div :class="leftToView === 'left_' + index + '_' + item.USERDEFINEDTYPE_ID
? 'smallShopItem selectShopItem'
: 'smallShopItem'
" v-for="(item, index) in leftTypeList" :key="index"
:id="'left_' + index + '_' + item.USERDEFINEDTYPE_ID" @click="catClickFn($event, index, item)">
<div class="smallItemTitle">
{{ item.USERDEFINEDTYPE_NAME }}
</div>
<!-- {{ index + 1 }} -->
<i
class="noticeNumber"
v-show="item.smallTypeCount && item.smallTypeCount > 0"
>{{ item.smallTypeCount }}</i
>
<i class="noticeNumber" v-show="item.smallTypeCount && item.smallTypeCount > 0">{{ item.smallTypeCount
}}</i>
</div>
</scroll-view>
</div>
<!-- 右侧商品详情 -->
<div class="shopDetailList" v-if="changBigTypeLoading">
<scroll-view
class="shopDetailScroll"
scroll-y
:scroll-top="topNum"
@scroll="onVirtualScroll"
:scroll-into-view="shopTopId"
:style="{
height: `calc(100vh - 50px - ${safeHeight}px - ${
menu.top + 32 + 32 + 12 + 12 + 23 + 95
}px)`,
}"
>
<scroll-view class="shopDetailScroll" scroll-y :scroll-top="topNum" @scroll="onVirtualScroll"
:scroll-into-view="shopTopId" :style="{
height: `calc(100vh - 50px - ${safeHeight}px - ${menu.top + 32 + 32 + 12 + 12 + 23 + 95
}px)`,
}">
<div :style="{ height: totalHeight + 'px', position: 'relative' }">
<div :id="'shopTop'"></div>
<div
v-for="(item, i) in visibleList"
:key="item.COMMODITY_ID"
class="shopDetailItem"
:style="{
position: 'absolute',
height: itemHeight + 'px',
top: (startIndex + i) * itemHeight + 'px',
width: '100%',
}"
@click="showDetail(item)"
>
<image
class="leftImg"
style="width: 90px; height: 90px"
:src="
item.IMAGE_PATH
? item.IMAGE_PATH.split(',') &&
item.IMAGE_PATH.split(',').length > 1
? item.IMAGE_PATH.split(',')[0]
: item.IMAGE_PATH
: item.IMAGE_PATHS
? item.IMAGE_PATHS
: '/static/images/home/defultImg.png'
"
:lazy-load="true"
@error="(e) => (e.target.src = '/static/images/home/defultImg.png')"
:key="item.COMMODITY_ID"
/>
<div v-for="(item, i) in visibleList" :key="item.COMMODITY_ID" class="shopDetailItem" :style="{
position: 'absolute',
height: itemHeight + 'px',
top: (startIndex + i) * itemHeight + 'px',
width: '100%',
}" @click="showDetail(item)">
<!-- {{ i + 1 }} -->
<image class="leftImg" style="width: 90px; height: 90px" :src="item.IMAGE_PATH
? item.IMAGE_PATH.split(',') &&
item.IMAGE_PATH.split(',').length > 1
? item.IMAGE_PATH.split(',')[0]
: item.IMAGE_PATH
: item.IMAGE_PATHS
? item.IMAGE_PATHS
: '/static/images/home/defultImg.png'
" :lazy-load="true" @error="(e) => (e.target.src = '/static/images/home/defultImg.png')"
:key="item.COMMODITY_ID" />
<div class="rightBox">
<p class="detailTitle">{{ item.COMMODITY_NAME }}</p>
@ -272,79 +189,51 @@
<div class="detailPrice">
<span class="priceUnit">¥</span>
<span class="number" style="font-size: 20px">
{{ item.bigNumber || "0" }}</span
>
<span class="number" style="font-size: 14px"
>.{{ item.smallNumber || "00" }}</span
>
{{ item.bigNumber || "0" }}</span>
<span class="number" style="font-size: 14px">.{{ item.smallNumber || "00" }}</span>
<span class="unit">/ {{ item.COMMODITY_UNIT }}</span>
<!-- <span class="marketPrice">市场价</span> -->
<!-- <span class="marketPriceValue">XXX</span> -->
<!-- <span class="unit">/ {{ item.COMMODITY_UNIT }}</span> -->
</div>
<div
v-if="
!item.bigNumber && !item.smallNumber
? user.TEST_MEMBER
? true
: false
: true
"
>
<div
v-if="item.SKULIST && item.SKULIST.length > 0"
class="specifications"
@click.stop="handleShowPopup(item)"
>
<div v-if="
!item.bigNumber && !item.smallNumber
? user.TEST_MEMBER
? true
: false
: true
">
<div v-if="item.SKULIST && item.SKULIST.length > 0" class="specifications"
@click.stop="handleShowPopup(item)">
选规格
<text class="specificationsCount" v-if="item.count > 0">{{
item.count
}}</text>
</div>
<div class="addReduceBox" v-else>
<div
class="reduceShopCar"
@click.stop="touchReduce($event, item)"
v-if="item.showReduce"
>
<img
class="optionBtn"
:src="
pageType === 'UnionMall'
? '/static/images/home/newReduce.png'
: '/static/images/home/newReduce.png'
"
/>
<div class="reduceShopCar" @click.stop="touchReduce($event, item)" v-if="item.showReduce">
<img class="optionBtn" :src="pageType === 'UnionMall'
? '/static/images/home/newReduce.png'
: '/static/images/home/newReduce.png'
" />
</div>
<span class="itemCount" v-if="item.count && item.count > 0">{{
item.count
}}</span>
<div
v-if="item.COMMODITY_STOCK > 0 && activeTabs !== 999999"
class="addShopCar"
@click.stop="touchOnGoods($event, item)"
:id="
'add_' +
<div v-if="item.COMMODITY_STOCK > 0 && activeTabs !== 999999" class="addShopCar"
@click.stop="touchOnGoods($event, item)" :id="'add_' +
item.SELLERCOMMODITY_ID +
'_' +
item.SELLERCOMMODITYTYPE_ID
"
>
<img
class="optionBtn"
:src="
pageType === 'UnionMall'
? 'https://eshangtech.com/caiyunyiImg/home/newAddIcon.png'
: 'https://eshangtech.com/caiyunyiImg/home/newAddIcon.png'
"
/>
">
<img class="optionBtn" :src="pageType === 'UnionMall'
? 'https://eshangtech.com/caiyunyiImg/home/newAddIcon.png'
: 'https://eshangtech.com/caiyunyiImg/home/newAddIcon.png'
" />
</div>
<div v-if="activeTabs === 999999"></div>
<div
v-if="item.COMMODITY_STOCK === 0 || !item.COMMODITY_STOCK"
class="shopState"
>
<div v-if="item.COMMODITY_STOCK === 0 || !item.COMMODITY_STOCK" class="shopState">
已售罄
</div>
</div>
@ -352,10 +241,8 @@
</div>
<div class="marketBottom" v-if="item.COMMODITY_RETAILPRICE">
<span class="marketPrice"
>市场价¥{{ item.COMMODITY_RETAILPRICE }}/
{{ item.COMMODITY_UNIT }}</span
>
<span class="marketPrice">市场价¥{{ item.COMMODITY_RETAILPRICE }}/
{{ item.COMMODITY_UNIT }}</span>
</div>
</div>
</div>
@ -372,20 +259,13 @@
<view class="shopPopupBox">
<div class="shopPopupContent">
<div class="detailTop">
<image
class="detailImg"
:src="
good.DEFAULT_IMG || good.IMAGE_PATH || '/static/images/home/defultImg.png'
"
/>
<image class="detailImg" :src="good.DEFAULT_IMG || good.IMAGE_PATH || '/static/images/home/defultImg.png'
" />
<div class="box">
<div class="nameTop">
<text class="name">{{ good.COMMODITY_NAME }}</text>
<image
class="closeIcon"
@click="handleClosePop"
src="https://eshangtech.com/ShopICO/ahyd-BID/examine/close.svg"
/>
<image class="closeIcon" @click="handleClosePop"
src="https://eshangtech.com/ShopICO/ahyd-BID/examine/close.svg" />
</div>
<div class="priceBox">
<text class="priceIcon"></text>
@ -407,16 +287,9 @@
<div class="subtract" @click="handleDetailSubtract($event, good)">
<image class="img" src="/static/images/home/subtract.svg"></image>
</div>
<input
class="cart-count"
confirm-type="done"
type="digit"
:maxlength="inputMaxLength"
style="background: #fff; text-align: center; width: 100px"
placeholder="0"
:value="good.count"
@input="handleNumber"
/>
<input class="cart-count" confirm-type="done" type="digit" :maxlength="inputMaxLength"
style="background: #fff; text-align: center; width: 100px" placeholder="0" :value="good.count"
@input="handleNumber" />
<div class="subtract" @click="handleDetailAdd($event, good)">
<image class="img" src="/static/images/home/addIcon.svg"></image>
</div>
@ -427,13 +300,10 @@
<div class="sizeTitle">规格</div>
<scroll-view :scroll-x="true" :scroll-y="true" class="sizeScrollBox">
<div class="sizeList">
<div
:class="
good.RTCOMMODITY_MULTI_ID === item.RTCOMMODITY_MULTI_ID
? 'sizeItem selectSizeItem'
: 'sizeItem'
"
:style="{
<div :class="good.RTCOMMODITY_MULTI_ID === item.RTCOMMODITY_MULTI_ID
? 'sizeItem selectSizeItem'
: 'sizeItem'
" :style="{
background:
item.COMMODITY_STOCK > 0
? good.RTCOMMODITY_MULTI_ID === item.RTCOMMODITY_MULTI_ID
@ -446,11 +316,8 @@
? '#1890ff'
: '#000'
: '#a4a4a4',
}"
v-for="(item, index) in good.SKULIST"
:key="index"
@click="handleChangeSelectSKULIST(item.RTCOMMODITY_MULTI_ID, item)"
>
}" v-for="(item, index) in good.SKULIST" :key="index"
@click="handleChangeSelectSKULIST(item.RTCOMMODITY_MULTI_ID, item)">
{{ item.COMMODITY_NAME }}
</div>
<!-- <div class="sizeItem">{{ good.COMMODITY_UNIT }}</div> -->
@ -458,12 +325,8 @@
</scroll-view>
</div>
<div class="descBox">
<input
class="desc"
:value="good.SALEDETAIL_DESC"
placeholder="请填写商品备注"
@input="handleDesc($event, good)"
/>
<input class="desc" :value="good.SALEDETAIL_DESC" placeholder="请填写商品备注"
@input="handleDesc($event, good)" />
</div>
<view class="rightBtn">
@ -492,46 +355,26 @@
<uni-popup ref="priceRangeRef" @maskClick="handleMaskClick">
<view class="priceRangeBox">
<image
class="closeIcon"
src="/static/images/home/closeIcon.svg"
@click="handleClosePricePopup"
/>
<image class="closeIcon" src="/static/images/home/closeIcon.svg" @click="handleClosePricePopup" />
<view class="sortBox">
<view class="sortItemBox">
<view class="sortItemTitle">排序类别</view>
<picker
class="sortItemValue"
@change="handleChangeShopSort"
:value="selectShopSort"
:range="shopSortTypeList"
range-key="label"
>
<picker class="sortItemValue" @change="handleChangeShopSort" :value="selectShopSort"
:range="shopSortTypeList" range-key="label">
<view class="picker">
{{ shopSortTypeList[selectShopSort].label }}
<image
class="pickerIcon"
src="https://eshangtech.com/caiyunyiImg/bottomArrow.png"
/>
<image class="pickerIcon" src="https://eshangtech.com/caiyunyiImg/bottomArrow.png" />
</view>
</picker>
</view>
<view class="sortItemBox">
<view class="sortItemTitle">排序类型</view>
<picker
class="sortItemValue"
@change="handleChangeSortType"
:value="selectSortType"
:range="sortTypeList"
range-key="label"
>
<picker class="sortItemValue" @change="handleChangeSortType" :value="selectSortType" :range="sortTypeList"
range-key="label">
<view class="picker">
{{ sortTypeList[selectSortType].label }}
<image
class="pickerIcon"
src="https://eshangtech.com/caiyunyiImg/bottomArrow.png"
/>
<image class="pickerIcon" src="https://eshangtech.com/caiyunyiImg/bottomArrow.png" />
</view>
</picker>
</view>
@ -546,12 +389,8 @@
</view>
</uni-popup>
<shop-tabbar
:page="'/pages/shopMallPage/shopType/index'"
:pageType="pageType"
:shopCarLength="shopCarListLength"
:comeForm="comeForm"
/>
<shop-tabbar :page="'/pages/shopMallPage/shopType/index'" :pageType="pageType" :shopCarLength="shopCarListLength"
:comeForm="comeForm" />
</view>
</template>
@ -1128,6 +967,123 @@ export default {
handleClosePop() {
this.$refs.shopPopup.close();
},
async handleGetShowShopType(type, typeList) {
// type 1 type 2
let _this = this
let data = []
let showShopTypeList = type === '1' ? uni.getStorageSync("showShopTypeList") : uni.getStorageSync("UnionMallShowShopTypeList");
let res = []
if (showShopTypeList && showShopTypeList.length > 0) {
data = showShopTypeList
if (data && data.length > 0) {
data.forEach((item) => {
if (item.SERVERPARTSHOP_ID === type) {
res.push(item.USERDEFINEDTYPE_ID)
}
});
}
_this.$api.$posMemberPost("/MallBasic/GetNestingUSERDEFINEDTYPEList", {
OWNERUNIT_ID: 911,
GOODSTYPE: 4000,
PROVINCE_CODE: "",
USERDEFINEDTYPE_STATE: 1,
SearchKey: "",
type: 'encryption'
}).then((result) => {
let list = _this.$utils.wrapTreeNode(result.Result_Data.List)
console.log('1111', list);
let newRes = []
if (list && list.length > 0) {
list.forEach((item) => {
if (item.SERVERPARTSHOP_ID === type) {
newRes.push(item.USERDEFINEDTYPE_ID)
}
});
}
//
if (JSON.stringify(showShopTypeList) !== JSON.stringify(list)) {
console.log('2222');
if (type === '1') {
console.log('3333', newRes);
uni.setStorageSync("showShopTypeList", list);
let resList = [];
if (typeList && typeList.length > 0) {
typeList.forEach((item) => {
if (newRes.indexOf(item.UserdefinedType_Id) !== -1) {
resList.push(item);
}
});
}
console.log('4444', resList);
_this.shopTypeList = resList;
_this.$forceUpdate();
if (_this.indexDefaultLeftSelect !== -1) {
let bigTab = _this.findRootIndexByUserdefinedTypeId(
resList,
Number(_this.indexDefaultLeftSelect)
);
console.log("bigTabbigTabbigTab", bigTab);
_thisthis.activeTabs = Number(bigTab) === -1 ? _this.activeTabs : Number(bigTab);
}
if (_this.activeTabs === 999999) {
_this.handleGoPointsMall();
} else {
_this.handleGetAllShopItem(resList[_this.activeTabs].UserdefinedType_Id, type);
}
} else {
uni.setStorageSync("UnionMallShowShopTypeList", list);
let resList = [];
if (typeList && typeList.length > 0) {
typeList.forEach((item) => {
if (newRes.indexOf(item.UserdefinedType_Id) !== -1) {
if (item.UserdefinedType_Id === 1253) {
resList.unshift(item);
} else {
resList.push(item);
}
}
});
}
_this.shopTypeList = resList;
_this.$forceUpdate();
_this.handleGetAllShopItem(resList[_this.activeTabs].UserdefinedType_Id);
}
}
})
} else {
data = await this.$api.$posMemberPost("/MallBasic/GetNestingUSERDEFINEDTYPEList", {
OWNERUNIT_ID: 911,
GOODSTYPE: 4000,
PROVINCE_CODE: "",
USERDEFINEDTYPE_STATE: 1,
SearchKey: "",
type: 'encryption'
})
let list = _this.$utils.wrapTreeNode(data.Result_Data.List)
console.log('要显示的分类', list);
if (type === '1') {
uni.setStorageSync("showShopTypeList", list);
} else {
uni.setStorageSync("UnionMallShowShopTypeList", list);
}
if (list && list.length > 0) {
list.forEach((item) => {
if (item.SERVERPARTSHOP_ID === type) {
res.push(item.USERDEFINEDTYPE_ID)
}
});
}
}
return res
},
//
async handleGetUnionMallShopType() {
// const req = {
@ -1145,7 +1101,10 @@ export default {
// const data = await this.$api.getCoop(req);
let typeList = data.Data.List;
let resList = [];
let indexOfList = [1249, 1250, 1253, 3176];
//
let indexOfList = await this.handleGetShowShopType('2', typeList)
// let indexOfList = [1249, 1250, 1253, 3176];
if (typeList && typeList.length > 0) {
typeList.forEach((item) => {
if (indexOfList.indexOf(item.UserdefinedType_Id) !== -1) {
@ -1302,6 +1261,7 @@ export default {
});
typeList = data.Data.List;
}
console.log('typeListtypeListtypeList', JSON.parse(JSON.stringify(typeList)));
this.handleGetShopTypeShowData(typeList, type);
},
@ -1341,10 +1301,13 @@ export default {
return -1;
},
//
handleGetShopTypeShowData(typeList, type) {
async handleGetShopTypeShowData(typeList, type) {
// type 1 2
let resList = [];
let indexOfList = [3186, 3175, 4597, 4797];
let indexOfList = await this.handleGetShowShopType('1', typeList)
console.log('indexOfListindexOfListindexOfList', indexOfList);
// let indexOfList = [3186, 3175, 4597, 4797];
if (typeList && typeList.length > 0) {
typeList.forEach((item) => {
if (indexOfList.indexOf(item.UserdefinedType_Id) !== -1) {
@ -1354,11 +1317,6 @@ export default {
}
this.shopTypeList = resList;
console.log(
"this.shopTypeListthis.shopTypeList",
JSON.parse(JSON.stringify(this.shopTypeList))
);
if (this.indexDefaultLeftSelect !== -1) {
let bigTab = this.findRootIndexByUserdefinedTypeId(
resList,
@ -1407,17 +1365,16 @@ export default {
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
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"}`,
? "COMMODITY_EN"
: this.selectShopSort === 3
? "OPERATE_DATE"
: ""
} ${this.selectSortType === 0 ? "asc" : "desc"}`,
});
} else {
let url =
@ -1443,6 +1400,7 @@ export default {
let list = data.Data.List;
console.log("list接口返回的初始值", JSON.parse(JSON.stringify(list)));
console.log("this.shopTypeList ", JSON.parse(JSON.stringify(this.shopTypeList)));
console.log("id", JSON.parse(JSON.stringify(id)));
let thisAllType = [];
if (this.shopTypeList && this.shopTypeList.length > 0) {
@ -1480,18 +1438,25 @@ export default {
}
// thisAllType thisAllType
// let COMMODITYLISTList = []
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;
// if (subItem.COMMODITYLIST && subItem.COMMODITYLIST.length > 0) {
// subItem.COMMODITYLIST.forEach((thirdItem) => {
// COMMODITYLISTList.push(thirdItem.COMMODITY_NAME)
// })
// }
}
});
}
});
}
// console.log('COMMODITYLISTListCOMMODITYLISTList', COMMODITYLISTList);
console.log("thisAllTypethisAllType2", JSON.parse(JSON.stringify(thisAllType)));
let leftIndex = -1;

View File

@ -10,8 +10,8 @@
paddingTop: menu.top + menu.height + 'px',
backgroundImage: 'url(https://eshangtech.com/minTestImg/pageBg.png)',
backgroundSize: '100% 100vh',
paddingBottom: '16rpx'
}">
<!-- paddingBottom: '16rpx' -->
<view class="headerTop" :style="{
height: menu.height + menu.top + 4 + 'px',
paddingTop: menu.top + 'px',
@ -46,20 +46,7 @@
</view>
<scroll-view class="typeBox" scroll-x v-if="showContent">
<div :class="'contentBox'" :style="{
height:
shopTypeList.length < 5
? '144rpx'
: shopTypeList.length === 5
? Math.ceil(6 / 5) * 144 +
(Math.ceil(6 / 5) - 1) * 42 +
60 +
'rpx'
: Math.ceil(shopTypeList.length / 5) * 144 +
(Math.ceil(shopTypeList.length / 5) - 1) * 42 +
60 +
'rpx',
}">
<div :class="'contentBox'">
<!-- height:
shopTypeList.length < 5
? '144rpx'
@ -919,7 +906,9 @@ export default {
console.log("handleGetShopBigType", data);
let typeList = data.Data.List || [];
let resList = [];
let indexOfList = [1253, 1249, 1250, 3176];
// let indexOfList = [1253, 1249, 1250, 3176];
let indexOfList = await this.handleGetShowShopType('2', typeList)
if (typeList && typeList.length > 0) {
typeList.forEach((item) => {
@ -1028,6 +1017,85 @@ export default {
this.isFirstLoad = true;
},
methods: {
async handleGetShowShopType(type, typeList) {
// type 1 type 2
let _this = this
let data = []
let showShopTypeList = uni.getStorageSync("UnionMallShowShopTypeList");
let res = []
if (showShopTypeList && showShopTypeList.length > 0) {
data = showShopTypeList
if (data && data.length > 0) {
data.forEach((item) => {
if (item.SERVERPARTSHOP_ID === type) {
res.push(item.USERDEFINEDTYPE_ID)
}
});
}
_this.$api.$posMemberPost("/MallBasic/GetNestingUSERDEFINEDTYPEList", {
OWNERUNIT_ID: 911,
GOODSTYPE: 4000,
PROVINCE_CODE: "",
USERDEFINEDTYPE_STATE: 1,
SearchKey: "",
type: 'encryption'
}).then((result) => {
let list = _this.$utils.wrapTreeNode(result.Result_Data.List)
console.log('1111', list);
let newRes = []
let resList = []
if (list && list.length > 0) {
list.forEach((item) => {
if (item.SERVERPARTSHOP_ID === type) {
newRes.push(item.USERDEFINEDTYPE_ID)
}
});
}
//
if (JSON.stringify(showShopTypeList) !== JSON.stringify(list)) {
if (typeList && typeList.length > 0) {
typeList.forEach((item) => {
if (newRes.indexOf(item.UserdefinedType_Id) !== -1) {
resList.push(item);
}
});
}
_this.sortType = Math.floor(Math.random() * _this.sortTypeList.length);
_this.shopTypeList = resList;
//
_this.handleGetSortList();
//
_this.handleGetUnionShopList();
}
})
} else {
data = await this.$api.$posMemberPost("/MallBasic/GetNestingUSERDEFINEDTYPEList", {
OWNERUNIT_ID: 911,
GOODSTYPE: 4000,
PROVINCE_CODE: "",
USERDEFINEDTYPE_STATE: 1,
SearchKey: "",
type: 'encryption'
})
let list = _this.$utils.wrapTreeNode(data.Result_Data.List)
console.log('要显示的分类', list);
uni.setStorageSync("UnionMallShowShopTypeList", list);
if (list && list.length > 0) {
list.forEach((item) => {
if (item.SERVERPARTSHOP_ID === type) {
res.push(item.USERDEFINEDTYPE_ID)
}
});
}
}
return res
},
//
handleChangeSortType(e) {
this.selectSortType = Number(e.detail.value)
@ -2436,7 +2504,7 @@ export default {
.rowBox {
width: 20%;
height: 144rpx;
height: 100%;
// width: 96rpx;
// height: 154rpx;
@ -2575,7 +2643,7 @@ export default {
.rowBox {
width: 120rpx;
height: 134rpx;
height: 100%;
display: inline-block;
//display: flex;
@ -2741,7 +2809,7 @@ export default {
.rowBox {
width: 20%;
height: 144rpx;
height: 100%;
// width: 96rpx;
// height: 154rpx;

View File

@ -1,18 +1,11 @@
<template>
<view class="main" :class="{ refreshing: isRefreshing }">
<view class="fixedHeader" :style="{ height: menu.bottom + 16 + 'px' }">
<image
class="YDIcon"
src="https://eshangtech.com/caiyunyiImg/home/yunnanLogo.svg"
/>
<image class="YDIcon" src="https://eshangtech.com/caiyunyiImg/home/yunnanLogo.svg" />
</view>
<!-- 用户页面骨架屏 -->
<view
class="user-skeleton"
v-if="!showContent"
:style="{ paddingTop: menu.bottom + 16 + 'px' }"
>
<view class="user-skeleton" v-if="!showContent" :style="{ paddingTop: menu.bottom + 16 + 'px' }">
<!-- 用户信息骨架 -->
<view class="skeleton-user-info">
<view class="skeleton-avatar skeleton"></view>
@ -68,43 +61,31 @@
<view class="userInfoBox">
<!-- 头像内容 -->
<view class="headerImgBox">
<button
class="avatarBtn"
open-type="chooseAvatar"
@chooseavatar="onChooseAvatar"
v-if="userInfo && userInfo.MEMBERSHIP_ID"
>
<image
class="headerImg"
:src="
WXProfile ||
(userInfo && userInfo.MEMBERSHIP_HEADIMAGEURL
? userInfo.MEMBERSHIP_HEADIMAGEURL
: '')
"
/>
<button class="avatarBtn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"
v-if="userInfo && userInfo.MEMBERSHIP_ID">
<image class="headerImg" :src="WXProfile ||
(userInfo && userInfo.MEMBERSHIP_HEADIMAGEURL
? userInfo.MEMBERSHIP_HEADIMAGEURL
: '')
" />
</button>
</view>
<view class="userInfo">
<view class="userInfoLeft">
<view class="userInfoLeftTop">
<view class="userName"
>{{
inShop === 2
? userInfo.MEMBERSHIP_NAME || user.MEMBERSHIP_NAME || "微信用户"
: userInfo.Membership_NickName ||
userInfo.NICK_NAME ||
userInfo.MEMBERSHIP_NAME ||
"未填写名称"
}}
<view class="userName">{{
inShop === 2
? userInfo.MEMBERSHIP_NAME || user.MEMBERSHIP_NAME || "微信用户"
: userInfo.Membership_NickName ||
userInfo.NICK_NAME ||
userInfo.MEMBERSHIP_NAME ||
"未填写名称"
}}
</view>
<view class="userLevelBox" style="width: 100%; min-height: 40rpx">
<view class="userLevel" v-if="user.MEMBERSHIP_LEVEL_TEXT">
<image
class="userLevelIcon"
src="https://eshangtech.com/caiyunyiImg/levelIcon2.png"
/>
<image class="userLevelIcon" src="https://eshangtech.com/caiyunyiImg/levelIcon2.png" />
<view class="userLevelName">{{
user.MEMBERSHIP_LEVEL_TEXT || ""
}}</view>
@ -125,10 +106,7 @@
</view>
<view class="userInfoRight" @click="handleGoUserCode">
<image
class="userCodeImg"
src="https://eshangtech.com/caiyunyiImg/userInfoCode.png"
/>
<image class="userCodeImg" src="https://eshangtech.com/caiyunyiImg/userInfoCode.png" />
<view class="userCodeText">会员码</view>
</view>
</view>
@ -137,47 +115,34 @@
<!-- 优惠券信息 -->
<view class="couponBox">
<view class="CouponContent">
<view
class="CouponItem"
@click="handleGoCoupon"
:style="{
width:
userInfo && userInfo.INDUSTRY_MEMBERSHIP_ID
? 'calc((100% - 2px) / 3)'
: 'calc((100% - 2px) / 2)',
}"
>
<view class="CouponItem" @click="handleGoCoupon" :style="{
width:
userInfo && userInfo.INDUSTRY_MEMBERSHIP_ID
? 'calc((100% - 2px) / 3)'
: 'calc((100% - 2px) / 2)',
}">
<view class="CouponItemValue">{{ userInfo.COUPON_COUNT || 0 }}</view>
<view class="CouponItemLabel">优惠券</view>
</view>
<view class="line"></view>
<view
class="CouponItem"
@click="handleGoPoint"
:style="{
width:
userInfo && userInfo.INDUSTRY_MEMBERSHIP_ID
? 'calc((100% - 2px) / 3)'
: 'calc((100% - 2px) / 2)',
}"
>
<view class="CouponItem" @click="handleGoPoint" :style="{
width:
userInfo && userInfo.INDUSTRY_MEMBERSHIP_ID
? 'calc((100% - 2px) / 3)'
: 'calc((100% - 2px) / 2)',
}">
<view class="CouponItemValue">{{
$utils.handleFormatNumber(userInfo.MEMBERSHIP_POINT || 0)
}}</view>
<view class="CouponItemLabel">积分</view>
</view>
<view class="line" v-if="userInfo && userInfo.INDUSTRY_MEMBERSHIP_ID"></view>
<view
class="CouponItem"
@click="hanldGoBalance"
v-if="userInfo && userInfo.INDUSTRY_MEMBERSHIP_ID"
:style="{
width:
userInfo && userInfo.INDUSTRY_MEMBERSHIP_ID
? 'calc((100% - 2px) / 3)'
: 'calc((100% - 2px) / 2)',
}"
>
<view class="CouponItem" @click="hanldGoBalance" v-if="userInfo && userInfo.INDUSTRY_MEMBERSHIP_ID" :style="{
width:
userInfo && userInfo.INDUSTRY_MEMBERSHIP_ID
? 'calc((100% - 2px) / 3)'
: 'calc((100% - 2px) / 2)',
}">
<view class="CouponItemValue">{{
$utils.handleFormatNumber(userInfo.ACCOUNT_BALANCE || 0)
}}</view>
@ -198,49 +163,34 @@
</view>
<view class="basicBoxContent">
<view class="basicItem" @click="handleGoCollect">
<image
class="basicItemImg"
src="https://eshangtech.com/caiyunyiImg/productCollection.png"
/>
<image class="basicItemImg" src="https://eshangtech.com/caiyunyiImg/productCollection.png" />
<view class="basicText">商品收藏</view>
</view>
<view class="basicItem" @click="handleGoNormal({ value: 1 })">
<image
class="basicItemImg"
src="https://eshangtech.com/caiyunyiImg/MemberBenefitsIcon.png"
/>
<image class="basicItemImg" src="https://eshangtech.com/caiyunyiImg/MemberBenefitsIcon.png" />
<view class="basicText">会员权益</view>
</view>
<view class="basicItem" @click="handleGoBindCar">
<image
class="basicItemImg"
src="https://eshangtech.com/caiyunyiImg/bindCarIcon.png"
/>
<image class="basicItemImg" src="https://eshangtech.com/caiyunyiImg/bindCarIcon.png" />
<view class="basicText">绑定车辆</view>
</view>
<!-- <view class="basicItem" @click="handleGoPointsRedemption">
<view class="basicItem" @click="handleGoPointsRedemption">
<image class="basicItemImg" src="https://eshangtech.com/caiyunyiImg/pointsRedemption.png" />
<view class="basicText">积分兑换</view>
</view> -->
</view>
<!-- @click="handleGoNormal({ value: 3 })" -->
<!-- <view class="basicItem" >
<image class="basicItemImg" src="https://eshangtech.com/caiyunyiImg/suggestionFeedbackIcon.png" />
<view class="basicText">建议反馈</view>
</view> -->
<view class="basicItem" @click="handleGoShopCar">
<image
class="basicItemImg"
src="https://eshangtech.com/caiyunyiImg/shopCarIcon.png"
/>
<!-- <view class="basicItem" @click="handleGoShopCar">
<image class="basicItemImg" src="https://eshangtech.com/caiyunyiImg/shopCarIcon.png" />
<view class="basicText">购物车</view>
</view>
</view> -->
<view class="basicItem" @click="hanldGoConfig">
<image
class="basicItemImg"
src="https://eshangtech.com/caiyunyiImg/configIcon.png"
/>
<image class="basicItemImg" src="https://eshangtech.com/caiyunyiImg/configIcon.png" />
<view class="basicText">设置</view>
</view>
</view>
@ -250,18 +200,12 @@
<view class="userOrder">
<view class="userOrderTop" @click="handleGoOrder(0, '')">
<view class="userOrderTitle">我的订单</view>
<image
class="userOrderMoreIcon"
src="https://eshangtech.com/caiyunyiImg/moreIcon.png"
/>
<image class="userOrderMoreIcon" src="https://eshangtech.com/caiyunyiImg/moreIcon.png" />
</view>
<view class="userOrderBottom">
<view class="userOrderBottomItem" @click="handleGoOrder(1, '')">
<img
class="userOrderBottomItemImg"
src="/static/images/home/obligationIcon.svg"
/>
<img class="userOrderBottomItemImg" src="/static/images/home/obligationIcon.svg" />
<view class="userOrderBottomItemText">未付款</view>
<view class="orderCount" v-if="mallOrderCountList[0] > 0">{{
mallOrderCountList[0]
@ -269,10 +213,7 @@
</view>
<view class="userOrderBottomItem" @click="handleGoOrder(2, '')">
<img
class="userOrderBottomItemImg"
src="/static/images/home/shipmentIcon.svg"
/>
<img class="userOrderBottomItemImg" src="/static/images/home/shipmentIcon.svg" />
<view class="userOrderBottomItemText">待发货</view>
<view class="orderCount" v-if="mallOrderCountList[1] > 0">{{
mallOrderCountList[1]
@ -280,10 +221,7 @@
</view>
<view class="userOrderBottomItem" @click="handleGoOrder(3, '')">
<img
class="userOrderBottomItemImg"
src="/static/images/home/receiptOfGoods.svg"
/>
<img class="userOrderBottomItemImg" src="/static/images/home/receiptOfGoods.svg" />
<view class="userOrderBottomItemText">待收货</view>
<view class="orderCount" v-if="mallOrderCountList[2] > 0">{{
mallOrderCountList[2]
@ -291,21 +229,12 @@
</view>
<view class="userOrderBottomItem" @click="handleGoOrder(4, '')">
<img
class="userOrderBottomItemImg"
src="/static/images/home/evaluatedIcon.svg"
/>
<img class="userOrderBottomItemImg" src="/static/images/home/evaluatedIcon.svg" />
<view class="userOrderBottomItemText">待评价</view>
</view>
<view
class="userOrderBottomItem"
@click="handleGo('/pages/order/buyOrder/index?type=6')"
>
<img
class="userOrderBottomItemImg"
src="/static/images/home/afterSales.svg"
/>
<view class="userOrderBottomItem" @click="handleGo('/pages/order/buyOrder/index?type=6')">
<img class="userOrderBottomItemImg" src="/static/images/home/afterSales.svg" />
<view class="userOrderBottomItemText">退换货</view>
</view>
</view>
@ -318,22 +247,15 @@
</view>
<view class="orderContent">
<view class="orderLeft">
<view
class="orderFunItem"
v-for="(item, index) in orderFunList"
:key="index"
@click="handleGoOrder(item.value, '')"
>
<view class="orderFunItem" v-for="(item, index) in orderFunList" :key="index"
@click="handleGoOrder(item.value, '')">
<image class="orderFunIcon" :src="item.src" />
<text class="orderFunText">{{ item.label }}</text>
</view>
</view>
<view class="orderRight">
<view
class="orderFunItem"
@click="handleGo(`/pages/order/buyOrder/index?type=6`)"
>
<view class="orderFunItem" @click="handleGo(`/pages/order/buyOrder/index?type=6`)">
<image class="orderFunIcon" src="/static/images/home/afterSales.svg" />
<text class="orderFunText">退换/售后</text>
</view>
@ -348,12 +270,8 @@
</view>
<view class="orderContent">
<view class="orderLeft">
<view
class="orderFunItem"
v-for="(item, index) in orderFunList"
:key="index"
@click="handleGoOrder(item.value, 'UnionMall')"
>
<view class="orderFunItem" v-for="(item, index) in orderFunList" :key="index"
@click="handleGoOrder(item.value, 'UnionMall')">
<image class="orderFunIcon" :src="item.src" />
<text class="orderFunText">{{ item.label }}</text>
</view>
@ -369,12 +287,8 @@
</view>
<view class="orderContent">
<view class="newOrderLeft" style="width: 100%; padding-right: 0">
<view
class="orderFunItem"
v-for="(item, index) in foodFunList"
:key="index"
@click="handleGoFoodOrder(item.value)"
>
<view class="orderFunItem" v-for="(item, index) in foodFunList" :key="index"
@click="handleGoFoodOrder(item.value)">
<image class="orderFunIcon" :src="item.src" />
<text class="orderFunText">{{ item.label }}</text>
<view class="orderCount" v-if="item.orderCount > 0">{{
@ -395,10 +309,7 @@
<view class="funItemText">会员权益</view>
</view>
<view class="funItemBox" @click="handleGoNormal({ value: 2 })">
<image
class="funItemImg"
src="https://eshangtech.com/caiyunyiImg/home/serviceIcon.svg"
/>
<image class="funItemImg" src="https://eshangtech.com/caiyunyiImg/home/serviceIcon.svg" />
<view class="funItemText">我的爱车</view>
</view>
<!-- @click="handleGoNormal({ value: 3 })" -->
@ -415,28 +326,17 @@
<view class="customerServiceContent">
<view class="customerServiceItem">
<button
class="no-border-btn"
hover-class="none"
hover-start-time="0"
hover-stay-time="0"
style="background-color: transparent; border-width: 0; padding: 0"
open-type="contact"
@contact="onContact"
>
<button class="no-border-btn" hover-class="none" hover-start-time="0" hover-stay-time="0"
style="background-color: transparent; border-width: 0; padding: 0" open-type="contact"
@contact="onContact">
<view class="customerServiceItemTitle">客服帮助</view>
<view class="customerServiceItemContent">伴您行程无忧</view>
</button>
</view>
<view
class="customerServiceItem customerServiceItemBg2"
@click="handleServiceHotline"
>
<view class="customerServiceItem customerServiceItemBg2" @click="handleServiceHotline">
<view class="customerServiceItemTitle">服务热线</view>
<view class="customerServiceItemContent" style="color: #182145"
>伴您行程无忧</view
>
<view class="customerServiceItemContent" style="color: #182145">伴您行程无忧</view>
</view>
</view>
</view>
@ -899,8 +799,8 @@ export default {
scale: 16, //
name: this.serviceDetail.SERVERPART_NAME,
// address: "", //
success(data) {},
fail(err) {},
success(data) { },
fail(err) { },
});
},
//
@ -1392,7 +1292,7 @@ export default {
package: "1672298991",
signType: "MD5",
paySign: data.Result_Data,
success(res) {},
success(res) { },
});
},
//
@ -1407,7 +1307,7 @@ export default {
url: "", //
}, //
corpId: "", //ID
success(res) {},
success(res) { },
});
} else if (value === 2) {
// 线
@ -1907,6 +1807,7 @@ export default {
// padding: 16rpx 0 0 0;
.userInfoLeftTop {
// display: flex;
// align-items: center;
.userName {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -135,224 +135,200 @@ var render = function () {
}
})
: null
var g1 = _vm.showContent ? _vm.shopTypeList.length : null
var g2 = _vm.showContent && !(g1 < 5) ? _vm.shopTypeList.length : null
var g3 = _vm.showContent && !(g1 < 5) && g2 === 5 ? Math.ceil(6 / 5) : null
var g4 = _vm.showContent && !(g1 < 5) && g2 === 5 ? Math.ceil(6 / 5) : null
var g5 =
_vm.showContent && !(g1 < 5) && !(g2 === 5)
? Math.ceil(_vm.shopTypeList.length / 5)
: null
var g6 =
_vm.showContent && !(g1 < 5) && !(g2 === 5)
? Math.ceil(_vm.shopTypeList.length / 5)
: null
var l1 = _vm.showContent
? _vm.__map(_vm.shopTypeList, function (item, index) {
var $orig = _vm.__get_orig(item)
var g7 =
_vm.pageType === "UnionMall" &&
index < Math.ceil(_vm.shopTypeList.length / 4 - 1) * 4
return {
$orig: $orig,
g7: g7,
}
})
: null
var g8 =
var g1 =
_vm.showContent && _vm.haveActivity && false && _vm.pageType !== "UnionMall"
? _vm.activityShopList && _vm.activityShopList.length > 0
: null
var g9 =
var g2 =
_vm.showContent &&
_vm.haveActivity &&
false &&
_vm.pageType !== "UnionMall" &&
g8
g1
? _vm.activityShopList.length
: null
var g10 =
var g3 =
_vm.showContent &&
_vm.pageType !== "UnionMall" &&
_vm.pageType !== "UnionMall"
? _vm.marketingCampaign.slice(0, 5).length
: null
var l2 =
var l1 =
_vm.showContent &&
_vm.pageType !== "UnionMall" &&
_vm.pageType !== "UnionMall"
? _vm.__map(_vm.marketingCampaign.slice(0, 5), function (item, index) {
var $orig = _vm.__get_orig(item)
var g11 = item.IMAGE_PATH
var g4 = item.IMAGE_PATH
? item.IMAGE_PATH.split(",") &&
item.IMAGE_PATH.split(",").length > 1
: null
var g12 = item.IMAGE_PATH && g11 ? item.IMAGE_PATH.split(",") : null
var g5 = item.IMAGE_PATH && g4 ? item.IMAGE_PATH.split(",") : null
return {
$orig: $orig,
g11: g11,
g12: g12,
g4: g4,
g5: g5,
}
})
: null
var g13 =
var g6 =
_vm.showContent &&
_vm.pageType !== "UnionMall" &&
_vm.pageType !== "UnionMall"
? _vm.weeklySpecialOffer.slice(0, 10).length
: null
var l3 =
var l2 =
_vm.showContent &&
_vm.pageType !== "UnionMall" &&
_vm.pageType !== "UnionMall"
? _vm.__map(_vm.weeklySpecialOffer.slice(0, 10), function (item, index) {
var $orig = _vm.__get_orig(item)
var g14 = item.IMAGE_PATH
var g7 = item.IMAGE_PATH
? item.IMAGE_PATH.split(",") &&
item.IMAGE_PATH.split(",").length > 1
: null
var g15 = item.IMAGE_PATH && g14 ? item.IMAGE_PATH.split(",") : null
var g8 = item.IMAGE_PATH && g7 ? item.IMAGE_PATH.split(",") : null
return {
$orig: $orig,
g7: g7,
g8: g8,
}
})
: null
var g9 =
_vm.showContent && _vm.pageType !== "UnionMall"
? _vm.specialOffersList.slice(0, 10).length
: null
var l3 =
_vm.showContent && _vm.pageType !== "UnionMall"
? _vm.__map(_vm.specialOffersList.slice(0, 10), function (item, index) {
var $orig = _vm.__get_orig(item)
var g10 = item.IMAGE_PATH
? item.IMAGE_PATH.split(",") &&
item.IMAGE_PATH.split(",").length > 1
: null
var g11 = item.IMAGE_PATH && g10 ? item.IMAGE_PATH.split(",") : null
return {
$orig: $orig,
g10: g10,
g11: g11,
}
})
: null
var g12 =
_vm.showContent && _vm.pageType === "UnionMall"
? _vm.newShopList && _vm.newShopList.length > 0
: null
var g13 =
_vm.showContent && _vm.pageType === "UnionMall" && g12
? _vm.hotShopList && _vm.hotShopList.length > 0
: null
var g14 =
_vm.showContent && _vm.pageType === "UnionMall" && g12 && !g13
? _vm.goodShopList && _vm.goodShopList.length > 0
: null
var l4 =
_vm.showContent && _vm.pageType === "UnionMall" && g12
? _vm.__map(_vm.newShopList, function (item, index) {
var $orig = _vm.__get_orig(item)
var g15 = _vm.goodShopList.length
return {
$orig: $orig,
g14: g14,
g15: g15,
}
})
: null
var g16 =
_vm.showContent && _vm.pageType !== "UnionMall"
? _vm.specialOffersList.slice(0, 10).length
: null
var l4 =
_vm.showContent && _vm.pageType !== "UnionMall"
? _vm.__map(_vm.specialOffersList.slice(0, 10), function (item, index) {
var $orig = _vm.__get_orig(item)
var g17 = item.IMAGE_PATH
? item.IMAGE_PATH.split(",") &&
item.IMAGE_PATH.split(",").length > 1
: null
var g18 = item.IMAGE_PATH && g17 ? item.IMAGE_PATH.split(",") : null
return {
$orig: $orig,
g17: g17,
g18: g18,
}
})
: null
var g19 =
_vm.showContent && _vm.pageType === "UnionMall"
? _vm.hotShopList && _vm.hotShopList.length > 0
: null
var g17 =
_vm.showContent && _vm.pageType === "UnionMall" && g16
? _vm.goodShopList && _vm.goodShopList.length > 0
: null
var g18 =
_vm.showContent && _vm.pageType === "UnionMall" && g16 && !g17
? _vm.newShopList && _vm.newShopList.length > 0
: null
var g20 =
_vm.showContent && _vm.pageType === "UnionMall" && g19
? _vm.hotShopList && _vm.hotShopList.length > 0
: null
var g21 =
_vm.showContent && _vm.pageType === "UnionMall" && g19 && !g20
? _vm.goodShopList && _vm.goodShopList.length > 0
: null
var l5 =
_vm.showContent && _vm.pageType === "UnionMall" && g19
? _vm.__map(_vm.newShopList, function (item, index) {
_vm.showContent && _vm.pageType === "UnionMall" && g16
? _vm.__map(_vm.hotShopList, function (item, index) {
var $orig = _vm.__get_orig(item)
var g22 = _vm.goodShopList.length
var g19 = _vm.goodShopList.length
return {
$orig: $orig,
g22: g22,
g19: g19,
}
})
: null
var g23 =
var g20 =
_vm.showContent && _vm.pageType === "UnionMall"
? _vm.hotShopList && _vm.hotShopList.length > 0
: null
var g24 =
_vm.showContent && _vm.pageType === "UnionMall" && g23
? _vm.goodShopList && _vm.goodShopList.length > 0
: null
var g25 =
_vm.showContent && _vm.pageType === "UnionMall" && g23 && !g24
var g21 =
_vm.showContent && _vm.pageType === "UnionMall" && g20
? _vm.hotShopList && _vm.hotShopList.length > 0
: null
var g22 =
_vm.showContent && _vm.pageType === "UnionMall" && g20 && !g21
? _vm.newShopList && _vm.newShopList.length > 0
: null
var l6 =
_vm.showContent && _vm.pageType === "UnionMall" && g23
? _vm.__map(_vm.hotShopList, function (item, index) {
_vm.showContent && _vm.pageType === "UnionMall" && g20
? _vm.__map(_vm.goodShopList, function (item, index) {
var $orig = _vm.__get_orig(item)
var g26 = _vm.goodShopList.length
var g23 = _vm.goodShopList.length
return {
$orig: $orig,
g23: g23,
}
})
: null
var g24 =
_vm.showContent && _vm.pageType !== "UnionMall"
? _vm.todayOffersList.slice(0, 10).length
: null
var l7 =
_vm.showContent && _vm.pageType !== "UnionMall"
? _vm.__map(_vm.todayOffersList.slice(0, 10), function (item, index) {
var $orig = _vm.__get_orig(item)
var g25 = !item.IMAGE_PATH
? item.IMAGE_PATHS && item.IMAGE_PATHS.split(",").length > 1
: null
var g26 = !item.IMAGE_PATH && g25 ? item.IMAGE_PATHS.split(",") : null
return {
$orig: $orig,
g25: g25,
g26: g26,
}
})
: null
var g27 =
_vm.showContent && _vm.pageType === "UnionMall"
? _vm.goodShopList && _vm.goodShopList.length > 0
: null
var g27 = _vm.showContent
? _vm.pageType !== "UnionMall" &&
_vm.productsList &&
_vm.productsList.length > 0
: null
var g28 =
_vm.showContent && _vm.pageType === "UnionMall" && g27
? _vm.hotShopList && _vm.hotShopList.length > 0
_vm.showContent && g27 && _vm.pageType !== "UnionMall"
? _vm.productsList.length
: null
var g29 =
_vm.showContent && _vm.pageType === "UnionMall" && g27 && !g28
? _vm.newShopList && _vm.newShopList.length > 0
: null
var l7 =
_vm.showContent && _vm.pageType === "UnionMall" && g27
? _vm.__map(_vm.goodShopList, function (item, index) {
var l8 =
_vm.showContent && _vm.pageType === "UnionMall"
? _vm.__map(_vm.showShopList, function (item, index) {
var $orig = _vm.__get_orig(item)
var g30 = _vm.goodShopList.length
var g29 = item.IMAGE_PATH
? item.IMAGE_PATH.split(",") &&
item.IMAGE_PATH.split(",").length > 1
: null
var g30 = item.IMAGE_PATH && g29 ? item.IMAGE_PATH.split(",") : null
return {
$orig: $orig,
g29: g29,
g30: g30,
}
})
: null
var g31 =
_vm.showContent && _vm.pageType !== "UnionMall"
? _vm.todayOffersList.slice(0, 10).length
: null
var l8 =
_vm.showContent && _vm.pageType !== "UnionMall"
? _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 g34 = _vm.showContent
? _vm.pageType !== "UnionMall" &&
_vm.productsList &&
_vm.productsList.length > 0
: null
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 g36 = item.IMAGE_PATH
? item.IMAGE_PATH.split(",") &&
item.IMAGE_PATH.split(",").length > 1
: null
var g37 = item.IMAGE_PATH && g36 ? item.IMAGE_PATH.split(",") : null
return {
$orig: $orig,
g36: g36,
g37: g37,
}
})
: null
var g38 =
_vm.showContent && _vm.pageType === "UnionMall"
? _vm.showShopList && _vm.showShopList.length > 0
: null
@ -398,36 +374,29 @@ var render = function () {
g1: g1,
g2: g2,
g3: g3,
g4: g4,
g5: g5,
g6: g6,
l1: l1,
g8: g8,
g9: g9,
g10: g10,
g6: g6,
l2: l2,
g13: g13,
g9: g9,
l3: l3,
g16: g16,
g12: g12,
g13: g13,
g14: g14,
l4: l4,
g19: g19,
g16: g16,
g17: g17,
g18: g18,
l5: l5,
g20: g20,
g21: g21,
l5: l5,
g23: g23,
g24: g24,
g25: g25,
g22: g22,
l6: l6,
g24: g24,
l7: l7,
g27: g27,
g28: g28,
g29: g29,
l7: l7,
g31: g31,
l8: l8,
g34: g34,
g35: g35,
l9: l9,
g38: g38,
g31: g31,
},
}
)
@ -1339,39 +1308,152 @@ var _default = {
// 拿到顶部商品大类的方法 实际要赋值到页面上去的方法
handleShowPageShopBigType: function handleShowPageShopBigType(typeList) {
var _this9 = this;
var resList = [];
// 如果有活动的话就有值
var activityObj = {};
var indexOfList = [3186, 3175, 4597, 4797];
if (typeList && typeList.length > 0) {
typeList.forEach(function (item) {
if (indexOfList.indexOf(item.UserdefinedType_Id) !== -1) {
resList.push(item);
}
if (item.UserdefinedType_Id === 1355) {
_this9.haveActivity = true;
activityObj = item;
}
});
}
if (this.haveActivity) {
// resList.push(activityObj);
this.activityObj = activityObj;
}
this.shopTypeList = resList;
this.selectProducts = resList[0].UserdefinedType_Id;
},
// 拿到活动的商品列表 可能不调用 有判断的
handleGetActivityList: function handleGetActivityList() {
var _this10 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
var data, list, res;
var resList, activityObj, indexOfList;
return _regenerator.default.wrap(function _callee8$(_context8) {
while (1) {
switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return _this10.$api.$javaGet("/third-party/getWeChatGetMallGoodsInfoExclude",
resList = []; // 如果有活动的话就有值
activityObj = {}; // let indexOfList = [3186, 3175, 4597, 4797];
_context8.next = 4;
return _this9.handleGetShowShopType('1', typeList);
case 4:
indexOfList = _context8.sent;
if (typeList && typeList.length > 0) {
typeList.forEach(function (item) {
if (indexOfList.indexOf(item.UserdefinedType_Id) !== -1) {
resList.push(item);
}
if (item.UserdefinedType_Id === 1355) {
_this9.haveActivity = true;
activityObj = item;
}
});
}
if (_this9.haveActivity) {
// resList.push(activityObj);
_this9.activityObj = activityObj;
}
_this9.shopTypeList = resList;
_this9.selectProducts = resList[0].UserdefinedType_Id;
case 9:
case "end":
return _context8.stop();
}
}
}, _callee8);
}))();
},
handleGetShowShopType: function handleGetShowShopType(type, typeList) {
var _this10 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
var _this, data, showShopTypeList, res, list;
return _regenerator.default.wrap(function _callee9$(_context9) {
while (1) {
switch (_context9.prev = _context9.next) {
case 0:
// type 1 精选商城 type 2 工会商城
_this = _this10;
data = [];
showShopTypeList = uni.getStorageSync("showShopTypeList");
res = [];
if (!(showShopTypeList && showShopTypeList.length > 0)) {
_context9.next = 10;
break;
}
data = showShopTypeList;
if (data && data.length > 0) {
data.forEach(function (item) {
if (item.SERVERPARTSHOP_ID === type) {
res.push(item.USERDEFINEDTYPE_ID);
}
});
}
_this.$api.$posMemberPost("/MallBasic/GetNestingUSERDEFINEDTYPEList", {
OWNERUNIT_ID: 911,
GOODSTYPE: 4000,
PROVINCE_CODE: "",
USERDEFINEDTYPE_STATE: 1,
SearchKey: "",
type: 'encryption'
}).then(function (result) {
var list = _this.$utils.wrapTreeNode(result.Result_Data.List);
console.log('1111', list);
var newRes = [];
if (list && list.length > 0) {
list.forEach(function (item) {
if (item.SERVERPARTSHOP_ID === type) {
newRes.push(item.USERDEFINEDTYPE_ID);
}
});
}
// 若不一样 那就实时更新掉
if (JSON.stringify(showShopTypeList) !== JSON.stringify(list)) {
var resList = [];
if (typeList && typeList.length > 0) {
typeList.forEach(function (item) {
if (newRes.indexOf(item.UserdefinedType_Id) !== -1) {
resList.push(item);
}
if (item.UserdefinedType_Id === 1355) {
_this.haveActivity = true;
activityObj = item;
}
});
}
if (_this.haveActivity) {
// resList.push(activityObj);
_this.activityObj = activityObj;
}
_this.shopTypeList = resList;
_this.selectProducts = resList[0].UserdefinedType_Id;
}
});
_context9.next = 16;
break;
case 10:
_context9.next = 12;
return _this10.$api.$posMemberPost("/MallBasic/GetNestingUSERDEFINEDTYPEList", {
OWNERUNIT_ID: 911,
GOODSTYPE: 4000,
PROVINCE_CODE: "",
USERDEFINEDTYPE_STATE: 1,
SearchKey: "",
type: 'encryption'
});
case 12:
data = _context9.sent;
list = _this.$utils.wrapTreeNode(data.Result_Data.List);
uni.setStorageSync("showShopTypeList", list);
if (list && list.length > 0) {
list.forEach(function (item) {
if (item.SERVERPARTSHOP_ID === type) {
res.push(item.USERDEFINEDTYPE_ID);
}
});
}
case 16:
return _context9.abrupt("return", res);
case 17:
case "end":
return _context9.stop();
}
}
}, _callee9);
}))();
},
// 拿到活动的商品列表 可能不调用 有判断的
handleGetActivityList: function handleGetActivityList() {
var _this11 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
var data, list, res;
return _regenerator.default.wrap(function _callee10$(_context10) {
while (1) {
switch (_context10.prev = _context10.next) {
case 0:
_context10.next = 2;
return _this11.$api.$javaGet("/third-party/getWeChatGetMallGoodsInfoExclude",
// url,
{
ownerUnitId: 911,
@ -1381,7 +1463,7 @@ var _default = {
justCommodity: 1
});
case 2:
data = _context8.sent;
data = _context10.sent;
console.log("handleGetActivityList", data);
list = data.Data.List;
res = [];
@ -1400,34 +1482,34 @@ var _default = {
}
});
}
_this10.activityShopList = res;
_this11.activityShopList = res;
case 8:
case "end":
return _context8.stop();
return _context10.stop();
}
}
}, _callee8);
}, _callee10);
}))();
},
// 拿到特价优惠的商品列表 nature 5030
handleGetSpecialOffers: function handleGetSpecialOffers() {
var _this11 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
var _this12 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {
var _this, list, getWeChatGetMallGoodsInfoExclude, url, _url, data;
return _regenerator.default.wrap(function _callee9$(_context9) {
return _regenerator.default.wrap(function _callee11$(_context11) {
while (1) {
switch (_context9.prev = _context9.next) {
switch (_context11.prev = _context11.next) {
case 0:
_this = _this11;
_this = _this12;
list = [];
getWeChatGetMallGoodsInfoExclude = uni.getStorageSync("getWeChatGetMallGoodsInfoExclude");
if (!getWeChatGetMallGoodsInfoExclude) {
_context9.next = 9;
_context11.next = 9;
break;
}
list = getWeChatGetMallGoodsInfoExclude;
url = "/third-party/getWeChatGetMallGoodsInfoExclude";
_this11.$api.$javaGet(url, {
_this12.$api.$javaGet(url, {
ownerUnitId: 911,
// COMMODITYNATURE: 5030,//特价优惠
COMMODITYNATURE: 5021,
@ -1445,12 +1527,12 @@ var _default = {
_this.handleGetSpecialOffersShowData(newList);
}
});
_context9.next = 14;
_context11.next = 14;
break;
case 9:
_url = "/third-party/getWeChatGetMallGoodsInfoExclude";
_context9.next = 12;
return _this11.$api.$javaGet(
_context11.next = 12;
return _this12.$api.$javaGet(
// '/third-party/getExcludeWeChatGetMallGoodsInfo',
_url, {
ownerUnitId: 911,
@ -1465,16 +1547,16 @@ var _default = {
justCommodity: 1
});
case 12:
data = _context9.sent;
data = _context11.sent;
list = data.Data && data.Data.List ? data.Data.List : [];
case 14:
_this11.handleGetSpecialOffersShowData(list);
_this12.handleGetSpecialOffersShowData(list);
case 15:
case "end":
return _context9.stop();
return _context11.stop();
}
}
}, _callee9);
}, _callee11);
}))();
},
// 拿到特价优惠的商品列表显示内容的方法
@ -1510,22 +1592,22 @@ var _default = {
},
// 拿到每周特惠的商品列表
handleGetEveryWeekShop: function handleGetEveryWeekShop() {
var _this12 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
var _this13 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
var _this, list, getWeChatGetMallGoodsInfo, data;
return _regenerator.default.wrap(function _callee10$(_context10) {
return _regenerator.default.wrap(function _callee12$(_context12) {
while (1) {
switch (_context10.prev = _context10.next) {
switch (_context12.prev = _context12.next) {
case 0:
_this = _this12;
_this = _this13;
list = [];
getWeChatGetMallGoodsInfo = uni.getStorageSync("getWeChatGetMallGoodsInfo");
if (!getWeChatGetMallGoodsInfo) {
_context10.next = 8;
_context12.next = 8;
break;
}
list = getWeChatGetMallGoodsInfo;
_this12.$api.$javaGet("/third-party/getWeChatGetMallGoodsInfo", {
_this13.$api.$javaGet("/third-party/getWeChatGetMallGoodsInfo", {
ownerUnitId: 911,
userdefinedtypeId: 4597,
userdefinedTypeId: 4597,
@ -1537,48 +1619,48 @@ var _default = {
_this.handleGetEveryWeekShopShowData(newList);
}
});
_context10.next = 13;
_context12.next = 13;
break;
case 8:
_context10.next = 10;
return _this12.$api.$javaGet("/third-party/getWeChatGetMallGoodsInfo", {
_context12.next = 10;
return _this13.$api.$javaGet("/third-party/getWeChatGetMallGoodsInfo", {
ownerUnitId: 911,
userdefinedtypeId: 4597,
userdefinedTypeId: 4597,
justCommodity: 1
});
case 10:
data = _context10.sent;
data = _context12.sent;
list = data.Data && data.Data.List ? data.Data.List : [];
uni.setStorageSync("getWeChatGetMallGoodsInfo", list);
case 13:
_this12.handleGetEveryWeekShopShowData(list);
_this13.handleGetEveryWeekShopShowData(list);
case 14:
case "end":
return _context10.stop();
return _context12.stop();
}
}
}, _callee10);
}, _callee12);
}))();
},
// 拿到模块商品的商品列表
handleGetModalProducetShop: function handleGetModalProducetShop() {
var _this13 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {
var _this14 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
var _this, list, moduleActivity, data;
return _regenerator.default.wrap(function _callee11$(_context11) {
return _regenerator.default.wrap(function _callee13$(_context13) {
while (1) {
switch (_context11.prev = _context11.next) {
switch (_context13.prev = _context13.next) {
case 0:
_this = _this13;
_this = _this14;
list = [];
moduleActivity = uni.getStorageSync("moduleActivity");
if (!moduleActivity) {
_context11.next = 8;
_context13.next = 8;
break;
}
list = moduleActivity;
_this13.$api.$javaGet("/third-party/getWeChatGetMallGoodsInfo", {
_this14.$api.$javaGet("/third-party/getWeChatGetMallGoodsInfo", {
ownerUnitId: 911,
userdefinedtypeId: 4797,
userdefinedTypeId: 4797,
@ -1590,28 +1672,28 @@ var _default = {
_this.handleGetModalProducetShopShowData(newList);
}
});
_context11.next = 13;
_context13.next = 13;
break;
case 8:
_context11.next = 10;
return _this13.$api.$javaGet("/third-party/getWeChatGetMallGoodsInfo", {
_context13.next = 10;
return _this14.$api.$javaGet("/third-party/getWeChatGetMallGoodsInfo", {
ownerUnitId: 911,
userdefinedtypeId: 4797,
userdefinedTypeId: 4797,
justCommodity: 1
});
case 10:
data = _context11.sent;
data = _context13.sent;
list = data.Data && data.Data.List ? data.Data.List : [];
uni.setStorageSync("moduleActivity", list);
case 13:
_this13.handleGetModalProducetShopShowData(list);
_this14.handleGetModalProducetShopShowData(list);
case 14:
case "end":
return _context11.stop();
return _context13.stop();
}
}
}, _callee11);
}, _callee13);
}))();
},
// 每周商品特惠显示数据的方法
@ -1671,22 +1753,22 @@ var _default = {
},
// 拿到今日推荐的商品列表 nature 5050
handleGetTodayOffers: function handleGetTodayOffers() {
var _this14 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
var _this15 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14() {
var _this, getWeChatGetMallGoodsInfoExcludeToday, list, data;
return _regenerator.default.wrap(function _callee12$(_context12) {
return _regenerator.default.wrap(function _callee14$(_context14) {
while (1) {
switch (_context12.prev = _context12.next) {
switch (_context14.prev = _context14.next) {
case 0:
_this = _this14;
_this = _this15;
getWeChatGetMallGoodsInfoExcludeToday = uni.getStorageSync("getWeChatGetMallGoodsInfoExcludeToday");
list = [];
if (!getWeChatGetMallGoodsInfoExcludeToday) {
_context12.next = 8;
_context14.next = 8;
break;
}
list = getWeChatGetMallGoodsInfoExcludeToday;
_this14.$api.$javaGet("/third-party/getWeChatGetMallGoodsInfoExclude", {
_this15.$api.$javaGet("/third-party/getWeChatGetMallGoodsInfoExclude", {
ownerUnitId: 911,
// COMMODITYNATURE: 4598,// 原今日推荐
COMMODITYNATURE: 5022,
@ -1704,11 +1786,11 @@ var _default = {
_this.handleGetTodayOffersShowData(newList);
}
});
_context12.next = 12;
_context14.next = 12;
break;
case 8:
_context12.next = 10;
return _this14.$api.$javaGet("/third-party/getWeChatGetMallGoodsInfoExclude", {
_context14.next = 10;
return _this15.$api.$javaGet("/third-party/getWeChatGetMallGoodsInfoExclude", {
ownerUnitId: 911,
// COMMODITYNATURE: 4598,// 原今日推荐
COMMODITYNATURE: 5022,
@ -1721,16 +1803,16 @@ var _default = {
justCommodity: 1
});
case 10:
data = _context12.sent;
data = _context14.sent;
list = data.Data.List;
case 12:
_this14.handleGetTodayOffersShowData(list);
_this15.handleGetTodayOffersShowData(list);
case 13:
case "end":
return _context12.stop();
return _context14.stop();
}
}
}, _callee12);
}, _callee14);
}))();
},
// 拿到今日推荐的商品列表显示数据的方法
@ -1788,31 +1870,31 @@ var _default = {
},
// 拿到甄选商品 3000
handleGetProductsList: function handleGetProductsList() {
var _this15 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
var _this16 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
var data, list, resList, thisResList;
return _regenerator.default.wrap(function _callee13$(_context13) {
return _regenerator.default.wrap(function _callee15$(_context15) {
while (1) {
switch (_context13.prev = _context13.next) {
switch (_context15.prev = _context15.next) {
case 0:
uni.showLoading({
title: "加载中"
});
_context13.next = 3;
return _this15.$api.$javaGet("/third-party/getWeChatGetMallGoodsInfo", {
_context15.next = 3;
return _this16.$api.$javaGet("/third-party/getWeChatGetMallGoodsInfo", {
ownerUnitId: 911,
justCommodity: 1,
payMethod: "2000,3000",
COMMODITYNATURE: 6000
});
case 3:
data = _context13.sent;
data = _context15.sent;
list = data.Data.List;
console.log("积分商城", list);
resList = [];
thisResList = [];
if (_this15.shopMsg.pageIndex > 1) {
resList = _this15.productsList;
if (_this16.shopMsg.pageIndex > 1) {
resList = _this16.productsList;
}
if (list && list.length > 0) {
// this.selectProducts = list[0].UserdefinedType_Id;
@ -1837,11 +1919,11 @@ var _default = {
});
}
if (thisResList && thisResList.length < 6) {
_this15.shopMsg.isOver = true;
_this16.shopMsg.isOver = true;
}
// this.productsList = list;
_this15.productsList = resList.concat(thisResList);
console.log("甄选商品", _this15.productsList);
_this16.productsList = resList.concat(thisResList);
console.log("甄选商品", _this16.productsList);
uni.hideLoading();
// let shopList = []
@ -1856,10 +1938,10 @@ var _default = {
// }
case 14:
case "end":
return _context13.stop();
return _context15.stop();
}
}
}, _callee13);
}, _callee15);
}))();
},
// 返回首页

File diff suppressed because one or more lines are too long

View File

@ -362,7 +362,7 @@
}
.main .header .typeBox .contentBox .rowBox.data-v-79c11018 {
width: 20%;
height: 144rpx;
height: 100%;
display: inline-flex;
flex-direction: column;
align-items: center;
@ -400,6 +400,7 @@
background-image: url("https://eshangtech.com/ShopICO/ahyd-mall/wechatesAH/Special Offers.png");
background-repeat: no-repeat;
background-size: 100% 100%;
width: 100%;
}
.main .pageContent.data-v-79c11018 {
width: 100%;
@ -465,7 +466,7 @@
}
.main .pageContent .typeBox .contentBox .rowBox.data-v-79c11018 {
width: 120rpx;
height: 134rpx;
height: 100%;
display: inline-block;
}
.main .pageContent .typeBox .contentBox .rowBox .imgBox.data-v-79c11018 {
@ -604,7 +605,7 @@
}
.main .pageContent .advertisement .advertisementContentBox .UnionMallShopList .rowBox.data-v-79c11018 {
width: 20%;
height: 144rpx;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;

View File

@ -827,26 +827,157 @@ var _default = {
}
}), (0, _defineProperty2.default)(_methods, "handleClosePop", function handleClosePop() {
this.$refs.shopPopup.close();
}), (0, _defineProperty2.default)(_methods, "handleGetUnionMallShopType", function handleGetUnionMallShopType() {
}), (0, _defineProperty2.default)(_methods, "handleGetShowShopType", function handleGetShowShopType(type, typeList) {
var _this6 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
var data, typeList, resList, indexOfList;
var _this, data, showShopTypeList, res, list;
return _regenerator.default.wrap(function _callee3$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return _this6.$api.$javaGet("/third-party/getWeChatGetMallGoodsType", {
// type 1 精选商城 type 2 工会商城
_this = _this6;
data = [];
showShopTypeList = type === '1' ? uni.getStorageSync("showShopTypeList") : uni.getStorageSync("UnionMallShowShopTypeList");
res = [];
if (!(showShopTypeList && showShopTypeList.length > 0)) {
_context3.next = 10;
break;
}
data = showShopTypeList;
if (data && data.length > 0) {
data.forEach(function (item) {
if (item.SERVERPARTSHOP_ID === type) {
res.push(item.USERDEFINEDTYPE_ID);
}
});
}
_this.$api.$posMemberPost("/MallBasic/GetNestingUSERDEFINEDTYPEList", {
OWNERUNIT_ID: 911,
GOODSTYPE: 4000,
PROVINCE_CODE: "",
USERDEFINEDTYPE_STATE: 1,
SearchKey: "",
type: 'encryption'
}).then(function (result) {
var list = _this.$utils.wrapTreeNode(result.Result_Data.List);
console.log('1111', list);
var newRes = [];
if (list && list.length > 0) {
list.forEach(function (item) {
if (item.SERVERPARTSHOP_ID === type) {
newRes.push(item.USERDEFINEDTYPE_ID);
}
});
}
// 若不一样 那就实时更新掉
if (JSON.stringify(showShopTypeList) !== JSON.stringify(list)) {
console.log('2222');
if (type === '1') {
console.log('3333', newRes);
uni.setStorageSync("showShopTypeList", list);
var resList = [];
if (typeList && typeList.length > 0) {
typeList.forEach(function (item) {
if (newRes.indexOf(item.UserdefinedType_Id) !== -1) {
resList.push(item);
}
});
}
console.log('4444', resList);
_this.shopTypeList = resList;
_this.$forceUpdate();
if (_this.indexDefaultLeftSelect !== -1) {
var bigTab = _this.findRootIndexByUserdefinedTypeId(resList, Number(_this.indexDefaultLeftSelect));
console.log("bigTabbigTabbigTab", bigTab);
_thisthis.activeTabs = Number(bigTab) === -1 ? _this.activeTabs : Number(bigTab);
}
if (_this.activeTabs === 999999) {
_this.handleGoPointsMall();
} else {
_this.handleGetAllShopItem(resList[_this.activeTabs].UserdefinedType_Id, type);
}
} else {
uni.setStorageSync("UnionMallShowShopTypeList", list);
var _resList = [];
if (typeList && typeList.length > 0) {
typeList.forEach(function (item) {
if (newRes.indexOf(item.UserdefinedType_Id) !== -1) {
if (item.UserdefinedType_Id === 1253) {
_resList.unshift(item);
} else {
_resList.push(item);
}
}
});
}
_this.shopTypeList = _resList;
_this.$forceUpdate();
_this.handleGetAllShopItem(_resList[_this.activeTabs].UserdefinedType_Id);
}
}
});
_context3.next = 17;
break;
case 10:
_context3.next = 12;
return _this6.$api.$posMemberPost("/MallBasic/GetNestingUSERDEFINEDTYPEList", {
OWNERUNIT_ID: 911,
GOODSTYPE: 4000,
PROVINCE_CODE: "",
USERDEFINEDTYPE_STATE: 1,
SearchKey: "",
type: 'encryption'
});
case 12:
data = _context3.sent;
list = _this.$utils.wrapTreeNode(data.Result_Data.List);
console.log('要显示的分类', list);
if (type === '1') {
uni.setStorageSync("showShopTypeList", list);
} else {
uni.setStorageSync("UnionMallShowShopTypeList", list);
}
if (list && list.length > 0) {
list.forEach(function (item) {
if (item.SERVERPARTSHOP_ID === type) {
res.push(item.USERDEFINEDTYPE_ID);
}
});
}
case 17:
return _context3.abrupt("return", res);
case 18:
case "end":
return _context3.stop();
}
}
}, _callee3);
}))();
}), (0, _defineProperty2.default)(_methods, "handleGetUnionMallShopType", function handleGetUnionMallShopType() {
var _this7 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
var data, typeList, resList, indexOfList;
return _regenerator.default.wrap(function _callee4$(_context4) {
while (1) {
switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return _this7.$api.$javaGet("/third-party/getWeChatGetMallGoodsType", {
ownerUnitId: 911,
appId: "wxee018fb96955552a",
commodityNature: 5070
});
case 2:
data = _context3.sent;
data = _context4.sent;
// const data = await this.$api.getCoop(req);
typeList = data.Data.List;
resList = [];
indexOfList = [1249, 1250, 1253, 3176];
resList = []; // 拿到实际需要显示的商品分类
_context4.next = 7;
return _this7.handleGetShowShopType('2', typeList);
case 7:
indexOfList = _context4.sent;
// let indexOfList = [1249, 1250, 1253, 3176];
if (typeList && typeList.length > 0) {
typeList.forEach(function (item) {
if (indexOfList.indexOf(item.UserdefinedType_Id) !== -1) {
@ -858,25 +989,25 @@ var _default = {
}
});
}
_this6.shopTypeList = resList;
_this6.handleGetAllShopItem(resList[_this6.activeTabs].UserdefinedType_Id);
case 9:
_this7.shopTypeList = resList;
_this7.handleGetAllShopItem(resList[_this7.activeTabs].UserdefinedType_Id);
case 11:
case "end":
return _context3.stop();
return _context4.stop();
}
}
}, _callee3);
}, _callee4);
}))();
}), (0, _defineProperty2.default)(_methods, "handleSearch", function handleSearch() {
var _this7 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
var _this8 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
var url, data, list, shopList, res, shopIdList;
return _regenerator.default.wrap(function _callee4$(_context4) {
return _regenerator.default.wrap(function _callee5$(_context5) {
while (1) {
switch (_context4.prev = _context4.next) {
switch (_context5.prev = _context5.next) {
case 0:
if (!_this7.searchText) {
_context4.next = 16;
if (!_this8.searchText) {
_context5.next = 16;
break;
}
uni.showLoading({
@ -892,21 +1023,21 @@ var _default = {
// payMethod: "1000,3000",
// // justCommodity: 1,
// });
url = _this7.pageType === "UnionMall" ? "/third-party/getWeChatGetMallGoodsInfo" : "/third-party/getWeChatGetMallGoodsInfoExclude";
_context4.next = 5;
return _this7.$api.$javaGet(
url = _this8.pageType === "UnionMall" ? "/third-party/getWeChatGetMallGoodsInfo" : "/third-party/getWeChatGetMallGoodsInfoExclude";
_context5.next = 5;
return _this8.$api.$javaGet(
// '/third-party/getExcludeWeChatGetMallGoodsInfo',
url, {
ownerUnitId: 911,
appId: "wxee018fb96955552a",
commodityName: _this7.searchText,
excludeNature: _this7.pageType === "UnionMall" ? "" : 5070,
commodityNature: _this7.pageType === "UnionMall" ? 5070 : "",
commodityName: _this8.searchText,
excludeNature: _this8.pageType === "UnionMall" ? "" : 5070,
commodityNature: _this8.pageType === "UnionMall" ? 5070 : "",
payMethod: "1000,3000"
// justCommodity: 1,
});
case 5:
data = _context4.sent;
data = _context5.sent;
uni.hideLoading();
list = data.Data.List;
shopList = [];
@ -915,8 +1046,8 @@ var _default = {
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) {
item.COMMODITYLIST.forEach(function (subItem) {
// 判断当前的购物车里面 是不是已经有数据了 有数据的话 把原本的商品数量赋值进去
if (_this7.shopCarList && _this7.shopCarList.length > 0) {
_this7.shopCarList.forEach(function (shopCarItem) {
if (_this8.shopCarList && _this8.shopCarList.length > 0) {
_this8.shopCarList.forEach(function (shopCarItem) {
if (shopCarItem.COMMODITY_ID === subItem.COMMODITY_ID) {
subItem.count = shopCarItem.count;
if (subItem.SKULIST && subItem.SKULIST.length > 0) {
@ -956,45 +1087,45 @@ var _default = {
}
});
}
_this7.rightShopList = res;
_context4.next = 17;
_this8.rightShopList = res;
_context5.next = 17;
break;
case 16:
if (_this7.pageType === "UnionMall") {
if (_this8.pageType === "UnionMall") {
// 工会之家拿到的商品类型
_this7.handleGetUnionMallShopType();
_this8.handleGetUnionMallShopType();
} else {
// 拿到全部商品类型
_this7.handleGetShopType(1);
_this8.handleGetShopType(1);
}
case 17:
case "end":
return _context4.stop();
return _context5.stop();
}
}
}, _callee4);
}, _callee5);
}))();
}), (0, _defineProperty2.default)(_methods, "handleGetShopType", function handleGetShopType(type) {
var _this8 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
var _this9 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
var _this, typeList, getWeChatGetMallGoodsType, data;
return _regenerator.default.wrap(function _callee5$(_context5) {
return _regenerator.default.wrap(function _callee6$(_context6) {
while (1) {
switch (_context5.prev = _context5.next) {
switch (_context6.prev = _context6.next) {
case 0:
// 判断请求商品走新的 走老的 1 走老的 2走新的
_this = _this8;
_this = _this9;
typeList = [];
getWeChatGetMallGoodsType = uni.getStorageSync("getWeChatGetMallGoodsType");
if (!getWeChatGetMallGoodsType) {
_context5.next = 8;
_context6.next = 8;
break;
}
typeList = getWeChatGetMallGoodsType;
_this8.$api.$javaGet("/third-party/getWeChatGetMallGoodsType", {
_this9.$api.$javaGet("/third-party/getWeChatGetMallGoodsType", {
ownerUnitId: 911,
appId: "wxee018fb96955552a",
commodityNature: _this8.pageType === "UnionMall" ? "" : 5070
commodityNature: _this9.pageType === "UnionMall" ? "" : 5070
}).then(function (data) {
var newTypeList = data.Data.List;
if (JSON.stringify(newTypeList) !== JSON.stringify(typeList)) {
@ -1002,26 +1133,27 @@ var _default = {
_this.handleGetShopTypeShowData(newTypeList, type);
}
});
_context5.next = 12;
_context6.next = 12;
break;
case 8:
_context5.next = 10;
return _this8.$api.$javaGet("/third-party/getWeChatGetMallGoodsType", {
_context6.next = 10;
return _this9.$api.$javaGet("/third-party/getWeChatGetMallGoodsType", {
ownerUnitId: 911,
appId: "wxee018fb96955552a",
commodityNature: _this8.pageType === "UnionMall" ? "" : 5070
commodityNature: _this9.pageType === "UnionMall" ? "" : 5070
});
case 10:
data = _context5.sent;
data = _context6.sent;
typeList = data.Data.List;
case 12:
_this8.handleGetShopTypeShowData(typeList, type);
case 13:
console.log('typeListtypeListtypeList', JSON.parse(JSON.stringify(typeList)));
_this9.handleGetShopTypeShowData(typeList, type);
case 14:
case "end":
return _context5.stop();
return _context6.stop();
}
}
}, _callee5);
}, _callee6);
}))();
}), (0, _defineProperty2.default)(_methods, "findRootIndexByUserdefinedTypeId", function findRootIndexByUserdefinedTypeId(treeList, targetId) {
if (!Array.isArray(treeList) || treeList.length === 0) {
@ -1053,28 +1185,47 @@ var _default = {
}
return -1;
}), (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) {
typeList.forEach(function (item) {
if (indexOfList.indexOf(item.UserdefinedType_Id) !== -1) {
resList.push(item);
var _this10 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
var resList, indexOfList, bigTab;
return _regenerator.default.wrap(function _callee7$(_context7) {
while (1) {
switch (_context7.prev = _context7.next) {
case 0:
// type 判断商品走新的 走老的 1 走老的 2走新的
resList = [];
_context7.next = 3;
return _this10.handleGetShowShopType('1', typeList);
case 3:
indexOfList = _context7.sent;
console.log('indexOfListindexOfListindexOfList', indexOfList);
// let indexOfList = [3186, 3175, 4597, 4797];
if (typeList && typeList.length > 0) {
typeList.forEach(function (item) {
if (indexOfList.indexOf(item.UserdefinedType_Id) !== -1) {
resList.push(item);
}
});
}
_this10.shopTypeList = resList;
if (_this10.indexDefaultLeftSelect !== -1) {
bigTab = _this10.findRootIndexByUserdefinedTypeId(resList, Number(_this10.indexDefaultLeftSelect));
console.log("bigTabbigTabbigTab", bigTab);
_this10.activeTabs = Number(bigTab) === -1 ? _this10.activeTabs : Number(bigTab);
}
if (_this10.activeTabs === 999999) {
_this10.handleGoPointsMall();
} else {
_this10.handleGetAllShopItem(resList[_this10.activeTabs].UserdefinedType_Id, type);
}
case 9:
case "end":
return _context7.stop();
}
}
});
}
this.shopTypeList = resList;
console.log("this.shopTypeListthis.shopTypeList", JSON.parse(JSON.stringify(this.shopTypeList)));
if (this.indexDefaultLeftSelect !== -1) {
var bigTab = this.findRootIndexByUserdefinedTypeId(resList, Number(this.indexDefaultLeftSelect));
console.log("bigTabbigTabbigTab", bigTab);
this.activeTabs = Number(bigTab) === -1 ? this.activeTabs : Number(bigTab);
}
if (this.activeTabs === 999999) {
this.handleGoPointsMall();
} else {
this.handleGetAllShopItem(resList[this.activeTabs].UserdefinedType_Id, type);
}
}, _callee7);
}))();
}), (0, _defineProperty2.default)(_methods, "handleSortLeftType", function handleSortLeftType(oldList) {
var list = oldList;
if (list && list.length > 0) {
@ -1091,12 +1242,12 @@ var _default = {
}
return [];
}), (0, _defineProperty2.default)(_methods, "handleGetAllShopItem", function handleGetAllShopItem(id, type) {
var _this9 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
var _this11 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
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 _callee8$(_context8) {
while (1) {
switch (_context6.prev = _context6.next) {
switch (_context8.prev = _context8.next) {
case 0:
console.log("djaisdjasda", type);
@ -1106,48 +1257,49 @@ var _default = {
title: "加载中"
});
if (!(type === 1)) {
_context6.next = 9;
_context8.next = 9;
break;
}
_context6.next = 6;
return _this9.$api.getCoop({
_context8.next = 6;
return _this11.$api.getCoop({
action_type: "WeChat_GetMallGoodsInfo",
ownerUnitId: 911,
userdefinedtypeId: _this9.searchText ? "" : id,
commodityName: _this9.searchText,
excludeNature: _this9.pageType === "UnionMall" ? "" : 5070,
commodityNature: _this9.pageType === "UnionMall" ? 5070 : "",
userdefinedtypeId: _this11.searchText ? "" : id,
commodityName: _this11.searchText,
excludeNature: _this11.pageType === "UnionMall" ? "" : 5070,
commodityNature: _this11.pageType === "UnionMall" ? 5070 : "",
// 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(_this11.selectShopSort === 0 ? "COMMODITY_INDEX,COMMODITY_EN,COMMODITY_MEMBERPRICE,OPERATE_DATE" : _this11.selectShopSort === 1 ? "COMMODITY_MEMBERPRICE" : _this11.selectShopSort === 2 ? "COMMODITY_EN" : _this11.selectShopSort === 3 ? "OPERATE_DATE" : "", " ").concat(_this11.selectSortType === 0 ? "asc" : "desc")
});
case 6:
data = _context6.sent;
_context6.next = 13;
data = _context8.sent;
_context8.next = 13;
break;
case 9:
url = _this9.pageType === "UnionMall" ? "/third-party/getWeChatGetMallGoodsInfo" : "/third-party/getWeChatGetMallGoodsInfoExclude";
_context6.next = 12;
return _this9.$api.$javaGet(
url = _this11.pageType === "UnionMall" ? "/third-party/getWeChatGetMallGoodsInfo" : "/third-party/getWeChatGetMallGoodsInfoExclude";
_context8.next = 12;
return _this11.$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 : ""
userdefinedTypeId: _this11.searchText ? "" : id,
userdefinedtypeId: _this11.searchText ? "" : id,
commodityName: _this11.searchText,
excludeNature: _this11.pageType === "UnionMall" ? "" : 5070,
commodityNature: _this11.pageType === "UnionMall" ? 5070 : ""
// justCommodity: 1,
});
case 12:
data = _context6.sent;
data = _context8.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)));
console.log("this.shopTypeList ", JSON.parse(JSON.stringify(_this11.shopTypeList)));
console.log("id", JSON.parse(JSON.stringify(id)));
thisAllType = [];
if (_this9.shopTypeList && _this9.shopTypeList.length > 0) {
_this9.shopTypeList.forEach(function (item) {
if (_this11.shopTypeList && _this11.shopTypeList.length > 0) {
_this11.shopTypeList.forEach(function (item) {
if (item.UserdefinedType_Id === id) {
thisAllType = item.UserdefinedTypeList;
}
@ -1176,17 +1328,24 @@ var _default = {
}
// thisAllType 里面的值 才是当前商城分类的实际 类型 所以应该是把对应的商品拼到 thisAllType 里面去
// let COMMODITYLISTList = []
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;
// if (subItem.COMMODITYLIST && subItem.COMMODITYLIST.length > 0) {
// subItem.COMMODITYLIST.forEach((thirdItem) => {
// COMMODITYLISTList.push(thirdItem.COMMODITY_NAME)
// })
// }
}
});
}
});
}
// console.log('COMMODITYLISTListCOMMODITYLISTList', COMMODITYLISTList);
console.log("thisAllTypethisAllType2", JSON.parse(JSON.stringify(thisAllType)));
leftIndex = -1; // if (this.pageType === "UnionMall" && this.leftId) {
// if (thisAllType && thisAllType.length > 0) {
@ -1197,19 +1356,19 @@ var _default = {
// });
// }
// } else
if (_this9.comeService) {
if (_this11.comeService) {
if (thisAllType && thisAllType.length > 0) {
thisAllType.forEach(function (item, index) {
if (_this9.comeService === item.UserdefinedType_Name) {
if (_this11.comeService === item.UserdefinedType_Name) {
leftIndex = index;
}
});
}
}
if (_this9.indexDefaultLeftSelect !== -1) {
if (_this11.indexDefaultLeftSelect !== -1) {
if (thisAllType && thisAllType.length > 0) {
thisAllType.forEach(function (item, index) {
if (item.UserdefinedType_Id === Number(_this9.indexDefaultLeftSelect)) {
if (item.UserdefinedType_Id === Number(_this11.indexDefaultLeftSelect)) {
leftIndex = index;
}
});
@ -1218,7 +1377,7 @@ var _default = {
console.log("leftIndexleftIndexleftIndex2", JSON.parse(JSON.stringify(leftIndex)));
console.log("thisAllTypethisAllTypethisAllType2", JSON.parse(JSON.stringify(thisAllType)));
if (leftIndex === -1) {
leftIndex = _this9.leftSelectIndex;
leftIndex = _this11.leftSelectIndex;
}
// 当前选中的商品列表
@ -1243,12 +1402,12 @@ var _default = {
});
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) {
if (_this11.pageType === "UnionMall" && _this11.leftId) {
if (_this11.leftId) {
obj = {};
thisAllType.forEach(function (item) {
// (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(_this11.leftId) || Number(item.UserdefinedType_Id) === -1) {
obj = item;
}
});
@ -1267,8 +1426,8 @@ var _default = {
if (shopList && shopList.length > 0) {
shopList.forEach(function (item) {
// 判断当前的购物车里面 是不是已经有数据了 有数据的话 把原本的商品数量赋值进去
if (_this9.shopCarList && _this9.shopCarList.length > 0) {
_this9.shopCarList.forEach(function (shopCarItem) {
if (_this11.shopCarList && _this11.shopCarList.length > 0) {
_this11.shopCarList.forEach(function (shopCarItem) {
if (shopCarItem.COMMODITY_ID === item.COMMODITY_ID) {
item.count = shopCarItem.count;
item.showReduce = true;
@ -1322,7 +1481,7 @@ var _default = {
allShopList = []; // 当前的全部商品id
allShopID2 = [];
if (newList && newList.length > 0) {
_this9.leftToView = "left_" + leftIndex + "_" + newList[leftIndex].UserdefinedType_Id;
_this11.leftToView = "left_" + leftIndex + "_" + newList[leftIndex].UserdefinedType_Id;
newList.forEach(function (item) {
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) {
item.COMMODITYLIST.forEach(function (subItem) {
@ -1338,31 +1497,31 @@ var _default = {
});
}
newList[0].COMMODITYLIST = allShopList;
_this9.leftTypeList = newList;
_this9.leftSelectIndex = leftIndex;
_this9.rightShopList = shopList;
_this9.visibleList = shopList.slice(0, _this9.visibleCount + _this9.buffer * 2);
_this9.changBigTypeLoading = true;
_this11.leftTypeList = newList;
_this11.leftSelectIndex = leftIndex;
_this11.rightShopList = shopList;
_this11.visibleList = shopList.slice(0, _this11.visibleCount + _this11.buffer * 2);
_this11.changBigTypeLoading = true;
} else {
_this9.leftTypeList = [];
_this9.leftToView = "";
_this9.leftSelectIndex = 0;
_this9.rightShopList = [];
_this11.leftTypeList = [];
_this11.leftToView = "";
_this11.leftSelectIndex = 0;
_this11.rightShopList = [];
}
uni.hideLoading();
case 35:
case 36:
case "end":
return _context6.stop();
return _context8.stop();
}
}
}, _callee6);
}, _callee8);
}))();
}), (0, _defineProperty2.default)(_methods, "showDetail", function showDetail(obj) {
uni.navigateTo({
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;
var _this12 = this;
// 最终要输出的对象
var leftAllTypeObj = {};
// 存储一下出现过的商品小类
@ -1374,8 +1533,8 @@ var _default = {
}
item.COMMODITYLIST.forEach(function (subItem) {
// 判断当前的购物车里面 是不是已经有数据了 有数据的话 把原本的商品数量赋值进去
if (_this10.shopCarList && _this10.shopCarList.length > 0) {
_this10.shopCarList.forEach(function (shopCarItem) {
if (_this12.shopCarList && _this12.shopCarList.length > 0) {
_this12.shopCarList.forEach(function (shopCarItem) {
if (shopCarItem.COMMODITY_ID === subItem.COMMODITY_ID) {
subItem.count = shopCarItem.count;
subItem.showReduce = true;
@ -1452,15 +1611,15 @@ var _default = {
this.handleGetAllShopItem(this.shopTypeList[index].UserdefinedType_Id, 2);
// }
}), (0, _defineProperty2.default)(_methods, "catClickFn", function catClickFn(e, index, obj) {
var _this11 = this;
var _this13 = this;
this.leftToView = "left_".concat(index, "_") + this.leftTypeList[index].USERDEFINEDTYPE_ID;
this.leftSelectIndex = index;
var shopList = this.leftTypeList[index].COMMODITYLIST;
if (shopList && shopList.length > 0) {
shopList.forEach(function (item) {
// 判断当前的购物车里面 是不是已经有数据了 有数据的话 把原本的商品数量赋值进去
if (_this11.shopCarList && _this11.shopCarList.length > 0) {
_this11.shopCarList.forEach(function (shopCarItem) {
if (_this13.shopCarList && _this13.shopCarList.length > 0) {
_this13.shopCarList.forEach(function (shopCarItem) {
if (shopCarItem.COMMODITY_ID === item.COMMODITY_ID) {
item.count = shopCarItem.count;
item.showReduce = true;
@ -1621,11 +1780,11 @@ var _default = {
});
}
}), (0, _defineProperty2.default)(_methods, "handleGoPointsMall", function handleGoPointsMall() {
var _this12 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
return _regenerator.default.wrap(function _callee7$(_context7) {
var _this14 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
return _regenerator.default.wrap(function _callee9$(_context9) {
while (1) {
switch (_context7.prev = _context7.next) {
switch (_context9.prev = _context9.next) {
case 0:
uni.showLoading({
title: "加载中"
@ -1633,43 +1792,43 @@ var _default = {
// uni.navigateTo({
// url: `/pages/shopPages/shopList/index?pageType=pointsMall`,
// });
_this12.activeTabs = 999999;
_this12.leftSelectIndex = 999999;
_this12.leftToView = "left_0_999999";
_this12.leftTypeList = [{
_this14.activeTabs = 999999;
_this14.leftSelectIndex = 999999;
_this14.leftToView = "left_0_999999";
_this14.leftTypeList = [{
USERDEFINEDTYPE_NAME: "积分商城",
USERDEFINEDTYPE_ID: 999999
}];
_context7.next = 7;
return _this12.handleGetPointMallShop();
_context9.next = 7;
return _this14.handleGetPointMallShop();
case 7:
uni.hideLoading();
case 8:
case "end":
return _context7.stop();
return _context9.stop();
}
}
}, _callee7);
}, _callee9);
}))();
}), (0, _defineProperty2.default)(_methods, "handleGetPointMallShop", function handleGetPointMallShop() {
var _this13 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
var _this15 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
var req, data, list, shopList;
return _regenerator.default.wrap(function _callee8$(_context8) {
return _regenerator.default.wrap(function _callee10$(_context10) {
while (1) {
switch (_context8.prev = _context8.next) {
switch (_context10.prev = _context10.next) {
case 0:
req = {
action_type: "WeChat_GetMallGoodsInfo",
ownerUnitId: 911,
justCommodity: 1,
payMethod: "2000,3000",
excludeNature: _this13.user.INDUSTRY_MEMBERSHIP_ID ? "" : 5070
excludeNature: _this15.user.INDUSTRY_MEMBERSHIP_ID ? "" : 5070
};
_context8.next = 3;
return _this13.$api.getCoop(req);
_context10.next = 3;
return _this15.$api.getCoop(req);
case 3:
data = _context8.sent;
data = _context10.sent;
list = data.Data.List;
shopList = [];
if (list && list.length > 0) {
@ -1684,8 +1843,8 @@ var _default = {
if (shopList && shopList.length > 0) {
shopList.forEach(function (item) {
// 判断当前的购物车里面 是不是已经有数据了 有数据的话 把原本的商品数量赋值进去
if (_this13.shopCarList && _this13.shopCarList.length > 0) {
_this13.shopCarList.forEach(function (shopCarItem) {
if (_this15.shopCarList && _this15.shopCarList.length > 0) {
_this15.shopCarList.forEach(function (shopCarItem) {
if (shopCarItem.COMMODITY_ID === item.COMMODITY_ID) {
item.count = shopCarItem.count;
item.showReduce = true;
@ -1705,20 +1864,20 @@ var _default = {
item.RETbigNumber = item.COMMODITY_RETAILPRICE;
}
});
_this13.changBigTypeLoading = true;
_this13.rightShopList = shopList;
_this13.visibleList = shopList.slice(0, _this13.visibleCount + _this13.buffer * 2);
_this15.changBigTypeLoading = true;
_this15.rightShopList = shopList;
_this15.visibleList = shopList.slice(0, _this15.visibleCount + _this15.buffer * 2);
} else {
_this13.changBigTypeLoading = true;
_this13.rightShopList = shopList;
_this13.visibleList = shopList.slice(0, _this13.visibleCount + _this13.buffer * 2);
_this15.changBigTypeLoading = true;
_this15.rightShopList = shopList;
_this15.visibleList = shopList.slice(0, _this15.visibleCount + _this15.buffer * 2);
}
case 8:
case "end":
return _context8.stop();
return _context10.stop();
}
}
}, _callee8);
}, _callee10);
}))();
}), (0, _defineProperty2.default)(_methods, "handleGoUnionMall", function handleGoUnionMall() {
uni.switchTab({

File diff suppressed because one or more lines are too long

View File

@ -8,12 +8,19 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/shopMallPage/tradeUnionMall/index",
"pathName": "pages/shopMallPage/tradeUnionMall/index",
"query": "",
"scene": null,
"launchMode": "default"
},
{
"name": "pages/shopMallPage/shopType/index",
"pathName": "pages/shopMallPage/shopType/index",
"query": "indexDefaultLeftSelect=3201",
"scene": null,
"launchMode": "default"
"launchMode": "default",
"scene": null
}
]
}