Browse Source

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

test2
xuesinan 4 years ago
parent
commit
a63dfa472d
  1. 1
      CHANGELOG.md
  2. 4
      components/Roles/Roles.vue
  3. 25
      components/Upload/Upload.vue
  4. 3
      pages.json
  5. 16
      pages/business/business.vue
  6. 1
      pages/index/index.vue
  7. 1
      utils/cacheAndRequest.js

1
CHANGELOG.md

@ -89,6 +89,7 @@
- | 更新代码 | [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)
- | 删除打印 | [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)
- | 细节调整 | [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)

4
components/Roles/Roles.vue

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

25
components/Upload/Upload.vue

@ -14,11 +14,16 @@
import { useStore } from 'vuex';
import Config from '@/common/js/config.js';
const emit = defineEmits(['success', 'error']);
const store = useStore();
const userId = computed(() => store.getters['user/userId']);
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();
@ -41,13 +46,13 @@
const res = await uni.$u.api.import();
// WBS
//
// emit('success');
// const { apiUrl } = Config;
// const defaultwbs = `${apiUrl}/defaultwbs`;
// res.url && (defaultwbs = res.url);
// setTimeout(() => {
// uni.navigateTo({ url: `/pages/project/project?u=${userId.value}&p=${res.id}&pname=${res.pname}&url=${res.url}` });
// }, 2000);
emit('success');
const { apiUrl } = Config;
const defaultwbs = `${apiUrl}/defaultwbs`;
res.url && (defaultwbs = res.url);
setTimeout(() => {
uni.navigateTo({ url: `/pages/project/project?u=${user.value.id}&p=${res.id}&pname=${res.name}&url=${encodeURIComponent(res.url)}` });
}, 2000);
} catch (error) {
console.error('error: ', error);
emit('error', error);

3
pages.json

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

16
pages/business/business.vue

@ -22,9 +22,19 @@
</template>
<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 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();
@ -44,19 +54,17 @@
const res = await uni.$u.api.import();
// WBS
//
// emit('success');
uni.$ui.showToast('导入成功,即将打开新项目', 3000);
const { apiUrl } = Config;
const defaultwbs = `${apiUrl}/defaultwbs`;
res.url && (defaultwbs = res.url);
setTimeout(() => {
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);
} catch (error) {
console.error('error: ', error);
// emit('error', error);
uni.$ui.showToast('导入失败', 6000);
}
}

1
pages/index/index.vue

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

1
utils/cacheAndRequest.js

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

Loading…
Cancel
Save