用户模块
This commit is contained in:
@@ -23,3 +23,38 @@ export function getDevCount(id) {
|
|||||||
data: { id },
|
data: { id },
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取直连设备模板信息
|
||||||
|
export function getModel(nDid) {
|
||||||
|
return request({
|
||||||
|
url: '/access-boot/device/model',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
nDid
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 直连设备接入
|
||||||
|
export function addDevice(params) {
|
||||||
|
return request({
|
||||||
|
url: '/access-boot/device/access',
|
||||||
|
method: 'post',
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
data: params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 直连设备注册
|
||||||
|
export function registerDevice(nDid) {
|
||||||
|
return request({
|
||||||
|
url: '/access-boot/device/register',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
nDid
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -27,7 +27,7 @@ export function getProjectList(params) {
|
|||||||
|
|
||||||
export function queryTopologyDiagramPage(params) {
|
export function queryTopologyDiagramPage(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/topologyDiagram/queryTopologyDiagramPage',
|
url: '/cs-device-boot/topologyDiagram/queryTopologyDiagramPage',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: Object.assign(
|
data: Object.assign(
|
||||||
{
|
{
|
||||||
@@ -47,7 +47,7 @@ export function queryTopologyDiagramPage(params) {
|
|||||||
// 删除拓扑图
|
// 删除拓扑图
|
||||||
export function deleteAppTopologyDiagram(id) {
|
export function deleteAppTopologyDiagram(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/topologyDiagram/AuditAppTopologyDiagram',
|
url: '/cs-device-boot/topologyDiagram/AuditAppTopologyDiagram',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
id,
|
id,
|
||||||
@@ -63,7 +63,7 @@ export function deleteAppTopologyDiagram(id) {
|
|||||||
|
|
||||||
export function addAppTopologyDiagram(params, filePath) {
|
export function addAppTopologyDiagram(params, filePath) {
|
||||||
return uni.uploadFile({
|
return uni.uploadFile({
|
||||||
url: config.domain + '/topologyDiagram/addAppTopologyDiagram', //仅为示例,非真实的接口地址
|
url: config.domain + '/cs-device-boot/topologyDiagram/addAppTopologyDiagram', //仅为示例,非真实的接口地址
|
||||||
filePath,
|
filePath,
|
||||||
name: 'file',
|
name: 'file',
|
||||||
header: {
|
header: {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import request from '../js/request'
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送验证码
|
* 发送验证码
|
||||||
* @param {*} params.type 0:登录 1:注册 3:忘记密码 4:更换手机号第二步获取验证码 5:更换手机号第一步获取验证码
|
* @param {*} params.type 0:登录 1:注册 2:修改密码 3:忘记密码 4:更换手机号第二步获取验证码 5:更换手机号第一步获取验证码
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function apiGetYms(params) {
|
export function apiGetYms(params) {
|
||||||
@@ -92,7 +92,7 @@ export function apiSetPsd(params) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/shiningCloud/user/setPsd',
|
url: '/shiningCloud/user/setPsd',
|
||||||
data: {
|
data: {
|
||||||
userId: uni.getStorageSync('userInfo').userId,
|
userId: uni.getStorageSync('userInfo').userIndex,
|
||||||
devCode: uni.getStorageSync('devCode'),
|
devCode: uni.getStorageSync('devCode'),
|
||||||
password: params.password.trim(),
|
password: params.password.trim(),
|
||||||
},
|
},
|
||||||
@@ -103,7 +103,7 @@ export function apiSetPsd(params) {
|
|||||||
// 重置密码
|
// 重置密码
|
||||||
export function apiReSetPsd(params) {
|
export function apiReSetPsd(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/shiningCloud/user/resetPsd',
|
url: '/user-boot/appUser/resetPsd',
|
||||||
data: {
|
data: {
|
||||||
phone: params.phone,
|
phone: params.phone,
|
||||||
code: params.code.trim(),
|
code: params.code.trim(),
|
||||||
@@ -117,7 +117,7 @@ export function apiReSetPsd(params) {
|
|||||||
// 更换手机号第一步
|
// 更换手机号第一步
|
||||||
export function apiComfirmCode(params) {
|
export function apiComfirmCode(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/shiningCloud/user/comfirmCode',
|
url: '/user-boot/appUser/confirmCode',
|
||||||
data: {
|
data: {
|
||||||
devCode: uni.getStorageSync('devCode'),
|
devCode: uni.getStorageSync('devCode'),
|
||||||
phone: params.phone,
|
phone: params.phone,
|
||||||
@@ -130,10 +130,10 @@ export function apiComfirmCode(params) {
|
|||||||
// 重新绑定手机号
|
// 重新绑定手机号
|
||||||
export function apiRebindPhone(params) {
|
export function apiRebindPhone(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/shiningCloud/user/rebindPhone',
|
url: '/user-boot/appUser/rebindPhone',
|
||||||
data: {
|
data: {
|
||||||
devCode: uni.getStorageSync('devCode'),
|
devCode: uni.getStorageSync('devCode'),
|
||||||
userId: uni.getStorageSync('userInfo').userId,
|
userId: uni.getStorageSync('userInfo').userIndex,
|
||||||
phoneNew: params.phone,
|
phoneNew: params.phone,
|
||||||
code: params.code.trim(),
|
code: params.code.trim(),
|
||||||
},
|
},
|
||||||
@@ -153,3 +153,40 @@ export function roleUpdate({ userId, referralCode }) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 密码登录
|
||||||
|
export function apiPwdLogin(params) {
|
||||||
|
return request({
|
||||||
|
url: '/pqs-auth/oauth/token',
|
||||||
|
header: {
|
||||||
|
Authorization: 'Basic bmpjbnRlc3Q6bmpjbnBxcw==', // 客户端信息加密摘要认证
|
||||||
|
},
|
||||||
|
params,
|
||||||
|
method: 'POST',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//登录获取公钥
|
||||||
|
export function gongkey(data) {
|
||||||
|
return request({
|
||||||
|
url: '/user-boot/user/generateSm2Key',
|
||||||
|
method: 'get',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改手机号
|
||||||
|
export function apiModifyPsd(params) {
|
||||||
|
return request({
|
||||||
|
url: '/user-boot/appUser/modifyPsd',
|
||||||
|
data: {
|
||||||
|
devCode: uni.getStorageSync('devCode'),
|
||||||
|
userId: uni.getStorageSync('userInfo').userIndex,
|
||||||
|
phone: params.phone,
|
||||||
|
password: params.password.trim(),
|
||||||
|
code: params.code.trim(),
|
||||||
|
},
|
||||||
|
method: 'POST',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import config from './config'
|
import config from './config'
|
||||||
|
import Qs from 'qs'
|
||||||
let arr = []
|
let arr = []
|
||||||
export default (options = {}) => {
|
export default (options = {}) => {
|
||||||
if (options.data == undefined) {
|
if (options.data == undefined) {
|
||||||
@@ -17,8 +17,12 @@ export default (options = {}) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
return new Promise((reslove, reject) => {
|
return new Promise((reslove, reject) => {
|
||||||
|
let url = options.url.indexOf('http') === -1 ? config.domain + options.url : options.url
|
||||||
|
if (options.params) {
|
||||||
|
url = url + '?' + Qs.stringify(options.params)
|
||||||
|
}
|
||||||
uni.request({
|
uni.request({
|
||||||
url: options.url.indexOf('http') === -1 ? config.domain + options.url : options.url,
|
url,
|
||||||
data: {
|
data: {
|
||||||
...options.data,
|
...options.data,
|
||||||
},
|
},
|
||||||
@@ -50,9 +54,6 @@ export default (options = {}) => {
|
|||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '网络异常,请稍后再试',
|
title: '网络异常,请稍后再试',
|
||||||
})
|
})
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/user/login',
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -64,16 +65,10 @@ export default (options = {}) => {
|
|||||||
*/
|
*/
|
||||||
function errHandler(res) {
|
function errHandler(res) {
|
||||||
switch (res.code) {
|
switch (res.code) {
|
||||||
case '401':
|
case 'A0024':
|
||||||
// #ifdef MP
|
|
||||||
uni.clearStorageSync()
|
|
||||||
// #endif
|
|
||||||
uni.reLaunch({ url: '/pages/user/login' })
|
uni.reLaunch({ url: '/pages/user/login' })
|
||||||
break
|
break
|
||||||
case 'A0202':
|
case 'A0202':
|
||||||
// #ifdef MP
|
|
||||||
uni.clearStorageSync()
|
|
||||||
// #endif
|
|
||||||
uni.reLaunch({ url: '/pages/user/login' })
|
uni.reLaunch({ url: '/pages/user/login' })
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
|||||||
3734
common/js/sm2.js
Normal file
3734
common/js/sm2.js
Normal file
File diff suppressed because it is too large
Load Diff
257
common/js/sm3.js
Normal file
257
common/js/sm3.js
Normal file
@@ -0,0 +1,257 @@
|
|||||||
|
/**
|
||||||
|
* 国密摘要算法(SM3)
|
||||||
|
* @param str:raw string
|
||||||
|
* @return the 256-bit hex string produced by SM3 from a raw string
|
||||||
|
*/
|
||||||
|
function sm3Digest(str) {
|
||||||
|
//1. 转换为二进制数组
|
||||||
|
var binArr = str2bin(str2rstr_utf8(str));
|
||||||
|
//2. 填充
|
||||||
|
var groupNum = alignSM3(binArr, str.length);
|
||||||
|
//3. 迭代压缩
|
||||||
|
var v = new Array(8);//初始值
|
||||||
|
v[0] = 0x7380166f;
|
||||||
|
v[1] = 0x4914b2b9;
|
||||||
|
v[2] = 0x172442d7;
|
||||||
|
v[3] = 0xda8a0600;
|
||||||
|
v[4] = 0xa96f30bc;
|
||||||
|
v[5] = 0x163138aa;
|
||||||
|
v[6] = 0xe38dee4d;
|
||||||
|
v[7] = 0xb0fb0e4e;
|
||||||
|
//按 512bit 分组进行压缩
|
||||||
|
for (var i = 0; i < groupNum; i++) {
|
||||||
|
v = compress(v, binArr, i);
|
||||||
|
}
|
||||||
|
return word2str(v, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将数组转换为字符串。数组长度不定,每个元素为 32bit 的数字。
|
||||||
|
* @param words:数组,每个元素为 32bit 的数字
|
||||||
|
* @param seperator:在每个数组元素转换得到的字符串之间的分隔符
|
||||||
|
*/
|
||||||
|
function word2str(words, seperator) {
|
||||||
|
var prefix = Array(8).join('0');
|
||||||
|
for (var i = 0; i < words.length; i++) {
|
||||||
|
//若 hex 不足 8 位,则高位补 0
|
||||||
|
words[i] = (prefix + (words[i] >>> 0).toString(16)).slice(-8);
|
||||||
|
}
|
||||||
|
|
||||||
|
return words.join(seperator);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将字符串转换为二进制数组,默认字符串编码为 UTF-8,且范围在 0x00~0xFF 内。
|
||||||
|
* 若某些字符的编码超过此范围,则会只保留最低字节。加密可正常进行,但加密结果有误。
|
||||||
|
* 每个数组元素包含 4 个字符,即 32 bit。
|
||||||
|
* @param 字符串
|
||||||
|
* @return 数组,长度为(字符串长度 / 4),每个元素为 32bit 的数字
|
||||||
|
*/
|
||||||
|
function str2bin(str) {
|
||||||
|
var binary = new Array(str.length >> 2);
|
||||||
|
for (var i = 0; i < str.length * 8; i += 8) {
|
||||||
|
binary[i >> 5] |= (str.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);
|
||||||
|
}
|
||||||
|
return binary;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对明文的二进制串进行填充
|
||||||
|
* <pre>
|
||||||
|
* | 满足 mod 512 = 448 | 固定 64 位 |
|
||||||
|
* | 明文二进制 |填充部分|明文二进制串的长度的二进制表示|
|
||||||
|
* xxxxxxxxxxxx 10.....0 0...........................xx
|
||||||
|
* </pre>
|
||||||
|
* @param arr:数组,每个元素为 32bit 的数字
|
||||||
|
* @param strLen:明文字符串长度
|
||||||
|
* @return 数组,每个元素为 32bit 的数字,数组长度为 16 的倍数(包括 16)
|
||||||
|
*/
|
||||||
|
function alignSM3(arr, strLen) {
|
||||||
|
//在明文二进制串后面拼接 1000 0000
|
||||||
|
arr[strLen >> 2] |= 0x80 << (24 - strLen % 4 * 8);
|
||||||
|
var groupNum = ((strLen + 8) >> 6) + 1;//以 512bit 为一组,总的组数
|
||||||
|
var wordNum = groupNum * 16;//一个 word 32bit,总的 word 数
|
||||||
|
|
||||||
|
for (var i = (strLen >> 2) + 1; i < wordNum; i++) {
|
||||||
|
arr[i] = 0;
|
||||||
|
}
|
||||||
|
arr[wordNum - 1] = strLen * 8;//在末尾填上明文的二进制长度
|
||||||
|
|
||||||
|
return groupNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 压缩函数中的置换函数
|
||||||
|
*/
|
||||||
|
function p0(x) {
|
||||||
|
return x ^ bitRol(x, 9) ^ bitRol(x, 17);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 压缩函数中的置换函数
|
||||||
|
*/
|
||||||
|
function p1(x) {
|
||||||
|
return x ^ bitRol(x, 15) ^ bitRol(x, 23);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 循环左移
|
||||||
|
*/
|
||||||
|
function bitRol(input, n) {
|
||||||
|
return (input << n) | (input >>> (32 - n));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 压缩函数
|
||||||
|
*/
|
||||||
|
function compress(v, binArr, i) {
|
||||||
|
//将消息分组扩展成 132 个字
|
||||||
|
var w1 = new Array(68);
|
||||||
|
var w2 = new Array(64);
|
||||||
|
for (var j = 0; j < 68; j++) {
|
||||||
|
if (j < 16) {
|
||||||
|
w1[j] = binArr[i * 16 + j];
|
||||||
|
} else {
|
||||||
|
w1[j] = p1(w1[j-16] ^ w1[j-9] ^ bitRol(w1[j-3], 15)) ^ bitRol(w1[j-13], 7) ^ w1[j-6];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (var j = 0; j < 64; j++) {
|
||||||
|
w2[j] = w1[j] ^ w1[j+4];
|
||||||
|
}
|
||||||
|
|
||||||
|
//压缩
|
||||||
|
var a = v[0];
|
||||||
|
var b = v[1];
|
||||||
|
var c = v[2];
|
||||||
|
var d = v[3];
|
||||||
|
var e = v[4];
|
||||||
|
var f = v[5];
|
||||||
|
var g = v[6];
|
||||||
|
var h = v[7];
|
||||||
|
var ss1;
|
||||||
|
var ss2;
|
||||||
|
var tt1;
|
||||||
|
var tt2;
|
||||||
|
for (var j = 0; j < 64; j++) {
|
||||||
|
ss1 = bitRol(addAll(bitRol(a, 12) , e , bitRol(t(j), j)), 7);
|
||||||
|
ss2 = ss1 ^ bitRol(a, 12);
|
||||||
|
tt1 = addAll(ff(a, b, c, j) , d , ss2 , w2[j]);
|
||||||
|
tt2 = addAll(gg(e, f, g, j) , h , ss1 , w1[j]);
|
||||||
|
d = c;
|
||||||
|
c = bitRol(b, 9);
|
||||||
|
b = a;
|
||||||
|
a = tt1;
|
||||||
|
h = g;
|
||||||
|
g = bitRol(f, 19);
|
||||||
|
f = e;
|
||||||
|
e = p0(tt2);
|
||||||
|
}
|
||||||
|
v[0] ^= a;
|
||||||
|
v[1] ^= b;
|
||||||
|
v[2] ^= c;
|
||||||
|
v[3] ^= d;
|
||||||
|
v[4] ^= e;
|
||||||
|
v[5] ^= f;
|
||||||
|
v[6] ^= g;
|
||||||
|
v[7] ^= h;
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常量 T 随 j 的不同而不同
|
||||||
|
*/
|
||||||
|
function t(j) {
|
||||||
|
if (0 <= j && j < 16) {
|
||||||
|
return 0x79CC4519;
|
||||||
|
} else if (j < 64) {
|
||||||
|
return 0x7A879D8A;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 布尔函数,随 j 的变化取不同的表达式
|
||||||
|
*/
|
||||||
|
function ff(x, y, z, j) {
|
||||||
|
if (0 <= j && j < 16) {
|
||||||
|
return x ^ y ^ z;
|
||||||
|
} else if (j < 64) {
|
||||||
|
return (x & y) | (x & z) | (y & z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 布尔函数,随 j 的变化取不同的表达式
|
||||||
|
*/
|
||||||
|
function gg(x, y, z, j) {
|
||||||
|
if (0 <= j && j < 16) {
|
||||||
|
return x ^ y ^ z;
|
||||||
|
} else if (j < 64) {
|
||||||
|
return (x & y) | (~x & z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 两数相加
|
||||||
|
* 避免某些 js 引擎的 32 位加法的 bug
|
||||||
|
*/
|
||||||
|
function safe_add(x, y) {
|
||||||
|
var lsw = ( x & 0xFFFF ) + (y & 0xFFFF);
|
||||||
|
var msw = ( x >> 16 ) + (y >> 16) + (lsw >> 16);
|
||||||
|
return (msw << 16) | ( lsw & 0xFFFF );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将所有参数相加
|
||||||
|
*/
|
||||||
|
function addAll() {
|
||||||
|
var sum = 0;
|
||||||
|
for (var i = 0; i < arguments.length; i++) {
|
||||||
|
sum = safe_add(sum, arguments[i]);
|
||||||
|
}
|
||||||
|
return sum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UTF-16 --> UTF-8
|
||||||
|
*/
|
||||||
|
function str2rstr_utf8(input) {
|
||||||
|
var output = "" ;
|
||||||
|
var i = -1 ;
|
||||||
|
var x, y ;
|
||||||
|
|
||||||
|
while(++ i < input.length) {
|
||||||
|
//按 UTF-16 解码
|
||||||
|
x = input.charCodeAt(i);
|
||||||
|
y = i + 1 < input.length ? input .charCodeAt (i + 1) : 0 ;
|
||||||
|
if( 0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF ) {
|
||||||
|
x = 0x10000 + ((x & 0x03FF) << 10 ) + (y & 0x03FF);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
//按 UTF-8 编码
|
||||||
|
if( x <= 0x7F ) {
|
||||||
|
output += String.fromCharCode(x);
|
||||||
|
}
|
||||||
|
else if(x <= 0x7FF) {
|
||||||
|
output += String.fromCharCode(
|
||||||
|
0xC0 | ((x >>> 6 ) & 0x1F),
|
||||||
|
0x80 | ( x & 0x3F ));
|
||||||
|
} else if(x <= 0xFFFF) {
|
||||||
|
output += String.fromCharCode(
|
||||||
|
0xE0 | ((x >>> 12) & 0x0F ),
|
||||||
|
0x80 | ((x >>> 6 ) & 0x3F),
|
||||||
|
0x80 | ( x & 0x3F ));
|
||||||
|
} else if(x <= 0x1FFFFF) {
|
||||||
|
output += String.fromCharCode(
|
||||||
|
0xF0 | ((x >>> 18) & 0x07 ),
|
||||||
|
0x80 | ((x >>> 12) & 0x3F),
|
||||||
|
0x80 | ((x >>> 6 ) & 0x3F),
|
||||||
|
0x80 | ( x & 0x3F ));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
export {
|
||||||
|
sm3Digest
|
||||||
|
}
|
||||||
|
|
||||||
@@ -198,10 +198,14 @@ const prePage = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const loginSuccess = (data) => {
|
const loginSuccess = (data) => {
|
||||||
uni.setStorageSync('userInfo', data)
|
uni.setStorageSync('access_token', data.token_type + ' ' + data.access_token)
|
||||||
uni.setStorageSync('token', data.token_type + ' ' + data.access_token)
|
uni.setStorageSync('refresh_token', data.refresh_token)
|
||||||
|
let strings = data.access_token.split('.') //截取token,获取载体
|
||||||
|
var userInfo = JSON.parse(decodeURIComponent(escape(window.atob(strings[1].replace(/-/g, '+').replace(/_/g, '/')))))
|
||||||
|
userInfo.authorities = userInfo.authorities[0]
|
||||||
|
uni.setStorageSync('userInfo', userInfo)
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/user/login',
|
url: '/pages/index/index',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@
|
|||||||
"/api" : {
|
"/api" : {
|
||||||
"https" : true,
|
"https" : true,
|
||||||
// "target" : "https://china.indpecker.com",
|
// "target" : "https://china.indpecker.com",
|
||||||
"target" : "http://192.168.1.115:10215",
|
"target" : "http://192.168.1.139:10215",
|
||||||
"changOrigin" : true,
|
"changOrigin" : true,
|
||||||
"pathRewrite" : {
|
"pathRewrite" : {
|
||||||
"/api" : ""
|
"/api" : ""
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"crypto-js": "^4.1.1",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"mqtt": "3.0.0",
|
"mqtt": "3.0.0",
|
||||||
"pinyin-pro": "^3.13.2"
|
"pinyin-pro": "^3.13.2",
|
||||||
|
"qs": "^6.11.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/html5plus": "^1.0.2",
|
"@types/html5plus": "^1.0.2",
|
||||||
|
|||||||
@@ -1,12 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class='new'>
|
<view class="new">
|
||||||
<template v-if="type == 1">
|
<template v-if="type == 1">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<uni-forms>
|
<uni-forms>
|
||||||
<uni-forms-item label="设备识别码">
|
<uni-forms-item label="设备识别码">
|
||||||
<view style="display:flex">
|
<view style="display: flex">
|
||||||
<uni-easyinput type="number" v-model="code" placeholder="请输入设备识别码" />
|
<uni-easyinput type="number" v-model="formData.nDid" placeholder="请输入设备识别码" />
|
||||||
<uni-icons type="camera" color="#007aff" size="26" class="ml20" @click="scanCode"></uni-icons>
|
<uni-icons
|
||||||
|
type="camera"
|
||||||
|
color="#007aff"
|
||||||
|
size="26"
|
||||||
|
class="ml20"
|
||||||
|
@click="scanCode"
|
||||||
|
></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
@@ -16,37 +22,66 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
|
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<uni-forms>
|
<uni-forms>
|
||||||
<uni-forms-item label="项目">
|
<uni-forms-item label="项目">
|
||||||
<uni-data-select v-model="formData.project" :localdata="projectRange"></uni-data-select>
|
<uni-data-select
|
||||||
|
v-model="formData.projectId"
|
||||||
|
:localdata="projectRange"
|
||||||
|
@change="queryTopologyDiagramPage"
|
||||||
|
></uni-data-select>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<!-- <uni-forms-item label="型号">
|
<!-- <uni-forms-item label="型号">
|
||||||
<uni-data-select v-model="formData.type" :localdata="typeRange"
|
<uni-data-select v-model="formData.type" :localdata="typeRange"
|
||||||
@change="typeChange(item)"></uni-data-select>
|
@change="typeChange(item)"></uni-data-select>
|
||||||
</uni-forms-item> -->
|
</uni-forms-item> -->
|
||||||
<uni-forms-item label="位置">
|
<uni-forms-item label="位置">
|
||||||
<view style="display:flex;">
|
<view style="display: flex">
|
||||||
<uni-easyinput :clearable="false" type="textarea" autoHeight v-model="formData.address"
|
<uni-easyinput
|
||||||
placeholder="请输入位置信息" />
|
:clearable="false"
|
||||||
<uni-icons type="location" color="#007aff" size="26" class="ml20"
|
type="textarea"
|
||||||
@click="chooseLocation"></uni-icons>
|
autoHeight
|
||||||
|
v-model="formData.area"
|
||||||
|
placeholder="请输入位置信息"
|
||||||
|
/>
|
||||||
|
<!-- <uni-icons
|
||||||
|
type="location"
|
||||||
|
color="#007aff"
|
||||||
|
size="26"
|
||||||
|
class="ml20"
|
||||||
|
@click="chooseLocation"
|
||||||
|
></uni-icons> -->
|
||||||
</view>
|
</view>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="拓扑图">
|
<uni-forms-item label="拓扑图" v-if="formData.projectId">
|
||||||
<view style="display:flex;">
|
<view style="display: flex">
|
||||||
<view style="flex:1">
|
<view style="flex: 1">
|
||||||
<image class="gplot" src="/static/test2.pic.png" mode="aspectFill" />
|
<image
|
||||||
|
v-if="formData.topologyDiagramUrl"
|
||||||
|
class="gplot"
|
||||||
|
:src="formData.topologyDiagramUrl"
|
||||||
|
mode="aspectFill"
|
||||||
|
/>
|
||||||
|
<view v-else class="gplot gplot-empty center" @click="chooseGplot"> 选择拓扑图 </view>
|
||||||
</view>
|
</view>
|
||||||
<uni-icons type="image" color="#007aff" size="26" class="ml20" @click="chooseGplot"></uni-icons>
|
<uni-icons
|
||||||
|
type="image"
|
||||||
|
color="#007aff"
|
||||||
|
size="26"
|
||||||
|
class="ml20"
|
||||||
|
@click="chooseGplot"
|
||||||
|
></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="监测点" v-if="pointList.length">
|
<uni-forms-item label="监测点" v-if="pointList.length && formData.topologyDiagramUrl">
|
||||||
<view class="point-item" v-for="(item2, index2) in pointList" :key="index2"
|
<view
|
||||||
@click="editPoint(item2, index2)">
|
class="point-item"
|
||||||
<view style="flex:1" v-if="item2.pointName">{{ item2.pointName }}</view>
|
v-for="(item2, index2) in pointList"
|
||||||
<view style="flex:1;color:#999" v-else>请选择监测点</view>
|
:key="index2"
|
||||||
|
@click="editPoint(item2, index2)"
|
||||||
|
>
|
||||||
|
<view style="flex: 1" v-if="item2.name">{{ item2.name }}</view>
|
||||||
|
<view style="flex: 1; color: #999" v-else>请选择监测点</view>
|
||||||
<uni-icons type="compose" color="#007aff" size="26" class="ml20"></uni-icons>
|
<uni-icons type="compose" color="#007aff" size="26" class="ml20"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
@@ -60,35 +95,39 @@
|
|||||||
</view>
|
</view>
|
||||||
</uni-forms-item> -->
|
</uni-forms-item> -->
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="btn-wrap">
|
<view class="btn-wrap">
|
||||||
<!-- <view class="btn-wrap-item" @click="add"> 添加监测点 </view> -->
|
<!-- <view class="btn-wrap-item" @click="add"> 添加监测点 </view> -->
|
||||||
<view class="btn-wrap-item ml20" @click="submit"> 提交 </view>
|
<view class="btn-wrap-item" @click="submit"> 提交 </view>
|
||||||
</view>
|
</view>
|
||||||
<uni-drawer ref="gplot" mode="right" :mask-click="false">
|
<uni-drawer ref="gplot" mode="right" :mask-click="false">
|
||||||
<scroll-view style="height: 100%;" scroll-y="true">
|
<scroll-view style="height: 100%" scroll-y="true">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<image class="gplot gplot-box" mode="aspectFill" :class="{ 'gplot-active': key == activeGplot }"
|
<image
|
||||||
src="/static/test2.pic.png" @click="activeGplot = key" v-for="(item, key) in 3" :key="key" />
|
class="gplot gplot-box"
|
||||||
|
mode="aspectFill"
|
||||||
|
:class="{ 'gplot-active': key == activeGplot }"
|
||||||
|
:src="item.filePath"
|
||||||
|
@click="activeGplot = key"
|
||||||
|
v-for="(item, key) in imageList"
|
||||||
|
:key="key"
|
||||||
|
/>
|
||||||
<view class="btn-wrap">
|
<view class="btn-wrap">
|
||||||
<view class="btn-wrap-item" @click="closeDrawer"> 取消 </view>
|
|
||||||
<view class="btn-wrap-item ml20" @click="closeDrawer"> 确定 </view>
|
<view class="btn-wrap-item ml20" @click="closeDrawer"> 确定 </view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</uni-drawer>
|
</uni-drawer>
|
||||||
<uni-drawer ref="point" mode="right" :mask-click="false">
|
<uni-drawer ref="point" mode="right" :mask-click="false">
|
||||||
<scroll-view style="height: 100%;" scroll-y="true">
|
<scroll-view style="height: 100%" scroll-y="true">
|
||||||
<view style="background:#fff">
|
<view style="background: #fff">
|
||||||
<view class="map-pin-box">
|
<view class="map-pin-box">
|
||||||
<image class="gplot" mode="widthFix" src="/static/test2.pic.png" />
|
<image class="gplot" mode="widthFix" :src="formData.topologyDiagramUrl" />
|
||||||
|
|
||||||
<movable-area class="map-pin-box-area">
|
<movable-area class="map-pin-box-area">
|
||||||
<movable-view :x="point.x" :y="point.y" direction="all" @change="dragPoint">
|
<movable-view :x="point.lat" :y="point.lng" direction="all" @change="dragPoint">
|
||||||
<view class="point center">
|
<view class="point center">
|
||||||
<image src="/static/point.png" mode="scaleToFill" />
|
{{ point.alias || point.name }}
|
||||||
<!-- <uni-icons type="map-pin" color="#007aff" size="26" class="ml20"></uni-icons> -->
|
|
||||||
</view>
|
</view>
|
||||||
</movable-view>
|
</movable-view>
|
||||||
</movable-area>
|
</movable-area>
|
||||||
@@ -97,7 +136,19 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="content-des">请拖动图中的蓝色定位图标选择监测点位置(左上角)</view>
|
<view class="content-des">请拖动图中的蓝色定位图标选择监测点位置(左上角)</view>
|
||||||
<uni-forms>
|
<uni-forms>
|
||||||
<uni-easyinput type="text" v-model="pointName" placeholder="请输入设监测点名称" />
|
<uni-data-select
|
||||||
|
v-model="point.position"
|
||||||
|
:localdata="positionList"
|
||||||
|
@change="positionChange"
|
||||||
|
></uni-data-select>
|
||||||
|
<uni-easyinput
|
||||||
|
:clearable="false"
|
||||||
|
class="mt20"
|
||||||
|
type="text"
|
||||||
|
v-model="point.alias"
|
||||||
|
@change="aliasChange"
|
||||||
|
placeholder="别名(非必填)"
|
||||||
|
/>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
<view class="btn-wrap">
|
<view class="btn-wrap">
|
||||||
<view class="btn-wrap-item" @click="closeDrawer"> 取消 </view>
|
<view class="btn-wrap-item" @click="closeDrawer"> 取消 </view>
|
||||||
@@ -110,154 +161,201 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { registerDevice, getModel, addDevice } from '@/common/api/device.js'
|
||||||
|
import { getProjectList, queryTopologyDiagramPage } from '@/common/api/project.js'
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
code: '',
|
|
||||||
type: 1,
|
type: 1,
|
||||||
formData: {
|
formData: {
|
||||||
address: '',
|
nDid: '',
|
||||||
type: '',
|
area: '',
|
||||||
project: '',
|
projectId: '',
|
||||||
|
topologyDiagramUrl: '',
|
||||||
|
topologyDiagram: '',
|
||||||
},
|
},
|
||||||
projectRange: [
|
projectRange: [],
|
||||||
{ value: 1, text: "项目1", point: 1 },
|
|
||||||
{ value: 2, text: "项目2", point: 2 },
|
|
||||||
{ value: 3, text: "项目3", point: 1 },
|
|
||||||
],
|
|
||||||
// typeRange: [
|
|
||||||
// { value: 1, text: "POS-882AX", point: 1 },
|
|
||||||
// { value: 2, text: "NPOS-681", point: 2 },
|
|
||||||
// { value: 3, text: "NPOS-681", point: 1 },
|
|
||||||
// { value: 4, text: "POV-500", point: 2 },
|
|
||||||
// { value: 5, text: "PQV-300", point: 1 },
|
|
||||||
// { value: 6, text: "NPOS-571W", point: 3 },
|
|
||||||
// { value: 7, text: "NPQS-572W", point: 3 },
|
|
||||||
// { value: 8, text: "POS-882B6", point: 2 },
|
|
||||||
// { value: 9, text: "PQS-882B5", point: 1 },
|
|
||||||
// { value: 10, text: "POS-882B4", point: 2 },
|
|
||||||
// { value: 11, text: "PQS-882B2", point: 1 },
|
|
||||||
// { value: 12, text: "POS-882A", point: 2 },
|
|
||||||
// { value: 13, text: "POS-883A", point: 1 },
|
|
||||||
// { value: 14, text: "NPOS-581", point: 2 },
|
|
||||||
// { value: 15, text: "PQS-681", point: 1 },
|
|
||||||
// { value: 16, text: "POS-8825", point: 3 },
|
|
||||||
// { value: 17, text: "PQS-782", point: 1 },
|
|
||||||
// { value: 18, text: "POS-880X", point: 3 },
|
|
||||||
// { value: 19, text: "NPQS-580", point: 1 },
|
|
||||||
// { value: 20, text: "NPOS-572", point: 2 },
|
|
||||||
// ],
|
|
||||||
point: {
|
point: {
|
||||||
x: 170,
|
x: 170,
|
||||||
y: 100,
|
y: 100,
|
||||||
},
|
},
|
||||||
pointName: '',
|
pointList: [],
|
||||||
pointList: [{
|
|
||||||
name: '',
|
|
||||||
x: 170,
|
|
||||||
y: 100,
|
|
||||||
}, {
|
|
||||||
name: '',
|
|
||||||
x: 170,
|
|
||||||
y: 100,
|
|
||||||
}],
|
|
||||||
activeGplot: 0,
|
activeGplot: 0,
|
||||||
editIndex: -1,
|
positionList: [],
|
||||||
|
imageList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
let engineering = uni.getStorageSync(this.$cacheKey.engineering)
|
||||||
|
getProjectList({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 9999,
|
||||||
|
engineeringId: engineering.id,
|
||||||
|
}).then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
let arr = [
|
||||||
|
...res.data.records.map((item) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
text: item.name,
|
||||||
|
value: item.id,
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
]
|
||||||
|
this.projectRange = arr
|
||||||
|
})
|
||||||
|
let dictData = uni.getStorageSync(this.$cacheKey.dictData)
|
||||||
|
dictData.forEach((item) => {
|
||||||
|
if (item.code == 'Line_Position') {
|
||||||
|
this.positionList = item.children.map((item) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
text: item.name,
|
||||||
|
value: item.id,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
projectChange (e) {
|
queryTopologyDiagramPage() {
|
||||||
|
console.log(this.formData)
|
||||||
|
setTimeout(() => {
|
||||||
|
if (!this.formData.projectId) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
queryTopologyDiagramPage({
|
||||||
|
projectId: this.formData.projectId,
|
||||||
|
}).then((res) => {
|
||||||
|
this.imageList = res.data.records
|
||||||
|
this.formData.topologyDiagramUrl = res.data.records[0].filePath
|
||||||
|
this.formData.topologyDiagram = res.data.records[0].id
|
||||||
|
})
|
||||||
|
}, 100)
|
||||||
},
|
},
|
||||||
scanCode () {
|
aliasChange(e) {
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
positionChange(e) {
|
||||||
|
console.log(e)
|
||||||
|
},
|
||||||
|
projectChange(e) {},
|
||||||
|
scanCode() {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log('条码类型:' + res.scanType);
|
console.log('条码类型:' + res.scanType)
|
||||||
console.log('条码内容:' + res.result);
|
console.log('条码内容:' + res.result)
|
||||||
}
|
},
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
register () {
|
register() {
|
||||||
this.type = 2
|
if (!this.formData.nDid) {
|
||||||
|
return this.$util.toast('请输入设备识别码')
|
||||||
|
}
|
||||||
|
registerDevice(this.formData.nDid).then(res=>{
|
||||||
|
|
||||||
|
getModel(this.formData.nDid).then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
this.pointList = res.data.map((item) => {
|
||||||
|
return {
|
||||||
|
lat: 0,
|
||||||
|
lng: 0,
|
||||||
|
...item,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.type = 2
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
chooseLocation () {
|
chooseLocation() {
|
||||||
uni.chooseLocation({
|
uni.chooseLocation({
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
this.address = res.name
|
this.address = res.name
|
||||||
console.log('位置名称:' + res.name);
|
console.log('位置名称:' + res.name)
|
||||||
console.log('详细地址:' + res.address);
|
console.log('详细地址:' + res.address)
|
||||||
console.log('纬度:' + res.latitude);
|
console.log('纬度:' + res.latitude)
|
||||||
console.log('经度:' + res.longitude);
|
console.log('经度:' + res.longitude)
|
||||||
}
|
},
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
chooseGplot () {
|
chooseGplot() {
|
||||||
this.$refs.gplot.open()
|
this.$refs.gplot.open()
|
||||||
},
|
},
|
||||||
closeDrawer () {
|
closeDrawer() {
|
||||||
this.pointName = ''
|
|
||||||
this.point = {
|
|
||||||
x: 170,
|
|
||||||
y: 100,
|
|
||||||
}
|
|
||||||
this.$refs.gplot.close()
|
this.$refs.gplot.close()
|
||||||
this.$refs.point.close()
|
this.$refs.point.close()
|
||||||
|
this.formData.topologyDiagramUrl = this.imageList[this.activeGplot].filePath
|
||||||
|
this.formData.topologyDiagram = this.imageList[this.activeGplot].id
|
||||||
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
add () {
|
add() {
|
||||||
this.$refs.point.open()
|
this.$refs.point.open()
|
||||||
},
|
},
|
||||||
addPoint () {
|
addPoint() {
|
||||||
if (!this.pointName) {
|
if (!this.point.position) {
|
||||||
this.$util.toast('请输入监测点名称')
|
this.$util.toast('请选择监测点')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.editIndex > -1) {
|
if (this.point.alias) {
|
||||||
this.pointList[this.editIndex] = {
|
this.point.name = this.point.alias
|
||||||
x: this.point.x,
|
|
||||||
y: this.point.y,
|
|
||||||
pointName: this.pointName,
|
|
||||||
}
|
|
||||||
this.editIndex = -1
|
|
||||||
} else {
|
} else {
|
||||||
let arr = this.pointList.filter(item => item.pointName == this.pointName)
|
this.positionList.forEach((item) => {
|
||||||
if (arr.length > 0) {
|
if (item.id == this.point.position) {
|
||||||
this.$util.toast('监测点名称已存在')
|
this.point.name = item.name
|
||||||
return
|
}
|
||||||
}
|
|
||||||
this.pointList.push({
|
|
||||||
x: this.point.x,
|
|
||||||
y: this.point.y,
|
|
||||||
pointName: this.pointName,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log(this.pointList);
|
this.pointList[this.editIndex] = this.point
|
||||||
|
console.log(this.pointList)
|
||||||
this.closeDrawer()
|
this.closeDrawer()
|
||||||
},
|
},
|
||||||
deletePoint (index) {
|
deletePoint(index) {
|
||||||
this.pointList.splice(index, 1)
|
this.pointList.splice(index, 1)
|
||||||
},
|
},
|
||||||
editPoint (item, index) {
|
editPoint(item, index) {
|
||||||
|
this.point = item
|
||||||
this.editIndex = index
|
this.editIndex = index
|
||||||
this.point.x = item.x
|
if (!this.point.alias) {
|
||||||
this.point.y = item.y
|
let every = this.positionList.every((item) => item.name != this.point.name)
|
||||||
this.pointName = item.pointName
|
console.log(every)
|
||||||
|
if (every) {
|
||||||
|
this.point.alias = this.point.name
|
||||||
|
} else {
|
||||||
|
this.point.alias = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
this.$refs.point.open()
|
this.$refs.point.open()
|
||||||
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
dragPoint (e) {
|
dragPoint(e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
this.point.x = e.detail.x
|
this.point.lat = e.detail.x
|
||||||
this.point.y = e.detail.y
|
this.point.lng = e.detail.y
|
||||||
},
|
},
|
||||||
submit () {
|
submit() {
|
||||||
this.$util.toast('提交成功')
|
if (!this.formData.projectId) {
|
||||||
setTimeout(() => {
|
return this.$util.toast('请选择项目')
|
||||||
uni.navigateBack({ delta: 1 })
|
}
|
||||||
}, 1500);
|
if (!this.formData.topologyDiagram) {
|
||||||
|
return this.$util.toast('请选择拓扑图')
|
||||||
|
}
|
||||||
|
addDevice({
|
||||||
|
...this.formData,
|
||||||
|
list: this.pointList,
|
||||||
|
ndid: this.formData.nDid,
|
||||||
|
}).then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
this.$util.toast('提交成功')
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack({ delta: 1 })
|
||||||
|
}, 1500)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang='scss'>
|
<style lang="scss">
|
||||||
.new {
|
.new {
|
||||||
padding: 34rpx;
|
padding: 34rpx;
|
||||||
|
|
||||||
@@ -291,6 +389,12 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 188rpx;
|
height: 188rpx;
|
||||||
}
|
}
|
||||||
|
.gplot-empty {
|
||||||
|
margin: 0 auto;
|
||||||
|
border: 1px dashed #dcdfe6;
|
||||||
|
color: #999;
|
||||||
|
height: 188rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.gplot-box {
|
.gplot-box {
|
||||||
height: 280rpx;
|
height: 280rpx;
|
||||||
@@ -342,19 +446,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.point {
|
.point {
|
||||||
height: 100rpx;
|
white-space: nowrap;
|
||||||
width: 100rpx;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/deep/ .uni-drawer__content {
|
/deep/ .uni-drawer__content {
|
||||||
width: 100vw !important;
|
width: 100vw !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,6 +136,10 @@ export default {
|
|||||||
title: '升级成功',
|
title: '升级成功',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
})
|
})
|
||||||
|
// 重新登录
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/user/login',
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
jump(type) {
|
jump(type) {
|
||||||
|
|||||||
@@ -5,15 +5,32 @@
|
|||||||
<template v-if="step == 1">
|
<template v-if="step == 1">
|
||||||
<uni-forms ref="form" :rules="rules" :modelValue="formData">
|
<uni-forms ref="form" :rules="rules" :modelValue="formData">
|
||||||
<uni-forms-item name="phone">
|
<uni-forms-item name="phone">
|
||||||
<uni-easyinput disabled type="text" v-model="formData.phoneShow" placeholder="请输入手机号" />
|
<uni-easyinput
|
||||||
|
disabled
|
||||||
|
type="text"
|
||||||
|
maxlength="11"
|
||||||
|
v-model="formData.phoneShow"
|
||||||
|
placeholder="请输入手机号"
|
||||||
|
/>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item name="code">
|
<uni-forms-item name="code">
|
||||||
<view class="login-box-input">
|
<view class="login-box-input">
|
||||||
<uni-easyinput type="number" v-model="formData.code" placeholder="请输入验证码" />
|
<uni-easyinput type="number" v-model="formData.code" placeholder="请输入验证码" />
|
||||||
<view class="ml40"
|
<view
|
||||||
style="margin-left:40rpx;font-size: 28rpx; color: #666; width: 200rpx; text-align: center"
|
class="ml40"
|
||||||
v-if="waitTime > 0">{{ waitTime + 's后重新获取' }}</view>
|
style="
|
||||||
<button class="login-box-input-btn" v-else @click="getCode(5)" size="mini">获取验证码</button>
|
margin-left: 40rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666;
|
||||||
|
width: 200rpx;
|
||||||
|
text-align: center;
|
||||||
|
"
|
||||||
|
v-if="waitTime > 0"
|
||||||
|
>{{ waitTime + 's后重新获取' }}</view
|
||||||
|
>
|
||||||
|
<button class="login-box-input-btn" v-else @click="getCode(5)" size="mini">
|
||||||
|
获取验证码
|
||||||
|
</button>
|
||||||
</view>
|
</view>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
@@ -22,15 +39,31 @@
|
|||||||
<template v-else>
|
<template v-else>
|
||||||
<uni-forms ref="form" :rules="rules" :modelValue="formData">
|
<uni-forms ref="form" :rules="rules" :modelValue="formData">
|
||||||
<uni-forms-item name="phone">
|
<uni-forms-item name="phone">
|
||||||
<uni-easyinput type="number" v-model="formData.phone2" placeholder="请输入新手机号" />
|
<uni-easyinput
|
||||||
|
maxlength="11"
|
||||||
|
type="number"
|
||||||
|
v-model="formData.phone2"
|
||||||
|
placeholder="请输入新手机号"
|
||||||
|
/>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item name="code">
|
<uni-forms-item name="code">
|
||||||
<view class="login-box-input">
|
<view class="login-box-input">
|
||||||
<uni-easyinput type="number" v-model="formData.code2" placeholder="请输入验证码" />
|
<uni-easyinput type="number" v-model="formData.code2" placeholder="请输入验证码" />
|
||||||
<view class="ml40"
|
<view
|
||||||
style="margin-left:40rpx;font-size: 28rpx; color: #666; width: 200rpx; text-align: center"
|
class="ml40"
|
||||||
v-if="waitTime > 0">{{ waitTime + 's后重新获取' }}</view>
|
style="
|
||||||
<button class="login-box-input-btn" v-else @click="getCode(4)" size="mini">获取验证码</button>
|
margin-left: 40rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666;
|
||||||
|
width: 200rpx;
|
||||||
|
text-align: center;
|
||||||
|
"
|
||||||
|
v-if="waitTime > 0"
|
||||||
|
>{{ waitTime + 's后重新获取' }}</view
|
||||||
|
>
|
||||||
|
<button class="login-box-input-btn" v-else @click="getCode(4)" size="mini">
|
||||||
|
获取验证码
|
||||||
|
</button>
|
||||||
</view>
|
</view>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
@@ -43,8 +76,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import { apiGetYms, apiComfirmCode, apiRebindPhone } from '@/common/api/user'
|
import { apiGetYms, apiComfirmCode, apiRebindPhone } from '@/common/api/user'
|
||||||
export default {
|
export default {
|
||||||
name: "jiaban",
|
name: 'jiaban',
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
step: 1,
|
step: 1,
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -62,102 +95,108 @@ export default {
|
|||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: "请填写手机号"
|
errorMessage: '请填写手机号',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
code: {
|
code: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: "请填写验证码"
|
errorMessage: '请填写验证码',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
phone2: {
|
phone2: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: "请填写新手机号"
|
errorMessage: '请填写新手机号',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
code2: {
|
code2: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: "请填写验证码"
|
errorMessage: '请填写验证码',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
onLoad () {
|
onLoad() {
|
||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCode (type) {
|
getCode(type) {
|
||||||
if (!this.formData.phone) {
|
if (!this.formData.phone) {
|
||||||
return this.$util.toast('请输入手机号!')
|
return this.$util.toast('请输入手机号!')
|
||||||
}
|
}
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '请稍等'
|
title: '请稍等',
|
||||||
})
|
})
|
||||||
apiGetYms({
|
apiGetYms({
|
||||||
phone: type == 5 ? this.formData.phone : this.formData.phone2,
|
phone: type == 5 ? this.formData.phone : this.formData.phone2,
|
||||||
type,
|
type,
|
||||||
}).then(res => {
|
|
||||||
uni.hideLoading()
|
|
||||||
console.log(res);
|
|
||||||
this.waitTime = 60
|
|
||||||
this.inter = setInterval(() => {
|
|
||||||
if (this.waitTime == 0) {
|
|
||||||
clearInterval(this.inter)
|
|
||||||
} else {
|
|
||||||
this.waitTime--
|
|
||||||
}
|
|
||||||
}, 1000)
|
|
||||||
}).catch(err => {
|
|
||||||
uni.hideLoading()
|
|
||||||
console.log(err);
|
|
||||||
})
|
})
|
||||||
|
.then((res) => {
|
||||||
|
uni.hideLoading()
|
||||||
|
console.log(res)
|
||||||
|
this.waitTime = 60
|
||||||
|
this.inter = setInterval(() => {
|
||||||
|
if (this.waitTime == 0) {
|
||||||
|
clearInterval(this.inter)
|
||||||
|
} else {
|
||||||
|
this.waitTime--
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
uni.hideLoading()
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
init () {
|
init() {
|
||||||
this.formData.phone = uni.getStorageSync('userInfo').phone
|
// 手机号中间四位隐藏
|
||||||
// 150****0083
|
this.formData.phone = uni.getStorageSync('userInfo').user_name
|
||||||
this.formData.phoneShow = this.formData.phone.substr(0, 3) + '****' + this.formData.phone.substr(7)
|
this.formData.phoneShow = this.formData.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
|
||||||
},
|
},
|
||||||
firstSubmit () {
|
firstSubmit() {
|
||||||
apiComfirmCode({
|
apiComfirmCode({
|
||||||
phone: this.formData.phone,
|
phone: this.formData.phone,
|
||||||
code: this.formData.code,
|
code: this.formData.code,
|
||||||
}).then(res => {
|
|
||||||
this.step = 2
|
|
||||||
clearInterval(this.inter)
|
|
||||||
this.waitTime = 0
|
|
||||||
}).catch(err => {
|
|
||||||
console.log(err);
|
|
||||||
})
|
})
|
||||||
|
.then((res) => {
|
||||||
|
this.step = 2
|
||||||
|
clearInterval(this.inter)
|
||||||
|
this.waitTime = 0
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
secondSubmit () {
|
secondSubmit() {
|
||||||
apiRebindPhone({
|
apiRebindPhone({
|
||||||
phone: this.formData.phone2,
|
phone: this.formData.phone2,
|
||||||
code: this.formData.code2,
|
code: this.formData.code2,
|
||||||
}).then(res => {
|
|
||||||
this.$util.toast('绑定成功')
|
|
||||||
uni.clearStorageSync();
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/user/login'
|
|
||||||
})
|
|
||||||
}, 1500);
|
|
||||||
}).catch(err => {
|
|
||||||
console.log(err);
|
|
||||||
})
|
})
|
||||||
}
|
.then((res) => {
|
||||||
}
|
this.$util.toast('绑定成功')
|
||||||
};
|
uni.clearStorageSync()
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/user/login',
|
||||||
|
})
|
||||||
|
}, 1500)
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.index {
|
.index {
|
||||||
|
|||||||
@@ -4,105 +4,191 @@
|
|||||||
<view class="index">
|
<view class="index">
|
||||||
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
||||||
<uni-forms-item name="phone">
|
<uni-forms-item name="phone">
|
||||||
<uni-easyinput disabled type="text" v-model="formData.phone" placeholder="请输入手机号" />
|
<uni-easyinput
|
||||||
</uni-forms-item>
|
maxlength="11"
|
||||||
|
disabled
|
||||||
|
type="text"
|
||||||
|
v-model="formData.showPhone"
|
||||||
|
placeholder="请输入手机号"
|
||||||
|
/>
|
||||||
|
</uni-forms-item>
|
||||||
<uni-forms-item name="code">
|
<uni-forms-item name="code">
|
||||||
<view class="login-box-input mt40">
|
<view class="login-box-input">
|
||||||
<uni-easyinput type="number" v-model="formData.code" placeholder="请输入手机验证码" />
|
<uni-easyinput type="number" v-model="formData.code" placeholder="请输入手机验证码" />
|
||||||
<view class="ml40"
|
<view
|
||||||
style="margin-left:40rpx;font-size: 28rpx; color: #666; width: 200rpx; text-align: center"
|
class="ml40"
|
||||||
v-if="waitTime > 0">{{ waitTime + 's后重新获取' }}</view>
|
style="
|
||||||
|
margin-left: 40rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666;
|
||||||
|
width: 200rpx;
|
||||||
|
text-align: center;
|
||||||
|
"
|
||||||
|
v-if="waitTime > 0"
|
||||||
|
>{{ waitTime + 's后重新获取' }}</view
|
||||||
|
>
|
||||||
<button class="login-box-input-btn" v-else @click="getCode" size="mini">获取验证码</button>
|
<button class="login-box-input-btn" v-else @click="getCode" size="mini">获取验证码</button>
|
||||||
</view>
|
</view>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item name="password">
|
<uni-forms-item name="password">
|
||||||
<uni-easyinput type="text" v-model="formData.password" placeholder="请输入新的登录密码" />
|
<uni-easyinput type="password" v-model="formData.password" placeholder="请输入新的登录密码" />
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item name="password2">
|
<uni-forms-item name="password2">
|
||||||
<uni-easyinput type="text" v-model="formData.password2" placeholder="请再次确认密码" />
|
<uni-easyinput type="password" v-model="formData.password2" placeholder="请再次确认密码" />
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
<button type="default" class="submit-btn" @click="submit">提交</button>
|
<button type="default" class="submit-btn" @click="submit">提交</button>
|
||||||
<view class="login-box-tips">
|
<view class="login-box-tips">
|
||||||
<view style="color:#999">说明:密码长度为6-18位</view>
|
<view style="color: #999">说明:密码需要包含特殊字符字母数字,长度为8-16</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</Cn-page>
|
</Cn-page>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { apiGetYms, apiModifyPsd, gongkey } from '@/common/api/user'
|
||||||
|
import { sm2, encrypt } from '@/common/js/sm2.js'
|
||||||
|
import { sm3Digest } from '@/common/js/sm3.js'
|
||||||
export default {
|
export default {
|
||||||
name: "ChangePWd",
|
name: 'ChangePWd',
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
waitTime: 0,
|
waitTime: 0,
|
||||||
// 表单数据
|
// 表单数据
|
||||||
formData: {
|
formData: {
|
||||||
phone: '150****0083',
|
showPhone: '',
|
||||||
|
phone: '',
|
||||||
code: '',
|
code: '',
|
||||||
password: '',
|
password: '',
|
||||||
password2: ''
|
password2: '',
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
phone: {
|
phone: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: "请填写手机号"
|
errorMessage: '请填写手机号',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
code: {
|
code: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: "请填写验证码"
|
errorMessage: '请填写验证码',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
password: {
|
password: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: "请填写新密码"
|
errorMessage: '请填写新密码',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
password2: {
|
password2: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: "请填写确认密码"
|
errorMessage: '请填写确认密码',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
onLoad () {
|
onLoad() {
|
||||||
|
// 手机号中间四位隐藏
|
||||||
|
this.formData.phone = uni.getStorageSync('userInfo').user_name
|
||||||
|
this.formData.showPhone = this.formData.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCode () {
|
getCode() {
|
||||||
this.waitTime = 60
|
uni.showLoading({
|
||||||
this.inter = setInterval(() => {
|
title: '请稍等',
|
||||||
if (this.waitTime == 0) {
|
})
|
||||||
clearInterval(this.inter)
|
apiGetYms({
|
||||||
} else {
|
phone: this.formData.phone,
|
||||||
this.waitTime--
|
type: 2,
|
||||||
}
|
})
|
||||||
}, 1000)
|
.then((res) => {
|
||||||
|
uni.hideLoading()
|
||||||
|
console.log(res)
|
||||||
|
this.waitTime = 60
|
||||||
|
this.inter = setInterval(() => {
|
||||||
|
if (this.waitTime == 0) {
|
||||||
|
clearInterval(this.inter)
|
||||||
|
} else {
|
||||||
|
this.waitTime--
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
uni.hideLoading()
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
submit () {
|
submit() {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
console.log(valid);
|
console.log(valid)
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
uni.navigateBack({ delta: 1 })
|
if (this.formData.password != this.formData.password2) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '两次密码不一致',
|
||||||
|
icon: 'none',
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// 密码需要包含特殊字符字母数字,长度为8-16
|
||||||
|
if (
|
||||||
|
!/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[#@!~%^&*])[a-zA-Z\d#@!~%^&*]{8,16}$/.test(
|
||||||
|
this.formData.password,
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
return this.$util.toast('密码需要包含特殊字符字母数字,长度为8-16')
|
||||||
|
}
|
||||||
|
let loginName = encrypt(this.formData.phone)
|
||||||
|
gongkey({ loginName }).then((response) => {
|
||||||
|
let publicKey = response.data
|
||||||
|
let sm3Pwd = sm3Digest(this.formData.password)
|
||||||
|
let jiamipassword = sm2(sm3Pwd + '|' + this.formData.password, publicKey, 0)
|
||||||
|
// apiPwdLogin({
|
||||||
|
// username: loginName,
|
||||||
|
// password: jiamipassword,
|
||||||
|
// imageCode: '',
|
||||||
|
// grant_type: 'captcha',
|
||||||
|
// verifyCode: 0,
|
||||||
|
// }).then((res) => {
|
||||||
|
// this.$util.loginSuccess(res.data)
|
||||||
|
// })
|
||||||
|
apiModifyPsd({
|
||||||
|
phone: this.formData.phone,
|
||||||
|
code: this.formData.code,
|
||||||
|
password: jiamipassword,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
uni.showToast({
|
||||||
|
title: '修改成功',
|
||||||
|
icon: 'none',
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1,
|
||||||
|
})
|
||||||
|
}, 1000)
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.index {
|
.index {
|
||||||
|
|||||||
@@ -4,30 +4,44 @@
|
|||||||
<view class="index">
|
<view class="index">
|
||||||
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
||||||
<uni-forms-item name="phone">
|
<uni-forms-item name="phone">
|
||||||
<uni-easyinput type="number" v-model="formData.phone" placeholder="请输入手机号" />
|
<uni-easyinput
|
||||||
|
type="number"
|
||||||
|
maxlength="11"
|
||||||
|
v-model="formData.phone"
|
||||||
|
placeholder="请输入手机号"
|
||||||
|
/>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item name="code">
|
<uni-forms-item name="code">
|
||||||
<view class="login-box-input">
|
<view class="login-box-input">
|
||||||
<uni-easyinput type="number" v-model="formData.code" placeholder="请输入验证码" />
|
<uni-easyinput type="number" v-model="formData.code" placeholder="请输入验证码" />
|
||||||
<view class="ml40"
|
<view
|
||||||
style="margin-left:40rpx;font-size: 28rpx; color: #666; width: 200rpx; text-align: center"
|
class="ml40"
|
||||||
v-if="waitTime > 0">{{ waitTime + 's后重新获取' }}</view>
|
style="
|
||||||
|
margin-left: 40rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666;
|
||||||
|
width: 200rpx;
|
||||||
|
text-align: center;
|
||||||
|
"
|
||||||
|
v-if="waitTime > 0"
|
||||||
|
>{{ waitTime + 's后重新获取' }}</view
|
||||||
|
>
|
||||||
<button class="login-box-input-btn" v-else @click="getCode" size="mini">获取验证码</button>
|
<button class="login-box-input-btn" v-else @click="getCode" size="mini">获取验证码</button>
|
||||||
</view>
|
</view>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item name="password">
|
<uni-forms-item name="password">
|
||||||
<uni-easyinput type="text" v-model="formData.password" placeholder="请输入新的登录密码" />
|
<uni-easyinput type="password" v-model="formData.password" placeholder="请输入新的登录密码" />
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item name="password2">
|
<uni-forms-item name="password2">
|
||||||
<uni-easyinput type="text" v-model="formData.password2" placeholder="请再次确认密码" />
|
<uni-easyinput type="password" v-model="formData.password2" placeholder="请再次确认密码" />
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
<button type="default" class="submit-btn" @click="submit">提交</button>
|
<button type="default" class="submit-btn" @click="submit">提交</button>
|
||||||
<view class="login-box-tips">
|
<view class="login-box-tips">
|
||||||
<view style="color:#999">说明:密码长度为6-18位</view>
|
<view style="color: #999">说明:密码长度为6-18位</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="login-box-tips">
|
<view class="login-box-tips">
|
||||||
<view style="color:#999">点击提交即表示同意</view>
|
<view style="color: #999">点击提交即表示同意</view>
|
||||||
<navigator url="/pages/mine/agreement" hover-class="none">《用户协议》</navigator>
|
<navigator url="/pages/mine/agreement" hover-class="none">《用户协议》</navigator>
|
||||||
<navigator url="/pages/mine/policy" hover-class="none">《个人信息保护政策》</navigator>
|
<navigator url="/pages/mine/policy" hover-class="none">《个人信息保护政策》</navigator>
|
||||||
</view>
|
</view>
|
||||||
@@ -36,11 +50,12 @@
|
|||||||
</Cn-page>
|
</Cn-page>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { apiGetYms, apiReSetPsd } from '@/common/api/user'
|
import { apiGetYms, apiReSetPsd, gongkey } from '@/common/api/user'
|
||||||
|
import { sm2, encrypt } from '@/common/js/sm2.js'
|
||||||
|
import { sm3Digest } from '@/common/js/sm3.js'
|
||||||
export default {
|
export default {
|
||||||
name: "jiaban",
|
name: 'jiaban',
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
waitTime: 0,
|
waitTime: 0,
|
||||||
@@ -49,102 +64,109 @@ export default {
|
|||||||
phone: '',
|
phone: '',
|
||||||
code: '',
|
code: '',
|
||||||
password: '',
|
password: '',
|
||||||
password2: ''
|
password2: '',
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
phone: {
|
phone: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: "请填写手机号"
|
errorMessage: '请填写手机号',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
code: {
|
code: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: "请填写验证码"
|
errorMessage: '请填写验证码',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
password: {
|
password: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: "请填写新密码"
|
errorMessage: '请填写新密码',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
password2: {
|
password2: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: "请填写确认密码"
|
errorMessage: '请填写确认密码',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
}
|
||||||
},
|
|
||||||
onLoad () {
|
|
||||||
},
|
},
|
||||||
|
onLoad() {},
|
||||||
methods: {
|
methods: {
|
||||||
getCode () {
|
getCode() {
|
||||||
if (!this.formData.phone) {
|
if (!this.formData.phone) {
|
||||||
return this.$util.toast('请输入手机号!')
|
return this.$util.toast('请输入手机号!')
|
||||||
}
|
}
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '请稍等'
|
title: '请稍等',
|
||||||
})
|
})
|
||||||
apiGetYms({
|
apiGetYms({
|
||||||
phone: this.formData.phone,
|
phone: this.formData.phone,
|
||||||
type: 3,
|
type: 3,
|
||||||
}).then(res => {
|
|
||||||
uni.hideLoading()
|
|
||||||
console.log(res);
|
|
||||||
this.waitTime = 60
|
|
||||||
this.inter = setInterval(() => {
|
|
||||||
if (this.waitTime == 0) {
|
|
||||||
clearInterval(this.inter)
|
|
||||||
} else {
|
|
||||||
this.waitTime--
|
|
||||||
}
|
|
||||||
}, 1000)
|
|
||||||
}).catch(err => {
|
|
||||||
uni.hideLoading()
|
|
||||||
console.log(err);
|
|
||||||
})
|
})
|
||||||
|
.then((res) => {
|
||||||
|
uni.hideLoading()
|
||||||
|
console.log(res)
|
||||||
|
this.waitTime = 60
|
||||||
|
this.inter = setInterval(() => {
|
||||||
|
if (this.waitTime == 0) {
|
||||||
|
clearInterval(this.inter)
|
||||||
|
} else {
|
||||||
|
this.waitTime--
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
uni.hideLoading()
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
submit () {
|
submit() {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (this.formData.password.length < 6 || this.formData.password.length > 18) {
|
if (this.formData.password != this.formData.password2) {
|
||||||
return this.$util.toast('密码长度为6-18位')
|
|
||||||
} else if (this.formData.password != this.formData.password2) {
|
|
||||||
return this.$util.toast('两次密码不一致')
|
return this.$util.toast('两次密码不一致')
|
||||||
}
|
}
|
||||||
uni.showLoading({
|
// 密码需要包含特殊字符字母数字,长度为8-16
|
||||||
title: '请稍等'
|
if (!/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[#@!~%^&*])[a-zA-Z\d#@!~%^&*]{8,16}$/.test(this.formData.password)) {
|
||||||
})
|
return this.$util.toast('密码需要包含特殊字符字母数字,长度为8-16')
|
||||||
apiReSetPsd({
|
}
|
||||||
phone: this.formData.phone,
|
let loginName = encrypt(this.formData.phone)
|
||||||
code: this.formData.code,
|
gongkey({ loginName }).then((response) => {
|
||||||
password: this.formData.password,
|
let publicKey = response.data
|
||||||
}).then(res => {
|
let sm3Pwd = sm3Digest(this.formData.password)
|
||||||
uni.hideLoading()
|
let jiamipassword = sm2(sm3Pwd + '|' + this.formData.password, publicKey, 0)
|
||||||
console.log(res);
|
|
||||||
this.$util.toast('修改成功!')
|
apiReSetPsd({
|
||||||
setTimeout(() => {
|
phone: this.formData.phone,
|
||||||
uni.navigateBack()
|
code: this.formData.code,
|
||||||
}, 1000)
|
password: jiamipassword,
|
||||||
}).catch(err => {
|
})
|
||||||
uni.hideLoading()
|
.then((res) => {
|
||||||
console.log(err);
|
this.$util.toast('修改成功!')
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 1000)
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
uni.hideLoading()
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.index {
|
.index {
|
||||||
|
|||||||
@@ -9,14 +9,19 @@
|
|||||||
<image class="login-box-logo" mode="widthFix" src="/static/logo.png"></image>
|
<image class="login-box-logo" mode="widthFix" src="/static/logo.png"></image>
|
||||||
<template v-if="loginType == 'yzm'">
|
<template v-if="loginType == 'yzm'">
|
||||||
<view class="login-box-input mt100">
|
<view class="login-box-input mt100">
|
||||||
<input class="login-box-input-main" maxlength="11" v-model="yzmForm.phone" placeholder="请输入手机号" />
|
<input
|
||||||
|
class="login-box-input-main"
|
||||||
|
maxlength="11"
|
||||||
|
v-model="yzmForm.phone"
|
||||||
|
placeholder="请输入手机号"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="login-box-input mt40">
|
<!-- <view class="login-box-input mt40">
|
||||||
<input class="login-box-input-main" v-model="yzmForm.imgCode" placeholder="图形验证码" />
|
<input class="login-box-input-main" v-model="yzmForm.imgCode" placeholder="图形验证码" />
|
||||||
<view class="login-box-input-img"></view>
|
<view class="login-box-input-img"></view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="login-box-input mt40">
|
<view class="login-box-input mt40">
|
||||||
<input class="login-box-input-main" v-model="yzmForm.code" placeholder="手机验证码" />
|
<input class="login-box-input-main" v-model="yzmForm.code" placeholder="手机验证码" />
|
||||||
<view
|
<view
|
||||||
class="ml40"
|
class="ml40"
|
||||||
style="font-size: 28rpx; color: #666; width: 200rpx; text-align: center"
|
style="font-size: 28rpx; color: #666; width: 200rpx; text-align: center"
|
||||||
@@ -28,10 +33,15 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<view class="login-box-input mt100">
|
<view class="login-box-input mt100">
|
||||||
<input class="login-box-input-main" v-model="pwdForm.phone" placeholder="请输入账号" />
|
<input class="login-box-input-main" maxlength="11" v-model="pwdForm.phone" placeholder="请输入账号" />
|
||||||
</view>
|
</view>
|
||||||
<view class="login-box-input mt40">
|
<view class="login-box-input mt40">
|
||||||
<input type="password" class="login-box-input-main" v-model="pwdForm.pwd" placeholder="请输入密码" />
|
<input
|
||||||
|
type="password"
|
||||||
|
class="login-box-input-main"
|
||||||
|
v-model="pwdForm.pwd"
|
||||||
|
placeholder="请输入密码"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="login-box-input mt40">
|
<!-- <view class="login-box-input mt40">
|
||||||
<view class="login-box-input-icon"></view>
|
<view class="login-box-input-icon"></view>
|
||||||
@@ -59,15 +69,18 @@
|
|||||||
</Cn-page>
|
</Cn-page>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { apiGetYms, apiLogin, apiYsmLogin } from '@/common/api/user'
|
import { apiGetYms, apiPwdLogin, apiYsmLogin, gongkey } from '@/common/api/user'
|
||||||
|
import { sm2, encrypt } from '@/common/js/sm2.js'
|
||||||
|
import { sm3Digest } from '@/common/js/sm3.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
loginType: 'pwd',
|
loginType: 'pwd',
|
||||||
pwdForm: {
|
pwdForm: {
|
||||||
phone: '',
|
phone: '13888888888',
|
||||||
pwd: '',
|
pwd: 'gwo6H8Kb',
|
||||||
imgCode: '',
|
imgCode: '',
|
||||||
},
|
},
|
||||||
yzmForm: {
|
yzmForm: {
|
||||||
@@ -122,15 +135,19 @@ export default {
|
|||||||
if (!this.pwdForm.phone && !this.pwdForm.pwd) {
|
if (!this.pwdForm.phone && !this.pwdForm.pwd) {
|
||||||
return this.$util.toast('请填写登录信息!')
|
return this.$util.toast('请填写登录信息!')
|
||||||
}
|
}
|
||||||
apiLogin({
|
let loginName = encrypt(this.pwdForm.phone)
|
||||||
phone: this.pwdForm.phone,
|
gongkey({ loginName }).then((response) => {
|
||||||
key: this.pwdForm.pwd,
|
let publicKey = response.data
|
||||||
type: 1,
|
let sm3Pwd = sm3Digest(this.pwdForm.pwd)
|
||||||
}).then((res) => {
|
let jiamipassword = sm2(sm3Pwd + '|' + this.pwdForm.pwd, publicKey, 0)
|
||||||
console.log(res)
|
apiPwdLogin({
|
||||||
uni.setStorageSync('userInfo', res.data)
|
username: loginName,
|
||||||
uni.reLaunch({
|
password: jiamipassword,
|
||||||
url: '/pages/index/index',
|
imageCode: '',
|
||||||
|
grant_type: 'captcha',
|
||||||
|
verifyCode: 0,
|
||||||
|
}).then((res) => {
|
||||||
|
this.$util.loginSuccess(res.data)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -142,21 +159,13 @@ export default {
|
|||||||
phone: this.yzmForm.phone,
|
phone: this.yzmForm.phone,
|
||||||
smsCode: this.yzmForm.code,
|
smsCode: this.yzmForm.code,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res)
|
this.$util.loginSuccess(res.data)
|
||||||
uni.setStorageSync('access_token', res.data.token_type + ' ' + res.data.access_token)
|
|
||||||
uni.setStorageSync('refresh_token', res.data.refresh_token)
|
|
||||||
let strings = res.data.access_token.split('.') //截取token,获取载体
|
|
||||||
var userInfo = JSON.parse(decodeURIComponent(escape(window.atob(strings[1].replace(/-/g, '+').replace(/_/g, '/')))))
|
|
||||||
userInfo.authorities = userInfo.authorities[0]
|
|
||||||
uni.setStorageSync('userInfo', userInfo)
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/index/index',
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onLoad(o) {
|
onLoad(o) {
|
||||||
uni.removeStorageSync('engineering')
|
// 移除所有的缓存
|
||||||
|
uni.clearStorageSync()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ export default {
|
|||||||
// this.step = 2
|
// this.step = 2
|
||||||
// 直接登录
|
// 直接登录
|
||||||
autoLogin(this.formData.phone).then((res) => {
|
autoLogin(this.formData.phone).then((res) => {
|
||||||
this.loginSuccess(res.data)
|
this.$util.loginSuccess(res.data)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
64
pnpm-lock.yaml
generated
64
pnpm-lock.yaml
generated
@@ -3,14 +3,18 @@ lockfileVersion: 5.4
|
|||||||
specifiers:
|
specifiers:
|
||||||
'@types/html5plus': ^1.0.2
|
'@types/html5plus': ^1.0.2
|
||||||
'@types/uni-app': ^1.4.4
|
'@types/uni-app': ^1.4.4
|
||||||
|
crypto-js: ^4.1.1
|
||||||
html2canvas: ^1.4.1
|
html2canvas: ^1.4.1
|
||||||
mqtt: 3.0.0
|
mqtt: 3.0.0
|
||||||
pinyin-pro: ^3.13.2
|
pinyin-pro: ^3.13.2
|
||||||
|
qs: ^6.11.2
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
|
crypto-js: 4.1.1
|
||||||
html2canvas: 1.4.1
|
html2canvas: 1.4.1
|
||||||
mqtt: 3.0.0
|
mqtt: 3.0.0
|
||||||
pinyin-pro: 3.13.2
|
pinyin-pro: 3.13.2
|
||||||
|
qs: 6.11.2
|
||||||
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@types/html5plus': 1.0.2
|
'@types/html5plus': 1.0.2
|
||||||
@@ -106,6 +110,13 @@ packages:
|
|||||||
ieee754: 1.2.1
|
ieee754: 1.2.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/call-bind/1.0.2:
|
||||||
|
resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==}
|
||||||
|
dependencies:
|
||||||
|
function-bind: 1.1.1
|
||||||
|
get-intrinsic: 1.2.1
|
||||||
|
dev: false
|
||||||
|
|
||||||
/callback-stream/1.1.0:
|
/callback-stream/1.1.0:
|
||||||
resolution: {integrity: sha512-sAZ9kODla+mGACBZ1IpTCAisKoGnv6PykW7fPk1LrM+mMepE18Yz0515yoVcrZy7dQsTUp3uZLQ/9Sx1RnLoHw==}
|
resolution: {integrity: sha512-sAZ9kODla+mGACBZ1IpTCAisKoGnv6PykW7fPk1LrM+mMepE18Yz0515yoVcrZy7dQsTUp3uZLQ/9Sx1RnLoHw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -138,6 +149,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==}
|
resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/crypto-js/4.1.1:
|
||||||
|
resolution: {integrity: sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/css-line-break/2.1.0:
|
/css-line-break/2.1.0:
|
||||||
resolution: {integrity: sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==}
|
resolution: {integrity: sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -260,6 +275,19 @@ packages:
|
|||||||
resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
|
resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/function-bind/1.1.1:
|
||||||
|
resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/get-intrinsic/1.2.1:
|
||||||
|
resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==}
|
||||||
|
dependencies:
|
||||||
|
function-bind: 1.1.1
|
||||||
|
has: 1.0.3
|
||||||
|
has-proto: 1.0.1
|
||||||
|
has-symbols: 1.0.3
|
||||||
|
dev: false
|
||||||
|
|
||||||
/glob-parent/3.1.0:
|
/glob-parent/3.1.0:
|
||||||
resolution: {integrity: sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==}
|
resolution: {integrity: sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -294,6 +322,23 @@ packages:
|
|||||||
path-is-absolute: 1.0.1
|
path-is-absolute: 1.0.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/has-proto/1.0.1:
|
||||||
|
resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==}
|
||||||
|
engines: {node: '>= 0.4'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/has-symbols/1.0.3:
|
||||||
|
resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==}
|
||||||
|
engines: {node: '>= 0.4'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/has/1.0.3:
|
||||||
|
resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==}
|
||||||
|
engines: {node: '>= 0.4.0'}
|
||||||
|
dependencies:
|
||||||
|
function-bind: 1.1.1
|
||||||
|
dev: false
|
||||||
|
|
||||||
/help-me/1.1.0:
|
/help-me/1.1.0:
|
||||||
resolution: {integrity: sha512-P/IZ8yOMne3SCTHbVY429NZ67B/2bVQlcYGZh2iPPbdLrEQ/qY5aGChn0YTDmt7Sb4IKRI51fypItav+lNl76w==}
|
resolution: {integrity: sha512-P/IZ8yOMne3SCTHbVY429NZ67B/2bVQlcYGZh2iPPbdLrEQ/qY5aGChn0YTDmt7Sb4IKRI51fypItav+lNl76w==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -444,6 +489,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==}
|
resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/object-inspect/1.12.3:
|
||||||
|
resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/once/1.4.0:
|
/once/1.4.0:
|
||||||
resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
|
resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -508,6 +557,13 @@ packages:
|
|||||||
pump: 2.0.1
|
pump: 2.0.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/qs/6.11.2:
|
||||||
|
resolution: {integrity: sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==}
|
||||||
|
engines: {node: '>=0.6'}
|
||||||
|
dependencies:
|
||||||
|
side-channel: 1.0.4
|
||||||
|
dev: false
|
||||||
|
|
||||||
/readable-stream/2.3.8:
|
/readable-stream/2.3.8:
|
||||||
resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==}
|
resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -545,6 +601,14 @@ packages:
|
|||||||
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
|
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/side-channel/1.0.4:
|
||||||
|
resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==}
|
||||||
|
dependencies:
|
||||||
|
call-bind: 1.0.2
|
||||||
|
get-intrinsic: 1.2.1
|
||||||
|
object-inspect: 1.12.3
|
||||||
|
dev: false
|
||||||
|
|
||||||
/source-map-js/1.0.2:
|
/source-map-js/1.0.2:
|
||||||
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
|
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
|
|||||||
Reference in New Issue
Block a user