- 微信开发者工具最新版提示编译错误?
[图片]
19小时前 - webview内嵌tab页的问题?
<van-tabs color="blue" active="{{ active }}" bind:change="onChange"> <van-tab title="原文"> <scroll-view class="content" scroll-y="true" bindscrolltolower="onScrollToLower" scroll-into-view="{{bottomViewId}}" scroll-with-animation="{{true}}" enable-back-to-top="true" type='list' style="height: calc(100vh - 151px);"> <view class="itemContent" wx:for="{{ realList.textArray }}" wx:key="beginTime" id="time-{{item.beginTime}}"> <view class="itemContentText" style="background-color: {{('time-' + item.beginTime) === bottomViewId ? 'rgba(50,119,254, .8)' : '#fff'}};color: {{('time-' + item.beginTime) === bottomViewId ? 'white' : 'rgb(139, 139, 139)'}};" data-item="{{item}}" bindtap="speedCard"> <view class="contentAvatar"> <view class="left"> <view> <van-image round width="20" height="20" style="margin-right: 15rpx" src="{{imageMap[item.personId]}}" /> </view> <view class="leftText">发言人{{item.personId + 1}}</view> </view> <view class="right">{{ item.time }}</view> </view> <view wx:if="{{ item.language == 1 && item.display == 1}}"> <view class="textArray" style="color: {{('time-' + item.beginTime) === bottomViewId ? 'white' : 'black'}};"> <text selectable="true">{{ item.text }}</text> </view> </view> <view wx:if="{{ item.language == 1 && item.display == 2}}"> <view class="textArray" style="color: {{('time-' + item.beginTime) === bottomViewId ? 'white' : 'black'}};"> <text selectable="true">{{ item.text }}</text> </view> </view> <view wx:if="{{ item.language == 2 && item.display == 1}}"> <view class="textArray" style="color: {{('time-' + item.beginTime) === bottomViewId ? 'white' : 'black'}};"> <text selectable="true">{{ item.text }}</text> </view> <view class="textArray" style="color: {{('time-' + item.beginTime) === bottomViewId ? 'white' : 'black'}};"> <text selectable="true">{{ item.text_en }}</text> </view> </view> <view wx:if="{{ item.language == 2 && item.display == 2}}"> <view class="textArray" style="color: {{('time-' + item.beginTime) === bottomViewId ? 'white' : 'black'}};"> <text selectable="true">{{ item.text_en }}</text> </view> </view> <!-- <view wx:for="{{ item.textArray }}" wx:key="index" class="textArray"> <text wx:if="{{ !!item }}">{{ item }}</text> <text wx:if="{{ !!hightTextStr }}" style="background-color: rgb(239, 239, 176)">{{ hightTextStr }} </text> </view> --> </view> </view> <view wx:if="{{realList.textArray.length === 0}}" class="vantEmpty"> <van-empty description="暂无音频内容" /> </view> </scroll-view> </van-tab> <van-tab title="思维导图"> <view class="webview-container"> <view wx:if="{{showWebView && pageUrl}}" class="no-content"> <web-view src="{{pageUrl}}" binderror="onWebViewError" style="width: 100px;height: 100px;"></web-view> </view> <view wx:elif="{{!pageUrl}}" class="no-content"> <text>暂无思维导图内容</text> </view> <view wx:else class="loading-placeholder"> <van-loading type="spinner" size="24px">加载中...</van-loading> </view> </view> </van-tab> <van-tab title="" disabled></van-tab> <van-tab title="" disabled></van-tab> </van-tabs> onChange(event) { if (event.detail.index === 1) { console.log('event--', event.detail.index); // 当切换到思维导图标签时 if (this.data.pageUrl) { // 延迟显示 web-view setTimeout(() => { this.setData({ showWebView: true }); console.log('Showing web-view with URL:', this.data.pageUrl); }, 100); // 延迟 100 毫秒,可以根据实际情况调整 } else { console.log('pageUrl is empty, not showing web-view'); // 可以在这里添加逻辑来重新获取 pageUrl } } this.setData({ active: event.detail.index }); },
10-29 - 定时器无法清除的问题?
proCompound() { let that = this let json = JSON.parse(JSON.stringify(that.data.projectjson)) console.log(json); textToWav({ id: json.character.voiceId, text: json.ppt.pages[0].text, language: '中文', }) .then((res) => { this.setData({ syntheticVideo: false }) this.checkStatusInterval = setInterval(() => { this.wavStatuss(res.data.taskId); }, 5000); // 60000毫秒即1分钟 }) .catch((err) => { Message.error(err); });} //合成语音状态 wavStatuss(params) { wavPath({ taskId: params }).then((res) => { if (res.code == 200) { clearCheckStatusInterval(); // 当code为200时,停止定时器 this.$message.success(res.msg); } if (res.code == 201) { clearCheckStatusInterval(); // 当code为201时,停止定时器 this.$message.error(res.msg); } }); }, // 定义清理定时器的方法 clearCheckStatusInterval() { if (this.checkStatusInterval) { clearInterval(this.checkStatusInterval); this.checkStatusInterval = null; // 清理后重置定时器引用 } }, 为什么200的时候没有清除定时器
08-02