This commit is contained in:
2025-12-14 15:01:13 +08:00
parent 2c572ee282
commit 39d9a3e8da
5 changed files with 37 additions and 38 deletions

View File

@@ -1,5 +1,5 @@
<script setup> <script setup>
import { watch, ref } from "vue"; import { watch, ref, onUnmounted } from "vue";
import XModal from "./XModal.vue"; import XModal from "./XModal.vue";
import Api from "../api/index.js"; import Api from "../api/index.js";
import { useUserStore } from "../pinia/UserStore/index.js"; import { useUserStore } from "../pinia/UserStore/index.js";
@@ -8,6 +8,7 @@ const UserStore = useUserStore();
const show = defineModel('show'); const show = defineModel('show');
const qrCode = ref(null); const qrCode = ref(null);
let old_openid = ""; let old_openid = "";
let max_timer = 50;
let timer = null; let timer = null;
const cancel = () => { const cancel = () => {
@@ -16,6 +17,8 @@ const cancel = () => {
} }
const check = async () => { const check = async () => {
max_timer--;
if (max_timer <= 0 && timer) clearInterval(timer);
await UserStore.getUserInfo(); await UserStore.getUserInfo();
if (old_openid !== UserStore.userInfo.openid) { if (old_openid !== UserStore.userInfo.openid) {
cancel(); cancel();
@@ -30,11 +33,15 @@ watch(
await UserStore.getUserInfo(); await UserStore.getUserInfo();
old_openid = UserStore.userInfo.openid; old_openid = UserStore.userInfo.openid;
qrCode.value = data.url; qrCode.value = data.url;
timer = setInterval(check, 500); timer = setInterval(check, 5000);
}); });
} }
} }
) )
onUnmounted(() => {
if (timer) clearInterval(timer);
});
</script> </script>
<template> <template>

View File

@@ -68,8 +68,7 @@ const saveM = () => {
<view class="title"> <view class="title">
话题 话题
<view class="!ml-auto"> <view class="!ml-auto">
<x-image :src="detail.video" <x-image :src="detail.video" :list="[detail.video]">
:list="[detail.video]">
<x-link show-description>查看引导</x-link> <x-link show-description>查看引导</x-link>
</x-image> </x-image>
</view> </view>
@@ -85,10 +84,7 @@ const saveM = () => {
<view class="title">素材请按顺序下载&发布</view> <view class="title">素材请按顺序下载&发布</view>
<view class="info"> <view class="info">
<view class="!grid grid-cols-5 flex-wrap gap-[32rpx]"> <view class="!grid grid-cols-5 flex-wrap gap-[32rpx]">
<x-image <x-image v-for="(v, index) in detail.children?.material[current].material_arr" :key="index" :src="v"
v-for="(v, index) in detail.children?.material[current].material_arr"
:key="index"
:src="v"
imageClass="!w-[100%] !h-auto !aspect-square"> imageClass="!w-[100%] !h-auto !aspect-square">
</x-image> </x-image>
</view> </view>
@@ -108,8 +104,7 @@ const saveM = () => {
}} }}
</view> </view>
<view class="!ml-auto" v-if="v.pid !== 0"> <view class="!ml-auto" v-if="v.pid !== 0">
<x-image :src="detail.comment_video" <x-image :src="detail.comment_video" :list="[detail.comment_video]">
:list="[detail.comment_video]">
<x-link show-description>查看引导</x-link> <x-link show-description>查看引导</x-link>
</x-image> </x-image>
</view> </view>
@@ -165,6 +160,7 @@ const saveM = () => {
border: 1px solid #E5E6EB; border: 1px solid #E5E6EB;
border-radius: 8rpx; border-radius: 8rpx;
position: relative; position: relative;
white-space: pre-line;
} }
.title { .title {

View File

@@ -1,6 +1,7 @@
<script setup> <script setup>
import { onShow } from "@dcloudio/uni-app"; import { onShow } from "@dcloudio/uni-app";
import ICON from "../../static/images/wxweb.png"; import ICON from "../../static/images/wxweb.png";
import {toPage} from "../../utils/uils";
onShow(() => { onShow(() => {
const ua = navigator.userAgent.toLowerCase(); const ua = navigator.userAgent.toLowerCase();

View File

@@ -46,9 +46,7 @@ const list = computed(() => data.comment_arr?.flatMap(v => v.children ? [v, ...v
<view class="block"> <view class="block">
<view class="block-title">素材案例:</view> <view class="block-title">素材案例:</view>
<view class="block-info !grid grid-cols-3 gap-[20rpx]"> <view class="block-info !grid grid-cols-3 gap-[20rpx]">
<x-square-carousel-image <x-square-carousel-image v-if="data.case_images_arr.length > 0" :list="data.case_images_arr"
v-if="data.case_images_arr.length > 0"
:list="data.case_images_arr"
:show-s-y="true"> :show-s-y="true">
</x-square-carousel-image> </x-square-carousel-image>
</view> </view>
@@ -69,13 +67,10 @@ const list = computed(() => data.comment_arr?.flatMap(v => v.children ? [v, ...v
</view> </view>
<view class="!flex gap-[20rpx] flex-wrap !my-[10rpx]"> <view class="!flex gap-[20rpx] flex-wrap !my-[10rpx]">
<view class="!w-[96rpx] !h-[96rpx] !aspect-square" v-for="k in v.image_arr"> <view class="!w-[96rpx] !h-[96rpx] !aspect-square" v-for="k in v.image_arr">
<x-image <x-image :style="{
:style="{
width: '96rpx', width: '96rpx',
height: '96rpx', height: '96rpx',
}" }" :src="k" :list="v.image_arr">
:src="k"
:list="v.image_arr">
</x-image> </x-image>
</view> </view>
</view> </view>

View File

@@ -10,9 +10,9 @@ export default defineConfig({
defineModel: true, defineModel: true,
} }
}), }),
// UnifiedViteWeappTailwindcssPlugin({ UnifiedViteWeappTailwindcssPlugin({
// rem2rpx: true, rem2rpx: true,
// }) })
], ],
css: { css: {
postcss: { postcss: {