优化代码

pull/17/head
youngS 4 years ago
parent ed18398563
commit 0416bf5e15
  1. 9
      fir_client/src/components/FirHeader.vue
  2. 8
      fir_client/src/components/user/FirUserProfileCertification.vue
  3. 12
      fir_client/src/components/user/FirUserProfileInfo.vue

@ -9,7 +9,11 @@
>
<span>可用于调用公开 API可用于登录 fly-cli请勿泄露您的 token</span>
<el-main>
<el-link type="primary" v-if="token" :underline="false">{{ token }}</el-link>
<el-tooltip content="点击复制到剪贴板">
<el-link type="primary" v-if="token" :underline="false" v-clipboard:copy="token"
v-clipboard:success="copy_success">{{ token }}
</el-link>
</el-tooltip>
</el-main>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="maketoken">重新生成</el-button>
@ -78,6 +82,9 @@
route_info: {'name': '', 'label': ''},
}
}, methods: {
copy_success() {
this.$message.success('复制剪切板成功');
},
maketoken() {
apitoken(data => {
if (data.code === 1000) {

@ -227,7 +227,13 @@
data() {
return {
form: {},
cptch: {cptch_image: '', cptch_key: '',authcode:'', length: 8, change_type:{email:false,sms:false}},
cptch: {
cptch_image: '',
cptch_key: '',
authcode: '',
length: 8,
change_type: {email: false, sms: false}
},
user_certification: {'one': '', 'two': '', 'three': ''},
certification: {},
certification_status: 0,

@ -29,7 +29,8 @@
<el-row :gutter="36">
<el-col :span="16">
<el-input v-model="userinfo.mobile" ref="phone" :readonly="editphone !== true"
prefix-icon="el-icon-mobile" placeholder="手机" maxlength="11" clearable :disabled="!cptch.change_type.sms"/>
prefix-icon="el-icon-mobile" placeholder="手机" maxlength="11" clearable
:disabled="!cptch.change_type.sms"/>
</el-col>
<el-col :span="1">
<el-button icon="el-icon-edit" @click="changePhoneValue">
@ -44,7 +45,8 @@
</el-row>
</el-form-item>
<el-form-item label="图片验证码" style="height: 40px" v-if="editphone === true && cptch.cptch_image && cptch.change_type.sms">
<el-form-item label="图片验证码" style="height: 40px"
v-if="editphone === true && cptch.cptch_image && cptch.change_type.sms">
<el-row style="height: 40px" :gutter="36">
<el-col :span="14">
<el-input placeholder="请输入图片验证码" v-model="userinfo.authcode" maxlength="6" clearable/>
@ -80,7 +82,8 @@
<el-row :gutter="36">
<el-col :span="16">
<el-input v-model="userinfo.email" ref="email" :readonly="editemail !== true"
prefix-icon="el-icon-bank-card" placeholder="邮箱" maxlength="20" clearable :disabled="!cptch.change_type.email"/>
prefix-icon="el-icon-bank-card" placeholder="邮箱" maxlength="20" clearable
:disabled="!cptch.change_type.email"/>
</el-col>
<el-col :span="1">
<el-button icon="el-icon-edit" @click="changeemailValue">
@ -96,7 +99,8 @@
</el-form-item>
<el-form-item label="图片验证码" style="height: 40px" v-if="editemail === true && cptch.cptch_image && cptch.change_type.email">
<el-form-item label="图片验证码" style="height: 40px"
v-if="editemail === true && cptch.cptch_image && cptch.change_type.email">
<el-row style="height: 40px" :gutter="36">
<el-col :span="14">
<el-input placeholder="请输入图片验证码" v-model="userinfo.authcode" maxlength="6" clearable/>

Loading…
Cancel
Save