mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-26 06:57:50 +08:00
Compare commits
5 Commits
ecf58c0b0e
...
04e793403d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04e793403d | ||
|
|
20939fcce8 | ||
|
|
8edd72fc23 | ||
|
|
79e7782700 | ||
|
|
34d1dbb399 |
@ -1,98 +0,0 @@
|
|||||||
package com.genersoft.iot.vmp.conf;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
|
||||||
import com.genersoft.iot.vmp.common.StatisticsInfo;
|
|
||||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
|
||||||
import com.genersoft.iot.vmp.utils.GitUtil;
|
|
||||||
import com.genersoft.iot.vmp.utils.SystemInfoUtils;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import okhttp3.*;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.boot.CommandLineRunner;
|
|
||||||
import org.springframework.core.annotation.Order;
|
|
||||||
import org.springframework.data.redis.connection.RedisConnection;
|
|
||||||
import org.springframework.data.redis.core.RedisTemplate;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
|
||||||
import java.io.File;
|
|
||||||
import java.sql.DatabaseMetaData;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
@Order(value=100)
|
|
||||||
@Slf4j
|
|
||||||
public class StatisticsInfoTask implements CommandLineRunner {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private GitUtil gitUtil;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private RedisTemplate<Object, Object> redisTemplate;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private DataSource dataSource;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run(String... args) throws Exception {
|
|
||||||
try {
|
|
||||||
StatisticsInfo statisticsInfo = new StatisticsInfo();
|
|
||||||
statisticsInfo.setDeviceId(SystemInfoUtils.getHardwareId());
|
|
||||||
statisticsInfo.setBranch(gitUtil.getBranch());
|
|
||||||
statisticsInfo.setGitCommitId(gitUtil.getGitCommitId());
|
|
||||||
statisticsInfo.setGitUrl(gitUtil.getGitUrl());
|
|
||||||
statisticsInfo.setVersion(gitUtil.getBuildVersion());
|
|
||||||
|
|
||||||
statisticsInfo.setOsName(System.getProperty("os.name"));
|
|
||||||
statisticsInfo.setArch(System.getProperty("os.arch"));
|
|
||||||
statisticsInfo.setJdkVersion(System.getProperty("java.version"));
|
|
||||||
|
|
||||||
statisticsInfo.setDocker(new File("/.dockerenv").exists());
|
|
||||||
try {
|
|
||||||
statisticsInfo.setRedisVersion(getRedisVersion());
|
|
||||||
}catch (Exception ignored) {}
|
|
||||||
try {
|
|
||||||
DatabaseMetaData metaData = dataSource.getConnection().getMetaData();
|
|
||||||
statisticsInfo.setSqlVersion(metaData.getDatabaseProductVersion());
|
|
||||||
statisticsInfo.setSqlType(metaData.getDriverName());
|
|
||||||
}catch (Exception ignored) {}
|
|
||||||
statisticsInfo.setTime(DateUtil.getNow());
|
|
||||||
sendPost(statisticsInfo);
|
|
||||||
|
|
||||||
|
|
||||||
}catch (Exception e) {
|
|
||||||
log.error("[获取信息失败] ", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRedisVersion() {
|
|
||||||
if (redisTemplate.getConnectionFactory() == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
RedisConnection connection = redisTemplate.getConnectionFactory().getConnection();
|
|
||||||
if (connection.info() == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return connection.info().getProperty("redis_version");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void sendPost(StatisticsInfo statisticsInfo) {
|
|
||||||
OkHttpClient.Builder httpClientBuilder = new OkHttpClient.Builder();
|
|
||||||
OkHttpClient client = httpClientBuilder.build();
|
|
||||||
|
|
||||||
RequestBody requestBodyJson = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), JSON.toJSONString(statisticsInfo));
|
|
||||||
|
|
||||||
Request request = new Request.Builder()
|
|
||||||
.post(requestBodyJson)
|
|
||||||
.url("http://api.wvp-pro.cn:136/api/statistics/ping")
|
|
||||||
// .url("http://127.0.0.1:11236/api/statistics/ping")
|
|
||||||
.addHeader("Content-Type", "application/json")
|
|
||||||
.build();
|
|
||||||
try {
|
|
||||||
Response response = client.newCall(request).execute();
|
|
||||||
response.close();
|
|
||||||
Objects.requireNonNull(response.body()).close();
|
|
||||||
|
|
||||||
}catch (Exception ignored){}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -15,6 +15,7 @@ import com.genersoft.iot.vmp.utils.DateUtil;
|
|||||||
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -30,10 +31,9 @@ import java.util.*;
|
|||||||
* 区域管理类
|
* 区域管理类
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class RegionServiceImpl implements IRegionService {
|
public class RegionServiceImpl implements IRegionService {
|
||||||
|
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(RegionServiceImpl.class);
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RegionMapper regionMapper;
|
private RegionMapper regionMapper;
|
||||||
|
|
||||||
|
|||||||
@ -221,13 +221,22 @@ public class CatalogDataManager implements CommandLineRunner {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Set<String> keys = dataMap.keySet();
|
Set<String> keys = dataMap.keySet();
|
||||||
|
// 消息间等待间隔最大五秒
|
||||||
Instant instantBefore5S = Instant.now().minusMillis(TimeUnit.SECONDS.toMillis(5));
|
Instant instantBefore5S = Instant.now().minusMillis(TimeUnit.SECONDS.toMillis(5));
|
||||||
|
// 消息接收完毕,等待30秒后移除数据
|
||||||
Instant instantBefore30S = Instant.now().minusMillis(TimeUnit.SECONDS.toMillis(30));
|
Instant instantBefore30S = Instant.now().minusMillis(TimeUnit.SECONDS.toMillis(30));
|
||||||
|
// 初次等待的时间长度,兼容部分下级平台发送初次数据很慢的情况
|
||||||
|
Instant instantBefore2M = Instant.now().minusMillis(TimeUnit.MINUTES.toMillis(2));
|
||||||
for (String dataKey : keys) {
|
for (String dataKey : keys) {
|
||||||
CatalogData catalogData = dataMap.get(dataKey);
|
CatalogData catalogData = dataMap.get(dataKey);
|
||||||
if ( catalogData.getTime().isBefore(instantBefore5S)) {
|
if (catalogData.getStatus().equals(CatalogData.CatalogDataStatus.ready)) {
|
||||||
if (catalogData.getStatus().equals(CatalogData.CatalogDataStatus.runIng)) {
|
if ( catalogData.getTime().isBefore(instantBefore2M)) {
|
||||||
|
String errorMsg = "同步失败,等待回复超时";
|
||||||
|
catalogData.setErrorMsg(errorMsg);
|
||||||
|
catalogData.setStatus(CatalogData.CatalogDataStatus.end);
|
||||||
|
}
|
||||||
|
}else if (catalogData.getStatus().equals(CatalogData.CatalogDataStatus.runIng)) {
|
||||||
|
if ( catalogData.getTime().isBefore(instantBefore5S)) {
|
||||||
String deviceId = catalogData.getDevice().getDeviceId();
|
String deviceId = catalogData.getDevice().getDeviceId();
|
||||||
int sn = catalogData.getSn();
|
int sn = catalogData.getSn();
|
||||||
List<DeviceChannel> deviceChannelList = getDeviceChannelList(deviceId, sn);
|
List<DeviceChannel> deviceChannelList = getDeviceChannelList(deviceId, sn);
|
||||||
@ -251,30 +260,27 @@ public class CatalogDataManager implements CommandLineRunner {
|
|||||||
String errorMsg = "更新成功,共" + catalogData.getTotal() + "条,已更新" + deviceChannelList.size() + "条";
|
String errorMsg = "更新成功,共" + catalogData.getTotal() + "条,已更新" + deviceChannelList.size() + "条";
|
||||||
catalogData.setErrorMsg(errorMsg);
|
catalogData.setErrorMsg(errorMsg);
|
||||||
catalogData.setStatus(CatalogData.CatalogDataStatus.end);
|
catalogData.setStatus(CatalogData.CatalogDataStatus.end);
|
||||||
}else if (catalogData.getStatus().equals(CatalogData.CatalogDataStatus.ready)) {
|
|
||||||
String errorMsg = "同步失败,等待回复超时";
|
|
||||||
catalogData.setErrorMsg(errorMsg);
|
|
||||||
}
|
}
|
||||||
}
|
}else {
|
||||||
if ((catalogData.getStatus().equals(CatalogData.CatalogDataStatus.end) || catalogData.getStatus().equals(CatalogData.CatalogDataStatus.ready))
|
if (catalogData.getTime().isBefore(instantBefore30S)) {
|
||||||
&& catalogData.getTime().isBefore(instantBefore30S)) { // 超过三十秒,如果标记为end则删除
|
dataMap.remove(dataKey);
|
||||||
dataMap.remove(dataKey);
|
Set<String> redisKeysForChannel = catalogData.getRedisKeysForChannel();
|
||||||
Set<String> redisKeysForChannel = catalogData.getRedisKeysForChannel();
|
if (redisKeysForChannel != null && !redisKeysForChannel.isEmpty()) {
|
||||||
if (redisKeysForChannel != null && !redisKeysForChannel.isEmpty()) {
|
for (String deleteKey : redisKeysForChannel) {
|
||||||
for (String deleteKey : redisKeysForChannel) {
|
redisTemplate.opsForHash().delete(key, deleteKey);
|
||||||
redisTemplate.opsForHash().delete(key, deleteKey);
|
}
|
||||||
}
|
}
|
||||||
}
|
Set<String> redisKeysForRegion = catalogData.getRedisKeysForRegion();
|
||||||
Set<String> redisKeysForRegion = catalogData.getRedisKeysForRegion();
|
if (redisKeysForRegion != null && !redisKeysForRegion.isEmpty()) {
|
||||||
if (redisKeysForRegion != null && !redisKeysForRegion.isEmpty()) {
|
for (String deleteKey : redisKeysForRegion) {
|
||||||
for (String deleteKey : redisKeysForRegion) {
|
redisTemplate.opsForHash().delete(key, deleteKey);
|
||||||
redisTemplate.opsForHash().delete(key, deleteKey);
|
}
|
||||||
}
|
}
|
||||||
}
|
Set<String> redisKeysForGroup = catalogData.getRedisKeysForGroup();
|
||||||
Set<String> redisKeysForGroup = catalogData.getRedisKeysForGroup();
|
if (redisKeysForGroup != null && !redisKeysForGroup.isEmpty()) {
|
||||||
if (redisKeysForGroup != null && !redisKeysForGroup.isEmpty()) {
|
for (String deleteKey : redisKeysForGroup) {
|
||||||
for (String deleteKey : redisKeysForGroup) {
|
redisTemplate.opsForHash().delete(key, deleteKey);
|
||||||
redisTemplate.opsForHash().delete(key, deleteKey);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -347,23 +347,15 @@ public class MediaServerServiceImpl implements IMediaServerService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MediaServer mediaServerInRedis = getOne(mediaSerItem.getId());
|
MediaServer mediaServerInRedis = getOne(mediaSerItem.getId());
|
||||||
// 获取完整数据
|
|
||||||
MediaServer mediaServerInDataBase = mediaServerMapper.queryOne(mediaSerItem.getId(), userSetting.getServerId());
|
if (mediaServerInRedis == null || !ssrcFactory.hasMediaServerSSRC(mediaSerItem.getId())) {
|
||||||
if (mediaServerInDataBase == null) {
|
ssrcFactory.initMediaServerSSRC(mediaSerItem.getId(),null);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
mediaServerInDataBase.setStatus(mediaSerItem.isStatus());
|
|
||||||
if (mediaServerInRedis == null || !ssrcFactory.hasMediaServerSSRC(mediaServerInDataBase.getId())) {
|
|
||||||
ssrcFactory.initMediaServerSSRC(mediaServerInDataBase.getId(),null);
|
|
||||||
}
|
|
||||||
if (mediaSerItem.getSecret() != null && !mediaServerInDataBase.getSecret().equals(mediaSerItem.getSecret())) {
|
|
||||||
mediaServerInDataBase.setSecret(mediaSerItem.getSecret());
|
|
||||||
}
|
|
||||||
mediaServerInDataBase.setSecret(mediaSerItem.getSecret());
|
|
||||||
String key = VideoManagerConstants.MEDIA_SERVER_PREFIX + userSetting.getServerId();
|
String key = VideoManagerConstants.MEDIA_SERVER_PREFIX + userSetting.getServerId();
|
||||||
redisTemplate.opsForHash().put(key, mediaServerInDataBase.getId(), mediaServerInDataBase);
|
redisTemplate.opsForHash().put(key, mediaSerItem.getId(), mediaSerItem);
|
||||||
if (mediaServerInDataBase.isStatus()) {
|
if (mediaSerItem.isStatus()) {
|
||||||
resetOnlineServerItem(mediaServerInDataBase);
|
resetOnlineServerItem(mediaSerItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.genersoft.iot.vmp.media.zlm;
|
|||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.genersoft.iot.vmp.conf.DynamicTask;
|
import com.genersoft.iot.vmp.conf.DynamicTask;
|
||||||
|
import com.genersoft.iot.vmp.conf.UserSetting;
|
||||||
import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
|
import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
|
||||||
import com.genersoft.iot.vmp.media.bean.MediaServer;
|
import com.genersoft.iot.vmp.media.bean.MediaServer;
|
||||||
import com.genersoft.iot.vmp.media.event.mediaServer.MediaServerChangeEvent;
|
import com.genersoft.iot.vmp.media.event.mediaServer.MediaServerChangeEvent;
|
||||||
@ -48,6 +49,9 @@ public class ZLMMediaServerStatusManager {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private DynamicTask dynamicTask;
|
private DynamicTask dynamicTask;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserSetting userSetting;
|
||||||
|
|
||||||
@Value("${server.ssl.enabled:false}")
|
@Value("${server.ssl.enabled:false}")
|
||||||
private boolean sslEnabled;
|
private boolean sslEnabled;
|
||||||
|
|
||||||
@ -176,26 +180,31 @@ public class ZLMMediaServerStatusManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void online(MediaServer mediaServer, ZLMServerConfig config) {
|
private void online(MediaServer mediaServer, ZLMServerConfig config) {
|
||||||
if (config == null) {
|
MediaServer mediaServerInDb = mediaServerService.getOneFromDatabase(mediaServer.getId());
|
||||||
ZLMResult<List<JSONObject>> mediaServerConfig = zlmresTfulUtils.getMediaServerConfig(mediaServer);
|
if (mediaServerInDb == null || mediaServerService.getOne(mediaServer.getId()) == null) {
|
||||||
List<JSONObject> data = mediaServerConfig.getData();
|
log.info("[ZLM-连接成功] ID:{}, 地址: {}:{}", mediaServer.getId(), mediaServer.getIp(), mediaServer.getHttpPort());
|
||||||
if (data != null && !data.isEmpty()) {
|
if (config == null) {
|
||||||
config = JSON.parseObject(JSON.toJSONString(data.get(0)), ZLMServerConfig.class);
|
ZLMResult<List<JSONObject>> mediaServerConfig = zlmresTfulUtils.getMediaServerConfig(mediaServer);
|
||||||
}else {
|
List<JSONObject> data = mediaServerConfig.getData();
|
||||||
log.info("[ZLM-连接成功] 读取流媒体配置失败 ID:{}, 地址: {}:{}", mediaServer.getId(), mediaServer.getIp(), mediaServer.getHttpPort());
|
if (data != null && !data.isEmpty()) {
|
||||||
return;
|
config = JSON.parseObject(JSON.toJSONString(data.get(0)), ZLMServerConfig.class);
|
||||||
|
}else {
|
||||||
|
log.info("[ZLM-连接成功] 读取流媒体配置失败 ID:{}, 地址: {}:{}", mediaServer.getId(), mediaServer.getIp(), mediaServer.getHttpPort());
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// 发送上线通知
|
||||||
|
eventPublisher.mediaServerOnlineEventPublish(mediaServer);
|
||||||
|
mediaServer.setStatus(true);
|
||||||
|
mediaServer.setServerId(userSetting.getServerId());
|
||||||
|
mediaServer.setHookAliveInterval(config.getHookAliveInterval());
|
||||||
|
initPort(mediaServer, config);
|
||||||
|
mediaServerService.update(mediaServer);
|
||||||
|
setZLMConfig(mediaServer, true);
|
||||||
}
|
}
|
||||||
offlineZlmPrimaryMap.remove(mediaServer.getId());
|
offlineZlmPrimaryMap.remove(mediaServer.getId());
|
||||||
offlineZlmsecondaryMap.remove(mediaServer.getId());
|
offlineZlmsecondaryMap.remove(mediaServer.getId());
|
||||||
offlineZlmTimeMap.remove(mediaServer.getId());
|
offlineZlmTimeMap.remove(mediaServer.getId());
|
||||||
mediaServer.setStatus(true);
|
|
||||||
mediaServer.setHookAliveInterval(config.getHookAliveInterval());
|
|
||||||
initPort(mediaServer, config);
|
|
||||||
log.info("[ZLM-连接成功] ID:{}, 地址: {}:{}", mediaServer.getId(), mediaServer.getIp(), mediaServer.getHttpPort());
|
|
||||||
// 发送上线通知
|
|
||||||
eventPublisher.mediaServerOnlineEventPublish(mediaServer);
|
|
||||||
mediaServerService.update(mediaServer);
|
|
||||||
// 设置两次心跳未收到则认为zlm离线
|
// 设置两次心跳未收到则认为zlm离线
|
||||||
String key = "zlm-keepalive-" + mediaServer.getId();
|
String key = "zlm-keepalive-" + mediaServer.getId();
|
||||||
dynamicTask.startDelay(key, ()->{
|
dynamicTask.startDelay(key, ()->{
|
||||||
|
|||||||
@ -95,7 +95,7 @@ public interface MediaServerMapper {
|
|||||||
", send_rtp_port_range=#{sendRtpPortRange}, secret=#{secret}, record_assist_port=#{recordAssistPort}" +
|
", send_rtp_port_range=#{sendRtpPortRange}, secret=#{secret}, record_assist_port=#{recordAssistPort}" +
|
||||||
", hook_alive_interval=#{hookAliveInterval}, record_day=#{recordDay}, record_path=#{recordPath}" +
|
", hook_alive_interval=#{hookAliveInterval}, record_day=#{recordDay}, record_path=#{recordPath}" +
|
||||||
", server_id=#{serverId}, type=#{type}" +
|
", server_id=#{serverId}, type=#{type}" +
|
||||||
"WHERE id=#{id}"+
|
" WHERE id=#{id}"+
|
||||||
" </script>"})
|
" </script>"})
|
||||||
int update(MediaServer mediaServerItem);
|
int update(MediaServer mediaServerItem);
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ public interface MediaServerMapper {
|
|||||||
"<if test=\"transcodeSuffix != null\">, transcode_suffix=#{transcodeSuffix}</if>" +
|
"<if test=\"transcodeSuffix != null\">, transcode_suffix=#{transcodeSuffix}</if>" +
|
||||||
"<if test=\"hookAliveInterval != null\">, hook_alive_interval=#{hookAliveInterval}</if>" +
|
"<if test=\"hookAliveInterval != null\">, hook_alive_interval=#{hookAliveInterval}</if>" +
|
||||||
"<if test=\"serverId != null\">, server_id=#{serverId}</if>" +
|
"<if test=\"serverId != null\">, server_id=#{serverId}</if>" +
|
||||||
"WHERE ip=#{ip} and http_port=#{httpPort}"+
|
" WHERE ip=#{ip} and http_port=#{httpPort}"+
|
||||||
" </script>"})
|
" </script>"})
|
||||||
int updateByHostAndPort(MediaServer mediaServerItem);
|
int updateByHostAndPort(MediaServer mediaServerItem);
|
||||||
|
|
||||||
|
|||||||
@ -13,10 +13,10 @@
|
|||||||
<div id="shared" style="margin-right: 20px;">
|
<div id="shared" style="margin-right: 20px;">
|
||||||
<el-form ref="passwordForm" :rules="rules" status-icon label-width="80px">
|
<el-form ref="passwordForm" :rules="rules" status-icon label-width="80px">
|
||||||
<el-form-item label="新密码" prop="newPassword">
|
<el-form-item label="新密码" prop="newPassword">
|
||||||
<el-input v-model="newPassword" autocomplete="off" />
|
<el-input v-model="newPassword" autocomplete="off" type="password" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="确认密码" prop="confirmPassword">
|
<el-form-item label="确认密码" prop="confirmPassword">
|
||||||
<el-input v-model="confirmPassword" autocomplete="off" />
|
<el-input v-model="confirmPassword" autocomplete="off" type="password" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -88,6 +88,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onSubmit: function() {
|
onSubmit: function() {
|
||||||
|
if (this.newPassword !== this.confirmPassword) {
|
||||||
|
this.$message({
|
||||||
|
showClose: true,
|
||||||
|
message: '两次输入密码不一致!',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$store.dispatch('user/changePasswordForAdmin', {
|
this.$store.dispatch('user/changePasswordForAdmin', {
|
||||||
password: this.newPassword,
|
password: this.newPassword,
|
||||||
userId: this.form.id
|
userId: this.form.id
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user