Commit bbedfb6e by DuJunLi

Initial commit

parents
# Default ignored files
/shelf/
/workspace.xml
api-storage
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="api-fitness-storage" />
</profile>
</annotationProcessing>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="api-fitness-storage" options="-parameters" />
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="dataSourceStorageLocal" created-in="IU-223.8617.56">
<data-source name="xm_sports@120.27.248.253" uuid="fd03f9a1-7521-49bf-bbfe-9113f5047415">
<database-info product="MySQL" version="5.7.32" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-j-8.2.0 (Revision: 06a1f724497fd81c6a659131fda822c9e5085b6c)" dbms="MYSQL" exact-version="5.7.32" exact-driver-version="8.2">
<extra-name-characters>#@</extra-name-characters>
<identifier-quote-string>`</identifier-quote-string>
</database-info>
<case-sensitivity plain-identifiers="exact" quoted-identifiers="exact" />
<secret-storage>master_key</secret-storage>
<user-name>root</user-name>
<schema-mapping>
<introspection-scope>
<node kind="schema" qname="@" />
</introspection-scope>
</schema-mapping>
</data-source>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="xm_sports@120.27.248.253" uuid="fd03f9a1-7521-49bf-bbfe-9113f5047415">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://120.27.248.253:3306/xm_sports</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>
\ No newline at end of file
#n:information_schema
!<md> [null, 0, null, null, -2147483648, -2147483648]
#n:performance_schema
!<md> [null, 0, null, null, -2147483648, -2147483648]
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/META-INF/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/webapp" charset="UTF-8" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.raccoon</groupId>
<artifactId>api-fitness-storage</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>web-demo Maven Webapp</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.4.RELEASE</version>
<relativePath/>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>3.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<version>2.2.4</version>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>javax.el</artifactId>
<version>2.2.4</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.40</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources/</directory>
</resource>
<resource>
<directory>src/main/webapp/</directory>
<targetPath>META-INF/resources</targetPath>
<includes>
<include>**/**</include>
</includes>
</resource>
<resource>
<directory>META-INF/resources</directory>
<targetPath>META-INF/resources</targetPath>
<includes>
<include>**/**</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.2.5.RELEASE</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
package com.djl;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
/**
* @author chengyubing
* @since 2023/1/30 18:05
*/
@Configuration
@ImportResource(value={"classpath:application-bean.xml"})
@EnableAutoConfiguration
@ComponentScan
@MapperScan("com.djl.mapper")
public class WebDemoApplication extends SpringBootServletInitializer implements CommandLineRunner {
public static void main(String[] args) {
SpringApplication.run(WebDemoApplication.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(WebDemoApplication.class);
}
@Override
public void run(String... arg0) throws Exception {
}
}
package com.djl.config;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @author adu
* data 2023/2/16 16:22
*/
@Configuration
@MapperScan("com.djl.mapper")
public class MybatisPlusConfig {
@Bean
public PaginationInterceptor paginationInterceptor() {
return new PaginationInterceptor();
}
}
\ No newline at end of file
package com.djl.config;
import com.djl.interceptor.LoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* @author adu
* data 2023/2/15 16:08
*/
@Configuration
public class WebAppConfig implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new LoginInterceptor())
.addPathPatterns("/**")
.excludePathPatterns("/js/**", "/css/**", "/images/**", "/calendar/**");
}
}
\ No newline at end of file
package com.djl.controller;
import com.alibaba.fastjson.JSON;
import com.djl.model.ApiInfo;
import com.djl.model.LoginAccountInfo;
import com.djl.model.RestResponse;
import com.djl.service.ApiInfoService;
import com.djl.service.LoginAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;
/**
* @author adu
* data 2023/2/14 11:32
*/
@RestController
@Validated
public class AccountInfoController extends BaseController{
@Autowired
private LoginAccountService loginAccountService;
@PostMapping("/private/api/addAccountInfo")
public RestResponse addApiInfo(@RequestBody @Valid LoginAccountInfo loginAccountInfo ){
System.out.println(JSON.toJSONString(loginAccountInfo));
loginAccountService.addLoginAccount(loginAccountInfo);
return success();
}
@PostMapping("/private/api/accountList")
public RestResponse accountList(@RequestBody String accountNo ){
return success(loginAccountService.getAccountList(accountNo));
}
}
\ No newline at end of file
package com.djl.controller;
import com.alibaba.fastjson.JSON;
import com.djl.model.ApiInfo;
import com.djl.model.RestResponse;
import com.djl.service.ApiInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpSession;
import javax.validation.Valid;
/**
* @author adu
* @since 2023/1/30 17:04
*/
@Slf4j
@RestController
@Validated
public class ApiInfoController extends BaseController{
@Autowired
private ApiInfoService apiInfoService;
@PostMapping("/private/api/addApiInfo")
public RestResponse addApiInfo(@RequestBody @Valid ApiInfo apiInfo, HttpSession session ){
System.out.println(JSON.toJSONString(apiInfo));
apiInfoService.addApiInfo(apiInfo,session);
return success();
}
@PostMapping("/private/api/apiList")
public RestResponse apiList(@RequestBody String apiPath ){
return success(apiInfoService.getApiList(apiPath));
}
@PostMapping("/private/api/delete")
public RestResponse deleteApi(@RequestBody ApiInfo info){
apiInfoService.deleteApi(info.getId());
return success();
}
@PostMapping("/private/api/modify")
public RestResponse modifyApi(@RequestBody @Valid ApiInfo info){
if(info.getId()==null){
throw new RuntimeException("id为空");
}
apiInfoService.updateApi(info);
return success();
}
}
package com.djl.controller;
import com.djl.enums.StatusCodeEnum;
import com.djl.model.RestResponse;
import org.springframework.stereotype.Controller;
@Controller
public class BaseController {
protected RestResponse success() {
return RestResponse.builder()
.code(StatusCodeEnum.SUCCESS.getCode())
.message(StatusCodeEnum.SUCCESS.getMsg())
.build();
}
protected RestResponse success(Object data) {
return RestResponse.builder()
.code(StatusCodeEnum.SUCCESS.getCode())
.message(StatusCodeEnum.SUCCESS.getMsg())
.data(data)
.build();
}
protected RestResponse fail(String failMsg){
return RestResponse.builder()
.code(StatusCodeEnum.FAIL.getCode())
.message(failMsg)
.build();
}
protected RestResponse fail(int code, String failMsg){
return RestResponse.builder()
.code(code)
.message(failMsg)
.build();
}
}
package com.djl.controller;
import com.alibaba.fastjson.JSON;
import com.djl.model.RestResponse;
import com.djl.model.User;
import com.djl.service.UserService;
import com.djl.util.Constants;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.validation.Valid;
@Slf4j
@RestController
@Validated
public class UserController extends BaseController{
@Autowired
private UserService userService;
@PostMapping(value = "/private/api/register")
public RestResponse register(@RequestBody @Valid User user){
System.out.println(JSON.toJSONString(user));
Boolean flag=userService.addOrUpdateUser(user);
if(flag!=true){
return fail("注册失败,手机号已经存在");
}
return success();
}
@PostMapping("/private/api/login")
public RestResponse login(@RequestBody @Valid User user, HttpServletRequest request, HttpSession session) {
//获取登录页面传来的信息
String userPhone = user.getPhone();
String userPassword = user.getPassword();
//和数据库中的密码进行对比,调用业务层
//把登录的人的信息查到
User user1 = userService.checkLogin(userPhone, userPassword);
// 检查是否重名
if (user1 == null) {
//查无此人
//转发回登录页面 提示 用户名或密码错误
return fail("登录手机号或密码不正确");
} else {
//查有此人
//将用户的信息放在session中
request.getSession().setAttribute(Constants.USER_SESSION, user1);
//跳转到主页
}
session.setAttribute("operator", user1.getPhone());
session.setAttribute("isLogin", true);
return success();
}
}
package com.djl.controller.advance;
import com.djl.enums.StatusCodeEnum;
import com.djl.exception.BizException;
import com.djl.model.RestResponse;
import org.springframework.validation.BindException;
import org.springframework.validation.BindingResult;
import org.springframework.validation.ObjectError;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.validation.ConstraintViolationException;
/**
* @author adu
* data 2023/2/10 17:00
*/
@ControllerAdvice
public class GlobalExceptionAdvance {
@ExceptionHandler(value = Exception.class)
@ResponseBody
public RestResponse defaultException(HttpServletRequest request, Exception e) {
e.printStackTrace();
return RestResponse.builder()
.code(StatusCodeEnum.EXCEPTION.getCode())
.message(StatusCodeEnum.EXCEPTION.getMsg())
.build();
}
@ExceptionHandler(value = ConstraintViolationException.class)
@ResponseBody
public RestResponse constraintViolationException(HttpServletRequest request, ConstraintViolationException e) {
e.printStackTrace();
return RestResponse.builder()
.code(StatusCodeEnum.FAIL.getCode())
.message(e.getMessage())
.build();
}
@ExceptionHandler(value = MethodArgumentNotValidException.class)
@ResponseBody
public RestResponse methodArgumentNotValidException(HttpServletRequest request, MethodArgumentNotValidException e) {
e.printStackTrace();
return RestResponse.builder()
.code(StatusCodeEnum.FAIL.getCode())
.message(getError(e.getBindingResult()))
.build();
}
@ExceptionHandler(value = BindException.class)
@ResponseBody
public RestResponse bindException(HttpServletRequest request, BindException e) {
e.printStackTrace();
return RestResponse.builder()
.code(StatusCodeEnum.FAIL.getCode())
.message(getError(e.getBindingResult()))
.build();
}
@ExceptionHandler(value = BizException.class)
@ResponseBody
public RestResponse bizException(HttpServletRequest request, BizException e) {
e.printStackTrace();
Integer code = e.getCode();
String message = e.getMessage();
if (code == null) {
code = StatusCodeEnum.EXCEPTION.getCode();
}
if (message == null) {
message = StatusCodeEnum.EXCEPTION.getMsg();
}
return RestResponse.builder()
.code(code)
.message(message)
.build();
}
private String getError(BindingResult bindingResult) {
StringBuffer sb = new StringBuffer();
if (bindingResult.hasErrors()) {
for (ObjectError error : bindingResult.getAllErrors()) {
sb.append(error.getDefaultMessage()).append(",");
}
}
String errMsg = sb.toString();
errMsg = errMsg.substring(0, errMsg.lastIndexOf(","));
return errMsg;
}
}
\ No newline at end of file
package com.djl.controller.urlmapping;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.djl.model.LoginAccountInfo;
import com.djl.service.LoginAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @author adu
* data 2023/2/16 15:15
*/
@Controller
public class accountListController {
@Autowired
private LoginAccountService loginAccountService;
@GetMapping(value = "/accountList")
public ModelAndView providerlist(HttpServletRequest request) {
return new ModelAndView("/WEB-INF/jsp/accountlist.jsp");
}
@GetMapping(value = "/listAccountInfo")
public ModelAndView listAccountInfo(HttpServletRequest request, HttpServletResponse response) {
String accountNo = request.getParameter("accountNo");
String env = request.getParameter("env");
String userName = request.getParameter("userName");
Long current = StringUtils.isEmpty(request.getParameter("current")) ? 1L : Long.parseLong(request.getParameter("current"));
Long size = StringUtils.isEmpty(request.getParameter("size")) ? 20L : Long.parseLong(request.getParameter("size"));
Page<LoginAccountInfo> page = loginAccountService.pageAccountList(accountNo,env,userName,current, size);
request.setAttribute("data", page);
request.setAttribute("size", page.getRecords().size());
return new ModelAndView("/WEB-INF/jsp/accountTable.jsp");
}
}
\ No newline at end of file
package com.djl.controller.urlmapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @author adu
* data 2023/2/1 15:37
*/
@Controller
public class addApiController {
@GetMapping(value = "/addApiInfo")
public ModelAndView addApiInfo(HttpServletRequest request) {
return new ModelAndView("/WEB-INF/jsp/addApiInfo.jsp");
}
}
\ No newline at end of file
package com.djl.controller.urlmapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
/**
* @author adu
* data 2023/2/13 20:15
*/
@Controller
public class addLoginAccount {
@GetMapping(value = "/addLoginAccount")
public ModelAndView addLoginAccount(HttpServletRequest request) {
return new ModelAndView("/WEB-INF/jsp/addAccountInfo.jsp");
}
}
\ No newline at end of file
package com.djl.controller.urlmapping;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.djl.model.ApiInfo;
import com.djl.service.ApiInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @author adu
* data 2023/2/14 14:55
*/
@Slf4j
@Controller
public class apiListController {
@Autowired
private ApiInfoService apiInfoService;
@GetMapping(value = "/apiList")
public ModelAndView apiList(HttpServletRequest request) {
return new ModelAndView("/WEB-INF/jsp/apilist.jsp");
}
@GetMapping(value = "/getApiView")
public ModelAndView apiView(@RequestParam("id") Integer id, HttpServletRequest request, HttpServletResponse response) {
// Integer id =Integer.getInteger(request.getParameter("id"));
ApiInfo apiView=apiInfoService.getApiView(id);
//将信息存入requset 使得在前端展示
request.setAttribute("data", apiView);
return new ModelAndView("/WEB-INF/jsp/apiview.jsp");
}
@GetMapping(value = "/modifyApiInfo")
public ModelAndView modifyApiInfo(@RequestParam("id") Integer id, HttpServletRequest request, HttpServletResponse response) {
ApiInfo apiInfo=apiInfoService.getApiView(id);
//将信息存入requset 使得在前端展示
request.setAttribute("data", apiInfo);
return new ModelAndView("/WEB-INF/jsp/apimodify.jsp");
}
@GetMapping(value = "/listApiInfo")
public ModelAndView listApiInfo(HttpServletRequest request, HttpServletResponse response) {
String apiPath = request.getParameter("apiPath");
String apiName = request.getParameter("apiName");
//还需判断前端传来的数据是否为空
if (apiPath == null) {
apiPath = "";
}
if (apiName == null ){
apiName = "";
}
Long current = StringUtils.isEmpty(request.getParameter("current")) ? 1L : Long.parseLong(request.getParameter("current"));
Long size = StringUtils.isEmpty(request.getParameter("size")) ? 20L : Long.parseLong(request.getParameter("size"));
Page<ApiInfo> page=apiInfoService.pageApiList(apiPath,apiName,current,size);
//将信息存入requset 使得在前端展示
request.setAttribute("data", page);
request.setAttribute("size", page.getRecords().size());
return new ModelAndView("/WEB-INF/jsp/apiTable.jsp");
}
}
\ No newline at end of file
package com.djl.controller.urlmapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
/**
* @author adu
* data 2023/2/11 09:47
*/
@Controller
public class footController {
@GetMapping(value = "/foot")
public ModelAndView foot(HttpServletRequest request) {
return new ModelAndView("/WEB-INF/jsp/foot.jsp");
}
}
\ No newline at end of file
package com.djl.controller.urlmapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
/**
* @author adu
* data 2023/2/11 09:48
*/
@Controller
public class frameController {
@GetMapping(value = "/frame")
public ModelAndView frame(HttpServletRequest req) {
return new ModelAndView("/WEB-INF/jsp/frame.jsp");
}
}
\ No newline at end of file
package com.djl.controller.urlmapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
/**
* @author adu
* data 2023/2/11 09:46
*/
@Controller
public class headController {
@GetMapping(value = "/head")
public ModelAndView head(HttpServletRequest request) {
return new ModelAndView("/WEB-INF/jsp/head.jsp");
}
}
\ No newline at end of file
package com.djl.controller.urlmapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
/**
* @author adu
* data 2023/2/10 14:31
*/
@Controller
public class loginController {
@GetMapping(value = "/login")
public ModelAndView login(HttpServletRequest req) {
return new ModelAndView("/WEB-INF/jsp/login.jsp");
}
}
\ No newline at end of file
package com.djl.controller.urlmapping;
import com.djl.util.Constants;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
/**
* @author adu
* data 2023/2/10 14:32
*/
@Controller
public class loginOutController {
@GetMapping(value = "/loginOut")
public ModelAndView loginOut(HttpServletRequest req) {
//移除用户的session
req.getSession().removeAttribute(Constants.USER_SESSION);
return new ModelAndView("/WEB-INF/jsp/login.jsp");
}
}
\ No newline at end of file
package com.djl.enums;
import lombok.Getter;
@Getter
public enum StatusCodeEnum {
SUCCESS(200,"success"),
FAIL(400,"请求失败"),
EXCEPTION(500,"系统错误");
private Integer code;
private String msg;
StatusCodeEnum(Integer code, String msg){
this.code=code;
this.msg=msg;
}
}
package com.djl.exception;
import com.djl.enums.StatusCodeEnum;
import lombok.Data;
/**
* @author adu
* data 2023/2/10 17:03
*/
@Data
public class BizException extends RuntimeException {
private Integer code;
private String message;
public BizException(String message) {
this.code = StatusCodeEnum.EXCEPTION.getCode();
this.message = message;
}
}
\ No newline at end of file
package com.djl.interceptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.List;
@Component
@Slf4j
public class AccessAuthInterceptor implements HandlerInterceptor {
/**
* 检查用户是否对当前URL有访问权限
*/
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
HttpSession session = request.getSession();
// 获取当前访问的URI
String uri = request.getRequestURI();
List<String> accessModuleList = (List<String>) session.getAttribute("accessModuleList");
for (String accessModule : accessModuleList) {
if (uri.startsWith(accessModule)) {
return true;
}
}
// 没有访问权限,跳转到403页面
response.sendError(403);
log.error("没有访问权限:{}", uri);
return false;
}
}
package com.djl.interceptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
@Component
@Slf4j
public class LoginInterceptor implements HandlerInterceptor {
/**
* 检查用户是否已经登录
*/
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
if (request.getRequestURL().toString().contains("login") ||
request.getRequestURL().toString().contains("loginOut")
|| request.getRequestURL().toString().contains("register")) {
return true;
}
HttpSession session = request.getSession();
Boolean isLogin = (Boolean) session.getAttribute("isLogin");
if (isLogin == null ) {
//未登录
log.error("当前用户未登录,isLogin:{}", isLogin);
response.sendRedirect("/login");
return false;
}
return true;
}
}
package com.djl.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.djl.model.ApiInfo;
import org.springframework.stereotype.Repository;
/**
* @author adu
* @version v1.0.0
* @Description : TODO
* @Create on : 2023/2/1 10:32
**/
@Repository
public interface ApiInfoMapper extends BaseMapper<ApiInfo> {
}
package com.djl.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.djl.model.LoginAccountInfo;
import org.springframework.stereotype.Repository;
/**
* @author adu
* data 2023/2/13 19:28
*/
@Repository
public interface LoginAccountMapper extends BaseMapper<LoginAccountInfo> {
}
package com.djl.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.djl.model.User;
import org.springframework.stereotype.Repository;
/**
* @author adu
* @since 2023/1/31 11:16
*/
@Repository
public interface UserMapper extends BaseMapper<User> {
}
package com.djl.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import net.sf.jsqlparser.expression.DateTimeLiteralExpression;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
* @author adu
* @version v1.0.0
* @Package : com.cyb.model
* @Description : TODO
* @Create on : 2023/1/31 16:45
**/
@TableName("api_info")
@Data
public class ApiInfo {
@TableId(value = "id", type = IdType.AUTO)
// @NotNull(message = "id不能为空哦")
private Integer id;
@NotBlank(message = "自定义的API的名称不能为空哦")
private String apiName;//自定义API名字,eg:API_GetModuleContentx
// @NotBlank(message = "业务所属模块名称不能为空哦")
private String module;//业务所属模块名称 eg:god
//@NotBlank(message = "API模块名称不能为空哦")
private String apiModule;//API模块名称 eg:zeus.api-admin
@NotBlank(message = "API接口路径不能为空哦")
private String apiPath;//接口路径eg:/sales/anon/commonMicroWebsite/getModuleContent
private String apiContentType;//内容编码类型,默认为application/json;charset=UTF-8
private String apiDescribe;//接口描述
private String requestParame;//请求参数,json格式,默认为空
private Date createTime;//创建时间
private String operator;//添加人员
}
package com.djl.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
* @author adu
* @version v1.0.0
* @Package : com.djl.model
* @Description : TODO
* @Create on : 2023/1/31 16:59
**/
@TableName("user_info")
@Data
public class LoginAccountInfo {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@NotBlank(message = "登录者的名字不能为空哦")
private String userName; //用户名字唯一,操作者名字
private String tenant; //场馆id(需要以S)
private String tenantName; //场馆名称
@NotBlank(message = "登录手机号不能为空哦")
private String accountNo;//登录手机号
@NotBlank(message = "登录密码不能为空哦")
private String password;//登录密码
@NotBlank(message = "登录环境不能为空哦")
private String env; //环境
private Long adminId; //登录账号对应的adminId
private Long studioId; //场馆ID
private Long brandId; //品牌ID
private Long user;
@NotBlank(message = "账号登录类型不能为空哦")
private String userType; //账号登录类型B,C,M
private String openId;//微信openID
private String appId; //微信APPID 同wechatAppId
private String xcxOpenId;//小程序openid
private String xmToken;
private Date createTime;
private Date updateTime;
}
package com.djl.model;
import lombok.*;
@Data
@ToString
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class RestResponse {
private Integer code;
private String message;
private Object data;
}
package com.djl.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
/**
* @author adu
* @since 2023/1/31 10:27
*/
@Data
@TableName("user")
@ToString
public class User implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private String name;
@NotBlank(message = "密码不能为空")
private String password;
@NotBlank(message = "手机号不能为空")
private String phone;
private Date createTime;
}
package com.djl.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.djl.model.ApiInfo;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpSession;
import java.util.List;
/**
* @author adu
* data 2023/2/11 14:38
*/
@Service
public interface ApiInfoService {
int addApiInfo(ApiInfo apiInfo, HttpSession session);
List<ApiInfo> getApiList(String apiPath);
Page<ApiInfo> pageApiList(String apiPath,String apiName,Long current, Long size);
ApiInfo getApiView(Integer id);
void deleteApi(Integer id);
int updateApi(ApiInfo info);
}
package com.djl.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.djl.model.ApiInfo;
import com.djl.model.LoginAccountInfo;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author adu
* data 2023/2/13 19:29
*/
@Service
public interface LoginAccountService {
int addLoginAccount(LoginAccountInfo loginAccountInfo);
List<LoginAccountInfo> getAccountList(String accountNo);
Page<LoginAccountInfo> pageAccountList(String accountNo,String env,String userName, Long current, Long size);
}
package com.djl.service;
import com.djl.model.User;
import org.springframework.stereotype.Service;
@Service
public interface UserService {
boolean addOrUpdateUser(User user);
User checkLogin(String phone, String password);
}
package com.djl.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.djl.exception.BizException;
import com.djl.mapper.ApiInfoMapper;
import com.djl.model.ApiInfo;
import com.djl.service.ApiInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.servlet.http.HttpSession;
import java.util.List;
/**
* @author adu
* data 2023/2/11 14:40
*/
@Service
public class ApiInfoServiceImpl implements ApiInfoService {
@Autowired
private ApiInfoMapper apiInfoMapper ;
@Override
public int addApiInfo(ApiInfo apiInfo, HttpSession session) {
//根据api_path查重
QueryWrapper wrapper = new QueryWrapper<>();
wrapper.eq("api_path", apiInfo.getApiPath());
List<ApiInfo> apiInfos = apiInfoMapper.selectList(wrapper);
if (apiInfos!=null&&apiInfos.size()>0){
throw new BizException("已存在相同路径的API信息:"+apiInfos.get(0));
}
apiInfo.setOperator( session.getAttribute("operator").toString());
String contentType=apiInfo.getApiContentType();
if(contentType==""||contentType==null){
apiInfo.setApiContentType("application/json;charset=utf-8");
}
return apiInfoMapper.insert(apiInfo);
}
@Override
public List<ApiInfo> getApiList(String apiPath) {
//如果不根据api路径查询,则查询数据库的前100条
if (StringUtils.isEmpty(apiPath)) {
IPage<ApiInfo> page = new Page<>(1, 100);
return apiInfoMapper.selectPage(page, new QueryWrapper<ApiInfo>().select().orderByDesc("create_time")).getRecords();
}
//如果根据api路径查询,则从数据库中查询符合条件的信息
QueryWrapper wrapper = new QueryWrapper<>();
wrapper.eq("api_path", apiPath);
List<ApiInfo> apiInfos = apiInfoMapper.selectList(wrapper);
return apiInfos;
}
/**
* 分页查询API列表
* @param apiPath
* @param current
* @param size
* @return
*/
@Override
public Page<ApiInfo> pageApiList(String apiPath,String apiName, Long current, Long size) {
QueryWrapper wrapper=new QueryWrapper<>();
if(!StringUtils.isEmpty(apiPath)&&!StringUtils.isEmpty(apiName)){
wrapper.eq("api_path",apiPath);
wrapper.eq("api_name",apiName);
} else if (!StringUtils.isEmpty(apiPath)) {
wrapper.eq("api_path",apiPath);
} else if (!StringUtils.isEmpty(apiName)) {
wrapper.eq("api_name",apiName);
}
wrapper.orderByDesc("create_time");
IPage<ApiInfo> page=new Page<>(current,size);
return (Page<ApiInfo>)apiInfoMapper.selectPage(page,wrapper);
}
@Override
public ApiInfo getApiView(Integer id) {
ApiInfo apiView=apiInfoMapper.selectById(id);
return apiView;
}
@Override
public void deleteApi(Integer id) {
apiInfoMapper.deleteById(id);
}
@Override
public int updateApi(ApiInfo info) {
return apiInfoMapper.updateById(info);
}
}
\ No newline at end of file
package com.djl.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.djl.exception.BizException;
import com.djl.mapper.LoginAccountMapper;
import com.djl.model.ApiInfo;
import com.djl.model.LoginAccountInfo;
import com.djl.service.LoginAccountService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import java.util.Date;
import java.util.List;
/**
* @author adu
* data 2023/2/14 11:03
*/
@Slf4j
@Service
public class LoginAccountServiceImpl implements LoginAccountService {
@Autowired
LoginAccountMapper loginAccountMapper;
@Override
public int addLoginAccount(LoginAccountInfo loginAccountInfo) {
//根据userName和env查重
QueryWrapper wrapper = new QueryWrapper<>();
wrapper.eq("user_name", loginAccountInfo.getUserName());
wrapper.eq("env", loginAccountInfo.getEnv());
// wrapper.eq("user_name",loginAccountInfo.getUserName());
List<LoginAccountInfo> list = loginAccountMapper.selectList(wrapper);
if (list != null && list.size() > 0) {
throw new BizException("已存在相同用户名和登录环境的信息:" + list.get(0));
}
loginAccountInfo.setCreateTime(new Date());
return loginAccountMapper.insert(loginAccountInfo);
}
@Override
public List<LoginAccountInfo> getAccountList(String accountNo) {
//如果不根据手机号查询,则查询数据库的前100条
if (StringUtils.isEmpty(accountNo)) {
IPage<LoginAccountInfo> page = new Page<>(1, 100);
return loginAccountMapper.selectPage(page, new QueryWrapper<LoginAccountInfo>().select().orderByDesc("create_time")).getRecords();
}
//如果根据api路径查询,则从数据库中查询符合条件的信息
QueryWrapper wrapper = new QueryWrapper<>();
wrapper.eq("account_no", accountNo);
List<LoginAccountInfo> accountInfos = loginAccountMapper.selectList(wrapper);
return accountInfos;
}
/**
* 获取登录账号列表
*
* @param accountNo 查询条件 手机号
* @param current 当前页
* @param size 每页数量
* @return
*/
@Override
public Page<LoginAccountInfo> pageAccountList(String accountNo, String env,String userName, Long current, Long size) {
//如果根据手机号查询,则从数据库中查询符合条件的信息
QueryWrapper wrapper = new QueryWrapper<>();
/* if (!StringUtils.isEmpty(accountNo) && !StringUtils.isEmpty(env)&& !StringUtils.isEmpty(userName)) {
wrapper.eq("account_no", accountNo);
wrapper.eq("env", env);
wrapper.eq("user_name", userName);
} */if (!StringUtils.isEmpty(accountNo)) {
wrapper.eq("account_no", accountNo);
} if (!StringUtils.isEmpty(env)) {
wrapper.eq("env", env);
}
if (!StringUtils.isEmpty(userName)) {
wrapper.eq("user_name", userName);
}
wrapper.orderByDesc("create_time");
IPage<LoginAccountInfo> page = new Page<>(current, size);
return (Page<LoginAccountInfo>) loginAccountMapper.selectPage(page, wrapper);
}
}
\ No newline at end of file
package com.djl.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.djl.exception.BizException;
import com.djl.mapper.UserMapper;
import com.djl.model.User;
import com.djl.service.UserService;
import com.djl.util.Md5Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.Date;
import java.util.List;
@Service
public class UserServiceImpl implements UserService {
@Autowired
private UserMapper userMapper;
@Override
public boolean addOrUpdateUser(User user) {
if (user.getId() == null){
// 新增
QueryWrapper wrapper = new QueryWrapper<>();
wrapper.eq("phone", user.getPhone());
Integer count = userMapper.selectCount(wrapper);
if(count >= 1) {
throw new BizException("手机号已经存在");
}
user.setCreateTime(new Date());
//user.setPassword(Md5Utils.getMD5(user.getPassword()));
userMapper.insert(user);
}else {
// 更新
userMapper.updateById(user);
}
return true;
}
@Override
public User checkLogin(String phone, String password) {
QueryWrapper wrapper = new QueryWrapper<>();
wrapper.eq("phone", phone);
wrapper.eq("password", password);
List<User> users = userMapper.selectList(wrapper);
return CollectionUtils.isEmpty(users) ? null : users.get(0);
}
}
package com.djl.util;/*
*
*/
//常量放置处
public class Constants {
public final static String USER_SESSION = "userSession";
}
package com.djl.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.math.BigInteger;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class Md5Utils {
public static String getMD5(String originString) {
String result = null;
if (originString != null) {
try {
// 指定加密的方式为MD5
MessageDigest md = MessageDigest.getInstance("MD5");
// 进行加密运算
byte bytes[] = md.digest(originString.getBytes());
for (int i = 0; i < bytes.length; i++) {
// 将整数转换成十六进制形式的字符串 这里与0xff进行与运算的原因是保证转换结果为32位
String str = Integer.toHexString(bytes[i] & 0xFF);
if (str.length() == 1) {
str += "F";
}
result += str;
}
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
}
return result.toUpperCase();
}
public static String getMd5ByFile(File file) throws FileNotFoundException {
String value = null;
FileInputStream in = new FileInputStream(file);
try {
MappedByteBuffer byteBuffer = in.getChannel().map(FileChannel.MapMode.READ_ONLY, 0, file.length());
MessageDigest md5 = MessageDigest.getInstance("MD5");
md5.update(byteBuffer);
BigInteger bi = new BigInteger(1, md5.digest());
value = bi.toString(16);
} catch (Exception e) {
e.printStackTrace();
} finally {
if(null != in) {
try {
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return value;
}
}
package com.djl.util;/*
*/
public class PageSupport {
//当前页面 来自于用户输入
private int currentPageNo = 1;
//总数量(表)
private int totalCount = 0;
//页面容量
private int pageSize = 0;
//总共显示的页数 为总表数量/单页容量 +1
private int totalPageCount =1;
public int getCurrentPageNo() {
return currentPageNo;
}
public void setCurrentPageNo(int currentPageNo) {
if(currentPageNo>0){
this.currentPageNo = currentPageNo;
}
}
public int getTotalCount() {
return totalCount;
}
public void setTotalCount(int totalCount) {
if(totalCount>0){
this.totalCount = totalCount;
this.setTotalPageCountByRs();
}
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
if(pageSize>0){
this.pageSize = pageSize;
}
}
public int getTotalPageCount() {
return totalPageCount;
}
public void setTotalPageCount(int totalPageCount) {
this.totalPageCount = totalPageCount;
}
public void setTotalPageCountByRs(){
if(this.totalCount % this.pageSize == 0){
this.totalPageCount = this.totalCount / this.pageSize;
}else if(this.totalCount % this.pageSize > 0){
this.totalPageCount = this.totalCount / this.pageSize +1;
}else{
this.totalPageCount = 0;
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
</beans>
\ No newline at end of file
server.port=8081
spring.datasource.url: jdbc:mysql://120.27.248.253:3306/xm_sports?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
spring.datasource.username: root
spring.datasource.password: root
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#spring.main.web-application-type=none
spring.main.web-application-type=servlet
\ No newline at end of file
.container{
display: grid;
/*grid-template: auto 1fr auto / auto 1fr auto;*/
margin: auto;
padding: 30px;
width: 1000px;
}
.header{
color: #faca0d;
background: bisque;
height: 120px;
}
#bar{
background: #6A6AFF;
display: flex;
width: 100%;
height: 35px;
text-align: center;
padding-top:10px;
justify-content: space-around;
}
.mainer{
background: #ff9cff;
width: 1000px;
height: 600px;
}
.left{
float: left;
color: #6A6AFF;
background: #A3C6C8;
width: 18%;
height: 600px;
padding:10px 0px 10px 10px ;
}
.right{
float:right;
color: #7ba92c;
background: #fff3f8;
width: 80%;
height: 600px;
display: block;
padding:10px 0px 10px 10px ;
}
.footer{
background: url("/images/login_bg.jpg") 0 center no-repeat;
color: #52eeff;
margin: auto;
height: 40px;
text-align: center;
padding-top: 30px;
}
div#container{
background-color: grey;
width: 100%;
height: 200px;
}
div#b1{
width: 50px;
height: 50px;
background-color: red;
}
div#b2{
width: 50px;
height: 50px;
background-color: aquamarine;
}
div#b3{
width: 50px;
height: 50px;
background-color: blueviolet;
}
div#b4{
width: 50px;
height: 50px;
background-color: yellow;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>css测试</title>
</head>
<body>
<style type="text/css">
body {
font-size: 25px;
font-family: "宋体";
color: #ffffff;
}
.box1 {
background-color: #008000;
}
.box2 {
margin-left: 20px;
background-color: #ff0000;
}
div {
float:inherit;
width: 200px;
height: 200px;
border: 1px solid black;
}
</style>
<div class="box1">
盒子1
</div>
<div class="box2">
盒子2
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
body {
margin: 0px;
padding: 0px;
}
#left {
width: 200px;
height: 9999px;
background: #f7fafc;
border-right: 1px solid #e5ebf1;
float: left;
}
#left div {
height: 40px;
color: #384463;
font-size: 14px;
line-height: 40px;
border-bottom: 1px solid #f6fafd;
border-top: 1px solid #f6fafd;
text-align: center;
}
#left div:hover {
background: #06C;
cursor:pointer;
color: #FFF
}
</style>
</head>
<body>
<div id="left">
<div>导航1</div>
<div>导航2</div>
<div>导航3</div>
<div>导航4</div>
<div>导航5</div>
</div>
</body>
<script>
function js(id)
{
return document.getElementById(id).getElementsByTagName("div");
}
for(var i=0;i<js("left").length;i++)
{
js("left")[i].onclick=function(){
delBackgroundColor();
this.style.background = "#06C";
this.style.color = "#fff";
}
}
function delBackgroundColor()
{
for(var i=0;i<js("left").length;i++)
{
js("left")[i].style.background = '';
js("left")[i].style.color = '#384463';
}
}
</script>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link type="text/css" rel="stylesheet" href="css/test.css">
</head>
<body>
<div class="container">
<header class="header">header</header>
<!-- <div id="bar">
<div class="li">杜君丽</div>
<div class="li">徐雅媚</div>
<div class="li">谢园园</div>
<div class="li">杨剑</div>
<div class="li">张玉晓</div>
</div>-->
<div>
<main class="mainer">
<div class="left"><div>
<div class="li">杜君丽</div>
<div class="li">徐雅媚</div>
<div class="li">谢园园</div>
<div class="li">杨剑</div>
<div class="li">张玉晓</div>
</div></div>
<div class="right">right</div>
</main>
<footer class="footer">footer</footer>
</div>
</div>
<div style="display:none;">你是看不见我的</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
<script>
$(document).ready(function (){
console.log("data int....")
});
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div>
<!--
下单菜单的默认值为配置了selected属性的选项,如果没有配置,默认为第一个选项
-->
<strong>单选下拉菜单:</strong><select name="name" >
<option value="1">柏壑</option>
<option value="2">徐雅媚</option>
<option value="3" selected>杜君丽</option>
<option value="4">谢园园</option>
<option value="5">张玉晓</option>
<option value="6">杨剑</option>
</select>
</div>
<hr>
<div>
<!--
下拉菜单可以使用multiple属性,标明这是一个多选下拉菜单,size标明下拉菜单的长度
-->
<strong>多选下拉菜单:</strong> <select multiple size="6" >
<option>柏壑</option>
<option>徐雅媚</option>
<option>杜君丽</option>
<option>谢园园</option>
<option>张玉晓</option>
<option>杨剑</option>
</select>
</div>
<form>
<span> 单选按钮:</span><input type="radio" name="sex" value="male"><input type="radio" name="sex" value="female">
</form>
<form>
<span>复选按钮:</span> <input type="checkbox" name="vehicle" value="house">我想买房 <input type="checkbox" name="vehicle" value="car">我想买车
</form>
<script type="text/javascript">
var age=19;
/*
alert("数字为:"+age)
*/
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>网页的title名称</title>
</head>
<body>
Hello HTML!
<h1>一级标题</h1>
<h2>二级标题</h2>
<h3>三级标题</h3>
<h4>四级标题</h4>
<h5>五级标题</h5>
<h6>六级标题</h6>
<p>这是第一个段落</p>
<p>这是第二个段落</p>
<hr/>
<a href="https://www.baidu.com/">点击我打开百度</a>
<br/>
<img src="login_bg.jpg" height="10" width="13">
<br/>
<table border="1">
<tr>
<th>姓名</th>
<th colspan="2">信息</th>
</tr>
<tr>
<td>杜君丽</td>
<td rowspan="2"></td>
<td>35</td>
</tr>
<tr>
<td>徐雅媚</td>
<td>29</td>
</tr>
<tr>
<td>杨剑</td>
<td rowspan="2"></td>
<td>27</td>
</tr>
<tr>
<td>曹远东</td>
<td>28</td>
</tr>
</table>
<hr/>
<ul>
<li>春天</li>
<li>夏天</li>
<li>秋天</li>
<li>冬天</li>
</ul>
<ol>
<li>安装jdk</li>
<li>安装idea</li>
<li>创建项目</li>
</ol>
<hr/>
<!--html 展示网页内容,信息展示,css展示网页样式:颜色,布局-->
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<div>
<table id="table" class="providerTable" cellpadding="0" cellspacing="0">
<c:if test="${size < 1}">
<div style="text-align: center;font-family: 'BebasNeueRegular', 'Arial Narrow', Arial, sans-serif;font-size: 14px;border: whitesmoke;background: orange;height: 30px;line-height: 30px;color: white">未查询到数据</div>
</c:if>
<c:if test="${size >= 1}">
<tr class="firstTr">
<th width="7%">登录账户名称</th>
<th width="5%">登录环境</th>
<th width="7%">登录手机号</th>
<th width="12%">场馆名称</th>
<th width="12%">场馆ID</th>
<th width="12%">adminId</th>
<th width="12%">user</th>
<th width="12%">品牌ID</th>
<th width="6%">登录账户类型</th>
<th width="8%">时间</th>
<th width="7%">作者</th>
</tr>
<c:forEach var="account" items="${data.records}" varStatus="status">
<tr class="td-con" style="height: 45px;line-height: 45px">
<td style=" word-break: break-word;display: block">
<span>${account.userName }</span>
</td>
<td>
<span>${account.env }</span>
</td>
<td>
<span>${account.accountNo}</span>
</td>
<td>
<span>${account.tenantName}</span>
</td>
<td>
<span>${account.studioId}</span>
</td>
<td>
<span>${account.adminId}</span>
</td>
<td>
<span>${account.user}</span>
</td>
<td>
<span>${account.brandId}</span>
</td>
<td>
<span>${account.userType}</span>
</td>
<td>
<span>
<fmt:formatDate value="${account.createTime}" pattern="yyyy-MM-dd"/>
</span>
</td>
<td>
<span>${api.operator}</span>
</td>
</tr>
</c:forEach>
</c:if>
</table>
<input type="hidden" id="pages" value="${data.getPages()}"/>
<div class="page-bar">
<ul class="page-num-ul clearfix">
<li>共${data.getTotal()}条记录&nbsp;&nbsp; ${data.getCurrent() }/${data.getPages() }页</li>
<c:if test="${data.getCurrent() > 1}">
<a href="javascript:listAccountInfo(1);">首页</a>
<a href="javascript:listAccountInfo(${data.getCurrent()-1});">上一页</a>
</c:if>
<c:if test="${data.getCurrent() < data.getPages() }">
<a href="javascript:listAccountInfo(${data.getCurrent()+1 });">下一页</a>
<a href="javascript:listAccountInfo(${data.getPages()});">最后一页</a>
</c:if>
&nbsp;&nbsp;
</ul>
<span class="page-go-form"><label>跳转至</label>
<input type="text" name="inputPage" id="inputPage" class="page-key" />页
<button type="button" class="page-btn" onClick='jump_to(document.getElementById("inputPage").value)'>GO</button>
</span>
</div>
</div>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/jsp/head.jsp"%>
<div class="right">
<div class="location">
<span>B端登录账号管理</span>
</div>
<div class="search">
<input name="method" value="query" type="hidden">
<span>登录手机号:</span>
<input name="accountNo" id="accountNo" type="text" value="${accountNo}" style="width: 200px">
<span>环境:</span>
<input name="envP" id="envP" type="text" value="${env}" style="width: 200px">
<span>登录账户名称:</span>
<input name="userName" id="userName" type="text" value="${userName}" style="width: 200px">
<input type="hidden" name="pageIndex" value="1"/>
<input value="查 询" type="submit" id="searchbutton">
<a href="${pageContext.request.contextPath}/addLoginAccount">添加账号信息</a>
</div>
<!--API信息操作表格-->
<div id="table">
</div>
<input type="hidden" id="totalPageCount" value="${totalPageCount}"/>
</div>
</section>
<%@include file="/WEB-INF/jsp/foot.jsp" %>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/datalist.js"></script>
<script type="text/javascript">
$('#searchbutton').on('click', function() {
listAccountInfo(null);
});
listAccountInfo(); /*初始化,进入页面返回列表数据*/
</script>
\ No newline at end of file
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/jsp/head.jsp"%>
<div class="right">
<div class="location">
<span>录入SaaS系统登录账户信息</span>
</div>
<div class="providerAdd">
<input type="hidden" name="method" value="add">
<!--div的class 为error是验证错误,ok是验证成功-->
<div class="">
<label for="accountName" >user_name(唯一标识的登录账户名称):</label><input type="text" value="" name="accountName" id="accountName" width="500px" placeholder="eg:adu-b">
<!-- 放置提示信息 -->
<font color="red"></font>
</div>
<div>
<label for="studioId" >场馆Id(studioId):</label><input type="text" name="studioId" id="studioId" width="500px" placeholder="eg:1328894569169154054">
<font color="red"></font>
</div>
<div>
<label for="tenantName" >场馆名称:</label><input type="text" name="tenantName" id="tenantName" width="500px" placeholder="eg:阿杜自动化校区">
<font color="red"></font>
</div>
<div>
<label for="accountNo">登录手机号:</label><input type="text" name="accountNo" id="accountNo" width="500px" placeholder="15558121569">
<font color="red"></font>
</div>
<div>
<label for="password">登录密码(密文):</label><input type="text" name="password" id="password" width="500px" placeholder="eg:290112bfbde696fcb91284bba1e2655b">
<font color="red"></font>
</div>
<div>
<label for="env">登录环境env:</label><input type="text" name="env" id="env" width="500px" placeholder="dev/rc/gray/prod">
</div>
<div>
<label for="adminId">adminId:</label><input type="text" name="adminId" id="adminId" width="500px" placeholder="eg:1328895145216495617">
</div>
<div>
<label for="user">user:</label><input type="text" name="user" id="user" width="500px" placeholder="1315949958078578690">
</div>
<div>
<label for="brandId">brandId:</label><input type="text" name="brandId" id="brandId" width="500px" placeholder="1315949958078578690">
</div>
<div>
<label for="userType">登录账户类型:</label><input type="text" name="userType" id="userType" width="500px" placeholder="B/C/M/ORG_B">
</div>
<div class="providerAddBtn">
<input type="button" name="add" id="add" value="保存">
<input type="button" id="back" name="back" value="返回" >
</div>
</div>
</div>
</section>
<%@include file="/WEB-INF/jsp/foot.jsp" %>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/accountadd.js"></script>
<script type="text/javascript">
$("#add").on('click', function () {
var params = {
userName: $('#accountName').val(),
studioId: $('#studioId').val(),
tenantName: $('#tenantName').val(),
accountNo: $('#accountNo').val(),
password: $('#password').val(),
env: $('#env').val(),
adminId: $('#adminId').val(),
user: $('#user').val(),
brandId: $('#brandId').val(),
tenant: "S_"+$('#studioId').val(),
userType: $('#userType').val()
};
$.ajax({
url: window.location.protocol+"//"+window.location.host +'/private/api/addAccountInfo',
type: 'post',
dataType: 'json',
contentType: "application/json;charset=UTF-8",
data: JSON.stringify(params),
success: function (result) {
console.log(result);
if(result.code == '200') {
alert(result.message);
} else {
alert(result.message);
}
/* $('#accountName').val('');
$('#instId').val('');
$('#instName').val('');
$('#accountNo').val('');
$('#passwd').val('');
$('#env').val('');
$('#aid').val('');
$('#uid').val('');
$('#userType').val('');*/
}
})
});
</script>
\ No newline at end of file
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/jsp/head.jsp"%>
<div class="right">
<div class="location">
<span>录入API信息</span>
</div>
<div class="providerAdd">
<input type="hidden" name="method" value="add">
<!--div的class 为error是验证错误,ok是验证成功-->
<div class="">
<label for="apiName" class="labelBox">自定义API名字api_name:</label><input type="text" value="" name="apiName" id="apiName" width="500px" placeholder="eg:API_GetModuleContentx">
<!-- 放置提示信息 -->
<font color="red"></font>
</div>
<div>
<label for="apiPath" class="labelBox">接口路径api_path:</label><input type="text" name="apiPath" id="apiPath" width="500px" placeholder="eg:/sales/anon/commonMicroWebsite/getModuleContent">
<font color="red"></font>
</div>
<div>
<label for="contentType">内容编码类型api_contentType:</label><input type="text" name="contentType" id="contentType" width="500px" placeholder="默认为application/json;charset=UTF-8">
<font color="red"></font>
</div>
<div>
<label for="describe">接口描述api_describe:</label><input type="text" name="describe" id="describe" width="500px" placeholder="eg:获取学员课时">
<font color="red"></font>
</div>
<div>
<label for="moduleName">业务模块名称:</label><input type="text" name="moduleName" id="moduleName" width="500px" placeholder="eg:god">
</div>
<div>
<label for="apiModule">API模块名称:</label><input type="text" name="apiModule" id="apiModule" width="500px" placeholder="eg:zeus.api-admin">
</div>
<div>
<label for="requestParame">请求参数requestParameter:</label><input type="text" name="requestParame" id="requestParame" width="500px" placeholder="请求参数,json格式,默认为空">
</div>
<div class="providerAddBtn">
<input type="button" name="add" id="add" value="保存">
<input type="button" id="back" name="back" value="返回" >
</div>
</div>
</div>
</section>
<%@include file="/WEB-INF/jsp/foot.jsp" %>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/apiadd.js"></script>
<script type="text/javascript">
$("#add").on('click', function () {
var params = {
apiName: $('#apiName').val(),
apiPath: $('#apiPath').val(),
apiContentType: $('#contentType').val(),
apiDescribe: $('#describe').val(),
module: $('#moduleName').val(),
apiModule: $('#apiModule').val(),
requestParameter: $('#requestParame').val()
};
$.ajax({
url: env.base_url + '/private/api/addApiInfo',
type: 'post',
dataType: 'json',
contentType: "application/json;charset=UTF-8",
data: JSON.stringify(params),
success: function (result) {
console.log(result);
if(result.code == '200') {
alert("添加成功");
} else {
alert(result.message);
}
$('#apiName').val('');
$('#apiPath').val('');
$('#contentType').val('');
$('#describe').val('');
$('#moduleName').val('');
$('#apiModule').val('');
$('#requestParame').val('');
}
})
});
</script>
\ No newline at end of file
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<div>
<table id="table" class="providerTable" cellpadding="0" cellspacing="0">
<c:if test="${size < 1}">
<div style="text-align: center;font-family: 'BebasNeueRegular', 'Arial Narrow', Arial, sans-serif;font-size: 14px;border: whitesmoke;background: orange;height: 30px;line-height: 30px;color: white">未查询到数据</div>
</c:if>
<c:if test="${size >= 1}">
<tr class="firstTr">
<th width="18%">自定义API名字</th>
<th width="30%">接口路径</th>
<th width="13%">contentType</th>
<th width="17%">接口描述</th>
<th width="7%">业务模块</th>
<%-- <th width="7%">作者</th>
<th width="14%">API所属模块</th>
<th width="8%">时间</th>--%>
<th width="15%">操作</th>
</tr>
<c:forEach var="api" items="${data.records}" varStatus="status">
<tr class="td-con">
<td style=" word-break: break-word;display: block">
<span>${api.apiName }</span>
</td>
<td>
<span>${api.apiPath }</span>
</td>
<td>
<span>${api.apiContentType}</span>
</td>
<td>
<span>${api.apiDescribe}</span>
</td>
<td>
<span>${api.module}</span>
</td>
<%-- <td>
<span>${api.apiModule}</span>
</td>
<td>
<span>${api.operator}</span>
</td>
<td>
<span>
<fmt:formatDate value="${api.createTime}" pattern="yyyy-MM-dd"/>
</span>
</td>--%>
<td class="cao_zuo">
<span><a class="view" href="javascript:getApiView(${api.getId()});">详情</a></span>
<%--
<span><a class="view" href="javascript:modifyApi(${api.getId()});">编辑</a></span>
--%>
<span><a class="view" href="${pageContext.request.contextPath}/modifyApiInfo?id=${api.getId()}">编辑</a></span>
<span><a class="delete" href="javascript:deleteApi(${api.getId()});">删除</a></span>
</td>
</tr>
</c:forEach>
</c:if>
</table>
<input type="hidden" id="pages" value="${data.getPages()}"/>
<div class="page-bar">
<ul class="page-num-ul clearfix">
<li>共${data.getTotal()}条记录&nbsp;&nbsp; ${data.getCurrent() }/${data.getPages() }页</li>
<c:if test="${data.getCurrent() > 1}">
<a href="javascript:listApiInfo(1);">首页</a>
<a href="javascript:listApiInfo(${data.getCurrent()-1});">上一页</a>
</c:if>
<c:if test="${data.getCurrent() < data.getPages() }">
<a href="javascript:listApiInfo(${data.getCurrent()+1 });">下一页</a>
<a href="javascript:listApiInfo(${data.getPages()});">最后一页</a>
</c:if>
&nbsp;&nbsp;
</ul>
<span class="page-go-form"><label>跳转至</label>
<input type="text" name="inputPage" id="inputPage" class="page-key" />页
<button type="button" class="page-btn" onClick='jump_to1(document.getElementById("inputPage").value)'>GO</button>
</span>
</div>
</div>
<div id="info"></div>
\ No newline at end of file
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" %>
<%@include file="/WEB-INF/jsp/head.jsp" %>
<div class="right">
<div class="location">
<span>API管理页面</span>
</div>
<div class="search">
<%-- <form method="get" action="${pageContext.request.contextPath }/jsp/provider.do">--%>
<input name="method" value="query" type="hidden">
<span>接口路径apiPath:</span>
<input name="apiPath" id="apiPath" type="text" value="${apiPath}">
<span>自定义API名字:</span>
<input style="width: 250px" name="apiName" id="apiName" type="text" value="${apiName}">
<input type="hidden" name="pageIndex" value="1"/>
<input value="查 询" type="submit" id="searchbutton">
<a href="${pageContext.request.contextPath}/addApiInfo">添加API信息</a>
<%-- </form>--%>
</div>
<!--API信息操作表格-->
<div id="table">
</div>
<input type="hidden" id="totalPageCount" value="${totalPageCount}"/>
<div id="apiCon" class="api-modal">
<span id="closeModal"><img src="${pageContext.request.contextPath }/images/schu.png" alt="删除" title="关闭弹框"/>
</span>
</div>
</div>
</section>
<%@include file="/WEB-INF/jsp/foot.jsp" %>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/datalist.js"></script>
<script type="text/javascript">
$('#searchbutton').on('click', function () {
listApiInfo(null);
});
$('#closeModal').on('click', function () {
$("#apiviewModal").remove()
$('#apiCon').css('display', 'none');
});
listApiInfo(); /*初始化,进入页面返回列表数据*/
</script>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/jsp/head.jsp"%>
<div class="right">
<div class="providerAdd">
<!--div的class 为error是验证错误,ok是验证成功-->
<div class="">
<label for="apiId">API编号:</label>
<input type="text" name="apiId" id="apiId" value="${data.id }" readonly="readonly">
</div>
<div>
<label for="apiName">自定义API名字api_name:</label>
<input type="text" name="apiName" id="apiName" value="${data.apiName }">
<font color="red"></font>
</div>
<div>
<label for="apiPath">接口路径api_path:</label>
<input type="text" name="apiPath" id="apiPath" value="${data.apiPath }">
<font color="red"></font>
</div>
<div>
<label for="contentType">内容编码类型api_contentType:</label>
<input type="text" name="contentType" id="contentType" value="${data.apiContentType }">
<font color="red"></font>
</div>
<div>
<label for="describe">接口描述api_describe:</label>
<input type="text" name="describe" id="describe" value="${data.apiDescribe }">
</div>
<div>
<label for="moduleName">业务模块名称:</label>
<input type="text" name="moduleName" id="moduleName" value="${data.module }">
</div>
<div>
<label for="apiModule">API模块名称:</label>
<input type="text" name="apiModule" id="apiModule" value="${data.apiModule }">
</div>
<div>
<label for="requestParameter">请求参数requestParameter:</label>
<input type="text" name="requestParameter" id="requestParameter" value="${data.requestParame }">
</div>
<div class="providerAddBtn">
<input type="button" name="save" id="save" value="保存">
<input type="button" id="back" name="back" value="返回" >
</div>
</div>
</div>
</section>
<%@include file="/WEB-INF/jsp/foot.jsp" %>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/apimodify.js"></script>
<script type="text/javascript">
$("#save").on('click', function () {
var params = {
id:${data.id},
apiName: $('#apiName').val(),
apiPath: $('#apiPath').val(),
apiContentType: $('#contentType').val(),
apiDescribe: $('#describe').val(),
module: $('#moduleName').val(),
apiModule: $('#apiModule').val(),
requestParame: $('#requestParameter').val()
};
$.ajax({
url: env.base_url + '/private/api/modify',
type: 'post',
dataType: 'json',
contentType: "application/json;charset=UTF-8",
data: JSON.stringify(params),
success: function (result) {
console.log(result);
if(result.code == '200') {
alert("修改成功");
} else {
alert(result.message);
}
}
})
});
</script>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<div id="apiviewModal" class="right right_box">
<div class="providerView">
<p><strong>API编号:</strong><span>${data.id}</span></p>
<p><strong>自定义API名字api_name:</strong><span>${data.apiName}</span></p>
<p><strong>接口路径api_path:</strong><span>${data.apiPath}</span></p>
<p><strong>内容编码类型api_contentType:</strong><span>${data.apiContentType}</span></p>
<p><strong>接口描述api_describe:</strong><span>${data.apiDescribe}</span></p>
<p><strong>业务模块名称:</strong><span>${data.module}</span></p>
<p><strong>API模块名称:</strong><span>${data.apiModule}</span></p>
<p><strong>请求参数requestParameter:</strong><span>${data.requestParame}</span></p>
<p><strong>创建时间:</strong><span> <fmt:formatDate value="${data.createTime}" pattern="yyyy-MM-dd"/></span></p>
<%-- <p><strong>更新时间:</strong><span>${user.userRoleName}</span></p>--%>
<p><strong>经办人:</strong><span>${data.operator}</span></p>
</div>
</div>
</section>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<footer class="footer">
自动化API信息后台管理系统
</footer>
<script type="text/javascript" src="../js/time.js"></script>
<script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="../calendar/WdatePicker.js"></script>
</body>
</html>
\ No newline at end of file
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" isELIgnored="false" %>
<%@ page import="com.djl.util.Constants" %>
<%@ page import="com.djl.model.User" %>
<%@include file="/WEB-INF/jsp/head.jsp"%>
<div class="right">
<img class="wColck" src="../images/clock.jpg" alt=""/>
<div class="wFont">
<h2>${ userSession.phone }</h2>
<p>欢迎来到测试自动化录入系统!</p>
</div>
</div>
</section>
<%@include file="/WEB-INF/jsp/foot.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>自动化API信息录入系统</title>
<link type="text/css" rel="stylesheet" href="../css/style.css" />
<link type="text/css" rel="stylesheet" href="../css/public.css" />
</head>
<body>
<!--头部-->
<header class="publicHeader">
<h1>测试组-自动化API信息录入系统</h1>
<%-- <div class="publicHeaderR">
&lt;%&ndash;
<p><span id="hello">下午好!</span><span style="color: #fff21b"> </span></p>
&ndash;%&gt;
<a href="${pageContext.request.contextPath}/loginOut">退出</a>
</div>--%>
</header>
<!--时间-->
<section class="publicTime">
<span id="time" ></span>
<a href="#">欢迎👏手机账号为【${ userSession.phone }】的帅男靓女来访😁</a>
</section>
<!--主体内容-->
<section class="publicMian ">
<div class="left">
<h2 class="leftH2"><span class="span1"></span>功能列表 <span></span></h2>
<nav>
<ul class="list">
<%--<li ><a href="${pageContext.request.contextPath}/test">测试</a></li>--%>
<%-- <li><a href="${pageContext.request.contextPath}/addApiInfo">录入API信息</a></li>--%>
<li><a href="${pageContext.request.contextPath}/apiList">API信息管理</a></li>
<li><a href="${pageContext.request.contextPath}/accountList">账号信息管理</a></li>
<li><a href="${pageContext.request.contextPath}/loginOut">退出系统</a></li>
</ul>
</nav>
</div>
<%-- </section>这是主体的一部分 另外的section结束标签在 其他主体的结束位置--%>
<input type="hidden" id="path" name="path" value="${pageContext.request.contextPath }"/>
<input type="hidden" id="referer" name="referer" value="<%=request.getHeader("Referer")%>"/>
</body>
</html>
\ No newline at end of file
<%--用户登录--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>登录-自动化API信息后台管理系统</title>
<link type="text/css" rel="stylesheet" href="css/style.css" />
<script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
</head>
<body class="login_bg">
<section class="loginCont">
<%--<div class="inputbox">
<label for="name">用户名</label>
<input type="text" class="input-text" id="name" name="name" placeholder="请输入用户名" required/>
</div>--%>
<div class="inputbox">
<label for="phone">手机号</label>
<input type="text" class="input-text" id="phone" name="phone" placeholder="请输入登录手机号" required/>
</div>
<div class="inputbox">
<label for="password">密码</label>
<input type="password" id="password" name="password" placeholder="请输入密码" required/>
</div>
<div class="info" style="text-align: center;">${error}</div>
<div class="subBtn">
<input type="submit" value="登录" id="login"/>
<input type="submit" value="注册" id="register"/>
</div>
<script type="text/javascript">
$('#login').on('click', function () {
var params = {
/* name: $('#name').val(),*/
phone: $('#phone').val(),
password: $('#password').val()
};
$.ajax({
url: window.location.protocol+"//"+window.location.host + '/private/api/login',
type: 'post',
dataType: 'json',
contentType: "application/json;charset=UTF-8",
data: JSON.stringify(params),
success: function (result) {
console.log(result);
if(result.code == '200') {
document.location.href = window.location.protocol+"//"+window.location.host + "/frame"
} else {
alert(result.message);
}
}
})
});
$('#register').on('click', function () {
var params = {
/*name: $('#name').val(),*/
phone: $('#phone').val(),
password: $('#password').val()
};
$.ajax({
url: window.location.protocol+"//"+window.location.host + '/private/api/register',
type: 'post',
dataType: 'json',
contentType: "application/json;charset=UTF-8",
data: JSON.stringify(params),
success: function (result) {
console.log(result);
if(result.code == '200') {
alert(result.message);
document.location.href = window.location.protocol+"//"+window.location.host + "/login";
} else {
alert(result.message);
}
$('#name').val('');
$('#phone').val('');
$('#password').val('');
}
})
});
</script>
</section>
</body>
</html>
<html>
<head>
<meta http-equiv="content-type" content="text/xml; charset=utf-8" />
<title>My97DatePicker</title>
<script type="text/javascript" src="config.js"></script>
<script>
if(parent==window)
location.href = 'http://www.my97.net';
var $d, $dp, $pdp = parent.$dp, $dt, $tdt, $sdt, $IE=$pdp.ie, $FF = $pdp.ff,$OPERA=$pdp.opera, $ny, $cMark = false;
if ($pdp.eCont) {
$dp = {};
for (var p in $pdp) {
$dp[p] = $pdp[p];
}
}
else
$dp = $pdp;
$dp.getLangIndex = function(name){
var arr = langList;
for (var i = 0; i < arr.length; i++) {
if (arr[i].name == name) {
return i;
}
}
return -1;
}
$dp.getLang = function(name){
var index = $dp.getLangIndex(name);
if (index == -1) {
index = 0;
}
return langList[index];
}
$dp.realLang = $dp.getLang($dp.lang);
document.write("<script src='lang/" + $dp.realLang.name + ".js' charset='" + $dp.realLang.charset + "'><\/script>");
for (var i = 0; i < skinList.length; i++) {
document.write('<link rel="stylesheet" type="text/css" href="skin/' + skinList[i].name + '/datepicker.css" title="' + skinList[i].name + '" charset="' + skinList[i].charset + '" disabled="true"/>');
}
</script>
<script type="text/javascript" src="calendar.js"></script>
</head>
<body leftmargin="0" topmargin="0" onload="$c.autoSize()" tabindex=0>
</body>
</html>
<script>new My97DP();</script>
\ No newline at end of file
/*
* My97 DatePicker 4.7 Beta5
* License: http://www.my97.net/dp/license.asp
*/
var $dp,WdatePicker;(function(){var _={
$wdate:true,
$dpPath:"",
$crossFrame:true,
doubleCalendar:false,
enableKeyboard:true,
autoUpdateOnChanged:null,
whichDayIsfirstWeek:4,
position:{},
lang:"auto",
skin:"default",
dateFmt:"yyyy-MM-dd",
realDateFmt:"yyyy-MM-dd",
realTimeFmt:"HH:mm:ss",
realFullFmt:"%Date %Time",
minDate:"1900-01-01 00:00:00",
maxDate:"2099-12-31 23:59:59",
startDate:"",
alwaysUseStartDate:false,
yearOffset:1911,
firstDayOfWeek:0,
isShowWeek:false,
highLineWeekDay:true,
isShowClear:true,
isShowToday:true,
isShowOK:true,
isShowOthers:true,
readOnly:false,
errDealMode:0,
autoPickDate:null,
qsEnabled:true,
specialDates:null,specialDays:null,disabledDates:null,disabledDays:null,opposite:false,onpicking:null,onpicked:null,onclearing:null,oncleared:null,ychanging:null,ychanged:null,Mchanging:null,Mchanged:null,dchanging:null,dchanged:null,Hchanging:null,Hchanged:null,mchanging:null,mchanged:null,schanging:null,schanged:null,eCont:null,vel:null,errMsg:"",quickSel:[],has:{}};WdatePicker=U;var X=window,O="document",J="documentElement",C="getElementsByTagName",V,A,T,I,b;switch(navigator.appName){case"Microsoft Internet Explorer":T=true;break;case"Opera":b=true;break;default:I=true;break}A=L();if(_.$wdate)M(A+"skin/WdatePicker.css");V=X;if(_.$crossFrame){try{while(V.parent[O]!=V[O]&&V.parent[O][C]("frameset").length==0)V=V.parent}catch(P){}}if(!V.$dp)V.$dp={ff:I,ie:T,opera:b,el:null,win:X,status:0,defMinDate:_.minDate,defMaxDate:_.maxDate,flatCfgs:[]};B();if($dp.status==0)Z(X,function(){U(null,true)});if(!X[O].docMD){E(X[O],"onmousedown",D);X[O].docMD=true}if(!V[O].docMD){E(V[O],"onmousedown",D);V[O].docMD=true}E(X,"onunload",function(){if($dp.dd)Q($dp.dd,"none")});function B(){V.$dp=V.$dp||{};obj={$:function($){return(typeof $=="string")?X[O].getElementById($):$},$D:function($,_){return this.$DV(this.$($).value,_)},$DV:function(_,$){if(_!=""){this.dt=$dp.cal.splitDate(_,$dp.cal.dateFmt);if($)for(var B in $)if(this.dt[B]===undefined)this.errMsg="invalid property:"+B;else{this.dt[B]+=$[B];if(B=="M"){var C=$["M"]>0?1:0,A=new Date(this.dt["y"],this.dt["M"],0).getDate();this.dt["d"]=Math.min(A+C,this.dt["d"])}}if(this.dt.refresh())return this.dt}return""},show:function(){Q(this.dd,"block")},hide:function(){Q(this.dd,"none")},attachEvent:E};for(var $ in obj)V.$dp[$]=obj[$];$dp=V.$dp}function E(A,$,_){if(T)A.attachEvent($,_);else{var B=$.replace(/on/,"");_._ieEmuEventHandler=function($){return _($)};A.addEventListener(B,_._ieEmuEventHandler,false)}}function L(){var _,A,$=X[O][C]("script");for(var B=0;B<$.length;B++){_=$[B].src.substring(0,$[B].src.toLowerCase().indexOf("wdatepicker.js"));A=_.lastIndexOf("/");if(A>0)_=_.substring(0,A+1);if(_)break}return _}function F(F){var E,C;if(F.substring(0,1)!="/"&&F.indexOf("://")==-1){E=V.location.href;C=location.href;if(E.indexOf("?")>-1)E=E.substring(0,E.indexOf("?"));if(C.indexOf("?")>-1)C=C.substring(0,C.indexOf("?"));var G,I,$="",D="",A="",J,H,B="";for(J=0;J<Math.max(E.length,C.length);J++){G=E.charAt(J).toLowerCase();I=C.charAt(J).toLowerCase();if(G==I){if(G=="/")H=J}else{$=E.substring(H+1,E.length);$=$.substring(0,$.lastIndexOf("/"));D=C.substring(H+1,C.length);D=D.substring(0,D.lastIndexOf("/"));break}}if($!="")for(J=0;J<$.split("/").length;J++)B+="../";if(D!="")B+=D+"/";F=E.substring(0,E.lastIndexOf("/")+1)+B+F}_.$dpPath=F}function M(A,$,B){var D=X[O][C]("HEAD").item(0),_=X[O].createElement("link");if(D){_.href=A;_.rel="stylesheet";_.type="text/css";if($)_.title=$;if(B)_.charset=B;D.appendChild(_)}}function Z($,_){E($,"onload",_)}function G($){$=$||V;var A=0,_=0;while($!=V){var D=$.parent[O][C]("iframe");for(var F=0;F<D.length;F++){try{if(D[F].contentWindow==$){var E=W(D[F]);A+=E.left;_+=E.top;break}}catch(B){}}$=$.parent}return{"leftM":A,"topM":_}}function W(F){if(F.getBoundingClientRect)return F.getBoundingClientRect();else{var A={ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i},E=false,H=null,_=F.offsetTop,G=F.offsetLeft,D=F.offsetWidth,B=F.offsetHeight,C=F.offsetParent;if(C!=F)while(C){G+=C.offsetLeft;_+=C.offsetTop;if(S(C,"position").toLowerCase()=="fixed")E=true;else if(C.tagName.toLowerCase()=="body")H=C.ownerDocument.defaultView;C=C.offsetParent}C=F.parentNode;while(C.tagName&&!A.ROOT_TAG.test(C.tagName)){if(C.scrollTop||C.scrollLeft)if(!A.OP_SCROLL.test(Q(C)))if(!b||C.style.overflow!=="visible"){G-=C.scrollLeft;_-=C.scrollTop}C=C.parentNode}if(!E){var $=a(H);G-=$.left;_-=$.top}D+=G;B+=_;return{"left":G,"top":_,"right":D,"bottom":B}}}function N($){$=$||V;var B=$[O],A=($.innerWidth)?$.innerWidth:(B[J]&&B[J].clientWidth)?B[J].clientWidth:B.body.offsetWidth,_=($.innerHeight)?$.innerHeight:(B[J]&&B[J].clientHeight)?B[J].clientHeight:B.body.offsetHeight;return{"width":A,"height":_}}function a($){$=$||V;var B=$[O],A=B[J],_=B.body;B=(A&&A.scrollTop!=null&&(A.scrollTop>_.scrollTop||A.scrollLeft>_.scrollLeft))?A:_;return{"top":B.scrollTop,"left":B.scrollLeft}}function D($){src=$?($.srcElement||$.target):null;if($dp&&$dp.cal&&!$dp.eCont&&$dp.dd&&src!=$dp.el&&$dp.dd.style.display=="block")$dp.cal.close()}function Y(){$dp.status=2;H()}function H(){if($dp.flatCfgs.length>0){var $=$dp.flatCfgs.shift();$.el={innerHTML:""};$.autoPickDate=true;$.qsEnabled=false;K($)}}var R,$;function U(J,C){$dp.win=X;B();J=J||{};if(C){if(!G()){$=$||setInterval(function(){if(V[O].readyState=="complete")clearInterval($);U(null,true)},50);return}if($dp.status==0){$dp.status=1;K({el:{innerHTML:""}},true)}else return}else if(J.eCont){J.eCont=$dp.$(J.eCont);$dp.flatCfgs.push(J);if($dp.status==2)H()}else{if($dp.status==0){U(null,true);return}if($dp.status!=2)return;var F=D();if(F){$dp.srcEl=F.srcElement||F.target;F.cancelBubble=true}J.el=$dp.$(J.el||$dp.srcEl);if(!J.el||J.el["My97Mark"]===true||J.el.disabled||(J.el==$dp.el&&Q($dp.dd)!="none"&&$dp.dd.style.left!="-1970px")){J.el["My97Mark"]=false;return}K(J);if(J.el.nodeType==1&&J.el["My97Mark"]===undefined){$dp.el["My97Mark"]=false;var _,A;if(F.type=="focus"){_="onclick";A="onfocus"}else{_="onfocus";A="onclick"}E(J.el,_,J.el[A])}}function G(){if(T&&V!=X&&V[O].readyState!="complete")return false;return true}function D(){if(I){func=D.caller;while(func!=null){var $=func.arguments[0];if($&&($+"").indexOf("Event")>=0)return $;func=func.caller}return null}return event}}function S(_,$){return _.currentStyle?_.currentStyle[$]:document.defaultView.getComputedStyle(_,false)[$]}function Q(_,$){if(_)if($!=null)_.style.display=$;else return S(_,"display")}function K(H,$){for(var D in _)if(D.substring(0,1)!="$")$dp[D]=_[D];for(D in H)if($dp[D]!==undefined)$dp[D]=H[D];var E=$dp.el?$dp.el.nodeName:"INPUT";if($||$dp.eCont||new RegExp(/input|textarea|div|span|p|a/ig).test(E))$dp.elProp=E=="INPUT"?"value":"innerHTML";else return;if($dp.lang=="auto")$dp.lang=T?navigator.browserLanguage.toLowerCase():navigator.language.toLowerCase();if(!$dp.dd||$dp.eCont||($dp.lang&&$dp.realLang&&$dp.realLang.name!=$dp.lang&&$dp.getLangIndex&&$dp.getLangIndex($dp.lang)>=0)){if($dp.dd&&!$dp.eCont)V[O].body.removeChild($dp.dd);if(_.$dpPath=="")F(A);var B="<iframe style=\"width:1px;height:1px\" src=\""+_.$dpPath+"My97DatePicker.htm\" frameborder=\"0\" border=\"0\" scrolling=\"no\"></iframe>";if($dp.eCont){$dp.eCont.innerHTML=B;Z($dp.eCont.childNodes[0],Y)}else{$dp.dd=V[O].createElement("DIV");$dp.dd.style.cssText="position:absolute;z-index:19700";$dp.dd.innerHTML=B;V[O].body.appendChild($dp.dd);Z($dp.dd.childNodes[0],Y);if($)$dp.dd.style.left=$dp.dd.style.top="-1970px";else{$dp.show();C()}}}else if($dp.cal){$dp.show();$dp.cal.init();if(!$dp.eCont)C()}function C(){var F=$dp.position.left,B=$dp.position.top,C=$dp.el;if(C!=$dp.srcEl&&(Q(C)=="none"||C.type=="hidden"))C=$dp.srcEl;var H=W(C),$=G(X),D=N(V),A=a(V),E=$dp.dd.offsetHeight,_=$dp.dd.offsetWidth;if(isNaN(B)){if(B=="above"||(B!="under"&&(($.topM+H.bottom+E>D.height)&&($.topM+H.top-E>0))))B=A.top+$.topM+H.top-E-3;else B=A.top+$.topM+Math.min(H.bottom,D.height-E);B+=T?-1:1}else B+=A.top+$.topM;if(isNaN(F))F=A.left+Math.min($.leftM+H.left,D.width-_-5)-(T?2:0);else F+=A.left+$.leftM;$dp.dd.style.top=B+"px";$dp.dd.style.left=F+"px"}}})()
\ No newline at end of file
var langList =
[
{name:'en', charset:'UTF-8'},
{name:'zh-cn', charset:'UTF-8'},
{name:'zh-tw', charset:'UTF-8'}
];
var skinList =
[
{name:'default', charset:'UTF-8'},
{name:'whyGreen', charset:'UTF-8'}
];
\ No newline at end of file
var $lang={
errAlertMsg: "Invalid date or the date out of range,redo or not?",
aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],
aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
aLongMonStr: ["January","February","March","April","May","June","July","August","September","October","November","December"],
clearStr: "Clear",
todayStr: "Today",
okStr: "OK",
updateStr: "OK",
timeStr: "Time",
quickStr: "Quick Selection",
err_1: 'MinDate Cannot be bigger than MaxDate!'
}
\ No newline at end of file
var $lang={
errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u8303\u56F4,\u9700\u8981\u64A4\u9500\u5417?",
aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],
aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],
aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"],
aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],
clearStr: "\u6E05\u7A7A",
todayStr: "\u4ECA\u5929",
okStr: "\u786E\u5B9A",
updateStr: "\u786E\u5B9A",
timeStr: "\u65F6\u95F4",
quickStr: "\u5FEB\u901F\u9009\u62E9",
err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u4E8E\u6700\u5927\u65E5\u671F!'
}
\ No newline at end of file
var $lang={
errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u7BC4\u570D,\u9700\u8981\u64A4\u92B7\u55CE?",
aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],
aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],
aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"],
aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],
clearStr: "\u6E05\u7A7A",
todayStr: "\u4ECA\u5929",
okStr: "\u78BA\u5B9A",
updateStr: "\u78BA\u5B9A",
timeStr: "\u6642\u9593",
quickStr: "\u5FEB\u901F\u9078\u64C7",
err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u65BC\u6700\u5927\u65E5\u671F!'
}
\ No newline at end of file
.Wdate{
border:#999 1px solid;
height:20px;
background:#fff url(datePicker.gif) no-repeat right;
}
.WdateFmtErr{
font-weight:bold;
color:red;
}
\ No newline at end of file
/*
* My97 DatePicker 4.7
*/
.WdateDiv{
width:180px;
background-color:#FFFFFF;
border:#bbb 1px solid;
padding:2px;
}
.WdateDiv2{
width:360px;
}
.WdateDiv *{font-size:9pt;}
.WdateDiv .NavImg a{
display:block;
cursor:pointer;
height:16px;
width:16px;
}
.WdateDiv .NavImgll a{
float:left;
background:transparent url(img.gif) no-repeat scroll 0 0;
}
.WdateDiv .NavImgl a{
float:left;
background:transparent url(img.gif) no-repeat scroll -16px 0;
}
.WdateDiv .NavImgr a{
float:right;
background:transparent url(img.gif) no-repeat scroll -32px 0;
}
.WdateDiv .NavImgrr a{
float:right;
background:transparent url(img.gif) no-repeat scroll -48px 0;
}
.WdateDiv #dpTitle{
height:24px;
margin-bottom:2px;
padding:1px;
}
.WdateDiv .yminput{
margin-top:2px;
text-align:center;
height:20px;
border:0px;
width:50px;
cursor:pointer;
}
.WdateDiv .yminputfocus{
margin-top:2px;
text-align:center;
font-weight:bold;
height:20px;
color:blue;
border:#ccc 1px solid;
width:50px;
}
.WdateDiv .menuSel{
z-index:1;
position:absolute;
background-color:#FFFFFF;
border:#ccc 1px solid;
display:none;
}
.WdateDiv .menu{
cursor:pointer;
background-color:#fff;
}
.WdateDiv .menuOn{
cursor:pointer;
background-color:#BEEBEE;
}
.WdateDiv .invalidMenu{
color:#aaa;
}
.WdateDiv .YMenu{
margin-top:20px;
}
.WdateDiv .MMenu{
margin-top:20px;
*width:62px;
}
.WdateDiv .hhMenu{
margin-top:-90px;
margin-left:26px;
}
.WdateDiv .mmMenu{
margin-top:-46px;
margin-left:26px;
}
.WdateDiv .ssMenu{
margin-top:-24px;
margin-left:26px;
}
.WdateDiv .Wweek {
text-align:center;
background:#DAF3F5;
border-right:#BDEBEE 1px solid;
}
.WdateDiv .MTitle{
background-color:#BDEBEE;
}
.WdateDiv .WdayTable2{
border-collapse:collapse;
border:#c5d9e8 1px solid;
}
.WdateDiv .WdayTable2 table{
border:0;
}
.WdateDiv .WdayTable{
line-height:20px;
border:#c5d9e8 1px solid;
}
.WdateDiv .WdayTable td{
text-align:center;
}
.WdateDiv .Wday{
cursor:pointer;
}
.WdateDiv .WdayOn{
cursor:pointer;
background-color:#C0EBEF;
}
.WdateDiv .Wwday{
cursor:pointer;
color:#FF2F2F;
}
.WdateDiv .WwdayOn{
cursor:pointer;
color:#000;
background-color:#C0EBEF;
}
.WdateDiv .Wtoday{
cursor:pointer;
color:blue;
}
.WdateDiv .Wselday{
background-color:#A9E4E9;
}
.WdateDiv .WspecialDay{
background-color:#66F4DF;
}
.WdateDiv .WotherDay{
cursor:pointer;
color:#6A6AFF;
}
.WdateDiv .WotherDayOn{
cursor:pointer;
background-color:#C0EBEF;
}
.WdateDiv .WinvalidDay{
color:#aaa;
}
.WdateDiv #dpTime{
float:left;
margin-top:3px;
margin-right:30px;
}
.WdateDiv #dpTime #dpTimeStr{
margin-left:1px;
}
.WdateDiv #dpTime input{
width:18px;
height:20px;
text-align:center;
border:#ccc 1px solid;
}
.WdateDiv #dpTime .tB{
border-right:0px;
}
.WdateDiv #dpTime .tE{
border-left:0;
border-right:0;
}
.WdateDiv #dpTime .tm{
width:7px;
border-left:0;
border-right:0;
}
.WdateDiv #dpTime #dpTimeUp{
height:10px;
width:13px;
border:0px;
background:url(img.gif) no-repeat -32px -16px;
}
.WdateDiv #dpTime #dpTimeDown{
height:10px;
width:13px;
border:0px;
background:url(img.gif) no-repeat -48px -16px;
}
.WdateDiv #dpQS {
float:left;
margin-right:3px;
margin-top:3px;
background:url(img.gif) no-repeat 0px -16px;
width:20px;
height:20px;
cursor:pointer;
}
.WdateDiv #dpControl {
text-align:right;
}
.WdateDiv .dpButton{
height:20px;
width:45px;
border:#ccc 1px solid;
margin-top:2px;
margin-right:1px;
}
\ No newline at end of file
/*
* My97 DatePicker 4.7 Skin:whyGreen
*/
.WdateDiv{
width:180px;
background-color:#fff;
border:#C5E1E4 1px solid;
padding:2px;
}
.WdateDiv2{
width:360px;
}
.WdateDiv *{font-size:9pt;}
.WdateDiv .NavImg a{
cursor:pointer;
display:block;
width:16px;
height:16px;
margin-top:1px;
}
.WdateDiv .NavImgll a{
float:left;
background:url(img.gif) no-repeat;
}
.WdateDiv .NavImgl a{
float:left;
background:url(img.gif) no-repeat -16px 0px;
}
.WdateDiv .NavImgr a{
float:right;
background:url(img.gif) no-repeat -32px 0px;
}
.WdateDiv .NavImgrr a{
float:right;
background:url(img.gif) no-repeat -48px 0px;
}
.WdateDiv #dpTitle{
height:24px;
padding:1px;
border:#c5d9e8 1px solid;
background:url(bg.jpg);
margin-bottom:2px;
}
.WdateDiv .yminput{
margin-top:2px;
text-align:center;
border:0px;
height:20px;
width:50px;
color:#034c50;
background-color:transparent;
cursor:pointer;
}
.WdateDiv .yminputfocus{
margin-top:2px;
text-align:center;
border:#939393 1px solid;
font-weight:bold;
color:#034c50;
height:20px;
width:50px;
}
.WdateDiv .menuSel{
z-index:1;
position:absolute;
background-color:#FFFFFF;
border:#A3C6C8 1px solid;
display:none;
}
.WdateDiv .menu{
cursor:pointer;
background-color:#fff;
color:#11777C;
}
.WdateDiv .menuOn{
cursor:pointer;
background-color:#BEEBEE;
}
.WdateDiv .invalidMenu{
color:#aaa;
}
.WdateDiv .YMenu{
margin-top:20px;
}
.WdateDiv .MMenu{
margin-top:20px;
*width:62px;
}
.WdateDiv .hhMenu{
margin-top:-90px;
margin-left:26px;
}
.WdateDiv .mmMenu{
margin-top:-46px;
margin-left:26px;
}
.WdateDiv .ssMenu{
margin-top:-24px;
margin-left:26px;
}
.WdateDiv .Wweek {
text-align:center;
background:#DAF3F5;
border-right:#BDEBEE 1px solid;
}
.WdateDiv .MTitle{
color:#13777e;
background-color:#bdebee;
}
.WdateDiv .WdayTable2{
border-collapse:collapse;
border:#BEE9F0 1px solid;
}
.WdateDiv .WdayTable2 table{
border:0;
}
.WdateDiv .WdayTable{
line-height:20px;
color:#13777e;
background-color:#edfbfb;
border:#BEE9F0 1px solid;
}
.WdateDiv .WdayTable td{
text-align:center;
}
.WdateDiv .Wday{
cursor:pointer;
}
.WdateDiv .WdayOn{
cursor:pointer;
background-color:#74d2d9 ;
}
.WdateDiv .Wwday{
cursor:pointer;
color:#ab1e1e;
}
.WdateDiv .WwdayOn{
cursor:pointer;
background-color:#74d2d9;
}
.WdateDiv .Wtoday{
cursor:pointer;
color:blue;
}
.WdateDiv .Wselday{
background-color:#A7E2E7;
}
.WdateDiv .WspecialDay{
background-color:#66F4DF;
}
.WdateDiv .WotherDay{
cursor:pointer;
color:#0099CC;
}
.WdateDiv .WotherDayOn{
cursor:pointer;
background-color:#C0EBEF;
}
.WdateDiv .WinvalidDay{
color:#aaa;
}
.WdateDiv #dpTime{
float:left;
margin-top:3px;
margin-right:30px;
}
.WdateDiv #dpTime #dpTimeStr{
margin-left:1px;
color:#497F7F;
}
.WdateDiv #dpTime input{
height:20px;
width:18px;
text-align:center;
color:#333;
border:#61CAD0 1px solid;
}
.WdateDiv #dpTime .tB{
border-right:0px;
}
.WdateDiv #dpTime .tE{
border-left:0;
border-right:0;
}
.WdateDiv #dpTime .tm{
width:7px;
border-left:0;
border-right:0;
}
.WdateDiv #dpTime #dpTimeUp{
height:10px;
width:13px;
border:0px;
background:url(img.gif) no-repeat -32px -16px;
}
.WdateDiv #dpTime #dpTimeDown{
height:10px;
width:13px;
border:0px;
background:url(img.gif) no-repeat -48px -16px;
}
.WdateDiv #dpQS {
float:left;
margin-right:3px;
margin-top:3px;
background:url(img.gif) no-repeat 0px -16px;
width:20px;
height:20px;
cursor:pointer;
}
.WdateDiv #dpControl {
text-align:right;
margin-top:3px;
}
.WdateDiv .dpButton{
height:20px;
width:45px;
margin-top:2px;
border:#38B1B9 1px solid;
background-color:#CFEBEE;
color:#08575B;
}
\ No newline at end of file
*{
margin: 0;
padding: 0;
}
body{
font-size: 12px;
background: url("../images/body.jpeg") no-repeat center;
margin-left: 16px;
margin-right: 16px;
margin-top: 1px;
}
.clear:after{
content: '';
display: block;
clear: both;
}
a{
text-decoration: none;
}
li{
list-style: none;
}
/*公共样式,头部*/
.publicHeader{
height: 100px;
line-height: 100px;
font-size: 14px;
}
.publicHeader h1{
float: left;
color: #fff;
font-size: 22px;
padding-left:80px;
text-shadow: 2px 1px #000;
background: url("../images/tianjia.png") 30px center no-repeat;
}
.publicHeaderR{
float: right;
color: #fff;
margin-right: 50px;
}
.publicHeaderR p{
display: inline-block;
font-weight: bold;
}
.publicHeaderR a{
width: 50px;
height: 28px;
display: inline-block;
border: 1px solid #679e43;
background: linear-gradient(to bottom,#baf076,#a2d866,#9cd055,#8dc838,#8bc93a);
line-height: 28px;
text-align: center;
border-radius: 4px;
font-weight: bold;
color: #fff;
}
.publicHeaderR a:hover,.publicHeaderR a:active{
border: 1px solid #192b02;
border-radius: 4px;
font-weight: bold;
background: linear-gradient(to bottom,#70b21c,#5c9613,#47740e,#3b6209,#2b4906);
}
/*时间*/
.publicTime{
height: 38px;
line-height: 38px;
font-size: 12px;
background: linear-gradient(to bottom,#f5f9f8,#eef2fb,#e2ecf5,#e2ecf5,#e0edf6);
padding-left: 20px;
color: #808589;
}
#time{
float: left;
background: url("../images/time.png") 0 center no-repeat;
padding-left: 26px;
}
.publicTime a{
float: right;
margin-right: 50px;
color: #626367;
}
/*公共部分主体内容*/
.publicMian{
border-top: 1px solid #c2ccd5;
display: flex; /*变为弹性盒模型*/
display: -webkit-flex;
background: #fff;
}
/*左边*/
.left{
width: 168px;
background: url("../images/leftBg.png") 0 0 repeat-y;
margin-right: 10px;
/*height: 520px;*/
min-height: 520px;
}
.leftH2{
width: 140px;
height: 35px;
border-radius: 4px;
line-height: 35px;
text-align: center;
color: #fff;
background: darkorange;
margin: 10px auto;
box-shadow:4px 4px rgba(212,212,212,0.7);
}
.leftH2 span{
width: 10px;
height: 10px;
display: inline-block;
/*
background: radial-gradient(#70c2f4,#3a8dc1, #035384, #4696c7,#83d1f5);
*/
background: radial-gradient(#fff, #ffbc0e, #ffbc0e, darkorange, orange);
border-radius: 50%;
}
.span1{
margin-right: 10px;
}
.span2{
margin-left: 12px;
}
.list{
margin: 0 20px;
font-weight: bold;
}
.list li{
height: 60px;
line-height: 60px;
border-bottom: 1px solid rgba(212,212,212,0.5) ;
}
/*.list li:nth-child(1){
background: url("../images/zd.png") 0 center no-repeat;
}*/
.list li:nth-child(1){
background: url("../images/gys.png") 0 center no-repeat;
}
.list li:nth-child(2){
background: url("../images/yh.png") 0 center no-repeat;
}
/*.list li:nth-child(4){
background: url("../images/mm.png") 0 center no-repeat;
}*/
.list li:nth-child(3){
background: url("../images/tc.png") 0 center no-repeat;
}
.list li:hover{
background-color: #ffbc0e;
border-radius: 4px;
}
.list li:active, #active{
background-color:orange;
border-radius: 4px;
}
.list a{
color: black;
display: inline-block;
padding-left: 40px;
width: 90%;
}
/*右边*/
.right{
width: 90%;
margin-bottom: 20px;
}
.right_box{
position: absolute;
}
/*右边所在位置栏*/
.location{
height: 35px;
line-height: 35px;
border: 1px solid #e6eaf6;
border-radius: 8px;
background: linear-gradient(to bottom, #fefefe,#ffffff,#f6fafd);
color: #4a4a4a;
padding-left: 10px;
}
.location strong{
/* background: url("../images/home.png") 0 center no-repeat;*/
display: inline-block;
padding-left: 30px;
}
.location span{
color: #2179a9;
font-weight: bold;
}
/*搜索信息栏*/
.search{
height:50px;
line-height:50px;
background: #f6fafd;
/*
padding-left: 10px;
*/
color: #000;
}
.search input[type='text']{
width: 400px;
height: 30px;
outline: none;
padding-left: 10px;
border: 1px solid #8ab2d5;
border-radius: 4px;
}
.search input[type='button']{
margin-left: 20px;
width: 100px;
padding: 0 20px;
height: 30px;
border: 1px solid #7ba92c;
border-radius: 4px;
color: #fff;
font-weight: bold;
background:#87c212 url("../images/search.png") 10px center no-repeat;
}
.search input[type='button']:focus{
outline: none;
background-color: #5d8410;
}
.search a{
width: 80px;
padding-left:40px;
float: right;
margin: 10px 60px;
height: 30px;
line-height: 30px;
border: 1px solid darkorange;
border-radius: 4px;
color: #fff;
font-weight: bold;
background:orange url("../images/tianjia.png") 10px center no-repeat;
display: inline-block;
}
.search a:hover,.search a:active{
background-color: darkorange;
}
.search span{
margin-left: 10px;
}
.search select{
margin: 10px;
width: 100px;
height: 30px;
border-radius: 4px;
border: 1px solid #0c89de;
outline: none;
}
/*底部*/
.footer{
width: 100%;
line-height: 40px;
text-align: center;
color: #fff;
}
#searchbutton{
margin-left: 20px;
width: 100px;
padding: 0 20px;
height: 30px;
border: 1px solid darkorange;
border-radius: 4px;
color: #fff;
font-weight: bold;
background:orange url("../images/search.png") 10px center no-repeat;
}
#searchbutton:focus{
outline: none;
background-color: #ffbc0e;
}
* {
margin: 0;
padding: 0;
}
/*登录页面*/
.login_bg {
background: url("../images/backbg.jpeg") 0 0 no-repeat;
height: 970px;
width: 1600px;
position:fixed;
}
.loginCont {
width: 488px;
height: 300px;
padding: 330px 700px;
/*padding: 20px;*/
position: relative;
}
/*输入框里默认输入字体*/
::-webkit-input-placeholder {
color: rgb(190, 188, 188);
/*font-style: italic;*/
}
input:-moz-placeholder,
textarea:-moz-placeholder {
color: rgb(190, 188, 188);
font-style: italic;
}
input {
outline: none;
}
.inputbox {
height: 60px;
}
.inputbox label{
width: 50px;
display: inline-block;
text-align: right;
}
.info {
color: red;
font-weight:bold;
}
.inputbox input {
width: 45%;
padding: 10px 5px 10px 20px;
border: 1px solid rgb(178, 178, 178);
border-radius: 3px;
-webkit-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.6) inset;
-moz-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.6) inset;
box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.6) inset;
}
/*输入框得到焦点的效果*/
.inputbox input:active, .providerAdd input:focus,
.inputbox input:focus {
border: 1px solid rgba(91, 90, 90, 0.7);
background: rgba(238, 236, 240, 0.2);
-webkit-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.9) inset;
-moz-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.9) inset;
box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.9) inset;
}
.subBtn {
margin: 20px;
padding:0px 60px ;
/* border: orange;*/
}
/*/!*登录页登录和重置按钮*!/.providerView a是供应商管理页面下信息查看也得返回按钮的样式*/
input[type='submit'], .providerView a {
width: 30%;
cursor: pointer;
background: darkorange;
padding: 6px 18px;
font-family: 'BebasNeueRegular', 'Arial Narrow', Arial, sans-serif;
color: #fff;
font-size: 18px;
border: 1px solid orange;
margin-bottom: 10px;
margin-right: 5px;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0px 1px 4px 4px rgba(0, 0, 0, 0.07) inset,
0px 0px 0px 3px rgb(254, 254, 254),
0px 5px 3px 3px rgb(210, 210, 210);
-moz-box-shadow: 0px 1px 4px 4px rgba(0, 0, 0, 0.07) inset,
0px 0px 0px 3px rgb(254, 254, 254),
0px 5px 3px 3px rgb(210, 210, 210);
box-shadow: 0px 1px 4px 4px rgba(0, 0, 0, 0.07) inset,
0px 0px 0px 3px rgb(254, 254, 254),
0px 5px 3px 3px rgb(210, 210, 210);
}
input[type='submit']:hover {
/* background: rgb(74, 179, 198);*/
background: #ffbc0e;
}
input[type='submit']:active, input[type='submit']:focus,
.providerView a:hover, .providerView a:active {
background: #faca0d;
border: 1px solid #ffbc0e;
-webkit-box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.2) inset;
-moz-box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.2) inset;
box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.2) inset;
}
/*欢迎登录页*/
.wColck {
width: 88px;
height: 108px;
margin: 50px;
float: left;
}
.wFont {
float: left;
margin-top: 50px;
}
.wFont h2 {
font-size: 30px;
line-height: 50px;
color: #0a5eb6;
}
.wFont p {
font-size: 14px;
line-height: 30px;
color: #5a656c;
}
/*供应商管理页面*/
.providerTable {
width: 100%;
border: 1px solid #ccc;
}
.providerTable tr {
height: 30px;
line-height: 30px;
text-align: center;
}
.providerTable tr:nth-child(odd) {
background: #f6f7f9;
}
.providerTable tr:hover {
background: #ffbc0e;
}
.firstTr {
border: 1px solid #d6dfe6;
background: linear-gradient(to bottom, #f3f8fc, #ebf4f9, #e3f1fa, #e0f0fd, #d8e9fd);
}
.firstTr th {
border-right: 2px solid rgba(209, 218, 223, 0.4);
}
.td-con span{
word-break: break-word;
/* white-space: pre-wrap;*/
display: block;
/* height: 40px;
line-height: 40px;*/
}
.cao_zuo{
display: flex;
justify-content: center;
align-items: center;
}
.providerTable td a {
margin-top: 10px;
display: inline-block;
margin-right: 10px;
}
/*供应商管理页面-->下面的信息查看页面*/
.providerView {
margin: 20px 0;
font-size: 16px;
height: 30px;
line-height: 30px;
padding-top: 30px;
padding-left: 5px;
}
.providerView strong {
display: inline-block;
width: 300px;
text-align: right;
}
.providerView span {
color: #bd644e;
width: 500px;
}
/*供应商管理页面-->供应商添加页面*/
.providerAdd {
border: 1px solid #9ac70f;
padding: 20px;
margin: 20px;
}
.providerAdd div {
margin-top: 15px;
margin-bottom: 15px;
}
.providerAdd label {
width: 230px;
display: inline-block;
text-align: right;
}
.providerAdd input ,.providerAdd select{
width: 600px;
height: 35px;
line-height: 35px;
border-radius: 4px;
outline: none;
padding-left: 10px;
border: 1px solid #4987c0;
box-shadow: 1px 1px 1px #99afc4;
}
.providerAdd input:focus,.providerAdd select:focus {
border: 1px solid #0e56a8;
background: rgba(238, 236, 240, 0.2);
-webkit-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.9) inset;
-moz-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.9) inset;
box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.9) inset;
}
.providerAdd span {
margin-left: 20px;
color: #faca0d;
}
/*验证错误*/
.providerAdd .error span {
color: red;
}
.providerAdd .error input {
border: 1px solid red;
}
/*验证成功*/
.providerAdd .ok span {
color: green;
}
.providerAdd .ok input {
border: 1px solid green;
}
.providerAddBtn {
margin-left: 340px;
padding-top: 20px;
}
.providerAddBtn a ,
.providerAddBtn input[type='submit'],
.providerAddBtn input[type='button'] {
display: inline-block;
width: 100px;
height: 30px;
line-height: 30px;
text-align: center;
border-radius: 4px;
border: transparent;
background: linear-gradient(to bottom, #faca0d, #ffbc0e, darkorange, orange, darkorange);
color: #fff;
cursor: pointer;
font-weight: bold;
font-size: 14px;
vertical-align: top;
}
.providerAddBtn a:active,
.providerAddBtn a:focus,
.providerAddBtn a:hover,
.providerAddBtn input[type='submit']:hover,
.providerAddBtn input[type='submit']:focus{
background: linear-gradient(to bottom, #7aaed4, #578bb4, #406e99, #225792, #0d2d54);
}
.providerAdd input[type='radio']{
width: 20px;
height: 14px;
line-height:12px;
border-radius: 4px;
outline: none;
padding-left: 10px;
border: none;
box-shadow: none;
}
/*页码*/
.page-bar
{
position:relative;
margin-top:10px;
}
.page-num-ul li
{
float:left;
padding-left: 10px;
padding-right: 30px;
}
.page-num-ul li a
{
display:inline-block;
padding:3px 5px;
margin:3px 10px;
border:1px solid #b8b8b8;
}
.page-num-ul a:hover,.page-num-ul .thisclass
{
border:1px solid darkorange;
background-color:orange;
color:#FFF;
text-decoration:none;
}
.page-key
{
width:50px;
}
.page-btn
{
border:1px solid #faca0d;
border-radius: 4px;
background-color:orange;
display:inline-block;
width:52px;
height:25px;
line-height:25px;
font-weight:20;
}
.page-go-form
{
position:absolute;
display:inline-block;
right:10px;
top:0px;
}
.page-go-form input,label,button
{
margin:0px 5px;
}
/**/
#apiCon{
display: none;
}
.api-modal{
position: absolute;
width: 820px;
height: 500px;
border-radius: 6px;
background: #fff;
z-index:100;
left: 0;
top: 0;
bottom: 0;
right: 0;
margin: auto;
/*
background-color: rgb(224, 220, 215);
*/
background: linear-gradient(to bottom,#f5f9f8,#eef2fb,#e2ecf5,#e2ecf5,#e0edf6);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment