Commit 6c5c4e1e authored by hujun's avatar hujun

Merge remote-tracking branch 'origin/test' into test

parents e47181b2 b09336b9
...@@ -386,9 +386,9 @@ ...@@ -386,9 +386,9 @@
<input type="checkbox" class="yetai" id="" value="其他">其他 <input type="checkbox" class="yetai" id="" value="其他">其他
</label> </label>
</li> </li>
<li class="list-group-item"> <li class="list-group-item" id="shangpu_tags_area">
<label for="">商铺标签(可多选)</label> <label for="">商铺标签(可多选)</label>
<label class="checkbox-inline"> <!--<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="购物广场" name="shangpu_tags[]">购物广场 <input type="checkbox" class="roomTag" id="" value="购物广场" name="shangpu_tags[]">购物广场
</label> </label>
<label class="checkbox-inline"> <label class="checkbox-inline">
...@@ -441,7 +441,7 @@ ...@@ -441,7 +441,7 @@
</label> </label>
<label class="checkbox-inline"> <label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="40831" name="shangpu_tags[]">40831 <input type="checkbox" class="roomTag" id="" value="40831" name="shangpu_tags[]">40831
</label> </label>-->
</li> </li>
<li class="list-group-item"> <li class="list-group-item">
<div class="form-group" id="li_landlord_phone_input"> <div class="form-group" id="li_landlord_phone_input">
......
This diff is collapsed.
...@@ -45,7 +45,7 @@ $(function(){ ...@@ -45,7 +45,7 @@ $(function(){
success: function(data) { success: function(data) {
if(typeof data === 'object') { if(typeof data === 'object') {
if (data.code == 200) { if (data.code == 200) {
localStorage.setItem('user_info', JSON.stringify(data.data)); sessionStorage.setItem('pcUserInfo',encodeURIComponent(JSON.stringify(data.data)));//存储PC后台登录用户所有信息
location.href = '/admin.php/index/banner'; location.href = '/admin.php/index/banner';
}else { }else {
alert(data['msg']); alert(data['msg']);
......
...@@ -29,16 +29,15 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html'], function (doT, $,t ...@@ -29,16 +29,15 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html'], function (doT, $,t
function menu_bar() { function menu_bar() {
var user_info_obj = localStorage.getItem('user_info'); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(sessionStorage.getItem('pcUserInfo'))); //读取缓存
$ ("#menu_bar").append (template); $ ("#menu_bar").append (template);
if (typeof user_info_obj === 'string') { if (typeof user_info_obj === 'string') {
var user_info = JSON.parse(user_info_obj);
var temp = document.getElementById ('menu_tpl').innerHTML; var temp = document.getElementById ('menu_tpl').innerHTML;
var doTtmpl = doT.template (temp); var doTtmpl = doT.template (temp);
$ ("#dropdownMenu1").append(user_info['name']); $ ("#dropdownMenu1").append(user_info_obj['name']);
$ ("#menu_bar").html (doTtmpl (user_info['menu'])); $ ("#menu_bar").html (doTtmpl (user_info_obj['menu']));
} else { } else {
$.ajax ({ $.ajax ({
...@@ -58,7 +57,7 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html'], function (doT, $,t ...@@ -58,7 +57,7 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html'], function (doT, $,t
} }
$("#logout").click(function () { $("#logout").click(function () {
localStorage.removeItem('user_info'); sessionStorage.removeItem('pcUserInfo');
}); });
}); });
function getUrlParam(name) { function getUrlParam(name) {
...@@ -94,12 +93,11 @@ String.prototype.stringFormatObj = function(){ ...@@ -94,12 +93,11 @@ String.prototype.stringFormatObj = function(){
* @returns {boolean} * @returns {boolean}
*/ */
function check_auth(auth_rule) { function check_auth(auth_rule) {
var user_info_obj = localStorage.getItem('user_info'); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(sessionStorage.getItem('pcUserInfo'))); //读取缓存
var user_info = JSON.parse(user_info_obj);
var result = false; var result = false;
if (user_info.id != 1) { if (user_info_obj.id != 1) {
$.each(user_info.auth,function (i, val) { $.each(user_info_obj.auth,function (i, val) {
if (val['name'] == auth_rule) { if (val['name'] == auth_rule) {
result = true; result = true;
} }
......
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