Merge branch 'master' of https://bdgit.educoder.net/zxy19971014/zx
@ -0,0 +1,60 @@
|
||||
Page({
|
||||
shujichzhao: function (e) {
|
||||
var that = this
|
||||
wx.request({
|
||||
url: 'http://localhost:9528/zxbook/find1',
|
||||
|
||||
data: {
|
||||
'search': e.detail.value.search,
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "pplication/json"
|
||||
},
|
||||
methods: {
|
||||
method: "POST",
|
||||
},
|
||||
success: function (res) {
|
||||
if(res.data=='zhaobudao'){
|
||||
wx.showModal({
|
||||
title: '书籍查询',
|
||||
content: '未找到该书籍',
|
||||
confirmColor: "rgba(253, 153, 65, 1)"
|
||||
})
|
||||
}
|
||||
|
||||
else{
|
||||
var book=res.data
|
||||
let bookstr = JSON.stringify(book);
|
||||
console.log(book);
|
||||
wx.navigateTo({
|
||||
url: '../shuji/shuji?bookstr=' + bookstr,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
fenlei:function(e){
|
||||
wx.request({
|
||||
url: 'http://localhost:9527/zxbook/find2',
|
||||
data:{
|
||||
'search':e.target.id,
|
||||
|
||||
|
||||
},
|
||||
|
||||
header: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
methods: {
|
||||
method: "POST",
|
||||
},
|
||||
|
||||
})
|
||||
console.log(e.target.id);
|
||||
var book = res.data
|
||||
let bookstr = JSON.stringify(book);
|
||||
console.log(book);
|
||||
|
||||
}
|
||||
|
||||
})
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
|
||||
<form bindsubmit="shujichzhao" >
|
||||
<view class='page_row' >
|
||||
<view class="search">
|
||||
<view class="df search_arr">
|
||||
<icon class="searchcion" size='20' type='search'></icon>
|
||||
<input placeholder="请输入书名或书号查询" value="{{searchValue}}"confirm-type="search"name="search"/>
|
||||
</view>
|
||||
</view>
|
||||
<button class="button1" form-type="submit" >搜索</button>
|
||||
</view>
|
||||
</form>
|
||||
<view class='page_row'>
|
||||
<view class="font">分类</view>
|
||||
|
||||
</view>
|
||||
<view class='page_row' >
|
||||
<button class="button2" bindtap='fenlei' id='农学类'>农学</button>
|
||||
<button class="button2" bindtap='fenlei' id='医学类'>医学</button>
|
||||
</view>
|
||||
<view class='page_row' >
|
||||
<button class="button2" bindtap='fenlei' id='计算机类' >计算机</button>
|
||||
<button class="button2" bindtap='fenlei' id='自然科学类'>自然科学</button>
|
||||
</view>
|
||||
<view class='page_row' >
|
||||
<button class="button2" bindtap='fenlei' id='人文历史类'>人文历史</button>
|
||||
<button class="button2" bindtap='fenlei' id='文学名著类'>文学名著</button>
|
||||
</view>
|
||||
<view class='page_row'>
|
||||
<view class="font">猜你喜欢</view>
|
||||
|
||||
</view>
|
||||
|
@ -0,0 +1,58 @@
|
||||
Page({
|
||||
formSubmit: function (e) {
|
||||
wx.request({
|
||||
url: 'http://localhost:9528/zxlogin/login',
|
||||
data: {
|
||||
'userid': e.detail.value.userid,
|
||||
'userpassword': e.detail.value.userpassword,
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded"
|
||||
},
|
||||
|
||||
methods: {
|
||||
method: "POST",
|
||||
},
|
||||
success: function (res) {
|
||||
var user = res.data
|
||||
let userstr = JSON.stringify(user);
|
||||
|
||||
if (res.data == "100") {
|
||||
wx.showModal({
|
||||
title: '登录消息',
|
||||
content: '密码错误',
|
||||
confirmColor: "rgba(253, 153, 65, 1)"
|
||||
})
|
||||
}
|
||||
|
||||
else if (res.data == "001") {
|
||||
wx.showModal({
|
||||
title: '登录消息',
|
||||
content: '用户名不存在',
|
||||
confirmColor: "rgba(253, 153, 65, 1)"
|
||||
})
|
||||
}
|
||||
else {
|
||||
wx.showModal({
|
||||
title: '登录消息',
|
||||
content: '登录成功',
|
||||
confirmColor: "rgba(253, 153, 65, 1)",
|
||||
|
||||
success: function (res) {
|
||||
wx.setStorageSync('userstr', userstr)
|
||||
console.log(wx.getStorageSync('userstr'));
|
||||
|
||||
|
||||
if (res.confirm) {
|
||||
wx.switchTab({
|
||||
url: '../shouye/shouye',
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
<form bindsubmit="formSubmit" >
|
||||
<view class="container">
|
||||
<view class="login-icon">
|
||||
|
||||
<image class="login-img" src="../image/123.jpg"></image>
|
||||
|
||||
</view>
|
||||
<view class="login-from">
|
||||
|
||||
<!--账号-->
|
||||
<view class="inputView">
|
||||
<label class="loginLab">账号</label>
|
||||
<input class="inputText" placeholder="请输入账号" bindinput="phoneInput" maxlength="15" name="userid"value="{{idTxt}}" />
|
||||
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
|
||||
<!--密码-->
|
||||
<view class="inputView">
|
||||
<label class="loginLab">密码</label>
|
||||
<input class="inputText" name="userpassword" password="true" value="{{passwordTxt}}" placeholder="默认密码身份证后六位" bindinput="passwordInput" />
|
||||
</view>
|
||||
<!--按钮-->
|
||||
<view class="loginBtnView">
|
||||
|
||||
<button class="loginBtn" loading="{{loading}}" plain="{{plain}}" disabled="{{disabled}}" bindtap="login" formType="submit">登录</button>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
|
||||
|
@ -0,0 +1,82 @@
|
||||
page{
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.container {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
background-color: #f2f2f2
|
||||
}
|
||||
|
||||
/*登录图片*/
|
||||
.login-icon{
|
||||
flex: none;
|
||||
}
|
||||
.login-img{
|
||||
width: 750rpx;
|
||||
}
|
||||
|
||||
/*表单内容*/
|
||||
.login-from {
|
||||
margin-top: 20px;
|
||||
flex: auto;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
.inputView {
|
||||
background-color: #fff;
|
||||
line-height: 44px;
|
||||
}
|
||||
/*输入框*/
|
||||
.nameImage, .keyImage {
|
||||
margin-left: 42px;
|
||||
width: 14px;
|
||||
height: 14px
|
||||
}
|
||||
|
||||
.loginLab {
|
||||
margin: 15px 15px 15px 10px;
|
||||
color: #545454;
|
||||
font-size: 14px
|
||||
}
|
||||
.inputText {
|
||||
flex: block;
|
||||
float: right;
|
||||
text-align: right;
|
||||
margin-right: 22px;
|
||||
margin-top: 11px;
|
||||
width: 290px;
|
||||
|
||||
color: #000;
|
||||
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background-color: #cccccc;
|
||||
margin-top: 1px;
|
||||
}
|
||||
/*按钮*/
|
||||
.loginBtnView {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
|
||||
|
||||
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
.loginBtn {
|
||||
width: 80%;
|
||||
margin-top: 35px;
|
||||
|
||||
background-color:rgb(253, 153, 65);
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
|
||||
|
||||
// 获取全局应用程序实例对象
|
||||
const app = getApp();
|
||||
|
||||
// 创建页面实例对象
|
||||
Page({
|
||||
onLoad: function () {
|
||||
var userstr=wx.getStorageSync('userstr')
|
||||
console.log(userstr);
|
||||
let user = JSON.parse(userstr);
|
||||
console.log(user);
|
||||
var that = this
|
||||
that.setData({
|
||||
userid: user.userid,
|
||||
username: user.username,
|
||||
userauthor: user.userpassword
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
<image class="wx-image_TCMtbw" mode="scaleToFill" src="//o3bnyc.creatby.com/diazo/images/image-placeholder.svg" style="background-size: 100% 100%; background-position: 0% 0%; background-repeat: no-repeat; background-image: url(http://o3bnyc.creatby.com/diazo/images/image-placeholder.svg);"/>
|
||||
<text class="c-block wx-text_3ayXhS" > 姓名:{{username}}</text>
|
||||
<text class="c-block wx-text_cEEG0A" > 学号:{{userid}}</text>
|
||||
<text class="c-block wx-text_lkXRAs" > 密码:</text>
|
@ -0,0 +1,73 @@
|
||||
/* 基础样式 */
|
||||
view,scroll-view,swiper,swiper-item,icon,text,progress,button,checkbox-group,checkbox,form,input,label,picker,radio-group,radio,slider,switch,action-sheet,action-sheet-item,action-sheet-cancel,modal,toast,loading,navigator,audio,image,video,map,canvas {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
page {
|
||||
height: 100%;
|
||||
font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
checkbox-group,
|
||||
radio-group{
|
||||
display:block;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
:before,
|
||||
:after ,
|
||||
::before,
|
||||
::after{
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.c-minheight {
|
||||
min-height: 80px;
|
||||
}
|
||||
.c-full {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.c-block {
|
||||
display: block;
|
||||
}
|
||||
.c-autosize {
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
.c-fullwidth {
|
||||
width: 100%;
|
||||
}
|
||||
.c-fullheight {
|
||||
height: 100%;
|
||||
}
|
||||
.c-initHide{
|
||||
opacity:0 !important;
|
||||
}
|
||||
.c-ellipse{
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow:hidden;
|
||||
}
|
||||
/* 自定义样式 */
|
||||
|
||||
|
||||
|
||||
|
||||
.wx-image_TCMtbw{transition: All 0s ease; transform: rotate(0deg) scale(0.5) translate(22%,0%); -ms-transform: rotate(0deg) scale(0.5) translate(22%,0%); -o-transform: rotate(0deg) scale(0.5) translate(22%,0%); -moz-transform: rotate(0deg) scale(0.5) translate(22%,0%); -webkit-transform: rotate(0deg) scale(0.5) translate(22%,0%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
|
||||
.wx-text_3ayXhS{border-radius: 15px; transition: all; margin-right: 80px; margin-left: 100px; background-repeat: repeat; transform: rotate(0deg) scale(1.2) translate(0%, 0%); background-color: rgba(253, 153, 65, 0.67); }
|
||||
.wx-text_cEEG0A{border-radius: 15px; transition: all; margin-right: 80px; margin-left: 100px; transform: rotate(0deg) scale(1.2) translate(0%, 152%); background-color: rgba(253, 153, 65, 0.67); border-bottom-right-radius: 15px; border-bottom-left-radius: 15px; border-top-right-radius: 15px; border-top-left-radius: 15px; }
|
||||
.wx-text_lkXRAs{border-radius: 15px; transition: all; margin-right: 80px; margin-left: 100px; transform: rotate(0deg) scale(1.2) translate(0%, 304%); background-color: rgba(253, 153, 65, 0.67); border-bottom-right-radius: 15px; border-bottom-left-radius: 15px; border-top-right-radius: 15px; border-top-left-radius: 15px; }
|
||||
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 3.7 KiB |
@ -0,0 +1,9 @@
|
||||
Page({
|
||||
sss:function(e){
|
||||
wx.scanCode({
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
})
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
<button class="button1" bindtap='sss'>
|
||||
<button class="button2">
|
||||
扫一扫
|
||||
</button></button>
|
||||
|
@ -0,0 +1,24 @@
|
||||
/* jieyue/jieyue.wxss */
|
||||
page {
|
||||
background-image:url('https://photo.16pic.com/00/24/39/16pic_2439427_b.jpg');
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position-y: center;
|
||||
background-position-x: center;
|
||||
|
||||
}
|
||||
.button1{
|
||||
width: 50%;
|
||||
margin-top: 450rpx;
|
||||
background-color:rgba(253, 153, 65, 0.67);
|
||||
color: white;
|
||||
border-radius: 98rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.button1::after
|
||||
{
|
||||
border: 0;
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
// jieyuejielu/yiwancheng/yiwancheng.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
<!--jieyuejielu/yiwancheng/yiwancheng.wxml-->
|
||||
<text>jieyuejielu/yiwancheng/yiwancheng.wxml</text>
|
@ -0,0 +1 @@
|
||||
/* jieyuejielu/yiwancheng/yiwancheng.wxss */
|
@ -0,0 +1,25 @@
|
||||
|
||||
Page({
|
||||
onLoad: function (options) {
|
||||
console.log(options);
|
||||
let book = JSON.parse(options.bookstr);
|
||||
console.log(book);
|
||||
var that = this
|
||||
that.setData({
|
||||
sname: book[0].s_name,
|
||||
sid: book[0].s_id,
|
||||
bookname: book[0].book_name,
|
||||
bookid: book[0].book_id,
|
||||
booknum: book[0].book_num
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
})
|
@ -0,0 +1,28 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {},
|
||||
"pages": [
|
||||
"jieyuezhong/jieyuezhong",
|
||||
"yiwancheng/yiwancheng"
|
||||
],
|
||||
"tabBar": {
|
||||
"color": "#000000",
|
||||
"selectedColor": "#fd9941",
|
||||
"borderStyle": "black",
|
||||
"backgroundColor": "#ffffff",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "jieyuezhong/jieyuezhong",
|
||||
"text": "借阅中",
|
||||
"iconPath": "image/shouye.png",
|
||||
"selectedIconPath": "image/shouye-hl.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "yiwancheng/yiwancheng",
|
||||
"text": "已完成",
|
||||
"iconPath": "image/chazhao.png",
|
||||
"selectedIconPath": "image/chazhao-hl.png"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
|
||||
<view class="c-minheight wx-view_3ZhLNq" />
|
||||
<text class="c-block 1" >姓名:</text>
|
||||
<text class="c-block 1" >{{sname}}</text>
|
||||
<text class="c-block 2" >学号:</text>
|
||||
<text class="c-block 2" >{{sid}}</text>
|
||||
<text class="c-block 3" >书号:</text>
|
||||
<text class="c-block 3" >{{bookid}}</text>
|
||||
<text class="c-block 4" >书名:</text>
|
||||
<text class="c-block 4" >{{bookname}}</text>
|
||||
<text class="c-block 5" >库存:</text>
|
||||
<text class="c-block 5" >{{booknum}}</text>
|
@ -0,0 +1,84 @@
|
||||
/* 基础样式 */
|
||||
view,scroll-view,swiper,swiper-item,icon,text,progress,button,checkbox-group,checkbox,form,input,label,picker,radio-group,radio,slider,switch,action-sheet,action-sheet-item,action-sheet-cancel,modal,toast,loading,navigator,audio,image,video,map,canvas {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
page {
|
||||
height: 100%;
|
||||
font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
checkbox-group,
|
||||
radio-group{
|
||||
display:block;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
:before,
|
||||
:after ,
|
||||
::before,
|
||||
::after{
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.c-minheight {
|
||||
min-height: 80px;
|
||||
}
|
||||
.c-full {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.c-block {
|
||||
display: block;
|
||||
}
|
||||
.c-autosize {
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
.c-fullwidth {
|
||||
width: 100%;
|
||||
}
|
||||
.c-fullheight {
|
||||
height: 100%;
|
||||
}
|
||||
.c-initHide{
|
||||
opacity:0 !important;
|
||||
}
|
||||
.c-ellipse{
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow:hidden;
|
||||
}
|
||||
/* 自定义样式 */
|
||||
.borrow{
|
||||
width: 50%;
|
||||
margin-top: 590rpx;
|
||||
background-color:rgb(253, 153, 65);
|
||||
color: white;
|
||||
border-radius: 98rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.image{
|
||||
width: 40%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.wx-view_3ZhLNq{transition: All 0s ease; margin-right: 150px; margin-left: 150px; transform: rotate(0deg) scale(1.6) translate(0%,43%); -ms-transform: rotate(0deg) scale(1.6) translate(0%,43%); -o-transform: rotate(0deg) scale(1.6) translate(0%,43%); -moz-transform: rotate(0deg) scale(1.6) translate(0%,43%); -webkit-transform: rotate(0deg) scale(1.6) translate(0%,43%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
|
||||
.wx-1{transition: All 0s ease; margin-right: 80px; margin-left: 80px; transform: rotate(0deg) scale(1.2) translate(0%,434%); -ms-transform: rotate(0deg) scale(1.2) translate(0%,434%); -o-transform: rotate(0deg) scale(1.2) translate(0%,434%); -moz-transform: rotate(0deg) scale(1.2) translate(0%,434%); -webkit-transform: rotate(0deg) scale(1.2) translate(0%,434%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
|
||||
.wx-2{transition: All 0s ease; margin-right: 80px; margin-left: 80px; transform: rotate(0deg) scale(1.2) translate(0%,543%); -ms-transform: rotate(0deg) scale(1.2) translate(0%,543%); -o-transform: rotate(0deg) scale(1.2) translate(0%,543%); -moz-transform: rotate(0deg) scale(1.2) translate(0%,543%); -webkit-transform: rotate(0deg) scale(1.2) translate(0%,543%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
|
||||
|
||||
.wx-3{transition: All 0s ease; margin-right: 80px; margin-left: 80px; transform: rotate(0deg) scale(1.2) translate(0%,652%); -ms-transform: rotate(0deg) scale(1.2) translate(0%,652%); -o-transform: rotate(0deg) scale(1.2) translate(0%,652%); -moz-transform: rotate(0deg) scale(1.2) translate(0%,652%); -webkit-transform: rotate(0deg) scale(1.2) translate(0%,652%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
|
||||
.wx-4{transition: All 0s ease; margin-right: 80px; margin-left: 80px; transform: rotate(0deg) scale(1.2) translate(0%,761%); -ms-transform: rotate(0deg) scale(1.2) translate(0%,761%); -o-transform: rotate(0deg) scale(1.2) translate(0%,761%); -moz-transform: rotate(0deg) scale(1.2) translate(0%,761%); -webkit-transform: rotate(0deg) scale(1.2) translate(0%,761%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
|
||||
.wx-5{transition: All 0s ease; margin-right: 80px; margin-left: 80px; transform: rotate(0deg) scale(1.2) translate(0%,870%); -ms-transform: rotate(0deg) scale(1.2) translate(0%,870%); -o-transform: rotate(0deg) scale(1.2) translate(0%,870%); -moz-transform: rotate(0deg) scale(1.2) translate(0%,870%); -webkit-transform: rotate(0deg) scale(1.2) translate(0%,870%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
|
@ -0,0 +1,68 @@
|
||||
// 获取全局应用程序实例对象
|
||||
const app = getApp();
|
||||
|
||||
// 创建页面实例对象
|
||||
Page({
|
||||
/**
|
||||
* 页面名称
|
||||
*/
|
||||
name: "index",
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
|
||||
data: {
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
jieyuezhongsubmit: function (e) {
|
||||
wx.navigateTo({
|
||||
url: '../../jieyuejilu/jieyuezhong/jieyuezhong',
|
||||
//以下为自定义点击事件
|
||||
|
||||
})
|
||||
},
|
||||
})
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
<button class="wx-button_80jKCV" bindtap="jieyuezhongsubmit" hover-class="button-hover" >
|
||||
借阅中
|
||||
</button>
|
||||
<button class="wx-button_jdfM7E" hover-class="button-hover" >
|
||||
已完成
|
||||
</button>
|
@ -0,0 +1,68 @@
|
||||
/* 基础样式 */
|
||||
view,scroll-view,swiper,swiper-item,icon,text,progress,button,checkbox-group,checkbox,form,input,label,picker,radio-group,radio,slider,switch,action-sheet,action-sheet-item,action-sheet-cancel,modal,toast,loading,navigator,audio,image,video,map,canvas {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
page {
|
||||
height: 100%;
|
||||
font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
checkbox-group,
|
||||
radio-group{
|
||||
display:block;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
:before,
|
||||
:after ,
|
||||
::before,
|
||||
::after{
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.c-minheight {
|
||||
min-height: 80px;
|
||||
}
|
||||
.c-full {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.c-block {
|
||||
display: block;
|
||||
}
|
||||
.c-autosize {
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
.c-fullwidth {
|
||||
width: 100%;
|
||||
}
|
||||
.c-fullheight {
|
||||
height: 100%;
|
||||
}
|
||||
.c-initHide{
|
||||
opacity:0 !important;
|
||||
}
|
||||
.c-ellipse{
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow:hidden;
|
||||
}
|
||||
/* 自定义样式 */
|
||||
|
||||
|
||||
|
||||
|
||||
.wx-button_80jKCV{color: rgb(0, 0,0); margin-right: 187px; background-repeat: repeat-x; }
|
||||
.wx-button_jdfM7E{color: rgb(253, 153,65);transition: all; margin-left: 187px; transform: rotate(0deg) scale(1) translate(0%, -100%); }
|
||||
|
@ -0,0 +1,23 @@
|
||||
// shouye/shouye.js
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
<view class="flex-row" style="display: flex;"><image class="xiaohui" mode="scaleToFill" style="background-size: 100% 100%; background-position: 0% 0%; background-repeat: no-repeat; background-image: url(http://qty83k.creatby.com/materials/143410/origin/09f2cc7b30d902cf6b776b9f51592073_origin.jpg); "/></view>
|
||||
<view class="flex-row" style="display: flex;"><text class="zxglxt" >真香图书管理系统</text></view>
|
||||
<view class="flex-row" style="display: flex;"><image class="lingdang" mode="scaleToFill" src="http://qty83k.creatby.com/materials/143410/origin/4b8b98ccdd7ee31db30c3396304e9a49_origin.jpg" style="background-size: 100% 100%; background-position: 0% 0%; background-repeat: no-repeat; background-image: url(http://qty83k.creatby.com/materials/143410/origin/4b8b98ccdd7ee31db30c3396304e9a49_origin.jpg); "/><text class="tongzhi" >最新通知</text></view>
|
||||
<view class="flex-row" style="display: flex;"><textarea class="wenbenkuang" name="textarea1" placeholder="点击编辑文字" type="textarea"/></view>
|
||||
<view class="flex-row" style="display: flex;"><image class="xingxing" mode="scaleToFill" src="http://qty83k.creatby.com/materials/143410/origin/fb6ddb69dd70e448c86c0f24723487dd_origin.jpg" style="background-size: 100% 100%; background-position: 0% 0%; background-repeat: no-repeat; background-image: url(http://qty83k.creatby.com/materials/143410/origin/fb6ddb69dd70e448c86c0f24723487dd_origin.jpg); "/><text class="tuijian" >书籍推荐</text></view>
|
@ -0,0 +1,47 @@
|
||||
page {
|
||||
background-image:url('http://img1.3lian.com/img2011/w1/104/31/d/51.jpg');
|
||||
}
|
||||
|
||||
.xiaohui{padding-left: 31px;
|
||||
margin: -21px 37px -22px 137px;
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
display: block;
|
||||
padding-bottom: 31px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.zxglxt{width: 180px;
|
||||
height: 30px;
|
||||
color: #141e7a;
|
||||
font-size: 21px;
|
||||
margin-left:103px;
|
||||
margin-top: 29px;
|
||||
}
|
||||
.lingdang{width: 17px;
|
||||
margin-top: 40px;
|
||||
height: 17px;
|
||||
margin-left: 20px;}
|
||||
.tongzhi{width: 100px;
|
||||
height: 30px;
|
||||
font-size: 16px;
|
||||
margin-top: 37px;
|
||||
color: rgb(253, 119, 65);
|
||||
margin-left: 15px;}
|
||||
.wenbenkuang{margin-bottom: -73px;
|
||||
padding-bottom: 46px;
|
||||
margin-top: 0px;
|
||||
padding-top: 7px;
|
||||
height: 120px;
|
||||
width: 90%;
|
||||
margin-left: 5%;
|
||||
}
|
||||
.xingxing{width: 19px;
|
||||
height: 19px;
|
||||
margin-left: 19px;
|
||||
margin-top: 40px;}
|
||||
.tuijian{font-size: 16px;
|
||||
color: rgb(253, 119, 65);
|
||||
width: 100px;
|
||||
height: 30px;
|
||||
margin-top: 40px;
|
||||
margin-left: 10px;}
|
@ -0,0 +1,35 @@
|
||||
Page({
|
||||
onLoad:function(options){
|
||||
console.log(options);
|
||||
let book = JSON.parse(options.bookstr);
|
||||
console.log(book);
|
||||
var that=this
|
||||
that.setData({
|
||||
bookid:book.bookid,
|
||||
bookname:book.bookname,
|
||||
bookauthor: book.bookauthor,
|
||||
booksort: book.booksort,
|
||||
booknum: book.booknum,
|
||||
bookimage: book.bookimage
|
||||
|
||||
|
||||
})
|
||||
console.log(this.data.bookid)
|
||||
|
||||
|
||||
},
|
||||
borrowsubmit: function (e) {
|
||||
wx.showModal({
|
||||
title: '借阅成功',
|
||||
confirmColor: "rgba(253, 153, 65, 1)",
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
wx.switchTab({
|
||||
url: '../shouye/shouye',
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
<view class="c-minheight wx-view_3ZhLNq" />
|
||||
|
||||
<text class="c-block 1" >书名:</text>
|
||||
<text class="c-block 1" >{{bookname}}</text>
|
||||
<text class="c-block 2" >书号:</text>
|
||||
<text class="c-block 2" >{{bookid}}</text>
|
||||
<text class="c-block 3" >作者:</text>
|
||||
<text class="c-block 3" >{{bookauthor}}</text>
|
||||
<text class="c-block 4" >库存:</text>
|
||||
<text class="c-block 4" >{{booknum}}</text>
|
||||
<text class="c-block 5" >分类:</text>
|
||||
<text class="c-block 5" >{{booksort}}</text>
|
||||
<button class="borrow" bindtap="borrowsubmit">借阅</button>
|
||||
|
@ -0,0 +1,99 @@
|
||||
/* 基础样式 */
|
||||
view,scroll-view,swiper,swiper-item,icon,text,progress,button,checkbox-group,checkbox,form,input,label,picker,radio-group,radio,slider,switch,action-sheet,action-sheet-item,action-sheet-cancel,modal,toast,loading,navigator,audio,image,video,map,canvas {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
page {
|
||||
height: 100%;
|
||||
font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
checkbox-group,
|
||||
radio-group{
|
||||
display:block;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
:before,
|
||||
:after ,
|
||||
::before,
|
||||
::after{
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.c-minheight {
|
||||
min-height: 80px;
|
||||
}
|
||||
.c-full {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.c-block {
|
||||
display: block;
|
||||
}
|
||||
.c-autosize {
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
.c-fullwidth {
|
||||
width: 100%;
|
||||
}
|
||||
.c-fullheight {
|
||||
height: 100%;
|
||||
}
|
||||
.c-initHide{
|
||||
opacity:0 !important;
|
||||
}
|
||||
.c-ellipse{
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow:hidden;
|
||||
}
|
||||
/* 自定义样式 */
|
||||
.borrow{
|
||||
width: 50%;
|
||||
margin-top: 530rpx;
|
||||
background-color:rgb(253, 153, 65);
|
||||
color: white;
|
||||
border-radius: 98rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.wx-view_3ZhLNq{transition: All 0s ease; margin-right: 150px; margin-left: 150px; transform: rotate(0deg) scale(1.6) translate(0%,43%); -ms-transform: rotate(0deg) scale(1.6) translate(0%,43%); -o-transform: rotate(0deg) scale(1.6) translate(0%,43%); -moz-transform: rotate(0deg) scale(1.6) translate(0%,43%); -webkit-transform: rotate(0deg) scale(1.6) translate(0%,43%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
|
||||
.wx-1{transition: All 0s ease; margin-right: 80px; margin-left: 80px; transform: rotate(0deg) scale(1.2) translate(0%,434%); -ms-transform: rotate(0deg) scale(1.2) translate(0%,434%); -o-transform: rotate(0deg) scale(1.2) translate(0%,434%); -moz-transform: rotate(0deg) scale(1.2) translate(0%,434%); -webkit-transform: rotate(0deg) scale(1.2) translate(0%,434%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
|
||||
.wx-2{transition: All 0s ease; margin-right: 80px; margin-left: 80px; transform: rotate(0deg) scale(1.2) translate(0%,543%); -ms-transform: rotate(0deg) scale(1.2) translate(0%,543%); -o-transform: rotate(0deg) scale(1.2) translate(0%,543%); -moz-transform: rotate(0deg) scale(1.2) translate(0%,543%); -webkit-transform: rotate(0deg) scale(1.2) translate(0%,543%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
|
||||
.wx-3{transition: All 0s ease; margin-right: 80px; margin-left: 80px; transform: rotate(0deg) scale(1.2) translate(0%,652%); -ms-transform: rotate(0deg) scale(1.2) translate(0%,652%); -o-transform: rotate(0deg) scale(1.2) translate(0%,652%); -moz-transform: rotate(0deg) scale(1.2) translate(0%,652%); -webkit-transform: rotate(0deg) scale(1.2) translate(0%,652%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
|
||||
|
||||
.wx-4{transition: All 0s ease; margin-right: 80px; margin-left: 80px; transform: rotate(0deg) scale(1.2) translate(0%,761%); -ms-transform: rotate(0deg) scale(1.2) translate(0%,761%); -o-transform: rotate(0deg) scale(1.2) translate(0%,761%); -moz-transform: rotate(0deg) scale(1.2) translate(0%,761%); -webkit-transform: rotate(0deg) scale(1.2) translate(0%,761%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
|
||||
.wx-5{transition: All 0s ease; margin-right: 80px; margin-left: 80px; transform: rotate(0deg) scale(1.2) translate(0%,870%); -ms-transform: rotate(0deg) scale(1.2) translate(0%,870%); -o-transform: rotate(0deg) scale(1.2) translate(0%,870%); -moz-transform: rotate(0deg) scale(1.2) translate(0%,870%); -webkit-transform: rotate(0deg) scale(1.2) translate(0%,870%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
|
||||
|
||||
.borrow{
|
||||
width: 50%;
|
||||
margin-top: 100rpx;
|
||||
background-color:rgb(253, 153, 65);
|
||||
color: white;
|
||||
border-radius: 98rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.image{
|
||||
width: 40%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
const formatTime = date => {
|
||||
const year = date.getFullYear()
|
||||
const month = date.getMonth() + 1
|
||||
const day = date.getDate()
|
||||
const hour = date.getHours()
|
||||
const minute = date.getMinutes()
|
||||
const second = date.getSeconds()
|
||||
|
||||
return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
|
||||
}
|
||||
|
||||
const formatNumber = n => {
|
||||
n = n.toString()
|
||||
return n[1] ? n : '0' + n
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
formatTime: formatTime
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
// 首页/shouye.js
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
motto: 'Hello',
|
||||
userInfo: {},
|
||||
hasUserInfo: true,
|
||||
canIUse: wx.canIUse('button.open-type.getUserInfo')
|
||||
},
|
||||
//事件处理函数
|
||||
bindViewTap: function () {
|
||||
wx.navigateTo({
|
||||
url: '../logs/logs'
|
||||
})
|
||||
},
|
||||
onLoad: function () {
|
||||
if (app.globalData.userInfo) {
|
||||
this.setData({
|
||||
userInfo: app.globalData.userInfo,
|
||||
hasUserInfo: true
|
||||
})
|
||||
} else if (this.data.canIUse) {
|
||||
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
|
||||
// 所以此处加入 callback 以防止这种情况
|
||||
app.userInfoReadyCallback = res => {
|
||||
this.setData({
|
||||
userInfo: res.userInfo,
|
||||
hasUserInfo: true
|
||||
})
|
||||
}
|
||||
} else {
|
||||
// 在没有 open-type=getUserInfo 版本的兼容处理
|
||||
wx.getUserInfo({
|
||||
success: res => {
|
||||
app.globalData.userInfo = res.userInfo
|
||||
this.setData({
|
||||
userInfo: res.userInfo,
|
||||
hasUserInfo: true
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
getUserInfo: function (e) {
|
||||
console.log(e)
|
||||
app.globalData.userInfo = e.detail.userInfo
|
||||
this.setData({
|
||||
userInfo: e.detail.userInfo,
|
||||
hasUserInfo: true
|
||||
})
|
||||
},
|
||||
denglusubmit: function (e) {
|
||||
wx.showModal({
|
||||
title: '退出登录',
|
||||
content: '是否退出登录',
|
||||
confirmColor: "rgba(253, 153, 65, 1)",
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
wx.redirectTo({
|
||||
url: '../denglu/denglu',
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
gerenxinxisubmit: function (e) {
|
||||
wx.navigateTo({
|
||||
url: '../gerenxinxi/gerenxinxi',
|
||||
})
|
||||
},
|
||||
jieyuezhongsubmit: function (e) {
|
||||
wx.request({
|
||||
|
||||
url: 'http://localhost:9527/zxborrow/Br',
|
||||
data: {
|
||||
's_id': '20160801'
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "pplication/json"
|
||||
},
|
||||
methods: {
|
||||
method: "POST",
|
||||
},
|
||||
|
||||
success: function (res) {
|
||||
var book = res.data
|
||||
let bookstr = JSON.stringify(book);
|
||||
console.log(book);
|
||||
wx.navigateTo({
|
||||
url: '../jieyuejilu/jieyuezhong/jieyuezhong?bookstr=' + bookstr,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<!--index.wxml-->
|
||||
<page>
|
||||
<view class="container">
|
||||
<view class="userinfo">
|
||||
<button wx:if="{{!hasUserInfo && canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button>
|
||||
<block wx:else>
|
||||
<image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
|
||||
<text class="userinfo-nickname">{{userInfo.nickName}}</text>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<button class='button1'bindtap="gerenxinxisubmit"><view>个人信息</view></button>
|
||||
<button class='button2'bindtap="jieyuezhongsubmit"><view>借阅记录</view></button>
|
||||
<button class='button3'bindtap="denglusubmit"><view>退出登录</view></button>
|
||||
|
||||
|
||||
|
||||
</page>
|
@ -0,0 +1,64 @@
|
||||
/* 首页/shouye.wxss */
|
||||
.button1{
|
||||
width: 80%;
|
||||
margin-top: 0rpx;
|
||||
background-color:rgba(253, 153, 65, 0.67);
|
||||
color: white;
|
||||
border-radius: 98rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.button1::after
|
||||
{
|
||||
border: 0;
|
||||
}
|
||||
.button2{
|
||||
width: 80%;
|
||||
margin-top: 50rpx;
|
||||
background-color:rgba(253, 153, 65, 0.67);
|
||||
color: white;
|
||||
border-radius: 98rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.button2:after
|
||||
{
|
||||
border: 0;
|
||||
}
|
||||
.button3{
|
||||
width: 80%;
|
||||
margin-top: 50rpx;
|
||||
background-color:rgba(253, 153, 65, 0.67);
|
||||
color: white;
|
||||
border-radius: 98rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.button3::after
|
||||
{
|
||||
border: 0;
|
||||
}
|
||||
.userinfo {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.userinfo-avatar {
|
||||
width: 128rpx;
|
||||
height: 128rpx;
|
||||
margin-top: 0rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.userinfo-nickname {
|
||||
color: #000;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,66 @@
|
||||
// yiwancheng/yiwancheng.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
<!--yiwancheng/yiwancheng.wxml-->
|
||||
<text>yiwancheng/yiwancheng.wxml</text>
|
@ -0,0 +1 @@
|
||||
/* yiwancheng/yiwancheng.wxss */
|
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>booksSearch</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -0,0 +1,4 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="src" path="src/test/java"/>
|
||||
<classpathentry kind="src" path="src/test/resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>booksService</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/webapp"/>
|
||||
<classpathentry kind="src" path="target/m2e-wtp/web-resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
|
||||
<attributes>
|
||||
<attribute name="hide" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
|
||||
<classpathentry kind="output" path=""/>
|
||||
</classpath>
|
@ -0,0 +1,8 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
|
||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.5
|
@ -0,0 +1,4 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="booksService">
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
|
||||
<property name="context-root" value="booksService"/>
|
||||
<property name="java-output-path" value="/booksService/target/classes"/>
|
||||
</wb-module>
|
||||
</project-modules>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<faceted-project>
|
||||
<fixed facet="wst.jsdt.web"/>
|
||||
<installed facet="java" version="1.5"/>
|
||||
<installed facet="jst.web" version="2.3"/>
|
||||
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||
</faceted-project>
|
@ -0,0 +1 @@
|
||||
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
|
@ -0,0 +1 @@
|
||||
Window
|
@ -0,0 +1,2 @@
|
||||
disabled=06target
|
||||
eclipse.preferences.version=1
|
@ -0,0 +1,65 @@
|
||||
package controller;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import domain.StuPO;
|
||||
import service.StuService;
|
||||
|
||||
|
||||
@Controller
|
||||
public class StuController {
|
||||
@Autowired@Qualifier("StuServiceImpl")
|
||||
private StuService stuService;
|
||||
@RequestMapping("/index")
|
||||
public String index(){
|
||||
return "index";
|
||||
}
|
||||
@RequestMapping("/search")
|
||||
public String search(Model model,String num){
|
||||
StuPO stuPO=stuService.search(num);
|
||||
model.addAttribute("num", stuPO.getNum());
|
||||
model.addAttribute("name", stuPO.getName());
|
||||
model.addAttribute("sex", stuPO.getSex());
|
||||
model.addAttribute("major", stuPO.getMajor());
|
||||
return "show";
|
||||
}
|
||||
|
||||
@RequestMapping("/add")
|
||||
public String add(StuPO stuPO){
|
||||
try{
|
||||
stuService.add(stuPO);
|
||||
}catch(Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
return"addsuccess";
|
||||
}
|
||||
@RequestMapping("/delete")
|
||||
public String delete(String num){
|
||||
stuService.delete(num);
|
||||
return "deletesuccess";
|
||||
}
|
||||
|
||||
@RequestMapping("/update")
|
||||
public String update(StuPO stuPO){
|
||||
stuService.update(stuPO);
|
||||
return "updatesucces";
|
||||
}
|
||||
public StuService getStuService() {
|
||||
return stuService;
|
||||
}
|
||||
|
||||
public void setStuService(StuService stuService) {
|
||||
this.stuService = stuService;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package controller;
|
||||
|
||||
public class booksController {
|
||||
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||
<configuration>
|
||||
</configuration>
|
@ -0,0 +1,11 @@
|
||||
<?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:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
|
||||
<!-- 打开Spring的注解 -->
|
||||
<context:annotation-config />
|
||||
|
||||
<context:component-scan base-package="mapperDAO,controller,serviceimpl"/>
|
||||
</beans>
|
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/mvc
|
||||
http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
<!-- 打开SpringMVC的注解 -->
|
||||
<annotation-driven />
|
||||
<!-- 配置静态资源的目录 -->
|
||||
<resources mapping="/resources/**" location="/resources/" />
|
||||
<!-- 配置视图处理器 -->
|
||||
<beans:bean
|
||||
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||
<!-- 视图前缀 -->
|
||||
<beans:property name="prefix" value="/WEB-INF/view/" />
|
||||
<!-- 视图后缀 -->
|
||||
<beans:property name="suffix" value=".jsp" />
|
||||
</beans:bean>
|
||||
|
||||
</beans:beans>
|
||||
|
||||
|
@ -0,0 +1,7 @@
|
||||
<!DOCTYPE web-app PUBLIC
|
||||
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
||||
"http://java.sun.com/dtd/web-app_2_3.dtd" >
|
||||
|
||||
<web-app>
|
||||
<display-name>Archetype Created Web Application</display-name>
|
||||
</web-app>
|
@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
<h2>Hello World!</h2>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||
<configuration>
|
||||
</configuration>
|
@ -0,0 +1,5 @@
|
||||
Manifest-Version: 1.0
|
||||
Built-By: yuanhangpc
|
||||
Build-Jdk: 1.8.0_152
|
||||
Created-By: Maven Integration for Eclipse
|
||||
|
@ -0,0 +1,7 @@
|
||||
#Generated by Maven Integration for Eclipse
|
||||
#Wed Jan 09 17:07:46 CST 2019
|
||||
version=0.0.1-SNAPSHOT
|
||||
groupId=edu.zxts
|
||||
m2e.projectName=booksService
|
||||
m2e.projectLocation=H\:\\sts-bundle\\booksSearch\\booksService
|
||||
artifactId=booksService
|
@ -0,0 +1,10 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>edu.zxts</groupId>
|
||||
<artifactId>booksSearch</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>booksService</module>
|
||||
</modules>
|
||||
</project>
|
@ -0,0 +1,25 @@
|
||||
/target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/build/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
@ -0,0 +1 @@
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
|
@ -0,0 +1,286 @@
|
||||
#!/bin/sh
|
||||
# ----------------------------------------------------------------------------
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Maven2 Start Up Batch script
|
||||
#
|
||||
# Required ENV vars:
|
||||
# ------------------
|
||||
# JAVA_HOME - location of a JDK home dir
|
||||
#
|
||||
# Optional ENV vars
|
||||
# -----------------
|
||||
# M2_HOME - location of maven2's installed home dir
|
||||
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
# e.g. to debug Maven itself, use
|
||||
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||
|
||||
if [ -f /etc/mavenrc ] ; then
|
||||
. /etc/mavenrc
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.mavenrc" ] ; then
|
||||
. "$HOME/.mavenrc"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false;
|
||||
darwin=false;
|
||||
mingw=false
|
||||
case "`uname`" in
|
||||
CYGWIN*) cygwin=true ;;
|
||||
MINGW*) mingw=true;;
|
||||
Darwin*) darwin=true
|
||||
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
|
||||
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
if [ -x "/usr/libexec/java_home" ]; then
|
||||
export JAVA_HOME="`/usr/libexec/java_home`"
|
||||
else
|
||||
export JAVA_HOME="/Library/Java/Home"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
if [ -r /etc/gentoo-release ] ; then
|
||||
JAVA_HOME=`java-config --jre-home`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$M2_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
M2_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
M2_HOME=`cd "$M2_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
# echo Using m2 at $M2_HOME
|
||||
fi
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||
if $cygwin ; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME=`cygpath --unix "$M2_HOME"`
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||
fi
|
||||
|
||||
# For Mingw, ensure paths are in UNIX format before anything is touched
|
||||
if $mingw ; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
||||
# TODO classpath?
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
javaExecutable="`which javac`"
|
||||
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
|
||||
# readlink(1) is not available as standard on Solaris 10.
|
||||
readLink=`which readlink`
|
||||
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
|
||||
if $darwin ; then
|
||||
javaHome="`dirname \"$javaExecutable\"`"
|
||||
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
|
||||
else
|
||||
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
||||
fi
|
||||
javaHome="`dirname \"$javaExecutable\"`"
|
||||
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
||||
JAVA_HOME="$javaHome"
|
||||
export JAVA_HOME
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$JAVACMD" ] ; then
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
else
|
||||
JAVACMD="`which java`"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly." >&2
|
||||
echo " We cannot execute $JAVACMD" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
echo "Warning: JAVA_HOME environment variable is not set."
|
||||
fi
|
||||
|
||||
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||
|
||||
# traverses directory structure from process work directory to filesystem root
|
||||
# first directory with .mvn subdirectory is considered project base directory
|
||||
find_maven_basedir() {
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Path not specified to find_maven_basedir"
|
||||
return 1
|
||||
fi
|
||||
|
||||
basedir="$1"
|
||||
wdir="$1"
|
||||
while [ "$wdir" != '/' ] ; do
|
||||
if [ -d "$wdir"/.mvn ] ; then
|
||||
basedir=$wdir
|
||||
break
|
||||
fi
|
||||
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
|
||||
if [ -d "${wdir}" ]; then
|
||||
wdir=`cd "$wdir/.."; pwd`
|
||||
fi
|
||||
# end of workaround
|
||||
done
|
||||
echo "${basedir}"
|
||||
}
|
||||
|
||||
# concatenates all lines of a file
|
||||
concat_lines() {
|
||||
if [ -f "$1" ]; then
|
||||
echo "$(tr -s '\n' ' ' < "$1")"
|
||||
fi
|
||||
}
|
||||
|
||||
BASE_DIR=`find_maven_basedir "$(pwd)"`
|
||||
if [ -z "$BASE_DIR" ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
##########################################################################################
|
||||
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||
# This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||
##########################################################################################
|
||||
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Found .mvn/wrapper/maven-wrapper.jar"
|
||||
fi
|
||||
else
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
|
||||
fi
|
||||
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
|
||||
while IFS="=" read key value; do
|
||||
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
|
||||
esac
|
||||
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Downloading from: $jarUrl"
|
||||
fi
|
||||
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
|
||||
|
||||
if command -v wget > /dev/null; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Found wget ... using wget"
|
||||
fi
|
||||
wget "$jarUrl" -O "$wrapperJarPath"
|
||||
elif command -v curl > /dev/null; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Found curl ... using curl"
|
||||
fi
|
||||
curl -o "$wrapperJarPath" "$jarUrl"
|
||||
else
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Falling back to using Java to download"
|
||||
fi
|
||||
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
|
||||
if [ -e "$javaClass" ]; then
|
||||
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo " - Compiling MavenWrapperDownloader.java ..."
|
||||
fi
|
||||
# Compiling the Java class
|
||||
("$JAVA_HOME/bin/javac" "$javaClass")
|
||||
fi
|
||||
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||
# Running the downloader
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo " - Running MavenWrapperDownloader.java ..."
|
||||
fi
|
||||
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
##########################################################################################
|
||||
# End of extension
|
||||
##########################################################################################
|
||||
|
||||
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo $MAVEN_PROJECTBASEDIR
|
||||
fi
|
||||
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
|
||||
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
|
||||
fi
|
||||
|
||||
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
exec "$JAVACMD" \
|
||||
$MAVEN_OPTS \
|
||||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
|
@ -0,0 +1,161 @@
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||
@REM or more contributor license agreements. See the NOTICE file
|
||||
@REM distributed with this work for additional information
|
||||
@REM regarding copyright ownership. The ASF licenses this file
|
||||
@REM to you under the Apache License, Version 2.0 (the
|
||||
@REM "License"); you may not use this file except in compliance
|
||||
@REM with the License. You may obtain a copy of the License at
|
||||
@REM
|
||||
@REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing,
|
||||
@REM software distributed under the License is distributed on an
|
||||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@REM KIND, either express or implied. See the License for the
|
||||
@REM specific language governing permissions and limitations
|
||||
@REM under the License.
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Maven2 Start Up Batch script
|
||||
@REM
|
||||
@REM Required ENV vars:
|
||||
@REM JAVA_HOME - location of a JDK home dir
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM M2_HOME - location of maven2's installed home dir
|
||||
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
|
||||
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
@REM e.g. to debug Maven itself, use
|
||||
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||
@echo off
|
||||
@REM set title of command window
|
||||
title %0
|
||||
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
|
||||
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||
|
||||
@REM set %HOME% to equivalent of $HOME
|
||||
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||
|
||||
@REM Execute a user defined script before this one
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
|
||||
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
|
||||
:skipRcPre
|
||||
|
||||
@setlocal
|
||||
|
||||
set ERROR_CODE=0
|
||||
|
||||
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
||||
@setlocal
|
||||
|
||||
@REM ==== START VALIDATION ====
|
||||
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME not found in your environment. >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
:OkJHome
|
||||
if exist "%JAVA_HOME%\bin\java.exe" goto init
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
||||
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
@REM ==== END VALIDATION ====
|
||||
|
||||
:init
|
||||
|
||||
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
||||
@REM Fallback to current working directory if not found.
|
||||
|
||||
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
||||
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
||||
|
||||
set EXEC_DIR=%CD%
|
||||
set WDIR=%EXEC_DIR%
|
||||
:findBaseDir
|
||||
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
||||
cd ..
|
||||
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
||||
set WDIR=%CD%
|
||||
goto findBaseDir
|
||||
|
||||
:baseDirFound
|
||||
set MAVEN_PROJECTBASEDIR=%WDIR%
|
||||
cd "%EXEC_DIR%"
|
||||
goto endDetectBaseDir
|
||||
|
||||
:baseDirNotFound
|
||||
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
||||
cd "%EXEC_DIR%"
|
||||
|
||||
:endDetectBaseDir
|
||||
|
||||
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
||||
|
||||
@setlocal EnableExtensions EnableDelayedExpansion
|
||||
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
||||
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
||||
|
||||
:endReadAdditionalConfig
|
||||
|
||||
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
||||
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
|
||||
FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO (
|
||||
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
|
||||
)
|
||||
|
||||
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||
if exist %WRAPPER_JAR% (
|
||||
echo Found %WRAPPER_JAR%
|
||||
) else (
|
||||
echo Couldn't find %WRAPPER_JAR%, downloading it ...
|
||||
echo Downloading from: %DOWNLOAD_URL%
|
||||
powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"
|
||||
echo Finished downloading %WRAPPER_JAR%
|
||||
)
|
||||
@REM End of extension
|
||||
|
||||
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
||||
if ERRORLEVEL 1 goto error
|
||||
goto end
|
||||
|
||||
:error
|
||||
set ERROR_CODE=1
|
||||
|
||||
:end
|
||||
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
|
||||
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
|
||||
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
|
||||
:skipRcPost
|
||||
|
||||
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||
if "%MAVEN_BATCH_PAUSE%" == "on" pause
|
||||
|
||||
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
|
||||
|
||||
exit /B %ERROR_CODE%
|
@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
<artifactId>demo</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>demo</name>
|
||||
<description>Demo project for Spring Boot</description>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<optional>true</optional><!-- 这个需要为 true 热部署才有效 -->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sf.json-lib</groupId>
|
||||
<artifactId>json-lib</artifactId>
|
||||
<version>2.4</version>
|
||||
<classifier>jdk15</classifier>
|
||||
</dependency>
|
||||
<!-- mysql -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.13</version>
|
||||
</dependency>
|
||||
<!-- mybatis -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- servlet -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>jstl</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.37</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF8</encoding>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,14 @@
|
||||
package com.example.demo.Dao;
|
||||
import com.example.demo.bean.book;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import java.util.List;
|
||||
|
||||
public interface bookMapper {
|
||||
@Select("select * from book where book_name = #{book_name}")
|
||||
public book selectBookBybook_name(String book_name);
|
||||
@Select("select * from book where book_id = #{book_id}")
|
||||
public book selectBookBybook_id(long book_id);
|
||||
@Select("select * from book")
|
||||
public List<book> select();
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.example.demo.Dao;
|
||||
|
||||
import com.example.demo.bean.book;
|
||||
import com.example.demo.bean.borrowrecord;
|
||||
import com.example.demo.bean.student;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface borrowrecordMapper {
|
||||
@Select("select * from book where book_name = #{book_name}")
|
||||
public book selectBookBybook_name(String book_name);
|
||||
@Select("select * from student where s_id = #{s_id}")
|
||||
public student selectStudentBys__id(long s_id);
|
||||
@Select("select * from book where book_id = #{book_id}")
|
||||
public book selectBookBybook_id(long book_id);
|
||||
@Select("select * from student where s_name = #{s_name}")
|
||||
public student selectBookBys_name(String s_name);
|
||||
@Select("select * from borroerecord where borrowtime = #{borrowtime}")
|
||||
public borrowrecord selectborrowrecordByborrowtime(String borrowtime);
|
||||
@Select("select * from borroerecord where senttime = #{senttime}")
|
||||
public borrowrecord selectborrowrecordBysenttime(String senttime);
|
||||
@Select("select * from borrowrecord")
|
||||
public List<borrowrecord> select();
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.example.demo.Dao;
|
||||
|
||||
import com.example.demo.bean.student;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
public interface studentMapper{
|
||||
@Select("select * from student where s_id = #{s_id}")
|
||||
public student selectAudioByS_id(long s_id);
|
||||
@Select("select * from student")
|
||||
public List<student> select();
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.example.demo;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class DemoApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DemoApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
package com.example.demo.bean;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
public class book {
|
||||
@GeneratedValue(strategy=GenerationType.AUTO)
|
||||
private long book_id;
|
||||
private String book_name;
|
||||
private String book_author;
|
||||
private String book_sort;
|
||||
private int book_num;
|
||||
public book(){};
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.example.demo.bean;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
public class borrowrecord {
|
||||
@GeneratedValue(strategy=GenerationType.AUTO)
|
||||
private long s_id;
|
||||
private long book_id;
|
||||
private String s_name;
|
||||
private String book_name;
|
||||
private String borrowtime;
|
||||
private String senttime;
|
||||
public borrowrecord(){};
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.example.demo.bean;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
public class student {
|
||||
@GeneratedValue(strategy=GenerationType.AUTO)
|
||||
private long s_id;
|
||||
private String s_name;
|
||||
private String s_password;
|
||||
public student() {};
|
||||
}
|
||||
|
@ -0,0 +1,9 @@
|
||||
package com.example.demo.searchservice.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
|
||||
@Controller
|
||||
public class searchservicecontroller extends HttpServlet {
|
||||
|
||||
}
|