@ -0,0 +1,62 @@
|
||||
<template> <div id="app">
|
||||
<keep-alive include="UserInfoList,AreaList,LookingForList,LookingForUserList,LostFoundList,LostFoundUserList,ClaimList,PraiseList,NoticeList">
|
||||
<router-view></router-view>
|
||||
</keep-alive>
|
||||
<!-- tab-bar -->
|
||||
<main-tab-bar class="tab" v-show="this.show"></main-tab-bar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MainTabBar from './components/content/mainTabBar/MainTabBar'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
MainTabBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: true,
|
||||
path: [ '/home',
|
||||
'/userInfo/list',
|
||||
'/area/list',
|
||||
'/lookingFor/list',
|
||||
'/lostFound/list',
|
||||
'/claim/list',
|
||||
'/praise/list',
|
||||
'/notice/list',
|
||||
'/profile'
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
watch: {
|
||||
$route() {
|
||||
if(this.path.indexOf(this.$route.path) != -1) {
|
||||
this.show = true
|
||||
}else {
|
||||
this.show = false
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log('Vue App Start ...')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import './assets/css/base.css';
|
||||
@import './assets/css/resetVant.css';
|
||||
|
||||
#app {
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.tab {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,78 @@
|
||||
.nav {
|
||||
background-color: #54bf8e;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: fixed;
|
||||
top: 50px;
|
||||
left: 0;
|
||||
right: 0px;
|
||||
bottom: 49px;
|
||||
}
|
||||
|
||||
|
||||
.block {
|
||||
height: 88px;
|
||||
}
|
||||
.ignore-pull-down1,
|
||||
.ignore-pull-down2 {
|
||||
height: 80px;
|
||||
width: 100vw;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: -80px;
|
||||
line-height: 80px;
|
||||
}
|
||||
.ignore-pull-down2 {
|
||||
line-height: 120px;
|
||||
}
|
||||
.loading {
|
||||
width: 60px;
|
||||
height: 20px;
|
||||
background-color: pink;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translate3d(-50%, 0, 0);
|
||||
display: flex;
|
||||
}
|
||||
.ball1,
|
||||
.ball2,
|
||||
.ball3 {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background-color: #4fc08d;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
}
|
||||
.ball1 {
|
||||
right: calc(50% + 15px);
|
||||
}
|
||||
.ball2 {
|
||||
left: calc(50% - 5px);
|
||||
}
|
||||
.ball3 {
|
||||
left: calc(50% + 15px);
|
||||
}
|
||||
.ball1 {
|
||||
animation: loading 1.2s linear infinite;
|
||||
}
|
||||
.ball2 {
|
||||
animation: loading 1.2s 0.4s linear infinite;
|
||||
}
|
||||
.ball3 {
|
||||
animation: loading 1.2s 0.8s linear infinite;
|
||||
}
|
||||
@keyframes loading {
|
||||
16.667% {
|
||||
transform: scale(2);
|
||||
}
|
||||
33.333% {
|
||||
transform: scale(1);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
@ -0,0 +1,419 @@
|
||||
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
|
||||
/* Document
|
||||
========================================================================== */
|
||||
|
||||
|
||||
/**
|
||||
* 1. Correct the line height in all browsers.
|
||||
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
*/
|
||||
|
||||
html {
|
||||
line-height: 1.15;
|
||||
/* 1 */
|
||||
-webkit-text-size-adjust: 100%;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
|
||||
/* Sections
|
||||
========================================================================== */
|
||||
|
||||
|
||||
/**
|
||||
* Remove the margin in all browsers.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render the `main` element consistently in IE.
|
||||
*/
|
||||
|
||||
main {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box;
|
||||
/* 1 */
|
||||
height: 0;
|
||||
/* 1 */
|
||||
overflow: visible;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
font-family: monospace, monospace;
|
||||
/* 1 */
|
||||
font-size: 1em;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
|
||||
/**
|
||||
* Remove the gray background on active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Chrome 57-
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none;
|
||||
/* 1 */
|
||||
text-decoration: underline;
|
||||
/* 2 */
|
||||
text-decoration: underline dotted;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace;
|
||||
/* 1 */
|
||||
font-size: 1em;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
|
||||
/**
|
||||
* 1. Change the font styles in all browsers.
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit;
|
||||
/* 1 */
|
||||
font-size: 100%;
|
||||
/* 1 */
|
||||
line-height: 1.15;
|
||||
/* 1 */
|
||||
margin: 0;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button,
|
||||
input {
|
||||
/* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select {
|
||||
/* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Correct the padding in Firefox.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
padding: 0.35em 0.75em 0.625em;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
box-sizing: border-box;
|
||||
/* 1 */
|
||||
color: inherit;
|
||||
/* 2 */
|
||||
display: table;
|
||||
/* 1 */
|
||||
max-width: 100%;
|
||||
/* 1 */
|
||||
padding: 0;
|
||||
/* 3 */
|
||||
white-space: normal;
|
||||
/* 1 */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE 10+.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10.
|
||||
* 2. Remove the padding in IE 10.
|
||||
*/
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box;
|
||||
/* 1 */
|
||||
padding: 0;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield;
|
||||
/* 1 */
|
||||
outline-offset: -2px;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove the inner padding in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button;
|
||||
/* 1 */
|
||||
font: inherit;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
|
||||
|
||||
/*
|
||||
* Add the correct display in Edge, IE 10+, and Firefox.
|
||||
*/
|
||||
|
||||
details {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
|
||||
/* Misc
|
||||
========================================================================== */
|
||||
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10+.
|
||||
*/
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
.van-uploader__preview-image {
|
||||
width: 98px!important;
|
||||
height: 98px!important;
|
||||
}
|
||||
.van-uploader__preview:nth-child(3),
|
||||
.van-uploader__preview:nth-child(6),
|
||||
.van-uploader__preview:nth-child(9){
|
||||
margin-right: 0!important;
|
||||
}
|
||||
.van-uploader__upload {
|
||||
width: 98px!important;
|
||||
height: 98px!important;
|
||||
box-sizing: border-box;
|
||||
/* border: 1px dashed #888; */
|
||||
margin-right: 0!important;
|
||||
}
|
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 637 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 120 KiB |
After Width: | Height: | Size: 123 KiB |
After Width: | Height: | Size: 1006 KiB |
After Width: | Height: | Size: 444 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 2.2 MiB |
After Width: | Height: | Size: 526 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 6.9 KiB |
@ -0,0 +1,66 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import store from '@/store'
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
// 使用toast
|
||||
import toast from 'components/common/toast'
|
||||
Vue.use(toast)
|
||||
|
||||
import notify from 'components/common/notify'
|
||||
Vue.use(notify)
|
||||
|
||||
// // 使用overlay
|
||||
// import overlay from 'components/common/overlay'
|
||||
// Vue.use(overlay)
|
||||
|
||||
//取消移动端300ms延时
|
||||
import FastClick from 'fastclick'
|
||||
FastClick.attach(document.body)
|
||||
|
||||
//懒加载
|
||||
import VueLazyload from 'vue-lazyload'
|
||||
Vue.use(VueLazyload, {
|
||||
preLoad: 1,
|
||||
error: '/images/static/angry.png',
|
||||
loading: '/images/static/kani.png',
|
||||
attempt: 3
|
||||
})
|
||||
|
||||
|
||||
import 'vant/lib/index.css'
|
||||
import Dialog from 'vant';
|
||||
Vue.use(Dialog);
|
||||
|
||||
import { Button } from 'vant';
|
||||
Vue.use(Button);
|
||||
|
||||
import { Popup } from 'vant';
|
||||
Vue.use(Popup);
|
||||
|
||||
import { Field } from 'vant';
|
||||
Vue.use(Field);
|
||||
|
||||
import { Form } from 'vant';
|
||||
Vue.use(Form);
|
||||
|
||||
// 文件上传
|
||||
import { Uploader } from 'vant';
|
||||
Vue.use(Uploader);
|
||||
|
||||
import { DropdownMenu, DropdownItem } from 'vant';
|
||||
Vue.use(DropdownMenu);
|
||||
Vue.use(DropdownItem);
|
||||
|
||||
//创建事件总线
|
||||
Vue.prototype.$bus = new Vue()
|
||||
|
||||
var vue = new Vue({
|
||||
render: h => h(App),
|
||||
router,
|
||||
store
|
||||
}).$mount('#app')
|
||||
|
||||
window.vue = vue
|
@ -0,0 +1,63 @@
|
||||
// 学院信息业务处理
|
||||
import request from './request'
|
||||
import qs from 'qs'
|
||||
|
||||
/* 根据查询条件分页查询学院信息 */
|
||||
export function queryArea(page) {
|
||||
return request({
|
||||
url: '/area/list',
|
||||
method: "POST",
|
||||
params: {
|
||||
"page": page,
|
||||
"rows": 10
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 查询所有的学院信息*/
|
||||
export function queryAllArea() {
|
||||
return request({
|
||||
url: '/area/listAll',
|
||||
method: "POST",
|
||||
})
|
||||
}
|
||||
|
||||
/* 添加学院信息 */
|
||||
export function addArea(area) {
|
||||
return request({
|
||||
url: '/area/add',
|
||||
method: "POST",
|
||||
data: qs.stringify(area),
|
||||
headers: { //添加请求头
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 更新学院信息 */
|
||||
export function updateArea(area) {
|
||||
return request({
|
||||
url: '/area/update',
|
||||
method: "POST",
|
||||
data: qs.stringify(area),
|
||||
headers: { //添加请求头
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 根据主键学院id查询学院信息 */
|
||||
export function getArea(areaId) {
|
||||
return request({
|
||||
url: '/area/get/' + areaId,
|
||||
method: "POST"
|
||||
})
|
||||
}
|
||||
|
||||
/* 根据主键areaId删除学院 */
|
||||
export function deleteArea(areaId) {
|
||||
return request({
|
||||
url: '/area/delete/' + areaId,
|
||||
method: "POST",
|
||||
})
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
// 认领信息业务处理
|
||||
import request from './request'
|
||||
import qs from 'qs'
|
||||
|
||||
/* 根据查询条件分页查询认领信息 */
|
||||
export function queryClaim(lostFoundObj_lostFoundId, personName, claimTime, page) {
|
||||
return request({
|
||||
url: '/claim/list',
|
||||
method: "POST",
|
||||
params: {
|
||||
"lostFoundObj.lostFoundId": lostFoundObj_lostFoundId,
|
||||
"personName": personName,
|
||||
"claimTime": claimTime,
|
||||
"page": page,
|
||||
"rows": 10
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 查询所有的认领信息*/
|
||||
export function queryAllClaim() {
|
||||
return request({
|
||||
url: '/claim/listAll',
|
||||
method: "POST",
|
||||
})
|
||||
}
|
||||
|
||||
/* 添加认领信息 */
|
||||
export function addClaim(claim) {
|
||||
return request({
|
||||
url: '/claim/add',
|
||||
method: "POST",
|
||||
data: qs.stringify(claim),
|
||||
headers: { //添加请求头
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 更新认领信息 */
|
||||
export function updateClaim(claim) {
|
||||
return request({
|
||||
url: '/claim/update',
|
||||
method: "POST",
|
||||
data: qs.stringify(claim),
|
||||
headers: { //添加请求头
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 根据主键认领id查询认领信息 */
|
||||
export function getClaim(claimId) {
|
||||
return request({
|
||||
url: '/claim/get/' + claimId,
|
||||
method: "POST"
|
||||
})
|
||||
}
|
||||
|
||||
/* 根据主键claimId删除认领 */
|
||||
export function deleteClaim(claimId) {
|
||||
return request({
|
||||
url: '/claim/delete/' + claimId,
|
||||
method: "POST",
|
||||
})
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
// 寻物启事信息业务处理
|
||||
import request from './request'
|
||||
import qs from 'qs'
|
||||
|
||||
/* 根据查询条件分页查询寻物启事信息 */
|
||||
export function queryLookingFor(title, goodsName, lostTime, lostPlace, telephone, userObj_user_name, page) {
|
||||
return request({
|
||||
url: '/lookingFor/list',
|
||||
method: "POST",
|
||||
params: {
|
||||
"title": title,
|
||||
"goodsName": goodsName,
|
||||
"lostTime": lostTime,
|
||||
"lostPlace": lostPlace,
|
||||
"telephone": telephone,
|
||||
"userObj.user_name": userObj_user_name,
|
||||
"page": page,
|
||||
"rows": 10
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* 根据查询条件分页查询寻物启事信息 */
|
||||
export function userQueryLookingFor(title, goodsName, lostTime, lostPlace, telephone, page) {
|
||||
return request({
|
||||
url: '/lookingFor/userList',
|
||||
method: "POST",
|
||||
params: {
|
||||
"title": title,
|
||||
"goodsName": goodsName,
|
||||
"lostTime": lostTime,
|
||||
"lostPlace": lostPlace,
|
||||
"telephone": telephone,
|
||||
"page": page,
|
||||
"rows": 10
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/* 查询所有的寻物启事信息*/
|
||||
export function queryAllLookingFor() {
|
||||
return request({
|
||||
url: '/lookingFor/listAll',
|
||||
method: "POST",
|
||||
})
|
||||
}
|
||||
|
||||
/* 添加寻物启事信息 */
|
||||
export function addLookingFor(lookingFor) {
|
||||
return request({
|
||||
url: '/lookingFor/add',
|
||||
method: "POST",
|
||||
data: qs.stringify(lookingFor),
|
||||
headers: { //添加请求头
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 更新寻物启事信息 */
|
||||
export function updateLookingFor(lookingFor) {
|
||||
return request({
|
||||
url: '/lookingFor/update',
|
||||
method: "POST",
|
||||
data: qs.stringify(lookingFor),
|
||||
headers: { //添加请求头
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 根据主键寻物id查询寻物启事信息 */
|
||||
export function getLookingFor(lookingForId) {
|
||||
return request({
|
||||
url: '/lookingFor/get/' + lookingForId,
|
||||
method: "POST"
|
||||
})
|
||||
}
|
||||
|
||||
/* 根据主键lookingForId删除寻物启事 */
|
||||
export function deleteLookingFor(lookingForId) {
|
||||
return request({
|
||||
url: '/lookingFor/delete/' + lookingForId,
|
||||
method: "POST",
|
||||
})
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
// 失物招领信息业务处理
|
||||
import request from './request'
|
||||
import qs from 'qs'
|
||||
|
||||
/* 根据查询条件分页查询失物招领信息 */
|
||||
export function queryLostFound(title, goodsName, pickUpTime, pickUpPlace, connectPerson, phone, userObj_user_name, page) {
|
||||
return request({
|
||||
url: '/lostFound/list',
|
||||
method: "POST",
|
||||
params: {
|
||||
"title": title,
|
||||
"goodsName": goodsName,
|
||||
"pickUpTime": pickUpTime,
|
||||
"pickUpPlace": pickUpPlace,
|
||||
"connectPerson": connectPerson,
|
||||
"phone": phone,
|
||||
"userObj.user_name": userObj_user_name,
|
||||
"page": page,
|
||||
"rows": 10
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/* 根据查询条件分页查询失物招领信息 */
|
||||
export function userQueryLostFound(title, goodsName, pickUpTime, pickUpPlace, connectPerson, phone, page) {
|
||||
return request({
|
||||
url: '/lostFound/userList',
|
||||
method: "POST",
|
||||
params: {
|
||||
"title": title,
|
||||
"goodsName": goodsName,
|
||||
"pickUpTime": pickUpTime,
|
||||
"pickUpPlace": pickUpPlace,
|
||||
"connectPerson": connectPerson,
|
||||
"phone": phone,
|
||||
"page": page,
|
||||
"rows": 10
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* 查询所有的失物招领信息*/
|
||||
export function queryAllLostFound() {
|
||||
return request({
|
||||
url: '/lostFound/listAll',
|
||||
method: "POST",
|
||||
})
|
||||
}
|
||||
|
||||
/* 添加失物招领信息 */
|
||||
export function addLostFound(lostFound) {
|
||||
return request({
|
||||
url: '/lostFound/add',
|
||||
method: "POST",
|
||||
data: qs.stringify(lostFound),
|
||||
headers: { //添加请求头
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 更新失物招领信息 */
|
||||
export function updateLostFound(lostFound) {
|
||||
return request({
|
||||
url: '/lostFound/update',
|
||||
method: "POST",
|
||||
data: qs.stringify(lostFound),
|
||||
headers: { //添加请求头
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 根据主键招领id查询失物招领信息 */
|
||||
export function getLostFound(lostFoundId) {
|
||||
return request({
|
||||
url: '/lostFound/get/' + lostFoundId,
|
||||
method: "POST"
|
||||
})
|
||||
}
|
||||
|
||||
/* 根据主键lostFoundId删除失物招领 */
|
||||
export function deleteLostFound(lostFoundId) {
|
||||
return request({
|
||||
url: '/lostFound/delete/' + lostFoundId,
|
||||
method: "POST",
|
||||
})
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
// 站内通知信息业务处理
|
||||
import request from './request'
|
||||
import qs from 'qs'
|
||||
|
||||
/* 根据查询条件分页查询站内通知信息 */
|
||||
export function queryNotice(title, addTime, page) {
|
||||
return request({
|
||||
url: '/notice/list',
|
||||
method: "POST",
|
||||
params: {
|
||||
"title": title,
|
||||
"addTime": addTime,
|
||||
"page": page,
|
||||
"rows": 10
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 查询所有的站内通知信息*/
|
||||
export function queryAllNotice() {
|
||||
return request({
|
||||
url: '/notice/listAll',
|
||||
method: "POST",
|
||||
})
|
||||
}
|
||||
|
||||
/* 添加站内通知信息 */
|
||||
export function addNotice(notice) {
|
||||
return request({
|
||||
url: '/notice/add',
|
||||
method: "POST",
|
||||
data: qs.stringify(notice),
|
||||
headers: { //添加请求头
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 更新站内通知信息 */
|
||||
export function updateNotice(notice) {
|
||||
return request({
|
||||
url: '/notice/update',
|
||||
method: "POST",
|
||||
data: qs.stringify(notice),
|
||||
headers: { //添加请求头
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 根据主键通知id查询站内通知信息 */
|
||||
export function getNotice(noticeId) {
|
||||
return request({
|
||||
url: '/notice/get/' + noticeId,
|
||||
method: "POST"
|
||||
})
|
||||
}
|
||||
|
||||
/* 根据主键noticeId删除站内通知 */
|
||||
export function deleteNotice(noticeId) {
|
||||
return request({
|
||||
url: '/notice/delete/' + noticeId,
|
||||
method: "POST",
|
||||
})
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
// 表扬信息业务处理
|
||||
import request from './request'
|
||||
import qs from 'qs'
|
||||
|
||||
/* 根据查询条件分页查询表扬信息 */
|
||||
export function queryPraise(lostFoundObj_lostFoundId, title, addTime, page) {
|
||||
return request({
|
||||
url: '/praise/list',
|
||||
method: "POST",
|
||||
params: {
|
||||
"lostFoundObj.lostFoundId": lostFoundObj_lostFoundId,
|
||||
"title": title,
|
||||
"addTime": addTime,
|
||||
"page": page,
|
||||
"rows": 10
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 查询所有的表扬信息*/
|
||||
export function queryAllPraise() {
|
||||
return request({
|
||||
url: '/praise/listAll',
|
||||
method: "POST",
|
||||
})
|
||||
}
|
||||
|
||||
/* 添加表扬信息 */
|
||||
export function addPraise(praise) {
|
||||
return request({
|
||||
url: '/praise/add',
|
||||
method: "POST",
|
||||
data: qs.stringify(praise),
|
||||
headers: { //添加请求头
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 更新表扬信息 */
|
||||
export function updatePraise(praise) {
|
||||
return request({
|
||||
url: '/praise/update',
|
||||
method: "POST",
|
||||
data: qs.stringify(praise),
|
||||
headers: { //添加请求头
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 根据主键表扬id查询表扬信息 */
|
||||
export function getPraise(praiseId) {
|
||||
return request({
|
||||
url: '/praise/get/' + praiseId,
|
||||
method: "POST"
|
||||
})
|
||||
}
|
||||
|
||||
/* 根据主键praiseId删除表扬 */
|
||||
export function deletePraise(praiseId) {
|
||||
return request({
|
||||
url: '/praise/delete/' + praiseId,
|
||||
method: "POST",
|
||||
})
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
// 用户信息业务处理
|
||||
import request from './request'
|
||||
import qs from 'qs'
|
||||
|
||||
/* 根据查询条件分页查询用户信息 */
|
||||
export function queryUserInfo(user_name, areaObj_areaId, name, birthday, telephone, regTime, page) {
|
||||
return request({
|
||||
url: '/userInfo/list',
|
||||
method: "POST",
|
||||
params: {
|
||||
"user_name": user_name,
|
||||
"areaObj.areaId": areaObj_areaId,
|
||||
"name": name,
|
||||
"birthday": birthday,
|
||||
"telephone": telephone,
|
||||
"regTime": regTime,
|
||||
"page": page,
|
||||
"rows": 10
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 查询所有的用户信息*/
|
||||
export function queryAllUserInfo() {
|
||||
return request({
|
||||
url: '/userInfo/listAll',
|
||||
method: "POST",
|
||||
})
|
||||
}
|
||||
|
||||
/* 添加用户信息 */
|
||||
export function addUserInfo(userInfo) {
|
||||
return request({
|
||||
url: '/userInfo/add',
|
||||
method: "POST",
|
||||
data: qs.stringify(userInfo),
|
||||
headers: { //添加请求头
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 更新用户信息 */
|
||||
export function updateUserInfo(userInfo) {
|
||||
return request({
|
||||
url: '/userInfo/update',
|
||||
method: "POST",
|
||||
data: qs.stringify(userInfo),
|
||||
headers: { //添加请求头
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 根据主键手机账号查询用户信息 */
|
||||
export function getUserInfo(user_name) {
|
||||
return request({
|
||||
url: '/userInfo/get/' + user_name,
|
||||
method: "POST"
|
||||
})
|
||||
}
|
||||
|
||||
/* 查询用户个人信息 */
|
||||
export function getSelfUserInfo() {
|
||||
return request({
|
||||
url: '/userInfo/selfGet',
|
||||
method: "POST"
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* 根据主键user_name删除用户 */
|
||||
export function deleteUserInfo(user_name) {
|
||||
return request({
|
||||
url: '/userInfo/delete/' + user_name,
|
||||
method: "POST",
|
||||
})
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
import request from './request'
|
||||
|
||||
export function getShop() {
|
||||
return request({
|
||||
url: '/shop'
|
||||
})
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
//文件上传业务处理
|
||||
import request from './request'
|
||||
|
||||
/* 图片文件上传 */
|
||||
export function uploadImage(formData) {
|
||||
return request({
|
||||
url: '/upload/image',
|
||||
method: "POST",
|
||||
data: formData,
|
||||
headers: { //添加请求头
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 普通文件上传处理 */
|
||||
export function uploadFile(formData) {
|
||||
return request({
|
||||
url: '/upload/file',
|
||||
method: "POST",
|
||||
data: formData,
|
||||
headers: { //添加请求头
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,221 @@
|
||||
//前端路由代码
|
||||
import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
Vue.use(Router)
|
||||
|
||||
/**
|
||||
* 重写路由的push方法
|
||||
*/
|
||||
// const routerPush = Router.prototype.push
|
||||
// Router.prototype.push = function push(location) {
|
||||
// return routerPush.call(this, location).catch(error => error)
|
||||
// }
|
||||
|
||||
const Home = () => import ('../views/home/Home') //引入首页组件页
|
||||
const UserInfoList = () => import('../views/userInfo/UserInfoList.vue') //引入用户列表组件页
|
||||
const UserInfoAdd = () => import('../views/userInfo/UserInfoAdd') //引入用户添加组件页
|
||||
const UserInfoModify = () => import('../views/userInfo/UserInfoModify') //引入用户修改组件页
|
||||
const UserInfoSelfModify = () => import('../views/userInfo/UserInfoSelfModify') //引入用户修改组件页
|
||||
const UserInfoDetail = () => import('../views/userInfo/UserInfoDetail') //引入用户详情组件页
|
||||
|
||||
const AreaList = () => import('../views/area/AreaList.vue') //引入学院列表组件页
|
||||
const AreaAdd = () => import('../views/area/AreaAdd') //引入学院添加组件页
|
||||
const AreaModify = () => import('../views/area/AreaModify') //引入学院修改组件页
|
||||
const AreaDetail = () => import('../views/area/AreaDetail') //引入学院详情组件页
|
||||
|
||||
const LookingForList = () => import('../views/lookingFor/LookingForList.vue') //引入寻物启事列表组件页
|
||||
const LookingForUserList = () => import('../views/lookingFor/LookingForUserList.vue') //引入寻物启事列表组件页
|
||||
const LookingForAdd = () => import('../views/lookingFor/LookingForAdd') //引入寻物启事添加组件页
|
||||
const LookingForModify = () => import('../views/lookingFor/LookingForModify') //引入寻物启事修改组件页
|
||||
const LookingForDetail = () => import('../views/lookingFor/LookingForDetail') //引入寻物启事详情组件页
|
||||
|
||||
const LostFoundList = () => import('../views/lostFound/LostFoundList.vue') //引入失物招领列表组件页
|
||||
const LostFoundUserList = () => import('../views/lostFound/LostFoundUserList.vue') //引入失物招领列表组件页
|
||||
const LostFoundAdd = () => import('../views/lostFound/LostFoundAdd') //引入失物招领添加组件页
|
||||
const LostFoundModify = () => import('../views/lostFound/LostFoundModify') //引入失物招领修改组件页
|
||||
const LostFoundDetail = () => import('../views/lostFound/LostFoundDetail') //引入失物招领详情组件页
|
||||
|
||||
const ClaimList = () => import('../views/claim/ClaimList.vue') //引入认领列表组件页
|
||||
const ClaimAdd = () => import('../views/claim/ClaimAdd') //引入认领添加组件页
|
||||
const ClaimModify = () => import('../views/claim/ClaimModify') //引入认领修改组件页
|
||||
const ClaimDetail = () => import('../views/claim/ClaimDetail') //引入认领详情组件页
|
||||
|
||||
const PraiseList = () => import('../views/praise/PraiseList.vue') //引入表扬列表组件页
|
||||
const PraiseAdd = () => import('../views/praise/PraiseAdd') //引入表扬添加组件页
|
||||
const PraiseModify = () => import('../views/praise/PraiseModify') //引入表扬修改组件页
|
||||
const PraiseDetail = () => import('../views/praise/PraiseDetail') //引入表扬详情组件页
|
||||
|
||||
const NoticeList = () => import('../views/notice/NoticeList.vue') //引入站内通知列表组件页
|
||||
const NoticeAdd = () => import('../views/notice/NoticeAdd') //引入站内通知添加组件页
|
||||
const NoticeModify = () => import('../views/notice/NoticeModify') //引入站内通知修改组件页
|
||||
const NoticeDetail = () => import('../views/notice/NoticeDetail') //引入站内通知详情组件页
|
||||
|
||||
const Profile = () => import ('../views/profile/Profile') //引入个人中心组件页
|
||||
const Login = () => import ('../views/login/Login') //引入登录组件页
|
||||
const CreateAccount = () => import ('../views/login/CreateAccount') //引入创建账号组件页
|
||||
const Coupon = () => import ('../views/profile/CouponExchange') //引入优惠卷组件页
|
||||
const About = () => import ('../views/profile/About') //引入关于我们组件页
|
||||
|
||||
const routes = [{
|
||||
path: '', // 根路径跳到登录页路由
|
||||
redirect: '/login'
|
||||
},
|
||||
{
|
||||
path: '/login', // 系统登录页路由
|
||||
component: Login
|
||||
},
|
||||
{
|
||||
path: '/register', // 创建新账号页路由
|
||||
component: CreateAccount
|
||||
},
|
||||
{
|
||||
path: '/home', // 首页路由
|
||||
component: Home
|
||||
},
|
||||
|
||||
{
|
||||
path: '/userInfo/add', // 添加用户页路由
|
||||
component: UserInfoAdd
|
||||
},
|
||||
{
|
||||
path: '/userInfo/modify/:user_name', // 修改用户页路由
|
||||
component: UserInfoModify
|
||||
},
|
||||
{
|
||||
path: '/userInfo/selfModify', // 修改用户页路由
|
||||
component: UserInfoSelfModify
|
||||
},
|
||||
{
|
||||
path: '/userInfo/list', // 用户查询页路由
|
||||
component: UserInfoList
|
||||
},
|
||||
{
|
||||
path: '/userInfo/detail/:user_name', // 用户详情页路由
|
||||
component: UserInfoDetail
|
||||
},
|
||||
{
|
||||
path: '/area/add', // 添加学院页路由
|
||||
component: AreaAdd
|
||||
},
|
||||
{
|
||||
path: '/area/modify/:areaId', // 修改学院页路由
|
||||
component: AreaModify
|
||||
},
|
||||
{
|
||||
path: '/area/list', // 学院查询页路由
|
||||
component: AreaList
|
||||
},
|
||||
{
|
||||
path: '/area/detail/:areaId', // 学院详情页路由
|
||||
component: AreaDetail
|
||||
},
|
||||
{
|
||||
path: '/lookingFor/add', // 添加寻物启事页路由
|
||||
component: LookingForAdd
|
||||
},
|
||||
{
|
||||
path: '/lookingFor/modify/:lookingForId', // 修改寻物启事页路由
|
||||
component: LookingForModify
|
||||
},
|
||||
{
|
||||
path: '/lookingFor/list', // 寻物启事查询页路由
|
||||
component: LookingForList
|
||||
},
|
||||
{
|
||||
path: '/lookingFor/userList', // 寻物启事查询页路由
|
||||
component: LookingForUserList
|
||||
},
|
||||
{
|
||||
path: '/lookingFor/detail/:lookingForId', // 寻物启事详情页路由
|
||||
component: LookingForDetail
|
||||
},
|
||||
{
|
||||
path: '/lostFound/add', // 添加失物招领页路由
|
||||
component: LostFoundAdd
|
||||
},
|
||||
{
|
||||
path: '/lostFound/modify/:lostFoundId', // 修改失物招领页路由
|
||||
component: LostFoundModify
|
||||
},
|
||||
{
|
||||
path: '/lostFound/list', // 失物招领查询页路由
|
||||
component: LostFoundList
|
||||
},
|
||||
{
|
||||
path: '/lostFound/userList', // 失物招领查询页路由
|
||||
component: LostFoundUserList
|
||||
},
|
||||
{
|
||||
path: '/lostFound/detail/:lostFoundId', // 失物招领详情页路由
|
||||
component: LostFoundDetail
|
||||
},
|
||||
{
|
||||
path: '/claim/add', // 添加认领页路由
|
||||
component: ClaimAdd
|
||||
},
|
||||
{
|
||||
path: '/claim/modify/:claimId', // 修改认领页路由
|
||||
component: ClaimModify
|
||||
},
|
||||
{
|
||||
path: '/claim/list', // 认领查询页路由
|
||||
component: ClaimList
|
||||
},
|
||||
{
|
||||
path: '/claim/detail/:claimId', // 认领详情页路由
|
||||
component: ClaimDetail
|
||||
},
|
||||
{
|
||||
path: '/praise/add', // 添加表扬页路由
|
||||
component: PraiseAdd
|
||||
},
|
||||
{
|
||||
path: '/praise/modify/:praiseId', // 修改表扬页路由
|
||||
component: PraiseModify
|
||||
},
|
||||
{
|
||||
path: '/praise/list', // 表扬查询页路由
|
||||
component: PraiseList
|
||||
},
|
||||
{
|
||||
path: '/praise/detail/:praiseId', // 表扬详情页路由
|
||||
component: PraiseDetail
|
||||
},
|
||||
{
|
||||
path: '/notice/add', // 添加站内通知页路由
|
||||
component: NoticeAdd
|
||||
},
|
||||
{
|
||||
path: '/notice/modify/:noticeId', // 修改站内通知页路由
|
||||
component: NoticeModify
|
||||
},
|
||||
{
|
||||
path: '/notice/list', // 站内通知查询页路由
|
||||
component: NoticeList
|
||||
},
|
||||
{
|
||||
path: '/notice/detail/:noticeId', // 站内通知详情页路由
|
||||
component: NoticeDetail
|
||||
},
|
||||
|
||||
{
|
||||
path: '/Profile', // 个人中心页路由
|
||||
component: Profile,
|
||||
},
|
||||
{
|
||||
path: '/about', //关于我们页路由
|
||||
component: About
|
||||
},
|
||||
{
|
||||
path: '/coupon', // 优惠卷页路由
|
||||
component: Coupon
|
||||
}
|
||||
]
|
||||
|
||||
const router = new Router({
|
||||
routes,
|
||||
mode: 'history'
|
||||
})
|
||||
|
||||
export default router
|
||||
|
@ -0,0 +1,48 @@
|
||||
import {
|
||||
ADD_TO_CART,
|
||||
ADD_COUNTER
|
||||
} from './mutaion-types'
|
||||
|
||||
export default {
|
||||
|
||||
addCart(context, payload) {
|
||||
return new Promise((resolve) => {
|
||||
let flag = true
|
||||
let cartList = context.state.cartList
|
||||
let shopId = payload.shopId
|
||||
if (!cartList[shopId]) {
|
||||
context.commit('newCart', shopId)
|
||||
}
|
||||
cartList[shopId].list.forEach((el, index) => {
|
||||
if (el.iid == payload.iid) {
|
||||
context.commit('addCounter', { shopId: shopId, index: index })
|
||||
flag = false
|
||||
resolve('数量+1')
|
||||
}
|
||||
})
|
||||
if (flag) {
|
||||
payload.count = 1
|
||||
context.commit('addToCart', { shopId: shopId, food: payload })
|
||||
resolve('添加成功')
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
reduceCart(context, payload) {
|
||||
return new Promise((resolve) => {
|
||||
let cartList = context.state.cartList
|
||||
let shopId = payload.shopId
|
||||
cartList[shopId].list.forEach((el, index) => {
|
||||
if (el.iid == payload.iid) {
|
||||
if (el.count > 1) {
|
||||
context.commit('reduceFromCart', { shopId: shopId, index: index })
|
||||
resolve('数量-1')
|
||||
} else {
|
||||
context.commit('removeFromCart', { shopId: shopId, index: index })
|
||||
resolve('删除成功')
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
export default {
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
||||
import mutations from './mutations'
|
||||
import actions from './actions'
|
||||
import getters from './getters'
|
||||
import modules from './modules'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
const state = {
|
||||
cartList: {}
|
||||
}
|
||||
|
||||
const store = new Vuex.Store({
|
||||
state,
|
||||
mutations,
|
||||
actions,
|
||||
getters,
|
||||
modules
|
||||
})
|
||||
|
||||
export default store
|
@ -0,0 +1,3 @@
|
||||
export default {
|
||||
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
export const ADD_COUNTER = 'add_counter'
|
||||
export const ADD_TO_CART = 'add_to_cart'
|
@ -0,0 +1,24 @@
|
||||
export default {
|
||||
|
||||
newCart(state, shopId) { //初始化购物车
|
||||
state.cartList[shopId] = {
|
||||
shopId: shopId,
|
||||
list: []
|
||||
}
|
||||
},
|
||||
addCounter(state, payload) {
|
||||
state.cartList[payload.shopId].list[payload.index].count++
|
||||
},
|
||||
addToCart(state, payload) {
|
||||
state.cartList[payload.shopId].list.push(payload.food)
|
||||
},
|
||||
reduceFromCart(state, payload) {
|
||||
state.cartList[payload.shopId].list[payload.index].count--
|
||||
},
|
||||
removeFromCart(state, payload) {
|
||||
state.cartList[payload.shopId].list.splice(payload.index, 1)
|
||||
},
|
||||
setInfo(state, payload) {
|
||||
state.userInfo = payload
|
||||
}
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
<template>
|
||||
<div id="area">
|
||||
<nav-bar class="nav">
|
||||
<template v-slot:left><van-icon name="arrow-left" size="25" @click.stop="back" /></template>
|
||||
<template v-slot:center>添加学院</template>
|
||||
<template v-slot:right></template>
|
||||
</nav-bar>
|
||||
|
||||
<scroll class="content" top="1" bottom="50" ref="scroll" style="padding: 0px 5px">
|
||||
<van-form @submit="onSubmit">
|
||||
<van-field autosize clearable name="area.areaName" v-model="areaName" label="学院名称:" placeholder="请输入学院名称" :rules="[{ required: true, message: '请填写学院名称' }]" />
|
||||
<div style="margin: 16px;">
|
||||
<van-button round block type="info" native-type="submit">提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</scroll>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '../../components/common/navbar/NavBar'
|
||||
import Scroll from '../../components/common/scroll/Scroll'
|
||||
import { addArea} from "../../network/Area";
|
||||
|
||||
export default {
|
||||
name: "AreaAdd",
|
||||
components: {
|
||||
NavBar,
|
||||
Scroll,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
areaName: "", //学院名称
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
},
|
||||
|
||||
created() {
|
||||
document.getElementById("tabbar").style.display = "flex";
|
||||
},
|
||||
|
||||
methods: {
|
||||
back() {
|
||||
this.$router.go(-1);
|
||||
},
|
||||
|
||||
onSubmit(area) { //向后台请求添加学院
|
||||
addArea(area).then(res => {
|
||||
console.log(res)
|
||||
this.$notify.success('添加成功~')
|
||||
}).catch(error => { this.$notify.error(error)})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.nav {
|
||||
background-color: #54bf8e;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.back {
|
||||
font-family: 'icomoon';
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
#area {
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: fixed;
|
||||
top: 50px;
|
||||
left: 0;
|
||||
right: 0px;
|
||||
bottom: 49px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu { width: 100%; }
|
||||
|
||||
</style>
|
@ -0,0 +1,73 @@
|
||||
.areaList {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.areaItem {
|
||||
margin: 5px;
|
||||
width: 98%;
|
||||
height: auto;
|
||||
border-top: 1px solid #ededed;
|
||||
text-align: left;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.areaItem .content_view {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.areaItem .areaImg {
|
||||
width: 30%;
|
||||
text-align: right;
|
||||
padding: 2px;
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
|
||||
.areaItem .areaImg img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.areaItem .areaText {
|
||||
width:70%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.areaItem .areaText div {
|
||||
line-height: 25px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.areaItem .opt_view {
|
||||
display:block;
|
||||
width: 100%;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 5px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.areaQueryForm {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.areaQueryForm h3 {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.areaQueryForm .queryBtn {
|
||||
text-align: right;
|
||||
margin: 10px;
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
.claimList {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.claimItem {
|
||||
margin: 5px;
|
||||
width: 98%;
|
||||
height: auto;
|
||||
border-top: 1px solid #ededed;
|
||||
text-align: left;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.claimItem .content_view {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.claimItem .claimImg {
|
||||
width: 30%;
|
||||
text-align: right;
|
||||
padding: 2px;
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
|
||||
.claimItem .claimImg img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.claimItem .claimText {
|
||||
width:70%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.claimItem .claimText div {
|
||||
line-height: 25px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.claimItem .opt_view {
|
||||
display:block;
|
||||
width: 100%;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 5px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.claimQueryForm {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.claimQueryForm h3 {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.claimQueryForm .queryBtn {
|
||||
text-align: right;
|
||||
margin: 10px;
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
<template>
|
||||
<div class="swiper-container" :class="{hide: !show}">
|
||||
<swiper v-if="list">
|
||||
<swiper-item v-for="(item, index) in list" :key="index">
|
||||
<img :src="item">
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Swiper from 'components/common/swiper/Swiper'
|
||||
import SwiperItem from 'components/common/swiper/SwiperItem'
|
||||
export default {
|
||||
name: 'HomeSwiper',
|
||||
components: {
|
||||
Swiper,
|
||||
SwiperItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: true,
|
||||
list: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$bus.$on('aflocation', () => {
|
||||
this.show = true
|
||||
this.$bus.$off('aflocation')
|
||||
})
|
||||
},
|
||||
created() {
|
||||
|
||||
let list = []
|
||||
let swiperList = []
|
||||
|
||||
while(list.length <5 ) {
|
||||
let index = Math.round(Math.random() * 10 + 1)
|
||||
if(list.indexOf(index)!=-1) {
|
||||
//已经有该数字了
|
||||
continue
|
||||
}
|
||||
list.push(index)
|
||||
}
|
||||
//console.log(list)
|
||||
for(let i in list) {
|
||||
swiperList.push(`/images/swiper/sw${list[i]}.jpg`)
|
||||
}
|
||||
this.list = swiperList
|
||||
// let list = []
|
||||
// for(let i = 0; i < 5 ; i++) {
|
||||
// let index = Math.round(Math.random() * 10 + 1)
|
||||
// list.push(`/public/images/swiper/sw${index}.jpg`)
|
||||
// }
|
||||
// this.list = list
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.swiper-container {
|
||||
margin: 10px;
|
||||
height: 157px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
/* background: url(~assets/images/sw1.png); */
|
||||
/* background-size: cover; */
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.hide {
|
||||
visibility: hidden;
|
||||
}
|
||||
img {
|
||||
width: 100%;
|
||||
/* height: 180px; */
|
||||
}
|
||||
</style>
|
@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<div id="location">
|
||||
<span class="icon"></span>
|
||||
<span class="info">{{locationInfo}}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Location',
|
||||
props: {
|
||||
locationInfo: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#location {
|
||||
width: 100%;
|
||||
height: 66px;
|
||||
/* background-color: #4fc08d; */
|
||||
position: fixed;
|
||||
}
|
||||
.icon ,
|
||||
.info {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
}
|
||||
.info {
|
||||
left: 40px;
|
||||
width: 170px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.icon {
|
||||
font-family: 'icomoon';
|
||||
font-size: 20px;
|
||||
left: 14px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<div id="create-account">
|
||||
<nav-bar class="nav">
|
||||
<template v-slot:left>
|
||||
<div class="back" @click="back"></div>
|
||||
</template>
|
||||
<template v-slot:center>创建账户</template>
|
||||
</nav-bar>
|
||||
<div class="info">
|
||||
<div class="avatar" :style="{backgroundPosition: '0'+' '+(-offset)+'em'}"></div>
|
||||
<input class="editName" type="text" maxlength="6" placeholder="请编辑用户名"
|
||||
v-model.trim="nickName" v-if="isEdit" @click="focus" ref="in">
|
||||
<div class="nickName" v-else>{{nickName}}</div>
|
||||
<div class="check" v-if="isEdit" @click="toggle"></div>
|
||||
<div class="edit" v-else @click="toggle"></div>
|
||||
</div>
|
||||
<avatar @avatar="avatarChange"></avatar>
|
||||
<button class="register" @click="register">完成注册</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from 'components/common/navbar/NavBar'
|
||||
import Avatar from 'components/content/avatar/Avatar'
|
||||
import {register} from 'network/login'
|
||||
export default {
|
||||
name: 'CreateAccount',
|
||||
components: {
|
||||
NavBar,
|
||||
Avatar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
nickName: null,
|
||||
isEdit: true,
|
||||
offset: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
register() {
|
||||
if(this.nickName) {
|
||||
register(this.nickName, this.offset).then(ret => {
|
||||
this.$toast.show("注册成功")
|
||||
this.$router.replace('/home')
|
||||
})
|
||||
}else {
|
||||
this.$toast.show('请填写用户名')
|
||||
}
|
||||
},
|
||||
toggle() {
|
||||
this.isEdit = !this.isEdit
|
||||
},
|
||||
focus() {
|
||||
this.$refs.in.focus()
|
||||
},
|
||||
avatarChange(index) {
|
||||
this.offset = index
|
||||
},
|
||||
back() {
|
||||
this.$router.replace('/login')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#create-account {
|
||||
width: 100vw;
|
||||
}
|
||||
.nav {
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 9;
|
||||
}
|
||||
.back {
|
||||
font-family: 'icomoon';
|
||||
font-size: 30px;
|
||||
}
|
||||
.info {
|
||||
width: 100%;
|
||||
height: 90px;
|
||||
margin: 0 auto;
|
||||
/* background-color: pink; */
|
||||
margin-top: 60px;
|
||||
position: relative;
|
||||
}
|
||||
.avatar {
|
||||
font-size: 88px;
|
||||
width: 88px;
|
||||
height: 88px;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
background: url(~assets/images/avatar.png);
|
||||
background-size: 88px auto;
|
||||
box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, .2);
|
||||
}
|
||||
.editName {
|
||||
width: 120px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translate3d(-50%, 0, 0);
|
||||
}
|
||||
.nickName {
|
||||
width: 120px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translate3d(-50%, 0, 0);
|
||||
z-index: 2;
|
||||
font-size: 20px;
|
||||
border-bottom: 1px solid #000;
|
||||
}
|
||||
.edit,
|
||||
.check {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 100px;
|
||||
font-family: 'icomoon';
|
||||
color: #000;
|
||||
font-size: 20px;
|
||||
}
|
||||
.register {
|
||||
width: 80%;
|
||||
height: 49px;
|
||||
background-color: #333;
|
||||
border: none;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
color: #fff;
|
||||
border-radius: 4px;
|
||||
font-size: 16px;
|
||||
box-shadow: 0 1px 10px rgba(0, 0, 0, .5);
|
||||
margin-top: 20px;
|
||||
}
|
||||
.editName {
|
||||
background: none;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
border-bottom: 1px solid #000;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
</style>
|
@ -0,0 +1,73 @@
|
||||
.noticeList {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.noticeItem {
|
||||
margin: 5px;
|
||||
width: 98%;
|
||||
height: auto;
|
||||
border-top: 1px solid #ededed;
|
||||
text-align: left;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.noticeItem .content_view {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.noticeItem .noticeImg {
|
||||
width: 30%;
|
||||
text-align: right;
|
||||
padding: 2px;
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
|
||||
.noticeItem .noticeImg img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.noticeItem .noticeText {
|
||||
width:70%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.noticeItem .noticeText div {
|
||||
line-height: 25px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.noticeItem .opt_view {
|
||||
display:block;
|
||||
width: 100%;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 5px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.noticeQueryForm {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.noticeQueryForm h3 {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.noticeQueryForm .queryBtn {
|
||||
text-align: right;
|
||||
margin: 10px;
|
||||
}
|
@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<div id="praise">
|
||||
<nav-bar class="nav">
|
||||
<template v-slot:left><van-icon name="arrow-left" size="25" @click.stop="back" /></template>
|
||||
<template v-slot:center>添加表扬</template>
|
||||
<template v-slot:right></template>
|
||||
</nav-bar>
|
||||
|
||||
<scroll class="content" top="1" bottom="50" ref="scroll" style="padding: 0px 5px">
|
||||
<van-form @submit="onSubmit">
|
||||
<van-field v-show="false" clearable name="praise.lostFoundObj.lostFoundId" v-model="lostFoundObj_lostFoundId" label="招领信息:" />
|
||||
<van-field readonly clickable label="招领信息" :value="lostFoundObj_title" right-icon="arrow-down" placeholder="选择招领信息" @click="showLostFoundObjPicker = true" />
|
||||
<van-picker v-show="showLostFoundObjPicker" show-toolbar :columns="lostFoundObjColumns" :default-index="1" @cancel="showLostFoundObjPicker = false" @confirm="onConfirmLostFoundObj" />
|
||||
<van-field autosize clearable name="praise.title" v-model="title" label="标题:" placeholder="请输入标题" :rules="[{ required: true, message: '请填写标题' }]" />
|
||||
<van-field autosize clearable name="praise.contents" v-model="contents" label="表扬内容:" placeholder="请输入表扬内容" :rules="[{ required: true, message: '请填写表扬内容' }]" />
|
||||
<van-field readonly name="praise.addTime" label="表扬时间" :value="addTime" placeholder="选择表扬时间" @click="showAddTimePicker = true" :rules="[{ required: true, message: '表扬时间' }]">
|
||||
<template #button>
|
||||
<van-button size="small" type="warning" @click.stop="clearAddTime">清除</van-button>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-datetime-picker v-if="showAddTimePicker" v-model="picker_addTime" type="date" @cancel="showAddTimePicker = false" title="选择表扬时间" @confirm="onConfirmAddTime" />
|
||||
<div style="margin: 16px;">
|
||||
<van-button round block type="info" native-type="submit">提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</scroll>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '../../components/common/navbar/NavBar'
|
||||
import Scroll from '../../components/common/scroll/Scroll'
|
||||
import { queryAllLostFound } from '../../network/LostFound'
|
||||
import { addPraise} from "../../network/Praise";
|
||||
|
||||
export default {
|
||||
name: "PraiseAdd",
|
||||
components: {
|
||||
NavBar,
|
||||
Scroll,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lostFoundObjList: [], //招领信息列表
|
||||
lostFoundObj_lostFoundId: 0, //招领id
|
||||
lostFoundObj_title: "", //标题
|
||||
showLostFoundObjPicker: false, //是否显示招领信息Picker
|
||||
lostFoundObjColumns: [], //招领信息Picker的选项
|
||||
title: "", //标题
|
||||
contents: "", //表扬内容
|
||||
showAddTimePicker:false, //是否显示表扬时间Picker
|
||||
addTime: '', //表扬时间
|
||||
picker_addTime: new Date(), //表扬时间Picker的日期
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
},
|
||||
|
||||
created() {
|
||||
/*查询所有招领信息初始化下拉Picker*/
|
||||
queryAllLostFound().then(res => {
|
||||
this.lostFoundObjList = res.data;
|
||||
for(var i=0;i<this.lostFoundObjList.length;i++) {
|
||||
this.lostFoundObjColumns.push(this.lostFoundObjList[i].title)
|
||||
}
|
||||
if(this.lostFoundObjList.length > 0) {
|
||||
var firstLostFoundObj = this.lostFoundObjList[0]; //默认选中第一个选项
|
||||
this.lostFoundObj_title = firstLostFoundObj.title;
|
||||
this.lostFoundObj_lostFoundId = firstLostFoundObj.lostFoundId;
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById("tabbar").style.display = "flex";
|
||||
},
|
||||
|
||||
methods: {
|
||||
back() {
|
||||
this.$router.go(-1);
|
||||
},
|
||||
|
||||
onConfirmLostFoundObj(value,index) {
|
||||
this.lostFoundObj_title = value; //选中某个招领信息后响应
|
||||
this.lostFoundObj_lostFoundId = this.lostFoundObjList[index].lostFoundId;
|
||||
this.showLostFoundObjPicker = false;
|
||||
},
|
||||
onSubmit(praise) { //向后台请求添加表扬
|
||||
addPraise(praise).then(res => {
|
||||
console.log(res)
|
||||
this.$notify.success('添加成功~')
|
||||
}).catch(error => { this.$notify.error(error)})
|
||||
},
|
||||
onConfirmAddTime(value) { //选中某个表扬时间后的响应
|
||||
var year = value.getFullYear();
|
||||
var month = (value.getMonth()+1)<10?'0'+ (value.getMonth()+1): (value.getMonth()+1);
|
||||
var day = value.getDate()<10?'0'+value.getDate():value.getDate();
|
||||
this.addTime = year + "-" + month + "-" + day ;
|
||||
this.showAddTimePicker = false;
|
||||
},
|
||||
clearAddTime() { //清空表扬时间
|
||||
this.addTime='';
|
||||
this.showAddTimePicker=false;
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.nav {
|
||||
background-color: #54bf8e;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.back {
|
||||
font-family: 'icomoon';
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
#praise {
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: fixed;
|
||||
top: 50px;
|
||||
left: 0;
|
||||
right: 0px;
|
||||
bottom: 49px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu { width: 100%; }
|
||||
|
||||
</style>
|
@ -0,0 +1,73 @@
|
||||
.praiseList {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.praiseItem {
|
||||
margin: 5px;
|
||||
width: 98%;
|
||||
height: auto;
|
||||
border-top: 1px solid #ededed;
|
||||
text-align: left;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.praiseItem .content_view {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.praiseItem .praiseImg {
|
||||
width: 30%;
|
||||
text-align: right;
|
||||
padding: 2px;
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
|
||||
.praiseItem .praiseImg img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.praiseItem .praiseText {
|
||||
width:70%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.praiseItem .praiseText div {
|
||||
line-height: 25px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.praiseItem .opt_view {
|
||||
display:block;
|
||||
width: 100%;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 5px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.praiseQueryForm {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.praiseQueryForm h3 {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.praiseQueryForm .queryBtn {
|
||||
text-align: right;
|
||||
margin: 10px;
|
||||
}
|
@ -0,0 +1,188 @@
|
||||
<template>
|
||||
<div class="info-list" v-if="profile">
|
||||
|
||||
|
||||
<div class="info-item" @click.stop="lookingForAdd">
|
||||
<div class="title">
|
||||
<van-icon name="notes-o" color="red" /> 发布寻物启事信息<span class="title-r"><van-icon name="arrow" /></span>
|
||||
</div>
|
||||
<div class="content"><div class="info-box"></div></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="info-item" @click.stop="lookingForList">
|
||||
<div class="title">
|
||||
<van-icon name="notes-o" color="red" /> 我发布的寻物启事列表<span class="title-r"><van-icon name="arrow" /></span>
|
||||
</div>
|
||||
<div class="content"><div class="info-box"></div></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="info-item" @click.stop="lostFoundAdd">
|
||||
<div class="title">
|
||||
<van-icon name="notes-o" color="red" /> 发布失物招领信息<span class="title-r"><van-icon name="arrow" /></span>
|
||||
</div>
|
||||
<div class="content"><div class="info-box"></div></div>
|
||||
</div>
|
||||
|
||||
<div class="info-item" @click.stop="lostFoundList">
|
||||
<div class="title">
|
||||
<van-icon name="notes-o" color="red" /> 我发布的失物招领列表<span class="title-r"><van-icon name="arrow" /></span>
|
||||
</div>
|
||||
<div class="content"><div class="info-box"></div></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="info-item" @click.stop="claimList">
|
||||
<div class="title">
|
||||
<van-icon name="notes-o" color="red" /> 失物认领列表<span class="title-r"><van-icon name="arrow" /></span>
|
||||
</div>
|
||||
<div class="content"><div class="info-box"></div></div>
|
||||
</div>
|
||||
|
||||
<div class="info-item" @click.stop="praiseList" style="display:none;">
|
||||
<div class="title">
|
||||
<van-icon name="notes-o" color="red" /> 表扬信息列表<span class="title-r"><van-icon name="arrow" /></span>
|
||||
</div>
|
||||
<div class="content"><div class="info-box"></div></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="info-item" @click.stop="noticeList">
|
||||
<div class="title">
|
||||
<van-icon name="notes-o" color="red" /> 站内通知新闻<span class="title-r"><van-icon name="arrow" /></span>
|
||||
</div>
|
||||
<div class="content"><div class="info-box"></div></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="info-item" @click.stop="modify">
|
||||
<div class="title">
|
||||
<van-icon name="edit" color="red" /> 修改个人信息<span class="title-r"><span class="coupon-btn" @click.stop="couponClick" style="display:none;">积分兑换</span></span>
|
||||
</div>
|
||||
<div class="content"><div class="info-box"> </div></div>
|
||||
</div>
|
||||
|
||||
<div class="info-item" @click.stop="about">
|
||||
<div class="title">
|
||||
<van-icon name="info-o" color="red" /> 关于我们<span class="title-r"> </span>
|
||||
</div>
|
||||
<div class="content"><div class="info-box"> </div></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'InfoList',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
profile: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
lookingForAdd(){
|
||||
this.$router.push('/lookingFor/add')
|
||||
},
|
||||
lookingForList(){
|
||||
this.$router.push('/lookingFor/userList')
|
||||
},
|
||||
lostFoundAdd() {
|
||||
this.$router.push('/lostFound/add')
|
||||
},
|
||||
lostFoundList(){
|
||||
this.$router.push('/lostFound/userList')
|
||||
},
|
||||
claimList(){
|
||||
this.$router.push('/claim/list')
|
||||
},
|
||||
praiseList(){
|
||||
this.$router.push('/praise/list')
|
||||
},
|
||||
noticeList(){
|
||||
this.$router.push('/notice/list')
|
||||
},
|
||||
|
||||
couponClick() {
|
||||
this.$router.replace('/coupon')
|
||||
},
|
||||
about() {
|
||||
this.$router.replace('/about')
|
||||
},
|
||||
modify() {
|
||||
//修改个人信息
|
||||
this.$router.replace('/userInfo/selfModify')
|
||||
},
|
||||
notOpen() {
|
||||
this.$notify.error('暂未开放该功能')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.info-list {
|
||||
width: 360px;
|
||||
background-color: #fff;
|
||||
margin: 10px auto;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 6px 1px rgba(0, 0, 0, .1);
|
||||
overflow: hidden;
|
||||
}
|
||||
.info-box {
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid #f3f3f3;
|
||||
}
|
||||
.coupon-btn {
|
||||
padding: 8px;
|
||||
background-color: #0a3d62;
|
||||
font-size: 10px;
|
||||
border-radius: 5px;
|
||||
color: #fff;
|
||||
vertical-align: top;
|
||||
}
|
||||
.score {
|
||||
margin-right: 20px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
||||
.info-item {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.title {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
background-color: #fff;
|
||||
font-size: 16px;
|
||||
line-height: 40px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
.info-item .fold-icon {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 10px;
|
||||
font-family: 'icomoon';
|
||||
font-size: 20px;
|
||||
}
|
||||
.info-item .content {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
top: 0px;
|
||||
bottom: 0px;
|
||||
background-color: #f3f3f3;
|
||||
}
|
||||
.title-r {
|
||||
float: right;
|
||||
}
|
||||
|
||||
</style>
|
@ -0,0 +1,106 @@
|
||||
<template>
|
||||
<div class="profile">
|
||||
<scroll class="content" v-if="profile" bottom="80">
|
||||
<!-- 头部头像、昵称 -->
|
||||
<div class="head">
|
||||
<div class="avatar">
|
||||
<img :src="profile.userPhotoUrl" alt="">
|
||||
</div>
|
||||
<span class="nickName">{{profile.name}}</span>
|
||||
</div>
|
||||
<!-- 信息列表 -->
|
||||
<info-list :profile="profile"></info-list>
|
||||
<div class="logout" @click="logout">退出登录</div>
|
||||
</scroll>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Scroll from 'components/common/scroll/Scroll'
|
||||
|
||||
import InfoList from './InfoList'
|
||||
|
||||
import {getUserInfo, logout} from '../../network/login'
|
||||
|
||||
export default {
|
||||
name: 'Profile',
|
||||
components: {
|
||||
Scroll,
|
||||
InfoList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
profile: null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
getUserInfo().then(ret => {
|
||||
this.profile = ret.data
|
||||
})
|
||||
|
||||
},
|
||||
methods: {
|
||||
logout() {
|
||||
this.$dialog.confirm({
|
||||
title: '退出登录',
|
||||
message: '确定退出吗?'
|
||||
}).then(() => {
|
||||
logout().then(ret => {
|
||||
localStorage.clear()
|
||||
this.$router.replace('/login')
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.content {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0px;
|
||||
bottom: 49px;
|
||||
}
|
||||
.head {
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
background: url(~assets/images/profile.jpg);
|
||||
background-size: cover;
|
||||
position: relative;
|
||||
}
|
||||
.avatar {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
background-color: rgba(0, 0, 0, .3);
|
||||
border-radius: 5px;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
left: 10px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0px 0px 6px 1px rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
.avatar img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.head .nickName {
|
||||
font-size: 20px;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
left: 100px;
|
||||
color: #fff;
|
||||
}
|
||||
.logout {
|
||||
height: 49px;
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
margin: 10px;
|
||||
line-height: 49px;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0px 0px 10px 3px rgba(0, 0, 0, 0.26);
|
||||
}
|
||||
</style>
|
@ -0,0 +1,73 @@
|
||||
.userInfoList {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.userInfoItem {
|
||||
margin: 5px;
|
||||
width: 98%;
|
||||
height: auto;
|
||||
border-top: 1px solid #ededed;
|
||||
text-align: left;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.userInfoItem .content_view {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.userInfoItem .userInfoImg {
|
||||
width: 30%;
|
||||
text-align: right;
|
||||
padding: 2px;
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
|
||||
.userInfoItem .userInfoImg img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.userInfoItem .userInfoText {
|
||||
width:70%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.userInfoItem .userInfoText div {
|
||||
line-height: 25px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.userInfoItem .opt_view {
|
||||
display:block;
|
||||
width: 100%;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 5px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.userInfoQueryForm {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.userInfoQueryForm h3 {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.userInfoQueryForm .queryBtn {
|
||||
text-align: right;
|
||||
margin: 10px;
|
||||
}
|