WeMall微信商城源码插件会员卡代码是用于商业推广的比较有效的方式,分享了部分比较重要的代码,供技术员学习参考
WeMall微信商城源码插件会员卡代码是用于商业推广的比较有效的方式,分享了部分比较重要的代码,供技术员学习参考
Index_index.html<html><br>
<head><br>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><br>
<title>会员卡</title><br>
<meta name="viewport"<br />
content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;"><br>
<meta name="apple-mobile-web-app-capable" content="yes"><br>
<meta name="apple-mobile-web-app-status-bar-style" content="black"><br>
<meta name="format-detection" content="telephone=no"><br>
<link href="__CSS__/card.css?i=2" rel="stylesheet" type="text/css"><br>
</head><br>
<body id="card" style=""><br>
<div id="overlay"></div><br>
<div class="cardcenter"><br>
<div class="card"><img class="cardbg" src="__IMG__/card_bg07.png"><br>
<img class="logo" src="http://wx.qlogo.cn/mmopen/KMt8YcxoTr7iaBlsovicVoDriciaLBcQtic7D4IyETkKusiasVicTJq5s2PianSUeg9HuVjGXQQQ9Pz07vyrdE7lMQ1EGw/0"><br>
<h1 style="color:#000000">VIP会员卡</h1><br>
<strong class="pdo verify"><br>
<span style="float: left;margin-left: 10px;"><br>
<em>会员姓名</em><span style="font-size: 16px;">{$user.username}</span><br>
</span><br>
<span><em>会员卡号</em><br>
<a style="text-decoration: none; color: rgb(10, 10, 10); ">{$user.id}</a><br>
</span><br>
</strong><br>
</div><br>
<p class="explain"><span>使用时向服务员出示此卡</span></p><br>
</div><br>
<div class="cardexplain"><br>
<div class="jifen-box" style="margin-top:13px;"><br>
<ul class="zongjifen"><br>
<li><br>
<div class="fengexian"><p>账户</p><span>{$user.money}</span></div><br>
</li><br>
<li><br>
<div class=""><p>积分</p><span>{$user.score}</span></div><br>
</li><br>
</ul><br>
<div class="clr"></div><br>
</div><br>
<ul class="round" id="notice"><br>
<li><a href="{$config.notify_url}"><span>最新通知</span></a></li><br>
<li><a href="{$config.about_url}"><span>会员卡说明</span></a></li><br>
</ul><br>
<ul class="round" id="powerandgift"><br>
<li><a href="{:U('App/Index/index')}#order"><span>消费记录</span></a></li><br>
<li><a href="{:U('App/Index/index')}#order"><span>个人资料</span></a></li><br>
</ul><br>
<ul class="round"><br>
<li><a href=""><span>地址: {$config.address}</span></a></li><br>
<li><a href="tel:{$config.tel}"><span>电话: {$config.tel}</span></a></li><br>
</ul><br>
</div><br>
<div class="copyright" style="color: #666666">© 2014-2015 inuoer.com. All<br>
rights reserved.<br>
</div><br>
</body><br>
</html>
Config_index.html<section class="content-header"><br>
<h1><br>
会员卡设置<br>
<small></small><br>
</h1><br>
</section><br>
<br>
<!-- Main content --><br>
<section class="content"><br>
<div class="row"><br>
<div class="col-md-12"><br>
<!-- general form elements --><br>
<div class="box box-danger"><br>
<div class="box-header with-border"><br>
<h3 class="box-title">会员卡设置</h3><br>
</div><br>
<!-- form start --><br>
<form class="form-horizontal" method="post" action="{:u_addons('Card://Admin/Config/add')}"><br>
<div class="box-body"><br>
<div class="form-group"><br>
<label class="col-sm-2 control-label">最新通知链接</label><br>
<br>
<div class="col-sm-10"><br>
<input class="form-control" name="notify_url" placeholder=""<br />
value="{$config.notify_url}"<br />
type="text"><br>
</div><br>
</div><br>
<div class="form-group"><br>
<label class="col-sm-2 control-label">地址</label><br>
<br>
<div class="col-sm-10"><br>
<input class="form-control" name="address" placeholder=""<br />
value="{$config.address}"<br />
type="text"><br>
</div><br>
</div><br>
<br>
<div class="form-group"><br>
<label class="control-label col-md-2">电话</label><br>
<br>
<div class="col-sm-10"><br>
<input class="form-control" name="tel" placeholder="" value="{$config.tel}"<br />
type="text"><br>
</div><br>
</div><br>
<br>
<div class="form-group"><br>
<label class="col-sm-2 control-label">会员卡说明链接</label><br>
<br>
<div class="col-sm-10"><br>
<input class="form-control" name="about_url" placeholder="" value="{$config.about_url}"<br />
type="text"><br>
</div><br>
</div><br>
<br>
<div class="form-group"><br>
<label class="col-sm-2 control-label">备注</label><br>
<br>
<div class="col-sm-10"><br>
<input class="form-control" name="remark" placeholder="" value="{$config.remark}"<br />
type="text"><br>
</div><br>
</div><br>
</div><br>
<!-- /.box-body --><br>
<br>
<div class="box-footer"><br>
<div class="col-sm-2"><br>
<button type="submit" class="btn btn-block btn-danger">保存</button><br>
</div><br>
</div><br>
</form><br>
</div><br>
<!-- /.box --><br>
<br>
</div><br>
<!--/.col (right) --><br>
</div><br>
</section>
IndexController.class.php<?php<br />
namespace AddonsCardController;<br />
<br />
class IndexController extends InitController<br />
{<br />
public function index()<br />
{<br />
$user = R("App/Public/oauthLogin");<br />
$this->assign("user", $user);<br>
<br>
$config = M("AddonCardConfig")->find();<br>
$this->assign("config", $config);<br>
$this->display('', false);<br>
}<br>
}
代码来源: www.wemallshop.com