Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
npm install --save fzm-ui
import Vue from 'vue'
import FzmUI from "fzm-ui"
Vue.use(FzmUI);
api
:存放所有登录注册相关的http接口方法的对象 详细请查看下面
platkey
:项目标记
callback
:登录和注册成功之后的回调方法 详细请查看下面
<template lang="html">
<div>
这里是登录注册的例子
<FzmLogReg v-bind:api="api" v-bind:platkey="'zhaobi'" v-bind:callback="cb"></FzmLogReg>
</div>
</template>
<script>
import api from './api.js'
export default {
data(){
return {
api,
cb(type,res){
console.log(type,res);
}
}
}
}
</script>
./api.js
const api = {
getRegisterState(params){ //判断是否已注册
return restfuls.get(注册接口地址,{ params });
},
getCodeBySms(params){ //获取短信验证码 post参数不需要加大括号
return restfuls.post(获取短信验证码接口地址,params);
},
getCodeByEmail(params){ //获取邮箱验证码
return restfuls.post(获取邮箱验证码接口地址,params);
},
getCodeByVoice(params){ //获取语音验证码
return restfuls.post(获取语音验证码接口地址,params);
},
register(params){ //快速注册
return restfuls.post(快速注册接口地址,params);
},
login(params){ //快速登录
return restfuls.post(快速登录接口地址,params);
}
}
callback
callback会得到两个参数: 第一个参数是回调类型,目前有两个值提供'login' 、 'register' 第二个参数是调用登录接口后返回的结果
export default {
data(){
return {
api,
cb(type,res){
switch(type){
case 'login':console.log(`登录成功,登录接口返回的信息是${res}`);break;
case 'register':console.log(`注册成功,注册接口返回的信息是${res}`);break;
}
}
}
}
}
FAQs
https://www.33.cn
We found that fzm-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.