目录
一、media
二、string.json文件
三、pages
3.1 登录页面:gouwuPage.ets
3.2 PageResource.ets
3.3 商品页面:shangpinPage.ets
3.4 我的页面:wodePage.ets
3.5 注册页面:zhucePage.ets
3. 购物网站主页面:gwPage.ets
一、media
图片位置:entry > src > main > resources > base > media
百度网盘链接:https://pan.baidu.com/s/1JZn-U5Sqk6hOSHKz6D_98Q
提取码:bosg
二、string.json文件
以下三个文件均需要添加。
{"string": [{"name": "mylove","value": "我的最爱"},{"name": "historyrecord","value": "历史记录"},{"name": "message","value": "消息"},{"name": "shoppingcart","value": "购物栏"},{"name": "mygoal","value": "我的目标"},{"name": "group","value": "圈子"},{"name": "favorites","value": "收藏"},{"name": "recylebin","value": "回收站"},{"name": "yifu","value": "衣服"},{"name": "yan","value": "烟"},{"name": "jiu","value": "酒"},{"name": "huazhuangpin","value": "化妆品"},{"name": "xie","value": "鞋"},{"name": "daifukuan","value": "待付款"},{"name": "daifahuo","value": "待发货"},{"name": "daishouhuo","value": "待收货"},{"name": "daipinjia","value": "待评价"}]
}
三、pages
3.1 登录页面:gouwuPage.ets
import router from '@ohos.router'
import prompt from '@ohos.promptAction';
@Entry
@Component
struct GouwuPage{//定义SwiperController类型的变量private controller: SwiperController =new SwiperController()private intervalID=0private startPlay(swiper:SwiperController){this.intervalID=setInterval(function (){swiper.showNext()},3000)}
aboutToAppear() {this.startPlay(this.controller)
}@State zhanghao:string|number =''@State mima:string|nu