Browse Source

fix: 顶部状态栏不显示问题

test2
xuesinan 4 years ago
parent
commit
a63dfa472d
  1. 1
      CHANGELOG.md
  2. 2
      components/Projects/ProjectItem.vue
  3. 4
      components/Roles/Roles.vue
  4. 33
      components/Upload/Upload.vue
  5. 2
      hooks/project/useGetTasks.js
  6. 3
      pages.json
  7. 16
      pages/business/business.vue
  8. 1
      pages/index/index.vue
  9. 1
      utils/cacheAndRequest.js

1
CHANGELOG.md

@ -89,6 +89,7 @@
- | 更新代码 | [aa6093a](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/aa6093a) - | 更新代码 | [aa6093a](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/aa6093a)
- | 交付物相关细节调整 | [87ae00d](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/87ae00d) - | 交付物相关细节调整 | [87ae00d](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/87ae00d)
- | 删除打印 | [3e75576](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/3e75576) - | 删除打印 | [3e75576](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/3e75576)
- | 添加注释 | [42b31a7](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/42b31a7)
- | 细节调整 | [a43fa83](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/a43fa83) - | 细节调整 | [a43fa83](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/a43fa83)
- | 细节调整 | [ebf678f](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/ebf678f) - | 细节调整 | [ebf678f](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/ebf678f)
- | 细节调整 | [759ef52](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/759ef52) - | 细节调整 | [759ef52](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/759ef52)

2
components/Projects/ProjectItem.vue

@ -19,7 +19,7 @@
</view> </view>
<view class="workbench-btn" v-if="index === 0" @click="toWorkbench">工作台</view> <view class="workbench-btn" v-if="index === 0" @click="toWorkbench">工作台</view>
<view class="remind-box bg-red-500 text-white text-xs" v-if="item.remindNum">{{ item.remindNum > 99 ? '99+' : item.remindNum }}</view> <view class="remind-box bg-red-500 text-white text-xs" v-if="item.remindNum">{{ item.remindNum > 99 ? '99+' : item.remindNum }}</view>
<!-- 箭头 --> <!-- 箭头 -->

4
components/Roles/Roles.vue

