123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>领取赠品</title>
- <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <link rel="stylesheet" type="text/css" href="/css/mui.min.css">
- <link rel="stylesheet" type="text/css" href="/css/iconfont.css" />
- <link rel="stylesheet" type="text/css" href="/css/style.css" />
- <style>
- .head {height: 60px;}
- #head {line-height: 60px;}
- h3 {margin-top: 5px;margin-bottom: 0;}
- .icon-fuxuankuang a {color: #24cae9;text-decoration: underline;}
- .icon-daifahuo, .icon-lease2, .icon-jiage, .icon-lipin {font-size: 15px;padding-left: 22px;}
- .icon-fuxuankuang {font-size: 12px;padding: 5px 5px 5px 22px;}
- .icon-fuxuankuang:before {font-size: 14px;margin-top: 5px;margin-right: 3px;}
- .icon-daifahuo:before, .icon-lease2:before, .icon-jiage:before,
- .icon-lipin:before {font-size: 19px;color: #24cae9;position: absolute;left: 0;width: 20px;height: 18px;}
- .try_price {color: #f1436c;}
- .ul_radio {width: 100%;}
- .ul_radio li {width: 21%;height: 55px;margin: 0 1%;border: 1px solid rgba(0, 0, 0, .1);border-radius: 5px;display: inline-block;position: relative;font-family: "iconfont" !important;font-style: normal;-webkit-font-smoothing: antialiased;}
- .ul_radio .active:after {position: absolute;right: 0;bottom: 0;content: "\e66f";color: #f1436c;line-height: 1;font-size: 20px;}
- .radio1 {background: url(//s.iamberry.com/watero/images/cp-1.jpg)center center/auto 85% no-repeat;}
- .radio2 {background: url(//s.iamberry.com/watero/images/cp-2.jpg)center center/auto 85% no-repeat;}
- .radio3 {background: url(//s.iamberry.com/watero/images/cp-3.jpg)center center/auto 85% no-repeat;}
- .radio4 {background: url(//s.iamberry.com/watero/images/cp-4.jpg)center center/auto 85% no-repeat;}
- .head-img {position: absolute;bottom: 15px;right: 13px;width: 60px;height: 60px;border-radius: 30px;border: 3px solid #E5E5E5;}
- .mui-table-view .mui-media .mui-media-body {height: 41px;line-height: 41px;color: #333;}
- .mui-table-view .mui-media .mui-media-body>span {color: #f1436c;}
- .my-table-view-try {border-top: .6em solid #f0f0f0;border-bottom: .6em solid #f0f0f0;padding-bottom: 10px;}
- .my-table-view-try .mui-table-view-cell {padding: 10px 13px 10px 30px !important;font-size: 12px;}
- .mui-table-view-cell:after, .mui-table-view:before, .mui-table-view:after,
- .mui-input-group .mui-input-row:after, .mui-input-group:before,
- .mui-input-group:after {display: none;}
- .mui-table-view-cell>a:not (.mui-btn ){margin: -15px -15px;}
- .mui-table-view-cell>a .mui-pull-right {color: #999;font-size: 14px;}
- #btn_submit {color: #fff;font-size: 18px;background: #24cae9;margin-bottom: 0;border: 0;}
- .mui-btn-block.mui-active, .btn-pull-code.mui-active {background-color: #c8c8c8 !important;}
- .icon-fuxuankuang.mui-active:before {color: #c8c8c8;}
- .mui-content-padded {margin: 10px 13px;}
- .mui-input-group .mui-input-row {height: 50px;padding: 5px 0;border: 1px solid rgba(0, 0, 0, .1);margin: 10px 0;}
- .mui-input-row label {color: #666;width: 27%;font-size: 15px;}
- .mui-input-row label ~input{width: 73%;}
- .mui-input-row label ~input::-webkit-input-placeholder {font-size: 15px;}
- .triangle-down {width: 0;height: 0;border-left: 7px solid transparent;border-right: 7px solid transparent;border-top: 7px solid #ccc;}
- .my-arrowright {position: absolute;right: 18px;top: 28px;color: #666;pointer-events: none;}
- .mui-btn-red {background-color: #e9004c;}
- .tips {padding-bottom: 65px;}
- .gift-card-title {padding-top: 70px;background: url(//s.iamberry.com/watero/images/shop/gift-card-tit-bg2.png) top center/100% no-repeat #71d8ec;}
- .gift-card-title .mui-table-view-cell.mui-active {background: transparent;}
- .gift-card-title .mui-table-view-cell>a:not (.mui-btn ){color: #fff;}
- .gift-card-title .mui-table-view-cell>a:not (.mui-btn ).mui-active {background: transparent;}
- .gift-card-title .mui-navigate-right:after {color: #fff;font-size: 20px;right: 7px;}
- .gift-card-title .mui-table-view-cell {color: #fff;}
- .mui-table-view-cell.mui-collapse .mui-collapse-content {background: #71d8ec;}
- .accordion {float: right;margin: 2px 15px 0 0;font-size: 12px;color: #fff;}
- .my-btn-hand {display: block;width: 100%;height: 55px;background-color: #c5c5c5;color: #fff;border: 0;border-radius: 0;}
- .my-btn-hand.active {background-color: #1cc9f4;}
- .my-div {padding: 5px 0;border-bottom: 1px solid rgba(0, 0, 0, .1);margin-bottom: 5px;}
- .mui-h5, h5 { margin-left: 30px;}
- </style>
- <script>
- // 屏蔽分享
- window.hiddenAllWechatMenu = true;
- </script>
- </head>
- <body style="background: #fff;">
- <div class="loading-bg">
- <div class="mui-loading">
- <div class="mui-spinner"></div>
- 加载中...
- </div>
- </div>
- <div class="mui-content" style="background: #fff;">
- <div class="tips">
- <ul class="mui-table-view gift-card-title">
- <li class="mui-table-view-cell mui-text-center">您已成功推荐一位代理商,获赠价值¥3680水机一台</li>
- <li class="mui-table-view-cell mui-text-left mui-collapse"></li>
- </ul>
- <div class="mui-content-padded">
- <div class="my-div">
- <span class="iconfont icon-lipin">选择赠品</span>
- </div>
- <div class="mui-h6">产品名称:美国watero净饮水一体机</div>
- <div class="mui-h6">产品数量:1台</div>
- <form class="mui-input-group">
- <div style="display: table; width: 100%; padding: 10px 0;">
- <div
- style="display: table-cell; width: 20%; vertical-align: middle;">
- 选择颜色:</span>
- </div>
- <div style="display: table-cell; width: 70%; text-align: right;">
- <ul class="ul_radio">
- <!-- <li class="radio1 active"></li>
- <li class="radio2"></li>
- <li class="radio3"></li>
- <li class="radio4"></li> -->
- </ul>
- </div>
- </div>
- </form>
- </div>
- <div class="my-div">
- <span class="iconfont icon-lease2">收货信息</span>
- </div>
- <ul class="mui-table-view">
- <li class="mui-table-view-cell">
- <a class="mui-navigate-right" id="open-wechat-addres-a">
- 收货地址<span class="mui-h5">请选择收货地址</span>
- <!-- <ul class="ft-12" style="color: #333;">
- <li>收 货 人:林林</li>
- <li>手 机 号:15999999999</li>
- <li>详细地址:广东省深圳市福田区莲花街道特区报业大厦12B</li>
- </ul> -->
- </a>
- </li>
- </ul>
- </div>
- </div>
- <div class="buy-footer">
- <button type="button" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="提交中" class="mui-btn mui-btn-block mui-btn-outlined mui-active" id="btn_submit" disabled="disabled">确认领取</button>
- </div>
- <script src="/js/mui.min.js"></script>
- <script src="/js/jquery-2.1.1.min.js"></script>
- <script src="/js/shop/main.js"></script>
- <script src="/js/shop/wechat-utils-1.0.js?v=201706001"></script>
- <script type="text/javascript">
- var check = false, alert_msg = '';
- var agentMachineId =getParam("agentMachineId");
- mui.ready(function(){
- mui.ajax(base_path + '/giftCard/card/product/details?dates=' + new Date().getTime(), {
- data: {"agentMachineId":agentMachineId},
- dataType: 'json',
- type: 'post',
- timeout: 15000,
- success: function(dt) {
- //console.log(dt);
- if(dt.isRedirect) {
- location.href = dt.redirectURL;
- } else {
- if(dt.returnCode=="200" && dt.resultCode=="200"){
- if (typeof(dt.returnMsg.msg) != "undefined"){
- if(dt.returnMsg.msg==2){
- mui.alert("已经领取过,请在赠品订单列表查看",'',function(){
- mui.openWindow({url: '/watero/view/gift_card_give_order_list.html'})
- });
- }
- }
- var table = document.body.querySelector('.ul_radio');
- mui(dt.returnMsg.colors).each(function(index) {
- var li = document.createElement('li');
- if(index==0){
- li.className ='radio'+this.colorId+' active';
- }else{
- li.className ='radio'+this.colorId;
- }
- li.setAttribute("id",this.colorId);
- table.appendChild(li);
- });
- $(".ul_radio li").each(function() {
- $(this).on("click", function() {
- $(this).addClass("active");
- $(this).siblings().removeClass("active");
- });
- });
- document.querySelector('.loading-bg').style.display='none';
- }else{
- mui.alert(dt.resultMsg);
- }
- }
- },
- error: function(xhr, type, errorThrown) {
- console.log(xhr)
- }
- });
- });
- var address='',nickname='',ads_tel='';
- // 获取微信共享地址
- mui('body').on('tap', '#open-wechat-addres-a', function() {
- editAddrV1(
- function(res) {
- // 用户成功拉出地址
- address = res.provinceName + "-" + res.cityName + "-" + res.countryName + "-" + res.detailInfo;
- nickname=res.userName;
- ads_tel= res.telNumber;
- wechatAddr.status = true;
- wechatAddr.detailInfo = address;
- wechatAddr.postalCode = res.postalCode;
- wechatAddr.userName = res.userName;
- wechatAddr.userTel = res.telNumber;
- wechatAddr.nationalCode = res.nationalCode;
- $("#open-wechat-addres-a").empty().append('<ul class="ft-12" style="color: #333;"><li>收 货 人:'+ wechatAddr.userName +'</li><li>手 机 号:' + wechatAddr.userTel + '</li><li>详细地址:'+ wechatAddr.detailInfo+'</li></ul>');
- $("#btn_submit").removeClass("mui-active").removeAttr("disabled");
- },
- function() {
- if($('#open-wechat-addres-a').html() != null && $('#open-wechat-addres-a').html() != '') {
- wechatAddr.status = true;
- $("#btn_submit").removeClass("mui-active").removeAttr("disabled");
- } else {
- wechatAddr.status = false;
- // 用户取消拉出地址
- $('#open-wechat-addres-a').html('收货地址<span class="mui-h5">请选择收货地址</span>');
- mui.alert("您没有选择收货地址!");
- }
- }
- );
- });
- mui('body').on('tap','#btn_submit',function() {
- if(wechatAddr.status){
- mui(this).button('loading');
- var param = {
- "agentMachineColorId":$(".ul_radio .active").attr("id"),
- "agentMachineId": agentMachineId,
- "agentMachineAddressInfo": address,
- "agentMachineAddressName":nickname,
- "agentMachineAddressTel":ads_tel ,
- };
- $.ajax({
- type: 'post',
- url: base_path+'/giftCard/card/updateAgentMachine?dates=' + new Date().getTime(),
- data:param,
- dataType: 'json',
- timeout: 15000,
- success: function(dt) {
- //console.log(dt);
- if(dt.resultCode=="200" && dt.returnCode=="200") {
- mui.openWindow({url: '/watero/view/gift_card_give_order_list.html'})
- } else {
- mui(th).button('reset');
- mui.alert(dt.returnMsg);
- }
- },
- error: function(xhr, type, errorThrown) {
- //异常处理;
- console.log(xhr);
- mui.alert("请检查网络或刷新页面重试!");
- mui(th).button('reset');
- }
- });
- }else{
- mui.alert("请选择收货信息");
- }
- });
- </script>
- </body>
- </html>
|