hookehuyr

fix 细节调整

...@@ -368,13 +368,11 @@ onMounted(async () => { ...@@ -368,13 +368,11 @@ onMounted(async () => {
368 order_num.value = props.data.order_num; 368 order_num.value = props.data.order_num;
369 plan_in.value = props.data.plan_in; 369 plan_in.value = props.data.plan_in;
370 plan_out.value = props.data.plan_out; 370 plan_out.value = props.data.plan_out;
371 - // remain_time.value = props.data.pay_time; 371 + remain_time.value = props.data.pay_time;
372 - remain_time.value = 1000;
373 contact_name.value = props.data.contact_name; 372 contact_name.value = props.data.contact_name;
374 contact_phone.value = props.data.contact_phone; 373 contact_phone.value = props.data.contact_phone;
375 order_remark.value = props.data.order_remark; 374 order_remark.value = props.data.order_remark;
376 order_id.value = props.data.id; 375 order_id.value = props.data.id;
377 - // TODO: 给一个格式化的时间
378 order_created_time.value = props.data._created_time; 376 order_created_time.value = props.data._created_time;
379 // 377 //
380 let check_in = plan_in.value.split('-'); 378 let check_in = plan_in.value.split('-');
...@@ -416,7 +414,6 @@ watch( ...@@ -416,7 +414,6 @@ watch(
416 contact_name.value = val.contact_name; 414 contact_name.value = val.contact_name;
417 contact_phone.value = val.contact_phone; 415 contact_phone.value = val.contact_phone;
418 order_remark.value = val.order_remark; 416 order_remark.value = val.order_remark;
419 - // TODO: 给一个格式化的时间
420 order_created_time.value = val._created_time; 417 order_created_time.value = val._created_time;
421 order_id.value = val.id; 418 order_id.value = val.id;
422 } 419 }
......
1 <!-- 1 <!--
2 * @Date: 2022-09-19 14:11:06 2 * @Date: 2022-09-19 14:11:06
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2023-12-27 16:23:40 4 + * @LastEditTime: 2023-12-28 11:28:30
5 * @FilePath: /meihuaApp/src/pages/detail/index.vue 5 * @FilePath: /meihuaApp/src/pages/detail/index.vue
6 * @Description: 房间详情页面 6 * @Description: 房间详情页面
7 --> 7 -->
...@@ -190,28 +190,29 @@ onMounted(async () => { ...@@ -190,28 +190,29 @@ onMounted(async () => {
190 // 预定房间 190 // 预定房间
191 const goToConfirm = async () => { 191 const goToConfirm = async () => {
192 let params = getCurrentPageParam(); 192 let params = getCurrentPageParam();
193 - if (!start_date.value || !end_date.value) {
194 - Taro.showToast({
195 - title: '请先选择入住时间段',
196 - icon: 'none',
197 - duration: 3000,
198 - });
199 - return false;
200 - }
201 - if (!showBook.value) {
202 - Taro.showToast({
203 - title: '该时段房间已售罄,请重新选择日期',
204 - icon: 'none',
205 - duration: 3000,
206 - });
207 - return false;
208 - }
209 // 获取用户信息 193 // 获取用户信息
210 const myInfoData = await showMyInfoAPI(); 194 const myInfoData = await showMyInfoAPI();
211 if (myInfoData.code) { 195 if (myInfoData.code) {
212 state.phone = myInfoData.data.wxapp_user_phone; 196 state.phone = myInfoData.data.wxapp_user_phone;
213 } 197 }
214 if (state.phone) { 198 if (state.phone) {
199 + // 查看是否选择日期
200 + if (!start_date.value || !end_date.value) {
201 + Taro.showToast({
202 + title: '请先选择入住时间段',
203 + icon: 'none',
204 + duration: 1000,
205 + });
206 + return false;
207 + }
208 + if (!showBook.value) {
209 + Taro.showToast({
210 + title: '该时段房间已售罄,请重新选择日期',
211 + icon: 'none',
212 + duration: 1000,
213 + });
214 + return false;
215 + }
215 Taro.navigateTo({ 216 Taro.navigateTo({
216 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}`, 217 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}`,
217 }); 218 });
......
1 <!-- 1 <!--
2 * @Date: 2022-09-19 14:11:06 2 * @Date: 2022-09-19 14:11:06
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2023-12-22 16:11:24 4 + * @LastEditTime: 2023-12-28 10:48:17
5 * @FilePath: /meihuaApp/src/pages/login/index.vue 5 * @FilePath: /meihuaApp/src/pages/login/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 </nut-input> --> 17 </nut-input> -->
18 <nut-row> 18 <nut-row>
19 <nut-col span="14"> 19 <nut-col span="14">
20 - <nut-input v-model="code" placeholder="请输入验证码" :border="false" type="number" :formatter="codeFormatter" max-length="4"></nut-input> 20 + <nut-input v-model="sms_code" placeholder="请输入验证码" :border="false" type="number" :formatter="codeFormatter" max-length="4"></nut-input>
21 </nut-col> 21 </nut-col>
22 <nut-col span="10"> 22 <nut-col span="10">
23 <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;"> 23 <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 = () => { ...@@ -88,7 +88,7 @@ const resetCountdown = () => {
88 88
89 const time_remaining = ref(0); 89 const time_remaining = ref(0);
90 const tel = ref(''); 90 const tel = ref('');
91 -const code = ref(''); 91 +const sms_code = ref(null);
92 92
93 const showRight = ref(false); 93 const showRight = ref(false);
94 94
...@@ -97,7 +97,7 @@ const tapRight = () => { ...@@ -97,7 +97,7 @@ const tapRight = () => {
97 } 97 }
98 98
99 const codeFormatter = (value) => { 99 const codeFormatter = (value) => {
100 - return value.replace(/\D/g, '').substring(0, 4); 100 + return value.substring(0, 4);
101 } 101 }
102 102
103 const isValidTel = (tel) => { 103 const isValidTel = (tel) => {
...@@ -105,7 +105,7 @@ const isValidTel = (tel) => { ...@@ -105,7 +105,7 @@ const isValidTel = (tel) => {
105 } 105 }
106 106
107 const login = async () => { 107 const login = async () => {
108 - if (!isValidTel(tel.value) ||!code.value) { 108 + if (!isValidTel(tel.value) ||!sms_code.value) {
109 Taro.showToast({ 109 Taro.showToast({
110 title: '请检查输入项', 110 title: '请检查输入项',
111 icon: 'error', 111 icon: 'error',
...@@ -113,9 +113,7 @@ const login = async () => { ...@@ -113,9 +113,7 @@ const login = async () => {
113 }); 113 });
114 return; 114 return;
115 } else { 115 } else {
116 - // TODO: 等待正式接口环境调整 116 + const { code } = await bindPhoneAPI({ phone: tel.value, sms_code: sms_code.value });
117 - const { code, data } = await bindPhoneAPI({ phone: tel.value, sms_code: code.value });
118 - // const { code } = await bindPhoneAPI({ phone: tel.value, sms_code: 'debug_sms_code_1805' });
119 if (code) { 117 if (code) {
120 Taro.showToast({ 118 Taro.showToast({
121 title: '登录成功', 119 title: '登录成功',
......