Browse Source

支持自定义菜单

master
yashen 9 years ago
parent
commit
d89dedd1ff
7 changed files with 21 additions and 7 deletions
  1. +3
    -0
      B3WeChat.Web/B3WeChat.Web.csproj
  2. +6
    -0
      B3WeChat/Entities/ErrorObject.cs
  3. +5
    -1
      B3WeChat/Utils/InOutMessageUtil.cs
  4. +5
    -0
      WebFolder/app/app.11c262c3.js
  5. +0
    -5
      WebFolder/app/app.137764cc.js
  6. +1
    -1
      WebFolder/app/index.html
  7. +1
    -0
      WebFolder/config/Plugins/B3WeChat.plugin

+ 3
- 0
B3WeChat.Web/B3WeChat.Web.csproj View File

@ -121,6 +121,9 @@
<Compile Include="Pages\B3WeChat\ContentTemplate_\ContentTemplateList.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\B3WeChat\Tools\CustomMenuMan.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\WeChatReceive.cs" />
<Compile Include="Pages\WeChatLogin.cs" />
<Compile Include="PluginClass.cs" />


+ 6
- 0
B3WeChat/Entities/ErrorObject.cs View File

@ -17,5 +17,11 @@ namespace BWP.B3WeChat.Entities
return errcode > 0;
}
}
public void CheckError(){
if(IsError){
throw new Exception(string.Format("{0}:{1}", errcode, errmsg));
}
}
}
}

+ 5
- 1
B3WeChat/Utils/InOutMessageUtil.cs View File

@ -63,7 +63,11 @@ namespace BWP.B3WeChat.Utils
{
WebClient client = new WebClient();
var data = client.DownloadData(url);
return Encoding.UTF8.GetString(data);
var result = Encoding.UTF8.GetString(data);
jsonHelper.Deserialize<WeChatResponseBase>(result).CheckError();
return result;
}
static T PostRequest<T>(string url, string json) where T : WeChatResponseBase


+ 5
- 0
WebFolder/app/app.11c262c3.js
File diff suppressed because it is too large
View File


+ 0
- 5
WebFolder/app/app.137764cc.js
File diff suppressed because it is too large
View File


+ 1
- 1
WebFolder/app/index.html View File

@ -22,7 +22,7 @@
<body ontouchstart>
<div class="container" id="container"></div>
<script src="app.137764cc.js"></script>
<script src="app.11c262c3.js"></script>
</body>
</html>

+ 1
- 0
WebFolder/config/Plugins/B3WeChat.plugin View File

@ -28,5 +28,6 @@
</Security>
<Menus>
<Menu id="0001" name="/B3微信/内容模板" roles="B3WeChat.内容模板.访问" url="B3WeChat/ContentTemplate_/ContentTemplateList.aspx"/>
<Menu id="0002" name="/B3微信/自定义菜单" roles="B3WeChat.内容模板.访问" url="B3WeChat/Tools/CustomMenuMan.aspx"/>
</Menus>
</Plugin>

Loading…
Cancel
Save