支付密码界面更新
This commit is contained in:
@@ -178,7 +178,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
<style lang="scss" scoped>
|
||||
.cell_b {
|
||||
border-right: 1px solid #DBDBDB;
|
||||
border-bottom: 1px solid #DBDBDB;
|
||||
|
||||
224
components/payPasswordtwo.vue
Normal file
224
components/payPasswordtwo.vue
Normal file
@@ -0,0 +1,224 @@
|
||||
<template>
|
||||
|
||||
<!-- ref:唯一ref passwrdType:密码样式pay keyInfo:密码输入返回事件 -->
|
||||
<u-popup :show="payPasswordShow" :round="20" mode="bottom" @close="payPasswordShow = false" height="500" :safeAreaInsetBottom="false">
|
||||
<view class="pay-info-wrap">
|
||||
<view class="info-wrap flex-between">
|
||||
<view class="close" @click="showShopInfo = false">
|
||||
<u-icon name="close" color="#999999" size="28"></u-icon>
|
||||
</view>
|
||||
<text class="title">请输入支付密码</text>
|
||||
<view></view>
|
||||
</view>
|
||||
<view class="info-content">
|
||||
<view style="margin-bottom: 128rpx;">
|
||||
<view class="pay-title">
|
||||
<text style="margin-top: 4rpx;">¥ </text>
|
||||
<text>123</text>
|
||||
</view>
|
||||
<view class="pay-password" @click="onPayUp">
|
||||
<view class="list">
|
||||
<text v-show="passwordArr.length >= 1">●</text>
|
||||
</view>
|
||||
<view class="list">
|
||||
<text v-show="passwordArr.length >= 2">●</text>
|
||||
</view>
|
||||
<view class="list">
|
||||
<text v-show="passwordArr.length >= 3">●</text>
|
||||
</view>
|
||||
<view class="list">
|
||||
<text v-show="passwordArr.length >= 4">●</text>
|
||||
</view>
|
||||
<view class="list">
|
||||
<text v-show="passwordArr.length >= 5">●</text>
|
||||
</view>
|
||||
<view class="list">
|
||||
<text v-show="passwordArr.length >= 6">●</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="hint" @click="gopaypassword">
|
||||
<text>忘记支付密码?</text>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- ref:唯一ref passwrdType:密码样式pay keyInfo:密码输入返回事件 -->
|
||||
<cc-defineKeyboard ref="CodeKeyboard" passwrdType="pay" @KeyInfo="KeyInfo"></cc-defineKeyboard>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</u-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
listinfo: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
components: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// AffirmStatus: 1,
|
||||
payPasswordShow: true,
|
||||
passwordArr: [],
|
||||
oldPasswordArr: [],
|
||||
newPasswordArr: [],
|
||||
afPasswordArr: [],
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 忘记支付密码
|
||||
gopaypassword() {
|
||||
uni.pro.navigateTo('/pages/user/repairpassword')
|
||||
},
|
||||
/**
|
||||
* 唤起键盘
|
||||
*/
|
||||
onPayUp() {
|
||||
this.$refs.CodeKeyboard.show();
|
||||
},
|
||||
/**
|
||||
* 支付键盘回调
|
||||
* @param {Object} val
|
||||
*/
|
||||
KeyInfo(val) {
|
||||
|
||||
if (val.index >= 6) {
|
||||
return;
|
||||
}
|
||||
// 判断是否输入的是删除键
|
||||
if (val.keyCode === 8) {
|
||||
// 删除最后一位
|
||||
this.passwordArr.splice(val.index + 1, 1)
|
||||
}
|
||||
// 判断是否输入的是.
|
||||
else if (val.keyCode == 190) {
|
||||
// 输入.无效
|
||||
} else {
|
||||
this.passwordArr.push(val.key);
|
||||
}
|
||||
|
||||
// uni.showModal({
|
||||
// title: '温馨提示',
|
||||
// content: '输入密码是 = ' + JSON.stringify(this.passwordArr)
|
||||
// })
|
||||
|
||||
// 判断是否等于6
|
||||
if (this.passwordArr.length === 6) {
|
||||
// this.AffirmStatus = this.AffirmStatus + 1;
|
||||
let str = ''
|
||||
this.passwordArr.forEach(res => {
|
||||
str += res
|
||||
})
|
||||
this.$emit('accountPayevent', str)
|
||||
this.passwordArr = [];
|
||||
}
|
||||
// 判断到哪一步了
|
||||
// if (this.AffirmStatus === 1) {
|
||||
// this.oldPasswordArr = this.passwordArr;
|
||||
// } else if (this.AffirmStatus === 2) {
|
||||
// this.newPasswordArr = this.passwordArr;
|
||||
// } else if (this.AffirmStatus === 3) {
|
||||
// this.afPasswordArr = this.passwordArr;
|
||||
// } else if (this.AffirmStatus === 4) {
|
||||
// console.log(this.oldPasswordArr.join(''));
|
||||
// console.log(this.newPasswordArr.join(''));
|
||||
// console.log(this.afPasswordArr.join(''));
|
||||
// uni.showToast({
|
||||
// title: '修改成功',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// setTimeout(() => {
|
||||
// uni.navigateBack();
|
||||
// }, 2000)
|
||||
// }
|
||||
this.$forceUpdate();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page-total{
|
||||
position: inherit;
|
||||
}
|
||||
/deep/ .page-total{
|
||||
position: inherit;
|
||||
}
|
||||
.pay-info-wrap{
|
||||
|
||||
.info-wrap{
|
||||
padding: 64rpx 30rpx 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
.title{
|
||||
align-self: center;
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.info-content{
|
||||
.pay-title {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
font-size: 48rpx;
|
||||
color: #333;
|
||||
margin-top: 48rpx;
|
||||
text {
|
||||
font-size: 60rpx;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.pay-password {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 64rpx;
|
||||
|
||||
.list {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 2rpx solid #999;
|
||||
border-radius: 8rpx;
|
||||
text {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.hint {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -58,8 +58,7 @@
|
||||
let tableCode = this.getQueryString(decodeURIComponent(res.result), 'code')
|
||||
uni.cache.set('tableCode', tableCode)
|
||||
if (tableCode) {
|
||||
// uni.pro.navigateTo('order_food/order_food')
|
||||
uni.pro.navigateTo('order_food/goodsList_scroll')
|
||||
uni.pro.navigateTo('order_food/order_food')
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -125,17 +125,20 @@
|
||||
</view>
|
||||
|
||||
<!-- 支付密码 -->
|
||||
<payPassword ref="payPwd" @accountPayevent="accountPayevent" v-if="ispws"></payPassword>
|
||||
<payPasswordtwo ref="payPwd" :listinfo="listinfo" @accountPayevent="accountPayevent" v-if="ispws"></payPasswordtwo>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import navseat from '@/components/navseat.vue'
|
||||
import webSocketUtils from '@/common/js/websocket.js'
|
||||
import payPassword from '@/components/payPassword.vue'
|
||||
import payPasswordtwo from '@/components/payPasswordtwo.vue'
|
||||
// import cwxKeyboard from '@/components/cwx-keyboard/cwx-keyboard.vue'
|
||||
|
||||
|
||||
export default {
|
||||
components: {
|
||||
payPassword,
|
||||
payPasswordtwo,
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
@@ -149,13 +152,6 @@
|
||||
{ title: "送餐到桌", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/tab1.png" , url_active: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/tab1_active.png"},
|
||||
{ title: "打包外带", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/tab2.png" , url_active: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/tab2_active.png"},
|
||||
],
|
||||
orderList: [
|
||||
{ name: "美式咖啡", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/img.png", type: "热+浓郁型+2份浓郁型浓缩", num: 1, Price: 33,},
|
||||
{ name: "美式咖啡", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/img.png", type: "热+浓郁型+2份浓郁型浓缩", num: 1, Price: 33,},
|
||||
{ name: "美式咖啡", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/img.png", type: "热+浓郁型+2份浓郁型浓缩", num: 1, Price: 33,},
|
||||
{ name: "美式咖啡", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/img.png", type: "热+浓郁型+2份浓郁型浓缩", num: 1, Price: 33,},
|
||||
{ name: "美式咖啡", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/img.png", type: "热+浓郁型+2份浓郁型浓缩", num: 1, Price: 33,},
|
||||
],
|
||||
favorable: [
|
||||
{ name: "优惠券", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/coupon.png"},
|
||||
{ name: "团购优惠", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/groupOffer.png"},
|
||||
@@ -167,6 +163,7 @@
|
||||
order: {
|
||||
phone: "",
|
||||
},
|
||||
passwordArr: [],
|
||||
cartLists: [],
|
||||
listinfo: {
|
||||
details: [],
|
||||
@@ -253,10 +250,8 @@
|
||||
}, 1000)
|
||||
break;
|
||||
case 'addcart':
|
||||
/*插入一条弹幕*/
|
||||
// this.$refs.lBarrage.add(
|
||||
// `${msg.reqData.nickName?msg.reqData.nickName:'微信用户'}${msg.reqData.num==-1?'取消了':'添加了'}${msg.reqData.name}(${msg.reqData.num})`
|
||||
// );
|
||||
this.listinfo.details = msg.data;
|
||||
this.listinfo.payAmount = msg.amount;
|
||||
break;
|
||||
}
|
||||
this.$set(this, 'cartLists', msg)
|
||||
@@ -466,6 +461,7 @@
|
||||
*/
|
||||
async accountPayevent(pwd) {
|
||||
this.ispws = false
|
||||
console.log(pwd)
|
||||
let res = await this.api.accountPay({
|
||||
orderId: this.listinfoid,
|
||||
memberId: this.amountVIP.id,
|
||||
@@ -954,4 +950,73 @@
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.page-total{
|
||||
position: inherit;
|
||||
}
|
||||
.pay-info-wrap{
|
||||
padding: 0 30rpx 50rpx;
|
||||
box-sizing: border-box;
|
||||
.info-wrap{
|
||||
padding: 30rpx 0;
|
||||
box-sizing: border-box;
|
||||
.title{
|
||||
align-self: center;
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.info-content{
|
||||
.pay-title {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
font-size: 48rpx;
|
||||
color: #333;
|
||||
margin-top: 48rpx;
|
||||
text {
|
||||
font-size: 60rpx;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.pay-password {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 64rpx;
|
||||
|
||||
.list {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 2rpx solid #999;
|
||||
border-radius: 8rpx;
|
||||
text {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.hint {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1404
pages/order_food/order_food-s.vue
Normal file
1404
pages/order_food/order_food-s.vue
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user