diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..51fe1c1 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,149 @@ +--- +kind: pipeline +type: docker +name: dev + +# 挂载的主机卷,可以映射到docker容器中 +volumes: + # maven构建缓存(宿主机目录) + - name: ssh_key + host: + path: /root/.ssh/ + - name: cache + host: + path: /var/lib/cache + - name: data + host: + path: /var/lib/data + +steps: + # - name: restore-cache + # image: drillster/drone-volume-cache + # volumes: + # - name: cache + # path: /cache + # settings: + # restore: true + # mount: + # - ./node_modules + + - name: build + image: node:latest + pull: if-not-exists # default always + # volumes: + # - name: cache + # path: /root/.m2 + commands: + - npm config set registry http://registry.npm.taobao.org + - npm i + - npm run test + + # - name: rebuild-cache + # image: drillster/drone-volume-cache + # volumes: + # - name: cache + # path: /cache + # settings: + # rebuild: true + # mount: + # - ./node_modules + + - name: deploy-scp + image: appleboy/drone-scp + pull: if-not-exists + volumes: + - name: ssh_key + path: /root/.ssh/ + settings: + host: test.tall.wiki + port: 22 + username: root + key_path: /root/.ssh/id_rsa + rm: true # true则会删除目标目录重建 + target: /home/tall/v4.0.0 + source: dist/* + strip_components: 1 # 去除的目录层数,如果没有该选项,则拷贝过去是 target/xxx.jar,1代表去除target + + # - name: run-ssh + # image: appleboy/drone-ssh + # pull: if-not-exists + # volumes: + # - name: ssh_key + # path: /root/.ssh/ + # settings: + # settings: + # host: test.tall.wiki + # port: 22 + # username: root + # key_path: /root/.ssh/id_rsa + # script_stop: true # stop script after first failure + # #command_timeout: 30s # 30seconds, the maximum amount of time for the execute commands, default is 10 minutes. + # script: + # - cd /home/iacd-platform-drone + # - ./re.sh > /dev/null 2> /dev/null & + + - name: notify-email + image: drillster/drone-email + pull: if-not-exists + settings: + host: smtp.qiye.aliyun.com #例如 smtp.qq.com + port: 465 #例如QQ邮箱端口465 + username: devops@ccsens.com #邮箱用户名 + password: #邮箱密码 + from_secret: orgsecret_password_mail_devops + from: devops@ccsens.com + recipients: weizezhao@ccsens.com #收件人,多个用,隔开 + when: #执行条件 + status: + - success + - changed + - failure + + - name: notify-wechatwork + image: fifsky/drone-wechat-work + pull: if-not-exists + settings: + url: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=b2b93e9a-128b-41d4-8dce-12004e3f48b9 + msgtype: markdown + content: | + {{if eq .Status "success" }} + #### 🎉 ${DRONE_REPO} 构建成功 + > Commit: [${DRONE_COMMIT_MESSAGE}](${DRONE_COMMIT_LINK}) + > Author: ${DRONE_COMMIT_AUTHOR} + > [点击查看](${DRONE_BUILD_LINK}) + {{else}} + #### ❌ ${DRONE_REPO} 构建失败 + > Commit: [${DRONE_COMMIT_MESSAGE}](${DRONE_COMMIT_LINK}) + > Author: ${DRONE_COMMIT_AUTHOR} + > 请立即修复!!! + > [点击查看](${DRONE_BUILD_LINK}) + {{end}} + when: + status: + - failure + - success + +trigger: + branch: feat + # - name: notify-dingtalk + # image: lddsb/drone-dingtalk-message + # environment: + # PASSWORD: + # from_secret: password_mail_devops + # settings: + # token: your-dingtalk-robot-access-token + # type: markdown + # message_color: true + # message_pic: true + # sha_link: true + + # -name: notify-slack + # image: plugins/slack + # webhook: https://hooks.slack.com/ www.dijiuyy.com services/xxx/xxx/xxx + # channel: dev + # template: > + # {{#success build.status}} + # build {{build.number}} succeeded. Good job. + # {{else}} + # build {{build.number}} failed. Fix me please. + # {{/success}} diff --git a/App.vue b/App.vue index a526b47..0368041 100644 --- a/App.vue +++ b/App.vue @@ -43,19 +43,18 @@ export default { if (token && tokenIsAvailable) { // 1.1 store里有token 且没过期直接:使用store的token return token; - } else { - // 2. 根据userId获取token - if (userId) { - try { - const { token } = await this.$store.dispatch('user/getTokenByUserId', userId); - return token; - } catch (error) { - console.error('error: ', error); - return null; - } - } else { + } + // 2. 根据userId获取token + if (userId) { + try { + const { token } = await this.$store.dispatch('user/getTokenByUserId', userId); + return token; + } catch (error) { + console.error('error: ', error); return null; } + } else { + return null; } }, @@ -166,4 +165,5 @@ export default { page { height: 100%; } + diff --git a/CHANGELOG.md b/CHANGELOG.md index 783d6bc..f4b3d05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ 范围|描述|commitId --|--|-- - | 表单验证 | [8f3bc1e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/8f3bc1e) + - | 插件的填写与提交,修改与删除 | [d461252](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/d461252) - | 更新代码 | [392c8cc](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/392c8cc) - | 日历页首页 | [561c8e6](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/561c8e6) - | 日历页添加 | [1b46a91](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/1b46a91) diff --git a/README.md b/README.md new file mode 100644 index 0000000..cb2986f --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# 时物链条 + +[![Build Status](http://101.201.226.163:3001/api/badges/TALL/TALL-MUI-4/status.svg)](http://101.201.226.163:3001/TALL/TALL-MUI-4) diff --git a/apis/plugin.js b/apis/plugin.js new file mode 100644 index 0000000..e881ec5 --- /dev/null +++ b/apis/plugin.js @@ -0,0 +1,21 @@ +import Config from '@/common/js/config.js' + +const apiUrl = Config.apiUrl; +const defaultwbs = `${apiUrl}/defaultwbs`; + +export function setupPlugin(app) { + uni.$u.api = { ...uni.$u.api } || {}; + // 获取插件信息 + uni.$u.api.getOtherPlugin = param => uni.$u.post(`${apiUrl}/pluginshop/plugin/query?pluginId=${param.pluginId}&styleType=${param.styleType}`); + + // 查询子任务 + uni.$u.api.findSonTask = param => uni.$u.post(`${defaultwbs}/task/findSonTask`, param); + // 查询子项目 + uni.$u.api.findSonProject = param => uni.$u.post(`${defaultwbs}/project/findSonProject`, param); + // 提交交付物 + uni.$u.api.saveDeliver = param => uni.$u.post(`${defaultwbs}/deliver/save`, param); + // 查询任务的交付物历史记录 + uni.$u.api.queryDeliverOfTask = param => uni.$u.post(`${defaultwbs}/deliver/queryDeliverOfTask`, param); + // 检查交付物 + uni.$u.api.checkDeliver = param => uni.$u.post(`${defaultwbs}/deliver/checkDeliver`, param); +}; diff --git a/apis/tall.js b/apis/tall.js index fcb1872..7a11375 100644 --- a/apis/tall.js +++ b/apis/tall.js @@ -2,12 +2,14 @@ import Config from '@/common/js/config.js' const apiUrl = Config.apiUrl; const tall = `${apiUrl}/tall3/v3.0`; +const tall1 = `http://101.201.226.163/gateway/ptos`; export function setupTall(app) { uni.$u.api = { ...uni.$u.api } || {}; - // 登录 - // uni.$u.api.signin = params => login.index(params); - uni.$u.api.signin = params => uni.$u.http.post(`${tall}/users/signin`, params); // 登录 + // 登录 + uni.$u.api.signin = params => uni.$u.http.post(`${tall}/users/signin`, params); // 登录 + // 注册 + uni.$u.api.signup = params => uni.$u.http.post(`${tall}/users/signup`, params); // 登录 // 获取图片验证码 uni.$u.api.getImageCode = () => uni.$u.get(`${tall}/users/code`); // 获取短信验证码 diff --git a/apis/wbs.js b/apis/wbs.js index 2816f08..d3d0a20 100644 --- a/apis/wbs.js +++ b/apis/wbs.js @@ -3,5 +3,5 @@ import Config from "@/common/js/config.js" export function setupWbs(app) { uni.$u.api = { ...uni.$u.api } || {}; // 导入wbs - uni.$u.api.import = formData => this.$upload.chooseAndUpload(`${Config.apiUrl}/wbs`, formData); + uni.$u.api.import = formData => uni.$upload.chooseAndUpload(`${Config.apiUrl}/wbs`, formData); } \ No newline at end of file diff --git a/common/styles/tailwind.scss b/common/styles/tailwind.scss index 6f82085..e31149b 100644 --- a/common/styles/tailwind.scss +++ b/common/styles/tailwind.scss @@ -2433,6 +2433,18 @@ grid-auto-flow: column dense; } +.gap-1{ + gap: 0.25rem; +} + +.gap-2{ + gap: 0.5rem; +} + +.gap-3{ + gap: 0.75rem; +} + .auto-rows-auto { grid-auto-rows: auto; } diff --git a/common/styles/theme/default.scss b/common/styles/theme/default.scss index 23f0e02..824afc1 100644 --- a/common/styles/theme/default.scss +++ b/common/styles/theme/default.scss @@ -1,6 +1,8 @@ // 默认主题文件 .theme-default { background-color: #F3F3F3; + background-color: #007aff; + // color: #fff; .u-card { font-size: 16px !important; background-color: #F3F3F3 !important; @@ -23,4 +25,14 @@ z-index: 100; } } + .u-navbar { + background-color: #007aff !important; + color: #fff; + .uicon-nav-back { + color: #fff !important; + } + } + button{ + border: none!important; + } } diff --git a/common/styles/theme/test.scss b/common/styles/theme/test.scss index e29dddc..33db59c 100644 --- a/common/styles/theme/test.scss +++ b/common/styles/theme/test.scss @@ -5,4 +5,7 @@ font-size: 24px !important; background-color: #ff0 !important; } + .u-navbar { + background-color: #ff0 !important; + } } diff --git a/components/ChooseChecker/ChooseChecker.vue b/components/ChooseChecker/ChooseChecker.vue new file mode 100644 index 0000000..f57d375 --- /dev/null +++ b/components/ChooseChecker/ChooseChecker.vue @@ -0,0 +1,89 @@ + + + diff --git a/components/Globals/Globals.vue b/components/Globals/Globals.vue index faf4bac..e7f5116 100644 --- a/components/Globals/Globals.vue +++ b/components/Globals/Globals.vue @@ -11,8 +11,12 @@ >