|
|
@@ -59,7 +59,7 @@
|
|
|
>
|
|
|
<template v-if="active === 'settings'">
|
|
|
<user-info-item
|
|
|
- v-if="user"
|
|
|
+ v-if="user && supportFeature.note"
|
|
|
key="phone"
|
|
|
class="c-sibling-item--v"
|
|
|
type="phone"
|
|
|
@@ -67,7 +67,7 @@
|
|
|
@update="onChangePhone"
|
|
|
/>
|
|
|
<user-info-item
|
|
|
- v-if="user"
|
|
|
+ v-if="user && supportFeature.email"
|
|
|
key="email"
|
|
|
class="c-sibling-item--v"
|
|
|
type="email"
|
|
|
@@ -75,7 +75,7 @@
|
|
|
@update="onChangeEmail"
|
|
|
/>
|
|
|
<div
|
|
|
- v-if="__WECHAT__"
|
|
|
+ v-if="supportFeature.wechat"
|
|
|
class="l-flex--row center c-sibling-item--v farther"
|
|
|
>
|
|
|
<div
|
|
|
@@ -154,7 +154,10 @@ import {
|
|
|
getWechatQr,
|
|
|
getAppletQr
|
|
|
} from '@/api/user'
|
|
|
-import { GATEWAY } from '@/constant'
|
|
|
+import {
|
|
|
+ GATEWAY,
|
|
|
+ SupportedAlarmStrategies
|
|
|
+} from '@/constant'
|
|
|
import UserInfoItem from './components/UserInfoItem'
|
|
|
import ResetPassword from './components/ResetPassword'
|
|
|
|
|
|
@@ -199,6 +202,13 @@ export default {
|
|
|
const avatar = this.avatar
|
|
|
return avatar ? { backgroundImage: `url("${avatar}")` } : null
|
|
|
},
|
|
|
+ supportFeature () {
|
|
|
+ const map = {}
|
|
|
+ SupportedAlarmStrategies.forEach(({ key, support }) => {
|
|
|
+ map[key] = support
|
|
|
+ })
|
|
|
+ return map
|
|
|
+ },
|
|
|
phone () {
|
|
|
return this.getOrCreateAttribute(this.user, 'phone')
|
|
|
},
|