This commit is contained in:
chaosBreaking
2019-10-18 11:34:27 +08:00
3 changed files with 11 additions and 13 deletions

View File

@@ -5,7 +5,6 @@ import _ from 'lodash'
import ticCrypto from 'tic.crypto'
import axios from 'axios'
import * as Ticrypto from 'tic.crypto'
import { tokenSec } from '../../../configSec'
export default {
namespaced: true,
@@ -51,7 +50,7 @@ export default {
const passwd = Ticrypto.hash(state.passwd)
const ts = Date.now()
const path = '/admin/in'
const sig = ticCrypto.hash(ts + path + tokenSec, { hasher: 'md5' })
const sig = ticCrypto.hash(ts + path + 'LimitSaltLOL8080', { hasher: 'md5' })
let result = await axios.post('admin/in', { name: state.username, passwd }, { headers: { ts, sig } })
commit('updateSign', false)
if (result.data.code === 0) {