|
|
@@ -61,25 +61,10 @@ const userInfo = computed(() => user.info.value?.userInfo)
|
|
|
const visible = ref(false)
|
|
|
const visible2 = ref(false)
|
|
|
const visible3 = ref(false)
|
|
|
+const visible4 = ref(false)
|
|
|
onMounted(async () => {
|
|
|
if (!userInfo.value.wxOpenId) {
|
|
|
- ui.showConfirm({
|
|
|
- title: "提示",
|
|
|
- message: "您当前未绑定微信,是否绑定微信?",
|
|
|
- confirmText: "绑定",
|
|
|
- cancelText: "取消",
|
|
|
- callback: async (action) => {
|
|
|
- if (action === "confirm") {
|
|
|
- await handleBind()
|
|
|
- }
|
|
|
- else {
|
|
|
- userInfo.value.wxOpenId = true
|
|
|
- }
|
|
|
- if (userInfo.value.memberLevel === 'default') {
|
|
|
- visible3.value = true
|
|
|
- }
|
|
|
- },
|
|
|
- });
|
|
|
+ visible4.value = true
|
|
|
return
|
|
|
} else if (userInfo.value.memberLevel === 'default') {
|
|
|
visible3.value = true
|
|
|
@@ -87,6 +72,20 @@ onMounted(async () => {
|
|
|
}
|
|
|
|
|
|
})
|
|
|
+async function handleClosePopup1() {
|
|
|
+ await handleBind()
|
|
|
+ visible4.value = false
|
|
|
+ if (userInfo.value.memberLevel === 'default') {
|
|
|
+ visible3.value = true
|
|
|
+ }
|
|
|
+}
|
|
|
+function handleClosePopup2() {
|
|
|
+ visible4.value = false
|
|
|
+ userInfo.value.wxOpenId = true
|
|
|
+ if (userInfo.value.memberLevel === 'default') {
|
|
|
+ visible3.value = true
|
|
|
+ }
|
|
|
+}
|
|
|
function copyUrl() {
|
|
|
uni.setClipboardData({
|
|
|
data: 'www.xiaoxiongcode.com',
|
|
|
@@ -214,6 +213,26 @@ async function handleExchange() {
|
|
|
|
|
|
</view>
|
|
|
</cl-popup>
|
|
|
+ <cl-popup v-model="visible4" showClose :show-header="false" direction="center" :pt="{
|
|
|
+ inner: {
|
|
|
+ className: '!bg-transparent'
|
|
|
+ }
|
|
|
+ }">
|
|
|
+ <view class="w-[360px] relative">
|
|
|
+ <image src="https://oss.xiaoxiongcode.com/static/home/6171.png" mode="widthFix"
|
|
|
+ class="w-[360px] relative ">
|
|
|
+ </image>
|
|
|
+ <view class=" wz-1 ">
|
|
|
+ 您当前未绑定微信,是否绑定微信?
|
|
|
+ </view>
|
|
|
+ <view class="wz-2 " @tap="handleClosePopup1">
|
|
|
+ 绑定
|
|
|
+ </view>
|
|
|
+ <view class="wz-3 " @tap="handleClosePopup2">
|
|
|
+ 取消
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </cl-popup>
|
|
|
<Physics v-if="selected === 'physics'" />
|
|
|
<Chinese v-else-if="selected === 'chinese'" />
|
|
|
<English v-else-if="selected === 'english'" />
|
|
|
@@ -224,6 +243,26 @@ async function handleExchange() {
|
|
|
</cl-page>
|
|
|
</template>
|
|
|
<style lang="scss" scoped>
|
|
|
+.wz-1 {
|
|
|
+ @apply absolute text-black text-[18px] font-bold w-[330px] text-center;
|
|
|
+ line-height: 40px;
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ top: 48%;
|
|
|
+}
|
|
|
+
|
|
|
+.wz-2 {
|
|
|
+ @apply absolute bottom-[12px] text-white text-[18px] font-bold text-center;
|
|
|
+ right: 31%;
|
|
|
+ bottom: 17%;
|
|
|
+}
|
|
|
+
|
|
|
+.wz-3 {
|
|
|
+ @apply absolute bottom-[12px] text-white text-[18px] font-bold text-center;
|
|
|
+ left: 26%;
|
|
|
+ bottom: 17%;
|
|
|
+}
|
|
|
+
|
|
|
.menus {
|
|
|
@apply mt-[3vh] mx-auto rounded-[20px];
|
|
|
}
|