服务预约
This commit is contained in:
parent
5c9c7901c5
commit
13c4cc9c24
12
pages.json
12
pages.json
@ -4,17 +4,17 @@
|
|||||||
},
|
},
|
||||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||||
{
|
{
|
||||||
"path": "pages/homepage/homepage",
|
|
||||||
"style": {
|
|
||||||
"enablePullDownRefresh": false,
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
"path": "pages/startup/startup",
|
"path": "pages/startup/startup",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
},{
|
||||||
|
"path": "pages/homepage/homepage",
|
||||||
|
"style": {
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/medicalservice/medicalservice",
|
"path": "pages/medicalservice/medicalservice",
|
||||||
|
|||||||
@ -201,11 +201,14 @@
|
|||||||
},
|
},
|
||||||
// 服务预约
|
// 服务预约
|
||||||
goappoint() {
|
goappoint() {
|
||||||
if (!this.userinfo && !this.identity) {
|
uni.navigateTo({
|
||||||
this.gologin();
|
url: '/pagesC/ServiceAppointment/ServiceAppointment'
|
||||||
} else {
|
})
|
||||||
this.detailinfo('', '/pagesC/ServiceAppointment/ServiceAppointment')
|
// if (!this.userinfo && !this.identity) {
|
||||||
}
|
// this.gologin();
|
||||||
|
// } else {
|
||||||
|
// this.detailinfo('', '/pagesC/ServiceAppointment/ServiceAppointment')
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
// 服务记录
|
// 服务记录
|
||||||
servicerecord() {
|
servicerecord() {
|
||||||
|
|||||||
@ -17,6 +17,7 @@
|
|||||||
},
|
},
|
||||||
onLoad(options) { //获取传值
|
onLoad(options) { //获取传值
|
||||||
this.item = JSON.parse(decodeURIComponent(options.item))
|
this.item = JSON.parse(decodeURIComponent(options.item))
|
||||||
|
console.log(this.item)
|
||||||
this.item.informationContent = this.item.informationContent.replace(/\<img/gi,
|
this.item.informationContent = this.item.informationContent.replace(/\<img/gi,
|
||||||
"<br/> <img class='richPic'")
|
"<br/> <img class='richPic'")
|
||||||
this.item.informationContent = this.item.informationContent.replace(/\<p/gi,
|
this.item.informationContent = this.item.informationContent.replace(/\<p/gi,
|
||||||
|
|||||||
@ -95,7 +95,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.big {
|
.big {
|
||||||
padding: 35rpx 50rpx 30rpx 50rpx;
|
// padding: 35rpx 50rpx 30rpx 50rpx;
|
||||||
|
padding: 27rpx 84rpx 29rpx 46rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|||||||
@ -7,55 +7,80 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="inputs">
|
<view class="inputs">
|
||||||
<i class="icon"></i>
|
<i class="icon"></i>
|
||||||
<input v-model="goodsName" type="text" name="" id="" class="input" placeholder="搜索服务"
|
<input v-model="projectName" type="text" name="" id="" class="input" placeholder="搜索服务"
|
||||||
placeholder-class="placeholder">
|
placeholder-class="placeholder">
|
||||||
</view>
|
</view>
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
<view class="content">
|
<view class="content" v-for="(item ,index) in listinfo" :key="index">
|
||||||
<view class="big">大生化
|
<view class="big">{{item.projectName}}
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="servename">
|
<view class="servename">
|
||||||
高血压个性服务包
|
{{item.packageName}}
|
||||||
</view>
|
</view>
|
||||||
<view class="appoint" @tap="goapponint">
|
<view class="appoint" @tap="goapponint(item)">
|
||||||
预约
|
预约
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
|
||||||
<view class="big">大生化
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="servename">
|
|
||||||
高血压个性服务包
|
|
||||||
</view>
|
|
||||||
<view class="appoint" @tap="goapponint">
|
|
||||||
预约
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
getForm,
|
||||||
|
|
||||||
|
} from '@/api/pagesC/ServiceAppointment/ServiceAppointment.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
background: {
|
background: {
|
||||||
backgroundColor: '#26A888',
|
backgroundColor: '#26A888',
|
||||||
},
|
},
|
||||||
goodsName:'',
|
projectName: '',
|
||||||
|
identity: '372431196910127051',
|
||||||
|
region: '',
|
||||||
|
listinfo: [],
|
||||||
|
appointlist:[],
|
||||||
|
packageNo:'',
|
||||||
|
formName:'',
|
||||||
|
formNo:'',
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getlist()
|
||||||
|
},
|
||||||
|
watch: { //监听
|
||||||
|
projectName(e) {
|
||||||
|
this.getlist()
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getlist() {
|
||||||
|
this.userinfo = uni.getStorageSync('userinfo');
|
||||||
|
this.region = this.userinfo.cityCode;
|
||||||
|
getForm(this.identity, this.region, this.projectName).then(res => {
|
||||||
|
// console.log(res, '555')
|
||||||
|
this.listinfo = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
goprevious() {
|
goprevious() {
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1
|
delta: 1
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goapponint() {
|
goapponint(item) {
|
||||||
|
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesC/appointmenttime/appointmenttime'
|
// url: '/pagesC/appointmenttime/appointmenttime',
|
||||||
|
url: `/pagesC/appointmenttime/appointmenttime?item=${JSON.stringify(item)}`
|
||||||
})
|
})
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,26 +3,100 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="appointtime">预约时间
|
<view class="appointtime">预约时间
|
||||||
</view>
|
</view>
|
||||||
<u-calendar v-model="show" :mode="mode" @change="change"></u-calendar>
|
|
||||||
<view class="time" @tap="show=true">
|
<uni-datetime-picker v-model="datetimerange" type="datetimerange" rangeSeparator="至" />
|
||||||
<image src="/static/pageC/time.png" mode=""></image>
|
<view class="submit" @tap="submit">
|
||||||
</view>
|
|
||||||
<view class="submit">
|
|
||||||
提交
|
提交
|
||||||
</view>
|
</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
detail,
|
||||||
|
save
|
||||||
|
} from '@/api/pagesC/ServiceAppointment/ServiceAppointment.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show: false,
|
show: false,
|
||||||
mode: 'date'
|
mode: 'date',
|
||||||
|
appointlist: [],
|
||||||
|
listitem: {
|
||||||
|
bookingTime: '',
|
||||||
|
},
|
||||||
|
datetimerange: [Date.now(), this.todayEndTime()],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
this.appointlist = JSON.parse(e.item)
|
||||||
|
// 改字段名
|
||||||
|
this.listitem = this.appointlist
|
||||||
|
this.listitem.formName = this.appointlist.projectName
|
||||||
|
this.listitem.packageNo = this.appointlist.packageId
|
||||||
|
this.listitem.formNo = this.appointlist.projectId
|
||||||
|
this.$delete(this.listitem, 'projectId')
|
||||||
|
this.$delete(this.listitem, 'projectName')
|
||||||
|
// this.single= new Date();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
maskClick(e) {
|
||||||
|
console.log(e, '55')
|
||||||
|
},
|
||||||
|
|
||||||
|
change(e) {
|
||||||
|
// console.log(e)
|
||||||
|
this.listitem.bookingTime = e.result
|
||||||
|
},
|
||||||
|
todayEndTime() {
|
||||||
|
let todayYear = (new Date()).getFullYear();
|
||||||
|
let todayMonth = (new Date()).getMonth();
|
||||||
|
let todayDay = (new Date()).getDate();
|
||||||
|
let todayTime = (new Date(todayYear, todayMonth, todayDay, '23', '59', '59')).getTime();
|
||||||
|
return todayTime
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
this.listitem.applyStartTime = this.datetimerange[0]
|
||||||
|
this.listitem.applyEndTime = this.datetimerange[1]
|
||||||
|
if (this.listitem.sourceType == '1') {
|
||||||
|
console.log(this.listitem, '55')
|
||||||
|
detail(this.listitem).then(res => {
|
||||||
|
// console.log(res)
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '预约成功',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
} else if (res.code == '500') {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (this.listitem.sourceType == '2') {
|
||||||
|
console.log(this.listitem, '555')
|
||||||
|
save(this.listitem).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '预约成功',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
} else if (res.code == '500') {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// console.log(res, '9595')
|
||||||
|
// this.appointlistinfo = res.data
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -68,6 +142,7 @@
|
|||||||
|
|
||||||
.time {
|
.time {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
padding: 17rpx;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
height: 63rpx;
|
height: 63rpx;
|
||||||
background: #F6F6F6;
|
background: #F6F6F6;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user