master
parent
adac7a567e
commit
052866dda3
|
|
@ -1,3 +1,3 @@
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|
||||||
VUE_APP_BASE_API = 'https://lcny-api.peidikeji.cn'
|
VUE_APP_BASE_API = 'https://lcny.sk797.cn'
|
||||||
|
|
@ -73,11 +73,10 @@
|
||||||
"flv.js": "^1.6.2",
|
"flv.js": "^1.6.2",
|
||||||
"flyio": "^0.6.2",
|
"flyio": "^0.6.2",
|
||||||
"hls.js": "^1.4.12",
|
"hls.js": "^1.4.12",
|
||||||
|
"js-md5": "^0.8.3",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"mui-player": "^1.8.1",
|
"mui-player": "^1.8.1",
|
||||||
"portal-vue": "^2.1.7",
|
"portal-vue": "^2.1.7",
|
||||||
"node-sass": "^6.0.1",
|
|
||||||
"sass-loader": "^13.3.2",
|
|
||||||
"uview-ui": "^1.8.8",
|
"uview-ui": "^1.8.8",
|
||||||
"video.js": "^8.6.1",
|
"video.js": "^8.6.1",
|
||||||
"videojs-contrib-hls": "^5.15.0",
|
"videojs-contrib-hls": "^5.15.0",
|
||||||
|
|
@ -108,6 +107,7 @@
|
||||||
"postcss-comment": "^2.0.0",
|
"postcss-comment": "^2.0.0",
|
||||||
"postcss-windicss": "file:src/vendor/postcss-windicss",
|
"postcss-windicss": "file:src/vendor/postcss-windicss",
|
||||||
"sass": "^1.43.4",
|
"sass": "^1.43.4",
|
||||||
|
"sass-loader": "^8.0.2",
|
||||||
"vue-template-compiler": "^2.6.11"
|
"vue-template-compiler": "^2.6.11"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,9 @@
|
||||||
v-model="password"
|
v-model="password"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<u-button type="primary" shape="circle" @tap="login()">登 录</u-button>
|
<u-button type="primary" shape="circle" @tap="login()"
|
||||||
|
>登 录</u-button
|
||||||
|
>
|
||||||
<!-- <view class="reg" @tap="reg()">注 册</view> -->
|
<!-- <view class="reg" @tap="reg()">注 册</view> -->
|
||||||
</form>
|
</form>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -40,6 +42,7 @@ import {
|
||||||
toast,
|
toast,
|
||||||
} from '@/com/utils.js'
|
} from '@/com/utils.js'
|
||||||
import jwt from '@/api/jwt.js'
|
import jwt from '@/api/jwt.js'
|
||||||
|
import md5 from 'js-md5'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -62,7 +65,7 @@ export default {
|
||||||
}
|
}
|
||||||
let params = {
|
let params = {
|
||||||
username: this.username,
|
username: this.username,
|
||||||
password: this.password,
|
password: md5(this.password),
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$http
|
this.$http
|
||||||
|
|
@ -134,8 +137,6 @@ export default {
|
||||||
padding-top: 80rpx;
|
padding-top: 80rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.t-login input {
|
.t-login input {
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,7 @@
|
||||||
<view class="handle-btns">
|
<view class="handle-btns">
|
||||||
<view v-auth="['endpoint.admin_users.destroy']" class="btn_del" @click="deleteInfoId(formInfo.id)">删除</view>
|
<view v-auth="['endpoint.admin_users.destroy']" class="btn_del" @click="deleteInfoId(formInfo.id)">删除</view>
|
||||||
<view v-auth="['endpoint.admin_users.edit_password']" class="btn_edit" @click="editPwdPopup(formInfo.id)">修改密码</view>
|
<view v-auth="['endpoint.admin_users.edit_password']" class="btn_edit" @click="editPwdPopup(formInfo.id)">修改密码</view>
|
||||||
|
<view v-if="formInfo.banned_at" v-auth="['super']" class="btn_edit" @click="unlock(formInfo.id)">解封</view>
|
||||||
<view v-auth="['endpoint.admin_users.edit']" class="btn_edit" @click="editInfoId(formInfo.id)">编辑</view>
|
<view v-auth="['endpoint.admin_users.edit']" class="btn_edit" @click="editInfoId(formInfo.id)">编辑</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -150,6 +151,10 @@
|
||||||
<view class="label_t">部门</view>
|
<view class="label_t">部门</view>
|
||||||
<view class="flex-1">{{formInfo.department?formInfo.department:'-' }}</view>
|
<view class="flex-1">{{formInfo.department?formInfo.department:'-' }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="plist u-border-bottom">
|
||||||
|
<view class="label_t">封禁时间</view>
|
||||||
|
<view class="flex-1">{{formInfo.banned_at?$u.date(formInfo.banned_at, 'yyyy-MM-dd hh:mm'):'-' }}</view>
|
||||||
|
</view>
|
||||||
<view class="plist u-border-bottom">
|
<view class="plist u-border-bottom">
|
||||||
<view class="label_t">是否启用</view>
|
<view class="label_t">是否启用</view>
|
||||||
<view class="flex-1 flex-row align-items-c">
|
<view class="flex-1 flex-row align-items-c">
|
||||||
|
|
@ -236,6 +241,7 @@
|
||||||
<script>
|
<script>
|
||||||
import {showLoading,hideLoading} from '@/com/utils.js'
|
import {showLoading,hideLoading} from '@/com/utils.js'
|
||||||
import checkPermission from '@/utils/permission.js'
|
import checkPermission from '@/utils/permission.js'
|
||||||
|
import md5 from 'js-md5'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -508,7 +514,7 @@
|
||||||
uni.showToast({ title: '请填写密码', icon: 'none' });
|
uni.showToast({ title: '请填写密码', icon: 'none' });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
params['password'] = password;
|
params['password'] = md5(password);
|
||||||
this.$http.post(`/api/admin-users`,params).then(({data})=>{
|
this.$http.post(`/api/admin-users`,params).then(({data})=>{
|
||||||
hideLoading();
|
hideLoading();
|
||||||
if(data.code==200){
|
if(data.code==200){
|
||||||
|
|
@ -607,6 +613,30 @@
|
||||||
this.$refs.uFormPwd.setRules(this.rules);
|
this.$refs.uFormPwd.setRules(this.rules);
|
||||||
},600)
|
},600)
|
||||||
|
|
||||||
|
},
|
||||||
|
unlock(id){
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '是否确定解封?',
|
||||||
|
success: (res)=> {
|
||||||
|
if (res.confirm) {
|
||||||
|
console.log('用户点击确定');
|
||||||
|
showLoading('请稍等...');
|
||||||
|
this.$http.put(`/api/admin-users/${id}/unban`).then(({data})=>{
|
||||||
|
hideLoading();
|
||||||
|
if(data.code==200){
|
||||||
|
this.popupShow = false;
|
||||||
|
uni.showToast({ title: data.message, icon: 'none' });
|
||||||
|
}
|
||||||
|
}).catch(()=>{
|
||||||
|
hideLoading();
|
||||||
|
})
|
||||||
|
} else if (res.cancel) {
|
||||||
|
console.log('用户点击取消');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
//修改密码
|
//修改密码
|
||||||
editPassword(){
|
editPassword(){
|
||||||
|
|
@ -614,8 +644,8 @@
|
||||||
if (valid) {
|
if (valid) {
|
||||||
console.log('验证通过');
|
console.log('验证通过');
|
||||||
let params = {
|
let params = {
|
||||||
password:this.form.password,
|
password:md5(this.form.password),
|
||||||
password_confirmation:this.form.password2
|
password_confirmation:md5(this.form.password2)
|
||||||
}
|
}
|
||||||
this.$http.put(`/api/admin-users/${this.form.id}/edit-password`,params).then(({data})=>{
|
this.$http.put(`/api/admin-users/${this.form.id}/edit-password`,params).then(({data})=>{
|
||||||
if(data.code==200){
|
if(data.code==200){
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {showLoading,hideLoading} from '@/com/utils.js'
|
import {showLoading,hideLoading} from '@/com/utils.js'
|
||||||
|
import md5 from 'js-md5'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -46,8 +47,13 @@
|
||||||
uni.showToast({ title: '两次密码不一致', icon: 'none' });
|
uni.showToast({ title: '两次密码不一致', icon: 'none' });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
showLoading('请稍等...');
|
showLoading('请稍等...');
|
||||||
this.$http.put('/api/users/reset-password',this.form).then(({data})=>{
|
this.$http.put('/api/users/reset-password',{
|
||||||
|
...this.form,
|
||||||
|
password:md5(this.form.password),
|
||||||
|
password_confirmation:md5(this.form.password_confirmation)
|
||||||
|
}).then(({data})=>{
|
||||||
hideLoading();
|
hideLoading();
|
||||||
console.log(data)
|
console.log(data)
|
||||||
if(data.code==200){
|
if(data.code==200){
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,11 @@ const actions = {
|
||||||
async getUserInfo({ commit, dispatch }, userInfo) {
|
async getUserInfo({ commit, dispatch }, userInfo) {
|
||||||
try {
|
try {
|
||||||
const { data } = await http.get('/api/users/info')
|
const { data } = await http.get('/api/users/info')
|
||||||
|
if(data.data.info.username=='admin'){
|
||||||
|
data.data.permissions_slug.push('super')
|
||||||
|
}
|
||||||
dispatch(types.USER_INFO, data.data)
|
dispatch(types.USER_INFO, data.data)
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
dispatch('logout')
|
dispatch('logout')
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
|
|
|
||||||
23
yarn.lock
23
yarn.lock
|
|
@ -7158,6 +7158,11 @@ jiti@^1.9.2:
|
||||||
resolved "https://registry.npmmirror.com/jiti/-/jiti-1.20.0.tgz"
|
resolved "https://registry.npmmirror.com/jiti/-/jiti-1.20.0.tgz"
|
||||||
integrity sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==
|
integrity sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==
|
||||||
|
|
||||||
|
js-md5@^0.8.3:
|
||||||
|
version "0.8.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/js-md5/-/js-md5-0.8.3.tgz#921bab7efa95bfc9d62b87ee08a57f8fe4305b69"
|
||||||
|
integrity sha512-qR0HB5uP6wCuRMrWPTrkMaev7MJZwJuuw4fnwAzRgP4J4/F8RwtodOKpGp4XpqsLBFzzgqIO42efFAyz2Et6KQ==
|
||||||
|
|
||||||
js-message@1.0.7:
|
js-message@1.0.7:
|
||||||
version "1.0.7"
|
version "1.0.7"
|
||||||
resolved "https://registry.npmmirror.com/js-message/-/js-message-1.0.7.tgz"
|
resolved "https://registry.npmmirror.com/js-message/-/js-message-1.0.7.tgz"
|
||||||
|
|
@ -8141,7 +8146,7 @@ negotiator@0.6.3:
|
||||||
resolved "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz"
|
resolved "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz"
|
||||||
integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==
|
integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==
|
||||||
|
|
||||||
neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1, neo-async@^2.6.2:
|
neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1:
|
||||||
version "2.6.2"
|
version "2.6.2"
|
||||||
resolved "https://registry.npmmirror.com/neo-async/-/neo-async-2.6.2.tgz"
|
resolved "https://registry.npmmirror.com/neo-async/-/neo-async-2.6.2.tgz"
|
||||||
integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
|
integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
|
||||||
|
|
@ -9932,12 +9937,16 @@ sane@^4.0.3:
|
||||||
minimist "^1.1.1"
|
minimist "^1.1.1"
|
||||||
walker "~1.0.5"
|
walker "~1.0.5"
|
||||||
|
|
||||||
sass-loader@^13.3.2:
|
sass-loader@^8.0.2:
|
||||||
version "13.3.2"
|
version "8.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-13.3.2.tgz#460022de27aec772480f03de17f5ba88fa7e18c6"
|
resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-8.0.2.tgz#debecd8c3ce243c76454f2e8290482150380090d"
|
||||||
integrity sha512-CQbKl57kdEv+KDLquhC+gE3pXt74LEAzm+tzywcA0/aHZuub8wTErbjAoNI57rPUWRYRNC5WUnNl8eGJNbDdwg==
|
integrity sha512-7o4dbSK8/Ol2KflEmSco4jTjQoV988bM82P9CZdmo9hR3RLnvNc0ufMNdMrB0caq38JQ/FgF4/7RcbcfKzxoFQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
neo-async "^2.6.2"
|
clone-deep "^4.0.1"
|
||||||
|
loader-utils "^1.2.3"
|
||||||
|
neo-async "^2.6.1"
|
||||||
|
schema-utils "^2.6.1"
|
||||||
|
semver "^6.3.0"
|
||||||
|
|
||||||
sass@^1.43.4:
|
sass@^1.43.4:
|
||||||
version "1.66.1"
|
version "1.66.1"
|
||||||
|
|
@ -9969,7 +9978,7 @@ schema-utils@^1.0.0:
|
||||||
ajv-errors "^1.0.0"
|
ajv-errors "^1.0.0"
|
||||||
ajv-keywords "^3.1.0"
|
ajv-keywords "^3.1.0"
|
||||||
|
|
||||||
schema-utils@^2.0.0, schema-utils@^2.5.0, schema-utils@^2.6.5, schema-utils@^2.7.0:
|
schema-utils@^2.0.0, schema-utils@^2.5.0, schema-utils@^2.6.1, schema-utils@^2.6.5, schema-utils@^2.7.0:
|
||||||
version "2.7.1"
|
version "2.7.1"
|
||||||
resolved "https://registry.npmmirror.com/schema-utils/-/schema-utils-2.7.1.tgz"
|
resolved "https://registry.npmmirror.com/schema-utils/-/schema-utils-2.7.1.tgz"
|
||||||
integrity sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==
|
integrity sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue