调整首页

This commit is contained in:
2024-03-26 17:38:31 +08:00
parent 756f567dba
commit 3b5525a2a2
18 changed files with 247 additions and 34 deletions

View File

@@ -17,7 +17,8 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
const { id, name } = options;
const querys = decodeURIComponent(options.scene)
const { id, name } = querys;
this.setData({ id, name })
},
exit() {
@@ -25,12 +26,15 @@ Page({
},
async join() {
const { id } = this.data;
const { code, message } = await userApply({ id })
const { code, message, data } = await userApply({ id })
if (code !== OK) {
alertInfo(message)
return;
}
alertSuccess("加入成功")
const { token, ...currentUser } = data;
wx.setStorageSync('user', currentUser)
wx.setStorageSync('token', token)
setTimeout(() => {
wx.switchTab({
url: '/pages/home/index',