Files
frontend-app/pages/rwa_package/account/components/select-item.vue
T

193 lines
4.5 KiB
Vue
Raw Normal View History

2025-10-10 13:41:42 +08:00
<template>
<u-popup :show="itemShow" mode="bottom" bgColor="transparent">
<view class="select-item">
<view class="select-head">
<view></view>
<text class="text-28 text-fu1">选择{{type == 0 ? '微信' : '支付宝'}}账户</text>
<u-icon name="close" color="#333" size="16" @click="onClose"></u-icon>
</view>
2025-10-18 15:46:32 +08:00
<view class="item-mid-view" v-if="data.length">
2025-10-10 13:41:42 +08:00
<view class="item-mid-list" v-for="(item,index) in data" :key="item.id">
2025-11-19 00:03:45 +08:00
<image :src="type == 1 ? 'https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/zfb.png' : 'https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/wx.png'" ></image>
2025-10-10 13:41:42 +08:00
<view class="show-item-left">
<text class="text-32 text-zu1">{{item.name}}</text>
<text class="text-26 text-fu1">账号:{{item.account}}</text>
</view>
<u-radio-group v-model="itemSelect" style="position: absolute;right:28rpx">
<u-radio :name="item.id" activeColor="#7934F6"></u-radio>
</u-radio-group>
</view>
</view>
2025-10-18 15:46:32 +08:00
<view class="item-mid-view-two" @click="onAdd" v-if="!data.length">
2025-11-19 00:03:45 +08:00
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/no_black_data.png" class="no-data-black"></image>
2025-10-18 15:46:32 +08:00
<text class="text-28 text-fu mt-48">{{`请先绑定一个${type == 0 ? '微信' : '支付宝'}账户,用于收款`}}</text>
<view class="add-btn mt-48">
2025-11-19 00:03:45 +08:00
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/add.png" style="margin-right:5rpx;"></image>
2025-10-18 15:46:32 +08:00
<text class="text-32 text-zi text-bold" style="margin-left:5rpx;">添加</text>
</view>
</view>
<view class="item-bottom-btn" v-if="data.length">
2025-10-10 13:41:42 +08:00
<MyBtn @ok="onOk" text="确定"></MyBtn>
</view>
</view>
</u-popup>
</template>
<script>
import MyBtn from '@/components/common/my-btn.vue'
export default {
data() {
return {
itemSelect:''
}
},
components: { MyBtn },
computed:{
data(){
let tmp = [];
if(this.itemData.length){
this.itemSelect = this.itemData[0].id;
tmp = this.itemData;
console.log('tmp',tmp)
}
return tmp;
}
},
props:{
itemShow:{
type:Boolean,
default:false
},
itemData:{
type:[Array,Object],
default:()=>{}
},
type:{
type:[Number,String],
default:'0'
}
},
mounted(){
},
methods: {
onOk(){
console.log('this',this.itemSelect);
this.$emit('ok',this.itemSelect);
},
2025-10-18 15:46:32 +08:00
onAdd(){
this.$emit('add');
},
2025-10-10 13:41:42 +08:00
onClose(){
this.$emit('close');
}
}
}
</script>
<style scoped lang="scss">
.select-item{
width:100%;
min-height:942rpx;
display: flex;
flex-direction: column;
align-items: center;
padding: 0 32rpx 24rpx;
box-sizing: border-box;
background-color: #fff;
border-radius: 24rpx 24rpx 0 0;
.item-bottom-btn{
width:100%;
margin-top:24rpx;
min-height:88rpx;
display: flex;
}
2025-10-18 15:46:32 +08:00
.item-mid-view-two{
width:100%;
height:742rpx;
min-height:742rpx;
display: flex;
flex-direction: column;
align-items: center;
.no-data-black{
width:120rpx;
height:120rpx;
margin-top:120rpx;
}
.add-btn{
width:248rpx;
height:72rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
border:2rpx solid #7934f6;
border-radius: 12rpx;
image{
width:32rpx;
height:32rpx;
}
}
}
2025-10-10 13:41:42 +08:00
.item-mid-view{
width:100%;
height:742rpx;
min-height:742rpx;
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
.item-mid-list{
display: flex;
flex-direction: row;
align-items: center;
width:98%;
height:152rpx;
min-height:152rpx;
border-radius: 16rpx;
margin-top:24rpx;
background: #FFFFFF;
box-shadow: 0px 0px 16rpx 0px #F4F4F4;
border-radius: 16px;
border: 1px solid #E3E3E3;
padding: 0 24rpx;
box-sizing: border-box;
position: relative;
.show-item-left{
display: flex;
flex-direction: column;
height:88rpx;
min-height:88rpx;
margin-left:24rpx;
}
.item-right-btn{
display: flex;
align-items: center;
justify-content: center;
background-color: #f3f3f3;
border-radius: 24rpx;
position: absolute;
right:28rpx;
}
image{
width:88rpx;
height:88rpx;
border-radius: 44rpx;
}
}
}
.select-head{
width:100%;
height:88rpx;
min-height:88rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
}
</style>