Commit 33381cff authored by youjie's avatar youjie

no message

parent e8c481bd
import { HttpResponse } from '../@types' import { HttpResponse } from '../@types'
import request from './request' import request from './request'
import requestJava from './requestJava'
class HotelService { class HotelService {
//兑换优惠券
static async updateUseCouponBycod(param:any): Promise<HttpResponse> {
return requestJava('/api/b2b/user/updateUseCouponBycod', param)
}
//获取优惠券
static async getUserCanUseCouponList(param:any): Promise<HttpResponse> {
return requestJava('/api/b2b/user/getUserCanUseCouponList', param)
}
//获取相似数据 //获取相似数据
static async GetHotelHotelBooking(param:any): Promise<HttpResponse> { static async GetHotelHotelBooking(param:any): Promise<HttpResponse> {
return request('dmc_post_Get_GetJAPAN_HotelBooking', param) return request('dmc_post_Get_GetJAPAN_HotelBooking', param)
......
...@@ -409,7 +409,6 @@ export default defineComponent({ ...@@ -409,7 +409,6 @@ export default defineComponent({
methods.initOrders() methods.initOrders()
}, },
modify(id: number) { modify(id: number) {
//location.href =
currentRouter.push('/hotel/modify/' + id) currentRouter.push('/hotel/modify/' + id)
}, },
handleFinish(options: { file: UploadFileInfo; event?: ProgressEvent }) { handleFinish(options: { file: UploadFileInfo; event?: ProgressEvent }) {
......
...@@ -68,6 +68,10 @@ class DirtionmaryHelper { ...@@ -68,6 +68,10 @@ class DirtionmaryHelper {
* 散客预约酒店缓存客房下单是详情数据 * 散客预约酒店缓存客房下单是详情数据
*/ */
static readonly SCATTERED_HOTEL_ORDER = "scatteredhotelorder" static readonly SCATTERED_HOTEL_ORDER = "scatteredhotelorder"
/**
* 散客预约酒店缓存客房下单成功的详情数据
*/
static readonly SCATTERED_HOTEL_ORDER_MSG = "scatteredhotelordermsg"
/** /**
* 用户是否在中国 * 用户是否在中国
......
...@@ -755,6 +755,7 @@ export default { ...@@ -755,6 +755,7 @@ export default {
inputlabel6: '', inputlabel6: '',
inputlabel7: '', inputlabel7: '',
inputlabel8: '', inputlabel8: '',
Errorruzhushu: '入住人数与总入住数不匹配'
} }
} }
......
...@@ -178,12 +178,12 @@ ...@@ -178,12 +178,12 @@
> >
<div class="col-6 row"> <div class="col-6 row">
<span class="q-px-lg HotelSure-text"><span class="text-red">*</span> {{$t('v101.scatteredOrder.ruzhushijian1')}}</span> <span class="q-px-lg HotelSure-text"><span class="text-red">*</span> {{$t('v101.scatteredOrder.ruzhushijian1')}}</span>
<q-field v-if="$q.platform.is.desktop" stack-label :label="$t('v101.scatteredOrder.ruzhushijian')" standout class="col" style="min-width: 200px" dense> <q-field v-if="$q.platform.is.desktop" stack-label :label="$t('v101.scatteredOrder.ruzhushijian')" standout class="col" :class="{'ischeckInTimeSure':ischeckInTimeSure}" style="min-width: 200px" dense>
<div class="self-center full-width no-outline" tabindex="0"> <div class="self-center full-width no-outline" tabindex="0">
{{sureMsg.checkInTime}} {{sureMsg.checkInTime}}
</div> </div>
<q-popup-proxy :offset="[0, 10]" ref="qDateProxy3"> <q-popup-proxy :offset="[0, 10]" ref="qDateProxy3">
<q-time v-model="sureMsg.checkInTime" :rules="[ val => val && val.length > 0 || 'Please type something']" @update:model-value="dateRangeHandler3" ref="checkInTime"/> <q-time v-model="sureMsg.checkInTime" :rules="[ val => val && val.length > 0 || ' ']" @update:model-value="dateRangeHandler3"/>
</q-popup-proxy> </q-popup-proxy>
</q-field> </q-field>
</div> </div>
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
label="" label=""
hint="" hint=""
lazy-rules lazy-rules
:rules="[ val => val && val.length > 0 || ' ']" :rules="[(val:any, rules:any) => rules.email(val) || ' ']"
ref="guestEmail" ref="guestEmail"
/> />
</div> </div>
...@@ -260,9 +260,10 @@ ...@@ -260,9 +260,10 @@
filled filled
v-model="sureMsg.guestPhoneNumber" v-model="sureMsg.guestPhoneNumber"
label="" label=""
type="Number"
hint="" hint=""
lazy-rules lazy-rules
:rules="[ val => val && val.length > 0 || ' ']" :rules="[ val => val && val.length == 11 || ' ']"
ref="guestPhoneNumber" ref="guestPhoneNumber"
/> />
</div> </div>
...@@ -306,24 +307,24 @@ ...@@ -306,24 +307,24 @@
</div> </div>
</div> </div>
<div class="column text-red q-pl-lg"> <div class="column text-red q-pl-lg">
<template v-if="(dataList.cancellationPeriod1==-1||dataList.cancellationPeriod1==0)&&(dataList.cancellationType1==1||dataList.cancellationType1==2)"> <div v-if="(dataList.cancellationPeriod1==-1||dataList.cancellationPeriod1==0)&&(dataList.cancellationType1==1||dataList.cancellationType1==2)">
<template v-if="dataList.cancellationPeriod1==-1">{{$t('v101.scatteredOrder.quxiao1')}},</template> <template v-if="dataList.cancellationPeriod1==-1">{{$t('v101.scatteredOrder.quxiao1')}},</template>
<template v-if="dataList.cancellationPeriod1==0">{{$t('v101.scatteredOrder.quxiao2')}},</template> <template v-if="dataList.cancellationPeriod1==0">{{$t('v101.scatteredOrder.quxiao2')}},</template>
<template v-if="dataList.cancellationType1==1">{{$t('v101.scatteredOrder.shouxufei')}}: {{dataList.cancellation1}}%</template> <template v-if="dataList.cancellationType1==1">{{$t('v101.scatteredOrder.shouxufei')}}: {{dataList.cancellation1}}%</template>
<template v-if="dataList.cancellationType1==2">{{$t('v101.scatteredOrder.shouxufei')}}: {{dataList.cancellation1}}</template> <template v-if="dataList.cancellationType1==2">{{$t('v101.scatteredOrder.shouxufei')}}: {{dataList.cancellation1}}</template>
</template> </div>
<template v-if="(dataList.cancellationPeriod2==-1||dataList.cancellationPeriod2==0)&&(dataList.cancellationType2==1||dataList.cancellationType2==2)"> <div v-if="(dataList.cancellationPeriod2==-1||dataList.cancellationPeriod2==0)&&(dataList.cancellationType2==1||dataList.cancellationType2==2)">
<template v-if="dataList.cancellationPeriod2==-1">{{$t('v101.scatteredOrder.quxiao1')}},</template> <template v-if="dataList.cancellationPeriod2==-1">{{$t('v101.scatteredOrder.quxiao1')}},</template>
<template v-if="dataList.cancellationPeriod2==0">{{$t('v101.scatteredOrder.quxiao2')}},</template> <template v-if="dataList.cancellationPeriod2==0">{{$t('v101.scatteredOrder.quxiao2')}},</template>
<template v-if="dataList.cancellationType2==1">{{$t('v101.scatteredOrder.shouxufei')}}: {{dataList.cancellation2}}%</template> <template v-if="dataList.cancellationType2==1">{{$t('v101.scatteredOrder.shouxufei')}}: {{dataList.cancellation2}}%</template>
<template v-if="dataList.cancellationType2==2">{{$t('v101.scatteredOrder.shouxufei')}}: {{dataList.cancellation2}}</template> <template v-if="dataList.cancellationType2==2">{{$t('v101.scatteredOrder.shouxufei')}}: {{dataList.cancellation2}}</template>
</template> </div>
<template v-if="(dataList.cancellationPeriod3==-1||dataList.cancellationPeriod3==0)&&(dataList.cancellationType3==1||dataList.cancellationType3==2)"> <div v-if="(dataList.cancellationPeriod3==-1||dataList.cancellationPeriod3==0)&&(dataList.cancellationType3==1||dataList.cancellationType3==2)">
<template v-if="dataList.cancellationPeriod3==-1">{{$t('v101.scatteredOrder.quxiao1')}},</template> <template v-if="dataList.cancellationPeriod3==-1">{{$t('v101.scatteredOrder.quxiao1')}},</template>
<template v-if="dataList.cancellationPeriod3==0">{{$t('v101.scatteredOrder.quxiao2')}},</template> <template v-if="dataList.cancellationPeriod3==0">{{$t('v101.scatteredOrder.quxiao2')}},</template>
<template v-if="dataList.cancellationType3==1">{{$t('v101.scatteredOrder.shouxufei')}}: {{dataList.cancellation3}}%</template> <template v-if="dataList.cancellationType3==1">{{$t('v101.scatteredOrder.shouxufei')}}: {{dataList.cancellation3}}%</template>
<template v-if="dataList.cancellationType3==2">{{$t('v101.scatteredOrder.shouxufei')}}: {{dataList.cancellation3}}</template> <template v-if="dataList.cancellationType3==2">{{$t('v101.scatteredOrder.shouxufei')}}: {{dataList.cancellation3}}</template>
</template> </div>
</div> </div>
</q-form> </q-form>
...@@ -346,7 +347,7 @@ ...@@ -346,7 +347,7 @@
lazy-rules lazy-rules
/> />
</div> </div>
<div class="q-ml-lg"><q-btn class="q-px-lg q-py-sm" color="primary" dense unelevated :label="$t('v101.scatteredOrder.duihuan')"/></div> <div class="q-ml-lg"><q-btn class="q-px-lg q-py-sm" color="primary" dense unelevated :label="$t('v101.scatteredOrder.duihuan')" :loading="CodeLoading" @click="GetCode"/></div>
</div> </div>
<div class="column"> <div class="column">
<span class="fz16 text-weight-bold q-pb-md">{{$t('v101.scatteredOrder.youhuiquanshiyong')}}</span> <span class="fz16 text-weight-bold q-pb-md">{{$t('v101.scatteredOrder.youhuiquanshiyong')}}</span>
...@@ -374,6 +375,7 @@ ...@@ -374,6 +375,7 @@
import HotelService from '../../api/scattered' import HotelService from '../../api/scattered'
import { currentRouter } from 'src/router' import { currentRouter } from 'src/router'
import { HotelRate,HotelArea, useHotel } from '../../utils/hotelRate' import { HotelRate,HotelArea, useHotel } from '../../utils/hotelRate'
import { isPhone } from '../../utils/validate'
import { ApiResult } from 'src/@types/enumHelper' import { ApiResult } from 'src/@types/enumHelper'
export default defineComponent({ export default defineComponent({
components: { svgIcon }, components: { svgIcon },
...@@ -393,7 +395,6 @@ ...@@ -393,7 +395,6 @@
const qDateProxy = ref(null) as any const qDateProxy = ref(null) as any
const qDateProxy2 = ref(null) as any const qDateProxy2 = ref(null) as any
const qDateProxy3 = ref(null) as any const qDateProxy3 = ref(null) as any
const checkInTime = ref(null) as any
const guestLastName = ref(null) as any const guestLastName = ref(null) as any
const guestFirstName = ref(null) as any const guestFirstName = ref(null) as any
const guestAddress = ref(null) as any const guestAddress = ref(null) as any
...@@ -402,6 +403,9 @@ ...@@ -402,6 +403,9 @@
// const HotelLength = inject(DirtionmaryHelper.HOTEL_CAR_ORDER_LENGTH) as any // const HotelLength = inject(DirtionmaryHelper.HOTEL_CAR_ORDER_LENGTH) as any
const data = reactive({ const data = reactive({
CodeLoading: false,
UserCanUseCouponList: [] as Array<any>,
CouponList: [] as Array<any>,
ActivateCode: '',//兑换码 ActivateCode: '',//兑换码
params:{ params:{
// hotelId:'', // hotelId:'',
...@@ -410,6 +414,7 @@ ...@@ -410,6 +414,7 @@
arrivalDate:'', arrivalDate:'',
departureDate:'', departureDate:'',
searchroomGroup:[], searchroomGroup:[],
roomOptionCd: '',
imgUrl: '' imgUrl: ''
}, },
getParamsMsg:{} as any, getParamsMsg:{} as any,
...@@ -422,7 +427,6 @@ ...@@ -422,7 +427,6 @@
loading: false, loading: false,
dateRange: '' as any,//当前日期 dateRange: '' as any,//当前日期
dateRange2: '' as any,//当前日期 dateRange2: '' as any,//当前日期
dateRangeFormat: '',//可选日期
roomRateDetails: {} as any, roomRateDetails: {} as any,
dataList: {} as any, dataList: {} as any,
//确认MSG参数 //确认MSG参数
...@@ -449,31 +453,28 @@ ...@@ -449,31 +453,28 @@
HotelPic:'', HotelPic:'',
EmployeeIdStr:'', EmployeeIdStr:'',
OldTotalPrice:0, OldTotalPrice:0,
CustomerPayMoney:0, CustomerPayMoney:0,
DiscountMoney:0, DiscountMoney:0,
OrderSource:2, OrderSource:2,
OrderForm:1, OrderForm:1,
}, },
auditNum:0, ischeckInTimeSure: false,
childNum:0, auditNum:0,
TotalChildCount:0,//孩子能否报入 childNum:0,
chekedChildCount:0,//选了的儿童数 TotalChildCount:0,//孩子能否报入
isBaoChild: false, chekedChildCount:0,//选了的儿童数
SettlementPrice : 0, isBaoChild: false,
price: 0, SettlementPrice : 0,
isShowTime: true, price: 0,
isLoginB2B: true, isShowTime: true,
pickerBeginDateBefore:'',//入住时间前可选范围 isLoginB2B: true,
pickerBeginDateAfter:'',//入住时间后可选范围 pickerBeginDateBefore:'',//入住时间前可选范围
RoomTypeList: [] as Array<HotelArea>,//房间等级 pickerBeginDateAfter:'',//入住时间后可选范围
scatteredRoomTypeList: [] as Array<HotelArea>,//散客房间类型 RoomTypeList: [] as Array<HotelArea>,//房间等级
WeekList: [] as Array<HotelArea>,//周一至周日 scatteredRoomTypeList: [] as Array<HotelArea>,//散客房间类型
checkInWeek: '', WeekList: [] as Array<HotelArea>,//周一至周日
checkOutWeek: '', checkInWeek: '',//周一至周日
name: '', checkOutWeek: '',
age: '',
}) })
for(let i=0;i<21;i++){ for(let i=0;i<21;i++){
data.adultList.push(i) data.adultList.push(i)
...@@ -487,41 +488,108 @@ ...@@ -487,41 +488,108 @@
data.urlParamsMsg = currentRouter.currentRoute.value.params data.urlParamsMsg = currentRouter.currentRoute.value.params
data.auditNum = data.getParamsMsg.auditNum data.auditNum = data.getParamsMsg.auditNum
data.childNum = data.getParamsMsg.childNum data.childNum = data.getParamsMsg.childNum
// data.dateRange = date.formatDate(date.addToDate(new Date(), { days: 9 }), 'YYYY/MM/DD')
// data.dateRange = date.formatDate(date.addToDate(new Date(), { days: 9 }), 'YYYY/MM/DD')
data.RoomTypeList = useHotel.getHotelRoomType() data.RoomTypeList = useHotel.getHotelRoomType()
data.scatteredRoomTypeList = useHotel.getHotelScatRoom() data.scatteredRoomTypeList = useHotel.getHotelScatRoom()
data.WeekList = useHotel.getHotelWeek() data.WeekList = useHotel.getHotelWeek()
// data.dateRange.from = date.formatDate(date.addToDate(new Date(), { days: 8 }), 'YYYY/MM/DD')
// data.dateRangeFormat = data.dateRange let roomGroupLen = data.params.searchroomGroup.length
for(var i=0;i<roomGroupLen;i++){
var obj = {
roomCount:i+1,
roomMaleCount:0,
roomFemaleCount:0,
roomChildCount:0,
roomInfantCount:0,
rateGroup:[]
}
data.sureMsg.roomGroup.push(obj);
}
// watch( // watch(
// () => data.urlParamsMsg.hotelId, // () => data.urlParamsMsg.hotelId,
// (o, n) => { // (o, n) => {
// methods.initHotel() //
// } // }
// ) // )
const methods = { const methods = {
submitForm () { submitForm () {
return
if(data.submLoading) return if(data.submLoading) return
checkInTime.value.validate() let flag = false
guestLastName.value.validate() guestLastName.value.validate()
guestFirstName.value.validate() guestFirstName.value.validate()
guestAddress.value.validate() guestAddress.value.validate()
guestEmail.value.validate() guestEmail.value.validate()
guestPhoneNumber.value.validate() guestPhoneNumber.value.validate()
return
data.loading = true flag = !guestLastName.value.hasError && !guestFirstName.value.hasError && !guestAddress.value.hasError && !guestEmail.value.hasError && !guestPhoneNumber.value.hasError
if(!data.sureMsg.checkInTime) return data.ischeckInTimeSure = true
if(!isPhone(data.sureMsg.guestPhoneNumber)) return
if(!flag) return
data.sureMsg.hotelId = data.urlParamsMsg.hotelId;
data.sureMsg.arrivalDate = data.params.arrivalDate;
data.sureMsg.totalRoomCount = data.params.searchroomGroup.length;
data.sureMsg.departureDate = data.params.departureDate;
data.sureMsg.roomOptionCd = data.params.roomOptionCd;
data.sureMsg.HotelName = data.dataList.hotelName;
data.sureMsg.HotelPic = data.params.imgUrl;
//判断选择的人数与入住人数
let Count1=0
data.sureMsg.roomGroup.forEach(x=>{
Count1+=x.roomMaleCount+x.roomFemaleCount+x.roomChildCount
})
let Count2=0;
Count2=data.auditNum+data.childNum;
if(Count1!=Count2){
message.errorMsg(t('v101.scatteredOrder.Errorruzhushu'))
return;
}
data.dataList.roomGroup.forEach(x=>{
data.sureMsg.roomGroup.forEach(j=>{
if(Object.prototype.toString.call(x.rateGroup) == '[object Object]'){
j.rateGroup.push(x.rateGroup);
}else{
j.rateGroup=x.rateGroup
}
})
})
if(data.sureMsg.CustomerId==null||data.sureMsg.CustomerId==""){
data.sureMsg.CustomerId=0
}
data.submLoading = true
let param = Object.assign(data.sureMsg) let param = Object.assign(data.sureMsg)
HotelService.GetHotelHotelBooking(param) HotelService.GetHotelHotelBooking(param)
.then(r => { .then(r => {
data.submLoading = false
if (r.data.resultCode == ApiResult.SUCCESS) { if (r.data.resultCode == ApiResult.SUCCESS) {
localStorage.removeItem(DirtionmaryHelper.SCATTERED_HOTEL_ORDER_MSG)
message.successMsg(`${t('success')}`) message.successMsg(`${t('success')}`)
// localStorage.removeItem(DirtionmaryHelper.HOTEL_HOTELCARS_CACHE) let num =0;
data.sureMsg.roomGroup.forEach(x=>{
num+=parseInt(x.roomFemaleCount)+parseInt(x.roomMaleCount)+parseInt(x.roomChildCount)
})
let msg = {
RB_Branch_id:r.data.data.RB_Branch_id,
costType:r.data.data.costType,
orderId:r.data.data.orderId,
bookingNumber:r.data.data.parmResult.bookingNumber,
bookMoney:data.SettlementPrice,
CancelTime:r.data.data.CancelTime,
hotelName:r.data.data.parmResult.hotelName,
totalPnumber:num
}
localStorage.setItem(DirtionmaryHelper.SCATTERED_HOTEL_ORDER_MSG,JSON.stringify(msg))
// sessionStorage.setItem("HotelPayMsg", JSON.stringify(msg));
currentRouter.push({
path:"/HotelPayBefore",
})
} else { } else {
message.errorMsg(r.data.message) message.errorMsg(r.data.message)
} }
data.submLoading = false
}) })
.catch(e => { .catch(e => {
message.errorMsg(e.message) message.errorMsg(e.message)
...@@ -771,6 +839,7 @@ ...@@ -771,6 +839,7 @@
data.sureMsg.totalPriceJapanese += parseFloat(AdultJapanCount+childJapanCount+onlyJanpnase); data.sureMsg.totalPriceJapanese += parseFloat(AdultJapanCount+childJapanCount+onlyJanpnase);
methods.getUserCanUseCouponList()
}) })
} }
data.loading = false data.loading = false
...@@ -779,7 +848,29 @@ ...@@ -779,7 +848,29 @@
message.errorMsg(e.message) message.errorMsg(e.message)
}) })
}, },
// 获取优惠券 GetCode(){
if(data.CodeLoading) return
if(!data.ActivateCode) return
let msg={
ActivateCode:data.ActivateCode
};
data.CodeLoading = true
let param = Object.assign(msg)
HotelService.updateUseCouponBycod(param)
.then(r => {
data.CodeLoading = false
if (r.data.resultCode == ApiResult.SUCCESS) {
message.successMsg(`${t('success')}`)
methods.getUserCanUseCouponList();
}else{
message.errorMsg(r.message)
}
}).catch(e => {
data.CodeLoading = false
message.errorMsg(e.message)
})
},
// 获取优惠券
getUserCanUseCouponList(){ getUserCanUseCouponList(){
let msg={ let msg={
lineId:0, lineId:0,
...@@ -787,15 +878,29 @@ ...@@ -787,15 +878,29 @@
CouponsUseScope:10, CouponsUseScope:10,
}; };
let param = Object.assign(msg) let param = Object.assign(msg)
// HotelService.GetHotelDetailScat(param) HotelService.getUserCanUseCouponList(param)
// .then(r => { .then(r => {
// if (r.data.resultCode == ApiResult.SUCCESS) { if (r.data.resultCode == ApiResult.SUCCESS) {
data.CouponList=res.data.data;
// } data.CouponList.forEach(item=>{
// }).catch(e => { item.active=false;
// data.loading = false })
// message.errorMsg(e.message) methods.filterCoupon();
// }) }
}).catch(e => {
data.loading = false
message.errorMsg(e.message)
})
},
filterCoupon() {
let list = []
data.CouponList.forEach(x=>{
if (data.price>x.useCondition) {
x.active = false
list.push(x);
}
})
data.UserCanUseCouponList = list;
}, },
} }
...@@ -803,7 +908,7 @@ ...@@ -803,7 +908,7 @@
methods.initHotel() methods.initHotel()
}) })
return { ...toRefs(data), ...methods,qDateProxy,qDateProxy2,qDateProxy3 } return { ...toRefs(data), ...methods,qDateProxy,qDateProxy2,qDateProxy3,guestLastName,guestFirstName,guestAddress,guestEmail,guestPhoneNumber }
} }
}) })
</script> </script>
...@@ -812,5 +917,8 @@ ...@@ -812,5 +917,8 @@
.HotelSure-text{ .HotelSure-text{
width: 120px; width: 120px;
} }
.ischeckInTimeSure .q-field__control{
border: 1px solid red;
}
</style> </style>
\ No newline at end of file
...@@ -538,7 +538,6 @@ ...@@ -538,7 +538,6 @@
showImageHandler(url: string) { showImageHandler(url: string) {
data.currentImage = url data.currentImage = url
data.showImagePriview = true data.showImagePriview = true
console.log('===')
} }
} }
......
...@@ -143,7 +143,7 @@ const useHotel={ ...@@ -143,7 +143,7 @@ const useHotel={
} }
return rates return rates
}, },
// 散客下单周一至周 // 散客下单周一至周
getHotelWeek():HotelArea[]{ getHotelWeek():HotelArea[]{
let rates=[] as HotelArea[] let rates=[] as HotelArea[]
for(let i=1;i<8;i++){ for(let i=1;i<8;i++){
......
...@@ -32,6 +32,13 @@ export function isEmail(account:string):boolean { ...@@ -32,6 +32,13 @@ export function isEmail(account:string):boolean {
let regexp = new RegExp('/^(([^<>()\[\]\\.,;:\[email protected]"]+(\.[^<>()\[\]\\.,;:\[email protected]"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/'); let regexp = new RegExp('/^(([^<>()\[\]\\.,;:\[email protected]"]+(\.[^<>()\[\]\\.,;:\[email protected]"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/');
serchfind = regexp.test(account); serchfind = regexp.test(account);
return serchfind return serchfind
}
export function isPhone(account:string):boolean {
let serchfind:boolean;
let regexp = new RegExp('/^((13|14|15|16|17|18|19)[0-9]{1}\d{8})$/');
serchfind = regexp.test(account);
return serchfind
} }
/** 比对数组是否相同 */ /** 比对数组是否相同 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment