优化图标,修改模拟数据
This commit is contained in:
@@ -6,25 +6,25 @@ import type { Banner } from '@/typings/mall'
|
|||||||
export const mockBannerList: Banner[] = [
|
export const mockBannerList: Banner[] = [
|
||||||
{
|
{
|
||||||
id: 'banner_001',
|
id: 'banner_001',
|
||||||
image: 'https://picsum.photos/750/400?random=banner1',
|
image: '/static/ban/1.jpg',
|
||||||
title: '春季新品上市',
|
title: '春季新品上市',
|
||||||
goodsId: 'goods_001',
|
goodsId: 'goods_001',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'banner_002',
|
id: 'banner_002',
|
||||||
image: 'https://picsum.photos/750/400?random=banner2',
|
image: '/static/ban/2.jpg',
|
||||||
title: '数码产品大促',
|
title: '数码产品大促',
|
||||||
goodsId: 'goods_004',
|
goodsId: 'goods_004',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'banner_003',
|
id: 'banner_003',
|
||||||
image: 'https://picsum.photos/750/400?random=banner3',
|
image: '/static/ban/3.jpg',
|
||||||
title: '美妆护肤专场',
|
title: '美妆护肤专场',
|
||||||
goodsId: 'goods_010',
|
goodsId: 'goods_010',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'banner_004',
|
id: 'banner_004',
|
||||||
image: 'https://picsum.photos/750/400?random=banner4',
|
image: '/static/ban/4.jpg',
|
||||||
title: '家居好物推荐',
|
title: '家居好物推荐',
|
||||||
goodsId: 'goods_008',
|
goodsId: 'goods_008',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,55 +1,55 @@
|
|||||||
import type { Category } from '@/typings/mall'
|
import type { Category } from '@/typings/mall'
|
||||||
|
// i-carbon-webhook
|
||||||
/**
|
/**
|
||||||
* 分类模拟数据
|
* 分类模拟数据
|
||||||
*/
|
*/
|
||||||
export const mockCategoryList: Category[] = [
|
export const mockCategoryList: Category[] = [
|
||||||
{
|
{
|
||||||
id: 'cat_001',
|
id: 'cat_001',
|
||||||
name: '服装',
|
name: '农产品',
|
||||||
icon: 'i-carbon-clothing',
|
icon: 'i-carbon-webhook',
|
||||||
cover: 'https://picsum.photos/200/200?random=cat1',
|
cover: 'https://picsum.photos/200/200?random=cat1',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'cat_002',
|
id: 'cat_002',
|
||||||
name: '数码',
|
name: '非遗老字号',
|
||||||
icon: 'i-carbon-phone',
|
icon: 'i-carbon-store',
|
||||||
cover: 'https://picsum.photos/200/200?random=cat2',
|
cover: 'https://picsum.photos/200/200?random=cat2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'cat_003',
|
id: 'cat_003',
|
||||||
name: '食品',
|
name: '美食饮品',
|
||||||
icon: 'i-carbon-restaurant',
|
icon: 'i-carbon-restaurant',
|
||||||
cover: 'https://picsum.photos/200/200?random=cat3',
|
cover: 'https://picsum.photos/200/200?random=cat3',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'cat_004',
|
id: 'cat_004',
|
||||||
name: '家居',
|
name: '粮油副食',
|
||||||
icon: 'i-carbon-home',
|
icon: 'i-carbon-crop',
|
||||||
cover: 'https://picsum.photos/200/200?random=cat4',
|
cover: 'https://picsum.photos/200/200?random=cat4',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'cat_005',
|
id: 'cat_005',
|
||||||
name: '美妆',
|
name: '文创工艺品',
|
||||||
icon: 'i-carbon-face-satisfied',
|
icon: 'i-carbon-ibm-deployable-architecture',
|
||||||
cover: 'https://picsum.photos/200/200?random=cat5',
|
cover: 'https://picsum.photos/200/200?random=cat5',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'cat_006',
|
id: 'cat_006',
|
||||||
name: '运动',
|
name: '电子数码',
|
||||||
icon: 'i-carbon-basketball',
|
icon: 'i-carbon-edge-device',
|
||||||
cover: 'https://picsum.photos/200/200?random=cat6',
|
cover: 'https://picsum.photos/200/200?random=cat6',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'cat_007',
|
id: 'cat_007',
|
||||||
name: '图书',
|
name: '服装鞋袜',
|
||||||
icon: 'i-carbon-book',
|
icon: 'i-carbon-ibm-cloud-direct-link-1-dedicated-hosting',
|
||||||
cover: 'https://picsum.photos/200/200?random=cat7',
|
cover: 'https://picsum.photos/200/200?random=cat7',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'cat_008',
|
id: 'cat_008',
|
||||||
name: '母婴',
|
name: '美妆',
|
||||||
icon: 'i-carbon-baby',
|
icon: 'i-carbon-face-satisfied',
|
||||||
cover: 'https://picsum.photos/200/200?random=cat8',
|
cover: 'https://picsum.photos/200/200?random=cat8',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -66,7 +66,9 @@ async function handleLogin() {
|
|||||||
uni.showToast({ title: '登录成功', icon: 'success' })
|
uni.showToast({ title: '登录成功', icon: 'success' })
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.navigateBack()
|
uni.switchTab({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
})
|
||||||
}, 1500)
|
}, 1500)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
uni.showToast({ title: '登录失败', icon: 'none' })
|
uni.showToast({ title: '登录失败', icon: 'none' })
|
||||||
|
|||||||
BIN
src/static/ban/1.jpg
Normal file
BIN
src/static/ban/1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 219 KiB |
BIN
src/static/ban/2.jpg
Normal file
BIN
src/static/ban/2.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 217 KiB |
BIN
src/static/ban/3.jpg
Normal file
BIN
src/static/ban/3.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 218 KiB |
BIN
src/static/ban/4.jpg
Normal file
BIN
src/static/ban/4.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 208 KiB |
@@ -20,7 +20,7 @@ export const TABBAR_STRATEGY_MAP = {
|
|||||||
// TODO: 1/3. 通过这里切换使用tabbar的策略
|
// TODO: 1/3. 通过这里切换使用tabbar的策略
|
||||||
// 如果是使用 NO_TABBAR(0),nativeTabbarList 和 customTabbarList 都不生效(里面的配置不用管)
|
// 如果是使用 NO_TABBAR(0),nativeTabbarList 和 customTabbarList 都不生效(里面的配置不用管)
|
||||||
// 如果是使用 NATIVE_TABBAR(1),只需要配置 nativeTabbarList,customTabbarList 不生效
|
// 如果是使用 NATIVE_TABBAR(1),只需要配置 nativeTabbarList,customTabbarList 不生效
|
||||||
// 如果是使用 CUSTOM_TABBAR(2,3),只需要配置 customTabbarList,nativeTabbarList 不生效
|
// 如果是使用 CUSTOM_TABBAR(2,3),只需要配置 不生效
|
||||||
export const selectedTabbarStrategy = TABBAR_STRATEGY_MAP.CUSTOM_TABBAR_WITH_CACHE
|
export const selectedTabbarStrategy = TABBAR_STRATEGY_MAP.CUSTOM_TABBAR_WITH_CACHE
|
||||||
|
|
||||||
// TODO: 2/3. 使用 NATIVE_TABBAR 时,更新下面的 tabbar 配置
|
// TODO: 2/3. 使用 NATIVE_TABBAR 时,更新下面的 tabbar 配置
|
||||||
@@ -51,14 +51,15 @@ export const customTabbarList: CustomTabBarItem[] = [
|
|||||||
iconType: 'unocss',
|
iconType: 'unocss',
|
||||||
icon: 'i-carbon-home',
|
icon: 'i-carbon-home',
|
||||||
// badge: 'dot',
|
// badge: 'dot',
|
||||||
|
navigationStyle: 'custom',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pagePath: 'pages/sort/index',
|
pagePath: 'pages/sort/index',
|
||||||
text: '分类',
|
text: '分类',
|
||||||
// 1)在fg-tabbar.vue页面上引入一下并注释掉(见tabbar/index.vue代码第2行)
|
// 1)在fg-tabbar.vue页面上引入一下并注释掉(见tabbar/index.vue代码第2行)
|
||||||
// 2)配置到 unocss.config.ts 的 safelist 中
|
// 2)配置到 unocss.config.ts 的 safelist 中
|
||||||
iconType: 'uiLib',
|
iconType: 'unocss',
|
||||||
icon: 'add-circle',
|
icon: 'i-carbon-view-mode-2',
|
||||||
// badge: 10,
|
// badge: 10,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -67,7 +68,7 @@ export const customTabbarList: CustomTabBarItem[] = [
|
|||||||
// 1)在fg-tabbar.vue页面上引入一下并注释掉(见tabbar/index.vue代码第2行)
|
// 1)在fg-tabbar.vue页面上引入一下并注释掉(见tabbar/index.vue代码第2行)
|
||||||
// 2)配置到 unocss.config.ts 的 safelist 中
|
// 2)配置到 unocss.config.ts 的 safelist 中
|
||||||
iconType: 'unocss',
|
iconType: 'unocss',
|
||||||
icon: 'i-clarity-shopping-cart-line',
|
icon: 'i-carbon-shopping-cart',
|
||||||
// badge: 10,
|
// badge: 10,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -71,7 +71,9 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
// 动态图标需要在这里配置,或者写在vue页面中注释掉
|
// 动态图标需要在这里配置,或者写在vue页面中注释掉
|
||||||
safelist: ['i-carbon-code', 'i-carbon-home', 'i-carbon-user'],
|
safelist: ['i-carbon-code', 'i-carbon-home', 'i-carbon-user','i-carbon-shopping-cart','i-carbon-view-mode-2','i-carbon-webhook',
|
||||||
|
'i-carbon-restaurant','i-carbon-crop','i-carbon-ibm-deployable-architecture',
|
||||||
|
'i-carbon-edge-device','i-carbon-ibm-cloud-direct-link-1-dedicated-hosting','i-carbon-face-satisfied'],
|
||||||
rules: [
|
rules: [
|
||||||
[
|
[
|
||||||
'p-safe',
|
'p-safe',
|
||||||
|
|||||||
Reference in New Issue
Block a user