Merge branch 'lx-dev' of gitee.com:cabbage_qd/web-base-h5 into lx-test
This commit is contained in:
commit
dc8f39f88b
|
@ -448,7 +448,12 @@ export default {
|
|||
},
|
||||
getAreaGoods() {
|
||||
getAreaGoods().then(res => {
|
||||
this.recommendSpecialAreaList = res.data?.recommendSpecialAreaList || []
|
||||
// this.recommendSpecialAreaList = res.data?.recommendSpecialAreaList || []
|
||||
let list = res.data?.recommendSpecialAreaList || []
|
||||
if (this.userInfo.memberCode == 'CN68880628') {
|
||||
list = list.filter(item => item.specialArea != 26)
|
||||
}
|
||||
this.recommendSpecialAreaList = list
|
||||
})
|
||||
},
|
||||
toDel() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!--
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: kBank
|
||||
* @Date: 2022-11-21 15:11:22
|
||||
-->
|
||||
|
@ -8,15 +8,19 @@
|
|||
<view class="content">
|
||||
<view class="goods-sort">
|
||||
<view class="goods-flexs">
|
||||
<view
|
||||
<view
|
||||
class="goods-view"
|
||||
@click="navTap(item)"
|
||||
v-for="item in goodsList.recommendSpecialAreaList "
|
||||
v-for="item in recommendSpecialAreaList"
|
||||
:key="item.pkWares"
|
||||
>
|
||||
<view class="bg-color"></view>
|
||||
|
||||
<area-product-list v-if="item.waresList && item.waresList.length > 0" :list="item.waresList" :title="item.specialAreaName"></area-product-list>
|
||||
|
||||
<area-product-list
|
||||
v-if="item.waresList && item.waresList.length > 0"
|
||||
:list="item.waresList"
|
||||
:title="item.specialAreaName"
|
||||
></area-product-list>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -38,7 +42,8 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
user: '',
|
||||
user: uni.getStorageSync('User'),
|
||||
|
||||
goodsList: [],
|
||||
specialImg: require('@/static/images/two2.jpg'),
|
||||
zoneList: [
|
||||
|
@ -153,20 +158,20 @@ export default {
|
|||
label: '专供专区',
|
||||
value: 31,
|
||||
children: [],
|
||||
name: "wolesaleArea",
|
||||
name: 'wolesaleArea',
|
||||
},
|
||||
{
|
||||
label: '续约专区',
|
||||
value: 30,
|
||||
children: [],
|
||||
name: "renewalArea",
|
||||
name: 'renewalArea',
|
||||
},
|
||||
{
|
||||
label: '创客空间专区',
|
||||
value:28,
|
||||
value: 28,
|
||||
children: [],
|
||||
isShow: true,
|
||||
name: "makerArea",
|
||||
name: 'makerArea',
|
||||
},
|
||||
{
|
||||
label: '架构管理',
|
||||
|
@ -228,6 +233,16 @@ export default {
|
|||
],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
recommendSpecialAreaList() {
|
||||
if (this.user.memberCode == 'CN68880628') {
|
||||
return this.goodsList?.recommendSpecialAreaList.filter(
|
||||
item => item.specialArea !== 26
|
||||
)
|
||||
}
|
||||
return this.goodsList?.recommendSpecialAreaList || []
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
// this.getMenuList()
|
||||
this.getGoodsInfo()
|
||||
|
@ -238,19 +253,19 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
goUrl() {
|
||||
ban.agreementName().then((res) => {
|
||||
if (res.data==0) {
|
||||
ban.agreementName().then(res => {
|
||||
if (res.data == 0) {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pages/specialArea/list?label=续约专区" +
|
||||
"&specialArea=30" +
|
||||
"&children=[]",
|
||||
});
|
||||
url:
|
||||
'/pages/specialArea/list?label=续约专区' +
|
||||
'&specialArea=30' +
|
||||
'&children=[]',
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '请先进行实名认证',
|
||||
success: (res) => {
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/selfService/realName/realName',
|
||||
|
@ -276,7 +291,7 @@ export default {
|
|||
})
|
||||
if (tapx == -1) {
|
||||
this.zoneList.forEach((items, index) => {
|
||||
items.children.forEach((ctem) => {
|
||||
items.children.forEach(ctem => {
|
||||
if (ctem.value == item.specialArea) {
|
||||
if (item.specialArea == 21) {
|
||||
uni.navigateTo({
|
||||
|
@ -302,39 +317,38 @@ export default {
|
|||
})
|
||||
})
|
||||
} else {
|
||||
if(item.specialArea == 30){
|
||||
if (item.specialArea == 30) {
|
||||
this.goUrl()
|
||||
}else{
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/specialArea/list?label=' +
|
||||
item.specialAreaName +
|
||||
'&specialArea=' +
|
||||
item.specialArea +
|
||||
'&children=' +
|
||||
JSON.stringify(this.zoneList[tapx].children),
|
||||
})
|
||||
url:
|
||||
'/pages/specialArea/list?label=' +
|
||||
item.specialAreaName +
|
||||
'&specialArea=' +
|
||||
item.specialArea +
|
||||
'&children=' +
|
||||
JSON.stringify(this.zoneList[tapx].children),
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
getGoodsInfo() {
|
||||
let userInfo = uni.getStorageSync('User')
|
||||
getAreaGoods().then((res) => {
|
||||
getAreaGoods().then(res => {
|
||||
this.goodsList = res.data
|
||||
this.$forceUpdate()
|
||||
})
|
||||
},
|
||||
getMenuList() {
|
||||
api.menuList().then((res) => {
|
||||
res.data.forEach((item) => {
|
||||
this.zoneList.forEach((ctem) => {
|
||||
api.menuList().then(res => {
|
||||
res.data.forEach(item => {
|
||||
this.zoneList.forEach(ctem => {
|
||||
if (ctem.name == item.menuKey) {
|
||||
ctem.isShow = true
|
||||
}
|
||||
if (ctem.children.length > 0) {
|
||||
ctem.children.forEach((stem) => {
|
||||
ctem.children.forEach(stem => {
|
||||
if (stem.name == item.menuKey) {
|
||||
stem.isShow = true
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue