mirror of
https://github.com/DzzXH/DzzOffice.git
synced 2026-01-23 15:05:20 +08:00
136 lines
4.3 KiB
HTML
136 lines
4.3 KiB
HTML
<!--{template common/header_simple_start}-->
|
|
<script src="admin/scripts/admin.js?{VERHASH}"></script>
|
|
<style>
|
|
.loginset-template {
|
|
width: 100px;
|
|
height: 100px;
|
|
overflow: hidden;
|
|
float: left;
|
|
margin-right: 10px;
|
|
display: block;
|
|
position: relative;
|
|
}
|
|
.loginset-template .loginset-template-icon {
|
|
width: 20px;
|
|
height: 20px;
|
|
border: 1px solid #AAB479;
|
|
position: absolute;
|
|
right: 1px;
|
|
top: 1px;
|
|
color: #DD4B39;
|
|
font-size: 15px;
|
|
display: none;
|
|
}
|
|
.loginset-template:hover .loginset-template-icon {
|
|
display: block;
|
|
}
|
|
.loginset-template:hover .loginset-template-icon > span {
|
|
display: none;
|
|
}
|
|
.loginset-template .loginset-template-icon1 {
|
|
display: block !important;
|
|
}
|
|
.loginset-template .loginset-template-icon1 > span {
|
|
display: block !important;
|
|
}
|
|
#cpform {
|
|
margin-top: 15px;
|
|
}
|
|
</style>
|
|
<!--{template common/header_simple_end}-->
|
|
<!--{template common/commer_header}-->
|
|
<div class="bs-container clearfix">
|
|
<div class="bs-left-container clearfix">
|
|
<!--{template left}-->
|
|
</div>
|
|
<div class="left-drager">
|
|
<div class="left-drager-op">
|
|
<div class="left-drager-sub"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bs-main-container clearfix">
|
|
<div class="main-header">
|
|
<ul class="nav nav-pills">
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
<div class="main-header clearfix">
|
|
<ul class="nav nav-pills">
|
|
<li class="nav-item"> <a href="{MOD_URL}&operation=qywechat">{lang enterprise_binding}</a> </li>
|
|
<li class="nav-item"><a href="{MOD_URL}&op=assistant">{lang enterprise_little_helper}</a> </li>
|
|
<li class="nav-item"><a class="nav-link active" href="{MOD_URL}&op=wxsyn">{lang data_synchronization}</a> </li>
|
|
|
|
</ul>
|
|
</div>
|
|
<div class="main-content">
|
|
<p style="line-height: 2;">{lang seeting_wxsyn_bound_state} </p>
|
|
<button class="btn btn-info" data-loading-text="{lang are_synchronized}" onclick="qywechat_syn_org(this,0,0)">{lang start_sync_weixin}</button>
|
|
|
|
<button class="btn btn-info ml20" data-loading-text="{lang are_synchronized}" onclick="qywechat_syn_org(this,1,0)">{lang start_sync_weixin_down}</button>
|
|
<div id="syn_info" class="alert"></div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
|
|
function qywechat_syn_org(button,j,i) {
|
|
if(!i) i = 0;
|
|
var el = jQuery(button);
|
|
if(i == 0) el.button('loading');
|
|
var url='{MOD_URL}&op=wxsyn&do=qiwechat_syn_org&i=' + i;
|
|
var msg = '{lang start_sync_section_weixin}';
|
|
if( j==1 ){
|
|
url='{MOD_URL}&op=wxsyn_down&do=qiwechat_syn_org&i=' + i;
|
|
msg = '{lang start_sync_section_weixin_down}';
|
|
}
|
|
jQuery.getJSON(url, function(json) {
|
|
if(json.error) {
|
|
el.html(json.error);
|
|
window.setTimeout(function() {
|
|
el.html( msg );
|
|
el.button('reset'); }, 1000);
|
|
} else if(json.msg == 'continue') {
|
|
jQuery('#syn_info').append('<p>' + json.message + '</p>');
|
|
jQuery('.bs-main-container').scrollTop(jQuery('.main-content').height());
|
|
window.setTimeout(function() { qywechat_syn_org(button,j, json.start) }, 500);
|
|
} else if(json.msg == 'success') {
|
|
jQuery('#syn_info').append('{lang synchronization_section_p}');
|
|
jQuery('.bs-main-container').scrollTop(jQuery('.main-content').height());
|
|
qywechat_syn_user(button,j, 0);
|
|
}
|
|
});
|
|
}
|
|
|
|
function qywechat_syn_user(button,j, i) {
|
|
if(!i) i = 0;
|
|
var el = jQuery(button);
|
|
if(i == 0) el.button('loading');
|
|
var url='{MOD_URL}&op=wxsyn&do=qiwechat_syn_user&i=' + i;
|
|
var msg = '{lang synchronization_weinxin}';
|
|
var msg2 = '{lang synchronization_weinxin_success_down}';
|
|
if( j==1 ){
|
|
url='{MOD_URL}&op=wxsyn_down&do=qiwechat_syn_user&i=' + i;
|
|
msg = '{lang synchronization_weinxin_down}';
|
|
msg2 = '{lang synchronization_weinxin_success_down}';
|
|
}
|
|
|
|
jQuery.getJSON(url, function(json) {
|
|
if(json.error) {
|
|
jQuery('#syn_info').append('<p>' + json.error + '</p>');
|
|
window.setTimeout(function() { el.html( msg );
|
|
el.button('reset'); }, 1000);
|
|
} else if(json.msg == 'continue') {
|
|
if(json.message) jQuery('#syn_info').append('<p>' + json.message + '</p>');
|
|
jQuery('.bs-main-container').scrollTop(jQuery('.main-content').height());
|
|
window.setTimeout(function() { qywechat_syn_user(button,j, json.start) }, 500);
|
|
} else if(json.msg == 'success') {
|
|
jQuery('#syn_info').append('{lang synchronization_success}');
|
|
window.setTimeout(function() { el.html( msg2 ); }, 1000);
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
<!--{template common/footer_simple}--> |