初始化
This commit is contained in:
@@ -97,4 +97,29 @@
|
||||
content: '/index/user/component/bindPhone'
|
||||
});
|
||||
}
|
||||
|
||||
function loadSecurityInfo() {
|
||||
// 示例:你可以根据实际需求发起 AJAX 请求获取用户安全信息
|
||||
// 这里只做简单演示
|
||||
// 假设后端返回 { phone: '138****8888' } 或 { phone: null }
|
||||
$.ajax({
|
||||
url: '/index/user/getSecurityInfo',
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
if (res.code === 0 && res.data) {
|
||||
if (res.data.phone) {
|
||||
$('#phoneNumber').text(res.data.phone);
|
||||
} else {
|
||||
$('#phoneNumber').text('未绑定');
|
||||
}
|
||||
} else {
|
||||
$('#phoneNumber').text('未绑定');
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
$('#phoneNumber').text('未绑定');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user