Browse Source

fix: render 修复不显示内嵌插件的问题

不该判断res.id 后台没有返回这个值
test2
wally 4 years ago
parent
commit
c546659fba
  1. 1
      CHANGELOG.md
  2. 1
      common/styles/theme/default.scss
  3. 15
      components/Render/Render.vue
  4. 10
      plugins/p-finance-audit/p-finance-audit.vue
  5. 10
      plugins/p-source-manage/p-source-manage.vue

1
CHANGELOG.md

@ -34,6 +34,7 @@
- | 插件的填写与提交,修改与删除 | [d461252](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/d461252) - | 插件的填写与提交,修改与删除 | [d461252](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/d461252)
- | 插件的填写提交,编辑与删除 | [84390d5](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/84390d5) - | 插件的填写提交,编辑与删除 | [84390d5](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/84390d5)
- | 插件面板分开显示 | [fb5e86b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/fb5e86b) - | 插件面板分开显示 | [fb5e86b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/fb5e86b)
- | 文件上传添加APP的条件判断 | [5d4c1be](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/5d4c1be)
- | 日历页添加 | [1b46a91](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/1b46a91) - | 日历页添加 | [1b46a91](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/1b46a91)
- | 日历页首页 | [561c8e6](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/561c8e6) - | 日历页首页 | [561c8e6](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/561c8e6)
- | 时间轴展示 | [8b1b380](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/8b1b380) - | 时间轴展示 | [8b1b380](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/8b1b380)

1
common/styles/theme/default.scss

@ -1,6 +1,7 @@
// 默认主题文件 // 默认主题文件
.theme-default { .theme-default {
background-color: #f3f3f3; background-color: #f3f3f3;
.u-card { .u-card {
font-size: 16px !important; font-size: 16px !important;
background-color: #f3f3f3 !important; background-color: #f3f3f3 !important;

15
components/Render/Render.vue

@ -3,7 +3,7 @@
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<view <view
class="content" class="content"
style="border-radius: 8px;" style="border-radius: 8px"
id="project" id="project"
:data-did="task.detailId" :data-did="task.detailId"
:data-param="param" :data-param="param"
@ -86,7 +86,7 @@ export default {
if (err) { if (err) {
console.error('err: ', err); console.error('err: ', err);
} else { } else {
if (!res || !res.id) return; if (!res) return;
if (res.html && res.js) { if (res.html && res.js) {
this.show = true; this.show = true;
this.$nextTick(() => { this.$nextTick(() => {
@ -98,6 +98,7 @@ export default {
}, },
init(res) { init(res) {
console.log('res: ', res);
const content = document.querySelector('.content'); const content = document.querySelector('.content');
content.innerHTML = res.html; content.innerHTML = res.html;
@ -110,14 +111,14 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.render-box{ .render-box {
border-radius: 8px; border-radius: 8px;
background: #fff; background: #fff;
padding: 16px; padding: 16px;
overflow: hidden; overflow: hidden;
} }
button{ button {
border: none!important; border: none !important;
} }
</style> </style>

10
plugins/p-finance-audit/p-finance-audit.vue

@ -14,11 +14,17 @@ const { projectId, projectName, token } = useGenerateWebviewParam();
// DEBUG: // DEBUG:
function openAudit() { function openAudit() {
uni.$ui.openDetail({ url: `http://121.36.3.207/finance/index?name=财务审批&token=${token}&projectId=${projectId}&id=${task.id}&pn=${projectName}&tn=${task.name}` }); uni.$ui.openDetail({
url: `http://121.36.3.207/finance/index?name=财务审批&token=${token}&projectId=${projectId}&id=${task.id}&pn=${projectName}&tn=${task.name}`,
name: '财务审批',
});
} }
// DEBUG: // DEBUG:
function openStatistical() { function openStatistical() {
uni.$ui.openDetail({ url: `http://121.36.3.207/finance/financial-approval?name=财务统计&token=${token}&projectId=${projectId}&id=${task.id}&pn=${projectName}&tn=${task.name}` }); uni.$ui.openDetail({
url: `http://121.36.3.207/finance/financial-approval?name=财务统计&token=${token}&projectId=${projectId}&id=${task.id}&pn=${projectName}&tn=${task.name}`,
name: '财务统计',
});
} }
</script> </script>

10
plugins/p-source-manage/p-source-manage.vue

@ -1,6 +1,8 @@
<!-- 资源管理 --> <!-- 资源管理 -->
<template> <template>
<view>
<button class="text-xs bg-blue-500 text-white leading-6" style="width: 500rpx" @click="openSourceManage">资源管理</button> <button class="text-xs bg-blue-500 text-white leading-6" style="width: 500rpx" @click="openSourceManage">资源管理</button>
</view>
</template> </template>
<script setup> <script setup>
@ -11,15 +13,9 @@ const task = inject('task');
const { projectId, projectName, token } = useGenerateWebviewParam(); const { projectId, projectName, token } = useGenerateWebviewParam();
function openSourceManage() { function openSourceManage() {
// DEBUG:
uni.$ui.openDetail({ uni.$ui.openDetail({
url: 'https://www.tall.wiki/finance/index', url: `http://121.36.3.207/finance/index?name=资源管理&token=${token}&projectId=${projectId}&id=${task.id}&pn=${projectName}&tn=${task.name}`,
name: '资源管理', name: '资源管理',
token,
projectId,
id: task.value.id,
pn: projectName,
tn: task.value.name,
}); });
} }
</script> </script>

Loading…
Cancel
Save