@ -103,9 +103,11 @@ function scroll(e) {
// //
function setCurrentRole(index) { function setCurrentRole(index) {
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(this);
console.log('ppppppp', query);
query query
.selectAll('.tab-children') .selectAll('.tab-children')
.boundingClientRect(res => { .boundingClientRect(res => {
console.log('oooooooooo', res);
res.forEach(item => { res.forEach(item => {
data.tabList.push({ width: item.width }); data.tabList.push({ width: item.width });
}); });
@ -154,7 +156,7 @@ function changeRole(id, index) {
data.firstClickTime = new Date().getTime(); data.firstClickTime = new Date().getTime();
// script // script
clearPluginScript(); // clearPluginScript();
nextTick(() => { nextTick(() => {
store.commit('role/setRoleId', id); store.commit('role/setRoleId', id);
store.commit('role/setRoleIndex', index); store.commit('role/setRoleIndex', index);

33
components/Upload/Upload.vue

@ -1,8 +1,8 @@
<template> <template>
<view class="upload"> <view class="upload">
<u-icon <u-icon
name="plus" name="plus"
size="24px" size="24px"
class="flex justify-center w-12 h-12 bg-blue-100 rounded-full shadow-md" class="flex justify-center w-12 h-12 bg-blue-100 rounded-full shadow-md"
@click="handleUpload" @click="handleUpload"
></u-icon> ></u-icon>
@ -14,11 +14,16 @@
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import Config from '@/common/js/config.js'; import Config from '@/common/js/config.js';
const emit = defineEmits(['success', 'error']);
const store = useStore(); const store = useStore();
const userId = computed(() => store.getters['user/userId']); const list = ref([]);
const list = ref([]); const emit = defineEmits(['success', 'error']);
const user = computed(() => store.state.user.user);
const userJson = uni.$storage.getStorageSync('user');
if (userJson) {
const user = JSON.parse(userJson);
store.commit('user/setUser', user);
}
getList(); getList();
@ -41,13 +46,13 @@
const res = await uni.$u.api.import(); const res = await uni.$u.api.import();
// WBS // WBS
// //
// emit('success'); emit('success');
// const { apiUrl } = Config; const { apiUrl } = Config;
// const defaultwbs = `${apiUrl}/defaultwbs`; const defaultwbs = `${apiUrl}/defaultwbs`;
// res.url && (defaultwbs = res.url); res.url && (defaultwbs = res.url);
// setTimeout(() => { setTimeout(() => {
// uni.navigateTo({ url: `/pages/project/project?u=${userId.value}&p=${res.id}&pname=${res.pname}&url=${res.url}` }); uni.navigateTo({ url: `/pages/project/project?u=${user.value.id}&p=${res.id}&pname=${res.name}&url=${encodeURIComponent(res.url)}` });
// }, 2000); }, 2000);
} catch (error) { } catch (error) {
console.error('error: ', error); console.error('error: ', error);
emit('error', error); emit('error', error);

2
hooks/project/useGetTasks.js

@ -79,7 +79,7 @@ export default function useGetTasks() {
arr[index].realTasks = [...realTasks.value]; arr[index].realTasks = [...realTasks.value];
store.commit('task/setAllTasks', arr); store.commit('task/setAllTasks', arr);
store.commit('task/setCurrRoleRealTasks', arr[index].realTasks); // 设置当前角色的真实任务数据 store.commit('task/setCurrRoleRealTasks', arr[index].realTasks); // 设置当前角色的真实任务数据
// 如果第一次渲染但没有空数据则加载空数据 // 如果第一次渲染但没有空数据则加载空数据
if (!tasks.value || !tasks.value.length && timeLineType.value === 1) { if (!tasks.value || !tasks.value.length && timeLineType.value === 1) {
setNextPlaceholderTasks(params); setNextPlaceholderTasks(params);

3
pages.json

@ -21,8 +21,7 @@
{ {
"path": "pages/project/project", "path": "pages/project/project",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom"
"navigationBarTextStyle": "white"
} }
}, },
{ {

16
pages/business/business.vue

@ -22,9 +22,19 @@
</template> </template>
<script setup> <script setup>
import { ref } from 'vue'; import { ref, computed } from 'vue';
import { useStore } from 'vuex';
import Config from '@/common/js/config.js';
const store = useStore();
const list = ref([]); const list = ref([]);
const user = computed(() => store.state.user.user);
const userJson = uni.$storage.getStorageSync('user');
if (userJson) {
const user = JSON.parse(userJson);
store.commit('user/setUser', user);
}
getList(); getList();
@ -44,19 +54,17 @@
const res = await uni.$u.api.import(); const res = await uni.$u.api.import();
// WBS // WBS
// //
// emit('success');
uni.$ui.showToast('导入成功,即将打开新项目', 3000); uni.$ui.showToast('导入成功,即将打开新项目', 3000);
const { apiUrl } = Config; const { apiUrl } = Config;
const defaultwbs = `${apiUrl}/defaultwbs`; const defaultwbs = `${apiUrl}/defaultwbs`;
res.url && (defaultwbs = res.url); res.url && (defaultwbs = res.url);
setTimeout(() => { setTimeout(() => {
uni.navigateTo({ uni.navigateTo({
url: `/pages/project/project?u=${userId.value}&p=${res.id}&pname=${res.pname}&url=${res.url}` url: `/pages/project/project?u=${user.value.id}&p=${res.id}&pname=${res.name}&url=${encodeURIComponent(res.url)}`
}); });
}, 2000); }, 2000);
} catch (error) { } catch (error) {
console.error('error: ', error); console.error('error: ', error);
// emit('error', error);
uni.$ui.showToast('导入失败', 6000); uni.$ui.showToast('导入失败', 6000);
} }
} }

1
pages/index/index.vue

@ -109,6 +109,7 @@
// //
const onUploadError = error => { const onUploadError = error => {
console.log('11111111')
uni.$ui.showToast('导入失败', 6000); uni.$ui.showToast('导入失败', 6000);
}; };

1
utils/cacheAndRequest.js

@ -152,7 +152,6 @@ export default {
.getTaskByNum(params) .getTaskByNum(params)
.then(data => { .then(data => {
// remote = true; // remote = true;
fn(null, uni.$u.deepClone(data)); fn(null, uni.$u.deepClone(data));
// 存api到cache里 // 存api到cache里
// uni.$cache.putStorageRegularTask(params, data); // uni.$cache.putStorageRegularTask(params, data);

Loading…
Cancel
Save