diff --git a/apis/interfaces/pay.js b/apis/interfaces/pay.js index a8c4afa..1c36234 100644 --- a/apis/interfaces/pay.js +++ b/apis/interfaces/pay.js @@ -24,11 +24,21 @@ const alPAY = (orderNo) => { } }) } -const dtPAY = (orderNo) => { + +const payIndex =()=>{ + return request({ + url: 'mall/pay/index' + }) +} + + +const dtPAY = (orderNo,password) => { return request({ url: 'mall/pay/' + orderNo + '/account', + method:'post', data: { - type: 'app' + type: 'app', + transfer_password:password } }) } @@ -37,5 +47,6 @@ const dtPAY = (orderNo) => { export { wxPAY, alPAY, - dtPAY + dtPAY, + payIndex, } diff --git a/components/mi-payKeyboard/mi-payKeyboard.vue b/components/mi-payKeyboard/mi-payKeyboard.vue new file mode 100644 index 0000000..1fa1bb3 --- /dev/null +++ b/components/mi-payKeyboard/mi-payKeyboard.vue @@ -0,0 +1,307 @@ + + + + + diff --git a/components/readme.md b/components/readme.md new file mode 100644 index 0000000..0b8a335 --- /dev/null +++ b/components/readme.md @@ -0,0 +1,75 @@ +# 使用方法 +``` + + + +``` +``` +export default { + methods: { + // 监听输入框内容变化 + change({password}){ + console.log(password) + }, + // 清空输入框内容,一般用于密码输错手动清空 + clear(){ + this.$refs.xPayPwd._clearKey(); + } + } +} +``` +# 属性 +| 字段 | 类型 | 默认 | 描述 | +| --------- | ------- | -------------- | ---------------------------------------- | +| type | Number | 1 | 0原生键盘 1自定义键盘 | +| maskClick | Boolean | true | 是否允许点击蒙版 | +| top | String | 20vh | 中间内容的top值,为absolute的top值 | +| bottom | String | 0rpx | 中间内容的bottom值,为absolute的bottom值 | +| showClose | Boolean | true | 是否显示关闭按钮 | +| showHead | Boolean | true | 是否显示标题 | +| headText | String | 请输入支付密码 | 标题文本 | +# 事件 + +| 事件名 | 默认参数 | 描述 | +| ------ | ---------- | -------------------------------- | +| change | {password} | 监听内容输入,参数返回输入的内容 | + +# 组件方法 +| 方法名 | 描述 | +| ------ | -------------------------------- | +| _open | 打开弹窗 | +| _close | 关闭弹窗 | +| _clearnKey | 请空输入内容 | + +# 注意 + +``` +ios下输入框不会自动获取焦点,需要手动点击输入区域 +``` + +# 参与贡献 ++ xueshuai(xueshuai_12@163.com) ++ Email:xueshuai_12@163.com ++ GitHub:GitHub地址 ++ QQ交流群:1063233592 ++ 个人博客:(薛小帅)[http://blog.xueshuai.top] ++ 个人公众号:叮当Ding + +![叮当Ding](https://img-blog.csdnimg.cn/20210202143040150.png) + + + + + diff --git a/components/x-pay-pwd/x-pay-pwd.vue b/components/x-pay-pwd/x-pay-pwd.vue new file mode 100644 index 0000000..3a99435 --- /dev/null +++ b/components/x-pay-pwd/x-pay-pwd.vue @@ -0,0 +1,157 @@ + + + + + diff --git a/package.json b/package.json index 4bb3c73..54be6be 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,13 @@ -{ - "name": "dtx_store", - "version": "1.0.0", - "description": "共力生态", - "main": "main.js", - "dependencies": { - "moment": "^2.29.1", - "uni-read-pages": "^1.0.5", - "uni-simple-router": "^2.0.7", - "uview-ui": "^2.0.27" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "https://git.yuzhankeji.cn/TmOct5/ZhHealth.git" - }, - "author": "唐明明", - "license": "ISC" -} +{ + "id": "mi-payKeyboard", + "name": "支付密码输入安全模拟键盘", + "version": "1.1.0", + "description": "支付密码输入模拟键盘,代码简单,拿来即用。可以作为一个弹出层在任何需要输入密码的页面进行使用。", + "keywords": [ + "支付", + "密码输入", + "模拟键盘", + "6位数字密码", + "安全键盘" + ] +} \ No newline at end of file diff --git a/pages/pay/pay.vue b/pages/pay/pay.vue index 0653bb7..cb842eb 100644 --- a/pages/pay/pay.vue +++ b/pages/pay/pay.vue @@ -2,39 +2,49 @@ + -