intra-mart实现简易登录页面笔记

一、前言

最近在学习intra-mart框架,在此总结下笔记。

intra-mart是一个前后端不分离的框架,开发时主要用的就是xml、html、js这几个文件;
xml文件当做配置文件,html当做前端页面文件,js当做后端文件(js里能连接数据库);
所以js文件需要注意,因为算后端文件,其中的语法与前端开发的js有些不太相同(日志打印不能用console.log)。

二、代码部分

1.路由文件

WEB-INF/conf/routing-jssp-config/test.xml

<?xml version="1.0" encoding="UTF-8"?>
<routing-jssp-config
    xmlns="http://www.intra-mart.jp/router/routing-jssp-config"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.intra-mart.jp/router/routing-jssp-config routing-jssp-config.xsd">

    <authz-default mapper="welcome-all" />

    <file-mapping path="/test/test1" page="test/myTest1" />
    <file-mapping path="/test/test2" page="test/myTest2" />
    <file-mapping path="/test/test3" page="test/myTest3" />
    
</routing-jssp-config>

其中用到了3个路径,test1是登录首页,test2是登录后的页面,test3只是一个接口,用来实现一个简单的注册功能。

2.登录页面

用到了2个文件:
WEB-INF/jssp/src/test/myTest1.html


<script src="ui/libs/jquery-validation-1.9.0/jquery.validate.js"></script>
<script type="text/javascript">

console.log("加载js")


jQuery(function() {

    jQuery('#register').click(function() {
      console.log("点击按钮")
      console.log(jQuery('#userName').val())

      jQuery.ajax({
          headers:{'test1':'mytest'},
          error:imuiTransitionToErrorPage,
          async:false, cache:fa
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

追逐梦想永不停

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值