首页上拉加载优化,云仓优化

This commit is contained in:
cc_zbp 2023-06-02 11:17:45 +08:00
parent 90295d897a
commit 4f5351e190
3 changed files with 60 additions and 64 deletions

View File

@ -77,7 +77,7 @@
where: { where: {
category_id: 0, category_id: 0,
page: 1, page: 1,
limit: 30 limit: 15
}, },
currentItemId: 69, // 0 || 69 currentItemId: 69, // 0 || 69
keyword: '', keyword: '',
@ -88,6 +88,7 @@
} }
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.where.page = 1
this.getCateList() this.getCateList()
this.getGoods() this.getGoods()
this.selfLocation() this.selfLocation()
@ -196,7 +197,9 @@
}, ...data] }, ...data]
}, },
tabsChange(item) { tabsChange(item) {
this.cateGoods = []
this.where.category_id = item.category_id this.where.category_id = item.category_id
this.where.page = 1
this.getGoods() this.getGoods()
this.street_id = item.id this.street_id = item.id
this.tabsData.tabsActive = item.index this.tabsData.tabsActive = item.index

View File

@ -161,8 +161,7 @@
}) })
}, },
go_shop() { go_shop() {
if (this.isYunCang == 0) {
if (this.mer_id == 0) {
return Toast('当前区域没有云仓库') return Toast('当前区域没有云仓库')
} }
uni.navigateTo({ uni.navigateTo({

View File

@ -7,18 +7,12 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import { import { HTTP_REQUEST_URL, HEADER, TOKENNAME } from '@/config/app';
HTTP_REQUEST_URL, import { checkLogin } from '../libs/login';
HEADER,
TOKENNAME
} from '@/config/app';
import {
checkLogin
} from '../libs/login';
import store from '../store'; import store from '../store';
function toLogin(){ function toLogin() {
store.commit("LOGOUT"); store.commit("LOGOUT");
uni.showToast({ uni.showToast({
title: '请登录', title: '请登录',