123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
- <extend name="public/base" />
- <block name="title">
- <title>{$seo.title|default=$site_info.site_name.' - 兑换商品'}</title>
- </block>
- <block name="main">
- <div class="wrap">
- <div class="virtualProduct_xiangqing">
- <div class="shadowScroll">
- <input type="hidden" name="goodsId" value="{$goods.goods_id}">
- <div class="realProduct_main">
- <div class="rpxq">
- <div class="rpxq_img"><img src="{$goods.original_img}" /></div>
- <div class="rpxq_text">
- <h4 class="rpxq_text__h4">{$goods.goods_name}</h4>
- <p class="rpxq_text__p">所需积分:<span class="bColor">{$goods.integral}积分</span></p>
- <if condition="empty($order.order_id)">
- <p class="rpxq_text__p">剩余个数:{$goods.remain_cnt}</p>
- </if>
- <!--<div id="exchange" class="rpxq_btn" >-->
- <!--<if condition="!empty($order_id)">-->
- <!--<img src="__STATIC__/h5wap/images/button_duihuan_lingjiang.png" alt="">-->
- <!--<else/>-->
- <!--<img src="__STATIC__/h5wap/images/button_duihuan.png" alt="">-->
- <!--</if>-->
- <!--</div>-->
- <!-- 虚拟物品 -->
- <if condition="$goods.is_real eq 1">
- <p class="realProduct_bottom">
- <button id="exchange" class="realProduct_bottom__btn">
- <if condition="!empty($order.order_id)">
- <!--领奖-->
- <img src="__STATIC__/h5wap/images/button_duihuan_lingjiang.png" alt="">
- <else/>
- <!--兑换123-->
- <img src="__STATIC__/h5wap/images/button_duihuan.png" alt="">
- </if>
- </button>
- </p>
- <else/>
- <p class="realProduct_bottom">
- <button id="exchange" class="realProduct_bottom__btn">
- <if condition="!empty($order.order_id)">
- <!--领奖-->
- <img src="__STATIC__/h5wap/images/button_duihuan_lingjiang.png" alt="">
- <else/>
- <!--兑换456-->
- <img src="__STATIC__/h5wap/images/button_duihuan.png" alt="">
- </if>
- </button>
- </p>
- </if>
- </div>
- </div>
- <if condition="$goods.is_real eq 2">
- <p class="shangpin_title">寄送信息</p>
- <div class="form">
- <p class="form_name">姓名:<input name="consignee" class="form_name__input form_black__input" type="text" /></p>
- <p class="form_phone">手机:<input name="mobile" class="form_phone__input form_black__input" type="text" /></p>
- <p class="form_send">送至:
- <span class="form_send__select">请选择地区</span>
- </p>
- <p class="form_address">
- <input type="hidden" name="country" value="0">
- <input type="hidden" name="province">
- <input type="hidden" name="city">
- <input type="hidden" name="district">
- <input type="hidden" name="town">
- <input class="form_address__input form_black__input" name="address" type="text" placeholder="详细地址"/>
- </p>
- <!--<p class="form_address">-->
- <!--<button id="exchange" class="realProduct_bottom__btn"><if condition="!empty($order_id)">领奖<else/>兑换</if></button>-->
- <!--</p>-->
- </div>
- </if>
- <p class="shangpin_title">商品详情</p>
- <div class="shangpin_picture">
- {$goods.goods_content}
- </div>
- <!--<p class="shangpin_title">使用说明</p>-->
- <!--<div class="shangpin_picture">-->
- <!--领取礼包成功后,将自动发放到游戏内,请登录游戏查看!-->
- <!--</div>-->
- <!--<p class="shangpin_title">有效期</p>-->
- <!--<div class="shangpin_picture">-->
- <!--2018-02-15至2018-04-01-->
- <!--</div>-->
- </div>
- </div>
- <div class="return-group">
- <button class="btn-primary" returntolist>返回列表</button>
- </div>
- <div class="duihuanSucess duihuanSucess_v">兑换成功</div>
- </div>
- <div class="duihuanShadow">
- <div class="duihuanShadow_box">
- <p class="duihuanShadow_box__p1">提示信息</p>
- <p class="duihuanShadow_box__p2">是否<if condition="!empty($order_id)">领取<else/>兑换</if>该礼包?</p>
- <p class="duihuanShadow_box__p3">
- <span class="duihuan_cancel duihuan_cancel_v">取消</span>
- <span class="duihuan_queren duihuan_queren_v">确认</span>
- </p>
- </div>
- </div>
- <div class="address_pop">
- <div class="address_mask"></div>
- <div class="address_content">
- <h4 class="address_head">
- 所在地区
- <a href="javascript:;" class="address_close" onclick="$('.address_pop').hide()"></a>
- </h4>
- <div class="address_body">
- <div class="address_tab">
- </div>
- <div class="address_list">
- </div>
- </div>
- </div>
- </div>
- </div>
- </block>
- <block name="otherScript">
- <script>
- $('.form_send__select').on('click', huoAddressInit)
- var goodsId
- var consignee
- var mobile
- var country
- var province
- var city
- var district
- var town
- var address
- $('#exchange').click(function () {
- goodsId = $('[name="goodsId"]').val()
- if ('{$goods.is_real}' == 2) {
- consignee = $('[name="consignee"]').val().trim()
- mobile = $('[name="mobile"]').val().trim()
- country = $('[name="country"]').val()
- province = $('[name="province"]').val()
- city = $('[name="city"]').val()
- district = $('[name="district"]').val()
- town = $('[name="town"]').val($('.form_send__select').text())
- address = $('[name="address"]').val().trim()
- if (!consignee) {
- tips('请填写你的姓名!')
- return false
- }
- if (!mobile) {
- tips('请填写你的手机号码!')
- return false
- }
- if (!/1[0-9]{10}/.test(mobile)) {
- tips('请填写正确的手机号码!')
- return false
- }
- console.log('province====', province)
- console.log('city====', city)
- console.log('district====', district)
- console.log('town====', town)
- console.log('address====', address)
- console.log('form_send__select====', $('.form_send__select').text())
- if (!province || !city || !district || !town || !address) {
- tips('请填写你的地址!')
- return false
- }
- }
- $('.duihuanShadow').show()
- })
- $('.duihuan_cancel').click(function () {
- $('.duihuanShadow').hide()
- })
- $('.duihuan_queren').click(function () {
- $('.duihuanShadow').hide()
- exchangeGoods({
- goods_id: goodsId,
- order_id: '{$order.order_id}',
- consignee: consignee,
- mobile: mobile,
- country: country,
- province: province,
- city: city,
- district: district,
- town: town,
- address: address
- })
- })
- $('.duihuan_queren_v').click(function () {
- $('.duihuanShadow').hide()
- })
- // 充值卡
- $('#card').click(function () {
- $('#cardInfo').show()
- })
- </script>
- </block>
|