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 @@
+# 时物链条
+
+[](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 @@
>
+<<<<<<< HEAD
+=======
+
+>>>>>>> 68e9189bbf20721e757578b15d349abd9ef295d0
@@ -53,8 +57,8 @@ const sysHeight = uni.getSystemInfoSync().screenHeight; // 屏幕的高度
const globalsHeight = Math.floor(((sysHeight - 44 - 30 - 10) / 5) * 4); // 全局任务的最大高度
const store = useStore();
const isShrink = computed(() => store.state.task.isShrink); // 全局任务是否收缩
+const showGlobalSkeleton = computed(() => store.state.task.showGlobalSkeleton); // 全局任务骨架屏
const globals = computed(() => store.getters['task/globals']);
-console.log('globals: ', globals.value);
// 手动展开日常任务
function openCard() {
diff --git a/components/Plugin/Plugin.vue b/components/Plugin/Plugin.vue
index 6382c31..c343551 100644
--- a/components/Plugin/Plugin.vue
+++ b/components/Plugin/Plugin.vue
@@ -1,29 +1,10 @@
- 插件面板
-
-
-
+
+
-
-
+
+
+
+
+
+
diff --git a/components/TimeLine/TimeLine.vue b/components/TimeLine/TimeLine.vue
index 2b308d9..489c680 100644
--- a/components/TimeLine/TimeLine.vue
+++ b/components/TimeLine/TimeLine.vue
@@ -22,7 +22,7 @@
+
+
diff --git a/components/uni-popup/uni-popup-message.vue b/components/uni-popup/uni-popup-message.vue
new file mode 100644
index 0000000..fe401a7
--- /dev/null
+++ b/components/uni-popup/uni-popup-message.vue
@@ -0,0 +1,115 @@
+
+
+
+
+
+
diff --git a/components/uni-popup/uni-popup-share.vue b/components/uni-popup/uni-popup-share.vue
new file mode 100644
index 0000000..224a9b7
--- /dev/null
+++ b/components/uni-popup/uni-popup-share.vue
@@ -0,0 +1,171 @@
+
+
+
+
+
+
diff --git a/components/uni-popup/uni-popup.vue b/components/uni-popup/uni-popup.vue
new file mode 100644
index 0000000..4d3b867
--- /dev/null
+++ b/components/uni-popup/uni-popup.vue
@@ -0,0 +1,289 @@
+
+
+
+
+
+
diff --git a/config/plugin.js b/config/plugin.js
new file mode 100644
index 0000000..a12856b
--- /dev/null
+++ b/config/plugin.js
@@ -0,0 +1,97 @@
+// 定义插件相关信息
+/* eslint-disable */
+export default {
+ defaults: [
+ {
+ id: 1,
+ name: 'TASK_NAME',
+ description: '任务名插件',
+ component: 'p-task-title',
+ },
+ {
+ id: 2,
+ name: 'TASK_DESCRIPTION',
+ description: '任务描述插件',
+ component: 'p-task-description',
+ },
+ {
+ id: 3,
+ name: 'TASK_DURATION_DELAY',
+ description: '任务时长延迟插件(+-1min)时间格式可设置',
+ component: 'p-task-duration-delay',
+ },
+ {
+ id: 4,
+ name: 'TASK_START_TIME_DELAY',
+ description: '任务开始时间延迟插件(+-1hour)',
+ component: 'p-task-start-time-delay',
+ },
+ {
+ id: 5,
+ name: 'DELIVERABLE',
+ description: '交付物插件(人 + 交付物)可配置【仅人】 or 【仅交付物】 or 【人+交付物】',
+ component: 'p-deliverable',
+ },
+ {
+ id: 6,
+ name: 'SUBTASKS',
+ description: '子任务插件:显示子任务',
+ component: 'p-subtasks',
+ },
+ {
+ id: 7,
+ name: 'SUB_PROJECT',
+ description: '子项目插件:显示子项目',
+ component: 'p-sub-project',
+ },
+ {
+ id: 8,
+ name: 'TASK_COUNTDOWN',
+ description: '任务倒计时插件',
+ component: 'p-task-countdown',
+ },
+ {
+ id: 9,
+ name: 'MANAGE_PROJECT',
+ description: '项目信息管理插件',
+ component: 'p-manage-project',
+ },
+
+ {
+ id: 10,
+ name: 'MANAGE_ROLE',
+ description: '角色信息管理插件',
+ component: 'p-manage-role',
+ },
+ {
+ id: 11,
+ name: 'MANAGE_MEMBER',
+ description: '成员信息管理插件',
+ component: 'p-manage-member',
+ },
+ {
+ id: 12,
+ name: 'MANAGE_TASK',
+ description: '任务信息管理插件',
+ component: 'p-manage-task',
+ },
+ {
+ id: 13,
+ name: 'WBS_IMPORT',
+ description: '导入WBS新建项目',
+ component: 'p-wbs-import',
+ },
+ {
+ id: 14,
+ name: 'WBS_IMPORT_UPDATE',
+ description: '导入WBS更新项目',
+ component: 'p-wbs-update',
+ },
+ {
+ id: 15,
+ name: 'DELIVER_CHECK',
+ description: '交付物检查',
+ component: 'p-deliver-check',
+ },
+ ], // 默认插件id列表
+};
diff --git a/hooks/project/useInit.js b/hooks/project/useInit.js
index a65d1c8..217e57a 100644
--- a/hooks/project/useInit.js
+++ b/hooks/project/useInit.js
@@ -14,10 +14,6 @@ export default function useInit() {
}
});
- // onMounted(() => {
- // const system = uni.getSystemInfoSync();
- // height.value = `${system.windowHeight}px`;
- // });
/**
* 通过项目id获取项目信息
diff --git a/hooks/user/userMixin.js b/hooks/user/userMixin.js
index 3ab2cd0..36e64da 100644
--- a/hooks/user/userMixin.js
+++ b/hooks/user/userMixin.js
@@ -1,11 +1,12 @@
-import { ref, computed } from 'vue';
+import { ref, computed, reactive } from 'vue';
import { useStore } from 'vuex';
-import clipboard from "@/common/js/dc-clipboard/clipboard.js"
+import clipboard from "@/common/js/dc-clipboard/clipboard.js";
+import Config from '@/common/js/config.js'
export default function userMixin() {
const store = useStore();
const user = computed(() => store.state.user.user);
- const rules = ref({
+ const rules = {
phone: [{
required: true,
message: '请输入手机号',
@@ -14,7 +15,7 @@ export default function userMixin() {
{
validator: (rule, value, callback) => {
// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
- return this.$u.test.mobile(value);
+ return uni.$u.test.mobile(value);
},
message: '手机号码不正确',
// 触发器可以同时用blur和change,二者之间用英文逗号隔开
@@ -78,46 +79,156 @@ export default function userMixin() {
trigger: ['change', 'blur'],
}
],
- });
- const errorType = ['message'];
- const labelPosition = 'left';
- const border = false;
- const smsCode = ref(''); // 短信验证码
- const showInterval = ref(false);
- const interval = ref(120);
+ };
+ const smsCode = ref(null); // 短信验证码
+ // const showInterval = ref(false);
+ // const interval = ref(120);
const codeTimer = ref(null);
- const showPaste = ref(false);
-
- // 获取图形验证码
- async function getImageCode() {
- console.log('5555')
- uni.$ui.showLoading();
- try {
- const data = await uni.$u.api.getImageCode();
- const { imageBase64, verificationCodeId } = data;
- imageBase64 = imageBase64 || '';
- verificationCodeId = verificationCodeId || '';
- uni.$ui.hideLoading();
- } catch (error) {
- uni.$ui.hideLoading();
- uni.$ui.showToast(error);
- }
+ // const showPaste = ref(false);
+ const dataObj = reactive({
+ showInterval: false,
+ interval: 60,
+ showPaste: false
+ });
+
+ //有图片验证码的值
+ function hasvalue(form, renderData) {
+ if(form.smsCode || form.showPaste) return
+ if (!verifyPhone(form.phone)) {
+ uni.$ui.showToast('请输入正确的手机号');
+ return;
+ }
+ if (!form.verificationCodeValue) {
+ uni.$ui.showToast('请输入图形验证码');
+ return;
+ }
+
+ if (!dataObj.showInterval) {
+ getCode(form, renderData);
+ }
+ }
+
+ // 获取验证码
+ async function getCode(form, renderData) {
+ try {
+ if (!renderData.verificationCodeId || !form.verificationCodeValue) {
+ uni.$ui.showToast('缺少图形验证码参数');
+ return;
+ }
+ const params = {
+ phone: form.phone,
+ verificationCodeId: renderData.verificationCodeId,
+ verificationCodeValue: form.verificationCodeValue,
+ };
+ const date = await store.dispatch('user/sendCode', params);
+ getCodeInterval();
+ dataObj.showPaste = true;
+ } catch (err) {
+ dataObj.showPaste = false;
+ throw err;
+ }
+ }
+
+ // 获取验证码倒计时
+ function getCodeInterval() {
+ dataObj.showInterval = true;
+ codeTimer.value = setInterval(() => {
+ if (dataObj.interval === 0) {
+ clearInterval(codeTimer.value);
+ codeTimer.value = null;
+ dataObj.showInterval = false;
+ dataObj.interval = 60;
+ return;
+ }
+ dataObj.interval = dataObj.interval - 1;
+ }, 1000);
+ }
+
+ // 粘贴
+ function setCode() {
+ // 获取粘贴板内容
+ // 小程序平台
+ //#ifdef MP-WEIXIN
+ uni.getClipboardData({
+ success (res) {
+ smsCode.value = res.data;
+ }
+ });
+ //#endif
+
+ // 非小程序平台
+ //#ifndef MP-WEIXIN
+ getClipboardContents()
+ //#endif
+ }
+
+ // 非小程序平台粘贴
+ async function getClipboardContents() {
+ try {
+ const text = await navigator.clipboard.readText();
+ smsCode.value = text;
+ } catch (err) {
+ console.error('Failed to read clipboard contents: ', err);
+ }
+ }
+
+ // 验证信息
+ function checkRules() {
+ if (!verifyPhone(phone.value)) {
+ uni.$ui.showToast('请输入正确的手机号');
+ return false;
+ }
+ if (!smsCode.value) {
+ uni.$ui.showToast('验证码无效');
+ return false;
+ }
+
+ if (phone.value === user.value.phone) {
+ uni.$ui.showToast('新手机号不能与旧手机号相同');
+ return;
+ }
+ return true;
+ }
+
+ /**
+ * 验证手机号格式
+ * @param {string} phone 手机号
+ */
+ function verifyPhone(phone) {
+ const phoneExg = /^1\d{10}$/;
+ return phoneExg.test(phone);
+ }
+
+ /**
+ * 验证账号/密码 格式
+ * @param {string} account 账号
+ */
+ function verifyLoginname(account) {
+ const accountExg = /^[a-zA-Z0-9._-]{2,20}$/;
+ return accountExg.test(account);
+ }
+
+ // 微信登录
+ function handleWxLogin() {
+ const origin = `${Config.baseUrl}/pt-mui`; // 测试
+ const appid = 'wxd1842e073e0e6d91';
+ const state = 'wx_web';
+ const href = 'https://open.weixin.qq.com/connect/qrconnect';
+ // eslint-disable-next-line
+ window.location.href =
+ `${href}?appid=${appid}&redirect_uri=${origin}&response_type=code&scope=snsapi_login&state=${state}#wechat_redirect`;
}
return {
- rules,
- errorType,
- labelPosition,
- border,
- getImageCode,
- // hasvalue,
- // getCode,
- // getCodeInterval,
- // checkRules,
- // setCode,
- // getClipboardContents,
- // verifyPhone,
- // verifyLoginname,
- // handleWxLogin
+ rules,
+ // showPaste,
+ // showInterval,
+ // interval,
+ dataObj,
+ hasvalue,
+ checkRules,
+ setCode,
+ verifyLoginname,
+ handleWxLogin
}
}
diff --git a/main.js b/main.js
index 06e6f74..8f37209 100644
--- a/main.js
+++ b/main.js
@@ -9,12 +9,14 @@ import { setupRole } from '@/apis/role.js';
import { setupTall } from '@/apis/tall.js';
import { setupTask } from '@/apis/task.js';
import { setupWbs } from '@/apis/wbs.js';
+import { setupPlugin } from '@/apis/plugin.js';
import storage from '@/utils/storage.js';
import store from './store';
import task from '@/utils/task.js';
import time from '@/utils/time.js';
import timeConfig from '@/config/time';
import taskConfig from '@/config/task';
+import pluginConfig from '@/config/plugin';
import uView from './uni_modules/vk-uview-ui'; // 引入 uView UI
import ui from '@/utils/ui.js';
import upload from '@/utils/upload.js';
@@ -31,6 +33,7 @@ export function createApp() {
app.config.globalProperties.$task = task;
app.config.globalProperties.$timeConfig = timeConfig;
app.config.globalProperties.$taskConfig = taskConfig;
+ app.config.globalProperties.$pluginConfig = pluginConfig;
uni.$cache = cache;
uni.$catchReq = cacheAndRequest;
@@ -41,6 +44,7 @@ export function createApp() {
uni.$task = task;
uni.$timeConfig = timeConfig;
uni.$taskConfig = taskConfig;
+ uni.$pluginConfig = pluginConfig;
setupDayjs(app);
app.use(uView); // 使用 uView UI
@@ -51,6 +55,7 @@ export function createApp() {
setupRole(app);
setupTask(app);
setupWbs(app);
+ setupPlugin(app);
return {
app,
diff --git a/manifest.json b/manifest.json
index 5dc57cd..2c13e4f 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,6 +1,6 @@
{
- "name" : "tall-4-project",
- "appid" : "__UNI__1EC8558",
+ "name" : "时物链条",
+ "appid" : "__UNI__3CBCFFF",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
@@ -43,7 +43,41 @@
/* ios打包配置 */
"ios" : {},
/* SDK配置 */
- "sdkConfigs" : {}
+ "sdkConfigs" : {
+ "ad" : {}
+ },
+ "icons" : {
+ "android" : {
+ "hdpi" : "unpackage/res/icons/72x72.png",
+ "xhdpi" : "unpackage/res/icons/96x96.png",
+ "xxhdpi" : "unpackage/res/icons/144x144.png",
+ "xxxhdpi" : "unpackage/res/icons/192x192.png"
+ },
+ "ios" : {
+ "appstore" : "unpackage/res/icons/1024x1024.png",
+ "ipad" : {
+ "app" : "unpackage/res/icons/76x76.png",
+ "app@2x" : "unpackage/res/icons/152x152.png",
+ "notification" : "unpackage/res/icons/20x20.png",
+ "notification@2x" : "unpackage/res/icons/40x40.png",
+ "proapp@2x" : "unpackage/res/icons/167x167.png",
+ "settings" : "unpackage/res/icons/29x29.png",
+ "settings@2x" : "unpackage/res/icons/58x58.png",
+ "spotlight" : "unpackage/res/icons/40x40.png",
+ "spotlight@2x" : "unpackage/res/icons/80x80.png"
+ },
+ "iphone" : {
+ "app@2x" : "unpackage/res/icons/120x120.png",
+ "app@3x" : "unpackage/res/icons/180x180.png",
+ "notification@2x" : "unpackage/res/icons/40x40.png",
+ "notification@3x" : "unpackage/res/icons/60x60.png",
+ "settings@2x" : "unpackage/res/icons/58x58.png",
+ "settings@3x" : "unpackage/res/icons/87x87.png",
+ "spotlight@2x" : "unpackage/res/icons/80x80.png",
+ "spotlight@3x" : "unpackage/res/icons/120x120.png"
+ }
+ }
+ }
}
},
/* 快应用特有相关 */
diff --git a/pages.json b/pages.json
index 8f7cb6a..611bd70 100644
--- a/pages.json
+++ b/pages.json
@@ -12,13 +12,38 @@
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
- },
+ },
+ // 用户名密码登录
{
"path": "pages/user/accountLogin",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
+ },
+ // 手机号登录
+ {
+ "path": "pages/user/login",
+ "style": {
+ "navigationStyle": "custom",
+ "navigationBarTextStyle": "white"
+ }
+ },
+ // 注册
+ {
+ "path": "pages/user/rigister",
+ "style": {
+ "navigationStyle": "custom",
+ "navigationBarTextStyle": "white"
+ }
+ },
+ // 用户协议
+ {
+ "path": "pages/user/agreement",
+ "style": {
+ "navigationStyle": "custom",
+ "navigationBarTextStyle": "white"
+ }
}
,{
"path" : "pages/submitList/submitList",
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 5b0349e..7daadb6 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -7,7 +7,7 @@
-
+登录
@@ -75,20 +75,22 @@ const onDateChange = event => {
// 导入成功
const onUploadSuccess = () => {
- uTips.show({
- title: '导入成功,即将打开新项目',
- type: 'success',
- duration: '3000',
- });
+ uni.$ui.showToast('导入成功,即将打开新项目', 3000);
+ // uTips.show({
+ // title: '导入成功,即将打开新项目',
+ // type: 'success',
+ // duration: '3000',
+ // });
};
// 导入失败
const onUploadError = error => {
- uTips.show({
- title: error || '导入失败',
- type: 'error',
- duration: '6000',
- });
+ uni.$ui.showToast('导入失败', 6000);
+ // uTips.show({
+ // title: error || '导入失败',
+ // type: 'error',
+ // duration: '6000',
+ // });
};
// 监听触摸滑动 切换日历的模式 月/周
@@ -104,6 +106,10 @@ function onMove(event) {
prevY = y;
data.value.calendar.initDate();
}
+
+function toLogin() {
+ uni.navigateTo({ url: '/pages/user/accountLogin' })
+}
diff --git a/pages/user/forgetPassword.vue b/pages/user/forgetPassword.vue
new file mode 100644
index 0000000..48d48ea
--- /dev/null
+++ b/pages/user/forgetPassword.vue
@@ -0,0 +1,8 @@
+
+
+
+
+
+
diff --git a/pages/user/login.vue b/pages/user/login.vue
index 48d48ea..d44648c 100644
--- a/pages/user/login.vue
+++ b/pages/user/login.vue
@@ -1,8 +1,146 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 粘贴
+ {{ mixinInit.dataObj.interval }}
+
+
+
+
+ 忘记密码
+
+
+
+
+ 立即登录
+
+
+
+ 新用户注册
+ 用户名登录
+
+
+
+ 快速登录
+
+
+
+
+
-
-
diff --git a/pages/user/mixin.js b/pages/user/mixin.js
deleted file mode 100644
index b8420f2..0000000
--- a/pages/user/mixin.js
+++ /dev/null
@@ -1,266 +0,0 @@
-import { ref, computed } from 'vue';
-import { useStore } from 'vuex';
-import clipboard from "@/common/js/dc-clipboard/clipboard.js"
-
-export default function mixinInit {
- const store = useStore();
- const user = computed(() => store.state.user.user);
- const rules = ref({
- phone: [
- {
- required: true,
- message: '请输入手机号',
- trigger: ['change','blur'],
- },
- {
- validator: (rule, value, callback) => {
- // 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
- return this.$u.test.mobile(value);
- },
- message: '手机号码不正确',
- // 触发器可以同时用blur和change,二者之间用英文逗号隔开
- trigger: ['change','blur'],
- }
- ],
- verificationCodeValue: [
- {
- required: true,
- message: '请输入图形验证码',
- trigger: ['change','blur'],
- },
- {
- type: 'number',
- message: '图形验证码只能为数字',
- trigger: ['change','blur'],
- }
- ],
- smsCode: [
- {
- required: true,
- message: '请输入验证码',
- trigger: ['change','blur'],
- },
- {
- type: 'number',
- message: '验证码只能为数字',
- trigger: ['change','blur'],
- }
- ],
- account: [
- {
- required: true,
- message: '请输入用户名',
- trigger: ['change','blur'],
- },
- {
- min: 2,
- max: 20,
- message: '用户名长度在2到20个字符',
- trigger: ['change','blur'],
- },
- {
- pattern: /^[a-zA-Z0-9._-]{2,20}$/,
- message: '请输入2-20位字母、数字、汉字或字符"_ - ."',
- trigger: ['change','blur'],
- }
- ],
- password: [
- {
- required: true,
- message: '请输入密码',
- trigger: ['change','blur'],
- },
- {
- min: 6,
- max: 20,
- message: '密码长度在6到20个字符',
- trigger: ['change','blur'],
- },
- {
- // 正则不能含有两边的引号
- pattern: /^[a-zA-Z0-9._-]{6,20}$/,
- message: '请输入6-20位字母、数字、汉字或字符"_ - ."',
- trigger: ['change','blur'],
- }
- ],
- });
- const errorType = ref(['message']);
- const labelPosition = ref('left');
- const border = ref(false);
- const smsCode = ref(''); // 短信验证码
- const showInterval = ref(false);
- const interval = ref(120);
- const codeTimer = ref(null);
- const showPaste = ref(false);
-
- return {
- errorType,
- // getImageCode,
- // hasvalue,
- // getCode,
- // getCodeInterval,
- // checkRules,
- // setCode,
- // getClipboardContents,
- // verifyPhone,
- // verifyLoginname,
- // handleWxLogin
- }
-}
-
-
-// const mixin = {
- // computed: mapState('user', ['user']),
-
- // onReady() {
- // this.$refs.uForm.setRules(this.rules);
- // },
-
- // methods: {
- // ...mapActions('user', ['sendCode']),
-
- // 获取图形验证码
- // async getImageCode() {
- // this.$util.showLoading();
- // try {
- // const data = await uni.$u.api.getImageCode();
- // const { imageBase64, verificationCodeId } = data;
- // this.imageBase64 = imageBase64 || '';
- // this.verificationCodeId = verificationCodeId || '';
- // uni.hideLoading();
- // } catch (error) {
- // uni.hideLoading();
- // uni.$ui.showToast(error);
- // }
- // },
-
- // //有图片验证码的值
- // hasvalue() {
- // if(this.model.smsCode || this.model.showPaste) return
- // if (!this.verifyPhone(this.model.phone)) {
- // uni.$ui.showToast('请输入正确的手机号');
- // return;
- // }
- // if (!this.model.verificationCodeValue) {
- // uni.$ui.showToast('请输入图形验证码');
- // return;
- // }
- // this.getCode();
- // },
-
- // // 获取验证码
- // async getCode() {
- // try {
- // const { phone, verificationCodeValue } = this.model;
- // const { verificationCodeId } = this;
-
- // if (!verificationCodeId || !verificationCodeValue) {
- // uni.$ui.showToast('缺少图形验证码参数');
- // return;
- // }
- // const params = {
- // phone,
- // verificationCodeId,
- // verificationCodeValue,
- // };
- // const date = await store.dispatch('user/sendCode', params);
- // getCodeInterval();
- // showPaste.value = true;
- // } catch (err) {
- // throw err;
- // }
- // },
-
- // // 获取验证码倒计时
- // getCodeInterval() {
- // this.showInterval = true;
- // this.codeTimer = setInterval(() => {
- // if (this.interval === 0) {
- // clearInterval(this.codeTimer);
- // this.codeTimer = null;
- // this.showInterval = false;
- // this.interval = 120;
- // return;
- // }
- // this.interval = this.interval - 1;
- // }, 1000);
- // },
-
- // // 验证信息
- // checkRules() {
- // // const { smsCode, phone, user } = this;
- // if (!this.verifyPhone(phone.value)) {
- // uni.$ui.showToast('请输入正确的手机号');
- // return false;
- // }
- // if (!smsCode.value) {
- // uni.$ui.showToast('验证码无效');
- // return false;
- // }
-
- // if (phone.value === user.value.phone) {
- // uni.$ui.showToast('新手机号不能与旧手机号相同');
- // return;
- // }
- // return true;
- // },
-
- // // 粘贴
- // setCode() {
- // // 获取粘贴板内容
- // // 小程序平台
- // //#ifdef MP-WEIXIN
- // var _this = this
- // uni.getClipboardData({
- // success (res) {
- // _this.smsCode = res.data;
- // }
- // });
- // //#endif
-
- // // 非小程序平台
- // //#ifndef MP-WEIXIN
- // this.getClipboardContents()
- // //#endif
- // },
-
- // // 非小程序平台粘贴
- // async getClipboardContents() {
- // try {
- // const text = await navigator.clipboard.readText();
- // this.smsCode = text;
- // } catch (err) {
- // console.error('Failed to read clipboard contents: ', err);
- // }
- // },
-
- // /**
- // * 验证手机号格式
- // * @param {string} phone 手机号
- // */
- // verifyPhone(phone) {
- // const phoneExg = /^1\d{10}$/;
- // return phoneExg.test(phone);
- // },
-
- // /**
- // * 验证账号/密码 格式
- // * @param {string} account 账号
- // */
- // verifyLoginname(account) {
- // const accountExg = /^[a-zA-Z0-9._-]{2,20}$/;
- // return accountExg.test(account);
- // },
-
- // // 微信登录
- // handleWxLogin() {
- // const origin = 'https://test.tall.wiki/pt-mui'; // 测试
- // const appid = 'wxd1842e073e0e6d91';
- // const state = 'wx_web';
- // const href = 'https://open.weixin.qq.com/connect/qrconnect';
- // // eslint-disable-next-line
- // window.location.href =
- // `${href}?appid=${appid}&redirect_uri=${origin}&response_type=code&scope=snsapi_login&state=${state}#wechat_redirect`;
- // },
- // // }
-// };
diff --git a/pages/user/rigister.vue b/pages/user/rigister.vue
new file mode 100644
index 0000000..3493e65
--- /dev/null
+++ b/pages/user/rigister.vue
@@ -0,0 +1,159 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 粘贴
+ {{ mixinInit.dataObj.interval }}
+
+
+
+
+
+
+
+
+
+
+
+
+ 忘记密码
+
+
+
+
+ 立即注册
+
+
+
+
+
+
+ 已阅读并同意使用
+ 《时物链条用户协议》
+
+
+ 没有套路,真实需求
+
+
+
+
+ 已有账号,去登录
+
+
+
+
+
+
+
diff --git a/plugins/p-deliver-check/p-deliver-check.vue b/plugins/p-deliver-check/p-deliver-check.vue
new file mode 100644
index 0000000..5837304
--- /dev/null
+++ b/plugins/p-deliver-check/p-deliver-check.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+ {{ wordNum }}/140
+
+
+
+
+
+
+
+ 提交
+ 取消
+
+
+
+
+
+
+
+
diff --git a/plugins/p-deliver/p-deliver.vue b/plugins/p-deliver/p-deliver.vue
index 38b4637..840661c 100644
--- a/plugins/p-deliver/p-deliver.vue
+++ b/plugins/p-deliver/p-deliver.vue
@@ -1,28 +1,27 @@
-
+
-
+
-
-
- {{iptValue}}
- 提交
+
+
+ {{ iptValue }}
+ 提交
-
- {{iptValue}}
+
+ {{ iptValue }}
-
-
+
- 粘贴
- 文件
- 拍照
+ 粘贴
+ 文件
+ 拍照
@@ -30,173 +29,170 @@
-
-
-
- 交付物标题名称
-
-
-
-
-
-
- 取消
-
-
- 确定
-
-
-
+
+
+ 交付物标题名称
+
+
+
+
+ 取消
+ 确定
+
-
+
+
-
- 修改
- 删除
+
+ 修改
+ 删除
-
-
-
-
+
+
+
+ p-deliver
+
-
diff --git a/plugins/p-delivery-history/p-delivery-history.vue b/plugins/p-delivery-history/p-delivery-history.vue
new file mode 100644
index 0000000..3ced255
--- /dev/null
+++ b/plugins/p-delivery-history/p-delivery-history.vue
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+ {{ list.name }}
+ {{ $moment(+list.time).format('YYYY-MM-DD HH:mm:ss') }}
+
+
+ {{ list.content }}
+ {{ list.content }}
+
+
+
+
+ {{ checker.checkerName }}
+ (我)
+
+
+ 通过
+ 驳回
+ {{ checker.score }}分
+ 未审核
+
+ 驳回
+ 通过
+
+
+
+ {{ checker.remark }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/p-manage-member/p-manage-member.vue b/plugins/p-manage-member/p-manage-member.vue
new file mode 100644
index 0000000..26a6d83
--- /dev/null
+++ b/plugins/p-manage-member/p-manage-member.vue
@@ -0,0 +1,17 @@
+
+
+ 成员管理
+
+
+
+
+
+
diff --git a/plugins/p-manage-project/p-manage-project.vue b/plugins/p-manage-project/p-manage-project.vue
new file mode 100644
index 0000000..9b305cd
--- /dev/null
+++ b/plugins/p-manage-project/p-manage-project.vue
@@ -0,0 +1,17 @@
+
+
+ 项目管理
+
+
+
+
+
+
diff --git a/plugins/p-manage-role/p-manage-role.vue b/plugins/p-manage-role/p-manage-role.vue
new file mode 100644
index 0000000..1567a21
--- /dev/null
+++ b/plugins/p-manage-role/p-manage-role.vue
@@ -0,0 +1,17 @@
+
+
+ 角色管理
+
+
+
+
+
+
diff --git a/plugins/p-manage-task/p-manage-task.vue b/plugins/p-manage-task/p-manage-task.vue
new file mode 100644
index 0000000..73a4a39
--- /dev/null
+++ b/plugins/p-manage-task/p-manage-task.vue
@@ -0,0 +1,17 @@
+
+
+ 任务管理
+
+
+
+
+
+
diff --git a/plugins/p-subproject/p-subproject.vue b/plugins/p-subproject/p-subproject.vue
new file mode 100644
index 0000000..2228352
--- /dev/null
+++ b/plugins/p-subproject/p-subproject.vue
@@ -0,0 +1,61 @@
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
diff --git a/plugins/p-subtasks/p-subtasks.vue b/plugins/p-subtasks/p-subtasks.vue
new file mode 100644
index 0000000..b9b8a36
--- /dev/null
+++ b/plugins/p-subtasks/p-subtasks.vue
@@ -0,0 +1,38 @@
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
diff --git a/plugins/p-task-countdown/p-task-countdown.vue b/plugins/p-task-countdown/p-task-countdown.vue
new file mode 100644
index 0000000..a334968
--- /dev/null
+++ b/plugins/p-task-countdown/p-task-countdown.vue
@@ -0,0 +1,19 @@
+
+
+
+ 任务倒计时插件
+
+
+
+
+
+
diff --git a/plugins/p-task-description/p-task-description.vue b/plugins/p-task-description/p-task-description.vue
new file mode 100644
index 0000000..8b37892
--- /dev/null
+++ b/plugins/p-task-description/p-task-description.vue
@@ -0,0 +1,20 @@
+
+
+
+ {{ task.description }}
+
+
+
+
+
+
diff --git a/plugins/p-task-duration-delay/p-task-duration-delay.vue b/plugins/p-task-duration-delay/p-task-duration-delay.vue
new file mode 100644
index 0000000..8495b4f
--- /dev/null
+++ b/plugins/p-task-duration-delay/p-task-duration-delay.vue
@@ -0,0 +1,32 @@
+
+
+
+
+
+ +{{ $time.formatDuration(realDuration - planDuration) }}
+
+
+
+ -{{ $time.formatDuration(planDuration - realDuration) }}
+
+
+
+
+
+
+
diff --git a/plugins/p-task-start-time-delay/p-task-start-time-delay.vue b/plugins/p-task-start-time-delay/p-task-start-time-delay.vue
new file mode 100644
index 0000000..4a05c20
--- /dev/null
+++ b/plugins/p-task-start-time-delay/p-task-start-time-delay.vue
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+ {{ $time.formatDuration(+realStart - +planStart) }}
+
+
+
+
+
+
+
diff --git a/plugins/p-task-title/p-task-title.vue b/plugins/p-task-title/p-task-title.vue
index 6831b9c..fce10df 100644
--- a/plugins/p-task-title/p-task-title.vue
+++ b/plugins/p-task-title/p-task-title.vue
@@ -1,12 +1,24 @@
+
{{ task.name }}
+
+
+ {{ task.name }}
+
-
+
diff --git a/plugins/p-upload-deliverable/p-upload-deliverable.vue b/plugins/p-upload-deliverable/p-upload-deliverable.vue
new file mode 100644
index 0000000..64309af
--- /dev/null
+++ b/plugins/p-upload-deliverable/p-upload-deliverable.vue
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/p-wbs-import/p-wbs-import.vue b/plugins/p-wbs-import/p-wbs-import.vue
new file mode 100644
index 0000000..9f04c8d
--- /dev/null
+++ b/plugins/p-wbs-import/p-wbs-import.vue
@@ -0,0 +1,80 @@
+
+
+ {{ task.name }}
+ {{ task.name }}
+
+
+
+
+
+
+
+
diff --git a/store/task/actions.js b/store/task/actions.js
index 2ff1f56..15a5909 100644
--- a/store/task/actions.js
+++ b/store/task/actions.js
@@ -5,7 +5,9 @@ const actions = {
* @param {string} roleId 角色id
*/
getPermanent({ commit }, param) {
+ commit('setShowGlobalSkeleton', true);
uni.$catchReq.getPermanent(param, (err, data) => {
+ commit('setShowGlobalSkeleton', false);
if (err) {
console.error('err: ', err);
} else {
@@ -20,7 +22,9 @@ const actions = {
* @param {object} param 请求参数 roleId, timeNode, timeUnit
*/
getGlobal({ commit }, param) {
+ commit('setShowGlobalSkeleton', true);
uni.$catchReq.getGlobal(param, (err, data) => {
+ commit('setShowGlobalSkeleton', false);
if (err) {
console.error('err: ', err);
} else {
diff --git a/store/task/mutations.js b/store/task/mutations.js
index 01d9dd7..af17063 100644
--- a/store/task/mutations.js
+++ b/store/task/mutations.js
@@ -225,6 +225,15 @@ const mutations = {
state.showSkeleton = show;
},
+ /**
+ * 设置日常任务骨架屏是否显示
+ * @param {Object} state
+ * @param {Boolean} show
+ */
+ setShowGlobalSkeleton(state, show) {
+ state.showGlobalSkeleton = show;
+ },
+
/**
* 是否设置时间轴自动滚动的位置
* @param {Object} state
diff --git a/store/task/state.js b/store/task/state.js
index 023378d..ae3cca5 100644
--- a/store/task/state.js
+++ b/store/task/state.js
@@ -18,6 +18,7 @@ const state = {
dailyTasks: [], // 日常任务
tasks: [], // 所有的定期任务
showSkeleton: false, // 定期任务骨架屏
+ showGlobalSkeleton: false, // 日常任务骨架屏
newProjectInfo: {},
showScrollTo: false, // 是否可以设置时间轴自动滚动的位置
};
diff --git a/store/user/actions.js b/store/user/actions.js
index bb9dec8..520ada6 100644
--- a/store/user/actions.js
+++ b/store/user/actions.js
@@ -1,5 +1,3 @@
-import ui from '@/utils/ui.js';
-
const actions = {
/**
* 通过userId获取token
@@ -15,7 +13,23 @@ const actions = {
uni.$storage.setStorageSync('user', JSON.stringify(res));
return res;
} catch (error) {
- ui.showToast(error.msg || '获取个人信息失败');
+ uni.$ui.showToast(error.msg || '获取个人信息失败');
+ throw error;
+ }
+ },
+
+ /**
+ * 发送验证码
+ * @param {ant} commit
+ * @param {object} params 要提交的数据
+ * @param {string} params.phone 手机号
+ */
+ async sendCode({ commit }, params) {
+ try{
+ const res = await uni.$u.api.getSmsCode(params);
+ uni.$ui.showToast('验证码发送成功');
+ } catch (error) {
+ uni.$ui.showToast(error.msg || '发送失败');
throw error;
}
},
diff --git a/utils/cacheAndRequest.js b/utils/cacheAndRequest.js
index f04baa7..cb0598a 100644
--- a/utils/cacheAndRequest.js
+++ b/utils/cacheAndRequest.js
@@ -83,7 +83,6 @@ export default {
uni.$cache
.getStorageRegularTask(params)
.then(data => {
- console.log('cache data: ', data);
!remote && fn(null, data);
})
.catch(err => !remote && fn(err));
@@ -93,7 +92,6 @@ export default {
uni.$u.api
.getRegularTask(params)
.then(data => {
- console.log('api data: ', uni.$u.deepClone(data));
remote = true;
fn(null, uni.$u.deepClone(data));
diff --git a/utils/upload.js b/utils/upload.js
index 91139d3..60e4d25 100644
--- a/utils/upload.js
+++ b/utils/upload.js
@@ -55,8 +55,8 @@ export default {
*/
chooseAndUpload(url, formData = {}, extension = ['.xls', '.xlsx'], name = 'param') {
uni.hideLoading();
- clearTimeout(timer);
let timer = null;
+ clearTimeout(timer);
return new Promise((resolve, reject) => {
const token = uni.$storage.getStorageSync('anyringToken');
if (!token) {