45 lines
1.1 KiB
JavaScript
45 lines
1.1 KiB
JavaScript
export default OakComponent({
|
|
isList: false,
|
|
data: {
|
|
channels: [],
|
|
loading: false,
|
|
},
|
|
properties: {
|
|
oakId: '',
|
|
changeMobileUrl: '', //绑定手机
|
|
},
|
|
lifetimes: {
|
|
async attached() {
|
|
const userId = this.props.oakId;
|
|
this.setState({
|
|
loading: true,
|
|
});
|
|
try {
|
|
const { result } = await this.features.cache.exec('getChangePasswordChannels', {
|
|
userId: userId,
|
|
});
|
|
this.setState({
|
|
channels: result,
|
|
loading: false,
|
|
});
|
|
}
|
|
catch {
|
|
this.setState({
|
|
loading: false,
|
|
channels: [],
|
|
});
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
goToMobile() {
|
|
const { changeMobileUrl } = this.props;
|
|
if (changeMobileUrl) {
|
|
this.navigateTo({
|
|
url: changeMobileUrl,
|
|
});
|
|
}
|
|
},
|
|
},
|
|
});
|