|
@@ -89,13 +89,13 @@
|
|
|
</view>
|
|
|
<!-- 快捷导航 -->
|
|
|
<view class="quick-nav pa-box" v-if="hasShopiing&&navList.length">
|
|
|
- <iconItemsList :list="navList" :iconSize="45" :isLogin="hasLogin" @callback="onNavFun"></iconItemsList>
|
|
|
+ <iconItemsList :list="navList" :iconSize="45" @callback="onNavFun"></iconItemsList>
|
|
|
</view>
|
|
|
<!-- 产品分类 -->
|
|
|
<view class="ptype-nav pa-box" v-if="hasShopiing&&productTypeList.length">
|
|
|
<swiper class="swiper" @change="e=>{currentPtypeDot=e.detail.current}">
|
|
|
<swiper-item v-for="(item, idx) in productTypeList" :index="idx" :key="item.id">
|
|
|
- <iconItemsList :list="item.list" :isLogin="true" type="img"></iconItemsList>
|
|
|
+ <iconItemsList :list="item.list" type="img"></iconItemsList>
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
<view class="indicator-dots">
|
|
@@ -252,7 +252,7 @@
|
|
|
const list = [
|
|
|
{
|
|
|
id:'n0',
|
|
|
- auth: true,
|
|
|
+ auth: this.hasLogin,
|
|
|
icon:'bianmachaxun',
|
|
|
name: '产品编码取货',
|
|
|
color:'#056cd9',
|
|
@@ -261,7 +261,7 @@
|
|
|
},
|
|
|
{
|
|
|
id:'n1',
|
|
|
- auth: true,
|
|
|
+ auth: this.hasLogin,
|
|
|
icon:'saoma',
|
|
|
name: '二维/条码取货',
|
|
|
color:'#ffaa7f',
|
|
@@ -279,12 +279,12 @@
|
|
|
},
|
|
|
{
|
|
|
id:'n2',
|
|
|
- auth: true,
|
|
|
+ auth: this.hasLogin,
|
|
|
icon:'chaxunjilu',
|
|
|
name: 'VIN查询历史',
|
|
|
color:'#97d695',
|
|
|
url:'/pagesA/vinRecord/vinRecord',
|
|
|
- target: 'page'
|
|
|
+ target: this.hasLogin ? 'page' : 'fun'
|
|
|
}
|
|
|
]
|
|
|
return list
|
|
@@ -332,6 +332,8 @@
|
|
|
},
|
|
|
// 下拉刷新
|
|
|
onPullDownRefresh(){
|
|
|
+ // 商品分类
|
|
|
+ this.getGoodType()
|
|
|
this.pageInit(true)
|
|
|
setTimeout(function () {
|
|
|
uni.stopPullDownRefresh();
|
|
@@ -438,7 +440,7 @@
|
|
|
},
|
|
|
// 快速导航单击
|
|
|
onNavFun(item){
|
|
|
- if(this.hasLogin){
|
|
|
+ if(item.auth){
|
|
|
// 非游客
|
|
|
if(this.userInfo.sysUserFlag == '1'){
|
|
|
// 编码取货
|
|
@@ -597,18 +599,19 @@
|
|
|
})
|
|
|
// 获取推荐产品
|
|
|
this.productList = []
|
|
|
+ this.hotProductPageNo = 1
|
|
|
this.getProductList()
|
|
|
},
|
|
|
// 商品列表查询
|
|
|
getProductList(){
|
|
|
this.status = "loading"
|
|
|
- getShopProductList({pageNo:this.hotProductPageNo,pageSize:15,hotFlag:1}).then(res => {
|
|
|
+ getShopProductList({pageNo:this.hotProductPageNo,pageSize:10,hotFlag:1}).then(res => {
|
|
|
if(res.status == 200){
|
|
|
const list = res.data ? res.data.list : []
|
|
|
this.productList.push(list)
|
|
|
this.status = res.data.count>=this.list.length ? "nomore" : 'loadmore'
|
|
|
// 判断是否最后一页
|
|
|
- const maxPages = Math.ceil(res.data.count / 15)
|
|
|
+ const maxPages = Math.ceil(res.data.count / 10)
|
|
|
this.totalhotPage = maxPages
|
|
|
this.status = this.hotProductPageNo >= maxPages ? "nomore" : 'loadmore'
|
|
|
this.noDataText = this.status == 'nomore' ? '没有更多了' : '更多商品'
|