1
0
Files
helper/application/mobile/view/setting/template.html
2020-08-06 14:58:51 +08:00

49 lines
1.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{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}