using System;
using System.Web;
using System.Web.UI;
using BoyunBase;
using SiteCore;

public partial class Part_OnlineWang : System.Web.UI.UserControl
{
    protected void Page_Load( object sender, EventArgs e )
    {
        try {
            if( IsPostBack ) return;

            PartAccess pAcs = new PartAccess( this );
            if( !pAcs.IsReady ) return;

            // http://amos1.taobao.com/msg.ww?v=2&uid=dfasdfasd&site=cntaobao&s=1     // 旺旺临时会话代码
            // http://amos1.taobao.com/online.ww?v=2&uid=dfasdfasd&site=cntaobao&s=1  // 旺旺在线图片路径
            // http://amos1.taobao.com/online.ww?v=2&uid=dfasdfasd&site=cntaobao&s=2

            string wangName = pAcs.Settings["WangName"];
            string pt = pAcs.Parames["partTemplate"];
            string query = "?v=2&uid=" + wangName + "&site=cntaobao&s=" + pt;

            lnkWang.HRef = "http://amos1.taobao.com/msg.ww" + query; 
            imgWang.Src = "http://amos1.taobao.com/online.ww" + query; 

        } catch( Exception ex ) {
            Todo.DebugOut( "加载 Part_OnlineWang 出现异常：" + ex.Message );
        }
    }
}
