优化代码

pull/17/head
youngS 3 years ago
parent ed18398563
commit 0416bf5e15
  1. 9
      fir_client/src/components/FirHeader.vue
  2. 2
      fir_client/src/components/user/FirUserOrders.vue
  3. 16
      fir_client/src/components/user/FirUserProfileCertification.vue
  4. 14
      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) {

@ -419,7 +419,7 @@
let out_trade_no = this.$route.params.out_trade_no;
if (out_trade_no) {
this.goto_pay(this.current_order_info);
this.$route.params.out_trade_no=undefined;
this.$route.params.out_trade_no = undefined;
}
}
} else if (data.code === 1008) {

@ -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,
@ -256,7 +262,7 @@
this.$message.error("身份证输入不合法");
return false;
}
if(this.cptch.change_type.sms){
if (this.cptch.change_type.sms) {
let checkp = checkphone(this.form.mobile);
if (!checkp) {
this.$message.error("手机号输入不合法");
@ -345,13 +351,13 @@
},
get_auth_code() {
if(this.form.authcode){
if (this.form.authcode) {
this.form.authcode = '';
}
changeInfoFun(data => {
if (data.code === 1000) {
this.cptch = data.data;
if(this.cptch.cptch_key){
if (this.cptch.cptch_key) {
this.form.cptch_key = this.cptch.cptch_key;
}
} else {
@ -387,7 +393,7 @@
},
init() {
if (this.$store.state.userinfo.certification||this.$store.state.userinfo.certification===0) {
if (this.$store.state.userinfo.certification || this.$store.state.userinfo.certification === 0) {
this.certification_status = this.$store.state.userinfo.certification;
if (this.certification_status !== -1) {
this.get_user_certification({methods: 'GET', data: {act: 'usercert'}});

@ -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/>
@ -199,7 +203,7 @@
editdomain_name: false,
edituser_name: false,
editposition: false,
cptch: {"cptch_image": '', "cptch_key": '', "length": 8, change_type:{email:false,sms:false}},
cptch: {"cptch_image": '', "cptch_key": '', "length": 8, change_type: {email: false, sms: false}},
form: {},
}
}, methods: {

Loading…
Cancel
Save