首页 > 其他分享 >易优CMS付费说读article pay.htm文件(仅PC端需要此文件)

易优CMS付费说读article pay.htm文件(仅PC端需要此文件)

时间:2024-07-20 17:51:14浏览次数:8  
标签:文件 易优 说读 unified res eyou pay data css

模板文件放在/template/PC或Mobile/system/里面

<!-- 电脑端使用此标签需要加载 /template/pc/system/article_pay.htm 模板文件,手机端不需要此文件 -->
<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8" />
  <title>订单支付-{eyou:global name='web_name' /}</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
  <link href="{eyou:global name='web_cmspath'/}/favicon.ico" rel="shortcut icon" type="image/x-icon" />
  {eyou:static file="users/skin/css/basic.css" /}
  {eyou:static file="users/skin/css/eyoucms.css" /}
  <!-- 新样式 2020-11-25 -->
  {eyou:static file="users/skin/css/element/index.css" /}
  {eyou:static file="users/skin/css/e-user.css" /}
  {eyou:include file="users/skin/css/diy_css.htm" /}
  {eyou:static file="/public/static/common/js/jquery.min.js"/}
  {eyou:static file="/public/plugins/layer-v3.1.0/layer.js"/}
  {eyou:static file="users/skin/js/global.js" /}
  <style>
    .pay-item{border:1px solid #eee;height: 50px;position: relative;}
    .pay-item-select{border:1px solid #1E9FFF;}
    .pay-item-select::after{position: absolute;right: 4px;bottom: 0;content: ";width:6px;height: 12px;border-bottom: 2px solid #fff;border-right: 2px solid #fff;-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);transform: rotate(45deg);}
    .pay-item.pay-item-select span {position: absolute;right: 0;bottom: 0;width: 0;height: 0;border-bottom: 20px solid #1E9FFF;border-left: 20px solid transparent;}
    .button-wrapper{padding-left: 140px;text-align: left;margin-top: 20px;}
    .layui-btn{height: 32px;line-height: 32px;border: 1px solid transparent;padding: 0 15px;background-color:#1E9FFF;color: #fff;white-space: nowrap;text-align: center;font-size: 14px;border-radius: 2px;cursor: pointer;}
    .main-bg{margin-bottom: 0 !important;padding-bottom: 0 !important; }
  </style>
</head>
<body>
  <div class="ey-container w1200">
    <div class="el-main main-bg">
      <div class="el-form-item" style="text-align: center;">
        <div class="el-form-item__content pay-type-select">
          <!-- 支付API列表,套板请务必将整块代码一起复制,包含隐藏域 -->
          <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
          {eyou:sppayapilist id='vo'}
            {eyou:notempty name="$vo.pay_id"}
              {neq name="$vo.pay_mark" value="Hupijiaopay"}
              {eyou:php}$pay_mark_vars = "users/skin/images/".$vo['pay_mark'].".png";{/eyou:php}
              <div class="pay-item"  onclick="LayerPaySelect(this);" data-mark="{$vo.pay_mark}" data-parameter="'{$vo.pay_id}','{$vo.pay_mark}'">
                <a href="JavaScript:void(0);" >
                  <img src="{eyou:empty name='$vo.pay_img'}{eyou:static file='$pay_mark_vars' /}{eyou:else/}{$vo.pay_img}{/eyou:empty}">
                  <span></span>
                </a>
              </div>
              {/neq}
            {/eyou:notempty}
            {$vo.hidden}
          {/eyou:sppayapilist}
          <input type="hidden" id="PayID">
          <input type="hidden" id="PayMark">
          <!-- END -->
          {eyou:if condition="1 != $data.transaction_type && 1 == $data.pay_balance_open"}
          <div class="pay-item" data-toggle="modal" data-target="#pay-order-modal" onclick="LayerPaySelect(this);"  data-mark="balance" data-parameter="'{$data.unified_id}','{$data.unified_number}','{$data.transaction_type}'">
            <a  href="JavaScript:void(0);" id="PayBalancePayment" >
               <img src="{eyou:static file='users/skin/images/pay_yiyou.png' /}" >
               <span></span>
            </a>
          </div>
          <script type="text/javascript">
            // 余额支付,购买商品+视频支付使用
            function PayBalancePayment(unified_id,unified_number,transaction_type) {
              if (!unified_number || !unified_id) layer.msg('订单号异常,请刷新重试', {time: 1500});
              // 禁止再次点击余额支付
              $('#PayBalancePayment').prop("disabled", true).css("pointer-events", "none");
              var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
              // 发送请求
              layer_loading('订单处理中');
              $.ajax({
                url: '{$RootDir}/index.php?m=user&c=PayApi&a=balance_payment&_ajax=1',
                data: {unified_id: unified_id, unified_number: unified_number, transaction_type: transaction_type},
                type:'post',
                dataType: 'json',
                success:function(res){
                layer.closeAll();
                var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                var _parent = parent;
                _parent.layer.close(parentObj);
                if (1 == res.code) {
                  if (!res.data.mobile && !res.data.email) {
                    _parent.layer.msg(res.msg, {shade: 0.3, time: 1000}, function(){
                       _parent.window.location.reload();
                    });
                   } else {
                    if (res.data.mobile) SendMobile(res.data.mobile);
                    if (res.data.email) SendEmail(res.data.email);
                    _parent.layer.msg(res.msg, {shade: 0.3, time: 1000}, function(){
                      _parent.window.location.reload();
                    });
                   }
                 } else {
                   _parent.PayIsRecharge(res.msg, res.url,unified_id,unified_number,transaction_type);
                  }
                }
              });
            }
         </script>
         {/eyou:if}
       </div>
       <div class="button-wrapper"><button type="button" class="layui-btn layui-btn-sm" id="confirm">确认支付{$data.order_amount}元</button></div>
     </div>
   </div>
</div>
<script type="text/javascript">
  $(function(){
    // 默认支付方式
    $($('.el-form-item__content .pay-item')[0]).trigger("click");
  });
  function LayerPaySelect(obj) {
    $(".pay-item").each(function(){
      $(this).removeClass('pay-item-select');
    });
    $(obj).addClass('pay-item-select');
    var mark = $(obj).attr('data-mark')
    if (mark){
      var parameter = $(obj).attr('data-parameter')
      if ('balance' == mark){
        $('#confirm').attr("onclick","PayBalancePayment("+parameter+");");
      }else{
        $('#confirm').attr("onclick","SelectPayMethodLayer("+parameter+");");
      }
    }
  }
</script>
</body>

 

标签:文件,易优,说读,unified,res,eyou,pay,data,css
From: https://www.cnblogs.com/hwrex/p/18313512

相关文章

  • 易优CMS模板标签load文件加载导入外部的css样式文件
    【基础用法】标签:load描述:资源文件加载,比如:css/js用法:{eyou:loadhref='/static/js/common.js'ver='on'/}属性:file=''资源文件路径href=''远程资源文件URLver=''开启版本号自动刷新浏览器缓存涉及表字段:无【更多示例】-------------------------------示例1------......
  • 易优CMS按年月日来调用文章排行函数
    网站根目录extend/function.php“文件内写入if(!function_exists('diy_archives_list')){//获取指定天数的文档列表functiondiy_archives_list($channel=0,$day=0,$orderby='aid',$limit=10){$where=[];!empty($channel)&&$......
  • 易优CMS模板标签global全局变量输出网站关键词
    【基础用法】标签:global描述:获取系统全局配置变量内容用法:{eyou:globalname='web_title'/}或者{$eyou.global.web_title}文件:系统模板引擎属性:name=''变量名涉及表字段:请查阅网站后台的【设置】-【基本信息】web_status关闭网站web_name网站名称web_logo网站LOGO......
  • 如何从“.d.ts”文件生成 TypeScript API 文档?
    如何从.d.ts文件生成typescriptAPI文档?我尝试typedoc传输这个库:%npxtypedocindex.js[warning]Theentrypoint./index.jsisnotreferencedbythe'files'or'include'optioninyourtsconfig[error]Unabletofindan......
  • python实现文件的读写
    python实现文件的读写路径的书写:open("E:\\ai_03\\code\\ai_03_python\\day07\\data.txt")#两个斜杠open(r"E:\ai_03\code\ai_03_python\day07\data.txt","w",encoding="utf8")#建议使用读文件读文件的格式要以读文件的模式打开一个文件对象,使用Python......
  • Android开发 - 布局文件之 include 使用
    简介include是在一个布局中,导入另一个布局文件。优势是:相同的页面只需写一次,提高了共通布局的复用性。下面我们以标题栏为例,详细说明它的使用步骤使用步骤第一步:通用布局-创建title_bar.xml//title_bar<?xmlversion="1.0"encoding="utf-8"?><LinearLayoutxmlns:an......
  • 导入excel文件
    usingSystem;usingSystem.Windows.Forms;usingSystem.Text;usingSystem.Data;usingSystem.Reflection;usingSystem.Xml;usingSystem.Net;usingSystem.Net.Sockets;usingSystem.IO;usingSystem.IO.Ports;usingSystem.Collections;usingSystem.Collections.Generic;......
  • Python中4种方法实现 xls 文件转 xlsx
    在Python中,可以采用pandas、pyexcel、win32com和xls2xlsx这四个模块,实现xls转xlsx格式。以Excel示例文件test_Excel.xls为例,具体内容如下图所示:1.pandas安装命令pipinstallpandas-ihttps://mirrors.aliyun.com/pypi/simple具体使用方法importpandasas......
  • 在同一 HAML 文件中定义和使用函数
    我有一个基于haml的轻量级网站,正在使用Middleman构建(不是Rails,但我用Rails标记它,因为我认为Rails的人可能知道答案)。是否可以定义haml文件中的内联函数,然后在同一文件中使用它?(是的,我知道如何使用单独定义的帮助程序文件。这不是问题。)我有一个页......
  • 电子文件如何盖骑缝章?
    电子文件如何盖骑缝章?下面是利用e-章宝(易友EU3000智能盖章软件)盖电子骑缝章的步骤,无需了解什么切片技术:第一步:制作需要盖的电子印章一般是先扫描公章,然后使用e-章宝(易友EU3000智能盖章软件)的一键抠章功能,把印章导入到印章库中待用。如果之前已制作好公章,此步可以忽略......