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. 23
      components/Render/Render.vue
  4. 10
      plugins/p-finance-audit/p-finance-audit.vue
  5. 12
      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)
- | 插件的填写提交,编辑与删除 | [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)
- | 文件上传添加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)
- | 日历页首页 | [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)

1
common/styles/theme/default.scss

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

23
components/Render/Render.vue

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

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

@ -14,11 +14,17 @@ const { projectId, projectName, token } = useGenerateWebviewParam();
// DEBUG:
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:
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>

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

@ -1,6 +1,8 @@
<!-- 资源管理 -->
<template>
<button class="text-xs bg-blue-500 text-white leading-6" style="width: 500rpx" @click="openSourceManage">资源管理</button>
<view>
<button class="text-xs bg-blue-500 text-white leading-6" style="width: 500rpx" @click="openSourceManage">资源管理</button>
</view>
</template>
<script setup>
@ -11,15 +13,9 @@ const task = inject('task');
const { projectId, projectName, token } = useGenerateWebviewParam();
function openSourceManage() {
// DEBUG:
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: '资源管理',
token,
projectId,
id: task.value.id,
pn: projectName,
tn: task.value.name,
});
}
</script>

Loading…
Cancel
Save