123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- <template>
- <view class="container flex-center">
- <view class="popup flex-center">
- <image :src="`${assetsUrl}popup-close.png`" mode="aspectFill" class="close" @click="close"></image>
- <image :src="`${assetsUrl}popup-auth.png`" mode="aspectFit" class="popop-img"></image>
- <view class="content font28 fw400" v-if="content1">
- {{content1}}
- </view>
- <view class="content font28 fw400" v-if="content2">
- {{content2}}
- </view>
- <view class="tip" v-if="tip1">
- {{tip1}}
- </view>
- <view class="tip" v-if="tip2">
- {{tip2}}
- </view>
- <view class="btn font28 fw600" @click="emitEvent">
- {{btntext}}
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name:"Popup",
- props:{
- content1:{
- type:String,
- default:''
- },
- content2:{
- type:String,
- default:''
- },
- tip1:{
- type:String,
- default:''
- },
- tip2:{
- type:String,
- default:''
- },
- btntext:{
- type:String,
- default:''
- },
- btnEvent:{
- type:String,
- default:''
- }
- },
- data() {
- return {
- assetsUrl: this.$util.assetsUrl,
- };
- },
- methods:{
- close(){
- this.$emit('closePopup');
- },
- emitEvent(){
- this.$emit(this.btnEvent);
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .container{
- flex-direction: column;
- .popup{
- width: 590rpx;
- height: 668rpx;
- background-color: #171325;
- position: relative;
- flex-direction: column;
- border-radius: 40rpx;
- .close{
- position: absolute;
- right: 20rpx;
- top: 20rpx;
- width: 32rpx;
- height: 32rpx;
- }
- .popop-img{
- width: 436rpx;
- height: 312rpx;
- }
- .content{
- margin-bottom: 16rpx;
- color: #ffffff;
- }
- .btn{
- width: 470rpx;
- height: 84rpx;
- background: #6C52F4;
- border-radius: 42rpx;
- line-height: 84rpx;
- text-align: center;
- color: #ffffff;
- margin-top: 68rpx;
- }
- }
- }
- </style>
|