登录封装

This commit is contained in:
2022-05-09 10:03:23 +08:00
parent 16ba165fec
commit 5bae62d34d
15 changed files with 2400 additions and 30 deletions
+22 -2
View File
@@ -46,12 +46,32 @@ export default () => {
console.log('12123')
}, 1000)
}
const goto = function (e) {
var t = this
Taro.navigateTo({
url: '/pages/details/index',
events: {
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
backFromTargetPage: function (backData) {
console.log('好啦,可以在这里写你的逻辑了', backData)
if (backData.from == 'page2') {
// 监听到 page2 返回
console.log('好啦,可以在这里写你的逻辑了', backData)
t.setData({
isBackFromPage2: !0
})
}
}
}
})
}
return (
<MoveBtn onClick={() => setShowShopCart(!showShopCart)}>
<View className={styles.main}>
<View onClick={(e) => goto(e)}>aaa</View>
<Swiper/>
<View className={styles.search}>
<View className={styles.search_collect}>我的收藏</View>