From 7781c7b657122a829ef631579c656754ff6b8928 Mon Sep 17 00:00:00 2001 From: wally <18603454788@163.com> Date: Wed, 25 Aug 2021 18:42:13 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=8F=AA=E4=BF=9D=E7=95=99project?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/components/Calendar/Calendar.vue | 473 ------------------ src/components/Calendar/generateDates.js | 136 ----- src/components/ImageCode/ImageCode.vue | 37 -- src/components/Projects/ProjectItem.vue | 7 - src/components/Projects/Projects.vue | 72 --- src/pages.json | 18 - src/pages/index/index.vue | 130 ----- src/pages/phone-bind/phone-bind.vue | 189 ------- src/pages/project-webview/project-webview.vue | 11 - src/pages/test/test.vue | 55 -- src/static/local_play1.png | Bin 853 -> 0 bytes src/static/logo.png | Bin 4023 -> 0 bytes 13 files changed, 1 insertion(+), 1128 deletions(-) delete mode 100644 src/components/Calendar/Calendar.vue delete mode 100644 src/components/Calendar/generateDates.js delete mode 100644 src/components/ImageCode/ImageCode.vue delete mode 100644 src/components/Projects/ProjectItem.vue delete mode 100644 src/components/Projects/Projects.vue delete mode 100644 src/pages/index/index.vue delete mode 100644 src/pages/phone-bind/phone-bind.vue delete mode 100644 src/pages/project-webview/project-webview.vue delete mode 100644 src/pages/test/test.vue delete mode 100644 src/static/local_play1.png delete mode 100644 src/static/logo.png diff --git a/CHANGELOG.md b/CHANGELOG.md index d01e1a0..265cc4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ - | 添加时间轴上下滚动 | 2b81bbc - | 添加项目排序 | a0b491b - | 点击日历日期查询项目列表 | c458385 + - | 细节调整,添加project-webview | 4d9050b - | 绑定手机号 | 52e0352 - | 缓存修改 | 63e1f0d - | 角色栏实现 | 94cd671 diff --git a/src/components/Calendar/Calendar.vue b/src/components/Calendar/Calendar.vue deleted file mode 100644 index 57afd47..0000000 --- a/src/components/Calendar/Calendar.vue +++ /dev/null @@ -1,473 +0,0 @@ - - - - - diff --git a/src/components/Calendar/generateDates.js b/src/components/Calendar/generateDates.js deleted file mode 100644 index c08fc6a..0000000 --- a/src/components/Calendar/generateDates.js +++ /dev/null @@ -1,136 +0,0 @@ -/* - *此函数的作用是根据传入的一个日期,返回这一周的日期或者这一个月的日期, - * 如果是月的话注意还包含上个月和下个月的日期,月的话总共数据有 6 * 7 = 42个 - * - */ -/* - * 时间格式化函数 - * 重要提示,微信小程序new Date('2020-04-16')在ios中无法获取时间对象 - * 解决方式: 建议将时间都格式化成'2020/04/16 00:00:00'的格式 - * 函数示例: formatDate(new Date(), 'YYYY/MM/dd hh:mm:ss') - */ -export const formatDate = (date, fmt) => { - if (/(y+)/.test(fmt)) { - fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length)); - } - let o = { - 'M+': date.getMonth() + 1, - 'd+': date.getDate(), - 'h+': date.getHours(), - 'm+': date.getMinutes(), - 's+': date.getSeconds(), - }; - for (let k in o) { - if (new RegExp(`(${k})`).test(fmt)) { - let str = o[k] + ''; - fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : padLeftZero(str)); - } - } - return fmt; -}; -const padLeftZero = str => { - return ('00' + str).substr(str.length); -}; - -// 判断是不是date对象 -export const judgeType = s => { - // 函数返回数据的具体类型 - return Object.prototype.toString.call(s).slice(8, -1); -}; - -export const equalDate = (d1, d2) => { - let result = false; - if (d1.getFullYear() === d2.getFullYear() && d1.getMonth() === d2.getMonth() && d1.getDate() === d2.getDate()) { - result = true; - } - return result; -}; - -/* 比较时间,时间格式为2020-04-04 - */ -export const dateEqual = (before, after) => { - before = new Date(before.replace('-', '/').replace('-', '/')); - after = new Date(after.replace('-', '/').replace('-', '/')); - if (before.getTime() - after.getTime() === 0) { - return true; - } else { - return false; - } -}; - -export const gegerateDates = (date = new Date(), type = 'week') => { - const result = []; - if (judgeType(date) === 'Date') { - // 年,月,日 - const y = date.getFullYear(); - const m = date.getMonth(); - const d = date.getDate(); - const days = new Date(y, m + 1, 0).getDate(); - // 获取日期是星期几 - // let weekIndex = date.getDay() === 0 ? 7 : date.getDay(); - let weekIndex = date.getDay(); - if (type === 'month') { - const dobj = new Date(y, m, 1); - // weekIndex = dobj.getDay() === 0 ? 7 : dobj.getDay(); - weekIndex = dobj.getDay(); - } - if (type === 'week') { - for (let i = weekIndex; i > 0; i--) { - const dtemp = new Date(y, m, d); - dtemp.setDate(dtemp.getDate() - i); - result.push({ - time: dtemp, - show: true, - fullDate: formatDate(dtemp, 'yyyy-MM-dd'), - isToday: equalDate(new Date(), dtemp), - }); - } - for (let i = 0; i <= 7 - weekIndex; i++) { - const dtemp = new Date(y, m, d); - dtemp.setDate(dtemp.getDate() + i); - result.push({ - time: dtemp, - show: true, - fullDate: formatDate(dtemp, 'yyyy-MM-dd'), - isToday: equalDate(new Date(), dtemp), - }); - } - } else if (type === 'month') { - // 上个月 - for (let i = weekIndex; i > 0; i--) { - const dtemp = new Date(y, m, 1); - dtemp.setDate(dtemp.getDate() - i); - result.push({ - time: dtemp, - show: false, - fullDate: formatDate(dtemp, 'yyyy-MM-dd'), - isToday: equalDate(new Date(), dtemp), - }); - } - // 这个月的日期 - for (let i = 0; i < days; i++) { - const dtemp = new Date(y, m, 1); - dtemp.setDate(dtemp.getDate() + i); - result.push({ - time: dtemp, - show: true, - fullDate: formatDate(dtemp, 'yyyy-MM-dd'), - isToday: equalDate(new Date(), dtemp), - }); - } - const len = 42 - result.length; - // 下个月的日期 - for (let i = 1; i <= len; i++) { - const dtemp = new Date(y, m + 1, 0); - dtemp.setDate(dtemp.getDate() + i); - result.push({ - time: dtemp, - show: false, - fullDate: formatDate(dtemp, 'yyyy-MM-dd'), - isToday: equalDate(new Date(), dtemp), - }); - } - } - } - return result; -}; diff --git a/src/components/ImageCode/ImageCode.vue b/src/components/ImageCode/ImageCode.vue deleted file mode 100644 index c8a67b8..0000000 --- a/src/components/ImageCode/ImageCode.vue +++ /dev/null @@ -1,37 +0,0 @@ - - - - - diff --git a/src/components/Projects/ProjectItem.vue b/src/components/Projects/ProjectItem.vue deleted file mode 100644 index 84ff924..0000000 --- a/src/components/Projects/ProjectItem.vue +++ /dev/null @@ -1,7 +0,0 @@ - - diff --git a/src/components/Projects/Projects.vue b/src/components/Projects/Projects.vue deleted file mode 100644 index 326ef55..0000000 --- a/src/components/Projects/Projects.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - - - diff --git a/src/pages.json b/src/pages.json index cb0c667..9647dde 100644 --- a/src/pages.json +++ b/src/pages.json @@ -1,29 +1,11 @@ { "pages": [ - { - "path": "pages/index/index", - "style": { - "navigationBarText": "TALL" - } - }, { "path": "pages/project/project", "style": { "navigationStyle": "custom", "navigationBarTextStyle": "white" } - }, - { - "path": "pages/phone-bind/phone-bind", - "style": { - "navigationBarTitleText": "绑定手机号" - } - }, - { - "path": "pages/project-webview/project-webview", - "style": { - "navigationBarTitleText": "project-webview" - } } ], "globalStyle": { diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue deleted file mode 100644 index d27bd50..0000000 --- a/src/pages/index/index.vue +++ /dev/null @@ -1,130 +0,0 @@ - - - - - diff --git a/src/pages/phone-bind/phone-bind.vue b/src/pages/phone-bind/phone-bind.vue deleted file mode 100644 index 000532b..0000000 --- a/src/pages/phone-bind/phone-bind.vue +++ /dev/null @@ -1,189 +0,0 @@ - - - - - diff --git a/src/pages/project-webview/project-webview.vue b/src/pages/project-webview/project-webview.vue deleted file mode 100644 index 08af3bd..0000000 --- a/src/pages/project-webview/project-webview.vue +++ /dev/null @@ -1,11 +0,0 @@ - - - diff --git a/src/pages/test/test.vue b/src/pages/test/test.vue deleted file mode 100644 index 5ec1fc1..0000000 --- a/src/pages/test/test.vue +++ /dev/null @@ -1,55 +0,0 @@ - - - diff --git a/src/static/local_play1.png b/src/static/local_play1.png deleted file mode 100644 index bb6ac2ca1df97283dde95045941ef9655b00a7fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 853 zcmV-b1FHOqP)%2 z1j}FyDN@Bk-4L}96%<89&?NfFfw#-d?7V$%=DnSrS?9oGnBks#zwe%N@A=Lf(cz{J z$4{5QL`Se2fo=o}?!e?sA=?Xpv%r_Yyn>rl)cpx?4cH;+QSD@-B4B$i@E5SS=*lJg z-vic23PK}RkH86Fcgc&FHQgymRoLng7y?$5wBk#^z>JdS`&-h=tO&dUrj@i{oTJ#J z?Iq3kTGI4Z5?G%Qh(lP0wUoe+q*a01_AQ_)^i8s9DS^F`jwJ;40Y{qzUFp^`0{;OE zB|T0E%m?lRQwx%48G)ZAZK(un`xjtSrx4g6=}HZOZ-GngK;SL#9C()UM7cjGDenIf zv;9H*o=B6~K;<(h`93STwbFRzN}Ikvh91rC}Jmskglx_$LG4`3SG1H;oXn{ULAx*qY(jBk6Y9n5+ma15%wU zCXG~zl#0~Kv_!JUjTC1s%a%*J(=34yVIj!!*eIo#=487O#oJs8+5R*+#PONOu1fkk z&p_K(fv@t61)_oJl@ygc`w%DL{Q~%*!LDpT(xE({Y!4(gA!{T+n)o`o`&s_^k5i_?bx^%z$Xoo7&ihJ zC2bBciDc*p4hN|OV1PXU3=WgDeG&MsT?q6`I$^sPI0vjv0rn@bP0|h9L2|HN2=pZd zDH@k48K9zqM|1OIa?3TsVO&z^Um)^(X(LFI0vYd~K5D>kTnIF!K6 zZcFN^1Xiz*odkBZBl?i`lB%$E+RNQ&Y^oG*T{+#+uh-i&by8tX&VOh+DGJ>POmwum f5$Hys;10Y4ol`SFLHS^500000NkvXXu0mjf+t!T! diff --git a/src/static/logo.png b/src/static/logo.png deleted file mode 100644 index b5771e209bb677e2ebd5ff766ad5ee11790f305a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4023 zcmaJ^c|25Y`#+XyC`+5OUafkYqmlSEl)+V zC53EJB$S8m@9Vz4*Y&-Yb3W(3Y;(d~fM1#)0003Cvn<7K1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