Commit 8605c9fe by zhangzhen

细节优化

parent 7906802a
......@@ -225,7 +225,7 @@
<view class="flex-between price">
<text class="text-black text-left">可用时长</text>
<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>
</view>
</view>
......@@ -409,7 +409,7 @@
dictList
} from "@/api/index.js";
import {
getDictItem
getDictItem,getSysConfigValue
} from "@/utils/tools.js"
import {
getStoreActivity,
......@@ -560,8 +560,8 @@
tipContent: "当前条件下无可预约的时段,请手动选择合适的空闲时段",
tipErrMsg: '',
warnTip:'',
activityDate:{}
activityDate:{},
storeCleanDuration: getSysConfigValue('StoreCleanDuration')? Number(getSysConfigValue('StoreCleanDuration')):30
};
},
filters: {
......@@ -1175,7 +1175,11 @@
}else{
this.selectCouponIndex = -1;
}
this.onComputePrice();
if(this.allDayUseStatus){
this.computePriceInfo =''
}else{
this.onComputePrice();
}
} else if (res.data.code == 401) {
this.$refs.loginPop.open();
}
......@@ -1590,9 +1594,8 @@
let endStemp = startStemp + stempLong;
if(this.orderType == 2){
endStemp = endStemp + 30*60*1000
endStemp = endStemp + this.storeCleanDuration*60*1000
}
let nextStatus = false;
this.dateIntervalList.forEach((item,k) =>{
if(nextStatus) return;
......
......@@ -173,7 +173,7 @@
<script>
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 {getOrderInfoByNo,orderRefund,openDoor,noLoginOpenDoor,noLoginGetOrderInfo} from "@/api/order.js"
import moment from "@/common/moment_zh_cn.js";
......@@ -199,10 +199,11 @@
shareOrder:false,
userInfo:{
id:''
}
},
storeCleanDuration: getSysConfigValue('StoreCleanDuration')? Number(getSysConfigValue('StoreCleanDuration')):30
};
},
onLoad(option) {
onLoad(option) {
this.userInfo = uni.getStorageSync('userInfo')
this.orderNo = option.orderNo;
......@@ -233,14 +234,12 @@
dicts = JSON.parse(uni.getStorageSync('dicts'))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.roomTypeEnum = getDictItem(dicts, "store_room_type");
} else {
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.roomTypeEnum = getDictItem(dicts, "store_room_type");
})
}
},
......@@ -416,7 +415,7 @@
// 续单开始时间戳,订单未结束使用订单实际结束时间,订单结束使用当前时间
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;
if(res.data.code ==200 && res.data.data && res.data.data.length){
new Promise((resolve,reject) => {
......@@ -449,9 +448,8 @@
uni.navigateTo({
url:`/pages/order/order?roomId=${this.orderInfo.roomId}&orderNo=${this.orderInfo.orderNo}&modeIndex=1`
})
}else{
endDateStemp = startDateStemp + 30*60*1000;
endDateStemp = startDateStemp + (30+this.storeCleanDuration)*60*1000;
continueStatus = true;
new Promise((resolve,reject) => {
res.data.data.forEach((item,i)=>{
......
......@@ -60,7 +60,7 @@
</view>
</view>
<view class="tip-text">
<text>充值送时长,多充多送</text>
<text>{{item.remark || '充值送时长,多充多送'}}</text>
</view>
</view>
</view>
......
......@@ -158,4 +158,15 @@ export function getDictItem(dicts, dictType) {
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