diff --git a/pagesOrder/settle/settle.vue b/pagesOrder/settle/settle.vue index cbd5c67..06613b9 100644 --- a/pagesOrder/settle/settle.vue +++ b/pagesOrder/settle/settle.vue @@ -93,11 +93,12 @@ - + 余额支付 - ( 可用¥{{userInfo.now_money}} ) + ( 可用¥{{userInfo.now_money}} + ) @@ -110,7 +111,8 @@ 采购款支付 - ( 可用¥{{userInfo.purchase_funds}} ) + ( 可用¥{{userInfo.purchase_funds}} + ) @@ -152,6 +154,7 @@ @change="changeShop" @search="searchShop" /> + @@ -181,11 +184,9 @@ import { createOrderApi } from "@/api/order.js"; + import ZyPasswordboard from '@/uni_modules/zy-passwordboard/components/zy-passwordboard/zy-passwordboard.vue'; const userInfo = useUserStore().userInfo; - - console.log(userInfo) - // 用户选择的门店信息 let STORE_INFO = uni.getStorageSync('STORE_INFO'); if (STORE_INFO) @@ -357,9 +358,32 @@ const pay_type = ref('7'); + + // 支付密码 + const passwordBoardVisible = ref(false); + const handleItemClick = () => { + passwordBoardVisible.value = true; + }; + const passwordBoardProps = { + title: '输入支付密码', + onComplete(value) { + console.log(value); + } + }; + + + const createOrder = () => { if (!pay_type.value) return uni.$u.toast('请选择支付方式'); let shareInfo = uni.getStorageSync('SHARE_INFO'); + + + if (pay_type.value == 3 || pay_type.value == 17) { + passwordBoardVisible.value = true + return + } + + createOrderApi({ spread_uid: (shareInfo && shareInfo.uid) ? shareInfo.uid : '', cart_id: cartStore.cartList, diff --git a/uni_modules/zy-passwordboard/changelog.md b/uni_modules/zy-passwordboard/changelog.md new file mode 100644 index 0000000..8b3259c --- /dev/null +++ b/uni_modules/zy-passwordboard/changelog.md @@ -0,0 +1,4 @@ +## 2022.0513.0001(2022-05-13) +小程序样式不支持 *,调整样式配置 +## 2022.0513.0000(2022-05-13) +初建 diff --git a/uni_modules/zy-passwordboard/components/zy-passwordboard/zy-passwordboard.vue b/uni_modules/zy-passwordboard/components/zy-passwordboard/zy-passwordboard.vue new file mode 100644 index 0000000..b9e3317 --- /dev/null +++ b/uni_modules/zy-passwordboard/components/zy-passwordboard/zy-passwordboard.vue @@ -0,0 +1,179 @@ + + + + + \ No newline at end of file diff --git a/uni_modules/zy-passwordboard/package.json b/uni_modules/zy-passwordboard/package.json new file mode 100644 index 0000000..43c7c07 --- /dev/null +++ b/uni_modules/zy-passwordboard/package.json @@ -0,0 +1,89 @@ +{ + "id": "zy-passwordboard", + "displayName": "zy-passwordboard", + "version": "2022.0513.0001", + "description": "密码弹框", + "keywords": [ + "zy-passwordboard", + "密码弹框", + "支付密码" + ], + "repository": "", + "engines": { + "HBuilderX": "^3.1.0" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "插件不采集任何数据", + "permissions": "无" + }, + "npmurl": "" + }, + "uni_modules": { + "dependencies": [ + "uni-transition" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "Vue": { + "vue2": "u", + "vue3": "y" + }, + "App": { + "app-vue": "u", + "app-nvue": "u" + }, + "H5-mobile": { + "Safari": "u", + "Android Browser": "u", + "微信浏览器(Android)": "u", + "QQ浏览器(Android)": "u" + }, + "H5-pc": { + "Chrome": "y", + "IE": "u", + "Edge": "u", + "Firefox": "u", + "Safari": "u" + }, + "小程序": { + "微信": "y", + "阿里": "u", + "百度": "u", + "字节跳动": "u", + "QQ": "u", + "钉钉": "u", + "快手": "u", + "飞书": "u", + "京东": "u", + "小红书": "u" + }, + "快应用": { + "华为": "u", + "联盟": "u" + } + } + } + } +} diff --git a/uni_modules/zy-passwordboard/readme.md b/uni_modules/zy-passwordboard/readme.md new file mode 100644 index 0000000..fd9b299 --- /dev/null +++ b/uni_modules/zy-passwordboard/readme.md @@ -0,0 +1,45 @@ +# zy-passwordboard +密码弹框 + +## 兼容说明 +仅基于H5进行了开发,未进行全面测试,后续用到再补 + +## 属性 +|属性名 |类型 |说明 | 默认值 | +|:-- |:-- |:-- |:-- | +|visible|Boolean|是否显示(支持 v-model:visible) | `false` | +|random |Boolean|是否随机排位 | `true` | +|num |Number |密码位数,过多显示会有问题 | `6` | +|title |String |显示标题 | -- | + +## 事件 +|事件名 |说明 | +|:-- |:-- | +| complete | 输入完毕 | +| colse | 关闭 | + +## 样式说明 +未使用 `scoped`, 通过顶层样式名`.zy-passwordboard`就可以进行调整。 + +## 使用案例 + +``` vue + + +```