Merge remote-tracking branch 'remotes/origin/dev/1.0' into custom/2811-xcx6.aigc-quickapp.com
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<view class="diy-wechat-channel" :style="channelWarpCss">
|
<view class="diy-wechat-channel" :style="channelWarpCss">
|
||||||
<view class="channel-header" @tap="handlerClick">
|
<view class="channel-header" @tap="handlerClick">
|
||||||
<image class="channel-avatar" :src="$util.img(value.avatarUrl)" mode="aspectFill"></image>
|
<image class="channel-avatar" :src="$util.img(value.avatarUrl)" mode="aspectFill"></image>
|
||||||
@@ -8,8 +9,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<image class="channel-arrow" :src="$util.img('addon/personnel/shop/view/enterprise/arrow.png')" mode="aspectFill"></image>
|
<image class="channel-arrow" :src="$util.img('addon/personnel/shop/view/enterprise/arrow.png')" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- 嵌入式视频播放 -->
|
<!-- 嵌入式视频播放 -->
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
|
||||||
<native-component v-if="value.embedMode && typeof wx !== 'undefined' && wx.canIUse('component.channel-video')">
|
<native-component v-if="value.embedMode && typeof wx !== 'undefined' && wx.canIUse('component.channel-video')">
|
||||||
<channel-video
|
<channel-video
|
||||||
:feed-id="value.feedId"
|
:feed-id="value.feedId"
|
||||||
@@ -17,8 +17,7 @@
|
|||||||
:feed-token="value.feedToken"
|
:feed-token="value.feedToken"
|
||||||
style="width: 100%; height: 320rpx;">
|
style="width: 100%; height: 320rpx;">
|
||||||
</channel-video>
|
</channel-video>
|
||||||
</native-component>
|
</native-component>
|
||||||
<!-- #endif -->
|
|
||||||
<!-- 跳转式视频播放 -->
|
<!-- 跳转式视频播放 -->
|
||||||
<view v-else class="channel-video" @tap="playVideo">
|
<view v-else class="channel-video" @tap="playVideo">
|
||||||
<image class="video-cover" :src="$util.img(value.coverUrl)" mode="aspectFill"></image>
|
<image class="video-cover" :src="$util.img(value.coverUrl)" mode="aspectFill"></image>
|
||||||
@@ -33,8 +32,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// 微信视频号组件
|
// 微信视频号组件
|
||||||
import DiyMinx from './minx.js'
|
import DiyMinx from './minx.js'
|
||||||
|
|||||||
62
scripts/clean-empty-directories.js
Normal file
62
scripts/clean-empty-directories.js
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 递归删除空目录
|
||||||
|
* @param {string} dirPath - 要检查的目录路径
|
||||||
|
* @param {boolean} dryRun - 是否只打印不删除
|
||||||
|
*/
|
||||||
|
function removeEmptyDirectories(dirPath, dryRun = false) {
|
||||||
|
try {
|
||||||
|
// 读取目录内容
|
||||||
|
const files = fs.readdirSync(dirPath);
|
||||||
|
|
||||||
|
// 递归检查子目录
|
||||||
|
for (const file of files) {
|
||||||
|
const fullPath = path.join(dirPath, file);
|
||||||
|
const stat = fs.statSync(fullPath);
|
||||||
|
|
||||||
|
if (stat.isDirectory()) {
|
||||||
|
removeEmptyDirectories(fullPath, dryRun);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 再次读取目录内容,因为子目录可能已经被删除
|
||||||
|
const updatedFiles = fs.readdirSync(dirPath);
|
||||||
|
|
||||||
|
// 如果目录为空
|
||||||
|
if (updatedFiles.length === 0) {
|
||||||
|
console.log(`${dryRun ? 'Would remove' : 'Removing'} empty directory: ${dirPath}`);
|
||||||
|
if (!dryRun) {
|
||||||
|
fs.rmdirSync(dirPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(`Error processing directory ${dirPath}:`, error.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主函数
|
||||||
|
*/
|
||||||
|
function main() {
|
||||||
|
// 获取项目根目录
|
||||||
|
const projectRoot = path.resolve(__dirname, '..');
|
||||||
|
|
||||||
|
console.log('Starting to remove empty directories...');
|
||||||
|
console.log(`Project root: ${projectRoot}`);
|
||||||
|
console.log('====================================');
|
||||||
|
|
||||||
|
// 执行删除操作
|
||||||
|
removeEmptyDirectories(projectRoot);
|
||||||
|
|
||||||
|
console.log('====================================');
|
||||||
|
console.log('Empty directory cleanup completed!');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 运行主函数
|
||||||
|
if (require.main === module) {
|
||||||
|
main();
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = removeEmptyDirectories;
|
||||||
Reference in New Issue
Block a user