提交 bc5c1577 编写于 作者: 刘英杰's avatar 刘英杰

v20240416 添加护照校验

上级 3ec27180
default:
before_script:
- chcp 65001
stages:
- publish
build:
stage: publish
script:
- remove-item -Force -Recurse D:\ASC_web\A00051\qth5*
- xcopy "unpackage/dist/build/h5" "D:\ASC_web\A00051\qth5\" /s/e/y/
only:
- wx
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}
...@@ -6,10 +6,10 @@ import './uni.promisify.adaptor' ...@@ -6,10 +6,10 @@ import './uni.promisify.adaptor'
import uView from 'uview-ui' import uView from 'uview-ui'
import hooks from "./hooks/index.js" import hooks from "./hooks/index.js"
Vue.use(uView) Vue.use(uView)
// import Vconsole from 'vconsole' import Vconsole from 'vconsole'
//
// let vConsole = new Vconsole() let vConsole = new Vconsole()
// Vue.use(vConsole) Vue.use(vConsole)
// 如此配置即可 // 如此配置即可
uni.$u.config.unit = 'rpx' uni.$u.config.unit = 'rpx'
// 调用setConfig方法,方法内部会进行对象属性深度合并,可以放心嵌套配置 // 调用setConfig方法,方法内部会进行对象属性深度合并,可以放心嵌套配置
......
{ {
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages "pages": [
{ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
"path" : "pages/403/403",
"style" :
{
"navigationBarTitleText": "博物馆预约",
"enablePullDownRefresh": false
}
},
{ {
"path" : "pages/getWxCode/InitInfo", "path" : "pages/getWxCode/InitInfo",
"style" : "style" :
...@@ -122,7 +115,17 @@ ...@@ -122,7 +115,17 @@
} }
},
{
"path" : "pages/403/403",
"style" :
{
// "navigationBarTitleText": "博物馆预约",
"navigationStyle":"custom",// 去除顶部 导航栏
"enablePullDownRefresh": false
} }
}
], ],
"easycom": { "easycom": {
"autoscan": true, "autoscan": true,
......
<template> <template>
<view style="display: flex;justify-content: center;align-items: center;width: 100vw;height: 100vh;"> <view style="width: 100vw;height: calc(100vh - 20px);">
<h3>系统正在维护中...</h3> <view style="margin-top: 20px;"></view>
<view style="padding: 10px;overflow-y: scroll; box-sizing: border-box;" v-html="text"></view>
</view> </view>
</template> </template>
...@@ -8,7 +9,7 @@ ...@@ -8,7 +9,7 @@
export default { export default {
data() { data() {
return { return {
text:'<p style="text-align:center"><strong><span style="font-size:29px;font-family:宋体">关于琼台书院博物馆继续维修闭馆的公告</span></strong></p><p style="margin-bottom:8px;text-indent:28px"><span style="font-family:宋体;color:#333333">&nbsp;</span></p><p style="margin-bottom:8px;text-indent:37px;line-height:250%"><span style="font-size:19px;line-height:250%;font-family:宋体;color:#333333">琼台书院博物馆自2024年2月27日起闭馆,继续对书院建筑外立面开展“书院博物馆部分场所维修项目”,维修室外损坏的涂料、漆面等,开馆时间另行通知。闭馆期间咨询服务电话: 李老师13086025370、孙老师13647579765</span></p><p style="margin-bottom:8px;text-indent:37px;line-height:250%"><span style="font-size:19px;line-height:250%;font-family:宋体;color:#333333">由此带来的不便,敬请谅解。</span></p><p style="margin-bottom:8px;text-align:justify;text-justify:inter-ideograph"><span style="font-family:宋体;color:#333333">&nbsp;</span></p><p style="margin-bottom:8px;text-align:right"><span style="font-size:19px;font-family: 宋体;color:#333333">琼台师范学院琼台书院博物馆 保卫处 (社会治安综合治理办公室)</span></p><p style="margin-bottom:8px;text-align:right"><span style="font-size:19px;font-family:宋体;color:#333333">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2024</span><span style="font-size:19px;font-family:宋体;color:#333333">年2月24日</span></p><p><span style="font-size:16px">&nbsp;</span></p><p><br/></p>'
} }
}, },
methods: { methods: {
...@@ -17,6 +18,9 @@ ...@@ -17,6 +18,9 @@
} }
</script> </script>
<style> <style scoped>
body{
width: 100vw;
height: 100vh;
}
</style> </style>
...@@ -45,6 +45,25 @@ ...@@ -45,6 +45,25 @@
export default { export default {
data() { data() {
return { return {
list1: [{
name: '关注',
}, {
name: '推荐',
}, {
name: '电影'
}, {
name: '科技'
}, {
name: '音乐'
}, {
name: '美食'
}, {
name: '文化'
}, {
name: '财经'
}, {
name: '手工'
}],
key:1, key:1,
checkboxValue7:[], checkboxValue7:[],
timer:'', timer:'',
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
.c-container-content-top-left,.c-container-content-top-right{ .c-container-content-top-left,.c-container-content-top-right{
width: 47%; width: 47%;
height: 100%; height: 100%;
background: url('../../static/images/0203_3.png'); background: url('../../static/images/0203_2.png');
background-size: 100% 100%; background-size: 100% 100%;
box-sizing: border-box; box-sizing: border-box;
border-radius: 5%; border-radius: 5%;
......
...@@ -37,30 +37,30 @@ ...@@ -37,30 +37,30 @@
</view> </view>
</u-popup> </u-popup>
</view> </view>
<view class="c-container-content"> <view class="c-container-content" >
<!-- <view class="c-container-content-top">--> <view class="c-container-content-top " style="margin-bottom: 15px">
<!-- <view class="c-container-content-top-left" @click="tourist">--> <view class="c-container-content-top-left" @click="tourist">
<!-- <view class="c-container-content-top-left-container">--> <view class="c-container-content-top-left-container">
<!-- <view class="c-container-content-top-left-text">--> <view class="c-container-content-top-left-text">
<!-- <span style="font-size: 21px">散客预约</span>--> <span style="font-size: 21px">散客预约</span>
<!-- </view>--> </view>
<!-- <view class="c-container-content-top-left-icon">--> <view class="c-container-content-top-left-icon">
<!-- <image src="../../static/images/arrow.png" style="width: 70%;height: 50%;"></image>--> <image src="../../static/images/0203_1.png" style="width: 70%;height: 50%;"></image>
<!-- </view>--> </view>
<!-- </view>--> </view>
<!-- </view>--> </view>
<!-- <view class="c-container-content-top-right" @click="team">--> <view class="c-container-content-top-right" @click="team">
<!-- <view class="c-container-content-top-right-container">--> <view class="c-container-content-top-right-container">
<!-- <view class="c-container-content-top-right-text">--> <view class="c-container-content-top-right-text">
<!-- <span style="font-size: 21px">团队预约</span>--> <span style="font-size: 21px">团队预约</span>
<!-- </view>--> </view>
<!-- <view class="c-container-content-top-right-icon">--> <view class="c-container-content-top-right-icon">
<!-- <image src="../../static/images/arrow.png" style="width: 70%;height: 50%;"></image>--> <image src="../../static/images/0203_1.png" style="width: 70%;height: 50%;"></image>
<!-- </view>--> </view>
<!-- </view>--> </view>
<!-- </view>--> </view>
<!-- </view>--> </view>
<view class="c-container-content-center" @click="tourist" style="margin-bottom: 20px;margin-top: 20px;"> <!-- <view class="c-container-content-center" @click="tourist" style="margin-bottom: 20px;margin-top: 20px;">
<view class="c-container-content-center-container"> <view class="c-container-content-center-container">
<view class="c-container-content-center-text"> <view class="c-container-content-center-text">
<span style="font-size: 21px"> <span style="font-size: 21px">
...@@ -71,21 +71,21 @@ ...@@ -71,21 +71,21 @@
<image src="../../static/images/0203_1.png" style="width: 30%;height: 50%;"></image> <image src="../../static/images/0203_1.png" style="width: 30%;height: 50%;"></image>
</view> </view>
</view> </view>
</view> -->
<view class="c-container-content-center" @click="office" style="margin-bottom: 15px">
<view class="c-container-content-center-container" >
<view class="c-container-content-center-text">
<span style="font-size: 21px">
公务接待预约
</span>
</view>
<view class="c-container-content-center-icon">
<image src="../../static/images/0203_1.png" style="width: 30%;height: 50%;"></image>
</view> </view>
<!-- <view class="c-container-content-center" @click="office">--> </view>
<!-- <view class="c-container-content-center-container">--> </view>
<!-- <view class="c-container-content-center-text">--> <view class="c-container-content-footer" @click="record" >
<!-- <span style="font-size: 21px">--> <view class="c-container-content-footer-container" >
<!-- 公务接待预约-->
<!-- </span>-->
<!-- </view>-->
<!-- <view class="c-container-content-center-icon">-->
<!-- <image src="../../static/images/arrow.png" style="width: 30%;height: 50%;"></image>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<view class="c-container-content-footer" @click="record">
<view class="c-container-content-footer-container">
<view class="c-container-content-footer-text"> <view class="c-container-content-footer-text">
<span style="font-size: 21px"> <span style="font-size: 21px">
预约记录 预约记录
...@@ -124,7 +124,6 @@ ...@@ -124,7 +124,6 @@
document.body.style.overflow = 'hidden' document.body.style.overflow = 'hidden'
}, },
onLoad() { onLoad() {
setTimeout(()=>{ setTimeout(()=>{
//获取须知节点 //获取须知节点
const element = document.getElementById('notice'); const element = document.getElementById('notice');
...@@ -135,7 +134,6 @@ ...@@ -135,7 +134,6 @@
this.noticeFlag = true this.noticeFlag = true
} }
},1000) },1000)
this.GetUseCarouselList() this.GetUseCarouselList()
this.GetSysconfigurationInfoByWX() this.GetSysconfigurationInfoByWX()
}, },
......
...@@ -84,7 +84,6 @@ ...@@ -84,7 +84,6 @@
} }
strategicObject[String(name)](value) strategicObject[String(name)](value)
}, },
checkboxChange(e){ checkboxChange(e){
console.log("🚀🚀🚀,",e) console.log("🚀🚀🚀,",e)
}, },
...@@ -101,6 +100,7 @@ ...@@ -101,6 +100,7 @@
); );
}, },
async login() { async login() {
if(!!this.checkbox.length && this.init.phone) api.PCLogin({phone:this.init.phone}).then((res)=>{ if(!!this.checkbox.length && this.init.phone) api.PCLogin({phone:this.init.phone}).then((res)=>{
this.strategicObject(res.response.login,res) this.strategicObject(res.response.login,res)
}) })
......
...@@ -25,12 +25,12 @@ ...@@ -25,12 +25,12 @@
border-radius: 10px; border-radius: 10px;
width: 100%; width: 100%;
height: 35%; /*height: 35%;*/
background-color: white; background-color: white;
/*border-radius: 2vw;*/ /*border-radius: 2vw;*/
/*padding: 3vw;*/ /*padding: 3vw;*/
box-sizing: border-box; box-sizing: border-box;
min-height: 220px; /*min-height: 220px;*/
} }
.content-header-header{ .content-header-header{
...@@ -54,8 +54,8 @@ ...@@ -54,8 +54,8 @@
} }
.content-header-content-header,.content-header-content-footer{ .content-header-content-header,.content-header-content-footer{
width: 100%; width: 100%;
height: 50%; /*height: 50%;*/
height: 100px;
} }
.content-header-content-footer-content{ .content-header-content-footer-content{
width: 100%; width: 100%;
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</view> </view>
</view> </view>
<view class="content-header-content-footer"> <view v-if="false" class="content-header-content-footer">
<view class="content-header-content-footer-hearder"> <view class="content-header-content-footer-hearder">
<span style="color: #574f44;">参观场次</span> <span style="color: #574f44;">参观场次</span>
</view> </view>
...@@ -101,29 +101,33 @@ ...@@ -101,29 +101,33 @@
<view class="c-f-f" style="background-color: #F4ECE6"> <view class="c-f-f" style="background-color: #F4ECE6">
<view class="c-f-f-i"> <view class="c-f-f-i">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
姓名 <span style="color: red">*</span>姓名
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
<u-input v-model="formDateValidate.name" class="input"></u-input> <u-input @blur="leaderInformation('zzName')" v-model="formDateValidate.name" class="input"></u-input>
</view> </view>
<span style="color: red" v-if="zzName">*{{zzName}}</span>
</view> </view>
<view class="c-f-f-i" :key="aaa"> <view class="c-f-f-i" :key="aaa">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
身份证号 <span style="color: red">*</span>身份证号/护照号码
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
<u-input @blur="myFunction1" v-model="formDateValidate.identity_num" class="input"></u-input> <u-input @blur="leaderInformation('zzIdentity_num')" v-model="formDateValidate.identity_num" class="input"></u-input>
</view> </view>
<span style="color: red" v-if="zzIdentity_num">*{{zzIdentity_num}}</span> <span style="color: red" v-if="zzIdentity_num">*{{zzIdentity_num}}</span>
</view> </view>
<view class="c-f-f-i"> <view class="c-f-f-i">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
手机号码 <span style="color: red">*</span>手机号码
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
<u-input v-model="formDateValidate.mobile" class="input"></u-input> <u-input @blur="leaderInformation('zzMobile')" v-model="formDateValidate.mobile" class="input"></u-input>
</view> </view>
<span style="color: red" v-if="zzMobile">*{{zzMobile}}</span>
</view> </view>
<view class="c-f-f-i"> <view class="c-f-f-i">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
...@@ -231,6 +235,8 @@ ...@@ -231,6 +235,8 @@
export default { export default {
data() { data() {
return { return {
zzName:'',
zzMobile:'',
zzIdentity_num:'', zzIdentity_num:'',
aaa:1, aaa:1,
loading2:false, loading2:false,
...@@ -275,8 +281,52 @@ ...@@ -275,8 +281,52 @@
} }
}, },
methods: { methods: {
leaderInformation(key){
//验证领队信息
let object = {
'zzIdentity_num':()=>{
function isPassPortCard(passportNumber) {
let a = /^[a-zA-Z0-9]{1}\d{8}$/
return a.test(passportNumber)
}
const card15 =
/^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/;
const card18 =
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
if (card15.test(this.formDateValidate.identity_num) || card18.test(this.formDateValidate.identity_num)||isPassPortCard(this.formDateValidate.identity_num)) {
this[key] = ''
}
if (!(card15.test(this.formDateValidate.identity_num) || card18.test(this.formDateValidate.identity_num) ||isPassPortCard(this.formDateValidate.identity_num))) {
this[key] = '身份证/护照号码格式异常,请检查身份证号码'
}
},
'zzMobile':()=>{
if (!/^1[3-9]\d{9}$/.test(this.formDateValidate.mobile)) {
this.zzMobile = '手机号格式异常'
}else {
this.zzMobile = ''
}
},
'zzName':()=>{
if (!(this.validateName(this.formDateValidate.name))) {
this.zzName = '姓名格式异常'
}else {
this.zzName = ''
}
}
}
object[key]()
this.aaa ++
},
validateName(name){
//姓名正则验证
var regex = /^[\u4E00-\u9FA5a-zA-Z]+$/;
return regex.test(name);
},
myFunction1(){ myFunction1(){
console.log("🚀🚀🚀,",123)
//输入框失焦点触发 //输入框失焦点触发
const card15 = const card15 =
/^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/; /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/;
...@@ -286,7 +336,7 @@ ...@@ -286,7 +336,7 @@
this.zzIdentity_num = '' this.zzIdentity_num = ''
} }
if (!(card15.test(this.formDateValidate.identity_num) || card18.test(this.formDateValidate.identity_num))) { if (!(card15.test(this.formDateValidate.identity_num) || card18.test(this.formDateValidate.identity_num))) {
this.zzIdentity_num = '身份证格式异常,请检查身份证号码' this.zzIdentity_num = '身份证/护照号码格式异常,请检查身份证号码'
} }
this.aaa ++ this.aaa ++
}, },
...@@ -294,15 +344,20 @@ ...@@ -294,15 +344,20 @@
//输入框失焦点触发 //输入框失焦点触发
let object = { let object = {
'identity_num':()=>{ 'identity_num':()=>{
function isPassPortCard(card) {
let a = /^[a-zA-Z0-9]{1}\d{8}$/
return a.test(card)
}
const card15 = const card15 =
/^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/; /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/;
const card18 = const card18 =
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
if (card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num)) { if (card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num) || isPassPortCard(this.peopleList[index].identity_num)) {
this.peopleList[index].zzIdentity_num = '' this.peopleList[index].zzIdentity_num = ''
} }
if (!(card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num))) { if (!(card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num) || isPassPortCard(this.peopleList[index].identity_num)) ) {
this.peopleList[index].zzIdentity_num = '身份证格式异常,请检查身份证号码' this.peopleList[index].zzIdentity_num = '身份证/护照号码格式异常,请检查身份证号码'
} }
}, },
'mobile':()=>{ 'mobile':()=>{
...@@ -322,20 +377,27 @@ ...@@ -322,20 +377,27 @@
...this.formDateValidate, ...this.formDateValidate,
type : 2, type : 2,
museum_date:this.itemObject.initDate, museum_date:this.itemObject.initDate,
moment: this.lastAndAfternoonStatus === 3 ? '1' : '2', // moment: this.lastAndAfternoonStatus === 3 ? '1' : '2',
moment:0,
users:this.peopleList users:this.peopleList
} }
let object = { let object = {
bookNow:async () => { bookNow:async () => {
this.loading2 = true; this.loading2 = true;
api.TeamOrOfficialCreate(this.formDateValidate).then((res)=>{ api.TeamOrOfficialCreate(this.formDateValidate).then((res)=>{
if (res.code === 1){
this.$u.toast(res.msg); this.$u.toast(res.msg);
this.loading2 = false;
setTimeout(()=>{ setTimeout(()=>{
uni.navigateTo({ uni.navigateTo({
url:'/pages/record-appointment/index' url:'/pages/record-appointment/index'
}) })
},1000) },1000)
}else{
this.$u.toast(res.msg_detail);
}
this.loading2 = false;
}) //立即预约 }) //立即预约
} }
} }
...@@ -357,7 +419,10 @@ ...@@ -357,7 +419,10 @@
if(cur.date === dayjs(day.date).format('MM月DD日') && cur.state === 0) if(cur.date === dayjs(day.date).format('MM月DD日') && cur.state === 0)
{ {
day.bottomInfo = '可订' day.bottomInfo = '可订'
}else if( cur.date === dayjs(day.date).format('MM月DD日') && cur.state === 0){ }else if( cur.date === dayjs(day.date).format('MM月DD日') && cur.state === 1){
day.disabled = true
}else if (!this.dateList.map(cur=>cur.date).includes(dayjs(day.date).format('MM月DD日'))){
//日期数据不包含也移除
day.disabled = true day.disabled = true
} }
}) })
...@@ -401,6 +466,7 @@ ...@@ -401,6 +466,7 @@
this.lastAndAfternoonStatus = '' //选择日期时 初始化 上下午状态 this.lastAndAfternoonStatus = '' //选择日期时 初始化 上下午状态
this.dateList[index].OkState = 3 // 选中日期 显示打勾 通过 OkState === 3 则打勾 this.dateList[index].OkState = 3 // 选中日期 显示打勾 通过 OkState === 3 则打勾
if(index) this.zhidingriqi = true if(index) this.zhidingriqi = true
this.$forceUpdate()
} }
}, },
deleteAddPeole(index){ deleteAddPeole(index){
......
...@@ -75,3 +75,133 @@ ...@@ -75,3 +75,133 @@
} }
.container-superclass{
width: 100vw;
height: calc( 100vh - 44px);
background: #F2EEE9;
overflow-y: auto;
max-width: 430px;
max-height:1000px;
margin-left: auto;
margin-right: auto;
}
.container1{
width: 100%;
height: 65%;
padding: 15px;
box-sizing: border-box;
}
.top{
width: 100%;
height: 2%;
background: #D89A7C;
border-top-left-radius:15px ;
border-top-right-radius:15px ;
}
.content-top{
width: 100%;
height: 28%;
background: #FFFBF7;
min-height: 150px;
}
.content-footer{
width: 100%;
height: 4%;
background: #D89A7C;
box-sizing: border-box;
display: flex;
justify-content: space-between;
position: relative;
border: none;
}
.c-f-l{
width: 15px;
height: 100%;
border-radius: 0 50px 50px 0;
background: #F2EEE9;
position: absolute;
left: 0;
border: none;
}
.c-f-r{
width: 15px;
height: 100%;
border-radius: 50px 0 0 50px;
background: #F2EEE9;
position: absolute;
right: 0;
border: none;
}
.footer1{
width: 100%;
height: 64%;
background: url("../../static/images/home-bg.png");
background-size: cover;
min-height: 340px;
border: #F7CFCB 1px solid;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
}
.c-item{
width: 100%;
height: 23%;
min-height: 160px;
border-radius:10px;
background: #FFFBF7;
margin-bottom: 20px;
padding: 15px;
box-sizing: border-box;
}
.c-h{
width: 100%;
height: 30%;
display: flex;
align-items: center;
box-sizing: border-box;
font-size: 25px;
font-family: '宋体';
font-weight: bolder;
color: #574f44;
border-bottom: #F2EEE9 1.5px solid;
margin-bottom: 15px;
}
.c-c{
width: 100%;
height: 75%;
box-sizing: border-box;
position: relative;
}
.c-c-text-container{
display: flex;
width: 100%;
height: 20%;
color: #574f44;
font-size: 20px;
font-family: '宋体';
margin-top: 5px;
}
.c-c-t-right{
width: 30%;
height: 100%;
display: flex;
align-items: center;
}
.c-c-t-left{
width: 70%;
height: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
}
此差异已折叠。
<template> <template>
<view class="content-footer" > <view class="content-footer" >
<view ref="people-list" class="content-footer-container" > <view ref="people-list" class="content-footer-container">
<view class="c-f-h"> <view class="c-f-h">
参观人员 参观人员
</view> </view>
<view class="c-f-f" style="background-color: #F4ECE6;"> <view class="c-f-f" style="background-color: #F4ECE6;">
<view class="c-f-f-i"> <view class="c-f-f-i" :key="aaa">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
姓名 <span style="color: red">*</span>姓名
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
<u-input v-model="formDataValiedate.name" class="input"></u-input> <u-input @blur="leaderInformation('zzName')" v-model="formDataValiedate.name" class="input"></u-input>
</view> </view>
<span style="color: red" v-if="zzName">*{{zzName}}</span>
</view> </view>
<view class="c-f-f-i" v-if="init.type === '1'"> <view class="c-f-f-i" v-if="init.type === '1'" :key="aaa">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
身份证号 <span style="color: red">*</span>身份证号/护照号码
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
<u-input v-model="formDataValiedate.identity_num" class="input"></u-input> <u-input @blur="leaderInformation('zzIdentity_num')" v-model="formDataValiedate.identity_num" class="input"></u-input>
</view> </view>
<span style="color: red" v-if="zzIdentity_num">*{{zzIdentity_num}}</span>
</view> </view>
<view class="c-f-f-i" v-if="init.type === '2'"> <view class="c-f-f-i" v-if="init.type === '2'">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
...@@ -46,6 +49,11 @@ ...@@ -46,6 +49,11 @@
export default { export default {
data() { data() {
return { return {
aaa:1,
zzIdentity_num:'',
zzMobile:'',
zzName:'',
code:this.getUrlKey('code'), code:this.getUrlKey('code'),
init:{ init:{
appointmentid:'', appointmentid:'',
...@@ -61,6 +69,46 @@ ...@@ -61,6 +69,46 @@
} }
}, },
methods: { methods: {
leaderInformation(key){
//验证领队信息
let object = {
'zzIdentity_num':()=>{
console.log("🚀🚀🚀,",this.formDataValiedate.identity_num, this.zzIdentity_num)
function isPassPortCard(passportNumber) {
let a = /^[a-zA-Z0-9]{1}\d{8}$/
return a.test(passportNumber)
}
const card15 =
/^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/;
const card18 =
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
if (card15.test(this.formDataValiedate.identity_num) || card18.test(this.formDataValiedate.identity_num)||isPassPortCard(this.formDataValiedate.identity_num)) {
this.zzIdentity_num = ''
}
if (!(card15.test(this.formDataValiedate.identity_num) || card18.test(this.formDataValiedate.identity_num) ||isPassPortCard(this.formDataValiedate.identity_num))) {
this.zzIdentity_num = '身份证/护照号码格式异常,请检查身份证号码'
}
},
'zzMobile':()=>{
if (!/^1[3-9]\d{9}$/.test(this.formDataValiedate.mobile)) {
this.zzMobile = '手机号格式异常'
}else {
this.zzMobile = ''
}
},
'zzName':()=>{
console.log("🚀🚀🚀,",this.formDataValiedate.name, this.zzName)
if (!(this.validateName(this.formDataValiedate.name))) {
this.zzName = '姓名格式异常'
}else {
this.zzName = ''
}
}
}
console.log("🚀🚀key🚀,",key)
object[String(key)]()
this.aaa ++
},
// 截取url中的token // 截取url中的token
getUrlKey(name) { getUrlKey(name) {
return ( return (
...@@ -71,6 +119,11 @@ ...@@ -71,6 +119,11 @@
) || null ) || null
); );
}, },
validateName(name){
//姓名正则验证
var regex = /^[\u4E00-\u9FA5a-zA-Z]+$/;
return regex.test(name);
},
addPeople(){ addPeople(){
this.formDataValiedate.appointment_id = this.init.appointmentid this.formDataValiedate.appointment_id = this.init.appointmentid
api.ChangeCommitSave(this.formDataValiedate).then(res=> this.$u.toast(res.msg)) api.ChangeCommitSave(this.formDataValiedate).then(res=> this.$u.toast(res.msg))
......
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
width: 100%; width: 100%;
height: 35%; /*height: 35%;*/
background-color: white; background-color: white;
/*border-radius: 2vw;*/ /*border-radius: 2vw;*/
/*padding: 3vw;*/ /*padding: 3vw;*/
box-sizing: border-box; box-sizing: border-box;
min-height: 220px; /*min-height: 220px;*/
} }
.content-header-header{ .content-header-header{
width: 100%; width: 100%;
...@@ -50,8 +50,8 @@ ...@@ -50,8 +50,8 @@
} }
.content-header-content-header,.content-header-content-footer{ .content-header-content-header,.content-header-content-footer{
width: 100%; width: 100%;
height: 50%; /*height: 50%;*/
height: 100px;
} }
.content-header-content-footer-content{ .content-header-content-footer-content{
width: 100%; width: 100%;
......
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
<u-calendar <u-calendar
defaultDate="" defaultDate=""
title="请选择参观日期" title="请选择参观日期"
:formatter="formatter" :formatter="formatter"
...@@ -61,7 +60,7 @@ ...@@ -61,7 +60,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="content-header-content-footer"> <view v-if="false" class="content-header-content-footer">
<view class="content-header-content-footer-hearder"> <view class="content-header-content-footer-hearder">
<span style="color: #574f44;font-size: 21px">参观场次</span> <span style="color: #574f44;font-size: 21px">参观场次</span>
</view> </view>
...@@ -108,31 +107,35 @@ ...@@ -108,31 +107,35 @@
</view> </view>
<view class="c-f-f-i"> <view class="c-f-f-i">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
领队真实信息 <span style="color: red">*</span>领队真实信息
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
<u-input v-model="formDateValidate.name" class="input"></u-input> <u-input @blur="leaderInformation('zzName')" v-model="formDateValidate.name" class="input"></u-input>
</view> </view>
<span style="color: red" v-if="zzName">*{{zzName}}</span>
</view> </view>
<view class="c-f-f-i" :key="aaa"> <view class="c-f-f-i" :key="aaa">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
领队身份证号 <span style="color:red">*</span>领队身份证号/护照号码
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
<u-input @blur="myFunction1" v-model="formDateValidate.identity_num" class="input"></u-input> <u-input @blur="leaderInformation('zzIdentity_num')" v-model="formDateValidate.identity_num" class="input"></u-input>
</view> </view>
<span style="color: red" v-if="zzIdentity_num">*{{zzIdentity_num}}</span> <span style="color: red" v-if="zzIdentity_num">*{{zzIdentity_num}}</span>
</view> </view>
<view class="c-f-f-i"> <view class="c-f-f-i">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
手机号码 <span style="color: red">*</span>手机号码
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
<u-input v-model="formDateValidate.mobile" class="input"></u-input> <u-input @blur="leaderInformation('zzMobile')" v-model="formDateValidate.mobile" class="input"></u-input>
</view> </view>
<span style="color: red" v-if="zzMobile">*{{zzMobile}}</span>
</view> </view>
<view class="c-f-f-i"> <view class="c-f-f-i">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
<!-- <span style="color: red">*</span>-->
车辆信息 车辆信息
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
...@@ -170,15 +173,16 @@ ...@@ -170,15 +173,16 @@
<view class="c-f-f" style="background-color: #F4ECE6;"> <view class="c-f-f" style="background-color: #F4ECE6;">
<view class="c-f-f-i"> <view class="c-f-f-i">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
姓名 <span style="color: red">*</span>姓名
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
<u-input v-model="item.name" class="input"></u-input> <u-input @blur="myFunction(index,'name')" v-model="item.name" class="input"></u-input>
</view> </view>
<view v-if="item.zzName" style="color: red">*{{item.zzName}}</view>
</view> </view>
<view class="c-f-f-i" :key="aaa"> <view class="c-f-f-i" :key="aaa">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
身份证号 <span style="color: red">*</span>身份证号/护照号码
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
<u-input @blur="myFunction(index,'identity_num')" v-model="item.identity_num" class="input"></u-input> <u-input @blur="myFunction(index,'identity_num')" v-model="item.identity_num" class="input"></u-input>
...@@ -248,6 +252,8 @@ ...@@ -248,6 +252,8 @@
return { return {
aaa:1, aaa:1,
zzIdentity_num:'', zzIdentity_num:'',
zzMobile:'',
zzName:'',
loading1:false, loading1:false,
loading2:false, loading2:false,
formDateValidate:{ formDateValidate:{
...@@ -292,6 +298,43 @@ ...@@ -292,6 +298,43 @@
} }
}, },
methods: { methods: {
leaderInformation(key){
//验证领队信息
let object = {
'zzIdentity_num':()=>{
function isPassPortCard(passportNumber) {
let a = /^[a-zA-Z0-9]{1}\d{8}$/
return a.test(passportNumber)
}
const card15 =
/^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/;
const card18 =
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
if (card15.test(this.formDateValidate.identity_num) || card18.test(this.formDateValidate.identity_num)||isPassPortCard(this.formDateValidate.identity_num)) {
this[key] = ''
}
if (!(card15.test(this.formDateValidate.identity_num) || card18.test(this.formDateValidate.identity_num) ||isPassPortCard(this.formDateValidate.identity_num))) {
this[key] = '身份证/护照号码格式异常,请检查身份证号码'
}
},
'zzMobile':()=>{
if (!/^1[3-9]\d{9}$/.test(this.formDateValidate.mobile)) {
this.zzMobile = '手机号格式异常'
}else {
this.zzMobile = ''
}
},
'zzName':()=>{
if (!(this.validateName(this.formDateValidate.name))) {
this.zzName = '姓名格式异常'
}else {
this.zzName = ''
}
}
}
object[key]()
this.aaa ++
},
myFunction1(){ myFunction1(){
//输入框失焦点触发 //输入框失焦点触发
const card15 = const card15 =
...@@ -302,23 +345,29 @@ ...@@ -302,23 +345,29 @@
this.zzIdentity_num = '' this.zzIdentity_num = ''
} }
if (!(card15.test(this.formDateValidate.identity_num) || card18.test(this.formDateValidate.identity_num))) { if (!(card15.test(this.formDateValidate.identity_num) || card18.test(this.formDateValidate.identity_num))) {
this.zzIdentity_num = '身份证格式异常,请检查身份证号码' this.zzIdentity_num = '身份证/护照号码格式异常,请检查身份证号码'
} }
this.aaa ++ this.aaa ++
}, },
myFunction(index,key){ myFunction(index,key){
//输入框失焦点触发 //输入框失焦点触发
let object = { let object = {
'identity_num':()=>{ 'identity_num':()=>{
function isPassPortCard(card) {
let a = /^[a-zA-Z0-9]{1}\d{8}$/
return a.test(card)
}
const card15 = const card15 =
/^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/; /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/;
const card18 = const card18 =
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
if (card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num)) { if (card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num) || isPassPortCard(this.peopleList[index].identity_num)) {
this.peopleList[index].zzIdentity_num = '' this.peopleList[index].zzIdentity_num = ''
} }
if (!(card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num))) { if (!(card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num) || isPassPortCard(this.peopleList[index].identity_num)) ) {
this.peopleList[index].zzIdentity_num = '身份证格式异常,请检查身份证号码' this.peopleList[index].zzIdentity_num = '身份证/护照号码格式异常,请检查身份证号码'
} }
}, },
'mobile':()=>{ 'mobile':()=>{
...@@ -327,17 +376,30 @@ ...@@ -327,17 +376,30 @@
}else { }else {
this.peopleList[index].zzMobile = '' this.peopleList[index].zzMobile = ''
} }
},
'name':()=>{
if (!(this.validateName(this.peopleList[index].name))) {
this.peopleList[index].zzName = '姓名格式异常'
}else {
this.peopleList[index].zzName = ''
}
} }
} }
object[key]() object[key]()
this.aaa ++ this.aaa ++
}, },
validateName(name){
//姓名正则验证
var regex = /^[\u4E00-\u9FA5a-zA-Z]+$/;
return regex.test(name);
},
teamMuseum(e){ teamMuseum(e){
this.formDateValidate = { this.formDateValidate = {
...this.formDateValidate, ...this.formDateValidate,
type : 1, type : 1,
museum_date:this.itemObject.initDate, museum_date:this.itemObject.initDate,
moment: this.lastAndAfternoonStatus === 3 ? '1' : '2', // moment: this.lastAndAfternoonStatus === 3 ? '1' : '2',
moment: 0,
users:this.peopleList users:this.peopleList
} }
let object = { let object = {
...@@ -396,7 +458,10 @@ ...@@ -396,7 +458,10 @@
if(cur.date === dayjs(day.date).format('MM月DD日') && cur.state === 0) if(cur.date === dayjs(day.date).format('MM月DD日') && cur.state === 0)
{ {
day.bottomInfo = '可订' day.bottomInfo = '可订'
}else if( cur.date === dayjs(day.date).format('MM月DD日') && cur.state === 0){ }else if( cur.date === dayjs(day.date).format('MM月DD日') && cur.state === 1){
day.disabled = true
}else if (!this.dateList.map(cur=>cur.date).includes(dayjs(day.date).format('MM月DD日'))){
//日期数据不包含也移除
day.disabled = true day.disabled = true
} }
}) })
...@@ -430,7 +495,7 @@ ...@@ -430,7 +495,7 @@
} }
}, },
selectAppointmentDate(item,index){ selectAppointmentDate(item,index){
console.log(item,1111111111111);
if(item.state !== 1){ if(item.state !== 1){
// 选择日期时遍历数组去除打勾状态 避免打勾多个日期 // 选择日期时遍历数组去除打勾状态 避免打勾多个日期
this.dateList.map((cur,index)=>{ this.dateList.map((cur,index)=>{
...@@ -440,6 +505,7 @@ ...@@ -440,6 +505,7 @@
this.lastAndAfternoonStatus = '' //选择日期时 初始化 上下午状态 this.lastAndAfternoonStatus = '' //选择日期时 初始化 上下午状态
this.dateList[index].OkState = 3 // 选中日期 显示打勾 通过 OkState === 3 则打勾 this.dateList[index].OkState = 3 // 选中日期 显示打勾 通过 OkState === 3 则打勾
if(index) this.zhidingriqi = true if(index) this.zhidingriqi = true
this.$forceUpdate()
} }
}, },
deleteAddPeole(index){ deleteAddPeole(index){
......
...@@ -29,13 +29,11 @@ ...@@ -29,13 +29,11 @@
border-radius: 10px; border-radius: 10px;
width: 100%; width: 100%;
height: 35%; /*height: 35%;*/
background-color: white; background-color: white;
/*padding: 3vw;*/
box-sizing: border-box; box-sizing: border-box;
min-height: 220px; /*min-height: 220px;*/
} }
.content-header-header{ .content-header-header{
width: 100%; width: 100%;
...@@ -58,8 +56,8 @@ ...@@ -58,8 +56,8 @@
} }
.content-header-content-header,.content-header-content-footer{ .content-header-content-header,.content-header-content-footer{
width: 100%; width: 100%;
height: 50%; /*height: 50%;*/
height: 100px;
} }
.content-header-content-footer-content{ .content-header-content-footer-content{
width: 100%; width: 100%;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<span style="color: #574f44;">参观日期</span> <span style="color: #574f44;">参观日期</span>
</view> </view>
<view class="content-header-content-header-footer"> <view class="content-header-content-header-footer">
<view ref="selectAppointmentDate" v-for="(item,index) in dateList" :key="index" v-if="index < 3" @click="selectAppointmentDate(item,index)" <view ref="selectAppointmentDate" v-for="(item,index) in dateList" :key="index" v-if="index < 3" @click="selectAppointmentDate(item,index)"
:class="['content-header-content-header-footer-leftItem','content-header-content-header-footer-leftItem1'][item.state]"> :class="['content-header-content-header-footer-leftItem','content-header-content-header-footer-leftItem1'][item.state]">
<view class="content-header-content-header-footer-leftItem-top"> <view class="content-header-content-header-footer-leftItem-top">
...@@ -61,7 +62,7 @@ ...@@ -61,7 +62,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="content-header-content-footer"> <view v-if="false" class="content-header-content-footer">
<view class="content-header-content-footer-hearder"> <view class="content-header-content-footer-hearder">
<span style="color: #574f44;">参观场次</span> <span style="color: #574f44;">参观场次</span>
</view> </view>
...@@ -105,7 +106,7 @@ ...@@ -105,7 +106,7 @@
<!-- <u-form-item label-style="{'color':'red'}" label-position="top" label="姓名" prop="name">--> <!-- <u-form-item label-style="{'color':'red'}" label-position="top" label="姓名" prop="name">-->
<!-- <u-input class="c-f-f-i-t input" v-model="item.name" />--> <!-- <u-input class="c-f-f-i-t input" v-model="item.name" />-->
<!-- </u-form-item>--> <!-- </u-form-item>-->
<!-- <u-form-item label-style="{'color':'red'}" label-position="top" label="身份证号" prop="identify_num">--> <!-- <u-form-item label-style="{'color':'red'}" label-position="top" label="身份证号/护照号码" prop="identify_num">-->
<!-- <u-input class="c-f-f-i-t input" v-model="item.identify_num" />--> <!-- <u-input class="c-f-f-i-t input" v-model="item.identify_num" />-->
<!-- </u-form-item>--> <!-- </u-form-item>-->
<!-- <u-form-item label-style="{'color':'red'}" label-position="top" label="手机号码" prop="mobile">--> <!-- <u-form-item label-style="{'color':'red'}" label-position="top" label="手机号码" prop="mobile">-->
...@@ -117,12 +118,13 @@ ...@@ -117,12 +118,13 @@
<span style="color: red">*</span>姓名 <span style="color: red">*</span>姓名
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
<u-input v-model="item.name" class="input"></u-input> <u-input @blur="myFunction(index,'name')" v-model="item.name" class="input"></u-input>
<view v-if="item.zzName" style="color: red">*{{item.zzName}}</view>
</view> </view>
</view> </view>
<view class="c-f-f-i" :key="aaa"> <view class="c-f-f-i" :key="aaa">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
<span style="color: red">*</span>身份证号 <span style="color: red">*</span>身份证号/护照号码
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
...@@ -260,20 +262,31 @@ ...@@ -260,20 +262,31 @@
}, },
methods: { methods: {
validateName(name){
//姓名正则验证
var regex = /^[\u4E00-\u9FA5a-zA-Z]+$/;
return regex.test(name);
},
myFunction(index,key){ myFunction(index,key){
//输入框失焦点触发 //输入框失焦点触发
let object = { let object = {
'identity_num':()=>{ 'identity_num':()=>{
function isPassPortCard(passportNumber) {
let a = /^[a-zA-Z0-9]{1}\d{8}$/
return a.test(passportNumber)
}
const card15 = const card15 =
/^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/; /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/;
const card18 = const card18 =
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
if (card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num)) { if (card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num) || isPassPortCard(this.peopleList[index].identity_num)) {
this.peopleList[index].zzIdentity_num = '' this.peopleList[index].zzIdentity_num = ''
} }
if (!(card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num))) { if (!(card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num) || isPassPortCard(this.peopleList[index].identity_num)) ) {
this.peopleList[index].zzIdentity_num = '身份证格式异常,请检查身份证号码' this.peopleList[index].zzIdentity_num = '身份证/护照号码格式异常,请检查身份证号码'
} }
}, },
'mobile':()=>{ 'mobile':()=>{
...@@ -282,6 +295,13 @@ ...@@ -282,6 +295,13 @@
}else { }else {
this.peopleList[index].zzMobile = '' this.peopleList[index].zzMobile = ''
} }
},
'name':()=>{
if (!(this.validateName(this.peopleList[index].name))) {
this.peopleList[index].zzName = '姓名格式异常'
}else {
this.peopleList[index].zzName = ''
}
} }
} }
...@@ -292,21 +312,29 @@ ...@@ -292,21 +312,29 @@
// moment 1 上午 2 下午 class ->string // moment 1 上午 2 下午 class ->string
async bookNow() { async bookNow() {
var a = false; var a = false;
let validateForm = this.peopleList.some((cur,index)=>{
//验证表单异常文字是否存在异常项
return cur.zzName || cur.zzIdentity_num || cur.zzMobile
})
this.peopleList.forEach((cur,index)=>{ this.peopleList.forEach((cur,index)=>{
//验证表单是否存在空值
if(cur.name==='' || cur.identity_num===''|| cur.mobile==='') a = true if(cur.name==='' || cur.identity_num===''|| cur.mobile==='') a = true
}) })
if (a){
this.$u.toast('表单存在未填写数据') if (a || validateForm){
this.$u.toast('预约表单存在未填写数据或填写异常')
}else { }else {
this.loading = true this.loading = true
let data = { let data = {
moment: this.lastAndAfternoonStatus === 3 ? '1' : '2', // moment: this.lastAndAfternoonStatus === 3 ? '1' : '2',
moment: 0, //0全天 1 上午 2 下午
museum_date: this.itemObject.initDate, museum_date: this.itemObject.initDate,
num: this.peopleList.length, num: this.peopleList.length,
users: this.peopleList, users: this.peopleList,
} }
const res = await api.GuestCreate(data) const res = await api.GuestCreate(data)
this.$u.toast(res.msg) if (res.code === 1) this.$u.toast(res.msg)
else this.$u.toast(res.msg_detail)
this.loading = false this.loading = false
if (res.code === 1) setTimeout(() => { if (res.code === 1) setTimeout(() => {
uni.navigateTo({ uni.navigateTo({
...@@ -356,7 +384,7 @@ ...@@ -356,7 +384,7 @@
} }
}, },
selectAppointmentDate(item,index){ selectAppointmentDate(item,index){
console.log(item); console.log(item,11);
if(item.state !== 1){ if(item.state !== 1){
// 选择日期时遍历数组去除打勾状态 避免打勾多个日期 // 选择日期时遍历数组去除打勾状态 避免打勾多个日期
this.dateList.map((cur,index)=>{ this.dateList.map((cur,index)=>{
...@@ -366,6 +394,7 @@ ...@@ -366,6 +394,7 @@
this.lastAndAfternoonStatus = '' //选择日期时 初始化 上下午状态 this.lastAndAfternoonStatus = '' //选择日期时 初始化 上下午状态
this.dateList[index].OkState = 3 // 选中日期 显示打勾 通过 OkState === 3 则打勾 this.dateList[index].OkState = 3 // 选中日期 显示打勾 通过 OkState === 3 则打勾
if(index) this.zhidingriqi = true if(index) this.zhidingriqi = true
this.$forceUpdate()
} }
}, },
deleteAddPeole(index){ deleteAddPeole(index){
......
## 2.0.9(2024-01-12)
fix: 修复图标大小默认值错误的问题
## 2.0.8(2023-12-14)
- 修复 项目未使用 ts 情况下,打包报错的bug
## 2.0.7(2023-12-14)
- 修复 size 属性为 string 时,不加单位导致尺寸异常的bug
## 2.0.6(2023-12-11)
- 优化 兼容老版本icon类型,如 top ,bottom 等
## 2.0.5(2023-12-11)
- 优化 兼容老版本icon类型,如 top ,bottom 等
## 2.0.4(2023-12-06)
- 优化 uni-app x 下示例项目图标排序
## 2.0.3(2023-12-06)
- 修复 nvue下引入组件报错的bug
## 2.0.2(2023-12-05)
-优化 size 属性支持单位
## 2.0.1(2023-12-05)
- 新增 uni-app x 支持定义图标
## 1.3.5(2022-01-24)
- 优化 size 属性可以传入不带单位的字符串数值
## 1.3.4(2022-01-24)
- 优化 size 支持其他单位
## 1.3.3(2022-01-17)
- 修复 nvue 有些图标不显示的bug,兼容老版本图标
## 1.3.2(2021-12-01)
- 优化 示例可复制图标名称
## 1.3.1(2021-11-23)
- 优化 兼容旧组件 type 值
## 1.3.0(2021-11-19)
- 新增 更多图标
- 优化 自定义图标使用方式
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
## 1.1.7(2021-11-08)
## 1.2.0(2021-07-30)
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.1.5(2021-05-12)
- 新增 组件示例地址
## 1.1.4(2021-02-05)
- 调整为uni_modules目录规范
<template>
<text class="uni-icons" :style="styleObj">
<slot>{{unicode}}</slot>
</text>
</template>
<script>
import { fontData, IconsDataItem } from './uniicons_file'
/**
* Icons 图标
* @description 用于展示 icon 图标
* @tutorial https://ext.dcloud.net.cn/plugin?id=28
* @property {Number} size 图标大小
* @property {String} type 图标图案,参考示例
* @property {String} color 图标颜色
* @property {String} customPrefix 自定义图标
* @event {Function} click 点击 Icon 触发事件
*/
export default {
name: "uni-icons",
props: {
type: {
type: String,
default: ''
},
color: {
type: String,
default: '#333333'
},
size: {
type: Object,
default: 16
},
fontFamily: {
type: String,
default: ''
}
},
data() {
return {};
},
computed: {
unicode() : string {
let codes = fontData.find((item : IconsDataItem) : boolean => { return item.font_class == this.type })
if (codes !== null) {
return codes.unicode
}
return ''
},
iconSize() : string {
const size = this.size
if (typeof size == 'string') {
const reg = /^[0-9]*$/g
return reg.test(size as string) ? '' + size + 'px' : '' + size;
// return '' + this.size
}
return this.getFontSize(size as number)
},
styleObj() : UTSJSONObject {
if (this.fontFamily !== '') {
return { color: this.color, fontSize: this.iconSize, fontFamily: this.fontFamily }
}
return { color: this.color, fontSize: this.iconSize }
}
},
created() { },
methods: {
/**
* 字体大小
*/
getFontSize(size : number) : string {
return size + 'px';
},
},
}
</script>
<style scoped>
@font-face {
font-family: UniIconsFontFamily;
src: url('./uniicons.ttf');
}
.uni-icons {
font-family: UniIconsFontFamily;
font-size: 18px;
font-style: normal;
color: #333;
}
</style>
<template>
<!-- #ifdef APP-NVUE -->
<text :style="styleObj" class="uni-icons" @click="_onClick">{{unicode}}</text>
<!-- #endif -->
<!-- #ifndef APP-NVUE -->
<text :style="styleObj" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick">
<slot></slot>
</text>
<!-- #endif -->
</template>
<script>
import { fontData } from './uniicons_file_vue.js';
const getVal = (val) => {
const reg = /^[0-9]*$/g
return (typeof val === 'number' || reg.test(val)) ? val + 'px' : val;
}
// #ifdef APP-NVUE
var domModule = weex.requireModule('dom');
import iconUrl from './uniicons.ttf'
domModule.addRule('fontFace', {
'fontFamily': "uniicons",
'src': "url('" + iconUrl + "')"
});
// #endif
/**
* Icons 图标
* @description 用于展示 icons 图标
* @tutorial https://ext.dcloud.net.cn/plugin?id=28
* @property {Number} size 图标大小
* @property {String} type 图标图案,参考示例
* @property {String} color 图标颜色
* @property {String} customPrefix 自定义图标
* @event {Function} click 点击 Icon 触发事件
*/
export default {
name: 'UniIcons',
emits: ['click'],
props: {
type: {
type: String,
default: ''
},
color: {
type: String,
default: '#333333'
},
size: {
type: [Number, String],
default: 16
},
customPrefix: {
type: String,
default: ''
},
fontFamily: {
type: String,
default: ''
}
},
data() {
return {
icons: fontData
}
},
computed: {
unicode() {
let code = this.icons.find(v => v.font_class === this.type)
if (code) {
return code.unicode
}
return ''
},
iconSize() {
return getVal(this.size)
},
styleObj() {
if (this.fontFamily !== '') {
return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`
}
return `color: ${this.color}; font-size: ${this.iconSize};`
}
},
methods: {
_onClick() {
this.$emit('click')
}
}
}
</script>
<style lang="scss">
/* #ifndef APP-NVUE */
@import './uniicons.css';
@font-face {
font-family: uniicons;
src: url('./uniicons.ttf');
}
/* #endif */
.uni-icons {
font-family: uniicons;
text-decoration: none;
text-align: center;
}
</style>
.uniui-cart-filled:before {
content: "\e6d0";
}
.uniui-gift-filled:before {
content: "\e6c4";
}
.uniui-color:before {
content: "\e6cf";
}
.uniui-wallet:before {
content: "\e6b1";
}
.uniui-settings-filled:before {
content: "\e6ce";
}
.uniui-auth-filled:before {
content: "\e6cc";
}
.uniui-shop-filled:before {
content: "\e6cd";
}
.uniui-staff-filled:before {
content: "\e6cb";
}
.uniui-vip-filled:before {
content: "\e6c6";
}
.uniui-plus-filled:before {
content: "\e6c7";
}
.uniui-folder-add-filled:before {
content: "\e6c8";
}
.uniui-color-filled:before {
content: "\e6c9";
}
.uniui-tune-filled:before {
content: "\e6ca";
}
.uniui-calendar-filled:before {
content: "\e6c0";
}
.uniui-notification-filled:before {
content: "\e6c1";
}
.uniui-wallet-filled:before {
content: "\e6c2";
}
.uniui-medal-filled:before {
content: "\e6c3";
}
.uniui-fire-filled:before {
content: "\e6c5";
}
.uniui-refreshempty:before {
content: "\e6bf";
}
.uniui-location-filled:before {
content: "\e6af";
}
.uniui-person-filled:before {
content: "\e69d";
}
.uniui-personadd-filled:before {
content: "\e698";
}
.uniui-arrowthinleft:before {
content: "\e6d2";
}
.uniui-arrowthinup:before {
content: "\e6d3";
}
.uniui-arrowthindown:before {
content: "\e6d4";
}
.uniui-back:before {
content: "\e6b9";
}
.uniui-forward:before {
content: "\e6ba";
}
.uniui-arrow-right:before {
content: "\e6bb";
}
.uniui-arrow-left:before {
content: "\e6bc";
}
.uniui-arrow-up:before {
content: "\e6bd";
}
.uniui-arrow-down:before {
content: "\e6be";
}
.uniui-arrowthinright:before {
content: "\e6d1";
}
.uniui-down:before {
content: "\e6b8";
}
.uniui-bottom:before {
content: "\e6b8";
}
.uniui-arrowright:before {
content: "\e6d5";
}
.uniui-right:before {
content: "\e6b5";
}
.uniui-up:before {
content: "\e6b6";
}
.uniui-top:before {
content: "\e6b6";
}
.uniui-left:before {
content: "\e6b7";
}
.uniui-arrowup:before {
content: "\e6d6";
}
.uniui-eye:before {
content: "\e651";
}
.uniui-eye-filled:before {
content: "\e66a";
}
.uniui-eye-slash:before {
content: "\e6b3";
}
.uniui-eye-slash-filled:before {
content: "\e6b4";
}
.uniui-info-filled:before {
content: "\e649";
}
.uniui-reload:before {
content: "\e6b2";
}
.uniui-micoff-filled:before {
content: "\e6b0";
}
.uniui-map-pin-ellipse:before {
content: "\e6ac";
}
.uniui-map-pin:before {
content: "\e6ad";
}
.uniui-location:before {
content: "\e6ae";
}
.uniui-starhalf:before {
content: "\e683";
}
.uniui-star:before {
content: "\e688";
}
.uniui-star-filled:before {
content: "\e68f";
}
.uniui-calendar:before {
content: "\e6a0";
}
.uniui-fire:before {
content: "\e6a1";
}
.uniui-medal:before {
content: "\e6a2";
}
.uniui-font:before {
content: "\e6a3";
}
.uniui-gift:before {
content: "\e6a4";
}
.uniui-link:before {
content: "\e6a5";
}
.uniui-notification:before {
content: "\e6a6";
}
.uniui-staff:before {
content: "\e6a7";
}
.uniui-vip:before {
content: "\e6a8";
}
.uniui-folder-add:before {
content: "\e6a9";
}
.uniui-tune:before {
content: "\e6aa";
}
.uniui-auth:before {
content: "\e6ab";
}
.uniui-person:before {
content: "\e699";
}
.uniui-email-filled:before {
content: "\e69a";
}
.uniui-phone-filled:before {
content: "\e69b";
}
.uniui-phone:before {
content: "\e69c";
}
.uniui-email:before {
content: "\e69e";
}
.uniui-personadd:before {
content: "\e69f";
}
.uniui-chatboxes-filled:before {
content: "\e692";
}
.uniui-contact:before {
content: "\e693";
}
.uniui-chatbubble-filled:before {
content: "\e694";
}
.uniui-contact-filled:before {
content: "\e695";
}
.uniui-chatboxes:before {
content: "\e696";
}
.uniui-chatbubble:before {
content: "\e697";
}
.uniui-upload-filled:before {
content: "\e68e";
}
.uniui-upload:before {
content: "\e690";
}
.uniui-weixin:before {
content: "\e691";
}
.uniui-compose:before {
content: "\e67f";
}
.uniui-qq:before {
content: "\e680";
}
.uniui-download-filled:before {
content: "\e681";
}
.uniui-pyq:before {
content: "\e682";
}
.uniui-sound:before {
content: "\e684";
}
.uniui-trash-filled:before {
content: "\e685";
}
.uniui-sound-filled:before {
content: "\e686";
}
.uniui-trash:before {
content: "\e687";
}
.uniui-videocam-filled:before {
content: "\e689";
}
.uniui-spinner-cycle:before {
content: "\e68a";
}
.uniui-weibo:before {
content: "\e68b";
}
.uniui-videocam:before {
content: "\e68c";
}
.uniui-download:before {
content: "\e68d";
}
.uniui-help:before {
content: "\e679";
}
.uniui-navigate-filled:before {
content: "\e67a";
}
.uniui-plusempty:before {
content: "\e67b";
}
.uniui-smallcircle:before {
content: "\e67c";
}
.uniui-minus-filled:before {
content: "\e67d";
}
.uniui-micoff:before {
content: "\e67e";
}
.uniui-closeempty:before {
content: "\e66c";
}
.uniui-clear:before {
content: "\e66d";
}
.uniui-navigate:before {
content: "\e66e";
}
.uniui-minus:before {
content: "\e66f";
}
.uniui-image:before {
content: "\e670";
}
.uniui-mic:before {
content: "\e671";
}
.uniui-paperplane:before {
content: "\e672";
}
.uniui-close:before {
content: "\e673";
}
.uniui-help-filled:before {
content: "\e674";
}
.uniui-paperplane-filled:before {
content: "\e675";
}
.uniui-plus:before {
content: "\e676";
}
.uniui-mic-filled:before {
content: "\e677";
}
.uniui-image-filled:before {
content: "\e678";
}
.uniui-locked-filled:before {
content: "\e668";
}
.uniui-info:before {
content: "\e669";
}
.uniui-locked:before {
content: "\e66b";
}
.uniui-camera-filled:before {
content: "\e658";
}
.uniui-chat-filled:before {
content: "\e659";
}
.uniui-camera:before {
content: "\e65a";
}
.uniui-circle:before {
content: "\e65b";
}
.uniui-checkmarkempty:before {
content: "\e65c";
}
.uniui-chat:before {
content: "\e65d";
}
.uniui-circle-filled:before {
content: "\e65e";
}
.uniui-flag:before {
content: "\e65f";
}
.uniui-flag-filled:before {
content: "\e660";
}
.uniui-gear-filled:before {
content: "\e661";
}
.uniui-home:before {
content: "\e662";
}
.uniui-home-filled:before {
content: "\e663";
}
.uniui-gear:before {
content: "\e664";
}
.uniui-smallcircle-filled:before {
content: "\e665";
}
.uniui-map-filled:before {
content: "\e666";
}
.uniui-map:before {
content: "\e667";
}
.uniui-refresh-filled:before {
content: "\e656";
}
.uniui-refresh:before {
content: "\e657";
}
.uniui-cloud-upload:before {
content: "\e645";
}
.uniui-cloud-download-filled:before {
content: "\e646";
}
.uniui-cloud-download:before {
content: "\e647";
}
.uniui-cloud-upload-filled:before {
content: "\e648";
}
.uniui-redo:before {
content: "\e64a";
}
.uniui-images-filled:before {
content: "\e64b";
}
.uniui-undo-filled:before {
content: "\e64c";
}
.uniui-more:before {
content: "\e64d";
}
.uniui-more-filled:before {
content: "\e64e";
}
.uniui-undo:before {
content: "\e64f";
}
.uniui-images:before {
content: "\e650";
}
.uniui-paperclip:before {
content: "\e652";
}
.uniui-settings:before {
content: "\e653";
}
.uniui-search:before {
content: "\e654";
}
.uniui-redo-filled:before {
content: "\e655";
}
.uniui-list:before {
content: "\e644";
}
.uniui-mail-open-filled:before {
content: "\e63a";
}
.uniui-hand-down-filled:before {
content: "\e63c";
}
.uniui-hand-down:before {
content: "\e63d";
}
.uniui-hand-up-filled:before {
content: "\e63e";
}
.uniui-hand-up:before {
content: "\e63f";
}
.uniui-heart-filled:before {
content: "\e641";
}
.uniui-mail-open:before {
content: "\e643";
}
.uniui-heart:before {
content: "\e639";
}
.uniui-loop:before {
content: "\e633";
}
.uniui-pulldown:before {
content: "\e632";
}
.uniui-scan:before {
content: "\e62a";
}
.uniui-bars:before {
content: "\e627";
}
.uniui-checkbox:before {
content: "\e62b";
}
.uniui-checkbox-filled:before {
content: "\e62c";
}
.uniui-shop:before {
content: "\e62f";
}
.uniui-headphones:before {
content: "\e630";
}
.uniui-cart:before {
content: "\e631";
}
{
"id": "uni-icons",
"displayName": "uni-icons 图标",
"version": "2.0.9",
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
"keywords": [
"uni-ui",
"uniui",
"icon",
"图标"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": "^3.2.14"
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
},
"uni_modules": {
"dependencies": ["uni-scss"],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "y",
"app-uvue": "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",
"钉钉": "y",
"快手": "y",
"飞书": "y",
"京东": "y"
},
"快应用": {
"华为": "y",
"联盟": "y"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}
## Icons 图标
> **组件名:uni-icons**
> 代码块: `uIcons`
用于展示 icons 图标 。
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
## 1.2.4(2022-09-19)
- 修复,未对主题色设置默认色,导致未引入 uni-scss 变量文件报错。
- 修复,未对移动端当前页文字做主题色适配。
## 1.2.3(2022-09-15)
- 修复未使用 uni-scss 主题色的 bug。
## 1.2.2(2022-07-06)
- 修复 es 语言 i18n 错误
## 1.2.1(2021-11-22)
- 修复 vue3中某些scss变量无法找到的问题
## 1.2.0(2021-11-19)
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-pagination](https://uniapp.dcloud.io/component/uniui/uni-pagination)
## 1.1.2(2021-10-08)
- 修复 current 、value 属性未监听,导致高亮样式失效的 bug
## 1.1.1(2021-08-20)
- 新增 支持国际化
## 1.1.0(2021-07-30)
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.0.7(2021-05-12)
- 新增 组件示例地址
## 1.0.6(2021-04-12)
- 新增 PC 和 移动端适配不同的 ui
## 1.0.5(2021-02-05)
- 优化 组件引用关系,通过uni_modules引用组件
## 1.0.4(2021-02-05)
- 调整为uni_modules目录规范
{
"uni-pagination.prevText": "prev",
"uni-pagination.nextText": "next",
"uni-pagination.piecePerPage": "piece/page"
}
{
"uni-pagination.prevText": "anterior",
"uni-pagination.nextText": "prxima",
"uni-pagination.piecePerPage": "Art¨ªculo/P¨¢gina"
}
{
"uni-pagination.prevText": "précédente",
"uni-pagination.nextText": "suivante",
"uni-pagination.piecePerPage": "Articles/Pages"
}
import en from './en.json'
import es from './es.json'
import fr from './fr.json'
import zhHans from './zh-Hans.json'
import zhHant from './zh-Hant.json'
export default {
en,
es,
fr,
'zh-Hans': zhHans,
'zh-Hant': zhHant
}
{
"uni-pagination.prevText": "上一页",
"uni-pagination.nextText": "下一页",
"uni-pagination.piecePerPage": "条/页"
}
{
"uni-pagination.prevText": "上一頁",
"uni-pagination.nextText": "下一頁",
"uni-pagination.piecePerPage": "條/頁"
}
{
"id": "uni-pagination",
"displayName": "uni-pagination 分页器",
"version": "1.2.4",
"description": "Pagination 分页器组件,用于展示页码、请求数据等。",
"keywords": [
"uni-ui",
"uniui",
"分页器",
"页码"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": ""
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
},
"uni_modules": {
"dependencies": ["uni-scss","uni-icons"],
"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"
}
}
}
}
}
\ No newline at end of file
## Pagination 分页器
> **组件名:uni-pagination**
> 代码块: `uPagination`
分页器组件,用于展示页码、请求数据等。
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-pagination)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
## 1.0.3(2022-01-21)
- 优化 组件示例
## 1.0.2(2021-11-22)
- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题
## 1.0.1(2021-11-22)
- 修复 vue3中scss语法兼容问题
## 1.0.0(2021-11-18)
- init
@import './styles/index.scss';
{
"id": "uni-scss",
"displayName": "uni-scss 辅助样式",
"version": "1.0.3",
"description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。",
"keywords": [
"uni-scss",
"uni-ui",
"辅助样式"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"category": [
"JS SDK",
"通用 SDK"
],
"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": "u"
},
"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"
},
"快应用": {
"华为": "n",
"联盟": "n"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}
`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
@import './setting/_variables.scss';
@import './setting/_border.scss';
@import './setting/_color.scss';
@import './setting/_space.scss';
@import './setting/_radius.scss';
@import './setting/_text.scss';
@import './setting/_styles.scss';
.uni-border {
border: 1px $uni-border-1 solid;
}
\ No newline at end of file
// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐
// @mixin get-styles($k,$c) {
// @if $k == size or $k == weight{
// font-#{$k}:#{$c}
// }@else{
// #{$k}:#{$c}
// }
// }
$uni-ui-color:(
// 主色
primary: $uni-primary,
primary-disable: $uni-primary-disable,
primary-light: $uni-primary-light,
// 辅助色
success: $uni-success,
success-disable: $uni-success-disable,
success-light: $uni-success-light,
warning: $uni-warning,
warning-disable: $uni-warning-disable,
warning-light: $uni-warning-light,
error: $uni-error,
error-disable: $uni-error-disable,
error-light: $uni-error-light,
info: $uni-info,
info-disable: $uni-info-disable,
info-light: $uni-info-light,
// 中性色
main-color: $uni-main-color,
base-color: $uni-base-color,
secondary-color: $uni-secondary-color,
extra-color: $uni-extra-color,
// 背景色
bg-color: $uni-bg-color,
// 边框颜色
border-1: $uni-border-1,
border-2: $uni-border-2,
border-3: $uni-border-3,
border-4: $uni-border-4,
// 黑色
black:$uni-black,
// 白色
white:$uni-white,
// 透明
transparent:$uni-transparent
) !default;
@each $key, $child in $uni-ui-color {
.uni-#{"" + $key} {
color: $child;
}
.uni-#{"" + $key}-bg {
background-color: $child;
}
}
.uni-shadow-sm {
box-shadow: $uni-shadow-sm;
}
.uni-shadow-base {
box-shadow: $uni-shadow-base;
}
.uni-shadow-lg {
box-shadow: $uni-shadow-lg;
}
.uni-mask {
background-color:$uni-mask;
}
@mixin radius($r,$d:null ,$important: false){
$radius-value:map-get($uni-radius, $r) if($important, !important, null);
// Key exists within the $uni-radius variable
@if (map-has-key($uni-radius, $r) and $d){
@if $d == t {
border-top-left-radius:$radius-value;
border-top-right-radius:$radius-value;
}@else if $d == r {
border-top-right-radius:$radius-value;
border-bottom-right-radius:$radius-value;
}@else if $d == b {
border-bottom-left-radius:$radius-value;
border-bottom-right-radius:$radius-value;
}@else if $d == l {
border-top-left-radius:$radius-value;
border-bottom-left-radius:$radius-value;
}@else if $d == tl {
border-top-left-radius:$radius-value;
}@else if $d == tr {
border-top-right-radius:$radius-value;
}@else if $d == br {
border-bottom-right-radius:$radius-value;
}@else if $d == bl {
border-bottom-left-radius:$radius-value;
}
}@else{
border-radius:$radius-value;
}
}
@each $key, $child in $uni-radius {
@if($key){
.uni-radius-#{"" + $key} {
@include radius($key)
}
}@else{
.uni-radius {
@include radius($key)
}
}
}
@each $direction in t, r, b, l,tl, tr, br, bl {
@each $key, $child in $uni-radius {
@if($key){
.uni-radius-#{"" + $direction}-#{"" + $key} {
@include radius($key,$direction,false)
}
}@else{
.uni-radius-#{$direction} {
@include radius($key,$direction,false)
}
}
}
}
@mixin fn($space,$direction,$size,$n) {
@if $n {
#{$space}-#{$direction}: #{$size*$uni-space-root}px
} @else {
#{$space}-#{$direction}: #{-$size*$uni-space-root}px
}
}
@mixin get-styles($direction,$i,$space,$n){
@if $direction == t {
@include fn($space, top,$i,$n);
}
@if $direction == r {
@include fn($space, right,$i,$n);
}
@if $direction == b {
@include fn($space, bottom,$i,$n);
}
@if $direction == l {
@include fn($space, left,$i,$n);
}
@if $direction == x {
@include fn($space, left,$i,$n);
@include fn($space, right,$i,$n);
}
@if $direction == y {
@include fn($space, top,$i,$n);
@include fn($space, bottom,$i,$n);
}
@if $direction == a {
@if $n {
#{$space}:#{$i*$uni-space-root}px;
} @else {
#{$space}:#{-$i*$uni-space-root}px;
}
}
}
@each $orientation in m,p {
$space: margin;
@if $orientation == m {
$space: margin;
} @else {
$space: padding;
}
@for $i from 0 through 16 {
@each $direction in t, r, b, l, x, y, a {
.uni-#{$orientation}#{$direction}-#{$i} {
@include get-styles($direction,$i,$space,true);
}
.uni-#{$orientation}#{$direction}-n#{$i} {
@include get-styles($direction,$i,$space,false);
}
}
}
}
\ No newline at end of file
/* #ifndef APP-NVUE */
$-color-white:#fff;
$-color-black:#000;
@mixin base-style($color) {
color: #fff;
background-color: $color;
border-color: mix($-color-black, $color, 8%);
&:not([hover-class]):active {
background: mix($-color-black, $color, 10%);
border-color: mix($-color-black, $color, 20%);
color: $-color-white;
outline: none;
}
}
@mixin is-color($color) {
@include base-style($color);
&[loading] {
@include base-style($color);
&::before {
margin-right:5px;
}
}
&[disabled] {
&,
&[loading],
&:not([hover-class]):active {
color: $-color-white;
border-color: mix(darken($color,10%), $-color-white);
background-color: mix($color, $-color-white);
}
}
}
@mixin base-plain-style($color) {
color:$color;
background-color: mix($-color-white, $color, 90%);
border-color: mix($-color-white, $color, 70%);
&:not([hover-class]):active {
background: mix($-color-white, $color, 80%);
color: $color;
outline: none;
border-color: mix($-color-white, $color, 50%);
}
}
@mixin is-plain($color){
&[plain] {
@include base-plain-style($color);
&[loading] {
@include base-plain-style($color);
&::before {
margin-right:5px;
}
}
&[disabled] {
&,
&:active {
color: mix($-color-white, $color, 40%);
background-color: mix($-color-white, $color, 90%);
border-color: mix($-color-white, $color, 80%);
}
}
}
}
.uni-btn {
margin: 5px;
color: #393939;
border:1px solid #ccc;
font-size: 16px;
font-weight: 200;
background-color: #F9F9F9;
// TODO 暂时处理边框隐藏一边的问题
overflow: visible;
&::after{
border: none;
}
&:not([type]),&[type=default] {
color: #999;
&[loading] {
background: none;
&::before {
margin-right:5px;
}
}
&[disabled]{
color: mix($-color-white, #999, 60%);
&,
&[loading],
&:active {
color: mix($-color-white, #999, 60%);
background-color: mix($-color-white,$-color-black , 98%);
border-color: mix($-color-white, #999, 85%);
}
}
&[plain] {
color: #999;
background: none;
border-color: $uni-border-1;
&:not([hover-class]):active {
background: none;
color: mix($-color-white, $-color-black, 80%);
border-color: mix($-color-white, $-color-black, 90%);
outline: none;
}
&[disabled]{
&,
&[loading],
&:active {
background: none;
color: mix($-color-white, #999, 60%);
border-color: mix($-color-white, #999, 85%);
}
}
}
}
&:not([hover-class]):active {
color: mix($-color-white, $-color-black, 50%);
}
&[size=mini] {
font-size: 16px;
font-weight: 200;
border-radius: 8px;
}
&.uni-btn-small {
font-size: 14px;
}
&.uni-btn-mini {
font-size: 12px;
}
&.uni-btn-radius {
border-radius: 999px;
}
&[type=primary] {
@include is-color($uni-primary);
@include is-plain($uni-primary)
}
&[type=success] {
@include is-color($uni-success);
@include is-plain($uni-success)
}
&[type=error] {
@include is-color($uni-error);
@include is-plain($uni-error)
}
&[type=warning] {
@include is-color($uni-warning);
@include is-plain($uni-warning)
}
&[type=info] {
@include is-color($uni-info);
@include is-plain($uni-info)
}
}
/* #endif */
@mixin get-styles($k,$c) {
@if $k == size or $k == weight{
font-#{$k}:#{$c}
}@else{
#{$k}:#{$c}
}
}
@each $key, $child in $uni-headings {
/* #ifndef APP-NVUE */
.uni-#{$key} {
@each $k, $c in $child {
@include get-styles($k,$c)
}
}
/* #endif */
/* #ifdef APP-NVUE */
.container .uni-#{$key} {
@each $k, $c in $child {
@include get-styles($k,$c)
}
}
/* #endif */
}
// @use "sass:math";
@import '../tools/functions.scss';
// 间距基础倍数
$uni-space-root: 2 !default;
// 边框半径默认值
$uni-radius-root:5px !default;
$uni-radius: () !default;
// 边框半径断点
$uni-radius: map-deep-merge(
(
0: 0,
// TODO 当前版本暂时不支持 sm 属性
// 'sm': math.div($uni-radius-root, 2),
null: $uni-radius-root,
'lg': $uni-radius-root * 2,
'xl': $uni-radius-root * 6,
'pill': 9999px,
'circle': 50%
),
$uni-radius
);
// 字体家族
$body-font-family: 'Roboto', sans-serif !default;
// 文本
$heading-font-family: $body-font-family !default;
$uni-headings: () !default;
$letterSpacing: -0.01562em;
$uni-headings: map-deep-merge(
(
'h1': (
size: 32px,
weight: 300,
line-height: 50px,
// letter-spacing:-0.01562em
),
'h2': (
size: 28px,
weight: 300,
line-height: 40px,
// letter-spacing: -0.00833em
),
'h3': (
size: 24px,
weight: 400,
line-height: 32px,
// letter-spacing: normal
),
'h4': (
size: 20px,
weight: 400,
line-height: 30px,
// letter-spacing: 0.00735em
),
'h5': (
size: 16px,
weight: 400,
line-height: 24px,
// letter-spacing: normal
),
'h6': (
size: 14px,
weight: 500,
line-height: 18px,
// letter-spacing: 0.0125em
),
'subtitle': (
size: 12px,
weight: 400,
line-height: 20px,
// letter-spacing: 0.00937em
),
'body': (
font-size: 14px,
font-weight: 400,
line-height: 22px,
// letter-spacing: 0.03125em
),
'caption': (
'size': 12px,
'weight': 400,
'line-height': 20px,
// 'letter-spacing': 0.03333em,
// 'text-transform': false
)
),
$uni-headings
);
// 主色
$uni-primary: #2979ff !default;
$uni-primary-disable:lighten($uni-primary,20%) !default;
$uni-primary-light: lighten($uni-primary,25%) !default;
// 辅助色
// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
$uni-success: #18bc37 !default;
$uni-success-disable:lighten($uni-success,20%) !default;
$uni-success-light: lighten($uni-success,25%) !default;
$uni-warning: #f3a73f !default;
$uni-warning-disable:lighten($uni-warning,20%) !default;
$uni-warning-light: lighten($uni-warning,25%) !default;
$uni-error: #e43d33 !default;
$uni-error-disable:lighten($uni-error,20%) !default;
$uni-error-light: lighten($uni-error,25%) !default;
$uni-info: #8f939c !default;
$uni-info-disable:lighten($uni-info,20%) !default;
$uni-info-light: lighten($uni-info,25%) !default;
// 中性色
// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
$uni-main-color: #3a3a3a !default; // 主要文字
$uni-base-color: #6a6a6a !default; // 常规文字
$uni-secondary-color: #909399 !default; // 次要文字
$uni-extra-color: #c7c7c7 !default; // 辅助说明
// 边框颜色
$uni-border-1: #F0F0F0 !default;
$uni-border-2: #EDEDED !default;
$uni-border-3: #DCDCDC !default;
$uni-border-4: #B9B9B9 !default;
// 常规色
$uni-black: #000000 !default;
$uni-white: #ffffff !default;
$uni-transparent: rgba($color: #000000, $alpha: 0) !default;
// 背景色
$uni-bg-color: #f7f7f7 !default;
/* 水平间距 */
$uni-spacing-sm: 8px !default;
$uni-spacing-base: 15px !default;
$uni-spacing-lg: 30px !default;
// 阴影
$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default;
$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default;
// 蒙版
$uni-mask: rgba($color: #000000, $alpha: 0.4) !default;
// 合并 map
@function map-deep-merge($parent-map, $child-map){
$result: $parent-map;
@each $key, $child in $child-map {
$parent-has-key: map-has-key($result, $key);
$parent-value: map-get($result, $key);
$parent-type: type-of($parent-value);
$child-type: type-of($child);
$parent-is-map: $parent-type == map;
$child-is-map: $child-type == map;
@if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
$result: map-merge($result, ( $key: $child ));
}@else {
$result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) ));
}
}
@return $result;
};
// 间距基础倍数
$uni-space-root: 2;
// 边框半径默认值
$uni-radius-root:5px;
// 主色
$uni-primary: #2979ff;
// 辅助色
$uni-success: #4cd964;
// 警告色
$uni-warning: #f0ad4e;
// 错误色
$uni-error: #dd524d;
// 描述色
$uni-info: #909399;
// 中性色
$uni-main-color: #303133;
$uni-base-color: #606266;
$uni-secondary-color: #909399;
$uni-extra-color: #C0C4CC;
// 背景色
$uni-bg-color: #f5f5f5;
// 边框颜色
$uni-border-1: #DCDFE6;
$uni-border-2: #E4E7ED;
$uni-border-3: #EBEEF5;
$uni-border-4: #F2F6FC;
// 常规色
$uni-black: #000000;
$uni-white: #ffffff;
$uni-transparent: rgba($color: #000000, $alpha: 0);
此差异已折叠。
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或