mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-23 21:36:38 +08:00
优化代码
This commit is contained in:
parent
dabcb0a699
commit
56adcbd875
@ -17,11 +17,7 @@ import mapping from '../../constant/MappingConstant.js';
|
|||||||
export function getBetweenTime(startTime, endTime) {
|
export function getBetweenTime(startTime, endTime) {
|
||||||
// debugger
|
// debugger
|
||||||
// 校验时间格式
|
// 校验时间格式
|
||||||
if (typeof startTime === 'string' && typeof endTime === 'string') {
|
|
||||||
const reg = /^(0?[1-9]|([1-2][0-4])):(([0-5][0-9])(:([0-9][0-9]))?)$/;
|
|
||||||
if (!reg.test(startTime)) throw `开始时间:${startTime} 时间格式错误`;
|
|
||||||
if (!reg.test(endTime)) throw `结束时间:${endTime} 时间格式错误`;
|
|
||||||
} else throw `${startTime} 或者 ${endTime} 时间格式错误`;
|
|
||||||
let start = +startTime.split(':')[0];
|
let start = +startTime.split(':')[0];
|
||||||
let end = +endTime.split(':')[0];
|
let end = +endTime.split(':')[0];
|
||||||
const resultTime = [];
|
const resultTime = [];
|
||||||
|
|||||||
@ -52,7 +52,8 @@
|
|||||||
const constant = context.constant;
|
const constant = context.constant;
|
||||||
import {getCurCommunity} from '../../api/community/communityApi.js'
|
import {getCurCommunity} from '../../api/community/communityApi.js'
|
||||||
|
|
||||||
import {getProperty} from '../../api/property/propertyApi.js'
|
import {getProperty} from '../../api/property/propertyApi.js';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -91,7 +92,7 @@
|
|||||||
_this.communityId = _owner.communityId;
|
_this.communityId = _owner.communityId;
|
||||||
_this.ownerId = _owner.memberId;
|
_this.ownerId = _owner.memberId;
|
||||||
_this.userId = _owner.ownerId;
|
_this.userId = _owner.ownerId;
|
||||||
_this.applyPersonName = _owner.appUserName;
|
_this.applyPersonName = _owner.ownerName;
|
||||||
_this.applyPersonLink = _owner.link;
|
_this.applyPersonLink = _owner.link;
|
||||||
_this.applyPersonId = _owner.ownerId;
|
_this.applyPersonId = _owner.ownerId;
|
||||||
_this.listParkingSpace();
|
_this.listParkingSpace();
|
||||||
|
|||||||
@ -387,7 +387,6 @@
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
} else if (res.data.code == '404') {
|
} else if (res.data.code == '404') {
|
||||||
debugger
|
|
||||||
let tipsIndex = res.data.msg.indexOf("已经被预约");
|
let tipsIndex = res.data.msg.indexOf("已经被预约");
|
||||||
if (tipsIndex>=0){
|
if (tipsIndex>=0){
|
||||||
let tips = _that.HoursStr(res.data.msg.substr(0, tipsIndex))+"\n\r" + res.data.msg
|
let tips = _that.HoursStr(res.data.msg.substr(0, tipsIndex))+"\n\r" + res.data.msg
|
||||||
|
|||||||
@ -3,9 +3,9 @@
|
|||||||
<form>
|
<form>
|
||||||
<view class="cu-form-group margin-top">
|
<view class="cu-form-group margin-top">
|
||||||
<view class="title">手机号</view>
|
<view class="title">手机号</view>
|
||||||
<input placeholder="请输入手机号" type="number" disabled="disabled" name="input" v-model="phone"></input>
|
<input placeholder="请输入手机号" type="number" v-model="phone"></input>
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<button class="cu-btn bg-green" open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber">获取手机号</button>
|
<!-- <button class="cu-btn bg-green" open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber">获取手机号</button> -->
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user