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.
65 lines
2.6 KiB
65 lines
2.6 KiB
{php include wl_template('common/header');}
|
|
<div class="app-content">
|
|
<ul class="nav nav-tabs">
|
|
<li class="active"><a href="#">推送商户动态</a></li>
|
|
</ul>
|
|
<div class="panel" style="padding: 20px 20px 0 20px;">
|
|
<div class="alert alert-warning">
|
|
正在推送商户动态, 请不要关闭窗口.
|
|
</div>
|
|
<div class="form-horizontal ng-cloak" ng-controller="processor">
|
|
<dl class="dl-horizontal">
|
|
<dt>总计推送粉丝数量</dt>
|
|
<dd>{{pragress}}</dd>
|
|
<dt>整体进度条</dt>
|
|
<dd>
|
|
<div class="progress">
|
|
<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="{{file}}" aria-valuemin="0" aria-valuemax="100" style="width: {{file}}%">
|
|
<span class="sr-only">{{file}}% Complete (success)</span>
|
|
</div>
|
|
</div>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<script>
|
|
require(['angular'], function(angular){
|
|
angular.module('app', []).controller('processor', function($scope, $http){
|
|
var total = {$fannum};
|
|
var i = 0;
|
|
var pindex = 0;
|
|
var res = 0;
|
|
var proc = function() {
|
|
if(res == 3 && i != 0 ){
|
|
layer.open({
|
|
content: '恭喜您,商户动态推送完成!共计'+total+'条,成功'+i+'条',
|
|
yes: function(index, layero){
|
|
location.href = '{php echo web_url("store/storeDynamic/dynamic");}';
|
|
layer.close(index); //如果设定了yes回调,需进行手工关闭
|
|
}
|
|
});
|
|
return;
|
|
}
|
|
$http.post('{php echo web_url("store/storeDynamic/senddyning",array("id" => $id,"firsttext"=>$firsttext,"remark"=>$remark,"content"=>$content,"source"=>$source));}', {
|
|
"pindex":pindex,"success":i
|
|
}).success(function(dat){
|
|
if(dat.result == 1){
|
|
i = dat.success;
|
|
pindex ++;
|
|
$scope.file = (i/total)*100;
|
|
$scope.pragress = i + '/' + total;
|
|
}else if(dat.result == 3){
|
|
res = 3;
|
|
}
|
|
proc();
|
|
}).error(function(){
|
|
proc();
|
|
});
|
|
}
|
|
proc();
|
|
});
|
|
angular.bootstrap(document, ['app']);
|
|
});
|
|
</script>
|
|
</div>
|
|
</div>
|
|
{php include wl_template('common/footer');}
|
|
|