This commit is contained in:
zmj 2024-06-20 18:45:16 +08:00
parent 6bfc0b0d48
commit 4220fd42ad
7 changed files with 15 additions and 126 deletions

View File

@ -1,5 +1,5 @@
<template>
<up-popup ref="popup" type="bottom" :mask-background-color="isPay?'rgba(0,0,0,.8)':'transparent'" safeArea
<!-- <up-popup ref="popup" type="bottom" :mask-background-color="isPay?'rgba(0,0,0,.8)':'transparent'" safeArea
backgroundColor="transparent" :animation="true" @maskClick="maskClick">
<view class="popup-wrap" :style="{'border-radius':isPay?'': 0}">
<view class="paybox" v-if="isPay">
@ -39,117 +39,14 @@
</view>
</view>
</view>
</up-popup>
</up-popup> -->
<view class="">
sds
</view>
</template>
<script>
export default {
name: "popups",
props: {
txt: {
type: String,
default: '付款'
},
isPay: { //
type: Boolean,
default: false
},
title: {
type: String,
default: '请输入支付密码'
}
},
data() {
return {
keys: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, '.', 'del'],
value: '',
}
},
watch: {
value(newVal, oldVal) {
//
if (newVal.length == 6 && this.isPay) {
this.handlePay();
}
}
},
methods: {
//
handleClick(item) {
if (this.value.length >= 10) return;
if (item == ".") {
if (!this.value) {
this.value = '0.';
} else {
if (this.value.indexOf('.') > -1) return;
this.value = this.value + item;
}
} else if (item == 'del') {
if (this.value == "0.")
this.value = this.value.substring(0, 0);
else {
this.value = this.value.substring(0, this.value.length - 1);
}
} else if (item == 0) {
if (this.isPay) {
this.value = this.value + item;
} else {
if (this.value) {
if (this.value.lastIndexOf('.') != -1 && this.value.length - this.value.lastIndexOf('.') == 3)
return;
this.value = this.value + item;
} else {
this.value = this.value + item;
}
}
} else {
if (this.value.lastIndexOf('.') != -1 && this.value.length - this.value.lastIndexOf('.') == 3) return;
this.value = this.value + item;
}
this.$emit('change', this.value);
},
//
handleClear() {
this.value = '';
this.$emit('clear');
},
//
handlePay() {
// .
if (this.value && this.value.endsWith('.')) {
this.value = this.value.replace('.', '');
}
this.$emit('confirm', this.value);
this.handleClose();
},
//
handleOpen(type) {
if (!type) this.value = "";
this.$refs.popup.open();
},
//
handleClose() {
this.$refs.popup.close();
},
maskClick() {
// .
if (this.value && this.value.endsWith('.')) {
this.value = this.value.replace('.', '');
}
this.$emit('change', this.value);
}
}
}
</script>
<script setup></script>
<style lang="scss" scoped>
.popup-wrap {

View File

@ -1,8 +1,8 @@
let BASE_URL
import store from "@/store/user.js"
// 环境
let env = "dev"
// let env = "prod"
// let env = "dev"
let env = "prod"
// let env = "liu";
switch (env) {

View File

@ -161,13 +161,6 @@
"navigationBarTitleText": "确认订单",
"enablePullDownRefresh": false
}
},
{
"path": "setPayPassword/index",
"style": {
"navigationBarTitleText": "设置密码",
"enablePullDownRefresh": false
}
}
]
},

View File

@ -223,8 +223,8 @@
import useUserStore from "@/store/user";
const userStore = useUserStore();
const STORE_INFO = reactive({
id: 23,
store_name: ""
id: 4,
store_name: "农(特)产品直营店"
})
const getStoreInfoFn = () => {
@ -342,7 +342,7 @@
const where = ref({
page_no: 1,
page_size: 10,
page_size: 15,
name: '',
order: '',
store_name: '',

View File

@ -16,10 +16,10 @@
<up-button @click="weixinLogin" color="#20B128" size="large"><up-icon name="weixin-fill"
color="#fff" size="28"></up-icon></up-button>
</view>
<view class="btn">
<!-- <view class="btn">
<up-button @click="navgo('/pages/login/test')" color="#20B128" size="large"><up-icon
name="weixin-fill" color="#fff" size="28"></up-icon></up-button>
</view>
</view> -->
<!-- <view class="btn">
<up-button @click="officialCode" color="#20B128" size="large"><up-icon name="weixin-fill" color="#fff"
size="28"></up-icon></up-button>

View File

@ -108,7 +108,7 @@
<view class="card">
<up-cell-group>
<up-cell title="我的地址" :isLink="true" url="/pagesOrder/addressList/addressList"></up-cell>
<up-cell title="支付密码" :isLink="true" url="/pagesOrder/setPayPassword/index"></up-cell>
<!-- <up-cell title="支付密码" :isLink="true" url="/pagesOrder/setPayPassword/index"></up-cell> -->
</up-cell-group>
</view>

View File

@ -23,7 +23,6 @@
</template>
<script setup>
import pwdKeyBord from '@/components/pwdKeyBord.vue'
import {
ref
} from "vue"