3
0
Fork 0

feat(order): 新零售代码改造

This commit is contained in:
woody 2025-06-09 17:22:32 +08:00
parent 5527a30484
commit 42584d727a
11 changed files with 243 additions and 582 deletions

View File

@ -108,6 +108,7 @@ export default {
},
handleProductClick(item) {
//
console.log(item, '....ite?')
this.$emit('product-click', item)
},
handleAddToCart(item) {

View File

@ -0,0 +1,109 @@
<template>
<view class="goods-sort">
<!-- 注册 -->
<view v-if="registList.length > 0 && !isZeroLevel" class="goods-flexs">
<view class="goods-view">
<area-product-list
:list="registList"
:title="regist.name"
></area-product-list>
</view>
</view>
<!-- 升级 -->
<view v-if="upgradeList.length > 0" class="goods-flexs">
<view class="goods-view">
<area-product-list
:list="upgradeList"
:title="upgrade.name"
></area-product-list>
</view>
</view>
<!-- 复购 -->
<view v-if="repurchaseList.length > 0" class="goods-flexs">
<view class="goods-view">
<area-product-list
:list="repurchaseList"
:title="repurchase.name"
></area-product-list>
</view>
</view>
<!-- 重消 -->
<view v-if="!isZeroLevel && rescissionList.length > 0" class="goods-flexs">
<view class="goods-view">
<area-product-list
:list="rescissionList"
:title="rescission.name"
></area-product-list>
</view>
</view>
</view>
</template>
<script>
import {
REGIEST_AREA,
UPGRADE_AREA,
REPURCHASE_AREA,
REISSUE_AREA,
} from '@/util/specialAreaMap'
import { MEMBER_SIGN } from '@/util/common'
import areaProductList from '@/components/area-product-list/index.vue'
import { getAreaGoods } from '@/config/special-area'
import { mapGetters } from 'vuex'
export default {
name: 'SpecialAreaWrapper',
components: {
'area-product-list': areaProductList,
},
data() {
return {
registList: [],
upgradeList: [],
repurchaseList: [],
rescissionList: [],
regist: REGIEST_AREA,
upgrade: UPGRADE_AREA,
repurchase: REPURCHASE_AREA,
rescission: REISSUE_AREA,
}
},
computed: {
...mapGetters(['isZeroLevel']),
},
created() {
if (!this.isZeroLevel) {
this.getAreaListById(UPGRADE_AREA.id, this.upgradeList)
this.getAreaListById(REPURCHASE_AREA.id, this.repurchaseList)
}
this.getAreaListById(REISSUE_AREA.id, this.rescissionList)
this.getAreaListById(REGIEST_AREA.id, this.registList)
},
methods: {
getAreaListById(areaId, list) {
const params = {
pageNum: 1,
pageSize: 3,
}
getAreaGoods({
pageNum: 1,
pageSize: 3,
specialArea: areaId,
}).then(res => {
if (res.code == 200) {
list.splice(0, list.length, ...(res.data || []).slice(0, 3))
}
})
},
},
}
</script>
<style lang="scss" scoped>
.goods-sort {
padding-top: 20rpx;
.goods-flexs {
padding: 0 20rpx;
position: relative;
}
}
</style>

View File

@ -1,19 +1,20 @@
const http = uni.$u.http
//首页
export const userIndex = (params) => http.get('/sale/api/wares/get-app-index', { params })
//修改头像
export const updateHead = (data) => http.post('/member/api/member/update-head', data)
export const updateHead = data =>
http.post('/member/api/member/update-head', data)
//提货记录列表
export const pickList = (params) => http.get('/activity/api/pick/list', { params })
export const pickList = params =>
http.get('/activity/api/pick/list', { params })
//提货专区列表
export const pickLogList = (params) => http.get('/activity/api/pick/pick-log', { params })
export const pickLogList = params =>
http.get('/activity/api/pick/pick-log', { params })
//植树活动
export const queryTreeActivity = (params) => http.get('/activity/api/sa-tree-order/queryTreeActivity', { params })
export const queryTreeActivity = params =>
http.get('/activity/api/sa-tree-order/queryTreeActivity', { params })
//创客空间列表
export const marketList = (params) => http.get('/member/api/maker-space/list', { params })
export const marketList = params =>
http.get('/member/api/maker-space/list', { params })

View File

@ -1,34 +1,47 @@
const http = uni.$u.http
//支付配置
export const payConfig = (params) => http.get('/pay/config', { params })
export const payConfig = params => http.get('/pay/config', { params })
//查询订单明细
export const orderInfo = (params) => http.post('/sale/api/order/query-order', params)
export const orderInfo = params =>
http.post('/sale/api/order/query-order', params)
//订单状态
export const orderStatus = (params) => http.get('/system/pub/enums/order-status-api', { params })
export const orderStatus = params =>
http.get('/system/pub/enums/order-status-api', { params })
//计算邮费
export const pickPostAge = (params) => http.get('/activity/api/pick/postage', { params })
export const pickPostAge = params =>
http.get('/activity/api/pick/postage', { params })
//订单列表
export const orderList = (params) => http.get('/sale/api/my-order/list', { params })
export const orderList = params =>
http.get('/sale/api/my-order/list', { params })
//订单详情
export const orderDetails = (orderCode) => http.get('/sale/api/my-order/detail/' + orderCode)
export const orderDetails = orderCode =>
http.get('/sale/api/my-order/detail/' + orderCode)
//订单取消
export const cancelOrder = (orderCode) => http.delete('/sale/api/my-order/cancel/' + orderCode)
export const cancelOrder = orderCode =>
http.delete('/sale/api/my-order/cancel/' + orderCode)
//物流状态
export const expressList = (id) => http.get('/sale/api/my-order/express/' + id,)
export const expressList = id => http.get('/sale/api/my-order/express/' + id)
//校验订单状态
export const payCheck = (id) => http.get('/sale/api/my-order/pay-check/' + id,)
export const payCheck = id => http.get('/sale/api/my-order/pay-check/' + id)
//订单类型
export const orderType = (params) => http.get('/sale/api/my-order/order-type', { params })
export const orderType = params =>
http.get('/sale/api/my-order/order-type', { params })
//提货卡详情
export const pickDetails = (params) => http.get('/activity/api/pick/detail', { params })
export const pickDetails = params =>
http.get('/activity/api/pick/detail', { params })
//自助撤单列表
export const selfRevokeList = (params) => http.get('/sale/api/my-order/selfRevokeList', { params })
export const selfRevokeList = params =>
http.get('/sale/api/my-order/selfRevokeList', { params })
//自助撤单参数校验
export const selfRevokeListCheck = (params) => http.post('/sale/api/my-order/check-self-revoke-order', params)
export const selfRevokeListCheck = params =>
http.post('/sale/api/my-order/check-self-revoke-order', params)
//自助撤单
export const selfRevokeOrder = (params) => http.post('/sale/api/my-order/self-revoke-order', params)
export const selfRevokeOrder = params =>
http.post('/sale/api/my-order/self-revoke-order', params)
// 获取可升级级别
export const getUpgradeLevel = params =>
http.post('/sale/api/retail-order/valid-mem-level', { params })

View File

@ -1,9 +1,10 @@
<template>
<view :class="userInfo.skin ? 'content1' : 'content'">
<view :class="userInfo && userInfo.skin ? 'content1' : 'content'">
<view class="content_a">
<!-- 商品专区入口 先别删 -->
<!-- <view @tap="goSpecialArea">会员专区</view> -->
<view :class="userInfo.skin ? 'index-top1' : 'index-top'"> </view>
<view :class="userInfo && userInfo.skin ? 'index-top1' : 'index-top'">
</view>
<view class="banner" v-if="isEmpty(goodsList.advertBannerList) == false">
<view class="uni-margin-wrap">
@ -27,53 +28,12 @@
</swiper>
</view>
</view>
<special-area-wrapper />
<view class="goods-sort">
<view class="goods-flexs">
<view v-for="(item, index) in recommendSpecialAreaList" :key="index">
<view
class="goods-view"
@click="navTap(item)"
v-if="item.waresList && (index < 8 || moreFlag == true)"
>
<area-product-list
:list="item.waresList"
:title="item.specialAreaName"
size="small"
></area-product-list>
<!-- <view class="goods-top">
<view class="title">{{ item.specialAreaName }}</view>
</view>
<template v-if="item.waresList">
<view class="goods-cen">
<view
class="goods-list"
v-for="(items, indexs) in item.waresList"
:key="indexs"
>
<view class="goods-content">
<view class="goods">
<image :src="items.cover1"></image>
</view>
</view>
</view>
</view>
</template> -->
</view>
</view>
</view>
<view v-if="isEmpty(goodsList.recommendSpecialAreaList) == false">
<view
class="more"
@click="more"
v-if="!moreFlag && goodsList.recommendSpecialAreaList.length > 6"
>
{{ '查看更多' }}
</view>
</view>
<view class="goods_content">
<view class="goods_content" style="padding-bottom: 130rpx">
<view
class="goods-center-lists"
v-for="item in goodsList.waresVoList"
v-for="item in goodsList"
:key="item.waresId"
@click="goDetails(item)"
>
@ -88,7 +48,9 @@
<view class="padding_s goods-info">
<view class="goods-name">{{ item.waresName }}</view>
<view class="goods-sales-wrapper">
<!-- <view class="goods-sales">累计销量{{ formatSales(item.sales) }}</view> -->
<view class="goods-sales"
>累计销量{{ formatSales(item.sales) }}</view
>
<view
class="goods-price"
v-if="item.specialArea == 31 && userInfo.isMakerSpace == 1"
@ -151,7 +113,7 @@
confirmColor="#DE3932"
@close="promptFlag = false"
@cancel="promptFlag = false"
@confirm="toDel"
@confirm="confirmHandle"
:content="promptMsg"
></u-modal> -->
</div>
@ -169,16 +131,17 @@ import clTabbar from '@/components/cl-tabbar.vue'
import noticePopup from '@/components/noticePopup.vue'
import getTree from '@/components/getTree.vue'
import znNewsPopup from '@/components/znNewsPopup.vue'
import areaProductList from '@/components/area-product-list/index.vue'
import { formatCurrency } from '@/util/index.js'
import { mapGetters } from 'vuex'
import SpecialAreaWrapper from '@/components/area-product-list/special-area-wrapper.vue'
import { REGIEST_AREA, REISSUE_AREA } from '@/util/specialAreaMap'
export default {
components: {
noticePopup,
znNewsPopup,
'cl-tabbar': clTabbar,
getTree,
areaProductList,
'special-area-wrapper': SpecialAreaWrapper,
},
filters: {
seles(value) {
@ -203,194 +166,10 @@ export default {
duration: 500,
goodsList: [],
recommendSpecialAreaList: [],
zoneList: [
{
label: '注册专区',
value: 1,
name: 'regiest',
children: [
{
label: '自营专区',
value: 1,
name: 'regiestArea',
isShow: true,
},
{
label: '乐学易考',
value: 24,
name: 'ezLearnReg',
isShow: true,
},
],
},
{
label: '升级专区',
value: 2,
name: 'upgrade',
children: [
{
label: '自营专区',
value: 2,
name: 'upgradeArea',
isShow: true,
},
{
label: '海粉专区',
value: 27,
name: 'haiFunUpd',
isShow: true,
},
{
label: '乐学易考',
value: 25,
name: 'ezLearnUp',
isShow: true,
},
],
},
{
label: '复购专区',
value: 3,
name: 'repurchase',
children: [
{
label: '自营专区',
value: 3,
name: 'self',
isShow: true,
},
{
label: '乐学易考',
value: 26,
name: 'ezLearnRep',
isShow: true,
},
{
label: '免费注册',
value: 21,
name: 'haiFans',
isShow: true,
},
{
label: '复购合作',
value: 22,
name: 'cooperation',
isShow: true,
},
{
label: '直播专区',
value: 14,
name: 'live',
isShow: true,
},
{
label: '工具流',
value: 12,
name: 'gongju',
isShow: true,
},
],
},
{
label: '福利专区',
value: 13,
children: [],
name: 'welfare',
},
{
label: '积分专区',
value: 11,
children: [],
name: 'integral',
},
{
label: '重消专区',
value: 10,
children: [],
name: 'rescission',
},
{
label: '专供专区',
value: 31,
children: [],
name: 'wolesaleArea',
},
{
label: '续约专区',
value: 30,
children: [],
name: 'renewalArea',
},
{
label: '创客空间专区',
value: 28,
children: [],
name: 'makerArea',
},
{
label: '架构管理',
value: 6,
name: 'frame',
children: [
{
label: '安置架构',
value: 6,
name: 'architecture',
isShow: true,
},
{
label: '推荐架构',
value: 7,
name: 'recommend',
isShow: true,
},
],
},
{
label: '分享专区',
value: 7,
name: 'share',
children: [
{
label: '海粉分享',
value: 7,
name: 'hiFans',
isShow: true,
},
{
label: '免费注册',
value: 21,
name: 'haiFans',
isShow: true,
},
],
},
{
label: '创客礼包',
value: 18,
isShow: true,
children: [
{
label: '创客礼包',
value: 18,
isShow: true,
children: [],
},
{
label: '赋能礼包',
value: 19,
isShow: true,
children: [],
},
],
},
],
}
},
computed: {
...mapGetters(['priceSymbol', 'priceSymbolVisible']),
...mapGetters(['priceSymbol', 'priceSymbolVisible', 'isZeroLevel']),
},
onLoad() {
if (
@ -398,21 +177,20 @@ export default {
uni.getStorageSync('showInfo') == 0
) {
}
this.getGoodsInfo()
this.getAreaGoods()
this.getAreaGoods(this.isZeroLevel ? REISSUE_AREA.id : REGIEST_AREA.id)
// this.getLanguage();
// this.getService()
},
onShow() {
this.$store.dispatch('getCarLength')
},
onPullDownRefresh() {
let that = this
setTimeout(() => {
that.getGoodsInfo()
uni.stopPullDownRefresh() //
}, 1000)
},
// onPullDownRefresh() {
// let that = this
// setTimeout(() => {
// that.getGoodsInfo()
// uni.stopPullDownRefresh() //
// }, 1000)
// },
methods: {
formatCurrency,
formatSales(value) {
@ -447,12 +225,18 @@ export default {
}
})
},
getAreaGoods() {
getAreaGoods().then(res => {
this.recommendSpecialAreaList = res.data?.recommendSpecialAreaList || []
getAreaGoods(areaId) {
getAreaGoods({
pageNum: 1,
pageSize: 3,
specialArea: areaId,
}).then(res => {
if (res.code == 200) {
this.goodsList = res.data || []
}
})
},
toDel() {
confirmHandle() {
this.promptFlag = false
if (this.jumpPage == 1) {
uni.navigateTo({
@ -534,9 +318,9 @@ export default {
}
},
getGoodsInfo() {
apis.userIndex().then(res => {
this.goodsList = res.data
})
// apis.userIndex().then(res => {
// this.goodsList = res.data
// })
},
goUrl(item) {
@ -580,58 +364,6 @@ export default {
}
}
},
navTap(item) {
let tapx = -1
this.zoneList.forEach((items, index) => {
if (items.value == item.specialArea) {
tapx = index
}
})
if (tapx == -1) {
this.zoneList.forEach((items, index) => {
items.children.forEach(ctem => {
if (ctem.value == item.specialArea) {
if (item.specialArea == 21) {
uni.navigateTo({
url:
'/pages/specialArea/haIndex?label=' +
item.specialAreaName +
'&specialArea=21&diff=1',
})
} else {
uni.navigateTo({
url:
'/pages/specialArea/list?label=' +
items.label +
'&specialArea=' +
items.value +
'&childArea=' +
item.specialArea +
'&children=' +
JSON.stringify(items.children) +
'&diff=1',
})
}
}
})
})
} else {
if (item.specialArea == 30) {
this.goAreaUrl()
} else {
uni.navigateTo({
url:
'/pages/specialArea/list?label=' +
item.specialAreaName +
'&specialArea=' +
item.specialArea +
'&children=' +
JSON.stringify(this.zoneList[tapx].children) +
'&diff=1',
})
}
}
},
goSpecialArea() {
uni.navigateTo({
url: '/pages/index/specialArea/index',
@ -687,7 +419,7 @@ header {
width: 100%;
margin-top: 10rpx;
color: #333;
font-size: 26rpx;
font-size: 32rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
@ -732,7 +464,7 @@ header {
display: flex;
flex: 1;
flex-direction: column;
justify-content: flex-end;
justify-content: space-between;
.goods-sales {
font-size: 24rpx;
@ -764,10 +496,6 @@ header {
}
}
.goods-sort {
padding-bottom: 130rpx;
}
.swiper-s {
height: 495rpx;
}

View File

@ -7,9 +7,9 @@
<template>
<view class="content">
<view class="context">
<view class="subTxt">
<!-- <view class="subTxt">
<view class="subTxt1">{{ '会员信息' }}</view>
</view>
</view> -->
<u-form :model="form" labelWidth="75" :rules="rules" ref="uForm">
<!-- <u-form-item :label="'发货方式'" borderBottom>
<view class="pickerHui">
@ -460,6 +460,12 @@ import mustAgreeMent from '@/components/mustAgreeMent.vue'
import agreement from '@/components/agreement.vue'
import jxsht from '@/components/jxsht.vue'
import tgfuxy from '@/components/tgfuxy.vue'
import {
REGIEST_AREA,
UPGRADE_AREA,
REPURCHASE_AREA,
REISSUE_AREA,
} from '@/util/specialAreaMap'
export default {
components: {
@ -645,50 +651,7 @@ export default {
this.userInfo = uni.getStorageSync('User')
this.form.upgradeMemberCode = this.userInfo.memberCode
this.getUserName()
let str = ''
if (
this.specialArea == 3 ||
this.specialArea == 12 ||
this.specialArea == 14 ||
this.specialArea == 22 ||
this.specialArea == 26
) {
str = '复购专区'
} else if (this.specialArea == 13) {
str = '福利专区'
} else if (this.specialArea == 14) {
str = '直播专区'
} else if (this.specialArea == 11) {
str = '积分专区'
} else if (this.specialArea == 10) {
str = '重消专区'
} else if (
this.specialArea == 2 ||
this.specialArea == 25 ||
this.specialArea == 27
) {
str = '升级专区'
} else if (this.specialArea == 7 || this.specialArea == 101) {
str = '嗨粉专区'
} else if (this.specialArea == 18) {
str = '创客礼包'
this.isSpace = true
} else if (this.specialArea == 19) {
str = '赋能礼包'
this.isSpace = true
} else if (this.specialArea == 28) {
str = '创客空间专区'
} else if (this.specialArea == 31) {
str = '专供专区'
this.isSpace = true
} else if (this.specialArea == 30) {
str = '续约专区'
this.isSpace = true
}
uni.setNavigationBarTitle({
title: str,
})
if (this.specialArea == 30) {
this.agreementShow = [1]
this.$forceUpdate()
@ -699,6 +662,18 @@ export default {
this.getAddressList()
},
methods: {
setPageTitle(areaId) {
const areaList = [
REGIEST_AREA,
UPGRADE_AREA,
REISSUE_AREA,
REPURCHASE_AREA,
]
const title = areaList.find(item => item.id == areaId)?.name
uni.setNavigationBarTitle({
title,
})
},
toAgree() {
// agreeMent
if (this.specialArea == 30) {

View File

@ -6,7 +6,7 @@
-->
<template>
<view class="content">
<view class="con_top">
<!-- <view class="con_top">
<view class="con_top_i" @click="toRegiest(0)">
<view>{{ '快速注册' }}</view>
<view :class="isClick == 0 ? 'bai' : ''"></view>
@ -15,8 +15,7 @@
<view>{{ '普通注册' }}</view>
<view :class="isClick == 1 ? 'bai' : ''"></view>
</view>
</view>
<view class="zhan"></view>
</view> -->
<view class="context">
<u-form :model="form" labelWidth="75" :rules="rules" ref="uForm">
<u-form-item :label="'申请级别'" borderBottom prop="pkGradeVal">

View File

@ -181,6 +181,14 @@
<script>
import * as api from '@/config/goods'
import clTabbar from '@/components/cl-tabbar.vue'
import {
REGIEST_AREA,
UPGRADE_AREA,
REPURCHASE_AREA,
REISSUE_AREA,
} from '@/util/specialAreaMap'
import { MEMBER_SIGN } from '@/util/common'
export default {
components: {
'cl-tabbar': clTabbar,
@ -312,13 +320,13 @@ export default {
}
},
goBuy() {
console.log(this.goodsCheck[0])
let shoppArr = this.goodsCheck[0].orderItemsParams.map(item => {
return item.shoppingId
})
if (
this.goodsCheck[0].specialArea == 1 ||
this.goodsCheck[0].specialArea == 24
[REGIEST_AREA.id, UPGRADE_AREA.id].includes(
this.goodsCheck[0].specialArea
)
) {
let deleteList = []
shoppArr.forEach(item => {
@ -333,54 +341,6 @@ export default {
'&shoppArr=' +
JSON.stringify(shoppArr),
})
} else if (this.goodsCheck[0].specialArea == 21) {
uni.setStorageSync(
'haiConfirm',
JSON.stringify(this.goodsCheck[0].orderItemsParams)
)
uni.navigateTo({
url: '/pages/other/haiConfirm?shoppArr=' + JSON.stringify(shoppArr),
})
} else if (this.goodsCheck[0].specialArea == 7) {
uni.navigateTo({
url:
'/pages/hiFans/index?specialArea=' +
this.goodsCheck[0].specialArea +
'&shoppArr=' +
JSON.stringify(shoppArr),
})
} else {
if (this.goodsCheck[0].specialArea == 2) {
let deleteList = []
shoppArr.forEach(item => {
deleteList.push({
shoppingId: item,
})
})
uni.navigateTo({
url:
'/pages/other/index?specialArea=' +
this.goodsCheck[0].specialArea +
'&shoppArr=' +
JSON.stringify(shoppArr),
})
} else if (this.goodsCheck[0].specialArea == 30) {
if (this.goodsCheck[0].orderItemsParams.length > 1) {
uni.showToast({
title: '续约专区每次只能购买一件商品',
icon: 'none',
})
return false
} else {
let num = this.goodsCheck[0].orderItemsParams.some(
item => item.quantity > 1
)
if (num) {
uni.showToast({
title: '续约专区每次只能购买一件商品',
icon: 'none',
})
return false
} else {
uni.navigateTo({
url:
@ -390,33 +350,6 @@ export default {
JSON.stringify(shoppArr),
})
}
}
} else if (this.goodsCheck[0].specialArea == 31) {
if (this.totalPrice < 1000) {
uni.showToast({
title: '购买商品总价格不能低于1000元',
icon: 'none',
duration: 1500,
})
} else {
uni.navigateTo({
url:
'/pages/other/index?specialArea=' +
this.goodsCheck[0].specialArea +
'&shoppArr=' +
JSON.stringify(shoppArr),
})
}
} else {
uni.navigateTo({
url:
'/pages/other/index?specialArea=' +
this.goodsCheck[0].specialArea +
'&shoppArr=' +
JSON.stringify(shoppArr),
})
}
}
},
//
changeCar(e, item, ctem) {

View File

@ -6,124 +6,27 @@
-->
<template>
<view class="content">
<view class="goods-sort">
<!-- 注册 -->
<view
v-if="registList.length > 0 && user.memberSign !== 1"
class="goods-flexs"
>
<view class="goods-view">
<area-product-list
:list="registList"
:title="regist.name"
></area-product-list>
</view>
</view>
<!-- 升级 -->
<view
v-if="upgradeList.length > 0 && user.memberSign === 1"
class="goods-flexs"
>
<view class="goods-view">
<area-product-list
:list="upgradeList"
:title="upgrade.name"
></area-product-list>
</view>
</view>
<!-- 复购 -->
<view
v-if="repurchaseList.length > 0 && user.memberSign === 1"
class="goods-flexs"
>
<view class="goods-view">
<area-product-list
:list="repurchaseList"
:title="repurchase.name"
></area-product-list>
</view>
</view>
</view>
<!-- 重消 -->
<view
v-if="rescissionList.length > 0 && user.memberSign === 1"
class="goods-flexs"
>
<view class="goods-view">
<area-product-list
:list="rescissionList"
:title="rescission.name"
></area-product-list>
</view>
</view>
<special-area-wrapper />
<cl-tabbar :current="2"></cl-tabbar>
</view>
</template>
<script>
import * as api from '@/config/goods'
import { getAreaGoods } from '@/config/special-area'
import * as apis from '@/config/index.js'
import clTabbar from '@/components/cl-tabbar.vue'
import * as ban from '@/config/balance.js'
import areaProductList from '@/components/area-product-list/index.vue'
import { mapGetters } from 'vuex'
import {
REGIEST_AREA,
UPGRADE_AREA,
REPURCHASE_AREA,
REISSUE_AREA,
} from '@/util/specialAreaMap'
import SpecialAreaWrapper from '@/components/area-product-list/special-area-wrapper.vue'
export default {
components: {
'cl-tabbar': clTabbar,
'area-product-list': areaProductList,
},
computed: {
...mapGetters(['user']),
},
data() {
return {
goodsList: [],
specialImg: require('@/static/images/two2.jpg'),
registList: [],
upgradeList: [],
repurchaseList: [],
rescissionList: [],
regist: REGIEST_AREA,
upgrade: UPGRADE_AREA,
repurchase: REPURCHASE_AREA,
rescission: REISSUE_AREA,
}
},
onLoad() {
this.getGoodsInfo()
'special-area-wrapper': SpecialAreaWrapper,
},
methods: {
getGoodsInfo() {
const params = {
pageNum: 1,
pageSize: 3,
}
const queryArea = [
REGIEST_AREA.id,
UPGRADE_AREA.id,
REPURCHASE_AREA.id,
REISSUE_AREA.id,
]
if (this.user.memberSign === 1) {
queryArea.shift()
}
const queryList = queryArea.map(areaId => {
return getAreaGoods({
pageNum: 1,
pageSize: 3,
specialArea: areaId,
})
})
},
data() {
return {}
},
onLoad() {},
methods: {},
}
</script>
@ -133,12 +36,4 @@ export default {
// padding: 0 20rpx;
min-height: 94vh;
}
.goods-sort {
padding-bottom: 130rpx;
.goods-flexs {
padding: 30rpx 20rpx 20rpx;
position: relative;
}
}
</style>

View File

@ -1,9 +1,5 @@
/*
* @Descripttion:
* @version:
* @Author: kBank
* @Date: 2022-10-24 10:45:39
*/
import { MEMBER_SIGN } from '@/util/common'
const getters = {
shopCarLength: state => state.user.shopCarLength,
smallCarLength: state => state.user.smallCarLength,
@ -11,5 +7,6 @@ const getters = {
priceSymbol: state => state.system.priceSymbol,
priceDecimal: state => state.system.priceDecimal,
priceSymbolVisible: state => state.system.priceSymbolVisible,
isZeroLevel: state => state.user?.user?.memberSign === MEMBER_SIGN.ZERO_LEVEL,
}
export default getters

10
util/common.js Normal file
View File

@ -0,0 +1,10 @@
// 会员标记(0=正常会员1=V日会员2=V5会员)
// 正常会员:指V1以上可以查看所有功能
// VO会员:指V日级别只有会员专区
// V5会员:指V5级别只有V5显示市场动态等
export const MEMBER_SIGN = {
ZERO_LEVEL: 1,
NORMAL_LEVEL: 0,
V5_LEVEL: 2,
}