diff --git a/CHANGELOG.md b/CHANGELOG.md index 532acc9..d2631f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ 范围|描述|commitId --|--|-- - | api 封装 | [8dcb8a2](http://gitea@dd.tall.wiki:wally/TALL-MUI-3/commits/8dcb8a2) + - | env host修改 | [a79a4a5](http://gitea@dd.tall.wiki:wally/TALL-MUI-3/commits/a79a4a5) - | mock | [51c24a5](http://gitea@dd.tall.wiki:wally/TALL-MUI-3/commits/51c24a5) pwa 小程序 | 移除了pwa,alloyFinger添加平台判断 | [875fab4](http://gitea@dd.tall.wiki:wally/TALL-MUI-3/commits/875fab4) - | uview-ui | [a9ea34b](http://gitea@dd.tall.wiki:wally/TALL-MUI-3/commits/a9ea34b) diff --git a/src/apis/project.js b/src/apis/project.js index e69de29..86794ca 100644 --- a/src/apis/project.js +++ b/src/apis/project.js @@ -0,0 +1,9 @@ +const apiUrl = process.env.VUE_APP_API_URL; +const tall = `${apiUrl}/defaultwbs`; + +const install = (Vue, vm) => { + vm.$u.api = { ...vm.$u.api } || {}; + vm.$u.api.findProjectById = params => vm.$u.post(`${tall}/project/findProjectById`, params); +}; + +export default { install }; diff --git a/src/components/Globals/Globals.vue b/src/components/Globals/Globals.vue index ea3fb8a..f8547ef 100644 --- a/src/components/Globals/Globals.vue +++ b/src/components/Globals/Globals.vue @@ -1,29 +1,23 @@ @@ -24,16 +22,76 @@ export default { tabList: [], //tab dom节点集合 scrollLeft: 0, //scrollview需要滚动的距离 roles: [ - { id: 1, name: '项目经理', mine: 0, pm: 1, sequence: 1 }, - { id: 2, name: '运维', mine: 0, pm: 0, sequence: 2 }, - { id: 3, name: '导师一', mine: 1, pm: 0, sequence: 3 }, - { id: 4, name: '导师二', mine: 1, pm: 0, sequence: 4 }, - { id: 5, name: '导师三', mine: 1, pm: 0, sequence: 5 }, - { id: 6, name: '导师四', mine: 1, pm: 0, sequence: 6 }, - { id: 7, name: '导师五', mine: 1, pm: 0, sequence: 7 }, - { id: 8, name: '导师六', mine: 1, pm: 0, sequence: 8 }, - { id: 9, name: '导师七', mine: 1, pm: 0, sequence: 9 }, - { id: 10, name: '导师八', mine: 1, pm: 0, sequence: 10 }, + { + id: 1, + name: '项目经理', + mine: 0, + pm: 1, + sequence: 1, + }, + { + id: 2, + name: '运维', + mine: 0, + pm: 0, + sequence: 2, + }, + { + id: 3, + name: '导师一', + mine: 1, + pm: 0, + sequence: 3, + }, + { + id: 4, + name: '导师二', + mine: 1, + pm: 0, + sequence: 4, + }, + { + id: 5, + name: '导师三', + mine: 1, + pm: 0, + sequence: 5, + }, + { + id: 6, + name: '导师四', + mine: 1, + pm: 0, + sequence: 6, + }, + { + id: 7, + name: '导师五', + mine: 1, + pm: 0, + sequence: 7, + }, + { + id: 8, + name: '导师六', + mine: 1, + pm: 0, + sequence: 8, + }, + { + id: 9, + name: '导师七', + mine: 1, + pm: 0, + sequence: 9, + }, + { + id: 10, + name: '导师八', + mine: 1, + pm: 0, + sequence: 10, + }, ], loading: true, // 是否显示骨架屏组件 }; @@ -51,7 +109,10 @@ export default { const data = document.getElementsByClassName('tab-children'); // TODO 第一步 获取当前所以子元素 并插入到 tabList 列表中 data.forEach(item => { - this.tabList.push({ width: item.clientWidth, left: item.offsetLeft }); + this.tabList.push({ + width: item.clientWidth, + left: item.offsetLeft, + }); }); }, @@ -120,6 +181,7 @@ export default { color: $roleChoiceColor; font-weight: 600; } + .default-tab-choice:before { content: ''; position: absolute; @@ -171,4 +233,8 @@ scroll-view ::v-deep ::-webkit-scrollbar { } /* #endif */ + +.skeleton { + height: 44rpx; +} diff --git a/src/components/Roles/components/RoleList.vue b/src/components/Roles/components/RoleList.vue deleted file mode 100644 index d0c3445..0000000 --- a/src/components/Roles/components/RoleList.vue +++ /dev/null @@ -1,183 +0,0 @@ - - - - - diff --git a/src/components/Skeleton/READ_ME.md b/src/components/Skeleton/READ_ME.md new file mode 100644 index 0000000..09ccf28 --- /dev/null +++ b/src/components/Skeleton/READ_ME.md @@ -0,0 +1,84 @@ +# skeleton组件 + +### 1.描述 +> 此组件用于加载数据时占位图显示,跟vant-ui骨架屏用法相似,但比vant-ui更灵活 + + + +### 2.用法 + +- 基本用法 + +代码: +```vue +//基本用法 + + + content + + +``` + + +- **显示 title ——通过 **title 属性显示title占位图 + +代码: +```vue +//显示 title——通过 title 属性显示title占位图 + + + content + + +``` + + +- 显示头像(上面)——通过avatar=‘top’让头像的占位图上面显示 + +代码: +```vue + + + content + + +``` + + +- 显示头像(左边)——通过avatar=‘left’让头像的占位图左边显示 + +代码: +```vue + + + content + + +``` + + +- 显示banner**——通过 **banner属性显示banner占位图(只显示banner,不显示内容占位图时设置row="0") + +代码: +```vue + + + content + + +``` +### +### 3. API +### Props +| **属性名** | **说明** | **类型** | **默认值** | 可取值 | +| --- | --- | --- | --- | --- | +| loading | 是否显示骨架屏 | Boolean | true | true/false | +| row | 段落行数 | Number | String | 3 | 0表示不展现 | +| rowWidth | 段落行宽度 | Boolean | Number | '100%' | | +| title | 是否显示标题 | Boolean | String | false | | +| banner | 是否显示banner | Boolean | String | false | | +| animate | 是否开启动画 | Boolean | String | false | | +| avatar | 头像位置 | Boolean | String | ''空 | left/top | +| avatarSize | 头像大小 | String | - | | +| avatarShape | 头像形状 | String | circle | circle/round | + diff --git a/src/components/Skeleton/Skeleton.vue b/src/components/Skeleton/Skeleton.vue new file mode 100644 index 0000000..c5e2d59 --- /dev/null +++ b/src/components/Skeleton/Skeleton.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/components/Skeleton/view.vue b/src/components/Skeleton/view.vue new file mode 100644 index 0000000..4d27e62 --- /dev/null +++ b/src/components/Skeleton/view.vue @@ -0,0 +1,45 @@ + + + diff --git a/src/components/TimeLine/component/TimeBox.vue b/src/components/TimeLine/component/TimeBox.vue index 2d5de43..6dd04f7 100644 --- a/src/components/TimeLine/component/TimeBox.vue +++ b/src/components/TimeLine/component/TimeBox.vue @@ -89,46 +89,33 @@ export default { TaskPanel: { height: '100' }, }, ], - }; - }, - - methods: { - addTopList() { - const item = [ + addList: [ { state: 0, plugins: [[{ pluginId: '111' }], [{ pluginId: '222' }]], + TaskPanel: { height: '100' }, }, { state: 0, plugins: [[{ pluginId: '111' }], [{ pluginId: '222' }]], + TaskPanel: { height: '100' }, }, { state: 0, plugins: [[{ pluginId: '111' }], [{ pluginId: '333' }]], + TaskPanel: { height: '100' }, }, - ]; - this.list = item.concat(this.list); - console.log('this.list: ', this.list); + ], + }; + }, + + methods: { + addTopList() { + this.list = this.addList.concat(this.list); }, addBottomList() { - const item = [ - { - state: 0, - plugins: [[{ pluginId: '111' }], [{ pluginId: '333' }]], - }, - { - state: 0, - plugins: [[{ pluginId: '111' }], [{ pluginId: '333' }]], - }, - { - state: 0, - plugins: [[{ pluginId: '111' }]], - }, - ]; - this.list = this.list.concat(item); - console.log('this.list: ', this.list); + this.list = this.list.concat(this.addList); }, }, }; diff --git a/src/main.js b/src/main.js index 4a2a524..48d5def 100644 --- a/src/main.js +++ b/src/main.js @@ -25,8 +25,12 @@ const app = new Vue({ ...App, store }); import request from '@/utils/request.js'; import user from '@/apis/user.js'; +import project from '@/apis/project.js'; + +window.vm = app; Vue.use(request, app); Vue.use(user, app); +Vue.use(project, app); app.$mount(); diff --git a/src/manifest.json b/src/manifest.json deleted file mode 100644 index 980fd67..0000000 --- a/src/manifest.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "", - "appid": "", - "description": "", - "versionName": "1.0.0", - "versionCode": "100", - "transformPx": false, - "app-plus": { /* 5+App特有相关 */ - "usingComponents": true, - "splashscreen": { - "alwaysShowBeforeRender": true, - "waiting": true, - "autoclose": true, - "delay": 0 - }, - "modules": { /* 模块配置 */ - - }, - "distribute": { /* 应用发布信息 */ - "android": { /* android打包配置 */ - "permissions": ["", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "ios": { /* ios打包配置 */ - - }, - "sdkConfigs": { /* SDK配置 */ - - } - } - }, - "quickapp": { /* 快应用特有相关 */ - - }, - "mp-weixin": { /* 微信小程序特有相关 */ - "appid": "", - "setting": { - "urlCheck": false - }, - "usingComponents": true - }, - "mp-alipay" : { - "usingComponents" : true - }, - "mp-baidu" : { - "usingComponents" : true - }, - "mp-toutiao" : { - "usingComponents" : true - }, - "mp-qq" : { - "usingComponents" : true - } -} diff --git a/src/mock/mock.js b/src/mock/mock.js index e8e4f58..f8b784b 100644 --- a/src/mock/mock.js +++ b/src/mock/mock.js @@ -67,7 +67,7 @@ export default [ msg: 'ok', success: true, data: { - name: 'string', + name: '默认项目', projectId: 1235555, }, }); @@ -115,9 +115,7 @@ export default [ code: 200, msg: 'ok', success: true, - data: { - description: 'data数据', - }, + data: { description: 'data数据' }, }); }, }, @@ -271,9 +269,7 @@ export default [ code: 200, msg: 'ok', success: true, - data: { - description: 'data数据', - }, + data: { description: 'data数据' }, }); }, }, diff --git a/src/pages.json b/src/pages.json index 86c68c7..32624f9 100644 --- a/src/pages.json +++ b/src/pages.json @@ -1,7 +1,7 @@ { "pages": [ { - "path": "pages/index/index", + "path": "pages/project/project", "style": { "navigationStyle": "custom" , "navigationBarTextStyle": "white" diff --git a/src/pages/index/index.vue b/src/pages/project/project.vue similarity index 64% rename from src/pages/index/index.vue rename to src/pages/project/project.vue index d77f7b4..4bf2141 100644 --- a/src/pages/index/index.vue +++ b/src/pages/project/project.vue @@ -10,16 +10,19 @@