bottom-popup.vue
5.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<template>
<view class="bottom-popup">
<u-popup :show="isShow" :round="16" mode="bottom">
<view class="content">
<view class="title">我的菜单栏</view>
<image class="close-icon" src="/static/images/close-icon.png" @click="closePopup"></image>
<view class="info-wrap">
<view class="left-info">
<image class="avatar-icon" :src="userinfo.avatar"></image>
<view class="">
<view class="nickname">{{userinfo.nickname}}</view>
<view class="userid">ID:{{userinfo.idcode}}</view>
</view>
</view>
<view class="right-info" v-if="userinfo.is_vip==0">
{{ userinfo.number==0?'您的体验次数已经用完啦,升级VIP获得全部功能使用权~':`拥有免费次数:${userinfo.number}次`}}
</view>
<view class="right-info vip-wrap" v-if="userinfo.is_vip==1">
<image class="vip-icon" src="/static/images/vip-icon.png" mode=""></image> 使用次数无限制哦~
</view>
</view>
<view class="invite-wrap">
<view class="invite-left">
<view class="">邀请新的朋友来体验</view>
<view class="times">邀请成功可获得 <text
style=" font-weight: 700; color: #dbc5b8;">{{projectConfig.share_num}}次</text> 次数奖励</view>
</view>
<view class="invite-right" @click="isShowPopup = true">邀请朋友 </view>
</view>
<template v-if="userinfo.is_vip==0">
<image src="/static/images/vip-bg.png" class="vip-bg" @click="toMember"></image>
</template>
<view class="clearall-wrap">
<view class="clear-all" @click="clearAll">清除聊天记录</view>
</view>
<!-- <image class="tips" src="/static/images/button.png" mode=""></image> -->
<view class="tips">浮窗使用,更加便捷</view>
</view>
</u-popup>
<custom-popup :isShowClose="true" :isShowPopup="isShowPopup" @closePopup="isShowPopup=false"
:posterImg="userinfo.share_qr" height="900rpx">
</custom-popup>
</view>
</template>
<script setup>
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import navigateToPages from '@/utils/navigateToPages.js'
import customPopup from '@/components/custom-popup/custom-popup.vue'
const emits = defineEmits(['closePopup', 'clearAll'])
const props = defineProps({
isShow: {
type: Boolean,
default: false
},
userinfo: {
type: Object,
default: () => ({})
},
projectConfig: {
type: Object,
default: () => ({})
}
})
const isShowPopup = ref(false)
function toMember() {
navigateToPages('/pages/member/member')
}
function closePopup() {
emits('closePopup')
}
function clearAll() {
emits('clearAll')
}
</script>
<style lang="scss">
.bottom-popup {
color: #fff;
}
.content {
position: relative;
width: 750rpx;
padding: 32rpx;
box-sizing: border-box;
height: 900rpx;
border-radius: 32rpx 32rpx 0 0;
background: #242228ff;
}
.title {
font-size: 32rpx;
font-weight: 700;
text-align: center;
}
.close-icon {
@include common-icon-wh(40rpx);
position: absolute;
top: 32rpx;
right: 32rpx;
}
.info-wrap {
@include flexCj();
margin-top: 60rpx;
.left-info {
@include flex();
.avatar-icon {
@include common-icon-wh(92rpx);
border-radius: 12rpx;
margin-right: 20rpx;
}
.userid {
margin-top: 4rpx;
color: #ffffff59;
}
}
.right-info {
@include flexCj(center);
min-width: 316rpx;
max-width: 400rpx;
text-align: center;
// width: 400rpx;
padding: 12rpx;
box-sizing: border-box;
border-radius: 12rpx;
color: #f9ddbeff;
background: #3a3539;
}
.vip-wrap {
@include flexcenter();
image {
@include common-icon-wh(36rpx);
margin-left: 12rpx;
}
}
}
.invite-wrap {
@include flexCj();
margin: 40rpx 0 60rpx 0;
.invite-left {
.times {
margin-top: 8rpx;
color: #838387;
font-size: 26rpx;
}
}
.invite-right {
width: 160rpx;
height: 56rpx;
line-height: 56rpx;
text-align: center;
color: #242228ff;
border-radius: 12rpx;
background: linear-gradient(90deg, #fce4c7ff 0%, #e0a879ff 100%);
}
}
.vip-bg {
width: 686rpx;
height: 89rpx;
}
.clearall-wrap {
@include flexCj(center);
}
.clear-all {
width: 216rpx;
height: 56rpx;
border-radius: 12rpx;
line-height: 56rpx;
color: #000 !important;
background: linear-gradient(90deg, #fce4c7ff 0%, #e0a879ff 100%);
text-align: center;
color: #ffffff8c;
margin-top: 60rpx;
}
.tips {
width: 686rpx;
height: 88rpx;
margin-top: 166rpx;
padding-bottom: 88rpx;
text-align: center;
color: #f2c995;
}
.qr-code {
width: 500rpx;
}
</style>