master
yujialong 1 month ago
parent b408562376
commit 3ba5746381
  1. 1
      src/api/index.js
  2. 3
      src/layouts/navbar/index.vue
  3. 46
      src/pages/account/login/index.vue
  4. 23
      src/pages/allocationReview/records/people.vue
  5. 10
      src/pages/expert/list/index.vue
  6. 38
      src/pages/setting/list/index.vue

@ -4,6 +4,7 @@ const { apiBaseURL: host } = Setting
export default {
login: `/users/users/user/login`,
verification: `${host}/users/users/user/captcha`,
getToken: `/users/users/user/getToken`,
sendPhoneVerificationCode: `/users/users/user/sendPhoneVerificationCode`,
forgotPassword: `/users/users/user/forgotPassword`,
forgotPreVerification: `/users/users/user/forgotPreVerification`,

@ -70,6 +70,8 @@ export default {
this.active = '/myReview'
} else if (path.includes('allocationReview/')) {
this.active = '/allocationReview'
} else {
this.active = '/expert'
}
},
mounted () {
@ -89,7 +91,6 @@ export default {
// store
if (Setting.dynamicRoute) {
const { btns, defaultMenus: all } = this
console.log("🚀 ~ initMenu ~ btns:", btns)
const menus = [all[0]]
btns.find(e => e === '分配评阅任务') && menus.push(all[1])
btns.find(e => e === '专家管理') && menus.push(all[2])

@ -201,20 +201,36 @@ export default {
//
submit () {
if (!this.agreeCheck) return Util.errorMsg('请勾选同意,才可继续登录!')
this.$refs.form.validate(valid => {
this.$refs.form.validate(async (valid) => {
if (valid) {
const form = JSON.parse(JSON.stringify(this.form))
this.$post(this.api.login, form).then(({ status, data, message }) => {
const { form } = this
form.distinguish = this.active ? 2 : 1
try {
const { status, data } = await this.$post(this.api.login, form)
let { userAccounts: accounts, token } = data
if (status == 200) {
localStorage.setItem('expert_token', data.token)
//
if (accounts && accounts.length) {
const expert = accounts.find(e => e.isExpert) //
if (expert && expert.isEnable) {
const res = await this.$post(`${this.api.getToken}?id=${expert.id}&platform=${this.platform}`)
if (res.data) token = res.data.token
} else {
return Util.errorMsg('请输入专家账号')
}
} else if (!data.isExpert) {
form.code = ''
return Util.errorMsg('专家评阅平台只允许专家账号登录,请重新输入')
}
localStorage.setItem('expert_token', token)
Util.successMsg('登录成功')
this.$router.replace(`/myReview`)
}
}).catch(res => {
} catch (e) {
form.code = ''
this.getVerImg()
})
}
}
});
},
@ -366,21 +382,10 @@ export default {
.agree {
width: 500px;
height: 450px;
padding-bottom: 20px;
background-color: #062c87;
/deep/.el-checkbox {
color: #fff;
.el-checkbox__label {
color: #fff;
}
background-color: #fff;
.el-checkbox__input.is-checked .el-checkbox__inner {
background-color: #cd4c01;
border-color: #cd4c01;
}
}
}
.agreement {
@ -392,11 +397,9 @@ export default {
margin-bottom: 10px;
font-size: 20px;
font-weight: 600;
color: #fff;
}
.text {
color: #fff;
line-height: 1.6;
}
@ -439,6 +442,7 @@ export default {
.form {
width: 436px;
height: 450px;
padding: 20px 38px 50px;
border-radius: 6px;
background-color: #fff;

@ -167,9 +167,14 @@ export default {
})
},
//
userTypeChange () {
userTypeChange (val) {
const el = this.$refs.nakadais
el && el.setCurrentKey(null)
if (val) {
this.getExpert()
} else {
this.getNakadaiUser()
}
},
//
depClick (data) {
@ -194,6 +199,22 @@ export default {
this.users = list
this.getDetail(init)
},
//
getExpert () {
this.$post(this.api.expertList, {
type: 1,
pageNum: 1,
pageSize: 1000
}).then(({ page }) => {
const list = page.records
const { checked } = this
list.forEach(e => {
e.check = !!checked.find(n => n.accountId === e.accountId)
})
this.users = list
this.getDetail(1)
}).catch(err => { })
},
//
userAllCheckChange (val) {

@ -97,7 +97,7 @@
<script>
import Util from '@/libs/util'
import Setting from '@/setting'
// import clipboard from '@/libs/clipboard'
import clipboard from '@/libs/clipboard'
export default {
data () {
const phonePass = (rule, value, callback) => {
@ -215,11 +215,7 @@ export default {
pageNum: this.page,
pageSize: this.pageSize
}).then(({ page }) => {
const list = page.records
// list.map(e => {
// e.cryptoPhone =
// })
this.list = list
this.list = page.records
this.total = page.total
}).catch(err => { })
},
@ -296,7 +292,7 @@ export default {
},
//
copy (e) {
// clipboard(this.link, e, '')
clipboard('http://121.37.12.51/reviewCenter', e, '链接已复制!')
},
// /
async queryExpert (row, isDetail) {

@ -60,7 +60,7 @@
</el-form>
</div>
<div class="btns">
<el-button size="small" @click="$emit('back')">取消</el-button>
<el-button size="small" @click="$router.back()">取消</el-button>
<el-button type="primary" size="small" @click="submit">更新</el-button>
</div>
</div>
@ -84,10 +84,14 @@
</span>
</el-dialog>
<el-dialog :title="form.phone ? '更换手机号' : '绑定手机号'" :visible.sync="phoneVisible" :close-on-click-modal="false"
@close="closePhone" width="30%">
@close="closePhone" width="400px">
<el-form ref="form" :model="form" label-width="60px">
<el-form-item label="手机号">
<el-input style="width: 404px;" placeholder="请输入手机号" v-model="phone" maxlength="11"></el-input>
<el-form-item label="手机号" ref="diaPhoneItem">
<el-input placeholder="请输入新手机号" v-model="phone" maxlength="11" @input="checkAccountByPhone">
<img v-if="diaClientExist" slot="suffix" class="correct-icon" src="@/assets/images/login/correct.svg"
alt="">
</el-input>
<p v-if="diaClientMsg" class="el-form-item__error">{{ diaClientMsg }}</p>
</el-form-item>
<el-form-item label="验证码">
<div class="flex-between">
@ -150,6 +154,7 @@ export default {
editUsername: '',
accountVisible: false,
updateTime: 0,
phoneReg: /^1[3456789]\d{9}$/,
form: {
accountId: '',
userName: '',
@ -225,6 +230,8 @@ export default {
phoneCode: "",
phoneDisabled: false,
phoneTimer: null,
diaClientExist: false,
diaClientMsg: '',
emailOpener: "",
phoneOpener: "",
originAccount: "",
@ -397,8 +404,24 @@ export default {
},
closePhone () {
if (!this.emailDisabled) {
this.emailCode = "";
this.emailCode = ''
}
},
// type01
async checkAccountByPhone (val) {
if (!this.phoneReg.test(val)) {
this.$refs.diaPhoneItem.clearValidate()
this.diaClientMsg = '请输入正确的手机号'
this.diaClientExist = false
return false
}
try {
const { message } = await this.$get(`${this.api.forgotPreVerification}?phoneOrEmail=${val}&platform=4`)
const exist = message !== 'success' //
this.diaClientExist = exist
this.diaClientMsg = exist ? '' : '该手机号已注册!'
} catch (e) { }
},
sendPhoneCode () {
if (!this.phone) return Util.warningMsg("请输入手机号");
@ -475,4 +498,9 @@ export default {
width: 80px;
}
}
.correct-icon {
width: 30px;
margin-top: -5px;
}
</style>
Loading…
Cancel
Save