test
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

133 lines
5.8 KiB

{template 'common/header'}
{template 'account/account-header'}
<div id="js-account-manage-base" ng-controller="AccountManageBase" ng-cloak>
<table class="table we7-table table-hover table-form">
<col width="160px" />
<col />
<col width="100px" />
<tr>
<th class="text-left" colspan="3">平台设置</th>
</tr>
<tr>
<td class="table-label">头像</td>
<td><img ng-src="{{account.logo}}" class="account-img" /></td>
<td class="text-right">
<div class="link-group">
<a href="javascript:;" ng-click="changeImage('headimgsrc','{$uniacid}')">修改</a>
</div>
</td>
</tr>
<tr>
<td class="table-label">平台名称</td>
<td>{{account.name}}</td>
<td class="text-right"><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#name" ng-click="editInfo('name', account.name)">修改</a></div></td>
</tr>
<tr ng-if="account.createtime">
<td class="table-label">创建时间</td>
<td><span ng-bind="account.createtime"></span></td>
<td></td>
</tr>
<tr>
<td class="table-label">到期时间</td>
<td>
<span ng-bind="account.end"></span><span class="color-gray"></span>
</td>
<td class="text-right">
<div class="link-group" ng-if="founder || owner">
<a href="javascript:;" data-toggle="modal" data-target="#endtype" ng-click="editInfo('endtype', account.endtype)">修改</a>
</div>
</td>
</tr>
</table>
<div class="modal fade" id="name" tabindex="-1" role="dialog" aria-hidden="true">
<div class="we7-modal-dialog modal-dialog we7-form">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<div class="modal-title">修改平台名称</div>
</div>
<div class="modal-body">
<div class="form-group">
<input type="text" ng-model="middleAccount.name" class="form-control" placeholder="公众号名称" />
<span class="help-block"></span>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="httpChange('name')">确定</button>
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="account" tabindex="-1" role="dialog" aria-hidden="true">
<div class="we7-modal-dialog modal-dialog we7-form">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<div class="modal-title">修改平台账号</div>
</div>
<div class="modal-body">
<div class="form-group">
<input type="text" ng-model="middleAccount.account" class="form-control" placeholder="平台账号" />
<span class="help-block"></span>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="httpChange('account')">确定</button>
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="endtype" role="dialog">
<div class="we7-modal-dialog modal-dialog we7-form">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<div class="modal-title">设置到期时间</div>
</div>
<div class="modal-body">
<div class="form-group">
<input id="endtype-1" type="radio" name="endtype" value="2" ng-model="middleAccount.endtype" ng-checked="middleAccount.endtype == 2"><label for="endtype-1">设置期限</label>
<input id="endtype-2" type="radio" name="endtype" value="1" ng-model="middleAccount.endtype" ng-checked="middleAccount.endtype == 1"><label for="endtype-2" ng-if="founder">永久</label>
</div>
<div class="form-group" ng-show="middleAccount.endtype == 2">
{php echo tpl_form_field_date('endtime', $account['endtime']);}
<div class="help-block" ng-if="founder">
创始人可设置平台永久有效,<span class="color-red">不受平台主管理员权限限制</span>,并以创始人设置到期时间为准
</div>
<div class="help-block" ng-if="!founder">
平台有效期不可超过主管理员有效期的最大期限(主管理员到期:{$user_endtime})
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="httpChange('endtime')">确定</button>
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
</div>
</div>
</div>
</div>
</div>
<script>
angular.module('accountApp').value('config', {
founder : {if $_W['isfounder']}true{else}false{/if},
owner : {if $state == 'owner'}true{else}false{/if},
account: {php echo !empty($account) ? json_encode($account) : 'null'},
uniaccount: {php echo !empty($uniaccount) ? json_encode($uniaccount) : 'null'},
headimgsrc: "{php echo $headimgsrc}",
qrcodeimgsrc: "{php echo $qrcodeimgsrc}",
{if in_array($account->typeSign, array(ACCOUNT_TYPE_SIGN, WXAPP_TYPE_SIGN))}
authstate: "{php echo $_W['setting']['platform']['authstate']}",
authurl: {php echo !empty($authurl) ? json_encode($authurl) : 'null'},
{/if}
links: {
basePost: "{php echo url('account/post/base', array('uniacid' => $uniacid, 'account_type' => ACCOUNT_TYPE))}",
siteroot: "{php echo in_array($account->typeSign, array(ACCOUNT_TYPE_SIGN)) ? $_W['siteroot'] : str_replace('http://', 'https://', $_W['siteroot'])}",
},
});
angular.bootstrap($('#js-account-manage-base'), ['accountApp']);
</script>
{template 'common/footer'}