mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:43:26 +08:00
【修复】服务商品倒计时错误的问题,调整首页组件显示效果。
This commit is contained in:
@@ -685,53 +685,49 @@ namespace CoreCms.Net.Services
|
||||
}
|
||||
else if (item.widgetCode == "service")
|
||||
{
|
||||
JObject parameters = (JObject)JsonConvert.DeserializeObject(item.parameters);
|
||||
var parameters = (JObject)JsonConvert.DeserializeObject(item.parameters);
|
||||
|
||||
if (parameters != null && parameters.ContainsKey("list"))
|
||||
{
|
||||
JArray result = JArray.Parse(parameters["list"].ToString());
|
||||
foreach (JObject ss in result)
|
||||
var result = JArray.Parse(parameters["list"].ToString());
|
||||
var ids = (from JObject ss in result where ss.ContainsKey("id") select ((JObject)ss)["id"].ObjectToInt(0) into id where id > 0 select id).ToList();
|
||||
|
||||
if (ids.Any())
|
||||
{
|
||||
if (ss.ContainsKey("id"))
|
||||
var serviceObj = await _servicesServices.QueryListByClauseAsync(p => ids.Contains(p.id));
|
||||
foreach (var jToken in result)
|
||||
{
|
||||
var ss = (JObject) jToken;
|
||||
var id = ((JObject)ss)["id"].ObjectToInt(0);
|
||||
if (id > 0)
|
||||
var serviceInfo = serviceObj.Find(p => p.id == id);
|
||||
if (serviceInfo != null)
|
||||
{
|
||||
var serviceInfo = await _servicesServices.QueryByIdAsync(id);
|
||||
if (serviceInfo != null)
|
||||
var openStatus = 1;
|
||||
int lastTime = 0;
|
||||
var dt = DateTime.Now;
|
||||
if (serviceInfo.startTime > dt)
|
||||
{
|
||||
var pinTuanStartStatus = 1;
|
||||
int lastTime = 0;
|
||||
bool isOverdue = false;
|
||||
//判断拼团状态
|
||||
var dt = DateTime.Now;
|
||||
|
||||
if (serviceInfo.startTime > dt)
|
||||
{
|
||||
pinTuanStartStatus = (int)GlobalEnumVars.ServicesOpenStatus.notBegun;
|
||||
TimeSpan ts = serviceInfo.startTime.Subtract(dt);
|
||||
lastTime = (int)ts.TotalSeconds;
|
||||
isOverdue = lastTime > 0;
|
||||
}
|
||||
else if (serviceInfo.startTime <= dt && serviceInfo.endTime > dt)
|
||||
{
|
||||
pinTuanStartStatus = (int)GlobalEnumVars.ServicesOpenStatus.begin;
|
||||
|
||||
TimeSpan ts = serviceInfo.endTime.Subtract(dt);
|
||||
lastTime = (int)ts.TotalSeconds;
|
||||
isOverdue = lastTime > 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pinTuanStartStatus = (int)GlobalEnumVars.ServicesOpenStatus.haveExpired;
|
||||
}
|
||||
((JObject)ss).Add("pinTuanStartStatus", pinTuanStartStatus);
|
||||
((JObject)ss).Add("lastTime", lastTime);
|
||||
((JObject)ss).Add("isOverdue", isOverdue);
|
||||
openStatus = (int)GlobalEnumVars.ServicesOpenStatus.notBegun;
|
||||
TimeSpan ts = serviceInfo.startTime.Subtract(dt);
|
||||
lastTime = (int)ts.TotalSeconds;
|
||||
}
|
||||
else if (serviceInfo.startTime <= dt && serviceInfo.endTime > dt)
|
||||
{
|
||||
openStatus = (int)GlobalEnumVars.ServicesOpenStatus.begin;
|
||||
|
||||
TimeSpan ts = serviceInfo.endTime.Subtract(dt);
|
||||
lastTime = (int)ts.TotalSeconds;
|
||||
}
|
||||
else
|
||||
{
|
||||
openStatus = (int)GlobalEnumVars.ServicesOpenStatus.haveExpired;
|
||||
}
|
||||
ss.Add("openStatus", openStatus);
|
||||
ss.Add("lastTime", lastTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
parameters.Remove("list");
|
||||
parameters.Add("list", result);
|
||||
}
|
||||
|
||||
@@ -5,10 +5,6 @@
|
||||
<u-toast ref="uToast" />
|
||||
<view class="head-box coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-margin-bottom-10">
|
||||
<view class="head-title u-ellipsis-1">领券专区</view>
|
||||
<!--<view class="head-more coreshop-flex coreshop-align-center coreshop-flex-direction-row u-col-center" @tap="$Router.push('/pages/app/coupon/list')">
|
||||
<text class="more-text coreshop-margin-right-10">查看更多</text>
|
||||
<text class="iconfont icon-youjiantou-tianchong more-icon"></text>
|
||||
</view>-->
|
||||
<u-icon name="arrow-right-double" size="12" label="查看更多" labelSize="12" labelPos="left" @tap="$u.route('/pages/coupon/coupon')"></u-icon>
|
||||
</view>
|
||||
<scroll-view class="groupon-scroll" enable-flex scroll-anchoring scroll-x scroll-with-animation>
|
||||
|
||||
@@ -1,40 +1,85 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="coreshop-margin-left-10 coreshop-margin-right-10 coreshop-margin-top-10 coreshop-margin-bottom-10">
|
||||
<coreshop-section font-size="15" :title="coreshopdata.parameters.title" @click="goServicesList()" sub-title="查看更多"></coreshop-section>
|
||||
</view>
|
||||
<view class="coreshop-margin-left-15 coreshop-margin-right-15" v-if="coreshopdata.parameters.list && count">
|
||||
<view class="img-list-item coreshop-flex-direction-row" v-if="item.id !== 'undefined' && item.id" v-for="(item, key) in coreshopdata.parameters.list" :key="key" @click="goServicesDetail(item.id)">
|
||||
|
||||
<view class="coreshop-padding-10 coreshop-margin-10 coreshop-bg-white coreshop-border-radius-tr-24 coreshop-border-radius-bl-24" v-if="listData && count">
|
||||
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-min-height-30">
|
||||
<view class="coreshop-font-16 coreshop-text-black coreshop-font-weight-bold">{{coreshopdata.parameters.title}}</view>
|
||||
<u-icon name="arrow-right-double" size="12" label="查看更多" labelSize="12" labelPos="left" @tap="goServicesList()"></u-icon>
|
||||
</view>
|
||||
<view class="coreshop-divider">
|
||||
<view class="left"></view>
|
||||
<text class="dot">●</text>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
|
||||
<view class="img-list-item coreshop-flex-direction-row coreshop-margin-bottom-10 bg-main coreshop-text-black" v-for="(item, key) in listData" :key="key" @click="goServicesDetail(item.id)">
|
||||
<view class="img-list-item-l">
|
||||
<u--image :src="item.thumbnail" :index="item.id" width="100px" height="100px"></u--image>
|
||||
</view>
|
||||
<view class="img-list-item-r">
|
||||
<view class="coreshop-font-14 coreshop-text-bold u-line-1">{{item.title}}</view>
|
||||
<view class="coreshop-font-14 coreshop-text-bold u-line-1 title">{{item.title}}</view>
|
||||
<view class="coreshop-font-12 u-line-2 coreshop-margin-top-10 coreshop-margin-bottom-10">{{item.description}}</view>
|
||||
<view class="item-c coreshop-flex coreshop-justify-between">
|
||||
<view class="red-price coreshop-justify-between">
|
||||
¥{{item.money}}
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-justify-between">
|
||||
<view class="red-price coreshop-font-15 coreshop-flex-direction-row" v-if="item.status == 0 && item.lastTime > 0">
|
||||
<u-count-down :time="item.lastTime" format="HH:mm:ss"></u-count-down>
|
||||
</view>
|
||||
<!--<u-count-down :time="item.lastTime" format="HH:mm:ss"></u-count-down>-->
|
||||
<view class="coreshop-text-right coreshop-time-right" v-if="item.openStatus == 1 && item.lastTime > 0">
|
||||
<u-count-down :time="item.lastTime*1000" :autoStart="true" format="DD天HH时mm秒ss" @change="onChange($event,key)">
|
||||
<view class="time coreshop-font-11">
|
||||
<view class="coreshop-font-12">仅剩:</view>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.days }}</text>
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.hours>10?item.timeData.hours:'0'+item.timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.minutes }}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.seconds }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="coreshop-text-right coreshop-time-right" v-if="item.openStatus == 2 && item.lastTime > 0">
|
||||
<u-count-down :time="item.lastTime*1000" :autoStart="true" format="DD天HH时mm秒ss" @change="onChange($event,key)">
|
||||
<view class="time">
|
||||
<view class="coreshop-font-12">即将开始:</view>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.days }}</text>
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.hours>10?item.timeData.hours:'0'+item.timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.minutes }}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.seconds }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="coreshop-font-12 red-price" v-if="item.openStatus == 3">已结束</view>
|
||||
|
||||
<!--<view class="coreshop-flex coreshop-flex-direction-row coreshop-justify-between">
|
||||
<view class="coreshop-font-12 red-price" v-if="item.status == 3">已结束</view>
|
||||
<view class="coreshop-font-12 red-price" v-if="item.status == 2">即将开始</view>
|
||||
<u-icon name="shopping-cart" color="#2979ff" size="25" class="btnCart"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="img-list-item" v-if="!item.id" v-for="(item, key) in coreshopdata.parameters.list" :key="key">
|
||||
<image class="img-list-item-l" :src="item.image== '/images/empty-banner.png'? '/static/images/common/empty-banner.png':item.image" mode='aspectFill'></image>
|
||||
<view class="img-list-item-r">
|
||||
<view class="goods-name list-goods-name">{{item.name}}</view>
|
||||
<view class="item-c">
|
||||
<view class=" red-price">{{item.price}}</view>
|
||||
</view>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -43,30 +88,50 @@
|
||||
<script>
|
||||
export default {
|
||||
name: "coreshopservice",
|
||||
data() {
|
||||
return {
|
||||
listData: [],
|
||||
}
|
||||
},
|
||||
props: {
|
||||
coreshopdata: {
|
||||
// type: Array,
|
||||
required: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.listData = uni.$u.deepClone(this.coreshopdata.parameters.list);
|
||||
},
|
||||
computed: {
|
||||
count() {
|
||||
return (this.coreshopdata.parameters.list.length > 0)
|
||||
return (this.listData.length > 0)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onChange(e, key) {
|
||||
//this.item.timeData = uni.$u.deepClone(e);
|
||||
this.$set(this.listData[key], 'timeData', e)
|
||||
// this.$forceUpdate();
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.img-list-item { border-radius: 8px; margin: 2.5px 2.5px 10px 2.5px; background-color: #ffffff; padding: 5px; position: relative; overflow: hidden;
|
||||
.img-list-item { position: relative; overflow: hidden;
|
||||
.img-list-item-l { width: 100px; height: 100px; display: inline-block; float: left; }
|
||||
.img-list-item-r { width: calc(100% - 120px); display: inline-block; margin-left: 7.5px; float: left; position: relative;
|
||||
.title { line-height: 24px; }
|
||||
.item-c { width: 100%; margin-top: 0;
|
||||
.red-price { color: #FF7159 !important; }
|
||||
.btnCart { float: right; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.time { display: flex; align-items: center;
|
||||
.time__custom { min-width: 18px; height: 18px; background-color: #3c9cff; border-radius: 4px; display: flex; justify-content: center; align-items: center;
|
||||
.time__custom__item { color: #fff; font-size: 10px; text-align: center; }
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="coreshop-text-right coreshop-time-right" v-if="goodsInfo.pinTuanRule && goodsInfo.pinTuanRule.pinTuanStartStatus == 2">
|
||||
<u-count-down :time="goodsInfo.pinTuanRule.lastTime*1000" :autoStart="true" :millisecond="true" format="DD天HH时mm秒ss">
|
||||
<u-count-down :time="goodsInfo.pinTuanRule.lastTime*1000" :autoStart="true" :millisecond="true" format="DD天HH时mm秒ss" @change="onChange">
|
||||
<view class="time">
|
||||
<view class="coreshop-font-12">即将开团:</view>
|
||||
<view class="time__custom">
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
<text class="coreshop-font-24">{{ info.money || '0.00' }}</text>
|
||||
</view>
|
||||
<view class="coreshop-flex-sub coreshop-flex coreshop-text-left coreshop-justify-end coreshop-align-center">
|
||||
<view class="coreshop-text-right coreshop-time-right">
|
||||
<u-count-down :time="timestamp" :autoStart="true" :millisecond="true" format="DD天HH时mm秒ss" @change="onChange">
|
||||
<view class="coreshop-text-right coreshop-time-right" v-if="timer.openStatus == 1 && timer.lastTime > 0">
|
||||
<u-count-down :time="timer.lastTime * 1000" :autoStart="true" :millisecond="true" format="DD天HH时mm秒ss" @change="onChange">
|
||||
<view class="time">
|
||||
<view class="coreshop-font-12">仅剩:</view>
|
||||
<view class="time__custom">
|
||||
@@ -45,6 +45,29 @@
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="coreshop-text-right coreshop-time-right" v-if="timer.openStatus == 2 && timer.lastTime > 0">
|
||||
<u-count-down :time="timer.lastTime * 1000" :autoStart="true" :millisecond="true" format="DD天HH时mm秒ss" @change="onChange">
|
||||
<view class="time">
|
||||
<view class="coreshop-font-12">仅剩:</view>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ timeData.days }}</text>
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ timeData.minutes }}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ timeData.seconds }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="coreshop-font-12 red-price" v-if="timer.openStatus == 3">已结束</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-12 coreshop-multiple-line-clamp">
|
||||
@@ -266,9 +289,9 @@
|
||||
return {
|
||||
id: 0,
|
||||
info: {},
|
||||
timestamp: 86400,
|
||||
orderType: this.$globalConstVars.paymentType.serviceOrder, // 订单类型
|
||||
shopRecommendData: [], // 其他数据
|
||||
timer: {},
|
||||
timeData: {},
|
||||
}
|
||||
},
|
||||
@@ -295,8 +318,8 @@
|
||||
};
|
||||
this.$u.api.getServiceDetail(data).then(res => {
|
||||
if (res.status) {
|
||||
this.info = res.data;
|
||||
this.timestamp = res.data.timestamp;
|
||||
this.info = res.data.serviceInfo;
|
||||
this.timer = res.data.timer;
|
||||
} else {
|
||||
this.$u.toast(res.msg);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*page { background: #f6f7f9; }*/
|
||||
page, .bg-page { background: #f7f7f7; }
|
||||
page, .bg-page, .bg-main { background: #f7f7f7; }
|
||||
|
||||
|
||||
// nvue不能用标签命名样式,不能放在微信组件中,否则微信开发工具会报警告,无法使用标签名当做选择器
|
||||
|
||||
@@ -712,3 +712,12 @@ u-icon { line-height: 0; }
|
||||
.index-goods .goods { -webkit-column-break-inside: avoid; border-radius: 18rpx; break-inside: avoid; margin-bottom: 24rpx; width: 326rpx; }
|
||||
.coreshop-title-294 { width: 294rpx; }
|
||||
.coreshop-image-price-tags { height: 32rpx; margin-bottom: 4rpx; margin-right: 12rpx; vertical-align: middle; width: 98rpx; }
|
||||
|
||||
|
||||
|
||||
/*分割线*/
|
||||
.coreshop-divider { display: flex; flex-direction: row; flex-direction: row; align-items: center; margin: 5px 0 15px 0;
|
||||
.left { margin: 0; border-bottom-width: 1px; border-bottom-style: solid; width: 100%; transform: scaleY(0.5); border-color: #dcdfe6; flex: 1; vertical-align: middle; }
|
||||
.dot { font-size: 12px; margin: 0 12px; color: #c0c4cc; }
|
||||
.right { margin: 0; border-bottom-width: 1px; border-bottom-style: solid; width: 100%; transform: scaleY(0.5); border-color: #dcdfe6; flex: 1; vertical-align: middle; }
|
||||
}
|
||||
@@ -319,7 +319,7 @@ var allWidget = {
|
||||
"type": "pinTuan",
|
||||
"name": "拼团",
|
||||
"value": {
|
||||
"title": '活动名称',
|
||||
"title": '拼团活动名称',
|
||||
"limit": '10',
|
||||
"list": [
|
||||
{
|
||||
|
||||
@@ -22,10 +22,12 @@ using CoreCms.Net.Model.FromBody;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using CoreCms.Net.Utility.Extensions;
|
||||
using CoreCms.Net.Utility.Helper;
|
||||
using Essensoft.Paylink.Alipay.Domain;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SqlSugar;
|
||||
using static SKIT.FlurlHttpClient.Wechat.Api.Models.WxaAddNearbyPOIResponse.Types;
|
||||
|
||||
namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
{
|
||||
@@ -151,39 +153,66 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
{
|
||||
var jm = new WebApiCallBack();
|
||||
|
||||
var data = await _servicesServices.QueryByClauseAsync(p => p.id == entity.id);
|
||||
|
||||
if (data != null)
|
||||
var serviceInfo = await _servicesServices.QueryByClauseAsync(p => p.id == entity.id);
|
||||
if (serviceInfo == null)
|
||||
{
|
||||
var dt = DateTime.Now;
|
||||
TimeSpan ts = data.endTime.Subtract(dt);
|
||||
data.timestamp = (int)ts.TotalSeconds;
|
||||
jm.msg = "服务获取失败";
|
||||
return jm;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(data.consumableStore))
|
||||
{
|
||||
var consumableStoreStr = CommonHelper.GetCaptureInterceptedText(data.consumableStore, ",");
|
||||
var consumableStoreIds = CommonHelper.StringToIntArray(consumableStoreStr);
|
||||
if (consumableStoreIds.Any())
|
||||
{
|
||||
var stores = await _storeServices.QueryListByClauseAsync(p => consumableStoreIds.Contains(p.id));
|
||||
data.consumableStores = stores.Select(p => p.storeName).ToList();
|
||||
}
|
||||
}
|
||||
var dt = DateTime.Now;
|
||||
|
||||
if (!string.IsNullOrEmpty(data.allowedMembership))
|
||||
if (!string.IsNullOrEmpty(serviceInfo.consumableStore))
|
||||
{
|
||||
var consumableStoreStr = CommonHelper.GetCaptureInterceptedText(serviceInfo.consumableStore, ",");
|
||||
var consumableStoreIds = CommonHelper.StringToIntArray(consumableStoreStr);
|
||||
if (consumableStoreIds.Any())
|
||||
{
|
||||
var allowedMembershipStr = CommonHelper.GetCaptureInterceptedText(data.allowedMembership, ",");
|
||||
var allowedMembershipIds = CommonHelper.StringToIntArray(allowedMembershipStr);
|
||||
if (allowedMembershipIds.Any())
|
||||
{
|
||||
var userGrades = await _userGradeServices.QueryListByClauseAsync(p => allowedMembershipIds.Contains(p.id));
|
||||
data.allowedMemberships = userGrades.Select(p => p.title).ToList();
|
||||
}
|
||||
var stores = await _storeServices.QueryListByClauseAsync(p => consumableStoreIds.Contains(p.id));
|
||||
serviceInfo.consumableStores = stores.Select(p => p.storeName).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(serviceInfo.allowedMembership))
|
||||
{
|
||||
var allowedMembershipStr = CommonHelper.GetCaptureInterceptedText(serviceInfo.allowedMembership, ",");
|
||||
var allowedMembershipIds = CommonHelper.StringToIntArray(allowedMembershipStr);
|
||||
if (allowedMembershipIds.Any())
|
||||
{
|
||||
var userGrades = await _userGradeServices.QueryListByClauseAsync(p => allowedMembershipIds.Contains(p.id));
|
||||
serviceInfo.allowedMemberships = userGrades.Select(p => p.title).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
int openStatus;
|
||||
var lastTime = 0;
|
||||
if (serviceInfo.startTime > dt)
|
||||
{
|
||||
openStatus = (int)GlobalEnumVars.ServicesOpenStatus.notBegun;
|
||||
var ts = serviceInfo.startTime.Subtract(dt);
|
||||
lastTime = (int)ts.TotalSeconds;
|
||||
}
|
||||
else if (serviceInfo.startTime <= dt && serviceInfo.endTime > dt)
|
||||
{
|
||||
openStatus = (int)GlobalEnumVars.ServicesOpenStatus.begin;
|
||||
var ts = serviceInfo.endTime.Subtract(dt);
|
||||
lastTime = (int)ts.TotalSeconds;
|
||||
}
|
||||
else
|
||||
{
|
||||
openStatus = (int)GlobalEnumVars.ServicesOpenStatus.haveExpired;
|
||||
}
|
||||
|
||||
jm.status = true;
|
||||
jm.data = data;
|
||||
jm.data = new
|
||||
{
|
||||
serviceInfo,
|
||||
timer=new
|
||||
{
|
||||
openStatus,
|
||||
lastTime,
|
||||
}
|
||||
};
|
||||
return jm;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user