feat: add resident miniapp MVP

This commit is contained in:
王鹏
2026-07-07 16:38:13 +08:00
parent bb325151d6
commit 576c54ec9d
52 changed files with 17865 additions and 66 deletions

View File

@@ -1 +1,37 @@
Page({})
const { listSecondGoods } = require('../../api/secondGoodsApi')
Page({
data: {
loading: false,
goods: []
},
onLoad() {
this.load()
},
onShow() {
this.load()
},
load() {
this.setData({ loading: true })
listSecondGoods()
.then((goods) => this.setData({ goods: goods || [] }))
.catch((error) => wx.showToast({ title: error.message, icon: 'none' }))
.finally(() => this.setData({ loading: false }))
},
goCreate() {
wx.navigateTo({ url: '/pages/second-hand/create' })
},
callSeller(event) {
const phone = event.currentTarget.dataset.phone
if (!phone) {
wx.showToast({ title: '暂无电话', icon: 'none' })
return
}
wx.makePhoneCall({ phoneNumber: phone })
}
})