Commit 512474ce authored by agping's avatar agping

pk列表 修改

parent bfe7df66
...@@ -136,10 +136,7 @@ ...@@ -136,10 +136,7 @@
<div class="pk-container-detail-header"> <div class="pk-container-detail-header">
<span class="margain-right-10 pk-yeji-bang">业绩PK榜</span> <span class="margain-right-10 pk-yeji-bang">业绩PK榜</span>
<span class="margain-right-10 pk-yeji-time">(2018.11.01-2018.11.16)</span> <span class="margain-right-10 pk-yeji-time">(2018.11.01-2018.11.16)</span>
<select class="results-pk" id="realtime_city_choose"> <select class="results-pk">
<option value="">城市筛选</option>
<option value="10001">上海市</option>
<option value="10002">杭州市</option>
</select> </select>
<img src="/resource/image/gold@1x.png" class="img-gold"/> <img src="/resource/image/gold@1x.png" class="img-gold"/>
</div> </div>
......
define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template) { define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template) {
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
pkList = { pkList = {
pageNo: 1, pageNo: 1,
/*第几页*/ /*第几页*/
...@@ -11,6 +10,7 @@ define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css', ...@@ -11,6 +10,7 @@ define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css',
init: function() { init: function() {
//初始化dot //初始化dot
$(document.body).append(template); $(document.body).append(template);
pkList.getCitySite();
pkList.getList(0); pkList.getList(0);
pkList.event(); pkList.event();
}, },
...@@ -107,7 +107,31 @@ define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css', ...@@ -107,7 +107,31 @@ define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css',
}; };
} }
}); });
},
getCitySite:function(){
//显示 隐藏城市 默认显示 当前账号 所在城市
$.ajax({
url: '/index/getSiteList',
type: 'GET',
async: true,
data: {
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
console.log(88)
var str = '';
$.each(data.data.list, function(i, item) {
str += '<option value="' + item.id + '">' + item.city + '</option>';
});
$(".results-pk").append(str);
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
$('.results-pk').val(user_info_obj.site_id);
}
} }
});
},
}; };
return pkList; return pkList;
}); });
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment