提交
This commit is contained in:
76
jeepay-web/pom.xml
Normal file
76
jeepay-web/pom.xml
Normal file
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.jeequan</groupId>
|
||||
<artifactId>jeepay</artifactId>
|
||||
<version>Final</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>jeepay-web</artifactId> <!-- 项目名称 -->
|
||||
<packaging>jar</packaging>
|
||||
<version>${isys.version}</version> <!-- 项目当前版本号 -->
|
||||
<description>Jeepay码牌跳转</description> <!-- 项目描述 -->
|
||||
<url>https://www.jeequan.com</url>
|
||||
|
||||
<properties>
|
||||
<projectRootDir>${basedir}/../</projectRootDir>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- 依赖 sping-boot-web -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-aop</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<!-- 作为可执行jar -->
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
|
||||
<!-- resources资源配置项 -->
|
||||
<resources>
|
||||
<!-- 通用资源文件 -->
|
||||
<resource><directory>src/main/resources</directory><includes><include>**/*.*</include></includes></resource>
|
||||
|
||||
<!-- 放置通用配置yml文件, 开发时仅配置一套参数即可。 实际生产环境下应在每个项目下 与jar同级目录下新建application.yml覆写对应参数。 -->
|
||||
<resource>
|
||||
<directory>../conf/devCommons</directory>
|
||||
<includes><include>**/*.yml</include></includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<includeSystemScope>true</includeSystemScope>
|
||||
<outputDirectory>${session.executionRootDirectory}/target/</outputDirectory>
|
||||
</configuration> <!-- 包含本地jar文件 -->
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
|
||||
</project>
|
||||
44
jeepay-web/src/main/java/com/jeequan/jeepay/web/Shell.java
Normal file
44
jeepay-web/src/main/java/com/jeequan/jeepay/web/Shell.java
Normal file
@@ -0,0 +1,44 @@
|
||||
package com.jeequan.jeepay.web;
|
||||
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableScheduling
|
||||
@ComponentScan(basePackageClasses ={Shell.class})
|
||||
@Slf4j
|
||||
public class Shell {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(Shell.class);
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication springApplication = new SpringApplication(Shell.class);
|
||||
springApplication.run(args);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public CommandLineRunner commandLineRunner(ApplicationContext ctx) {
|
||||
return (args) -> {
|
||||
logger.info("=========================启动完成==========================");
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@Bean
|
||||
public static PropertySourcesPlaceholderConfigurer placeholderConfigurer() {
|
||||
PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();
|
||||
propertySourcesPlaceholderConfigurer.setIgnoreUnresolvablePlaceholders(true);
|
||||
return propertySourcesPlaceholderConfigurer;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.jeequan.jeepay.web;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("merchant")
|
||||
public class WebController {
|
||||
|
||||
@RequestMapping("/auth/{qrNo}")
|
||||
public String customQrCode(@PathVariable String qrNo, Model model){
|
||||
model.addAttribute("qrNo",qrNo);
|
||||
return "index";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/auth1/{qrNo}")
|
||||
public void qrNo(@PathVariable String qrNo, HttpServletRequest request, HttpServletResponse response){
|
||||
|
||||
try {
|
||||
request.getRequestDispatcher("/templates/index.html").forward(request,response);
|
||||
} catch (ServletException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping("/auth2/{qrNo}")
|
||||
public String qrNo(@PathVariable String qrNo, Model model){
|
||||
model.addAttribute("qrNo",qrNo);
|
||||
return "index";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
10
jeepay-web/src/main/resources/application.yml
Normal file
10
jeepay-web/src/main/resources/application.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
server:
|
||||
port: 9232 #设置端口
|
||||
servlet:
|
||||
context-path: /wab #设置应用的目录. 前缀需要带/, 无需设置后缀, 示例 【 /xxx 】 or 【 / 】
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
thymeleaf:
|
||||
prefix: classpath:/templates/
|
||||
suffix: .html
|
||||
153
jeepay-web/src/main/resources/templates/index.html
Normal file
153
jeepay-web/src/main/resources/templates/index.html
Normal file
@@ -0,0 +1,153 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>支付...</title>
|
||||
<style>
|
||||
.loading {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
.icon .icon {
|
||||
animation: aniRotate 2s linear infinite;
|
||||
}
|
||||
@keyframes aniRotate {
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
.icon .t {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="loading">
|
||||
<div class="icon">
|
||||
<svg
|
||||
t="1717473423945"
|
||||
class="icon"
|
||||
viewBox="0 0 1024 1024"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="4308"
|
||||
width="60"
|
||||
height="60"
|
||||
>
|
||||
<path
|
||||
d="M512 337.322667a26.666667 26.666667 0 0 1-26.666667-26.666667V197.333333a26.666667 26.666667 0 1 1 53.333334 0v113.322667c0 14.762667-11.946667 26.666667-26.666667 26.666667z"
|
||||
fill="#dbdbdb"
|
||||
p-id="4309"
|
||||
></path>
|
||||
<path
|
||||
d="M424.661333 360.746667a26.666667 26.666667 0 0 1-36.394666-9.728l-56.661334-98.133334a26.666667 26.666667 0 0 1 46.122667-26.666666l56.661333 98.133333a26.624 26.624 0 0 1-9.728 36.394667z"
|
||||
fill="#dbdbdb"
|
||||
opacity=".9"
|
||||
p-id="4310"
|
||||
></path>
|
||||
<path
|
||||
d="M360.746667 424.661333a26.624 26.624 0 0 1-36.394667 9.728l-98.133333-56.661333a26.624 26.624 0 1 1 26.666666-46.122667l98.133334 56.661334c12.714667 7.338667 17.066667 23.68 9.728 36.394666z"
|
||||
fill="#dbdbdb"
|
||||
opacity=".85"
|
||||
p-id="4311"
|
||||
></path>
|
||||
<path
|
||||
d="M337.322667 512c0 14.72-11.946667 26.666667-26.666667 26.666667H197.333333a26.666667 26.666667 0 1 1 0-53.333334h113.322667c14.762667 0 26.666667 11.946667 26.666667 26.666667z"
|
||||
fill="#dbdbdb"
|
||||
opacity=".8"
|
||||
p-id="4312"
|
||||
></path>
|
||||
<path
|
||||
d="M360.746667 599.338667a26.666667 26.666667 0 0 1-9.728 36.394666l-98.133334 56.661334a26.666667 26.666667 0 0 1-26.666666-46.122667l98.133333-56.661333a26.624 26.624 0 0 1 36.394667 9.728z"
|
||||
fill="#dbdbdb"
|
||||
opacity=".75"
|
||||
p-id="4313"
|
||||
></path>
|
||||
<path
|
||||
d="M424.661333 663.253333a26.624 26.624 0 0 1 9.728 36.394667l-56.661333 98.133333a26.624 26.624 0 1 1-46.122667-26.666666l56.661334-98.133334a26.666667 26.666667 0 0 1 36.394666-9.728z"
|
||||
fill="#dbdbdb"
|
||||
opacity=".7"
|
||||
p-id="4314"
|
||||
></path>
|
||||
<path
|
||||
d="M512 686.677333c14.72 0 26.666667 11.946667 26.666667 26.666667v113.322667a26.666667 26.666667 0 1 1-53.333334 0v-113.322667c0-14.762667 11.946667-26.666667 26.666667-26.666667z"
|
||||
fill="#dbdbdb"
|
||||
opacity=".65"
|
||||
p-id="4315"
|
||||
></path>
|
||||
<path
|
||||
d="M599.338667 663.253333a26.666667 26.666667 0 0 1 36.394666 9.728l56.661334 98.133334a26.666667 26.666667 0 0 1-46.122667 26.666666l-56.661333-98.133333a26.624 26.624 0 0 1 9.728-36.394667z"
|
||||
fill="#dbdbdb"
|
||||
opacity=".6"
|
||||
p-id="4316"
|
||||
></path>
|
||||
<path
|
||||
d="M663.253333 599.338667a26.624 26.624 0 0 1 36.394667-9.728l98.133333 56.661333a26.624 26.624 0 1 1-26.666666 46.122667l-98.133334-56.661334a26.666667 26.666667 0 0 1-9.728-36.394666z"
|
||||
fill="#dbdbdb"
|
||||
opacity=".55"
|
||||
p-id="4317"
|
||||
></path>
|
||||
<path
|
||||
d="M686.677333 512c0-14.72 11.946667-26.666667 26.666667-26.666667h113.322667a26.666667 26.666667 0 1 1 0 53.333334h-113.322667a26.666667 26.666667 0 0 1-26.666667-26.666667z"
|
||||
fill="#dbdbdb"
|
||||
opacity=".5"
|
||||
p-id="4318"
|
||||
></path>
|
||||
<path
|
||||
d="M663.253333 424.661333a26.666667 26.666667 0 0 1 9.728-36.394666l98.133334-56.661334a26.666667 26.666667 0 0 1 26.666666 46.122667l-98.133333 56.661333a26.624 26.624 0 0 1-36.394667-9.728z"
|
||||
fill="#dbdbdb"
|
||||
opacity=".4"
|
||||
p-id="4319"
|
||||
></path>
|
||||
<path
|
||||
d="M599.338667 360.746667a26.624 26.624 0 0 1-9.728-36.394667l56.661333-98.133333a26.624 26.624 0 1 1 46.122667 26.666666l-56.661334 98.133334a26.666667 26.666667 0 0 1-36.394666 9.728z"
|
||||
fill="#dbdbdb"
|
||||
opacity=".3"
|
||||
p-id="4320"
|
||||
></path>
|
||||
</svg>
|
||||
<span class="t">加载中...</span>
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://libs.baidu.com/jquery/2.0.3/jquery.min.js"></script>
|
||||
<script>
|
||||
const baseUrl = window.location.href;
|
||||
// const baseUrl = "https://www.baidu.com/1000502801";
|
||||
// return;
|
||||
$(document).ready(function () {
|
||||
let str = baseUrl.split("/");
|
||||
console.log(baseUrl);
|
||||
$.ajax({
|
||||
url: `https://pcweb.sxczgkj.cn/api/cashier/getisvNo/`,
|
||||
headers: {
|
||||
"Content-Type": "application/json;charset=UTF-8",
|
||||
},
|
||||
method: "get",
|
||||
data: {
|
||||
qrcId: str[str.length - 1],
|
||||
|
||||
},
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
if (res.code == 0) {
|
||||
window.location.href = res.data.ext.qrUrl;
|
||||
} else {
|
||||
alert(res.msg);
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user