You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

453 lines
17 KiB
HTML

<extend name="Public/bases2" />
<block name="css">
<link href="__CSS__/game.css" rel="stylesheet" >
<link href="__CSS__/trade.css" rel="stylesheet" >
<style>.header-btn .xg-back {
display: block;
position: absolute;
top: 0px;
left: 0px;
width: 4rem;
height: 4rem;
background: url(__IMG__/trade1/btn_left_n@3x.png) no-repeat center center / 2rem 2rem;
}
.header-btn .trade_caption {font-size:1.55rem;padding:0.9rem 0.9rem;}
.confirm_btn.disabled {background:#bbb} .xgdisabled {background:#c1c3c1;}
.pop-window .pop-table {
position:relative;height:100%;display:table;
}
.pop-window .pop-table .pop-wrap {display:table-cell;vertical-align:middle;}
.pop-table .del_box {width:58vw;max-width:410px;margin:0 auto;background:#FFF;border-radius:1.5vw;font-size:2rem;}
.pop-table .del_box p{padding:2vw;text-align:center;margin:0;}
.pop-table .del_box .del_btn_box,.changeprice_btn_box {clear:both;overflow:hidden;}
.pop-table .changeprice_btn_box {border-top: 1px solid #e7e7e9;}
.changeprice_box span {padding:0.6rem 0 .6rem;}
.pop-table .del_box .del_btn_box a,.changeprice_btn_box span {width:50%;float:left;text-align:center;}
.pop-table .del_box .del_btn_box a,.changeprice_btn_box a {line-height:9vw;color:rgb(25,177,234);background:#FFF;}
.pop-table .del_box .del_btn_box a,.pop-table .changeprice_btn_box a {
color: #3478f7;
background-color:#fff;
}
.pop-table .del_box .del_btn_box a {height: 4rem;line-height: 4rem;border-top: 1px solid #e7e7e9;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 20px;}
.pop-table .changeprice_btn_box a {height:3.5rem;line-height:3.5rem;}
.pop-table .del_box .del_btn_box a:last-child,.pop-table .changeprice_btn_box span{
border-left:1px solid #e7e7e9;
border-bottom-left-radius: 0;
}
.pop-table .changeprice_btn_box a{display:inline-block;width:60%;}
.pop-table .changeprice_box {margin:0 auto;background:#FFF;font-size:2rem;}
.pop-table .changeprice_box_body{padding:3.5vw;}
.pop-table .changeprice_input_wrap {padding:2.5vw 0;}
.pop-table .changeprice_input {border:none;width:78%;font-size:inherit;outline:none;padding:.1rem .5rem;box-sizing:border-box;margin-top:-.2rem;}
.pop-table .changeprice_box p {font-size:1.5rem;color:#bcbcbc;text-align:center;}
.p_img:last-child {
margin-bottom: 3rem;
}
.relevant .relevant_title {line-height:4rem;height:4rem;overflow:hidden;clear:both;position:relative;}
.relevant .relevant_title a {position:absolute;height:100%;right:0;top:0;}
.relevant .icon-go {display: inline-block;
margin-left: 0.42rem;margin-top:-.1rem;
vertical-align: sub;
height: 1.2rem;
width: .63rem;
background: url(__IMG__/trade1/icon_xiala2.png) no-repeat center center;
background-size: 100% 100%;}
@media screen and (max-width:640px) {
.pop-table .del_box,.pop-table .changeprice_box {font-size:1.2rem;}
.pop-table .del_box p {padding:3.5vw;}
.pop-table .changeprice_box p {font-size:1rem;}
.pop-table .changeprice_input {width:82%;padding: .1rem .5rem;}
.pop-table .good-info-desc {margin-top:0.1rem;margin-bottom:1.8rem;}
.pop-table .good-info-tags {padding:0.01rem 0.2rem;font-size:1.2rem;}
.pop-table .del_box .del_btn_box a, .pop-table .changeprice_btn_box a {line-height:2.6rem;height:2.6rem;}
}
</style>
<script src="__JS__/lwx.js"></script>
</block>
<block name="body" >
<!--头部-->
<div class="zmarg_btm59">
<header class="header trade-header">
<div class="">
<a href="javascript:;" onclick="history.back(-1);" class="go_back">
<span class="table">
<span class="table-cell">
<img class="img_goback" src="__IMG__/trade/btn_normal_back@3x.png" alt="" height="" width="">
</span>
</span>
</a>
<h1 class="trade_caption">商品详情</h1>
</div>
</header>
<div class="xg_main clearfix">
<div class="t-list gd-t-list">
<div class="content gift-content pad_b0">
<empty name="data">
<div class="no_data">
<div class="nodata_content">
<img class="nodata_img" src="__IMG__/trade/icon_shangpin@3x.png" alt="" height="" width="">
<p class="nodata_txt">暂无此商品,逛逛其他地方吧~</p>
</div>
</div>
<else />
<div class="xg_version">
<div class="media">
<div class="media-left media-middle">
<a href="javsccript:;" class="a_version">
<img class="media-object img_version" src="__IMG__/trade/pic_1@3x.png" alt="">
</a>
</div>
<div class="media-body">
<h4 class="media-heading font_h">{$data.game_name}</h4>
<p class="meader_txt">
<span>{$data.game_size}</span>
<span>{$data.game_type_name}</span>
</p>
</div>
<!--<div class="media-right media-middle">-->
<!--<a href="{:U('Game/detail',array('id'=>$data['game_id']))}" class="a_download">下载</a>-->
<!--</div>-->
</div>
</div>
<div class="border_div"></div>
<div class="trumpt">
<div class="trumpt_top z_clearfix">
<div class="trumpt_tl">
<div class="trump_line">
<switch name="data.status">
<case value="3"><span class="tl_t_tit">上架:</span>
<span class="span_des">{$data.online_time|date='m-d H:i',###}</span>
</case>
<case value="1"><span class="tl_t_tit">成交:</span>
<span class="span_des">{$data.over_time|date='m-d H:i',###}</span>
</case>
<case value="0">等待客服审核</case>
<case value="2">审核未通过</case>
<case value="6">已购买</case>
</switch>
</div>
<div class="trump_line">
<span class="tl_t_tit">小号:</span>
<span class="span_des">{$data.small_account}</span>
</div>
<div class="trump_line">
<span class="tl_t_tit">区服:</span>
<span class="span_des">{$data.server_name}</span>
</div>
</div>
<div class="trumpt_tr">
<div class="trump_line price">售价</div>
<div class="trump_line price_num">¥{$data.price}</div>
<div class="trump_line">&nbsp;</div>
</div>
</div>
<div class="border_div1"></div>
<div class="trumpt_botm">
<span class="trump_des">此小号已创建{$data.day}天,累充{$data.accumulation}</span>
<switch name="data.status"><case value="3"><a class="trump_abtn">信息已审核</a></case><case value="2"><a class="trump_abtn">审核未通过</a></case><case value="4"><a class="trump_abtn">已出售</a></case><case value="6"><a class="trump_abtn">已购买</a></case><case value="1"><a class="trump_abtn">已出售</a></case></switch>
</div>
</div>
<div class="border_div"></div>
<div class="screenshot">
<h3 class="screenshot_h">{$data.title}</h3>
<p class="screenshot_p">{$data.content}</p>
<div id="screenshotbox" class="clearfix">
<volist name=":explode(',',$data['screenshot'])" id="vo">
<p class="p_img"><img class="" src="{$vo|get_cover='path'}" height="" width=""></p>
</volist>
</div>
</div>
<notempty name="relevant">
<div class="border_div"></div>
<div class="relevant">
<div class="relevant_title"><span><span style="color:#171717">{$data.game_name}</span>的相关商品</span><a href="{:U('Trade/index',array('game_id'=>$data['game_id']))}">更多<i class="icon-go"></i></a></div>
<div style="padding: 1.5rem 1.5rem 4rem;">
<ul class="">
<volist name="relevant" id="vo">
<li class="z_game_detailli" onclick="window.location.href='{$vo.url}'">
<p class="z_date">{$vo.online_time}</p>
<div class="media">
<div class="media-left">
<a href="#">
<img class="media-object trade_img" src="<notempty name='vo.icon'>{$vo.icon}<else />__IMG__/pic_game@3x.png</notempty>" alt="...">
</a>
</div>
<div class="media-body">
<h4 class="media-heading col_17">{$vo.title}</h4>
<p class="z_clearfix z_detailp">
<span class="game_btn">{$vo.game_name}</span>
<span class="z_pays">¥{$vo.price}</span>
</p>
</div>
</div>
</li>
</volist>
</ul>
</div>
</div>
</notempty>
<div style="line-height:4rem;height:4rem;"></div>
<style>
.operation_box {position:fixed;height:4rem;line-height:4rem;background:#f2f2f2;z-index:99;bottom:0;left:0;right:0;width:100%;
max-width: 640px;
margin: 0 auto;
}
.operation_wrap {padding:0 1.5rem;}
.operation_btn_wrap {float:right;}
.operation_btn {
min-width: 5rem;
display: inline-block;
text-align: center;
height: 2.4rem;
line-height: 2.4rem;
background-color: #fff;
border-radius: 20px;
padding:0 1rem;
}
.operation_btn:first-child{
margin-right:0.5rem;
}
</style>
<div class="operation_box">
<div class="operation_wrap">
<switch name="data.status">
<case value="3">
<span class="operation_status">出售中</span>
<span class="operation_btn_wrap">
<a href="javascript:;" class="operation_btn jschangeprice" data-id="{$data.id}" data-price="{$data.price}">改价</a>
<a href="javascript:;" class="operation_btn jsoffline" data-id="{$data.id}">下架</a>
</span>
</case>
<case value="1"><span class="operation_status">已出售</span></case>
<case value="4"><span class="operation_status">已出售</span></case>
<case value="0">
<span class="operation_status">待审核</span>
<span class="operation_btn_wrap">
<a href="javascript:;" class="operation_btn jsmodify" data-id="{$data.id}">修改</a>
<a href="javascript:;" class="operation_btn jsoffline" data-id="{$data.id}">下架</a>
</span>
</case>
<case value="2">
<span class="operation_status">审核未通过</span>
<span class="operation_btn_wrap">
<a href="javascript:;" class="operation_btn jsmodify" data-id="{$data.id}">修改</a>
</span>
</case>
<case value="6">
<span class="operation_status">已购买</span>
<span class="operation_btn_wrap">
<a href="javascript:;" class="operation_btn jsuseing" data-id="{$data.id}" style="color: #19b1ea;">如何使用</a>
</span>
</case>
</switch>
</div>
</div>
</empty>
</div>
</div>
</div>
</div>
</div>
<div id="store_data" data-rate="{:set_zero_on_number(C('withdraw.sell_rate'))}" data-sell-price="{:add_two_number(C('withdraw.sell'),C('withdraw.poundage'))}" data-low="{:set_zero_on_number(C('withdraw.poundage'))}"></div>
<div class="popmsg pop-dialog"></div>
<div class="popwin2 pop-window" style="background:#FFF;"><div class="pop-page"><div class="pop-wrap"></div></div></div>
<div class="popwin pop-window"><div class="pop-table"><div class="pop-wrap"></div></div></div>
<script src="__JS__/pop.lwx.min.js"></script>
<script>
$(function() {
var first = $('#screenshotbox .p_img:eq(0) img');console.log(first);
if(first && first.width()<first.height()) {
$('#screenshotbox .p_img').css({width:'50%',float:'left'}).find('img').css({width:'98%'});
$('#screenshotbox .p_img:nth-child(2n)').css({'text-align':'right'});
}
$('.footer').hide();
$('.zmarg_btm59').css('margin-bottom',0);
$('.content').css({'min-height':($(window).height()-$(".header").height()-$(".foot-nav").height()-16)});
$(".no_data").css({'height':($('.content').height())});
var pmsg = $(".popmsg").pop();
var popwin2 = $(".popwin").pop();
var popwin = $(".popwin2").pop();
$("body").delegate('.jsdown','click',function(){
var url = $(this).attr('url');
$.ajax({
url:url,
type:"get",
dataType:"json",
data:{},
success:function(result){
if(result.status == 0){
pmsg.msg(result.info);
}else{
location.href=result.url;
return false;
}
},
error:function(){
alert("服务器异常");
}
})
});
$('.jsoffline').click(function() {
var that = $(this);var id = that.attr('data-id');
popwin2.open(300,'<div class="del_box"><p>确定下架商品吗?</p><div class="del_btn_box"><a href="javascript:;" class="cancel_btn">暂不下架</a><a href="javascript:;" class="confirm_btn">下架</a></div></div>');
popwin2.find('.cancel_btn').click(function() {
popwin2.close();
return false;
});
popwin2.find('.confirm_btn').click(function() {
if(that.hasClass('disabled')) {return false;}
that.addClass('disabled');
popwin2.close();
$.ajax({
type:'post',
dataType:'json',
url:'{:U("offline_record")}',
data:{id:id},
success:function(data){
if(parseInt(data.status)==1) {
pmsg.msg(data.info);
setTimeout(function(){
that.closest('.jsgood_info').remove();
},2000);
} else {
pmsg.msg(data.info);
that.removeClass('disabled');
}
},
error:function(){pmsg.msg('服务器故障,请稍后再试');that.removeClass('disabled');},
});
return false;
});
return false;
});
$('.jschangeprice').click(function() {
var that = $(this);var id = that.attr('data-id');
if(that.hasClass('disabled')) {return false;}
that.addClass('disabled');
var price = that.attr('data-price');
var store_data = $('#store_data');
var rate = store_data.attr('data-rate');
var poundage = store_data.attr('data-low');
var sellprice = store_data.attr('data-sell-price');
var get = (price*(100-rate)/100).toFixed(2);
popwin2.find('.pop-wrap').css({'vertical-align':'bottom'})
popwin2.open(300,'<div class="changeprice_box"><div class="changeprice_box_body"><div class="changeprice_input_wrap"><span class="changeprice_prifix">修改价格</span><input type="text" class="changeprice_input" id="new_price" value="'+price+'">元</div><p>(手续费<span>'+(rate)+'</span>%,最低<span>'+(poundage)+'</span>元)出售可得<span style="color:rgb(217, 63, 48);" id="get_price">'+(get)+'</span>金币</p></div><div class="changeprice_btn_box"><span><a href="javascript:;" class="cancel_btn">取消</a></span><span><a href="javascript:;" class="confirm_btn">确定</a></span></div></div>');
popwin2.find('#new_price').keyup(function() {
var val = $.trim($(this).val());
if (!val) {pmsg.msg('请输入修改价格');return false;}
if (!/^[1-9]\d*(\.(\d{0,2})?)?$/.test(val)) {$(this).val('');pmsg.msg('修改价格错误');return false;}
var getprice = $('#get_price');
if(val*rate <= poundage*100) {
if(val>=sellprice && val >0) {
var coin = (val*(100-rate)/100).toFixed(2);
getprice.text(coin);
} else {
pmsg.msg('修改价格不低于'+sellprice+'元');return false;
}
} else {
var coin = (val*(100-rate)/100).toFixed(2);
getprice.text(coin);
}
return false;
});
popwin2.find('.cancel_btn').click(function() {
popwin2.close(300);that.removeClass('disabled');
setTimeout(function() {
popwin2.find('.pop-wrap').css({'vertical-align':'middle'});
},310);
return false;
});
popwin2.find('.confirm_btn').click(function() {
var val = $.trim($('#new_price').val());
if(!val) {pmsg.msg('请输入修改价格');return false;}
if (!/^[1-9]\d*(\.(\d{0,2})?)?$/.test(val)) {$(this).val('');pmsg.msg('修改价格错误');return false;}
popwin2.close(300);
setTimeout(function() {
popwin2.find('.pop-wrap').css({'vertical-align':'middle'});
},310);
$.ajax({
type:'post',
dataType:'json',
url:'{:U("change_price")}',
data:{id:id,price:val},
success:function(data){
if(parseInt(data.status)==1) {
pmsg.msg(data.info);
that.closest('.jsgood_info').find('.jsgoodprice').text(val);
} else {
pmsg.msg(data.info);
that.removeClass('disabled');
}
},
error:function(){pmsg.msg('服务器故障,请稍后再试');that.removeClass('disabled');},
});
return false;
});
return false;
});
$('.jsuseing').click(function() {
var that = $(that);var id = that.attr('data-id');
$.ajax({
type:'post',
dataType:'json',
url:'{:U("useing_record")}',
data:{id:id},
success:function(data){
popwin.open(800,data.html);
},
error:function(){pmsg.msg('服务器故障,请稍后再试');},
});
});
$('.jsmodify').click(function() {
var that = $(this);var id = that.attr('data-id');
var url = '{:U("Trade/edit_good",array("is_app"=>I("is_app"),"token"=>I("token")),false)}';
url = url.replace('.html','');
window.location.href=url+'/id/'+id+'.html';
return false;
});
});
</script>
</block>