<template> <view v-if="isshow" class="w-full fixed top-0 bottom-0 bg-[rgb(0,0,0,0.5)] z-[9999] flex items-center justify-center"> <view class="absolute w-[80%] flex flex-col items-center rounded-[10px] bg-[#FDEDE0] box-border pb-[35px]"> <view class="w-full"> <!-- 根据fullimg的值动态改变src --> <image show-menu-by-longpress ="true" :src="fullimg ? qiweixininfo.img : staticurl + '156.png'" class="w-full rounded-[10px]" mode="widthFix" /> </view> <view class="absolute w-full h-full flex flex-col"> <!-- 当fullimg为true时,不渲染这个view --> <view class="flex-1 flex justify-center"> <view v-if="!fullimg" class="w-[160rpx] h-[160rpx] bg-[#000] mt-[315rpx]"> <image show-menu-by-longpress="true" lazy-load :src="qiweixininfo.img" class="w-full h-full" /> </view> </view> <view class="flex-[0_1_40px] flex items-center justify-center"> <view v-if="!isclose" class="text-[#666] text-[13px]"> 需要等待 {{ qiweixininfo.wait }} 秒后才能关闭 </view> <view @click="close" v-else class="bg-[#E84545] p-[5px_10px] rounded-[5px]"> <view class="text-[12px] text-[#fff]">关闭</view> </view> </view> </view> </view> </view> </template> <script setup> import { ref } from 'vue' import base from '@/utils/base' import appUser from '@/api/app/user' import { staticurl } from '@/env' import appSystem from '@/api/app/system' const isshow = ref(false) const qiweixininfo = ref({}) const isclose = ref(false) const fullimg = ref(false) let time const getisqiweiimg = async () => { const res = await appSystem.getconfig({ key: 'is_qiwei_img' }) return res.data } const open = async () => { if(await getisqiweiimg()){ fullimg.value = true } isshow.value = true isclose.value = false const res = await appUser.qiweixininfo() qiweixininfo.value = res.data // qiweixininfo.value.wait = 3 clearInterval(time) time = setInterval(() => { qiweixininfo.value.wait-- if (qiweixininfo.value.wait == 0) { clearInterval(time) isclose.value = true } }, 1000) } const close = () => { isshow.value = false } const getisshow = () => { return isshow.value } defineExpose({ open, getisshow }) </script> 上面是我的代码,然后这是弹窗效果,长按没效果[图片]
图片长按菜单show-menu-by-longpress没有反应?图片长按菜单show-menu-by-longpress没有反应?排查显示已经设置成true了,但是就是没效果[图片]
2024-10-25哈哈哈,php的案例官方给了,php还是做web牛逼
encryptedData如何解密?官方例子根本没有C#的,有JS的但是居然依赖第三方JS,根本没给全,百度了一大堆方法真没搞懂。。
2021-09-02