123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817 |
- <!DOCTYPE html>
- <html>
- <head>
- @include('home.soft.common.head')
- <link rel="stylesheet" href="/static/logo/font/iconfont.css">
- <style>
- body{
- color: #515a6e;
- font-family: Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,\\5FAE\8F6F\96C5\9ED1,Arial,sans-serif;
- }
- p{
- margin: 0;
- }
- /* 会员中心 */
- .vip-model {
- display: flex;
- flex-wrap: nowrap;
- justify-content: flex-start;
- font-size: 14px;
- }
- .v-left {
- width: 160px;
- border-right: 1px solid #ddd;
- text-align: center;
- }
- .v-left .v-name {
- font-size: 16px;
- font-weight: 600;
- margin-bottom: 10px;
- }
- .v-left .v-logo {
- width: 100px;
- height: 100px;
- border-radius: 100px;
- border: 1px solid #ddd;
- }
- .v-left .vip-interest {
- margin: 20px 0;
- line-height: 2.8;
- }
- .v-left .vip-title {
- font-size: 24px;
- font-weight: 600;
- color: #ed4014;
- }
- .v-right {
- flex: 1;
- padding: 0 16px;
- }
- .vip-list {
- display: flex;
- flex-wrap: nowrap;
- justify-content: space-between;
- }
- .vip-list .vip-item {
- width: 130px;
- border: 1px solid #ddd;
- border-radius: 10px;
- text-align: center;
- padding-bottom: 10px;
- cursor: pointer;
- margin-bottom: 12px;
- position: relative;
- }
- .vip-list .vip-item.active{
- color: #fabf64;
- background-color: #4c4c50;
- }
- .vip-list .vip-item.active .vip-red{
- color: #fabf64;
- }
- .vip-list .vip-name {
- font-size: 16px;
- padding: 10px 0;
- }
- .vip-list .vip-price {
- font-size: 14px;
- margin-bottom: 15px;
- }
- .vip-list .vip-market-price {
- margin-left: 10px;
- text-decoration: line-through;
- opacity: 0.8;
- }
- .vip-list .price-value {
- font-size: 26px;
- font-weight: 600;
- margin-left: 3px;
- }
- .vip-list .vip-desc {
- color: #999;
- font-size: 12px;
- }
- .vip-list .vip-red {
- color: #e12424;
- font-weight: 600;
- }
- .vip-tips {
- color: #999;
- font-size: 12px;
- margin-bottom: 12px;
- }
- .pay-line, .pay-type {
- display: flex;
- flex-wrap: nowrap;
- justify-content: flex-start;
- line-height: 35px;
- }
- .pay-item {
- border: 1px solid #ddd;
- padding: 0 15px;
- border-radius: 5px;
- cursor: pointer;
- height: 35px;
- margin-right: 15px;
- }
- .pay-type .active {
- border: 1px solid #e12424;
- color: #e12424;
- }
- .pay-item .iconfont {
- margin-right: 5px;
- }
- .pay-item .icon-zhifubaozhifu {
- color: #027AFF;
- }
- .pay-item .icon-weixinzhifu {
- color: #62b900;
- }
- .pay-cont {
- padding: 10px 0;
- display: flex;
- flex-wrap: nowrap;
- justify-content: flex-start;
- }
- .pay-cont .pay-img {
- width: 150px;
- height: 150px;
- background-color: #eee;
- position: relative;
- }
- .pay-cont .pay-desc {
- padding: 20px;
- line-height: 2.2;
- font-size: 14px;
- }
- .pay-cont .iconfont {
- vertical-align: middle;
- font-size: 16px;
- margin: 0 5px 0 10px;
- }
- .iconfont {
- vertical-align: middle;
- }
- .dis-agreement {
- display: none;
- text-align: center;
- height: 140px;
- line-height: 140px;
- font-size: 18px;
- font-weight: 600;
- color: #ed4014;
- }
- .pay-agreement span {
- font-size: 12px;
- color: #999;
- margin: 0 !important;
- }
- .agreement-txt {
- cursor: pointer;
- }
- .agreement-txt:hover {
- color: #ed4014;
- }
- .money-color {
- color: #ed4014;
- font-size: 22px;
- font-weight: 600;
- }
- .vip-banner {
- background-color: #eee;
- height: 60px;
- width: 100%;
- margin-bottom: 15px;
- }
- .font-12{
- font-size: 12px !important;
- }
- .font-13{
- font-size: 13px !important;
- }
- .open-member{
- width: 100px;
- height: 24px;
- border-radius: 24px;
- vertical-align: middle;
- cursor: pointer;
- margin-right: 10px;
- }
- .vip-top{
- height: 80px;
- background: url('/static/logo/v-topbg.png') no-repeat center center;
- margin: 0 0 16px 0;
- display: flex;
- flex-wrap: nowrap;
- justify-content: flex-start;
- padding: 15px 40px;
- color: #f8f8f8;
- }
- .vip-top .vt-logo{
- width: 50px;
- height: 50px;
- border-radius: 50px;
- border: 1px solid #eee;
- margin-right: 15px;
- }
- .vip-top .vt-name{
- font-size: 16px;
- font-weight: 600;
- padding-top: 5px;
- margin: 0;
- }
- .il-vip{
- width: 95px;
- height: 30px;
- margin-top: 40px;
- margin-bottom: 10px;
- }
- .il-interest{
- margin-top: 60px;
- line-height: 2.5;
- padding-left: 50px;
- text-align: left;
- font-size: 13px;
- position: relative;
- }
- .il-interest:before{
- position: absolute;
- content: '';
- top: -45px;
- width: 80%;
- height: 1px;
- background-color: #dedede;
- left: 0;
- right: 0;
- margin: auto;
- }
- .i-cost{
- position: absolute;
- width: 60px;
- top: -7px;
- right: 0;
- }
- .member-model {
- line-height: 1.8;
- padding: 10px;
- display: none;
- position: absolute;
- left: 0;
- top: 0;
- z-index: 3;
- background-color: #fff;
- }
- .member-model .member-btn {
- text-align: right;
- margin-top: 20px;
- }
- .agreement-content{
- height: 557px;
- overflow: auto;
- text-indent: 2em;
- }
- .agreement-content .font-600{
- font-weight: 600;
- font-size: 18px;
- }
- .member-btn button{
- background-color: #fff;
- border: 1px solid transparent;
- border-color: #dcdee2;
- font-size: 14px;
- border-radius: 4px;
- padding: 0 15px;
- height: 32px;
- color: #515a6e;
- }
- .member-btn button:hover{
- border-color: #2d8cf0;
- color: #2d8cf0;
- }
- .i-cost{
- position: absolute;
- width: 60px;
- top: -7px;
- right: 0;
- }
- .coupon-modal{
- position: absolute;
- bottom: 0;
- right: 0;
- background: #ed4014;
- padding: 20px;
- z-index: 2;
- font-size: 12px;
- color: #999;
- border-radius: 10px;
- display: none;
- }
- .coupon-bg{
- background: #fff;
- border-radius: 10px;
- padding: 10px 20px;
- }
- .coupon-price{
- color: #ed4014;
- font-size: 26px;
- font-weight: 600;
- }
- .coupon-desc{
- font-size: 14px;
- }
- .coupon-tips{
- border-top: 1px dashed #ddd;
- margin-top: 10px;
- padding-top: 10px;
- font-size: 12px;
- }
- .coupon-close{
- position: absolute;
- left: 0px;
- top: 0;
- line-height: 1;
- color: #fff;
- font-size: 30px;
- transform: rotateZ(45deg);
- cursor: pointer;
- }
- </style>
- </head>
- <body>
- <div class="vip-top">
- <img src="{{ $userInfo->avatar ?: "/static/logo.png"}}" class="vt-logo" />
- <div class="font-12">
- <p class="vt-name">{{ $userInfo->username }}</p>
- <span>会员有效期:</span>
- @if($billInfo['validity_type'] == 2)
- <span>永久有效</span>
- @elseif($billInfo['validity_type'] == 1)
- <span>{{ $billInfo['validity_end_time'] }}</span>
- @else
- <span>非VIP会员</span>
- @endif
- </div>
- </div>
- <div class="vip-model">
- <div class="v-left">
- <img src="/static/logo/i-vip.png" class="il-vip" />
- <p class="v-name">会员尊享</p>
- <p>多项特权开通即享</p>
- <ul class="il-interest">
- <li>没有官方水印</li>
- <li>不限功能使用</li>
- <li>不限电脑设备</li>
- <li>永久免费升级</li>
- <li>专业技术支持</li>
- </ul>
- </div>
- <div class="v-right">
- @if(isset($ad) && $ad->logo)
- <div class="vip-banner">
- <img src="{{$ad->logo}}" style="width: 100%; height: 100%;"/>
- </div>
- @endif
- <div class="vip-list">
- @if($productInfo && $productInfo->price4)
- <div id="vip_item4" class="vip-item active" onclick="selectTerm(4,{{ $productInfo->price4 }})">
- <img src="/static/logo/i-cost.png" class="i-cost" />
- <div class="vip-name">永久</div>
- <div>
- <p class="vip-price">
- ¥<span class="price-value" id="permanentPrice">{{ floatval($productInfo->price4) + 10 }}</span>
- @if($productInfo->market_price4)
- <span class="vip-market-price">¥{{ floatval($productInfo->market_price4) }}</span>
- @endif
- </p>
- <p class="vip-desc vip-red">
- {{ $productInfo->desc_price4 ?: "超划算,热销中" }}
- </p>
- </div>
- </div>
- @endif
- @if($productInfo->price1)
- <div id="vip_item1" class="vip-item" onclick="selectTerm(1,{{ $productInfo->price1 }})">
- <img src="/static/logo/i-cost.png" class="i-cost" />
- <div class="vip-name">一个月</div>
- <div>
- <p class="vip-price">
- ¥<span class="price-value">{{ floatval($productInfo->price1) }}</span>
- @if($productInfo->market_price1)
- <span class="vip-market-price">¥{{ floatval($productInfo->market_price1) }}</span>
- @endif
- </p>
- <p class="vip-desc vip-red">
- {{ $productInfo->desc_price1 ?: "有效期一个月" }}
- </p>
- </div>
- </div>
- @endif
- @if($productInfo->price2)
- <div id="vip_item2" class="vip-item" onclick="selectTerm(2,{{ $productInfo->price2 }})">
- <img src="/static/logo/i-sale.png" class="i-cost" />
- <div class="vip-name">半年</div>
- <div>
- <p class="vip-price">
- ¥<span class="price-value">{{ floatval($productInfo->price2) }}</span>
- @if($productInfo->market_price2)
- <span class="vip-market-price">¥{{ floatval($productInfo->market_price2) }}</span>
- @endif
- </p>
- <p class="vip-desc">
- {{ $productInfo->desc_price2 ?: "有效期半年" }}
- </p>
- </div>
- </div>
- @endif
- @if($productInfo->price3)
- <div id="vip_item3" class="vip-item" onclick="selectTerm(3,{{ $productInfo->price3 }})">
- <img src="/static/logo/i-sale.png" class="i-cost" />
- <div class="vip-name">一年</div>
- <div>
- <p class="vip-price">
- ¥<span class="price-value">{{ floatval($productInfo->price3) }}</span>
- @if($productInfo->market_price3)
- <span class="vip-market-price">¥{{ floatval($productInfo->market_price3) }}</span>
- @endif
- </p>
- <p class="vip-desc">
- {{ $productInfo->desc_price3 ?: "有效期一年" }}
- </p>
- </div>
- </div>
- @endif
- <!-- @if($productInfo->price5)
- <div id="vip_item5" class="vip-item" onclick="selectTerm(5,{{ $productInfo->price5 }})">
- <div class="vip-name">7天会员</div>
- <div>
- <p class="vip-price">
- ¥<span class="price-value">{{ $productInfo->price5 }}</span>
- </p>
- <p class="vip-desc">
- {{ $productInfo->desc_price5 ?: "限时特价" }}
- </p>
- </div>
- </div>
- @endif -->
- </div>
- <p class="vip-tips">温馨提示:VIP会员到期后将直接转为非VIP会员</p>
- <p class="pay-line">
- 优惠券:<span id="coupon-price">10元</span> <span id="btn-coupon" style="color:#999; text-decoration: underline; font-size:12px; margin-left:15px;cursor: pointer;" onclick="showCoupon(true)">查看优惠券</span>
- </p>
- <p class="pay-line">
- 支付金额:<span id="payMoney" class="money-color">0</span>元
- </p>
- <div class="pay-line">
- <p>支付方式:</p>
- <div class="pay-type">
- <div id="payWechat" class="pay-item active" onclick="selectPaytype('wechat')">
- <span class="iconfont icon-weixinzhifu"></span>微信支付
- </div>
- <div id="payAlipay" class="pay-item" onclick="selectPaytype('alipay')">
- <span class="iconfont icon-zhifubaozhifu"></span>支付宝支付
- </div>
- </div>
- <div class="pay-agreement">
- <label>
- <input type="checkbox" checked id="payCheck" onclick="checkPayBox(this)"/>
- </label>
- <span>同意并接受</span>
- <span class="agreement-txt" onclick="agreementModel(true)">《软件会员增值服务协议》</span>
- </div>
- </div>
- <div id="dis-agreement1" class="pay-cont">
- <div class="spinner-border m-5" role="status" id="spinnerShow">
- <span class="visually-hidden">Loading...</span>
- </div>
- <div id="qrcode" class="pay-img" style="display: none"></div>
- <div class="pay-desc">
- <div>
- <span class="iconfont icon-saoma1"></span> 请打开微信/支付宝扫一扫
- </div>
- <div>
- <span class="iconfont icon-erweima1"></span> 扫描左侧二维码
- </div>
- <div>
- <span class="iconfont icon-wancheng1"></span> 请完成支付
- </div>
- </div>
- </div>
- <div id="dis-agreement2" class="dis-agreement">请同意服务协议后方可购买产品</div>
- </div>
- </div>
- <div class="member-model" id="member-model">
- <div class="agreement-content">
- <p>尊敬的用户您好:</p>
- <p>欢迎使用助友办公软件会员增值服务协议,为使用助友办公软件会员增值服务(简称为:本服务),您应当阅读《助友办公软件会员增值服务协议》(简称为:本协议)。请您务必审慎阅读、充分理解各条款内容,特别是免除或限制责任的相应条款。</p>
- <p>除非您已阅读并接受本协议所有条款,否则您无权使用本服务。您对本服务的任何购买使用行为即视为您已阅读并同意本协议的约束。如果您未满18周岁,请在法定监护人的陪同下阅读本协议。</p>
- <p>本协议是用户与苏州助友办公软件有限公司(简称为:助友办公)之间关于用户加入成为助友办公软件会员且使用助友办公相关软件以及服务所订立的协议。本协议描述助友办公与会员之间关于软件许可以及服务使用及相关方面的权利义务。助友办公软件服务涉及到的助友办公产品的所有权以及相关软件的知识产权归助友办公所有。</p>
- <p class="font-600">一、关于本服务</p>
- <p>1.会员增值服务费,指用户按照助友办公指定方式支付一定费用后,用户可以享有由助友办公软件提供的应用软件。助友办公可能会根据本服务的整体规划,对本服务的收费标准、增值服务内容进行修改和变更。</p>
- <p>2.本服务可通过会员账号在任意一台电脑上使用软件,但一个账号同一时间只能在一台电脑上使用。</p>
- <p class="font-600">二、用户禁止行为</p>
- <p>1.用户使用本服务的权利是个人的,不允许对账户进行出租、出售等,或其他利用账户进行牟利的行为,若有相关滥用行为,我方有权单方面暂停、禁止账户相关功能。</p>
- <p class="font-600">三、退款声明</p>
- <p>为了避免购买本产品后引起纠纷,用户可在购买本服务前,对产品进行下载试用,看软件具体的使用效果,软件已提供免费试用,购买本服务则同意了助友办公会员增值服务协议/已试用软件/认可软件,故本公司不接受用户退款申请。</p>
- <p class="font-600">四、争议解决</p>
- <p>若您和助友办公之间发生任何纠纷或争议,首先应友好协商解决;协商不成的,您同意将纠纷或争议提交助友办公所在地法院管辖。</p>
- <p>本《协议》的一切解释权与修改权归助友办公。</p>
- </div>
- <div class="member-btn">
- <Button style="margin:0 10px;" onclick="agreementModel(false);">返回购买</Button>
- </div>
- </div>
- <div class="coupon-modal" id="coupon-modal">
- <div class="coupon-bg">
- <span class="coupon-close" onclick="showCoupon(false)">+</span>
- <div>
- <span style="color:#ed4014;">¥</span><span class="coupon-price">10</span> <span class="coupon-desc">满{{ floatval($productInfo->price4) + 10 }}元可用</span>
- </div>
- <div class="coupon-time">有效期至<span id="coupon-time">2022-12-31 13:66:24</span></div>
- <div class="coupon-tips">新人有礼活动,仅适用于本软件</div>
- </div>
- </div>
- <script type="text/javascript" src="/static/js/qrcode.js"></script>
- <script>
- let buyContext;
- let target = '{{ $target }}';
- let agentMid = '{{$agentMid}}';
- let token = '{{$token}}';
- let pay_type = "wechat";
- let sku_type = 4;
- let pmid = "{{ $productInfo->mid }}";
- let permanentPrice = "{{floatval($productInfo->price4)}}";
- // 设置允许跨域
- axios.defaults.withCredentials = false;
- // 默认金额
- document.getElementById("payMoney").innerText = "{{ floatval($productInfo->price4) }}"
- function selectTerm(type, price) {
- sku_type = type;
- document.getElementById("payMoney").innerText = price
- // 其他的去除
- let vipItem1 = document.getElementById("vip_item1").getAttribute("class").replace("active", " ");
- document.getElementById("vip_item1").setAttribute("class", vipItem1);
- let vipItem2 = document.getElementById("vip_item2").getAttribute("class").replace("active", " ");
- document.getElementById("vip_item2").setAttribute("class", vipItem2);
- let vipItem3 = document.getElementById("vip_item3").getAttribute("class").replace("active", " ");
- document.getElementById("vip_item3").setAttribute("class", vipItem3);
- let vipItem4 = document.getElementById("vip_item4").getAttribute("class").replace("active", " ");
- document.getElementById("vip_item4").setAttribute("class", vipItem4);
- let classVal = document.getElementById("vip_item" + type).getAttribute("class");
- document.getElementById("vip_item" + type).setAttribute("class", classVal.concat(" active"))
- //创建支付二维码
- createPayCode();
- }
- // 创建支付二维码
- createPayCode();
- // 账户登录信息
- getUserInfo();
- function createPayCode() {
- document.getElementById('spinnerShow').style.display = ""
- document.getElementById("qrcode").innerHTML = ""
- document.getElementById('qrcode').style.display = "none"
- let data = {
- agent_mid: agentMid,
- type: sku_type,
- pay_type: pay_type
- }
- axios.post(target + '/api/pay/getPayCode/' + pmid, data, {headers: {Authorization: token}}).then(function (response) {
- if (!response.data.error) {
- let code = response.data.result;
- createQrcode(code);
- }
- }).catch(function (error) {
- console.log(error);
- });
- }
- // 设置支付类型
- function selectPaytype(type) {
- pay_type = type
- if (type === 'wechat') {
- let str = document.getElementById("payAlipay").getAttribute("class").replace("active", " ")
- document.getElementById("payAlipay").setAttribute("class", str);
- let classVal = document.getElementById("payWechat").getAttribute("class");
- document.getElementById("payWechat").setAttribute("class", classVal.concat(" active"))
- } else {
- let str = document.getElementById("payWechat").getAttribute("class").replace("active", " ");
- document.getElementById("payWechat").setAttribute("class", str);
- let classVal = document.getElementById("payAlipay").getAttribute("class");
- document.getElementById("payAlipay").setAttribute("class", classVal.concat(" active"))
- }
- //创建支付二维码
- createPayCode();
- }
- // 创建二维码
- function createQrcode(code) {
- var qrcode = new QRCode("qrcode", {
- text: "https://www.qasimblog.com/soft/pay/" + code,
- width: 150,
- height: 150
- });
- document.getElementById('qrcode').style.display = ""
- document.getElementById('spinnerShow').style.display = "none"
- // 开始检测支付扫描
- startScan(code);
- }
- let payScanInterval;
- let payEndInterval;
- function startScan(code) {
- if (payScanInterval) {
- clearInterval(payScanInterval);
- }
- if (payEndInterval) {
- clearInterval(payEndInterval);
- }
- payScanInterval = setInterval(() => {
- axios.post(target + '/api/pay/checkPayScan/' + code, {}, {headers: {Authorization: token}}).then((response) => {
- if (!response.data.error) {
- // 提示消息,扫描成功
- // 开始检测支付
- clearInterval(payScanInterval);
- startCheckPayEnd(code);
- }
- }).catch(function (error) {
- console.log(error);
- });
- }, 1000);
- }
- // 开始检测支付
- function startCheckPayEnd(code) {
- if (payEndInterval) {
- clearInterval(payEndInterval);
- }
- payEndInterval = setInterval(() => {
- axios.post(target + '/api/pay/checkPayEnd/' + code, {product_type: 1}, {headers: {Authorization: token}}).then((response) => {
- if (!response.data.code === 0 || !response.data.error) {
- // 关闭定时器
- clearInterval(payEndInterval);
- // 支付完成
- window.top.postMessage('paySuccess', '*');
- }
- }).catch(function (error) {
- console.log(error);
- });
- }, 1000);
- }
- // 获取用户信息
- function getUserInfo() {
- axios.post(target + '/api/login/getUserInfo', {}, {headers: {Authorization: token}}).then(function (response) {
- if (!response.data.error) {
- let userInfo = response.data.result;
- let nowDate = new Date().getTime() / 1000;
- document.getElementById('coupon-time').innerText = formatTime(Number(userInfo.created_at)+86400);
- document.getElementById('btn-coupon').style.display = 'block';
- if(Number(userInfo.created_at) + 86400 < Number(nowDate)){ // 注册时间超过1天
- document.getElementById('coupon-price').innerText = '暂无可用优惠券';
- document.getElementById('btn-coupon').style.display = 'none';
- document.getElementById('permanentPrice').innerHTML = permanentPrice;
- }else{
- document.getElementById('coupon-modal').style.display = "block";
- }
- }
- }).catch(function (error) {
- });
- }
- function checkPayBox(e){
- document.getElementById('dis-agreement1').style.display = "none";
- document.getElementById('dis-agreement2').style.display = "none";
- if(!e.checked){
- document.getElementById('dis-agreement2').style.display = "block"
- }else{
- document.getElementById('dis-agreement1').style.display = "flex";
- }
- }
- function agreementModel(e){
- if(e){
- document.getElementById('member-model').style.display = "block";
- }else{
- document.getElementById('member-model').style.display = "none";
- }
- }
- function showCoupon(e){
- if(e){
- document.getElementById('coupon-modal').style.display = "block";
- }else{
- document.getElementById('coupon-modal').style.display = "none";
- }
- }
- function formatTime(str){
- let date = new Date(str*1000);
- const year = date.getFullYear();
- const month = date.getMonth() + 1;
- const day = date.getDate();
- const hour = date.getHours();
- const minute = date.getMinutes();
- const second = date.getSeconds();
- return [year, month, day].map(formatNumber).join('-') + ' ' + [hour, minute, second].map(formatNumber).join(':');
- }
- function formatNumber(n) {
- n = n.toString();
- return n[1] ? n : '0' + n;
- }
- </script>
- </body>
- </html>
|