198 lines
5.3 KiB
Plaintext
198 lines
5.3 KiB
Plaintext
<template>
|
|
<view style="display: flex; flex-direction: column; height: 100vh; ">
|
|
<view class="merchant-info">
|
|
<view class="">
|
|
<text class="section-title">付款给商户</text>
|
|
<text class="merchant-name">星巴克 · 北京国贸店</text>
|
|
</view>
|
|
<image :src="Service.GetMateUrlByImg('/static/dele/dele4.jpg')" mode="aspectFill" class="merchant-icon">
|
|
</image>
|
|
</view>
|
|
|
|
<view class=""
|
|
style=" padding: 30rpx 40rpx; flex: 1; background-color: #fff; width: 100%; border-top-right-radius: 30rpx; border-top-left-radius: 30rpx; ">
|
|
<view class="" style="font-size: 24rpx; font-weight: 600;">
|
|
余额
|
|
</view>
|
|
<view class="" style="margin: 20rpx 0;">
|
|
<up-input prefixIcon='rmb' :prefixIconStyle="{ 'color':'#000','font-weight': 600,'font-size':'60rpx' }"
|
|
fontSize='50rpx'
|
|
:auto-blur="false"
|
|
:customStyle="{'color':'#000', height: '90rpx', 'padding-left': 0, 'font-weight': 600,'padding-bottom':'20rpx' }"
|
|
border="bottom" v-model="account"></up-input>
|
|
</view>
|
|
<view class="" style="font-size: 24rpx; color: #6B6B6B; ">
|
|
<text>我的积分 1,250 积分</text>
|
|
<text style="margin-left: 10rpx;">可抵扣 ¥12.50</text>
|
|
</view>
|
|
<view class="" style="font-size: 28rpx; margin-top: 10rpx; ">
|
|
<text :style="{'margin-right':!des?'':'15rpx'}">{{des}}</text>
|
|
<text @click="showDes=true" style="font-weight: 600; color: #586B95;">添加备注</text>
|
|
</view>
|
|
<view class=""
|
|
style="background-color: #f5f5f5; padding: 20rpx; position: fixed; bottom: 0; left: 0; width: 100%; padding-top: 25rpx; padding-bottom: 20rpx; ">
|
|
<view class="" style="display: grid; grid-template-columns: repeat(4,1fr); ">
|
|
<view class="button" @click="input(item)" v-for="(item,index) in 3" :key="index">
|
|
{{item}}
|
|
</view>
|
|
<view @click="deleInput()" class="button">
|
|
<up-icon name="backspace" :bold='true' size="26"></up-icon>
|
|
</view>
|
|
</view>
|
|
<view class="" style="display: grid; grid-template-columns: 3fr 1fr; ">
|
|
<view class="">
|
|
<view class="" style="display: grid; grid-template-columns: repeat(3,1fr); ">
|
|
<view class="button" @click="input(item+3)" v-for="(item,index) in 3" :key="index">
|
|
{{item+3}}
|
|
</view>
|
|
</view>
|
|
<view class="" style="display: grid; grid-template-columns: repeat(3,1fr); ">
|
|
<view class="button" @click="input(item+6)" v-for="(item,index) in 3" :key="index">
|
|
{{item+6}}
|
|
</view>
|
|
</view>
|
|
<view class="" style="display: grid; grid-template-columns: 2fr 1fr; ">
|
|
<view @click="input(0)" class="button" >
|
|
0
|
|
</view>
|
|
<view @click="input('.')" class="button" >
|
|
.
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view @click="save()" class="button" style="background-color: var(--nav-mian); color: #fff; " >
|
|
付款
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<up-popup :show="showDes">
|
|
<view style="width: 100%; padding: 50rpx 30rpx; ">
|
|
<view class="">
|
|
<text style="font-size: 28rpx; font-weight: 600;">添加备注</text>
|
|
</view>
|
|
<view class=""
|
|
style=" margin-top: 30rpx; padding: 20rpx 0; border-bottom: 1rpx solid #e2e2e2; border-top: 1rpx solid #e2e2e2; ">
|
|
<up-input placeholder="请输入内容" border="none" v-model="des"></up-input>
|
|
</view>
|
|
|
|
<view class=""
|
|
style=" margin: 0 110rpx; margin-top: 50rpx; display: flex; align-items: center; justify-content: space-between; ">
|
|
<view class="" @click="showDes=false,des=''"
|
|
style=" background-color: #f2f2f2; color: #000; padding: 20rpx 80rpx;border-radius: 20rpx; display: flex; align-items: center; justify-content: center; ">
|
|
取消
|
|
</view>
|
|
<view class="" @click="showDes=false"
|
|
style=" background-color: #07c160; color: #fff; padding: 20rpx 80rpx;border-radius: 20rpx; display: flex; align-items: center; justify-content: center; ">
|
|
确定
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
</up-popup>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { onShow, onLoad } from "@dcloudio/uni-app";
|
|
import { Service } from "@/Service/Service"
|
|
import { ref } from "vue";
|
|
|
|
|
|
let account = ref('')
|
|
let showDes = ref(false)
|
|
let des = ref()
|
|
onLoad(() => {
|
|
|
|
});
|
|
|
|
onShow(() => {
|
|
|
|
});
|
|
|
|
|
|
const input=(val)=>{
|
|
if(val=='.'){
|
|
let arr=account.value.split('').filter((item=>item==val))
|
|
if(arr.length>0){
|
|
return
|
|
}
|
|
|
|
if(!account.value){
|
|
account.value='0.'
|
|
return
|
|
}
|
|
}
|
|
account.value=account.value+val
|
|
|
|
|
|
|
|
}
|
|
const deleInput=()=>{
|
|
let arr=account.value.split('')
|
|
arr.pop()
|
|
account.value=arr.join('')
|
|
}
|
|
|
|
const save=()=>{
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
page {
|
|
background-color: #f5f5f5;
|
|
}
|
|
|
|
// 按键
|
|
.button {
|
|
background-color: #fff;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 18rpx 0;
|
|
border-radius: 10rpx;
|
|
font-weight: 700;
|
|
margin: 8rpx;
|
|
font-size: 38rpx;
|
|
}
|
|
|
|
.button:active {
|
|
background-color: #ababab;
|
|
}
|
|
|
|
/* 商户信息 */
|
|
.merchant-info {
|
|
padding: 30rpx 40rpx;
|
|
margin-bottom: 20rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.merchant-name {
|
|
font-size: 24rpx;
|
|
color: #999999;
|
|
display: block;
|
|
margin-top: 20rpx;
|
|
}
|
|
|
|
.section-title {
|
|
font-size: 32rpx;
|
|
font-weight: 700;
|
|
}
|
|
|
|
|
|
.merchant-icon {
|
|
width: 95rpx;
|
|
height: 95rpx;
|
|
border-radius: 10rpx;
|
|
margin-right: 20rpx;
|
|
}
|
|
</style> |