<div class="dsm-flow-item">
    <div class="title">相关商品交易信息</div>
    <div class="item-goods">
      {notempty name="order"}
      <dl>
        <dt>
          <div class="dsm-goods-thumb-mini"><a target="_blank" href="{:url('goods/index',['goods_id'=>$order.goods_id])}">
            <img src="{:thumb($order)}"/></a></div>
        </dt>
        <dd><a target="_blank" href="{:url('goods/index',['goods_id'=>$order.goods_id])}">{$order.goods_name}</a>
          {$Think.lang.currency}{$order.goods_price} * {$order.goods_num} <font color="#AAA">(数量)</font>
        </dd>
      </dl>
      {/notempty}
    </div>
    <div class="item-order">
      <dl>
        <dt>使用时效：</dt>
        <dd>即日起 至 {:date('Y-m-d',$order.vr_indate)}</dd>
      </dl>
      <dl>
        <dt>订单总额：</dt>
        <dd><strong>{$Think.lang.currency}{:dsPriceFormat($order.order_amount)}
          {if $order.refund_amount > 0}
          ({$Think.lang.refund_add}{$Think.lang.ds_colon}{$Think.lang.currency}{$order.refund_amount})
         {/if}
          </strong> </dd>
      </dl>
      <dl class="line">
        <dt>订单编号：</dt>
        <dd><a target="_blank" href="{:url('membervrorder/show_order',['order_id'=>$order.order_id])}">{$order.order_sn}</a>
            <a href="javascript:void(0);" class="a">更多<i class="icon-angle-down"></i>
          <div class="more"> <span class="arrow"></span>
            <ul>
              <li>{$Think.lang.member_order_pay_method}{$Think.lang.ds_colon}<span>{$order.payment_name}</span></li>
              <li>{$Think.lang.member_order_time}{$Think.lang.ds_colon}<span>{:date('Y-m-d H:i:s',$order.add_time)}</span></li>
              {if $order.payment_time}
              <li>{$Think.lang.member_show_order_pay_time}{$Think.lang.ds_colon}<span>{:date('Y-m-d H:i:s',$order.payment_time)}</span></li>
              {/if}
              {if $order.finnshed_time > 0}
              <li>{$Think.lang.member_show_order_finish_time}{$Think.lang.ds_colon}<span>{:date('Y-m-d H:i:s',$order.finnshed_time)}</span></li>
              {/if}
            </ul>
          </div>
          </a> </dd>
      </dl>
      <dl class="line">
        <dt>商&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;家：</dt>
        <dd>{$order.store_name}<a href="javascript:void(0);" class="a" id="store_more">更多<i class="icon-angle-down"></i>
          <div class="more"><span class="arrow"></span>
              <ul>
                <li> 联系电话：<span>{notempty name="store.live_store_tel"}{$store.live_store_tel} {else /} {$store.store_phone}{/notempty}</span> </li>
                <li>地&#12288;&#12288;址： <span>{notempty name="store.live_store_address"}{$store.live_store_address}{else /}{$store.store_address}{/notempty}</span> </li>
                <li>
                  <div id="store_container" class="w270 h200"></div>
                </li>
              </ul>
          </div>
          </a>
        </dd>
      </dl>
    </div>
  </div>
<script type="text/javascript">
var cityName = '';
{present name="store.live_store_address"}
var address = '<?php echo str_replace("'",'"',$store.live_store_address);?>';
var store_name = '<?php echo str_replace("'",'"',$store.live_store_name);?>';
{/present}
var map = "";
var localCity = "";
var opts = {width : 100,height: 50,title : "商铺名称:"+store_name}
function initialize() {
    map = new BMap.Map("store_container");
    localCity = new BMap.LocalCity();

    map.enableScrollWheelZoom();
    map.addControl(new BMap.NavigationControl());
    map.addControl(new BMap.ScaleControl());
    map.addControl(new BMap.OverviewMapControl());
    localCity.get(function(cityResult){
        if (cityResult) {
            var level = cityResult.level;
            if (level < 13) level = 13;
            map.centerAndZoom(cityResult.center, level);
            cityResultName = cityResult.name;
            if (cityResultName.indexOf(cityName) >= 0) cityName = cityResult.name;
            getPoint();
        }
    });
}

function loadScript() {
    var script = document.createElement("script");
    script.src = "http://api.map.baidu.com/api?v=1.2&callback=initialize";
    document.body.appendChild(script);
}
function getPoint(){
    var myGeo = new BMap.Geocoder();
    myGeo.getPoint(address, function(point){
        if (point) {
            setPoint(point);
        }
    }, cityName);
}
function setPoint(point){
    if (point) {
        map.centerAndZoom(point, 16);
        var marker = new BMap.Marker(point);
        var infoWindow = new BMap.InfoWindow("商铺地址:"+address, opts);
        marker.addEventListener("click", function(){
            this.openInfoWindow(infoWindow);
        });
        map.addOverlay(marker);
    }
}

//加载百度地图。
$(function(){
    $('#store_more').one('mouseover',function(){
        loadScript();
    });
});
</script>