hookehuyr

fix 细节调整

......@@ -368,13 +368,11 @@ onMounted(async () => {
order_num.value = props.data.order_num;
plan_in.value = props.data.plan_in;
plan_out.value = props.data.plan_out;
// remain_time.value = props.data.pay_time;
remain_time.value = 1000;
remain_time.value = props.data.pay_time;
contact_name.value = props.data.contact_name;
contact_phone.value = props.data.contact_phone;
order_remark.value = props.data.order_remark;
order_id.value = props.data.id;
// TODO: 给一个格式化的时间
order_created_time.value = props.data._created_time;
//
let check_in = plan_in.value.split('-');
......@@ -416,7 +414,6 @@ watch(
contact_name.value = val.contact_name;
contact_phone.value = val.contact_phone;
order_remark.value = val.order_remark;
// TODO: 给一个格式化的时间
order_created_time.value = val._created_time;
order_id.value = val.id;
}
......
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-12-27 16:23:40
* @LastEditTime: 2023-12-28 11:28:30
* @FilePath: /meihuaApp/src/pages/detail/index.vue
* @Description: 房间详情页面
-->
......@@ -190,28 +190,29 @@ onMounted(async () => {
// 预定房间
const goToConfirm = async () => {
let params = getCurrentPageParam();
if (!start_date.value || !end_date.value) {
Taro.showToast({
title: '请先选择入住时间段',
icon: 'none',
duration: 3000,
});
return false;
}
if (!showBook.value) {
Taro.showToast({
title: '该时段房间已售罄,请重新选择日期',
icon: 'none',
duration: 3000,
});
return false;
}
// 获取用户信息
const myInfoData = await showMyInfoAPI();
if (myInfoData.code) {
state.phone = myInfoData.data.wxapp_user_phone;
}
if (state.phone) {
// 查看是否选择日期
if (!start_date.value || !end_date.value) {
Taro.showToast({
title: '请先选择入住时间段',
icon: 'none',
duration: 1000,
});
return false;
}
if (!showBook.value) {
Taro.showToast({
title: '该时段房间已售罄,请重新选择日期',
icon: 'none',
duration: 1000,
});
return false;
}
Taro.navigateTo({
url: `/pages/confirm/index?id=${params.id}&start_date=${start_date.value}&end_date=${end_date.value}&between_date=${between_date.value}&start_date_week=${start_date_week.value}&end_date_week=${end_date_week.value}&room_type=${params.room_type}`,
});
......
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-12-22 16:11:24
* @LastEditTime: 2023-12-28 10:48:17
* @FilePath: /meihuaApp/src/pages/login/index.vue
* @Description: 文件描述
-->
......@@ -17,7 +17,7 @@
</nut-input> -->
<nut-row>
<nut-col span="14">
<nut-input v-model="code" placeholder="请输入验证码" :border="false" type="number" :formatter="codeFormatter" max-length="4"></nut-input>
<nut-input v-model="sms_code" placeholder="请输入验证码" :border="false" type="number" :formatter="codeFormatter" max-length="4"></nut-input>
</nut-col>
<nut-col span="10">
<view style="padding: 25rpx 10rpx; line-height: 40rpx; background-color: #6A4925; color: #fff; border-top-right-radius: 50rpx; border-bottom-right-radius: 50rpx; font-size: 28rpx;text-align: center;">
......@@ -88,7 +88,7 @@ const resetCountdown = () => {
const time_remaining = ref(0);
const tel = ref('');
const code = ref('');
const sms_code = ref(null);
const showRight = ref(false);
......@@ -97,7 +97,7 @@ const tapRight = () => {
}
const codeFormatter = (value) => {
return value.replace(/\D/g, '').substring(0, 4);
return value.substring(0, 4);
}
const isValidTel = (tel) => {
......@@ -105,7 +105,7 @@ const isValidTel = (tel) => {
}
const login = async () => {
if (!isValidTel(tel.value) ||!code.value) {
if (!isValidTel(tel.value) ||!sms_code.value) {
Taro.showToast({
title: '请检查输入项',
icon: 'error',
......@@ -113,9 +113,7 @@ const login = async () => {
});
return;
} else {
// TODO: 等待正式接口环境调整
const { code, data } = await bindPhoneAPI({ phone: tel.value, sms_code: code.value });
// const { code } = await bindPhoneAPI({ phone: tel.value, sms_code: 'debug_sms_code_1805' });
const { code } = await bindPhoneAPI({ phone: tel.value, sms_code: sms_code.value });
if (code) {
Taro.showToast({
title: '登录成功',
......