同步首页分类栏ui
This commit is contained in:
@@ -5,9 +5,11 @@
|
||||
<script>
|
||||
export default {
|
||||
onLoad(options) {
|
||||
const qs = options ? Object.keys(options).map(k => `${k}=${encodeURIComponent(options[k])}`).join('&') : '';
|
||||
const url = '/pages/main/category' + (qs ? `?${qs}` : '');
|
||||
uni.navigateTo({ url });
|
||||
const categoryId = options && options.categoryId ? String(options.categoryId) : '';
|
||||
if (categoryId !== '') {
|
||||
uni.setStorageSync('selectedCategory', categoryId);
|
||||
}
|
||||
uni.switchTab({ url: '/pages/main/index' });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user