<%@ Page Title="" Language="C#" MasterPageFile="~/Master/HelpMaster.master" CodeBehind="ServiceList.aspx.cs" Inherits="WAP2P.Web.PC.Help.ServiceList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
    <div class="m-globalbox pb10">
        <h3 class="fs24 fcblue-2 pl20 pr20 pt10 pb10">客服列表</h3>
        <ul class="m-servicelist">
            <ruson:Repater runat="server" ID="rptServiceList" ItemType="WAP2P.Sys.Admin">
                <ItemTemplate>
                    <li>
                        <div class="servicelist-up g-ohide">
                            <div class="servicelist-photo g-left">
                                <img src="<%# string.IsNullOrEmpty(Item.Face) ? "../res/core/Images/default/defaultphoto.png" : Item.Face %>" />
                            </div>
                            <div class="servicelist-info g-left">
                                <h5 class="fs16"><%# string.IsNullOrEmpty(Item.Nickname) ? "匿名客服" : Item.Nickname.LeftX(6) %> <%# CurrentUser == null ? string.Empty : currentUserHasService == 0 ? string.Format("<a href=\"javascript:void(0);\" class=\"fs12 ff-songti\" data-serviceid=\"{0}\">[设为专属客服]</a>", Item.Id) : currentUserHasService == Item.Id ? "<span class=\"fs12 ff-songti fcred-2\">[我的专属客服]</span>" : string.Empty %></h5>
                                <p>手机：<%# string.IsNullOrEmpty(Item.Phone) ? "未设置" : Item.Phone %></p>
                                <p>邮箱：<%# string.IsNullOrEmpty(Item.Email) ? "未设置" : Item.Email %></p>
                                <p><%# string.IsNullOrWhiteSpace(Item.QQ) ? string.Empty : string.Format("<a target=\"_blank\" href=\"http://wpa.qq.com/msgrd?v=3&amp;uin={0}&amp;site=qq&amp;menu=yes\"><img border=\"0\" src=\"http://wpa.qq.com/pa?p=2:{0}:41\">&nbsp;</a>", Item.QQ) %></p>
                            </div>
                        </div>
                        <div class="servicelist-bottom">
                            <p><%# string.IsNullOrEmpty(Item.Remark) ? "这个客服很神秘，什么都没有留下！" : Item.Remark %></p>
                        </div>
                    </li>
                </ItemTemplate>
            </ruson:Repater>
        </ul>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
    <script type="text/javascript">
        $(function () {
            $(".servicelist-info h5 a").click(function () {
                $.ajax({
                    type: 'get',
                    url: '?',
                    cache: false,
                    dataType: 'json',
                    data: { action: "setService", serviceid: $(this).attr("data-serviceid") },
                    success: function (res) {                      
                        if (res.Success) {
                            $.jSuccess('设置专属客服成功',function () { location.reload() });
                        } else {
                            $.jError(res.Message);                            
                        }
                    }
                });
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="list" runat="server">
</asp:Content>
