2022-11-27 23:54:26 +08:00

60 lines
2.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// index.ts
// 获取应用实例
const app = getApp<IAppOption>()
const goodsItems = [
{
cover: 'https://img10.360buyimg.com/mobilecms/s360x360_jfs/t1/103799/25/31581/57788/62e907f2E85845359/45e0568d42c9803d.jpg!q70.dpg.webp',
title: '轻奢高档女装 半身裙2022春秋女韩版中裙百褶中长款A字裙水兵舞防走光裙子跳舞裙子 酒红色 M',
price: 500,
stock: 20,
id: 1
},
{
cover: 'https://img10.360buyimg.com/mobilecms/s360x360_jfs/t1/354/20/1552/77109/5b939e1aE8318003c/b7d99e9173a51fa7.jpg!q70.dpg.webp',
title: '微星MSI 微星Cubi-B171N8GL-009BCN迷你静音电脑PC主机BN6000处理器 准系统(不含内存硬盘)',
price: 2000,
stock: 10,
id: 2
},
{
cover: 'https://img10.360buyimg.com/mobilecms/s360x360_jfs/t1/83150/10/23413/112462/63776142E6818d77c/2721b6f0420b15d2.jpg!q70.dpg.webp',
title: '爱普生EPSONL4268墨仓式品质款 彩色无线多功能一体机(打印复印扫描 wifi 自动双面)新旧包装随机发货',
price: 3000,
stock: 50,
id: 3
},
{
cover: 'https://img10.360buyimg.com/mobilecms/s360x360_jfs/t1/103799/25/31581/57788/62e907f2E85845359/45e0568d42c9803d.jpg!q70.dpg.webp',
title: '轻奢高档女装 半身裙2022春秋女韩版中裙百褶中长款A字裙水兵舞防走光裙子跳舞裙子 酒红色 M',
price: 500,
stock: 20,
id: 4
},
]
Page({
data: {
swiperList: [
{
image: 'https://m15.360buyimg.com/mobilecms/jfs/t1/160398/4/32302/103427/6374d1f3E5b1ecb32/a593b9982d8378cc.jpg!cr_1125x449_0_166!q70.jpg',
url: null,
},
{
image: 'https://m15.360buyimg.com/mobilecms/jfs/t1/203775/20/26428/95041/637fab4dEf6a4434d/3f8770efe691537b.jpg!cr_1053x420_4_0!q70.jpg',
url: null,
},
{
image: 'https://m15.360buyimg.com/mobilecms/jfs/t1/160398/4/32302/103427/6374d1f3E5b1ecb32/a593b9982d8378cc.jpg!cr_1125x449_0_166!q70.jpg',
url: null,
},
{
image: 'https://m15.360buyimg.com/mobilecms/jfs/t1/203775/20/26428/95041/637fab4dEf6a4434d/3f8770efe691537b.jpg!cr_1053x420_4_0!q70.jpg',
url: null,
}
],
goodsItems,
recommendItems: goodsItems.filter(s => s.id <= 3)
},
onLoad() {
}
})