Browse Source

1. 自定义日历,添加展开缩进功能

Cee Yang 3 years ago
parent
commit
ecfb756066

+ 2 - 2
App.vue

@@ -15,6 +15,6 @@
 <style lang="scss">
 <style lang="scss">
 	/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
 	/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
 	@import "@/uni_modules/uview-ui/index.scss";
 	@import "@/uni_modules/uview-ui/index.scss";
-	@import "colorui/main.css";
-	@import "colorui/icon.css";
+	@import "./components/colorui/main.css";
+	@import "./components/colorui/icon.css";
 </style>
 </style>

+ 1 - 0
components/README.md

@@ -0,0 +1 @@
+# 第三方组件 或者 自定义组件

+ 0 - 0
colorui/animation.css → components/colorui/animation.css


+ 0 - 0
colorui/components/cu-custom.vue → components/colorui/components/cu-custom.vue


+ 0 - 0
colorui/icon.css → components/colorui/icon.css


+ 0 - 0
colorui/main.css → components/colorui/main.css


+ 424 - 0
components/ren-calendar/ren-calendar.vue

@@ -0,0 +1,424 @@
+<template>
+    <view class="calendar-wrapper">
+        <view class="header" v-if="headerBar">
+            <view class="pre" @click="changeMonth('pre')">上个月</view>
+            <view>{{y+'年'+formatNum(m)+'月'}}</view>
+            <view class="next" @click="changeMonth('next')">下个月</view>
+        </view>
+        <view class="week">
+            <view class="week-day" v-for="(item, index) in weekDay" :key="index">{{ item }}</view>
+        </view>
+        <view :class="{ hide: !monthOpen }" class="content" :style="{ height: height }">
+            <view :style="{ top: positionTop + 'rpx' }" class="days">
+                <view class="item" v-for="(item, index) in dates" :key="index">
+                    <view
+                        class="day"
+                        @click="selectOne(item, $event)"
+                        :class="{
+                            choose: choose == `${item.year}-${item.month}-${item.date}`&&item.isCurM,
+                            nolm: !item.isCurM,
+                            today: isToday(item.year, item.month, item.date),
+                            isWorkDay: isWorkDay(item.year, item.month, item.date)
+                        }"
+                    >
+                        {{ Number(item.date) }}
+                    </view>
+                    <view class="markDay" v-if="isMarkDay(item.year, item.month, item.date)&&item.isCurM"></view>
+                    <!-- <view class="today-text" v-if="isToday(item.year, item.month, item.date)">今</view> -->
+                </view>
+            </view>
+        </view>
+        <image src="https://i.loli.net/2020/07/16/2MmZsucVTlRjSwK.png" mode="scaleToFill" v-if="collapsible" @click="toggle" class="weektoggle" :class="{ down: monthOpen }"></image>
+    </view>
+</template>
+
+<script>
+export default {
+    name: 'ren-calendar',
+    props: {
+        // 星期几为第一天(0为星期日)
+        weekstart: {
+            type: Number,
+            default: 0
+        },
+        // 标记的日期
+        markDays: {
+            type: Array,
+            default: ()=>{
+                return [];
+            }
+        },
+        //是否展示月份切换按钮
+        headerBar:{
+            type: Boolean,
+            default: true
+        },
+        // 是否展开
+        open: {
+            type: Boolean,
+            default: true
+        },
+        //是否可收缩
+        collapsible:{
+            type: Boolean,
+            default: true
+        },
+        //未来日期是否不可点击
+        disabledAfter: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data() {
+        return {
+            weektext: ['日', '一', '二', '三', '四', '五', '六'],
+            y: new Date().getFullYear(), // 年
+            m: new Date().getMonth() + 1, // 月
+            dates: [], // 当前月的日期数据
+            positionTop: 0,
+            monthOpen: true,
+            choose: ''
+        };
+    },
+    created() {
+        this.dates = this.monthDay(this.y, this.m);
+        !this.open && this.toggle();
+    },
+    mounted() {
+        this.choose = this.getToday().date;
+    },
+    computed: {
+        // 顶部星期栏
+        weekDay() {
+            return this.weektext.slice(this.weekstart).concat(this.weektext.slice(0, this.weekstart));
+        },
+        height() {
+            return (this.dates.length / 7) * 80 + 'rpx';
+        }
+    },
+    methods: {
+        formatNum(num) {
+            let res = Number(num);
+            return res < 10 ? '0' + res : res;
+        },
+        getToday() {
+            let date = new Date();
+            let y = date.getFullYear();
+            let m = date.getMonth();
+            let d = date.getDate();
+            let week = new Date().getDay();
+            let weekText = ['日', '一', '二', '三', '四', '五', '六'];
+            let formatWeek = '星期' + weekText[week];
+            let today = {
+                date: y + '-' + this.formatNum(m + 1) + '-' + this.formatNum(d),
+                week: formatWeek
+            };
+            return today;
+        },
+        // 获取当前月份数据
+        monthDay(y, month) {
+            let dates = [];
+            let m = Number(month);
+            let firstDayOfMonth = new Date(y, m - 1, 1).getDay(); // 当月第一天星期几
+            let lastDateOfMonth = new Date(y, m, 0).getDate(); // 当月最后一天
+            let lastDayOfLastMonth = new Date(y, m - 2, 0).getDate(); // 上一月的最后一天
+            let weekstart = this.weekstart == 7 ? 0 : this.weekstart;
+            let startDay = (() => {
+                // 周初有几天是上个月的
+                if (firstDayOfMonth == weekstart) {
+                    return 0;
+                } else if (firstDayOfMonth > weekstart) {
+                    return firstDayOfMonth - weekstart;
+                } else {
+                    return 7 - weekstart + firstDayOfMonth;
+                }
+            })();
+            let endDay = 7 - ((startDay + lastDateOfMonth) % 7); // 结束还有几天是下个月的
+            for (let i = 1; i <= startDay; i++) {
+                dates.push({
+                    date: this.formatNum(lastDayOfLastMonth - startDay + i),
+                    day: weekstart + i - 1 || 7,
+                    month: m - 1 >= 0 ? this.formatNum(m - 1) : 12,
+                    year: m - 1 >= 0 ? y : y - 1
+                });
+            }
+            for (let j = 1; j <= lastDateOfMonth; j++) {
+                dates.push({
+                    date: this.formatNum(j),
+                    day: (j % 7) + firstDayOfMonth - 1 || 7,
+                    month: this.formatNum(m),
+                    year: y,
+                    isCurM: true //是否当前月份
+                });
+            }
+            for (let k = 1; k <= endDay; k++) {
+                dates.push({
+                    date: this.formatNum(k),
+                    day: (lastDateOfMonth + startDay + weekstart + k - 1) % 7 || 7,
+                    month: m + 1 <= 11 ? this.formatNum(m + 1) : 0,
+                    year: m + 1 <= 11 ? y : y + 1
+                });
+            }
+            // console.log(dates);
+            return dates;
+        },
+        isWorkDay(y, m, d) {
+            //是否工作日
+            let ymd = `${y}/${m}/${d}`;
+            let formatDY = new Date(ymd.replace(/-/g, '/'));
+            let week = formatDY.getDay();
+            if (week == 0 || week == 6) {
+                return false;
+            } else {
+                return true;
+            }
+        },
+        isFutureDay(y, m, d) {
+            //是否未来日期
+            let ymd = `${y}/${m}/${d}`;
+            let formatDY = new Date(ymd.replace(/-/g, '/'));
+            let showTime = formatDY.getTime();
+            let curTime = new Date().getTime();
+            if (showTime > curTime) {
+                return true;
+            } else {
+                return false;
+            }
+        },
+        // 标记日期
+        isMarkDay(y, m, d) {
+            let flag = false;
+            for (let i = 0; i < this.markDays.length; i++) {
+                let dy = `${y}-${m}-${d}`;
+                if (this.markDays[i] == dy) {
+                    flag = true;
+                    break;
+                }
+            }
+            return flag;
+        },
+        isToday(y, m, d) {
+            let checkD = y + '-' + m + '-' + d;
+            let today = this.getToday().date;
+            if (checkD == today) {
+                return true;
+            } else {
+                return false;
+            }
+        },
+        // 展开收起
+        toggle() {
+            this.monthOpen = !this.monthOpen;
+            if (this.monthOpen) {
+                this.positionTop = 0;
+            } else {
+                let index = -1;
+                this.dates.forEach((i, x) => {
+                    this.isToday(i.year, i.month, i.date) && (index = x);
+                });
+                this.positionTop = -((Math.ceil((index + 1) / 7) || 1) - 1) * 80;
+            }
+        },
+        // 点击回调
+        selectOne(i, event) {
+            let date = `${i.year}-${i.month}-${i.date}`;
+            let selectD = new Date(date).getTime();
+            let curTime = new Date().getTime();
+            let week = new Date(date).getDay();
+            let weekText = ['日', '一', '二', '三', '四', '五', '六'];
+            let formatWeek = '星期' + weekText[week];
+            let response = {
+                date: date,
+                week: formatWeek
+            };
+            if (!i.isCurM) {
+                // console.log('不在当前月范围内');
+                return false;
+            }
+            if (selectD > curTime) {
+                if (this.disabledAfter) {
+                    console.log('未来日期不可选');
+                    return false;
+                } else {
+                    this.choose = date;
+                    this.$emit('onDayClick', response);
+                }
+            } else {
+                this.choose = date;
+                this.$emit('onDayClick', response);
+            }
+            console.log(response);
+        },
+        //改变年月
+        changYearMonth(y, m) {
+            this.dates = this.monthDay(y, m);
+            this.y = y;
+            this.m = m;
+        },
+        changeMonth(type){
+            if(type=='pre'){
+               if (this.m + 1 == 2) {
+                   this.m = 12;
+                   this.y = this.y - 1;
+               } else {
+                   this.m = this.m - 1;
+               } 
+            }else{
+                if (this.m + 1 == 13) {
+                    this.m = 1;
+                    this.y = this.y + 1;
+                } else {
+                    this.m = this.m + 1;
+                }
+            }
+            this.dates = this.monthDay(this.y, this.m);
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+.calendar-wrapper {
+    color: #bbb7b7;
+    font-size: 28rpx;
+    text-align: center;
+    background-color: #fff;
+    padding-bottom: 10rpx;
+    
+    .header{
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        height: 88rpx;
+        color: #42464A;
+        font-size: 32rpx;
+        font-weight: bold;
+        border-bottom: 2rpx solid #f2f2f2;
+        .pre,.next{
+              color: #4d7df9;
+              font-size: 28rpx;
+              font-weight: normal;
+              padding: 8rpx 15rpx;
+              border-radius: 10rpx;
+              border: 2rpx solid #dcdfe6;
+        }
+        .pre{
+            margin-right: 30rpx;
+        }
+        .next{
+            margin-left: 30rpx;
+        }
+    }
+
+    .week {
+        display: flex;
+        align-items: center;
+        height: 80rpx;
+        line-height: 80rpx;
+        border-bottom: 1rpx solid rgba(255, 255, 255, 0.2);
+
+        view {
+            flex: 1;
+        }
+    }
+
+    .content {
+        position: relative;
+        overflow: hidden;
+        transition: height 0.4s ease;
+
+        .days {
+            transition: top 0.3s;
+            display: flex;
+            align-items: center;
+            flex-wrap: wrap;
+            position: relative;
+
+            .item {
+                position: relative;
+                display: block;
+                height: 80rpx;
+                line-height: 80rpx;
+                width: calc(100% / 7);
+
+                .day {
+                    font-style: normal;
+                    display: inline-block;
+                    vertical-align: middle;
+                    width: 60rpx;
+                    height: 60rpx;
+                    line-height: 60rpx;
+                    overflow: hidden;
+                    border-radius: 60rpx;
+
+                    &.choose {
+                        background-color: #4d7df9;
+                        color: #fff;
+                    }
+
+                    &.nolm {
+                        color: #fff;
+                        opacity: 0.3;
+                    }
+                }
+                .isWorkDay {
+                    color: #42464a;
+                }
+
+                .notSigned {
+                    font-style: normal;
+                    width: 8rpx;
+                    height: 8rpx;
+                    background: #fa7268;
+                    border-radius: 10rpx;
+                    position: absolute;
+                    left: 50%;
+                    bottom: 0;
+                    pointer-events: none;
+                }
+                .today {
+                    color: #fff;
+                    background-color: #a8c0ff;
+                }
+                .workDay {
+                    font-style: normal;
+                    width: 8rpx;
+                    height: 8rpx;
+                    background: #4d7df9;
+                    border-radius: 10rpx;
+                    position: absolute;
+                    left: 50%;
+                    bottom: 0;
+                    pointer-events: none;
+                }
+                .markDay{
+                    font-style: normal;
+                    width: 8rpx;
+                    height: 8rpx;
+                    background: #fc7a64;
+                    border-radius: 10rpx;
+                    position: absolute;
+                    left: 50%;
+                    bottom: 0;
+                    pointer-events: none;
+                }
+            }
+        }
+    }
+
+    .hide {
+        height: 80rpx !important;
+    }
+
+    .weektoggle {
+        width: 85rpx;
+        height: 32rpx;
+        position: relative;
+        bottom: -42rpx;
+        &.down {
+            transform: rotate(180deg);
+            bottom: 0;
+        }
+    }
+}
+</style>

+ 4 - 0
components/uni-calendar/README.md

@@ -0,0 +1,4 @@
+# 导入 uniCalendar 并自定义, 解决以下问题:
+
+1. uniCalendar 自带的本地化不支持自动切换, 自定义采用本地自动化, 跟随语言切换变化
+2. uniCalendar 不支持删除头部, 自定义显示隐藏头部

+ 0 - 0
uni_modules/uni-calendar/components/uni-calendar/calendar.js → components/uni-calendar/calendar.js


+ 1 - 6
uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue → components/uni-calendar/uni-calendar-item.vue

@@ -51,11 +51,6 @@
 </template>
 </template>
 
 
 <script>
 <script>
-	import {
-	initVueI18n
-	} from '@dcloudio/uni-i18n'
-	import messages from './i18n/index.js'
-	const {	t	} = initVueI18n(messages)
 	export default {
 	export default {
 		emits:['change'],
 		emits:['change'],
 		props: {
 		props: {
@@ -84,7 +79,7 @@
 		},
 		},
 		computed: {
 		computed: {
 			todayText() {
 			todayText() {
-				return t("uni-calender.today")
+				return this.$i18n.t("uni-calender.today")
 			},
 			},
 		},
 		},
 		methods: {
 		methods: {

+ 70 - 30
uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue → components/uni-calendar/uni-calendar.vue

@@ -9,7 +9,8 @@
 				<view class="uni-calendar__header-btn-box" @click="confirm">
 				<view class="uni-calendar__header-btn-box" @click="confirm">
 					<text class="uni-calendar__header-text uni-calendar--fixed-width">{{okText}}</text>
 					<text class="uni-calendar__header-text uni-calendar--fixed-width">{{okText}}</text>
 				</view>
 				</view>
-			</view>
+			</view>
+			<!-- header -->
 			<view class="uni-calendar__header">
 			<view class="uni-calendar__header">
 				<view class="uni-calendar__header-btn-box" @click.stop="pre">
 				<view class="uni-calendar__header-btn-box" @click.stop="pre">
 					<view class="uni-calendar__header-btn uni-calendar--left"></view>
 					<view class="uni-calendar__header-btn uni-calendar--left"></view>
@@ -21,10 +22,10 @@
 					<view class="uni-calendar__header-btn uni-calendar--right"></view>
 					<view class="uni-calendar__header-btn uni-calendar--right"></view>
 				</view>
 				</view>
 				<text class="uni-calendar__backtoday" @click="backtoday">{{todayText}}</text>
 				<text class="uni-calendar__backtoday" @click="backtoday">{{todayText}}</text>
-
-			</view>
+			</view>
+			<!-- content -->
 			<view class="uni-calendar__box">
 			<view class="uni-calendar__box">
-				<view v-if="showMonth" class="uni-calendar__box-bg">
+				<view v-if="showMonthed" class="uni-calendar__box-bg">
 					<text class="uni-calendar__box-bg-text">{{nowDate.month}}</text>
 					<text class="uni-calendar__box-bg-text">{{nowDate.month}}</text>
 				</view>
 				</view>
 				<view class="uni-calendar__weeks">
 				<view class="uni-calendar__weeks">
@@ -50,11 +51,18 @@
 						<text class="uni-calendar__weeks-day-text">{{SATText}}</text>
 						<text class="uni-calendar__weeks-day-text">{{SATText}}</text>
 					</view>
 					</view>
 				</view>
 				</view>
-				<view class="uni-calendar__weeks" v-for="(item,weekIndex) in weeks" :key="weekIndex">
-					<view class="uni-calendar__weeks-item" v-for="(weeks,weeksIndex) in item" :key="weeksIndex">
-						<calendar-item class="uni-calendar-item--hook" :weeks="weeks" :calendar="calendar" :selected="selected" :lunar="lunar" @change="choiceDate"></calendar-item>
+				<view class="uni-calendar__weeks" v-for="(item,weekIndex) in weeks" :key="weekIndex">
+					<view v-if="fold == false" class="uni-calendar__weeks-item" v-for="(weeks,weeksIndex) in item" :key="weeksIndex">
+						<calendar-item class="uni-calendar-item--hook" :weeks="weeks" :calendar="calendar" :selected="selected" :lunar="lunar" @change="choiceDate"></calendar-item>
+					</view>
+					<view v-if="fold && foldIndex===weekIndex" class="uni-calendar__weeks-item" v-for="(weeks,weeksIndex) in item" :key="weeksIndex">
+						<calendar-item class="uni-calendar-item--hook" :weeks="weeks" :calendar="calendar" :selected="selected" :lunar="lunar" @change="choiceDate"></calendar-item>
 					</view>
 					</view>
 				</view>
 				</view>
+			</view>
+			<!-- footer -->
+			<view v-if="foldAble" class="uni-calendar__footer">
+				<u-icon :name="fold?'arrow-down':'arrow-up'" @tap="foldBtnDidClick" size="20"></u-icon>
 			</view>
 			</view>
 		</view>
 		</view>
 	</view>
 	</view>
@@ -62,12 +70,8 @@
 
 
 <script>
 <script>
 	import Calendar from './util.js';
 	import Calendar from './util.js';
-	import calendarItem from './uni-calendar-item.vue'
-	import {
-	initVueI18n
-	} from '@dcloudio/uni-i18n'
-	import messages from './i18n/index.js'
-	const {	t	} = initVueI18n(messages)
+	import calendarItem from './uni-calendar-item.vue'
+	
 	/**
 	/**
 	 * Calendar 日历
 	 * Calendar 日历
 	 * @description 日历组件可以查看日期,选择任意范围内的日期,打点操作。常用场景如:酒店日期预订、火车机票选择购买日期、上下班打卡等
 	 * @description 日历组件可以查看日期,选择任意范围内的日期,打点操作。常用场景如:酒店日期预订、火车机票选择购买日期、上下班打卡等
@@ -131,6 +135,11 @@
 			clearDate: {
 			clearDate: {
 				type: Boolean,
 				type: Boolean,
 				default: true
 				default: true
+			},
+			/// 是否能够折叠
+			foldAble: {
+				type: Boolean,
+				default: true
 			}
 			}
 		},
 		},
 		data() {
 		data() {
@@ -139,7 +148,10 @@
 				weeks: [],
 				weeks: [],
 				calendar: {},
 				calendar: {},
 				nowDate: '',
 				nowDate: '',
-				aniMaskShow: false
+				aniMaskShow: false,
+				fold: false,
+				showMonthed: false,
+				foldIndex: -1
 			}
 			}
 		},
 		},
 		computed:{
 		computed:{
@@ -148,35 +160,35 @@
 			 */
 			 */
 
 
 			okText() {
 			okText() {
-				return t("uni-calender.ok")
+				return this.$i18n.t("uni-calender.ok")
 			},
 			},
 			cancelText() {
 			cancelText() {
-				return t("uni-calender.cancel")
+				return this.$i18n.t("uni-calender.cancel")
 			},
 			},
 			todayText() {
 			todayText() {
-				return t("uni-calender.today")
+				return this.$i18n.t("uni-calender.today")
 			},
 			},
 			monText() {
 			monText() {
-				return t("uni-calender.MON")
+				return this.$i18n.t("uni-calender.MON")
 			},
 			},
 			TUEText() {
 			TUEText() {
-				return t("uni-calender.TUE")
+				return this.$i18n.t("uni-calender.TUE")
 			},
 			},
 			WEDText() {
 			WEDText() {
-				return t("uni-calender.WED")
+				return this.$i18n.t("uni-calender.WED")
 			},
 			},
 			THUText() {
 			THUText() {
-				return t("uni-calender.THU")
+				return this.$i18n.t("uni-calender.THU")
 			},
 			},
 			FRIText() {
 			FRIText() {
-				return t("uni-calender.FRI")
+				return this.$i18n.t("uni-calender.FRI")
 			},
 			},
 			SATText() {
 			SATText() {
-				return t("uni-calender.SAT")
+				return this.$i18n.t("uni-calender.SAT")
 			},
 			},
 			SUNText() {
 			SUNText() {
-				return t("uni-calender.SUN")
-			},
+				return this.$i18n.t("uni-calender.SUN")
+			}
 		},
 		},
 		watch: {
 		watch: {
 			date(newVal) {
 			date(newVal) {
@@ -210,7 +222,8 @@
 			// 选中某一天
 			// 选中某一天
 			// this.cale.setDate(this.date)
 			// this.cale.setDate(this.date)
 			this.init(this.date)
 			this.init(this.date)
-			// this.setDay
+			this.showMonthed = this.showMonth
+			this.getFoldIndex()
 		},
 		},
 		methods: {
 		methods: {
 			// 取消穿透
 			// 取消穿透
@@ -269,8 +282,22 @@
 			 * 变化触发
 			 * 变化触发
 			 */
 			 */
 			change() {
 			change() {
-				if (!this.insert) return
+				if (!this.insert) return
+				this.getFoldIndex()
 				this.setEmit('change')
 				this.setEmit('change')
+			},
+			/// 获取缩进后显示的行号
+			getFoldIndex() {
+				var _selectedData = this.nowDate.fullDate
+				if (this.calendar.fullDate === undefined) {
+					_selectedData = this.calendar.fullDate
+				}
+				for (let index in this.weeks) {
+					let days = this.weeks[index].map((e)=>e.fullDate)
+					if (days.indexOf(this.calendar.fullDate) !== -1) {
+						this.foldIndex = index
+					}
+				}
 			},
 			},
 			/**
 			/**
 			 * 选择月份触发
 			 * 选择月份触发
@@ -336,8 +363,8 @@
 			pre() {
 			pre() {
 				const preDate = this.cale.getDate(this.nowDate.fullDate, -1, 'month').fullDate
 				const preDate = this.cale.getDate(this.nowDate.fullDate, -1, 'month').fullDate
 				this.setDate(preDate)
 				this.setDate(preDate)
-				this.monthSwitch()
-
+				this.monthSwitch()
+				this.fold = false
 			},
 			},
 			/**
 			/**
 			 * 下个月
 			 * 下个月
@@ -345,7 +372,8 @@
 			next() {
 			next() {
 				const nextDate = this.cale.getDate(this.nowDate.fullDate, +1, 'month').fullDate
 				const nextDate = this.cale.getDate(this.nowDate.fullDate, +1, 'month').fullDate
 				this.setDate(nextDate)
 				this.setDate(nextDate)
-				this.monthSwitch()
+				this.monthSwitch()
+				this.fold = false
 			},
 			},
 			/**
 			/**
 			 * 设置日期
 			 * 设置日期
@@ -355,6 +383,11 @@
 				this.cale.setDate(date)
 				this.cale.setDate(date)
 				this.weeks = this.cale.weeks
 				this.weeks = this.cale.weeks
 				this.nowDate = this.cale.getInfo(date)
 				this.nowDate = this.cale.getInfo(date)
+			},
+			/// 展开按钮点击事件
+			foldBtnDidClick() {
+				this.fold = !this.fold
+				this.showMonthed = !this.fold
 			}
 			}
 		}
 		}
 	}
 	}
@@ -547,5 +580,12 @@
 		/* #ifndef APP-NVUE */
 		/* #ifndef APP-NVUE */
 		line-height: 1;
 		line-height: 1;
 		/* #endif */
 		/* #endif */
+	}
+	
+	.uni-calendar__footer {
+		display: flex;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
 	}
 	}
 </style>
 </style>

+ 0 - 0
uni_modules/uni-calendar/components/uni-calendar/util.js → components/uni-calendar/util.js


+ 14 - 1
i18n/en.js

@@ -272,6 +272,19 @@ const en = {
 	
 	
 	"pleaseReadAndAggreeThePrivacyPolicy": "Please read and aggree the privacy policy!",
 	"pleaseReadAndAggreeThePrivacyPolicy": "Please read and aggree the privacy policy!",
 	
 	
-	"schedule": "Schedule"
+	"schedule": "Schedule",
+	
+	
+	
+	"uni-calender.ok": "ok",
+	"uni-calender.cancel": "cancel",
+	"uni-calender.today": "today",
+	"uni-calender.MON": "MON",
+	"uni-calender.TUE": "TUE",
+	"uni-calender.WED": "WED",
+	"uni-calender.THU": "THU",
+	"uni-calender.FRI": "FRI",
+	"uni-calender.SAT": "SAT",
+	"uni-calender.SUN": "SUN"
 }
 }
 export default en;
 export default en;

+ 14 - 1
i18n/zh.js

@@ -270,6 +270,19 @@ const cn = {
 	
 	
 	"pleaseReadAndAggreeThePrivacyPolicy": "请阅读并同意隐私政策!",
 	"pleaseReadAndAggreeThePrivacyPolicy": "请阅读并同意隐私政策!",
 	
 	
-	"schedule": "工作日程"
+	"schedule": "工作日程",
+	
+	
+	
+	"uni-calender.ok": "确定",
+	"uni-calender.cancel": "取消",
+	"uni-calender.today": "今日",
+	"uni-calender.SUN": "日",
+	"uni-calender.MON": "一",
+	"uni-calender.TUE": "二",
+	"uni-calender.WED": "三",
+	"uni-calender.THU": "四",
+	"uni-calender.FRI": "五",
+	"uni-calender.SAT": "六"
 }
 }
 export default cn;
 export default cn;

+ 2 - 2
main.js

@@ -1,13 +1,13 @@
 import App from './App'
 import App from './App'
 import Vue from 'vue'
 import Vue from 'vue'
 
 
-import cuCustom from './colorui/components/cu-custom.vue'
+import cuCustom from './components/colorui/components/cu-custom.vue'
 import uView from '@/uni_modules/uview-ui'
 import uView from '@/uni_modules/uview-ui'
 import i18n from './i18n/index'
 import i18n from './i18n/index'
 import store from './store/store'
 import store from './store/store'
 import request from './api/request.js'
 import request from './api/request.js'
 
 
-Vue.component('cu-custom',cuCustom)
+Vue.use(cuCustom)
 Vue.use(uView)
 Vue.use(uView)
 Vue.config.productionTip = false
 Vue.config.productionTip = false
 App.mpType = 'app'
 App.mpType = 'app'

+ 11 - 2
pages/calendar/index.vue

@@ -9,18 +9,27 @@
 			<view class="u-nav-slot" slot="right"></view>
 			<view class="u-nav-slot" slot="right"></view>
 		</u-navbar>
 		</u-navbar>
 		
 		
-		 <uni-calendar  insert @change="change" />
+		 <uni-calendar insert :selected="selected" @change="change" />
 		
 		
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
+	import UniCalendar from "../../components/uni-calendar/uni-calendar.vue"
 	export default {
 	export default {
+		components:{
+			UniCalendar
+		},
 		data() {
 		data() {
 			return {
 			return {
 				currentDate: '2021-12',
 				currentDate: '2021-12',
 				show: false,
 				show: false,
-				mode: 'range'
+				mode: 'range',
+				selected: [
+					{date: '2022-01-05', info: '签到', data: { custom: '自定义信息', name: '自定义消息头' }},
+					{date: '2022-01-09', info: '打卡', data: { custom: '自定义信息', name: '自定义消息头' }},
+					{date: '2022-02-03', info: '打卡', data: { custom: '自定义信息', name: '自定义消息头' }},
+				]
 			}
 			}
 		},
 		},
 		onReady() {
 		onReady() {

+ 7 - 3
pages/index/index.vue

@@ -27,12 +27,16 @@
 		data() {
 		data() {
 			return {
 			return {
 				PageCur: 'calendar',
 				PageCur: 'calendar',
-				selectedIndex: 0,
-				tabItems: [
+				selectedIndex: 0
+			}
+		},
+		computed: {
+			tabItems() {
+				return [
 					{ 'index': 0, 'name': this.$i18n.t('calendar'), 'image': '/static/tabbar/calendar.png', 'image_selected': '/static/tabbar/calendar_active.png'},
 					{ 'index': 0, 'name': this.$i18n.t('calendar'), 'image': '/static/tabbar/calendar.png', 'image_selected': '/static/tabbar/calendar_active.png'},
 					{ 'index': 1, 'name': this.$i18n.t('message'), 'image': '/static/tabbar/message.png', 'image_selected': '/static/tabbar/message_active.png'},
 					{ 'index': 1, 'name': this.$i18n.t('message'), 'image': '/static/tabbar/message.png', 'image_selected': '/static/tabbar/message_active.png'},
 					{ 'index': 2, 'name': this.$i18n.t('me'), 'image': '/static/tabbar/me.png', 'image_selected': '/static/tabbar/me_active.png'},
 					{ 'index': 2, 'name': this.$i18n.t('me'), 'image': '/static/tabbar/me.png', 'image_selected': '/static/tabbar/me_active.png'},
-				],
+				]
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {

+ 28 - 9
pages/message/index.vue

@@ -2,26 +2,45 @@
 	<view>
 	<view>
 		<u-navbar bgColor="white" :title="$t('message')">
 		<u-navbar bgColor="white" :title="$t('message')">
 			<view class="u-nav-slot" slot="left"></view>
 			<view class="u-nav-slot" slot="left"></view>
-			<view class="u-nav-slot" slot="right">
-				<u-icon name="grid" size="28" @click="nextBtnDidClick"></u-icon>
-			</view>
 		</u-navbar>
 		</u-navbar>
+		
+		<view class="cu-bar justify-center">
+			<u-icon name="arrow-left" size="28" @click="previousMonth"></u-icon>
+			<text class="text-bold text-black"> {{ curDate }} </text>
+			<u-icon name="arrow-right" size="28" @click="nextMonth"></u-icon>
+		</view>
+		<ren-calendar ref='ren' :markDays='markDays' headerBar @onDayClick='onDayClick'></ren-calendar>
+		<view class="change">选中日期:{{curDate}}</view>
+		
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
+	import RenCalendar from "../../components/ren-calendar/ren-calendar.vue"
 	export default {
 	export default {
+		components:{
+			RenCalendar
+		},
 		data() {
 		data() {
 			return {
 			return {
-				currentDate: '2021-12',
+				curDate:'',
+				markDays:[]
 			}
 			}
 		},
 		},
-		methods:{
-			previousBtnDidClick(){
-				console.log('previousBtnDidClick');
+		onReady() {
+			let today = this.$refs.ren.getToday().date;
+			this.curDate = today;
+			this.markDays.push(today);
+		},
+		methods: {
+			onDayClick(data){
+				this.curDate = data.date;
+			},
+			previousMonth() {
+				
 			},
 			},
-			nextBtnDidClick(){
-				console.log('nextBtnDidClick');
+			nextMonth() {
+				
 			}
 			}
 		}
 		}
 	}
 	}

+ 0 - 67
static/pages/calendar/index.vue

@@ -1,67 +0,0 @@
-<template>
-	<view>
-		
-		<!-- 导航栏 -->
-		<u-navbar bgColor="red">
-			<view class="u-nav-slot" slot="left">
-				<text class="text-bold text-xxl text-white"> {{ $t('schedule') }} </text>
-			</view>
-			<view class="u-nav-slot" slot="right">
-				<view class="cu-bar">
-					<u-icon name="arrow-left" color="white" size="28" @click="previousBtnDidClick"></u-icon>
-					<text class="text-bold text-white text-xl"> {{ currentDate }}  </text>
-					<u-icon name="arrow-right" color="white" size="28" @click="nextBtnDidClick"></u-icon>
-				</view>
-			</view>
-		</u-navbar>
-		
-		 <uni-calendar 
-		    :insert="true"
-		    :lunar="true" 
-		    :start-date="'2019-3-2'"
-		    :end-date="'2019-5-20'"
-		    @change="change"
-		     />
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				currentDate: '2021-12',
-				show: false,
-				mode: 'range'
-			}
-		},
-		onReady() {
-			// 如果需要兼容微信小程序的话,需要用此写法
-			this.$refs.calendar.setFormatter(this.formatter)
-		},
-		methods:{
-			previousBtnDidClick(){
-				console.log('previousBtnDidClick');
-			},
-			nextBtnDidClick(){
-				console.log('nextBtnDidClick');
-			},
-			confirm(e) {
-				console.log(e)
-			},
-			formatter(day) {
-				const d = new Date()
-				let month = d.getMonth() + 1
-				const date = d.getDate()
-				if(day.month == month && day.day == date + 3) {
-					day.bottomInfo = '有优惠'
-					day.dot = true
-				}
-				return day
-			},
-			change(e) {
-				console.log(e)
-			}
-		}
-	}
-</script>

+ 0 - 48
static/pages/index/index.vue

@@ -1,48 +0,0 @@
-<template>
-	<view>
-		<tabbar-calendar v-if="selectedIndex==0"></tabbar-calendar>
-		<tabbar-message v-if="selectedIndex==1"></tabbar-message>
-		<tabbar-mine v-if="selectedIndex==2"></tabbar-mine>
-		<view class="cu-bar tabbar bg-white shadow foot">
-			<view v-for="item in tabItems" :index='item.index' class="action" @click="tabBarDidChange" :data-index="item.index">
-				<view class="cuIcon-cu-image">
-					<image :src="selectedIndex==item.index?item.image_selected:item.image" />
-				</view>
-				<view :class="selectedIndex==item.index?'text-red':'text-gray'"> {{ item.name }} </view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import TabbarMine from '../mine/index.vue'
-	import TabbarCalendar from '../calendar/index.vue'
-	import TabbarMessage from '../message/index.vue'
-	export default {
-		components: {
-			TabbarMine,
-			TabbarCalendar,
-			TabbarMessage
-		},
-		data() {
-			return {
-				PageCur: 'calendar',
-				selectedIndex: 0,
-				tabItems: [
-					{ 'index': 0, 'name': this.$i18n.t('calendar'), 'image': '/static/tabbar/calendar.png', 'image_selected': '/static/tabbar/calendar_active.png'},
-					{ 'index': 1, 'name': this.$i18n.t('message'), 'image': '/static/tabbar/message.png', 'image_selected': '/static/tabbar/message_active.png'},
-					{ 'index': 2, 'name': this.$i18n.t('me'), 'image': '/static/tabbar/me.png', 'image_selected': '/static/tabbar/me_active.png'},
-				],
-			}
-		},
-		methods: {
-			tabBarDidChange(e) {
-				this.selectedIndex = e.currentTarget.dataset.index
-			}
-		}
-	}
-</script>
-
-<style>
-
-</style>

+ 0 - 51
static/pages/login/env_page.vue

@@ -1,51 +0,0 @@
-<template>
-	<view>
-		<view class="cu-list menu sm-border margin-tb-sm">
-			<view v-for="env in envs" :index="env.index" class="cu-item padding-sm radius shadow-blur" @click="changeEnv" :data-index="env.index">
-				<view class="content padding-tb-sm" :class="selectedEnv==env.index?'text-red':''">
-					<view> {{ env.name }} </view>
-					<view> {{ env.url }} </view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import Envs from "../../api/envs"
-	import { mapState, mapMutations } from 'vuex'
-	import Api from '../../api/api'
-	export default {
-		data() {
-			return {
-				// envs: [],
-			}
-		},
-		computed: {  
-			...mapState(['selectedEnv',]),
-			envs() {
-				return Object.values(Envs)
-			}
-		},
-		mounted() {
-			// this.envs = 
-		},
-		methods: {
-			changeEnv(e) {
-				// console.log(this.selectedEnv)
-				var index = e.currentTarget.dataset.index
-				if (index == 3) {
-					// TODO: custom url
-					return
-				}
-				this.$store.commit('selecteEnv', index)
-			},
-			showModal(e) {
-				this.modalName = e.currentTarget.dataset.target
-			},
-		}
-	}
-</script>
-
-<style>
-</style>

+ 0 - 185
static/pages/login/index.vue

@@ -1,185 +0,0 @@
-<template>
-	<view class="login">
-		<view class="login-top">
-			<image class="login-bg" src="/static/login/login_top_backgroud.png" @click="headerImageClick"/>
-			<view class="login-top-content">
-				<image class="login-icon" src="/static/logo.png"></image>
-				<text class="login-title"> {{ $t('login') }} </text>
-			</view>
-		</view>
-		
-		<!-- 登录框 -->
-		<view class="login-card cu-card padding radius shadow bg-white">
-			<view class="flex padding-tb justify-between">
-				<view class="u-border-bottom text-xl text-red"> {{ $t('userLogin') }} </view>
-				<view class="text-xl" @click="changeToEnglish"> {{ $t('switchLanguage') }} </view>
-			</view>
-			
-			<!-- 输入框 -->
-			<u-gap height="20"/>
-			<u--input v-model="user.account" :placeholder="$t('userName')" clearable prefixIcon="account" border="bottom" prefixIconStyle="font-size: 22px;color: #909399" @clear="clearInput(true)"/>
-			<u-gap height="10"/>
-			<u--input v-model="user.password" :placeholder="$t('password')" clearable password prefixIcon="lock" border="bottom" prefixIconStyle="font-size: 22px;color: #909399" @clear="clearInput(false)"/>
-			
-			<!-- 登录按钮 -->
-			<u-gap height="40"/>
-			<button class="cu-btn block bg-red margin-tb-sm lg radio" @click="startLogin">
-				<text v-if="loading" class="cuIcon-loading2 cuIconfont-spin"></text>
-				<text> {{ $t('logIn') }} </text>
-			</button>
-			
-			<!-- 隐私政策 -->
-			<u-gap height="20"/>
-			<view class="flex u-row u-flex-start align-center">
-				<text class="lg text-gray" :class="aggred?'cuIcon-roundcheck':'cuIcon-round'" :style="[{color:aggred?'red':'gray'}]" @click="aggreeBtnClick"></text>
-				<text class="u-line-2 text-sm">
-					请阅读并勾选同意
-					<text class="text-red"> 用户使用协议 </text>
-					与
-					<text class="text-red"> 隐私政策 </text>
-				</text>
-			</view>
-		</view>
-	
-		<text class="version-text self-center"> {{ $t('appVersion', {version: '1.0.0'}) }} </text>
-	</view>
-</template>
-
-<script>
-	import Api from '../../api/api.js'
-	import { mapState, mapMutations } from 'vuex'  
-	export default {
-		data() {
-			return {
-				loading: false,
-				loginStr: '登录',
-				user: {
-					account: '',
-					password: '',
-				},
-				animation: '',
-				aggred: true,
-			}
-		},
-		computed: {  
-			// 映射两个状态到页面示例中,可以直接访问,实时获取state的值,更多请自行了解vuex  
-			...mapState(['username','password', 'locale'])
-		},
-		mounted() {
-			this.user.account = this.username
-			this.user.password = this.password
-		},
-		methods: {
-			async startLogin() {
-				if (this.verifyInput() !== true) return
-				await this.login()
-			},
-			
-			/// 校验账号密码
-			verifyInput() {
-				if (this.user.account == '') return uni.showToast({
-					icon:'none',
-					title: this.$i18n.t('pleaseInput') + this.$i18n.t('userName')
-				})
-				
-				if (this.user.password == '') return uni.showToast({
-					icon:'none',
-					title: this.$i18n.t('pleaseInput') + this.$i18n.t('password')
-				})
-				
-				if (!this.aggred) return uni.showToast({
-					icon:'none',
-					title: this.$i18n.t('pleaseReadAndAggreeThePrivacyPolicy')
-				})
-				
-				return true
-			},
-			
-			async login() {
-				this.loading = true
-				var _this = this
-				Api.login(this.user).then(res => {
-					_this.loading = false
-					if (res.code !== 200) return
-					_this.$store.commit('setUserInfo', res.data)
-					_this.$store.commit('setUserName', _this.user.account)
-					_this.$store.commit('setPassword', _this.user.password)
-					uni.navigateTo({
-						url:'../index/index'
-					})
-				})
-			},
-			
-			headerImageClick() {
-				uni.navigateTo({
-					url:'./env_page'
-				})
-			},
-			
-			changeToEnglish() {
-				let locale = this.$i18n.locale
-				locale === 'zh' ? this.$i18n.locale = 'en' : this.$i18n.locale = 'zh'
-				this.$store.commit('setLocale', this.$i18n.locale)
-			},
-			/// 清除输入框
-			clearInput(isUserAccount) {
-				if (isUserAccount) {
-					this.user.account = ''
-				} else {
-					this.user.password = ''
-				}
-			},
-			aggreeBtnClick() {
-				this.aggred = !this.aggred
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.login {
-		width: 100%;
-		position: absolute;
-		display: flex;
-		flex-direction: column;
-		height: 100%;
-		.login-top {
-			width: 100%;
-			.login-bg {
-				width: 100%;
-				height: 55vw;
-			}
-			.login-top-content {
-				position: absolute;
-				left: 30px;
-				height: 49px;
-				top: 50px;
-				display: flex;
-				flex-direction: row;
-				justify-content: flex-start;
-				align-items: center;
-				.login-icon {
-					width: 30px;
-					height: 30px;
-				}
-				.login-title {
-					margin-left: 10px;
-					font-size: 48rpx;
-					color: white;
-				}
-			}
-		}
-		.login-card{
-			position: absolute;
-			top: 45vw;
-			width: 90%;
-			left: 5%;
-		}
-		.version-text {
-			position: absolute;
-			bottom: 35px;
-			width: 100%;
-			text-align: center;
-		}
-	}
-</style>

+ 0 - 27
static/pages/message/index.vue

@@ -1,27 +0,0 @@
-<template>
-	<view>
-		<u-navbar leftIcon="" bgColor="white" :title="$t('message')">
-			<view class="u-nav-slot" slot="right">
-				<u-icon name="grid" size="28" @click="nextBtnDidClick"></u-icon>
-			</view>
-		</u-navbar>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				currentDate: '2021-12',
-			}
-		},
-		methods:{
-			previousBtnDidClick(){
-				console.log('previousBtnDidClick');
-			},
-			nextBtnDidClick(){
-				console.log('nextBtnDidClick');
-			}
-		}
-	}
-</script>

+ 0 - 120
static/pages/mine/index.vue

@@ -1,120 +0,0 @@
-<template>
-	<view class="mine">
-		
-		<view class="mine-content" style="background:url('/static/login/login_top_backgroud.png') no-repeat; background-size: 100%;">
-			
-			<!-- 用户信息 -->
-			<view class="mine-card cu-card padding radius shadow bg-white">
-				<view class="cu-chat">
-					<view class="cu-avatar xl round" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big99008.jpg);"></view>
-					<text class="text-bold text-xl"> {{ userInfo.name }} </text>
-				</view>
-				<view class="cu-bar justify-around" style="width: 100%;">
-					<view class="cu-bar">
-						<image src="../../static/mine/phone.png" style="width: 20px;height: 20px;"></image>
-						<text class="text-sm"> {{ userInfo.mobile }} </text>
-					</view>
-					<view class="cu-bar">
-						<image src="../../static/mine/email.png" style="width: 20px;height: 20px;"></image>
-						<text class="text-sm"> {{ userInfo.email }} </text>
-					</view>
-				</view>
-			</view>
-			
-			<view v-for="(section,i) in mineItems" :key="i">
-				<u-gap height="15"/>
-				<view class="cu-card padding radius shadow bg-white">
-					<view class="cu-bar justify-between align-center" v-for="(item,index) in section" :key="index" @click="itemDidClick(item)">
-						<view class="cu-bar">
-							<image :src="item.image" style="width: 30px;height: 30px;"></image>
-							<text class="text-bold padding-sm"> {{ $t(item.title) }} </text>
-						</view>
-						<text v-if="item.detail"> {{ item.detail }} </text>
-						<text v-else class="lg text-gray cuIcon-right"></text>
-					</view>
-				</view>
-			</view>		
-		</view>
-		
-		<!-- <button class="u-button--primary" type="default" @click="back">back</button> -->
-	</view>
-</template>
-
-<script>
-	import { mapState, mapMutations } from 'vuex'  
-	export default {
-		data() {
-			return {
-				mineItems: [
-					[
-						{'image': '/static/mine/city.png','title': 'city','detail': '成都', 'url': ''},
-						{'image': '/static/mine/location.png','title': 'campus','detail': '成都', 'url': ''},
-						{'image': '/static/mine/department.png','title': 'department', 'detail': '成都', 'url': ''}
-					],
-					[
-						{'image': '/static/mine/city.png','title': 'city','detail': '成都', 'url': ''},
-						{'image': '/static/mine/location.png','title': 'campus','detail': '成都', 'url': ''},
-						{'image': '/static/mine/department.png','title': 'department', 'detail': '成都', 'url': ''}
-					],
-					[
-						{'image': '/static/mine/city.png','title': 'city','detail': '成都', 'url': ''},
-						{'image': '/static/mine/location.png','title': 'campus','detail': '成都', 'url': ''},
-						{'image': '/static/mine/department.png','title': 'department', 'detail': '成都', 'url': ''}
-					],
-					[
-						{'image': '/static/mine/student_old.png','title': 'referralList', 'detail': '', 'url': ''},
-						{'image': '/static/mine/student_pain.png','title': 'renewList', 'detail': '', 'url': ''},
-						{'image': '/static/mine/referral.png','title': 'auditList', 'detail': '', 'url': ''}
-					],
-					[
-						{'image': '/static/mine/setting.png','title': 'setting', 'detail': '', 'url': '../mine/setting'},
-					],
-				]
-			};
-		},
-		name: 'tabbar-mine',
-		computed: {
-			...mapState(['userInfo'])
-		},
-		props: {
-			
-		},
-		methods: {
-			/// 列表跳转
-			itemDidClick(item) {
-				if (!item.url) return
-				uni.navigateTo({
-					url: item.url
-				})
-			}
-		}
-	}
-</script>
-
-
-<style lang="scss">
-	.mine {
-		width: 100%;
-		position: absolute;
-		display: flex;
-		flex-direction: column;
-		height: 100%;
-		.mine-content {
-			padding: 80px 20px 70px;
-			.mine-card{
-				display: flex;
-				flex-direction: column;
-				justify-content: center;
-				align-items: center;
-				.user-card-top {
-					position: absolute;
-					top: 0;
-					left: 0;
-					align-self: flex-start;
-					width: 40px;
-					height: 20px;
-				}
-			}
-		}
-	}
-</style>

+ 0 - 112
static/pages/mine/setting.vue

@@ -1,112 +0,0 @@
-<template>
-	<view class="padding-lr">
-		<view v-for="(section,i) in mineItems" :key="i">
-			<u-gap height="15"/>
-			<view class="cu-card padding radius shadow bg-white">
-				<view class="cu-bar justify-between align-center" v-for="(item,index) in section" :key="index" @click="itemDidClick(item)">
-					<view class="cu-bar">
-						<image :src="item.image" style="width: 30px;height: 30px;"></image>
-						<text class="text-bold padding-sm"> {{ $t(item.title) }} </text>
-					</view>
-					<text v-if="item.detail"> {{ item.detail }} </text>
-					<text v-else class="lg text-gray cuIcon-right"></text>
-				</view>
-			</view>
-		</view>	
-	</view>
-</template>
-
-<script>
-	import { mapState, mapMutations } from 'vuex'  
-	export default {
-		data() {
-			return {
-				mineItems: [
-					[
-						{'index': 0, 'image': '/static/mine/modify_psw.png','title': 'changePassword', 'url': ''},
-						{'index': 1, 'image': '/static/mine/about.png','title': 'aboutUs', 'url': ''},
-						{'index': 2, 'image': '/static/mine/fk_edit.png','title': 'mineFeedback', 'url': ''}
-					],
-					[
-						{'index': 3, 'image': '/static/mine/student_old.png','title': 'checkUpdate', 'url': ''},
-					],
-					[
-						{'index': 4, 'image': '/static/mine/language.png','title': 'switchLanguage', 'url': ''},
-					],
-					[
-						{'index': 5, 'image': '/static/mine/logout.png','title': 'logOut', 'url': '../login/index'},
-					],
-				]
-			};
-		},
-		name: 'tabbar-mine',
-		computed: {
-			...mapState(['userInfo'])
-		},
-		props: {
-			
-		},
-		mounted() {
-
-		},
-		methods: {
-			/// 列表跳转
-			itemDidClick(item) {
-				switch (item.index) {
-					case 5:
-						this.$store.commit('clearUserInfo')
-						uni.navigateTo({
-							url:'../login/index',
-							animationType:'fade-in'
-						})
-					break
-					case 4:
-						let locale = this.$i18n.locale
-						locale === 'zh' ? this.$i18n.locale = 'en' : this.$i18n.locale = 'zh'
-						this.$store.commit('setLocale', this.$i18n.locale)
-						uni.setNavigationBarTitle({ title:this.$i18n.t('setting') })
-					break
-					default: break
-				}
-			}
-		}
-	}
-</script>
-
-
-<style lang="scss">
-	.mine {
-		width: 100%;
-		position: absolute;
-		display: flex;
-		flex-direction: column;
-		height: 100%;
-		.mine-top {
-			width: 100%;
-			.mine-bg {
-				width: 100%;
-				height: 55vw;
-			}
-		}
-		.mine-content {
-			position: absolute;
-			top: 20vw;
-			width: 90%;
-			left: 5%;
-			.mine-card{
-				display: flex;
-				flex-direction: column;
-				justify-content: center;
-				align-items: center;
-				.user-card-top {
-					position: absolute;
-					top: 0;
-					left: 0;
-					align-self: flex-start;
-					width: 40px;
-					height: 20px;
-				}
-			}
-		}
-	}
-</style>

+ 0 - 12
uni_modules/uni-calendar/changelog.md

@@ -1,12 +0,0 @@
-## 1.4.3(2021-09-22)
-- 修复 startDate、 endDate 属性失效的 bug
-## 1.4.2(2021-08-24)
-- 新增 支持国际化
-## 1.4.1(2021-08-05)
-- 修复 弹出层被 tabbar 遮盖 bug
-## 1.4.0(2021-07-30)
-- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
-## 1.3.16(2021-05-12)
-- 新增 组件示例地址
-## 1.3.15(2021-02-04)
-- 调整为uni_modules目录规范 

+ 0 - 12
uni_modules/uni-calendar/components/uni-calendar/i18n/en.json

@@ -1,12 +0,0 @@
-{
-	"uni-calender.ok": "ok",
-	"uni-calender.cancel": "cancel",
-	"uni-calender.today": "today",
-	"uni-calender.MON": "MON",
-	"uni-calender.TUE": "TUE",
-	"uni-calender.WED": "WED",
-	"uni-calender.THU": "THU",
-	"uni-calender.FRI": "FRI",
-	"uni-calender.SAT": "SAT",
-	"uni-calender.SUN": "SUN"
-}

+ 0 - 8
uni_modules/uni-calendar/components/uni-calendar/i18n/index.js

@@ -1,8 +0,0 @@
-import en from './en.json'
-import zhHans from './zh-Hans.json'
-import zhHant from './zh-Hant.json'
-export default {
-	en,
-	'zh-Hans': zhHans,
-	'zh-Hant': zhHant
-}

+ 0 - 12
uni_modules/uni-calendar/components/uni-calendar/i18n/zh-Hans.json

@@ -1,12 +0,0 @@
-{
-	"uni-calender.ok": "确定",
-	"uni-calender.cancel": "取消",
-	"uni-calender.today": "今日",
-	"uni-calender.SUN": "日",
-	"uni-calender.MON": "一",
-	"uni-calender.TUE": "二",
-	"uni-calender.WED": "三",
-	"uni-calender.THU": "四",
-	"uni-calender.FRI": "五",
-	"uni-calender.SAT": "六"
-}

+ 0 - 12
uni_modules/uni-calendar/components/uni-calendar/i18n/zh-Hant.json

@@ -1,12 +0,0 @@
-{
-	"uni-calender.ok": "確定",
-	"uni-calender.cancel": "取消",
-	"uni-calender.today": "今日",
-	"uni-calender.SUN": "日",
-	"uni-calender.MON": "一",
-	"uni-calender.TUE": "二",
-	"uni-calender.WED": "三",
-	"uni-calender.THU": "四",
-	"uni-calender.FRI": "五",
-	"uni-calender.SAT": "六"
-}

+ 0 - 88
uni_modules/uni-calendar/package.json

@@ -1,88 +0,0 @@
-{
-  "id": "uni-calendar",
-  "displayName": "uni-calendar 日历",
-  "version": "1.4.3",
-  "description": "日历组件",
-  "keywords": [
-    "uni-ui",
-    "uniui",
-    "日历",
-    "",
-    "打卡",
-    "日历选择"
-],
-  "repository": "https://github.com/dcloudio/uni-ui",
-  "engines": {
-    "HBuilderX": ""
-  },
-  "directories": {
-    "example": "../../temps/example_temps"
-  },
-  "dcloudext": {
-    "category": [
-      "前端组件",
-      "通用组件"
-    ],
-    "sale": {
-      "regular": {
-        "price": "0.00"
-      },
-      "sourcecode": {
-        "price": "0.00"
-      }
-    },
-    "contact": {
-      "qq": ""
-    },
-    "declaration": {
-      "ads": "无",
-      "data": "无",
-      "permissions": "无"
-    },
-    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
-  },
-  "uni_modules": {
-    "dependencies": [],
-    "encrypt": [],
-    "platforms": {
-      "cloud": {
-        "tcb": "y",
-        "aliyun": "y"
-      },
-      "client": {
-        "App": {
-          "app-vue": "y",
-          "app-nvue": "y"
-        },
-        "H5-mobile": {
-          "Safari": "y",
-          "Android Browser": "y",
-          "微信浏览器(Android)": "y",
-          "QQ浏览器(Android)": "y"
-        },
-        "H5-pc": {
-          "Chrome": "y",
-          "IE": "y",
-          "Edge": "y",
-          "Firefox": "y",
-          "Safari": "y"
-        },
-        "小程序": {
-          "微信": "y",
-          "阿里": "y",
-          "百度": "y",
-          "字节跳动": "y",
-          "QQ": "y"
-        },
-        "快应用": {
-          "华为": "u",
-          "联盟": "u"
-        },
-        "Vue": {
-            "vue2": "y",
-            "vue3": "y"
-        }
-      }
-    }
-  }
-}

+ 0 - 103
uni_modules/uni-calendar/readme.md

@@ -1,103 +0,0 @@
-
-
-## Calendar 日历
-> **组件名:uni-calendar**
-> 代码块: `uCalendar`
-
-
-日历组件
-
-> **注意事项**
-> 为了避免错误使用,给大家带来不好的开发体验,请在使用组件前仔细阅读下面的注意事项,可以帮你避免一些错误。
-> - 本组件农历转换使用的js是 [@1900-2100区间内的公历、农历互转](https://github.com/jjonline/calendar.js)  
-> - 仅支持自定义组件模式
-> - `date`属性传入的应该是一个 String ,如: 2019-06-27 ,而不是 new Date()
-> - 通过 `insert` 属性来确定当前的事件是 @change 还是 @confirm 。理应合并为一个事件,但是为了区分模式,现使用两个事件,这里需要注意
-> - 弹窗模式下无法阻止后面的元素滚动,如有需要阻止,请在弹窗弹出后,手动设置滚动元素为不可滚动
-
-
-### 安装方式
-
-本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`。
-
-如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55)
-
-### 基本用法
-
-在 ``template`` 中使用组件
-
-```html
-<view>
-	<uni-calendar 
-	:insert="true"
-	:lunar="true" 
-	:start-date="'2019-3-2'"
-	:end-date="'2019-5-20'"
-	@change="change"
-	 />
-</view>
-```
-
-### 通过方法打开日历
-
-需要设置 `insert` 为 `false`
-
-```html
-<view>
-	<uni-calendar 
-	ref="calendar"
-	:insert="false"
-	@confirm="confirm"
-	 />
-	 <button @click="open">打开日历</button>
-</view>
-```
-
-```javascript
-
-export default {
-	data() {
-		return {};
-	},
-	methods: {
-		open(){
-			this.$refs.calendar.open();
-		},
-		confirm(e) {
-			console.log(e);
-		}
-	}
-};
-
-```
-
-
-## API
-
-### Calendar Props
-
-|  属性名	|    类型	| 默认值| 说明																													|
-| 		| 																													|
-| date		| String	|-		| 自定义当前时间,默认为今天																							|
-| lunar		| Boolean	| false	| 显示农历																												|
-| startDate	| String	|-		| 日期选择范围-开始日期																									|
-| endDate	| String	|-		| 日期选择范围-结束日期																									|
-| range		| Boolean	| false	| 范围选择																												|
-| insert	| Boolean	| false	| 插入模式,可选值,ture:插入模式;false:弹窗模式;默认为插入模式														|
-|clearDate	|Boolean	|true	|弹窗模式是否清空上次选择内容	|
-| selected	| Array		|-		| 打点,期待格式[{date: '2019-06-27', info: '签到', data: { custom: '自定义信息', name: '自定义消息头',xxx:xxx... }}]	|
-|showMonth	| Boolean	| true	| 是否显示月份为背景																									|
-
-### Calendar Events
-
-|  事件名		| 说明								|返回值|
-| 								|		| 									|
-| open	| 弹出日历组件,`insert :false` 时生效|- 	|
-
-
-
-
-
-## 组件示例
-
-点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/calendar/calendar](https://hellouniapp.dcloud.net.cn/pages/extUI/calendar/calendar)