uniapp创建支付密码实现(初始密码,第二次密码)

示例:

插件地址:自定义数字/身份证/密码输入框,键盘密码框可分离使 - DCloud 插件市场

1.下载插件并导入HBuilderX,找到文件夹,copy number-keyboard.vue一份为number-keyboard2.vue(number-keyboard.vue是键盘,password-input.vue是密码输入框)

2.修改插件键盘和密码框样式,已写好,直接copy下面代码

password-input.vue

<template><view class="psdIptBx"><block v-for="(item , index) in psdIptNum" :key='index'><view class="psdTtem"><text v-if="numLng.length > index" class="psdTtemTxt"><text v-if="plaintext">●</text><text v-else>{{numLng[index]}}</text></text><text v-if="numLng.length ==index" class="focus_move">|</text></view></block></view>
</template><script>export default {props: {//是否明文 默认密文plaintext: {type: Boolean,default: true},//键盘输入的valnumLng: {type: [String, Number],default: ''},//密码框的个数psdIptNum: {type: [String, Number],default: 6}},data() {return {}},created() {},methods: {}}
</script><style scoped>.psdIptBx {display: flex;justify-content: space-between;width: 100%;text-align: center;box-sizing: border-box;}.psdTtem {width: 86rpx;height: 86rpx;background: #F2F2F2;border-radius: 20rpx 20rpx 20rpx 20rpx;}.psdTtemTxt {text-align: center;line-height: 80rpx;font-size: 30rpx;}.focus_move {/* color: #E6240F; */font-size: 30rpx;line-height: 80rpx;animation: focus 0.8s infinite;}@keyframes focus {from {opacity: 1;}to {opacity: 0;}}
</style>

number-keyboard.vue

<template><view :class="['KeyboarBody','bottomMove', 'bodMove', bodMove]" v-if="KeyboarHid"><view @click="close" class="dowmImgBx"><view class="dowmImg"></view><view v-if="confirmBtn" class="complete" @click.stop="complete">完成</view></view><view class="KeyboarBx"><view v-for="(num , index) in keyboardNum " :key='index' @click="clickBoard(num)" hover-class="hover":hover-stay-time='20' class="keyboar">{{num}}</view><view @click="clickBoard(otherNum)" :class="['keyboar',otherNum==''?'empty':'']" :hover-stay-time='20'hover-class="hover">{{otherNum}}</view><view @click="clickBoard('0')" hover-class="hover" :hover-stay-time='20' class="keyboar">0</view><view @click="deleteKeyboar()" class="keyboar keyboarflex" :hover-stay-time='20' hover-class="hover"><view class="keyboarDel"></view></view></view></view>
</template><script>export default {props: {//限制输入框的长度 空值不限制psdLength: {type: [Number, String],default: ''},//键盘码keyboardNum: {type: [Array, Object],default: () => {return [1, 2, 3, 4, 5, 6, 7, 8, 9]}},//特殊键盘码 .或者X  默空otherNum: {type: String,default: ''},//是否显示完成按钮confirmBtn:{type: Boolean,default: false},//是否在需要打开键盘时隐藏底部tabBar关闭键盘展示tabBar功能tabBar: {type: Boolean,default: false},value: {type: String,default: ''}},data() {return {bodMove: '',password: '', //要返回的结果iptNum: [], //输入的内容KeyboarHid: false, //键盘影藏和显示}},watch: {iptNum(newVal, oldVal) {this.$emit('input', newVal.join(''))},value(newVal, oldVal) {this.iptNum = newVal.split('')}},created() {},methods: {open() {this.KeyboarHid = true;if (this.tabBar) {uni.hideTabBar()}this.$nextTick(() => {setTimeout(() => {this.bodMove = 'moveShow'}, 30)})},close() {if (this.tabBar) {uni.showTabBar()}this.bodMove = '';this.$nextTick(() => {setTimeout(() => {this.KeyboarHid = false}, 300)})},// 密码框clickBoard(num) {if (num == '') return;let iptNum = this.iptNum.filter(item => item != '');//判断是否限制长度if (this.psdLength != '') {if (iptNum.length >= this.psdLength) {return};this.iptNum.push(num);} else {this.iptNum.push(num);}},//完成complete(){this.$emit('confirm', this.iptNum.join(''))},//重置 清空reset() {this.iptNum = [];},//删除deleteKeyboar() {this.iptNum.pop();}}}
</script><style scoped>.bodMove {transition: all .3s}.bottomMove {bottom: 0;left: 0;width: 100%;transform: translateY(100%)}.moveShow {transform: translateY(0)}.KeyboarBody {position: fixed;bottom: 0;left: 0;right: 0;z-index: 99;background-color: #FFFFFF;}.KeyboarBx {display: flex;flex-wrap: wrap;text-align: center;background-color: rgba(3, 3, 3, 0.1);padding: 10rpx 6rpx 0rpx 6rpx;margin-left: -12rpx;}.keyboar {width: 20%;flex-grow: 1;padding: 3%;font-size: 40rpx;background-color: #FFFFFF;border-radius: 10rpx;margin-left: 12rpx;margin-bottom: 10rpx;}.dian {margin-top: -10rpx;}.keyboarBtn {background: linear-gradient(45deg, rgba(242, 131, 9, 1) 0%, rgba(230, 36, 15, 1) 100%);color: #fff;}.hover {background: #ebedf0;}.bot {bottom: 0;}.empty {background-color: #EEEEEE;}.dowmImgBx {display: flex;justify-content: center;align-items: center;width: 100%;position: relative;}.complete {position: absolute;right: 0rpx;bottom: 5rpx;font-size: 28rpx;padding-right: 30rpx;padding-left: 20rpx;}.dowmImg {width: 35rpx;height: 35rpx;margin-bottom: 10rpx;background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACT0lEQVRYR+2UPWgTYRjH/8/dpdZCpVhU/BoEB8FBEBFt7tJe7i5CbAXhrg6CQ8HBQXAQHBzq5CA4CA4OgoNgr0GQIhQTUkJqCPEDBEEQBAdBQSoVlIakXvLIofmopMnlizjkxuN9nt/v/b/v+xB6/FGP+egL9BPoJ/D/JLC8/Hp33sl9AXDOCMqRbsyH6NLzGwLR7BapuDMQCKy4jHICi5nMNinrpAk4DOC8EZQfdVKiBGemxyHNb5V6bziCaDRxSPT5bAaOCAJd0Cb8DzshUYIT4cnqit+anqZCTQH357NE+qDIhXmAjoJpxtD8D9qRqOwcT538DyscDuer+9W8hNFo8oDok2wGHxcIFzVVvt+KRAkOYDG3NmhNTR3L/ttn01eQTL7cv+6sz4NwkhmXQpp8rxmJ8s6B2NAATFmWf9aqr/sMY7HUHsEHmxkKGJcNTb7rRaKyc1rKZ4vW5KTyfbO6hnMgHo/vYmHQBjBBxFd0VblTT6IC56REjqmq6rd66xsKuMXx+ItRFn/ZYOhMfDWkKrdrNa068xQVJVPXT3xtlJgnAbdJIpEYcViyATpFoGt60H+runkVPCOwYGra2OdG8A2DyMvihYXU8NAwzQF8moDrelC+6daV4YRXcNg0DOWTl35NC7gF6XR661qu6N6JMwzMMrPgjlcw3hCzqevKR6/wlgTcokjk3cDI6KpNRGf/wt6yWDBD4+MfmoG3LPBHIiJu37F3jsH7JAgzqjr2vll4WwKtwJoeRJ2CtD0HuinieQ50S6Iv0E+g5wn8Bo+vyyFXaYw2AAAAAElFTkSuQmCC');background-repeat: no-repeat;background-position: center center;background-size: 100%;}.keyboarDel {width: 50rpx;height: 36rpx;margin-bottom: 10rpx;background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABqUlEQVRYR+2WPUvEQBCGZze1/8DKUnsrEcVaLhvwCgULCy1sLGzFE8RKC0EsBLGwEBRuhmChlTb+hCu0vU4Ff4H3SkKCOS4fezHnNUkXQuZ58s7sbhSN+VJj5lMtUCdglYDrurNKqSMiWqpoaD+IaI6Z3woFjDErRHRJRBMVweMyz8y8mCsQwW8rBtsJjBgeSGQn8A/wbAFbOIBHpdQnEa2ltKijlHoBsJnTvsEEbOFR0SYz37mu21JK7SdAnV6v1wzutdYda4Eh4XHdDWa+Skgk4cHwzlgJlISHtQHsiMhpIAEgXDFa6yL47wx4njcJoPuXpQZgT0QOG43GtCW8fwiNMYFxsOGUucLYAXz7vv+aMhNZNfuHsKRECHcc5wvAAxFdM/OxpUTqKhgmifjLu47j3BPRfDQTWyJyYSGRvhHZJgHgQERanuf5AJaTOQNYFZEbY8wTES1k9CB3JxwmiTJzk78VB09tkyhLzz0L4qIjlig+jkechJ1AJHFGRNt/iHvgVQC7InJS+EeUaMc6gKkqJLTW7+12+zyoZS1QBTitRi1QJzD2BH4AtrHfITKVMwgAAAAASUVORK5CYII=');background-repeat: no-repeat;background-position: center center;background-size: 100%;margin-top: 11rpx;}.keyboarflex {display: flex;justify-content: center;align-items: center;}
</style>

number-keyboard2.vue

<template><view :class="['KeyboarBody','bottomMove', 'bodMove', bodMove]" v-if="KeyboarHid"><view class="KeyboarBx"><view v-for="(num , index) in keyboardNum " :key='index' @click="clickBoard(num)" hover-class="hover":hover-stay-time='20' class="keyboar">{{num}}</view><view @click="clickBoard(otherNum)" :class="['keyboar',otherNum==''?'empty':'']" :hover-stay-time='20'hover-class="hover">{{otherNum}}</view><view @click="clickBoard('0')" hover-class="hover" :hover-stay-time='20' class="keyboar">0</view><view @click="deleteKeyboar()" class="keyboar keyboarflex" :hover-stay-time='20' hover-class="hover"><view class="keyboarDel"></view></view></view></view>
</template><script>export default {props: {//限制输入框的长度 空值不限制psdLength: {type: [Number, String],default: ''},//键盘码keyboardNum: {type: [Array, Object],default: () => {return [1, 2, 3, 4, 5, 6, 7, 8, 9]}},//特殊键盘码 .或者X  默空otherNum: {type: String,default: ''},//是否显示完成按钮confirmBtn:{type: Boolean,default: false},//是否在需要打开键盘时隐藏底部tabBar关闭键盘展示tabBar功能tabBar: {type: Boolean,default: false},value: {type: String,default: ''}},data() {return {bodMove: '',password: '', //要返回的结果iptNum: [], //输入的内容KeyboarHid: false, //键盘影藏和显示}},watch: {iptNum(newVal, oldVal) {this.$emit('input', newVal.join(''))},value(newVal, oldVal) {this.iptNum = newVal.split('')}},created() {},methods: {open() {this.KeyboarHid = true;if (this.tabBar) {uni.hideTabBar()}this.$nextTick(() => {setTimeout(() => {this.bodMove = 'moveShow'}, 30)})},close() {if (this.tabBar) {uni.showTabBar()}this.bodMove = '';this.$nextTick(() => {setTimeout(() => {this.KeyboarHid = false}, 300)})},// 密码框clickBoard(num) {if (num == '') return;let iptNum = this.iptNum.filter(item => item != '');//判断是否限制长度if (this.psdLength != '') {if (iptNum.length >= this.psdLength) {return};this.iptNum.push(num);} else {this.iptNum.push(num);}},//完成complete(){this.$emit('confirm', this.iptNum.join(''))},//重置 清空reset() {this.iptNum = [];},//删除deleteKeyboar() {this.iptNum.pop();}}}
</script><style scoped>.bodMove {transition: all .3s}.bottomMove {bottom: 0;left: 0;width: 100%;transform: translateY(100%)}.moveShow {transform: translateY(0)}.KeyboarBody {background-color: #FFFFFF;}.KeyboarBx {display: flex;flex-wrap: wrap;text-align: center;background-color: rgba(3, 3, 3, 0.1);padding: 10rpx 6rpx 0rpx 6rpx;margin-left: -12rpx;}.keyboar {width: 20%;flex-grow: 1;padding: 3%;font-size: 40rpx;background-color: #FFFFFF;border-radius: 10rpx;margin-left: 12rpx;margin-bottom: 10rpx;}.dian {margin-top: -10rpx;}.keyboarBtn {background: linear-gradient(45deg, rgba(242, 131, 9, 1) 0%, rgba(230, 36, 15, 1) 100%);color: #fff;}.hover {background: #ebedf0;}.bot {bottom: 0;}.empty {background-color: #EEEEEE;}.dowmImgBx {display: flex;justify-content: center;align-items: center;width: 100%;position: relative;}.complete {position: absolute;right: 0rpx;bottom: 5rpx;font-size: 28rpx;padding-right: 30rpx;padding-left: 20rpx;}.dowmImg {width: 35rpx;height: 35rpx;margin-bottom: 10rpx;background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACT0lEQVRYR+2UPWgTYRjH/8/dpdZCpVhU/BoEB8FBEBFt7tJe7i5CbAXhrg6CQ8HBQXAQHBzq5CA4CA4OgoNgr0GQIhQTUkJqCPEDBEEQBAdBQSoVlIakXvLIofmopMnlizjkxuN9nt/v/b/v+xB6/FGP+egL9BPoJ/D/JLC8/Hp33sl9AXDOCMqRbsyH6NLzGwLR7BapuDMQCKy4jHICi5nMNinrpAk4DOC8EZQfdVKiBGemxyHNb5V6bziCaDRxSPT5bAaOCAJd0Cb8DzshUYIT4cnqit+anqZCTQH357NE+qDIhXmAjoJpxtD8D9qRqOwcT538DyscDuer+9W8hNFo8oDok2wGHxcIFzVVvt+KRAkOYDG3NmhNTR3L/ttn01eQTL7cv+6sz4NwkhmXQpp8rxmJ8s6B2NAATFmWf9aqr/sMY7HUHsEHmxkKGJcNTb7rRaKyc1rKZ4vW5KTyfbO6hnMgHo/vYmHQBjBBxFd0VblTT6IC56REjqmq6rd66xsKuMXx+ItRFn/ZYOhMfDWkKrdrNa068xQVJVPXT3xtlJgnAbdJIpEYcViyATpFoGt60H+runkVPCOwYGra2OdG8A2DyMvihYXU8NAwzQF8moDrelC+6daV4YRXcNg0DOWTl35NC7gF6XR661qu6N6JMwzMMrPgjlcw3hCzqevKR6/wlgTcokjk3cDI6KpNRGf/wt6yWDBD4+MfmoG3LPBHIiJu37F3jsH7JAgzqjr2vll4WwKtwJoeRJ2CtD0HuinieQ50S6Iv0E+g5wn8Bo+vyyFXaYw2AAAAAElFTkSuQmCC');background-repeat: no-repeat;background-position: center center;background-size: 100%;}.keyboarDel {width: 50rpx;height: 36rpx;margin-bottom: 10rpx;background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABqUlEQVRYR+2WPUvEQBCGZze1/8DKUnsrEcVaLhvwCgULCy1sLGzFE8RKC0EsBLGwEBRuhmChlTb+hCu0vU4Ff4H3SkKCOS4fezHnNUkXQuZ58s7sbhSN+VJj5lMtUCdglYDrurNKqSMiWqpoaD+IaI6Z3woFjDErRHRJRBMVweMyz8y8mCsQwW8rBtsJjBgeSGQn8A/wbAFbOIBHpdQnEa2ltKijlHoBsJnTvsEEbOFR0SYz37mu21JK7SdAnV6v1wzutdYda4Eh4XHdDWa+Skgk4cHwzlgJlISHtQHsiMhpIAEgXDFa6yL47wx4njcJoPuXpQZgT0QOG43GtCW8fwiNMYFxsOGUucLYAXz7vv+aMhNZNfuHsKRECHcc5wvAAxFdM/OxpUTqKhgmifjLu47j3BPRfDQTWyJyYSGRvhHZJgHgQERanuf5AJaTOQNYFZEbY8wTES1k9CB3JxwmiTJzk78VB09tkyhLzz0L4qIjlig+jkechJ1AJHFGRNt/iHvgVQC7InJS+EeUaMc6gKkqJLTW7+12+zyoZS1QBTitRi1QJzD2BH4AtrHfITKVMwgAAAAASUVORK5CYII=');background-repeat: no-repeat;background-position: center center;background-size: 100%;margin-top: 11rpx;}.keyboarflex {display: flex;justify-content: center;align-items: center;}
</style>

editPayPassword.vue

<template><view class="editPayPassword"><view class="topApp"><image class="return" src="https://res.qyjpay.cn/static/res/jiangcunyinxiang-return.png" @click="leftClick"/><view class="title">{{!flag ? '身份认证' : '设置支付密码'}}</view></view><view class="content">{{!flag ? '输入支付密码' : '再次输入支付密码'}}</view><view class="item" @tap='KeyboarOpen' v-if="!flag"><password-input :numLng='password'></password-input></view><view class="item" @tap='KeyboarOpen2' v-else><password-input2 :numLng='changePassword'></password-input2></view><view class="errMsg" v-if="errMsg">{{errMsg}}</view><number-keyboard tabBar ref='KeyboarHid' @input='onInput' psdLength='6' v-if="!flag"></number-keyboard><number-keyboard2 tabBar ref='KeyboarHid' @input='onInput2' psdLength='6' v-else></number-keyboard2></view>
</template><script>
import numberKeyboard from '@/components/number-keyboard/number-keyboard.vue'
import numberKeyboard2 from '@/components/number-keyboard/number-keyboard.vue'
import passwordInput from '@/components/password-input/password-input.vue'
import passwordInput2 from '@/components/password-input/password-input.vue'
export default {data () {return {flag: false,password: "",changePassword: '',errMsg: '',      }},components: {numberKeyboard,numberKeyboard2,passwordInput,passwordInput2},watch:{errMsg(newVal,oldVal){if(newVal){setTimeout(()=>{this.errMsg = ''},2000)}}},onLoad(option) {console.log('接收到的数据',option);//因为此时实例没有挂载完成,需要延迟操作setTimeout(() => {this.$refs.KeyboarHid.open()}, 50)},methods:{leftClick(){uni.navigateBack({})},//打开键盘KeyboarOpen(e) {this.$refs.KeyboarHid.open();},KeyboarOpen2(e) {this.$refs.KeyboarHid.open();},//输入的值onInput(val) {this.password = val;if(this.password.length == 6){this.flag = truesetTimeout(()=>{this.KeyboarOpen2()},100)}},async onInput2(val){this.changePassword = val;if(this.changePassword.length == 6){console.log('第一次输入的密码是',this.password);console.log('第二次输入的密码是',this.changePassword);if(this.password != this.changePassword){this.errMsg = '两次输入密码不一致'}else{this.errMsg = ''try{//调接口处理}catch(err){// uni.showToast({//   title: err.msg,//   icon: 'none'// })this.errMsg = err.msgreturn}}}}}
}
</script><style lang='scss' scoped>
.editPayPassword{min-height: 100vh;background-color: #fff;.topApp{display: flex;align-items: center;// justify-content: flex-start;background-color: #fff;padding: 60rpx 0 30rpx 26rpx;// #ifdef APP-PLUSpadding: 110rpx 0 30rpx 26rpx;// #endifbox-sizing: border-box;width: 100%;.return{width: 36rpx;height: 36rpx;  margin-right: 20rpx;}.title{position: absolute;// top: 100rpx;left: 50%;transform: translate(-50%,0);font-weight: 500;font-size: 32rpx;color: #111111;}}.content{margin: 140rpx 0 40rpx 0;font-weight: 500;font-size: 46rpx;color: #111111;text-align: center;}.errMsg{font-weight: normal;font-size: 22rpx;color: #F72323;margin-top: 20rpx;text-align: center;}
}
.main {padding: 0rpx 40rpx;
}
.ipt {border-bottom: 1rpx solid #CCCCCC;
}
.item {padding: 10rpx 87rpx;
}
.title {margin: 30rpx 0;
}
</style>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/337947.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

详细介绍运算符重载函数,清晰明了

祝各位六一快乐~ 前言 1.为什么要进行运算符重载&#xff1f; C中预定义的运算符的操作对象只能是基本数据类型。但实际上&#xff0c;对于许多用户自定义类型&#xff08;例如类&#xff09;&#xff0c;也需要类似的运算操作。这时就必须在C中重新定义这些运算符&#xff…

Centos 7 安装刻录至硬件服务器

前言 在日常测试中&#xff0c;会遇到很多安装的场景&#xff0c;今天给大家讲一下centos 7 的安装&#xff0c;希望对大家有所帮助。 一.下载镜像 地址如下&#xff1a; centos官方镜像下载地址https://www.centos.org/download/ 按照需求依次点击下载 二.镜像刻录 镜像刻…

C++语言·list链表(下)

还是之前说的&#xff0c;因为要写模板&#xff0c;为了避免链接出现问题&#xff0c;我们将所有内容都写到一个文件中去。首先就是画出链表的框架 链表本身只需要一个头节点就足以找到整条链表&#xff0c;而需要它拼接的节点我们再写一个模板。而我们知道list是一个带头双向循…

微信小程序对接发货功能

注&#xff1a;微信小程序对接发货功能 文档地址&#xff1a;https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/order-shipping/order-shipping.html php代码 common.php use think\Config; use think\Db; use fast\Http; us…

OrangePi AIpro 变身 Android 打包机

主板基本信息介绍 OrangePi AIpro&#xff0c;是香橙派联合华为精心打造&#xff0c;建设人工智能新生态而设计的一款开发板&#xff0c;这次为大家分享下我上手的这款 OrangePi AIpro 8GB&#xff08;算力达8TOPS&#xff09; 的一些小小的经验。 基本参数如下&#xff1a; …

【Keil 5】Keil 5下载安装激活到2032年(含MDK、C51、STM32单片机)+附带百度网盘链接

这里写目录标题 安装包、激活文件下载1.双击mdk 514开始安装2.一路点next&#xff0c;信息随便写即可3.激活4.安装STM325.激活c51 安装包、激活文件下载 解压密码&#xff1a;lantongxue 链接&#xff1a;https://pan.baidu.com/s/15Aukt0j1HCFyHBE6whuDeg?pwdsjyh 提取码&…

FreeRtos进阶——中断的内部逻辑

中断与非中断API的区别 BaseType_t xQueueSendToBack(QueueHandle_t xQueue,const void *pvItemToQueue,TickType_t xTicksToWait); BaseType_t xQueueSendToBackFromISR(QueueHandle_t xQueue,const void *pvItemToQueue,BaseType_t *pxHigherPriorityTaskWok…

OceanBase 内存研究(OceanBase 3.2.4.5)

内存结构 从官网的结构图可以看出&#xff0c;一台observer可使用的总内存(memory_limit)包括 系统内存(system_memory) 和 租户内存(sys租户与普通租户) 系统内存 系统内存system_memory 属于 observer 的内部内存&#xff0c;允许其它租户共享使用该内存资源 (root10.0.0.…

丛林生存法则其实就两个字:输出

不管你是在上班&#xff0c;还是在灵活就业&#xff0c;现在的大环境下&#xff0c;你要想活下来&#xff0c;生存下去&#xff0c;一定要记住这两个字&#xff1a;输出。如果你能记住更多的字&#xff0c;那便是持续高水平的输出。 你如果是大厂程序员&#xff0c;你肯定发现…

window安装ffmpeg播放本地摄像头视频

1、安装ffmpeg ffmpeg官方网站&#xff1a;FFmpeg 下载后解压文件夹名为ffmpeg 2、设置环境变量 目录 1、安装ffmpeg 设置环境变量 以F:\software\after\ffmpeg\bin为例 在命令行中输入ffmpeg出现下方代表安装成功 3、通过ffmpeg播放本地电脑摄像头 鼠标右击开始按钮&…

快速排序详讲(两种方法)

目录 原理 实现方式 正常实现 理由 先从右到左&#xff0c;在从左到右 先从左到右&#xff0c;先从右到左 挖坑法 效率 优化 测试 代码 原理 快速排序是将最左侧的数字当作关键数字&#xff0c;将关键数字放在对应位置&#xff0c;且关键数字左侧均大于它&#xff…

Spring Boot 开发 -- 过滤器与拦截器详解

引言 在Web开发中&#xff0c;经常需要对请求进行预处理或在响应后进行后处理&#xff0c;Spring Boot提供了过滤器和拦截器两种机制来实现这一需求。虽然它们都可以用来处理HTTP请求和响应&#xff0c;但在使用场景、执行顺序和配置方式上存在明显的差异。本文将详细讲解Spri…

江苏大信环境科技有限公司:环保领域的开拓者与引领者

2009 年&#xff0c;江苏大信环境科技有限公司在宜兴环保科技工业园成立。自创立之始&#xff0c;该公司便笃定坚守“诚信为本、以质量求生存、以创新谋发展”这一经营理念&#xff0c;全力以赴为客户构建专业的工业有机废气治理整体解决方案&#xff0c;进而成为国家高新技术企…

安全风险 - 组件导出风险

在安全审查中关于组件导出风险是一种常见问题&#xff0c;不同组件都有可能遇到这种问题&#xff0c;而且从一定角度来看的话&#xff0c;如果涉及到三方业务&#xff0c;基本处于无法解决的场景&#xff0c;所以我们需要说明为何无法避免这种风险 组件导出风险能不能规避&…

海康 面阵相机命名规则

海康 面阵相机命名规则 https://www.v-club.com/vCollage/vCollageDetail/516?subjectIdRMse6nPiyo

能不能接受这些坑?买电车前一定要看

图片来源&#xff1a;汽车之家 文 | Auto芯球 作者 | 雷慢 刚有个朋友告诉我&#xff0c;买了电车后感觉被骗了&#xff0c; 很多“坑”都是他买车后才知道的。 不提前研究&#xff0c;不做功课&#xff0c;放着我这个老司机不请教&#xff0c; 这个大冤种他不当谁当&…

Linux系统编程——动静态库

目录 一&#xff0c;关于动静态库 1.1 什么是库&#xff1f; 1.2 认识动静态库 1.3 动静态库特征 二&#xff0c;静态库 2.1 制作静态库 2.2 使用静态库 三&#xff0c;动态库 3.1 制作动态库 3.2 使用动态库一些问题 3.3 正确使用动态库三种方法 3.3.1 方法一&…

ADC数模转换器

一、ADC&#xff08;Analog-Digital Converter&#xff09;模拟-数字转换器 1、ADC可以将引脚上连续变化的模拟电压转换为内存中存储的数字变量&#xff0c;建立模拟电路到数字电路的桥梁 2、12位逐次逼近型ADC&#xff0c;1us转换时间 3、输入电压范围&#xff1a;0~3.3V&a…

Oracle dblink 发现Network 等待事件的分析 enq: KO - fast object checkpoint

所有的sql 通过dblink 查询全部等待中&#xff0c; 同一个SQL 20多个session 在跑&#xff0c;等待事件network&#xff0c;可能怀疑是不是网络断开了&#xff0c;导致没有返回 执行sql 如下&#xff1a; BEGIN Xdblink ; END; 去到dblink 所在的db&#xff0c;发现20多个sql在…

远程继电器模块实现(nodemcu D1 + 继电器)

前言 接下来将实现一个远程继电器&#xff0c;实时远程控制和查询的开关状态。用 5v 直流电控制 220v 交流电。 硬件上&#xff1a; 使用 nodemcu D1 和 JQC-3FF-S-Z 继电器。 软件上&#xff1a; 使用 nodejs 作为服务端&#xff0c;和 html 作为客户端。 在开始之前在电脑…