uixml+H5 demo

本文介绍了一组配置文件的具体内容,包括config.xml、template.uixml、template.html等文件的结构与功能实现方式。通过这些文件,可以了解到应用的基本配置、UI布局及交互逻辑。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config scope="client" clientversion="4" devicetype="all" theme="skin-default"> 
  <appid>dwtemplate</appid>  
  <appname>dwtemplate</appname>  
  <description></description>  
  <version>1.0.0</version>  
  <date>2016-02-03</date>  
  <homepage src="res:page/template.uixml"/>  
  <faultconfig src=""/>  
  <access network="true" gps="true" camera="true" certificate="true" land="false" orientation="port"/>  
  <vendor email="" url=""/>  
  <icon main="res:image/main.png" logo="res:image/logo.png"/> 
</config>

 

template.uixml

<!-- ExMobi UIXML(XHTML)文件 -->
<html>
	<head>
		<title show="false"></title>	
		<meta content="charset=utf-8"/>
		<script>
		<![CDATA[
			
		]]>
		</script>
	</head>
	<body>
		<webview url="res:page/template.html"></webview>		
	</body>
</html>

 

template.html

<!-- HTML5文件 -->
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8"/>
		<title>ceshi</title>
		<script type="text/javascript" src="../script/jquery-3.1.0.min.js"></script>
		<script>
			$(document).ready(function(){
				$("#load").click(function(){
						$.get("http://localhost:8001/process/service/dwtemplate/template", function(data, status) {
							alert(data.dw);
						});
				});
			})
		</script>
	</head>
	<body>
		<button id="load">加载</button>
	</body>
</html>

 

mapp.xml

<?xml version="1.0" encoding="UTF-8" ?>
<maxml version="2.0" xmlns="http://www.nj.fiberhome.com.cn/map"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.nj.fiberhome.com.cn/map maxml-2.0.xsd">
	<config>
		<htmlformat wellformat="true" />
		<filepreviewconfig wordtohtml="false" />
	</config>

	<services>
		<http-filter name="template" file="template.jsp">
			<url-pattern>/template</url-pattern>
		</http-filter>
		<http-service-ext extfile="testapi.ac" />
	</services>
</maxml>

 

 

template.jsp

<%-- ExMobi JSP文件,注释和取消快捷键统一为Ctrl+/ 多行注释为Ctrl+Shift+/ --%>
<%@ page language="java" import="java.util.*"
 contentType="application/uixml+xml; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/client/adapt.jsp"%>
<%@ include file="/client/adapt_extend.jsp"%>
<aa:http id="template" url='<%="http://localhost:8001/process/service/dwtemplate/data/template.json"%>' method="get"/>
<%
	String data = aa.regex(".*", "template");
	System.out.print(data);
	response.setCharacterEncoding("UTF-8");
	response.setContentType("application/json; charset=utf-8");
	response.addHeader("Access-Control-Allow-Origin", "*");
	response.getWriter().write(data);
%>

template.json

{
	"dw":"测试json"
}

 

testapi.ac

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<maxml-api xsi:schemaLocation="http://www.nj.fiberhome.com.cn/map ../../../maxml-api-2.0.xsd" xmlns="http://www.nj.fiberhome.com.cn/map" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <http-service id="testapi" isrest="true" name="测试模块">
        <forward method="get" name="测试" path="template.jsp" pattern="/template"/>
    </http-service>
</maxml-api>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值