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

20241206 优化保存

上级 0f9c7c8b
流水线 #31622 已通过 ,包含阶段
in 44 second
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>museum-reservation</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>museum-reservation</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=./static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=./static/js/chunk-vendors.ed8eaf9d.js></script><script src=./static/js/index.69ed2d6b.js></script></body></html> document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=./static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=./static/js/chunk-vendors.ead081ce.js></script><script src=./static/js/index.b038deb8.js></script></body></html>
\ No newline at end of file \ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -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方法,方法内部会进行对象属性深度合并,可以放心嵌套配置
......
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
unit: '', unit: '',
name: '', name: '',
identity_num: '', identity_num: '',
mobile:JSON.parse(localStorage.getItem('museumManagementUserInfo-reservedTerminal')).mobile?JSON.parse(localStorage.getItem('museumManagementUserInfo')).mobile:'', mobile:JSON.parse(localStorage.getItem('museumManagementUserInfo-reservedTerminal')).mobile?JSON.parse(localStorage.getItem('museumManagementUserInfo-reservedTerminal')).mobile:'',
plate_number: '', plate_number: '',
num: 10, num: 10,
reason: '', reason: '',
...@@ -479,22 +479,30 @@ ...@@ -479,22 +479,30 @@
let object = { let object = {
bookNow: async () => { bookNow: async () => {
//立即预约 //立即预约
console.log("🚀🚀this.formDateValidate.museum_date🚀,",this.formDateValidate.museum_date)
this.loading1 = true this.loading1 = true
api.TeamOrOfficialCreate(this.formDateValidate).then(( if (this.formDateValidate.museum_date === '' ||this.formDateValidate.museum_date === void 0){
res) => { this.$u.toast('请选择参观日期。')
this.loading1 = false; this.loading1 = false
return
}else{
api.TeamOrOfficialCreate(this.formDateValidate).then((
res) => {
this.loading1 = false;
if (res.code !== 1) this.$u.toast(res.msg_detail)
else {
this.$u.toast(res.msg)
this.loading1 = false
setTimeout(() => {
uni.navigateTo({
url: '/pages/record-appointment/index'
})
}, 1000)
}
})
}
if (res.code !== 1) this.$u.toast(res.msg_detail)
else {
this.$u.toast(res.msg)
this.loading1 = false
setTimeout(() => {
uni.navigateTo({
url: '/pages/record-appointment/index'
})
}, 1000)
}
})
/* if (this.peopleList.length >= 9) api.TeamOrOfficialCreate(this.formDateValidate).then(( /* if (this.peopleList.length >= 9) api.TeamOrOfficialCreate(this.formDateValidate).then((
res) => { res) => {
this.loading1 = false; this.loading1 = false;
...@@ -531,8 +539,6 @@ ...@@ -531,8 +539,6 @@
}) })
} }
} }
if (Object.keys(this.formDateValidate).filter(cur => cur !== 'users').every(cur => { if (Object.keys(this.formDateValidate).filter(cur => cur !== 'users').every(cur => {
return this.formDateValidate[cur] !== '' return this.formDateValidate[cur] !== ''
}) && this.peopleList.every(cur => { }) && this.peopleList.every(cur => {
......
...@@ -302,7 +302,7 @@ ...@@ -302,7 +302,7 @@
}) })
this.peopleList.forEach((cur,index)=>{ this.peopleList.forEach((cur,index)=>{
//验证表单是否存在空值 //验证表单是否存在空值
if(cur.name==='' || cur.identity_num===''|| cur.mobile==='') a = true if(cur.name==='' || cur.mobile==='' ) a = true
}) })
if (a || validateForm){ if (a || validateForm){
...@@ -316,6 +316,8 @@ ...@@ -316,6 +316,8 @@
num: this.peopleList.length, num: this.peopleList.length,
users: this.peopleList, users: this.peopleList,
} }
return;
const res = await api.GuestCreate(data) const res = await api.GuestCreate(data)
if (res.code === 1) this.$u.toast(res.msg) if (res.code === 1) this.$u.toast(res.msg)
else this.$u.toast(res.msg_detail) else this.$u.toast(res.msg_detail)
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或