Переглянути джерело

交易记录的网络异常改完了

zhangyang 5 роки тому
батько
коміт
9650a5c5a0

+ 3 - 4
bin/Win32/Debug/zhipuzi_pay_plugin/skin/jiaoyijilu_wnd.xml

@@ -2,7 +2,7 @@
 <Window size="800,600" caption="0,0,0,44" roundcorner="4,4">
 	<Font id="0" name="微软雅黑" size="16"/>
 	<Font id="1" name="微软雅黑" size="40"/>
-	<Font id="2" name="微软雅黑" size="18"/>
+	<Font id="2" name="微软雅黑" size="22"/>
 	<Font id="3" name="微软雅黑" size="32"/>
 	<VerticalLayout bkimage="shoukuan_bkg.png">
 		<HorizontalLayout name="jiaoyijilu_title_bkg" height="44" bkcolor="0xFF3CB371">
@@ -27,12 +27,11 @@
 					<ListHeaderItem text="订单号" enabled="false" dragable="false" />
 				</List>  
 			</HorizontalLayout>
-			<HorizontalLayout name="jiaoyijilu_error" padding="0,50,0,0" height="30">
+			<HorizontalLayout name="jiaoyijilu_error_layout" float="true" pos="0,200,800,300" height="30">
 				<Control></Control>
-				<Label text="错误信息" font="2" width="120"></Label>
+				<Label name="jiaoyijilu_error" text="错误信息1" font="2"></Label>
 				<Control></Control>
 			</HorizontalLayout>
-			<Control></Control>
 		</VerticalLayout>
 		<HorizontalLayout height="60">
 			<Button name="jiaoyijilu_list_last" width="70" height="36" padding="20,4,0,0" text="上一页" normalimage="file='Btn_White.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_White_Click.png' corner='5,5,5,5'" />

+ 5 - 5
zhipuzi_pay_plugin/wnd/CJiaoyijiluWnd.cpp

@@ -340,6 +340,7 @@ void CJiaoyijiluWnd::StartRefreshWork()
 		return;
 	}
 
+	//网络请求没问题了,准备开始渲染了,把之前的错误信息隐藏
 	ShowError(false);
 
 	rapidjson::Value& data = document["data"];
@@ -350,9 +351,6 @@ void CJiaoyijiluWnd::StartRefreshWork()
 	CListUI* pJiaoyijiluList = static_cast<CListUI*>(m_pm.FindControl(_T("jiaoyijilu_list")));
 	pJiaoyijiluList->RemoveAll();
 
-	ShowError(true, L"测试错误提示");
-	return;
-
 	rapidjson::Value& rows = data["rows"];
 	for (rapidjson::SizeType i = 0; i < rows.Size(); ++i)
 	{
@@ -424,19 +422,21 @@ void CJiaoyijiluWnd::StartRefreshWork()
 void CJiaoyijiluWnd::ShowError(bool is_show, std::wstring msg)
 {
 	CListUI* pJiaoyijiluList = static_cast<CListUI*>(m_pm.FindControl(_T("jiaoyijilu_list")));
+
+	CHorizontalLayoutUI* errorLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("jiaoyijilu_error_layout")));
 	CLabelUI* errorLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("jiaoyijilu_error")));
 
 	if (is_show)
 	{		
 		pJiaoyijiluList->RemoveAll();
 		
+		errorLayout->SetVisible(true);
 		errorLabel->SetText(msg.c_str());
-		errorLabel->SetVisible(true);
 
 		m_is_query = false;
 	}
 	else
 	{
-		errorLabel->SetVisible(false);
+		errorLayout->SetVisible(false);
 	}
 }