submit
parent
4bb29ed1a7
commit
92ee426b7a
@ -0,0 +1,3 @@
|
|||||||
|
/node_modules
|
||||||
|
|
||||||
|
/unpackage
|
@ -0,0 +1,13 @@
|
|||||||
|
import http from './interface'
|
||||||
|
|
||||||
|
export const request = (url, data, type) => {
|
||||||
|
return http.request({
|
||||||
|
url: url,
|
||||||
|
method: type || 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
request,
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
import http from "./interface";
|
||||||
|
|
||||||
|
export function login(data){
|
||||||
|
return http.request({
|
||||||
|
data,
|
||||||
|
url: "/api/staff/login",
|
||||||
|
method: "POST",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -1,52 +1,13 @@
|
|||||||
<template>
|
|
||||||
<view class="content">
|
|
||||||
<image class="logo" src="/static/logo.png"></image>
|
|
||||||
<view class="text-area">
|
|
||||||
<text class="title">{{title}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
name: "index"
|
||||||
return {
|
}
|
||||||
title: 'Hello'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad() {
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<template>
|
||||||
.content {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo {
|
</template>
|
||||||
height: 200rpx;
|
|
||||||
width: 200rpx;
|
|
||||||
margin-top: 200rpx;
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
margin-bottom: 50rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-area {
|
<style scoped lang="scss">
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 36rpx;
|
|
||||||
color: #8f8f94;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -0,0 +1,222 @@
|
|||||||
|
<!-- 蓝色登录页面2 -->
|
||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="img-a">
|
||||||
|
<view class="t-b">
|
||||||
|
管理系统账号登录
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="login-view" style="">
|
||||||
|
<view class="t-login">
|
||||||
|
<form class="cl">
|
||||||
|
<view class="t-a">
|
||||||
|
<text class="txt">手机号</text>
|
||||||
|
<input type="number" name="phone" placeholder="请输入您的手机号" maxlength="11" v-model="phone" />
|
||||||
|
</view>
|
||||||
|
<view v-if="loginStatus" class="t-a">
|
||||||
|
<text class="txt">密码</text>
|
||||||
|
<input type="password" name="code" maxlength="18" placeholder="请输入您的密码" v-model="pwd" />
|
||||||
|
</view>
|
||||||
|
<view style="position: relative" v-if="!loginStatus" class="t-a">
|
||||||
|
<text class="txt">验证码</text>
|
||||||
|
<input type="password" name="code" maxlength="18" placeholder="请输入您的密码" v-model="pwd" />
|
||||||
|
<view class="sendCode" >发送</view>
|
||||||
|
</view>
|
||||||
|
<view class="reg" @tap="switchLogin()">切换{{loginStatus?'验证码':'密码'}}登录</view>
|
||||||
|
<button @tap="login()">登 录</button>
|
||||||
|
</form>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import UButton from "../../uview-ui/components/u-button/u-button.vue";
|
||||||
|
import {login} from "../../http/mine";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {UButton},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loginStatus:true,
|
||||||
|
phone: '', //手机号码
|
||||||
|
pwd: '' //密码
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad() {},
|
||||||
|
methods: {
|
||||||
|
//当前登录按钮操作
|
||||||
|
async login() {
|
||||||
|
if (!this.phone) {
|
||||||
|
uni.showToast({ title: '请输入您的手机号', icon: 'none' });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!/^[1][3,4,5,7,8,9][0-9]{9}$/.test(this.phone)) {
|
||||||
|
uni.showToast({ title: '请输入正确手机号', icon: 'none' });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.pwd) {
|
||||||
|
uni.showToast({ title: '请输入您的密码', icon: 'none' });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const data={
|
||||||
|
telNum:this.phone,
|
||||||
|
password:this.pwd
|
||||||
|
}
|
||||||
|
const res=await login(data)
|
||||||
|
console.log(res,'res')
|
||||||
|
uni.showToast({ title: '登录成功!', icon: 'none' });
|
||||||
|
},
|
||||||
|
//注册按钮点击
|
||||||
|
switchLogin() {
|
||||||
|
this.loginStatus=!this.loginStatus
|
||||||
|
},
|
||||||
|
//等三方微信登录
|
||||||
|
wxLogin() {
|
||||||
|
uni.showToast({ title: '微信登录', icon: 'none' });
|
||||||
|
},
|
||||||
|
//第三方支付宝登录
|
||||||
|
zfbLogin() {
|
||||||
|
uni.showToast({ title: '支付宝登录', icon: 'none' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.sendCode{
|
||||||
|
height: 100rpx;width: 150rpx;background-color: rgba(66, 151, 245);position: absolute;bottom: 0;right: 0;
|
||||||
|
display: flex;justify-content: center;align-items: center;color: #fff;
|
||||||
|
}
|
||||||
|
.txt {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.img-a {
|
||||||
|
width: 100%;
|
||||||
|
height: 450rpx;
|
||||||
|
background-image: url(../../static/image/login/ju554@3x.png);
|
||||||
|
background-size: 100%;
|
||||||
|
}
|
||||||
|
.reg {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(174, 174, 174);
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
background: #f5f6fa;
|
||||||
|
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-view {
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
margin-top: -120rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 8% 8% 0% 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t-login {
|
||||||
|
width: 600rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
font-size: 28rpx;
|
||||||
|
padding-top: 80rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t-login button {
|
||||||
|
font-size: 28rpx;
|
||||||
|
background: #2796f2;
|
||||||
|
color: #fff;
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t-login input {
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
margin-bottom: 50rpx;
|
||||||
|
border-bottom: 1px solid #e9e9e9;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t-login .t-a {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t-b {
|
||||||
|
text-align: left;
|
||||||
|
font-size: 42rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
padding: 130rpx 0 0 70rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 70rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t-login .t-c {
|
||||||
|
position: absolute;
|
||||||
|
right: 22rpx;
|
||||||
|
top: 22rpx;
|
||||||
|
background: #5677fc;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 24rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
line-height: 50rpx;
|
||||||
|
padding: 0 25rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t-login .t-d {
|
||||||
|
text-align: center;
|
||||||
|
color: #999;
|
||||||
|
margin: 80rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t-login .t-e {
|
||||||
|
text-align: center;
|
||||||
|
width: 250rpx;
|
||||||
|
margin: 80rpx auto 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t-login .t-g {
|
||||||
|
float: left;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t-login .t-e image {
|
||||||
|
width: 50rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t-login .t-f {
|
||||||
|
text-align: center;
|
||||||
|
margin: 150rpx 0 0 0;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t-login .t-f text {
|
||||||
|
margin-left: 20rpx;
|
||||||
|
color: #aaaaaa;
|
||||||
|
font-size: 27rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t-login .uni-input-placeholder {
|
||||||
|
color: #aeaeae;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cl {
|
||||||
|
zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cl:after {
|
||||||
|
clear: both;
|
||||||
|
display: block;
|
||||||
|
visibility: hidden;
|
||||||
|
height: 0;
|
||||||
|
content: '\20';
|
||||||
|
}
|
||||||
|
</style>
|
Binary file not shown.
After Width: | Height: | Size: 8.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 460 B |
Binary file not shown.
After Width: | Height: | Size: 91 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2020 www.uviewui.com
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,52 @@
|
|||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
// 头像图片组
|
||||||
|
urls: {
|
||||||
|
type: Array,
|
||||||
|
default: uni.$u.props.avatarGroup.urls
|
||||||
|
},
|
||||||
|
// 最多展示的头像数量
|
||||||
|
maxCount: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: uni.$u.props.avatarGroup.maxCount
|
||||||
|
},
|
||||||
|
// 头像形状
|
||||||
|
shape: {
|
||||||
|
type: String,
|
||||||
|
default: uni.$u.props.avatarGroup.shape
|
||||||
|
},
|
||||||
|
// 图片裁剪模式
|
||||||
|
mode: {
|
||||||
|
type: String,
|
||||||
|
default: uni.$u.props.avatarGroup.mode
|
||||||
|
},
|
||||||
|
// 超出maxCount时是否显示查看更多的提示
|
||||||
|
showMore: {
|
||||||
|
type: Boolean,
|
||||||
|
default: uni.$u.props.avatarGroup.showMore
|
||||||
|
},
|
||||||
|
// 头像大小
|
||||||
|
size: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: uni.$u.props.avatarGroup.size
|
||||||
|
},
|
||||||
|
// 指定从数组的对象元素中读取哪个属性作为图片地址
|
||||||
|
keyName: {
|
||||||
|
type: String,
|
||||||
|
default: uni.$u.props.avatarGroup.keyName
|
||||||
|
},
|
||||||
|
// 头像之间的遮挡比例
|
||||||
|
gap: {
|
||||||
|
type: [String, Number],
|
||||||
|
validator(value) {
|
||||||
|
return value >= 0 && value <= 1
|
||||||
|
},
|
||||||
|
default: uni.$u.props.avatarGroup.gap
|
||||||
|
},
|
||||||
|
// 需额外显示的值
|
||||||
|
extraValue: {
|
||||||
|
type: [Number, String],
|
||||||
|
default: uni.$u.props.avatarGroup.extraValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
$u-button-active-opacity:0.75 !default;
|
||||||
|
$u-button-loading-text-margin-left:4px !default;
|
||||||
|
$u-button-text-color: #FFFFFF !default;
|
||||||
|
$u-button-text-plain-error-color:$u-error !default;
|
||||||
|
$u-button-text-plain-warning-color:$u-warning !default;
|
||||||
|
$u-button-text-plain-success-color:$u-success !default;
|
||||||
|
$u-button-text-plain-info-color:$u-info !default;
|
||||||
|
$u-button-text-plain-primary-color:$u-primary !default;
|
||||||
|
.u-button {
|
||||||
|
&--active {
|
||||||
|
opacity: $u-button-active-opacity;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--active--plain {
|
||||||
|
background-color: rgb(217, 217, 217);
|
||||||
|
}
|
||||||
|
|
||||||
|
&__loading-text {
|
||||||
|
margin-left:$u-button-loading-text-margin-left;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__text,
|
||||||
|
&__loading-text {
|
||||||
|
color:$u-button-text-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__text--plain--error {
|
||||||
|
color:$u-button-text-plain-error-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__text--plain--warning {
|
||||||
|
color:$u-button-text-plain-warning-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__text--plain--success{
|
||||||
|
color:$u-button-text-plain-success-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__text--plain--info {
|
||||||
|
color:$u-button-text-plain-info-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__text--plain--primary {
|
||||||
|
color:$u-button-text-plain-primary-color;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,80 @@
|
|||||||
|
// nvue下hover-class无效
|
||||||
|
$u-button-before-top:50% !default;
|
||||||
|
$u-button-before-left:50% !default;
|
||||||
|
$u-button-before-width:100% !default;
|
||||||
|
$u-button-before-height:100% !default;
|
||||||
|
$u-button-before-transform:translate(-50%, -50%) !default;
|
||||||
|
$u-button-before-opacity:0 !default;
|
||||||
|
$u-button-before-background-color:#000 !default;
|
||||||
|
$u-button-before-border-color:#000 !default;
|
||||||
|
$u-button-active-before-opacity:.15 !default;
|
||||||
|
$u-button-icon-margin-left:4px !default;
|
||||||
|
$u-button-plain-u-button-info-color:$u-info;
|
||||||
|
$u-button-plain-u-button-success-color:$u-success;
|
||||||
|
$u-button-plain-u-button-error-color:$u-error;
|
||||||
|
$u-button-plain-u-button-warning-color:$u-error;
|
||||||
|
|
||||||
|
.u-button {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
&__text {
|
||||||
|
white-space: nowrap;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
position: absolute;
|
||||||
|
top:$u-button-before-top;
|
||||||
|
left:$u-button-before-left;
|
||||||
|
width:$u-button-before-width;
|
||||||
|
height:$u-button-before-height;
|
||||||
|
border: inherit;
|
||||||
|
border-radius: inherit;
|
||||||
|
transform:$u-button-before-transform;
|
||||||
|
opacity:$u-button-before-opacity;
|
||||||
|
content: " ";
|
||||||
|
background-color:$u-button-before-background-color;
|
||||||
|
border-color:$u-button-before-border-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--active {
|
||||||
|
&:before {
|
||||||
|
opacity: .15
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__icon+&__text:not(:empty),
|
||||||
|
&__loading-text {
|
||||||
|
margin-left:$u-button-icon-margin-left;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--plain {
|
||||||
|
&.u-button--primary {
|
||||||
|
color: $u-primary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&--plain {
|
||||||
|
&.u-button--info {
|
||||||
|
color:$u-button-plain-u-button-info-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&--plain {
|
||||||
|
&.u-button--success {
|
||||||
|
color:$u-button-plain-u-button-success-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&--plain {
|
||||||
|
&.u-button--error {
|
||||||
|
color:$u-button-plain-u-button-error-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&--plain {
|
||||||
|
&.u-button--warning {
|
||||||
|
color:$u-button-plain-u-button-warning-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,99 @@
|
|||||||
|
<template>
|
||||||
|
<view class="u-calendar-header u-border-bottom">
|
||||||
|
<text
|
||||||
|
class="u-calendar-header__title"
|
||||||
|
v-if="showTitle"
|
||||||
|
>{{ title }}</text>
|
||||||
|
<text
|
||||||
|
class="u-calendar-header__subtitle"
|
||||||
|
v-if="showSubtitle"
|
||||||
|
>{{ subtitle }}</text>
|
||||||
|
<view class="u-calendar-header__weekdays">
|
||||||
|
<text class="u-calendar-header__weekdays__weekday">一</text>
|
||||||
|
<text class="u-calendar-header__weekdays__weekday">二</text>
|
||||||
|
<text class="u-calendar-header__weekdays__weekday">三</text>
|
||||||
|
<text class="u-calendar-header__weekdays__weekday">四</text>
|
||||||
|
<text class="u-calendar-header__weekdays__weekday">五</text>
|
||||||
|
<text class="u-calendar-header__weekdays__weekday">六</text>
|
||||||
|
<text class="u-calendar-header__weekdays__weekday">日</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'u-calendar-header',
|
||||||
|
mixins: [uni.$u.mpMixin, uni.$u.mixin],
|
||||||
|
props: {
|
||||||
|
// 标题
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
// 副标题
|
||||||
|
subtitle: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
// 是否显示标题
|
||||||
|
showTitle: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
// 是否显示副标题
|
||||||
|
showSubtitle: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
name() {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import "../../libs/css/components.scss";
|
||||||
|
|
||||||
|
.u-calendar-header {
|
||||||
|
padding-bottom: 4px;
|
||||||
|
|
||||||
|
&__title {
|
||||||
|
font-size: 16px;
|
||||||
|
color: $u-main-color;
|
||||||
|
text-align: center;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 42px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__subtitle {
|
||||||
|
font-size: 14px;
|
||||||
|
color: $u-main-color;
|
||||||
|
height: 40px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 40px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__weekdays {
|
||||||
|
@include flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
&__weekday {
|
||||||
|
font-size: 13px;
|
||||||
|
color: $u-main-color;
|
||||||
|
line-height: 30px;
|
||||||
|
flex: 1;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,85 @@
|
|||||||
|
export default {
|
||||||
|
methods: {
|
||||||
|
// 设置月份数据
|
||||||
|
setMonth() {
|
||||||
|
// 月初是周几
|
||||||
|
const day = dayjs(this.date).date(1).day()
|
||||||
|
const start = day == 0 ? 6 : day - 1
|
||||||
|
|
||||||
|
// 本月天数
|
||||||
|
const days = dayjs(this.date).endOf('month').format('D')
|
||||||
|
|
||||||
|
// 上个月天数
|
||||||
|
const prevDays = dayjs(this.date).endOf('month').subtract(1, 'month').format('D')
|
||||||
|
|
||||||
|
// 日期数据
|
||||||
|
const arr = []
|
||||||
|
// 清空表格
|
||||||
|
this.month = []
|
||||||
|
|
||||||
|
// 添加上月数据
|
||||||
|
arr.push(
|
||||||
|
...new Array(start).fill(1).map((e, i) => {
|
||||||
|
const day = prevDays - start + i + 1
|
||||||
|
|
||||||
|
return {
|
||||||
|
value: day,
|
||||||
|
disabled: true,
|
||||||
|
date: dayjs(this.date).subtract(1, 'month').date(day).format('YYYY-MM-DD')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
|
// 添加本月数据
|
||||||
|
arr.push(
|
||||||
|
...new Array(days - 0).fill(1).map((e, i) => {
|
||||||
|
const day = i + 1
|
||||||
|
|
||||||
|
return {
|
||||||
|
value: day,
|
||||||
|
date: dayjs(this.date).date(day).format('YYYY-MM-DD')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
|
// 添加下个月
|
||||||
|
arr.push(
|
||||||
|
...new Array(42 - days - start).fill(1).map((e, i) => {
|
||||||
|
const day = i + 1
|
||||||
|
|
||||||
|
return {
|
||||||
|
value: day,
|
||||||
|
disabled: true,
|
||||||
|
date: dayjs(this.date).add(1, 'month').date(day).format('YYYY-MM-DD')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
|
// 分割数组
|
||||||
|
for (let n = 0; n < arr.length; n += 7) {
|
||||||
|
this.month.push(
|
||||||
|
arr.slice(n, n + 7).map((e, i) => {
|
||||||
|
e.index = i + n
|
||||||
|
|
||||||
|
// 自定义信息
|
||||||
|
const custom = this.customList.find((c) => c.date == e.date)
|
||||||
|
|
||||||
|
// 农历
|
||||||
|
if (this.lunar) {
|
||||||
|
const {
|
||||||
|
IDayCn,
|
||||||
|
IMonthCn
|
||||||
|
} = this.getLunar(e.date)
|
||||||
|
e.lunar = IDayCn == '初一' ? IMonthCn : IDayCn
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
...e,
|
||||||
|
...custom
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
// 是否打乱键盘按键的顺序
|
||||||
|
random: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 输入一个中文后,是否自动切换到英文
|
||||||
|
autoChange: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
// 分组标题
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: uni.$u.props.cellGroup.title
|
||||||
|
},
|
||||||
|
// 是否显示外边框
|
||||||
|
border: {
|
||||||
|
type: Boolean,
|
||||||
|
default: uni.$u.props.cellGroup.border
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
percentage: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: uni.$u.props.circleProgress.percentage
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
// 倒计时总秒数
|
||||||
|
seconds: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: uni.$u.props.code.seconds
|
||||||
|
},
|
||||||
|
// 尚未开始时提示
|
||||||
|
startText: {
|
||||||
|
type: String,
|
||||||
|
default: uni.$u.props.code.startText
|
||||||
|
},
|
||||||
|
// 正在倒计时中的提示
|
||||||
|
changeText: {
|
||||||
|
type: String,
|
||||||
|
default: uni.$u.props.code.changeText
|
||||||
|
},
|
||||||
|
// 倒计时结束时的提示
|
||||||
|
endText: {
|
||||||
|
type: String,
|
||||||
|
default: uni.$u.props.code.endText
|
||||||
|
},
|
||||||
|
// 是否在H5刷新或各端返回再进入时继续倒计时
|
||||||
|
keepRunning: {
|
||||||
|
type: Boolean,
|
||||||
|
default: uni.$u.props.code.keepRunning
|
||||||
|
},
|
||||||
|
// 为了区分多个页面,或者一个页面多个倒计时组件本地存储的继续倒计时变了
|
||||||
|
uniqueKey: {
|
||||||
|
type: String,
|
||||||
|
default: uni.$u.props.code.uniqueKey
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,65 @@
|
|||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
// 标题选中时的样式
|
||||||
|
activeStyle: {
|
||||||
|
type: [String, Object],
|
||||||
|
default: () => ({
|
||||||
|
color: '#2979ff',
|
||||||
|
fontSize: '14px'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 标题未选中时的样式
|
||||||
|
inactiveStyle: {
|
||||||
|
type: [String, Object],
|
||||||
|
default: () => ({
|
||||||
|
color: '#606266',
|
||||||
|
fontSize: '14px'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 点击遮罩是否关闭菜单
|
||||||
|
closeOnClickMask: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
// 点击当前激活项标题是否关闭菜单
|
||||||
|
closeOnClickSelf: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
// 过渡时间
|
||||||
|
duration: {
|
||||||
|
type: [Number, String],
|
||||||
|
default: 300
|
||||||
|
},
|
||||||
|
// 标题菜单的高度
|
||||||
|
height: {
|
||||||
|
type: [Number, String],
|
||||||
|
default: 40
|
||||||
|
},
|
||||||
|
// 是否显示下边框
|
||||||
|
borderBottom: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 标题的字体大小
|
||||||
|
titleSize: {
|
||||||
|
type: [Number, String],
|
||||||
|
default: 14
|
||||||
|
},
|
||||||
|
// 下拉出来的内容部分的圆角值
|
||||||
|
borderRadius: {
|
||||||
|
type: [Number, String],
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
// 菜单右侧的icon图标
|
||||||
|
menuIcon: {
|
||||||
|
type: String,
|
||||||
|
default: 'arrow-down'
|
||||||
|
},
|
||||||
|
// 菜单右侧图标的大小
|
||||||
|
menuIconSize: {
|
||||||
|
type: [Number, String],
|
||||||
|
default: 14
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
// 宫格的name
|
||||||
|
name: {
|
||||||
|
type: [String, Number, null],
|
||||||
|
default: uni.$u.props.gridItem.name
|
||||||
|
},
|
||||||
|
// 背景颜色
|
||||||
|
bgColor: {
|
||||||
|
type: String,
|
||||||
|
default: uni.$u.props.gridItem.bgColor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue