1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

小程序:首页按钮功能完成;个人中心、生活物资页框架;体温上报定位权限获取失败提示信息;删除部分无用代码;

This commit is contained in:
2023-03-18 17:52:56 +08:00
parent 94a2dbf26d
commit ee7e2e9acb
33 changed files with 712 additions and 181 deletions

View File

@@ -0,0 +1,122 @@
// pages/shop/shop.js
Page({
/**
* 页面的初始数据
*/
data: {
sidebarActiveId: -1,
sidebarList: [
{
id: -1,
title: "全部分类",
},
{
id: 1,
title: "1",
},
{
id: 2,
title: "防疫物资",
},
{
id: 3,
title: "111",
},
{
id: 4,
title: "111",
},
{
id: 5,
title: "111",
},
],
tabbarList: [
{
id: 1,
goodsName: "温度计",
counterPrice: "10.00",
retailPrice: "12.00",
picUrl: "https://cdn-we-retail.ym.tencent.com/tsr/goods/gh-2b.png?imageMogr2/thumbnail/320x320/quality/70/strip/format/webp",
},
{
id: 2,
goodsName: "医用口罩",
counterPrice: "100.00",
retailPrice: "12.50",
picUrl: "https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3a.png?imageMogr2/thumbnail/320x320/quality/70/strip/format/webp",
}
]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
sidebarItemTap(event) {
// 清除原来的选中项,并设置新的选中项
// console.log("event.target", event.target)
// console.log("event.currentTarget", event.currentTarget)
let dataset = event.currentTarget.dataset
console.log("dataset", dataset)
this.setData({
sidebarActiveId: dataset.item.id,
})
return
}
})