Commit 8605c9fe by zhangzhen

细节优化

parent 7906802a
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
<view class="flex-between price"> <view class="flex-between price">
<text class="text-black text-left">可用时长</text> <text class="text-black text-left">可用时长</text>
<view class="flex-row"> <view class="flex-row">
<text class="text-pink text-lg text-bold">{{Number(computePriceInfo.availableDuration).toFixed(1)}}</text> <text class="text-pink text-lg text-bold">{{computePriceInfo && computePriceInfo.availableDuration? Number(computePriceInfo.availableDuration).toFixed(1) : 0}}</text>
<text class="text-pink">小时</text> <text class="text-pink">小时</text>
</view> </view>
</view> </view>
...@@ -409,7 +409,7 @@ ...@@ -409,7 +409,7 @@
dictList dictList
} from "@/api/index.js"; } from "@/api/index.js";
import { import {
getDictItem getDictItem,getSysConfigValue
} from "@/utils/tools.js" } from "@/utils/tools.js"
import { import {
getStoreActivity, getStoreActivity,
...@@ -560,8 +560,8 @@ ...@@ -560,8 +560,8 @@
tipContent: "当前条件下无可预约的时段,请手动选择合适的空闲时段", tipContent: "当前条件下无可预约的时段,请手动选择合适的空闲时段",
tipErrMsg: '', tipErrMsg: '',
warnTip:'', warnTip:'',
activityDate:{} activityDate:{},
storeCleanDuration: getSysConfigValue('StoreCleanDuration')? Number(getSysConfigValue('StoreCleanDuration')):30
}; };
}, },
filters: { filters: {
...@@ -1175,7 +1175,11 @@ ...@@ -1175,7 +1175,11 @@
}else{ }else{
this.selectCouponIndex = -1; this.selectCouponIndex = -1;
} }
if(this.allDayUseStatus){
this.computePriceInfo =''
}else{
this.onComputePrice(); this.onComputePrice();
}
} else if (res.data.code == 401) { } else if (res.data.code == 401) {
this.$refs.loginPop.open(); this.$refs.loginPop.open();
} }
...@@ -1590,9 +1594,8 @@ ...@@ -1590,9 +1594,8 @@
let endStemp = startStemp + stempLong; let endStemp = startStemp + stempLong;
if(this.orderType == 2){ if(this.orderType == 2){
endStemp = endStemp + 30*60*1000 endStemp = endStemp + this.storeCleanDuration*60*1000
} }
let nextStatus = false; let nextStatus = false;
this.dateIntervalList.forEach((item,k) =>{ this.dateIntervalList.forEach((item,k) =>{
if(nextStatus) return; if(nextStatus) return;
......
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
<script> <script>
import {login,dictList} from "@/api/index.js"; import {login,dictList} from "@/api/index.js";
import {getDictItem} from "@/utils/tools.js" import {getDictItem,getSysConfigValue} from "@/utils/tools.js"
import fNavbar from '@/components/module/f-navbar/f-navbar'; import fNavbar from '@/components/module/f-navbar/f-navbar';
import {getOrderInfoByNo,orderRefund,openDoor,noLoginOpenDoor,noLoginGetOrderInfo} from "@/api/order.js" import {getOrderInfoByNo,orderRefund,openDoor,noLoginOpenDoor,noLoginGetOrderInfo} from "@/api/order.js"
import moment from "@/common/moment_zh_cn.js"; import moment from "@/common/moment_zh_cn.js";
...@@ -199,7 +199,8 @@ ...@@ -199,7 +199,8 @@
shareOrder:false, shareOrder:false,
userInfo:{ userInfo:{
id:'' id:''
} },
storeCleanDuration: getSysConfigValue('StoreCleanDuration')? Number(getSysConfigValue('StoreCleanDuration')):30
}; };
}, },
onLoad(option) { onLoad(option) {
...@@ -233,14 +234,12 @@ ...@@ -233,14 +234,12 @@
dicts = JSON.parse(uni.getStorageSync('dicts')) dicts = JSON.parse(uni.getStorageSync('dicts'))
this.orderStatusEnum = getDictItem(dicts, "store_order_status"); this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.roomTypeEnum = getDictItem(dicts, "store_room_type"); this.roomTypeEnum = getDictItem(dicts, "store_room_type");
} else { } else {
dictList().then(res => { dictList().then(res => {
dicts = res.data.data; dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data)) uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.orderStatusEnum = getDictItem(dicts, "store_order_status"); this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.roomTypeEnum = getDictItem(dicts, "store_room_type"); this.roomTypeEnum = getDictItem(dicts, "store_room_type");
}) })
} }
}, },
...@@ -416,7 +415,7 @@ ...@@ -416,7 +415,7 @@
// 续单开始时间戳,订单未结束使用订单实际结束时间,订单结束使用当前时间 // 续单开始时间戳,订单未结束使用订单实际结束时间,订单结束使用当前时间
let startDateStemp = this.orderInfo.status == 2? moment(moment().format("YYYY-MM-DD HH:mm:00")).valueOf(): moment(orderEndDate).valueOf() let startDateStemp = this.orderInfo.status == 2? moment(moment().format("YYYY-MM-DD HH:mm:00")).valueOf(): moment(orderEndDate).valueOf()
//可续单的结束时间戳 //可续单的结束时间戳
let endDateStemp = startDateStemp + 60*60*1000; let endDateStemp = startDateStemp + (60+this.storeCleanDuration)*60*1000;
let continueStatus = true; let continueStatus = true;
if(res.data.code ==200 && res.data.data && res.data.data.length){ if(res.data.code ==200 && res.data.data && res.data.data.length){
new Promise((resolve,reject) => { new Promise((resolve,reject) => {
...@@ -449,9 +448,8 @@ ...@@ -449,9 +448,8 @@
uni.navigateTo({ uni.navigateTo({
url:`/pages/order/order?roomId=${this.orderInfo.roomId}&orderNo=${this.orderInfo.orderNo}&modeIndex=1` url:`/pages/order/order?roomId=${this.orderInfo.roomId}&orderNo=${this.orderInfo.orderNo}&modeIndex=1`
}) })
}else{ }else{
endDateStemp = startDateStemp + 30*60*1000; endDateStemp = startDateStemp + (30+this.storeCleanDuration)*60*1000;
continueStatus = true; continueStatus = true;
new Promise((resolve,reject) => { new Promise((resolve,reject) => {
res.data.data.forEach((item,i)=>{ res.data.data.forEach((item,i)=>{
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</view> </view>
</view> </view>
<view class="tip-text"> <view class="tip-text">
<text>充值送时长,多充多送</text> <text>{{item.remark || '充值送时长,多充多送'}}</text>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -159,3 +159,14 @@ export function getDictItem(dicts, dictType) { ...@@ -159,3 +159,14 @@ export function getDictItem(dicts, dictType) {
} }
return obj return obj
} }
// 通过系统配置参数key字段获取value值;
export function getSysConfigValue(key) {
let value = ""
let sysConfigList = uni.getStorageSync('sysConfig');
let obj = sysConfigList.find(item => item.configKey === key);
if(obj){
value = obj.configValue;
}
return value
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment