49 lines
1.3 KiB
HTML
49 lines
1.3 KiB
HTML
{extend name="public/base" /}
|
||
|
||
{block name="body"}
|
||
<ul class="template-list">
|
||
{for start="1" end="5"}
|
||
<li {eq name="user->info->index_tpl" value="$i"} class="template-active"{/eq}>
|
||
<img src="__IMG__/template-img_{$i}.png" alt="模版">
|
||
{eq name="user->info->index_tpl" value="$i"}
|
||
<span>正在使用</span>
|
||
{else/}
|
||
<span onClick="OpenVip({$i})">使用该模板</span>
|
||
{/eq}
|
||
</li>
|
||
{/for}
|
||
</ul>
|
||
{/block}
|
||
|
||
{block name="script"}
|
||
{eq name="user->info->is_vip" value="0"}
|
||
<script>
|
||
function OpenVip(a) {
|
||
layer.open({
|
||
title: ['功能操作限制',],
|
||
content: '您非VIP会员不能使用此模板</br>立即开通VIP,享受更多功能特权!',
|
||
btn: ['开通', '取消'],
|
||
yes: function(index) {
|
||
location.href = "{:url('vip/index')}";
|
||
}
|
||
});
|
||
}
|
||
</script>
|
||
{else/}
|
||
<script>
|
||
function OpenVip(a) {
|
||
$.post("__SELF__", {tpl: a} , function(data) {
|
||
if (data.code) {
|
||
updateAlert(data.msg, true);
|
||
setTimeout(function() {
|
||
location.href = data.url;
|
||
}, 1000);
|
||
} else {
|
||
updateAlert(data.msg, false);
|
||
}
|
||
});
|
||
}
|
||
</script>
|
||
{/eq}
|
||
{/block}
|