This commit is contained in:
wt 2025-09-25 14:38:11 +08:00
parent 3fec0df724
commit 662620e3ea

View File

@ -1,4 +1,7 @@
// pages/login/index.js
import {
api
} from '../../utils/api.js'
Page({
/**
@ -29,6 +32,21 @@ Page({
return
}
console.log(e);
const data = {code:e.detail.code}
api("/auth/getPhone", 'GET', data).then(res => {
wx.hideLoading()
if (res.code === 200) {
wx.setStorageSync('user', res.data)
wx.setStorageSync('token', res.data.token)
wx.navigateBack()
} else {
wx.showToast({
icon: 'error',
title: res.msg
})
}
})
},
change(e){
const tmp = this.data.checked === false