123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <{include file="header.html"}>
- <!--公用标题居中显示-->
- <{include file="common_header.html"}>
- <div class="wrapper jsc-sidebar-content jsc-sidebar-pulled">
- <{if $upAction}>
- <div class="article_title center"> </div>
- <div class="article_content center">您已成功领取奖品<br><{$prizeData.prize_name}></div>
- <div class="clear"></div>
- <br>
- <div class="common_btn_style center"><a href="<{$giftsUrl}>" class="submit_btn_style button">查看奖品</a></div>
- <{else}>
- <div class="article_title center">领取奖品</div>
- <div class="article_content">请认真填写您的收货地址,方便您收取奖品。奖品发货后,我们会将状态更新在“我的奖品”中。</div>
- <div class="join_submit_box">
- <div class="submit_cell"><input type="text" class="input_style" name="realname" value="<{$userExpress.user_name}>" placeholder="姓名"></div>
- <div class="submit_cell"><input type="text" class="input_style" name="phone" value="<{$userExpress.phone}>" placeholder="电话"></div>
- <div class="submit_cell"><input type="text" class="input_style" name="address" value="<{$userExpress.address}>" placeholder="收货地址"></div>
- <div class="submit_cell center" style="border:none; background:none"><button type="submit" class="button" id="sub_address">确认地址</button></div>
- </div>
- <{/if}>
-
- </div>
- <!--公用提示背景遮罩层-->
- <div class="a_cover"></div>
- <div class="v_tips_box v_tips_box2" id="error_tips_box">
- <div class="v_close_btn" id="tips_close_btn"></div>
- <p class="tips_msg" id="error_msg">错误信息</p>
- </div>
- <{include file="left.html"}>
- <script>
- KISSY.use('node, io', function (S, Node, IO) {
-
- $('#jsi-nav').sidebar({
- trigger: '#munu_icon'
- });
- $("input[type=text]").focus(function(){
- $(this).parent().find("span").hide();
- $(this).css("color","#000");
- });
- $("input[type=text]").blur(function(){
- if($(this).val() == ''){
- $(this).parent().find("span").show();
- }
- });
-
- // 提示
- function showTipsBox(msg,close){
- $("#error_msg").html(msg);
- $("#tips_close_btn").hide();
- if(close){
- $("#tips_close_btn").show();
- }
- $("#error_tips_box").fadeIn();
- $('.a_cover').fadeIn();
- }
-
- // 关闭提示
- $("#tips_close_btn").on('click', function(){
- $("#error_tips_box").fadeOut();
- $('.a_cover').fadeOut();
- });
-
- $('#sub_address').on('click', function () {
- var realname = S.trim($('input[name=realname]').val());
- if (realname == '') {
- showTipsBox('姓名不能为空',true);
- return false;
- }
-
- var phone = S.trim($('input[name=phone]').val());
- var regex = /^(1[0-9][0-9]|15[0-9]|18[02-9]|14[57])[0-9]{8}$/;
- if(!regex.test(phone)) {
- showTipsBox('请填写有效手机号码',true);
- return false;
- }
-
- var address = S.trim($('input[name=address]').val());
- if (address == '') {
- showTipsBox('请填写收货地址',true);
- return false;
- }
-
- IO.get('<{$web_cfg.domain}>/?c=Express&a=UpExpress'
- , {
- lottery_data_id: '<{$lotteryData.id}>',
- realname: realname,
- phone: phone,
- address: address
- }
- , function (data) {
- if (data.ok) {
- <{if $refer}>
- location.href ='<{$refer}>';
- <{else}>
- location.href ='<{$web_cfg.domain}>/?c=Express&lottery_data_id=<{$lotteryData.id}>&up=true';
- <{/if}>
- } else {
- showTipsBox(data.msg);
- return false;
- }
- }
- , 'json'
- );
-
- });
-
- });
- </script>
- <{include file="bottom.html"}>
|