Commit 0a146a21 authored by 扫地僧's avatar 扫地僧

修改11-19 下午

parent 5dc46d0d
......@@ -17,14 +17,17 @@ import cn.com.fqy.core.common.BaseController;
import cn.com.fqy.core.common.PageFinder;
import cn.com.fqy.core.model.Query;
import cn.com.fqy.core.model.Store;
import cn.com.fqy.core.model.SysUser;
import cn.com.fqy.core.service.StoreService;
import cn.com.fqy.core.service.SysUserService;
@Controller
@RequestMapping("store")
public class StoreController extends BaseController {
@Resource
private StoreService storeService;
@Resource
private SysUserService sysUserService;
/*
* 分页展示店铺信息
*/
......@@ -32,6 +35,12 @@ public class StoreController extends BaseController {
@ResponseBody
public PageFinder<Store> storeList(Store store,Query query) {
store.setIsDeleted(0);
SysUser user = sysUserService.detail(store.getUserId());
if (user!=null) {
if ("1".equals(user.getFlag())) {
store.setUserId("");
}
}
Query q = new Query(query.getPageNo(),query.getPageSize(),store);
return storeService.getStorePagedList(q);
}
......
......@@ -14,8 +14,10 @@ import cn.com.fqy.core.common.BaseController;
import cn.com.fqy.core.common.PageFinder;
import cn.com.fqy.core.model.Query;
import cn.com.fqy.core.model.Store;
import cn.com.fqy.core.model.SysUser;
import cn.com.fqy.core.model.Worker;
import cn.com.fqy.core.service.StoreService;
import cn.com.fqy.core.service.SysUserService;
import cn.com.fqy.core.service.WorkerService;
@Controller
@RequestMapping("worker")
......@@ -25,7 +27,8 @@ public class WorkerController extends BaseController {
private WorkerService workerService;
@Resource
private StoreService storeService;
@Resource
private SysUserService sysUserService;
/*
* 分页展示员工信息
*/
......@@ -33,6 +36,12 @@ public class WorkerController extends BaseController {
@ResponseBody
public PageFinder<Worker> workerList(Worker worker,Query query) {
worker.setIsDeleted(0);
SysUser user = sysUserService.detail(worker.getUserId());
if (user!=null) {
if ("1".equals(user.getFlag())) {
worker.setUserId("");
}
}
Query q = new Query(query.getPageNo(),query.getPageSize(),worker);
return workerService.getWorkerPagedList(q);
......
......@@ -13,8 +13,8 @@ module.exports = {
proxyTable: {},
// Various Dev Server settings
// host: 'localhost', // can be overwritten by process.env.HOST
host: '192.168.1.107', // can be overwritten by process.env.HOST
host: 'localhost', // can be overwritten by process.env.HOST
// host: '192.168.1.107', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
......
......@@ -14,6 +14,7 @@
"build": "node build/build.js"
},
"dependencies": {
"axios": "^0.18.0",
"vue": "^2.5.2",
"vue-router": "^3.0.1"
},
......
<template>
<div class="staff-item">
<div class="img" :style="{'background-image':`url(${data.workerHomePic})`}"></div>
<div class="infro">{{data.workerName}}:{{data.brief}}</div>
<div class="infro">{{data.workerName}}:{{data.brief}} </div>
<span class="clicks">点击量:{{data.clicks}}</span>
</div>
</template>
......@@ -41,7 +42,7 @@ export default {
left: 0;
bottom: 0;
font-size: 24/@r;
background: rgba(0, 0, 0, .5);
background: rgba(222, 75, 75, .5);
color: #fff;
padding: 10/@r;
display: -webkit-box;
......@@ -49,6 +50,18 @@ export default {
-webkit-line-clamp: 2;
overflow: hidden;
}
.clicks{
position: absolute;
left: 10/@r;
top: 10/@r;
// color: #fff;
font-size: 24/@r;
// text-shadow: 2px 2px 2px rgba(0, 0, 0, .5);
background: rgba(222, 75, 75, .8);
color: #fff;
padding: 8/@r 8/@r;
border-radius: 10/@r;
}
}
</style>
......
<template>
<div class="item">
<div class="img">
<img :src="data.storeHomePic" alt="">
</div>
<div class="img" :style="{'background-image':`url(${data.storeHomePic})`}"></div>
<div class="item-infro">
<div class="title">{{data.storeName}}</div>
<div class="infro">{{data.storePosition}}</div>
......@@ -28,12 +26,11 @@ export default {
.img {
width: 160 / @r;
height: 160 / @r;
img {
display: block;
width: 100%;
height: 100%;
background: #dedede;
}
background-color: #dedede;
background-size:cover;
background-position:center center;
}
.item-infro {
margin-left: 28/@r;
......
<template>
<div class="page-wrapper">
<c-header title="人员详情"></c-header>
<div class="worker-details">
<div class="worker-details" id="scrollContainer">
<div class="img" :style="{'background-image':`url(${workerData.workerHomePic})`}"></div>
<div class="infro">
<div class="name">{{workerData.workerName}}</div>
<div class="name">{{workerData.workerName}}<span class="clicks">点击量:{{workerData.clicks}}</span></div>
<div class="bref-wrapper">{{workerData.brief}}</div>
<div class="bref" v-html="workerData.workerResume"></div>
</div>
</div>
<div class="store-content">
<div class="img" :style="{'background-image':`url(${workerData.storeHomePic})`}"></div>
<div class="item-infro">
<div class="title">{{workerData.storeName}}</div>
<div class="adress">{{workerData.brief}}</div>
<div class="infro">{{workerData.storePosition}}</div>
</div>
</div>
</div>
</template>
......@@ -28,6 +37,9 @@ export default {
}
}
},
mounted(){
window.addEventListener('scroll', this.handleScroll)
},
beforeMount(){
const id = this.$route.params.id
this.getPageData(id)
......@@ -40,6 +52,11 @@ export default {
workerDetails.workerDetails(param).then(res=>{
this.workerData = res.data
})
},
handleScroll(){
// const ele = document.getElementById('scrollContainer');
// console.log(ele.getBoundingClientRect())
}
}
}
......@@ -48,6 +65,7 @@ export default {
<style lang="less" scoped>
@r:100rem;
.worker-details{
padding-bottom: 220/@r;
.img{
height: 900/@r;
background-color: #dedede;
......@@ -61,6 +79,15 @@ export default {
font-size: 34/@r;
color: #333;
font-weight: 700;
.clicks{
font-weight: 700;
font-size: 24/@r;
margin-left: 24/@r;
background: #de4b4b;
color: #fff;
padding: 8/@r 8/@r;
border-radius: 10/@r;
}
}
.bref-wrapper{
font-size: 28/@r;
......@@ -82,6 +109,42 @@ export default {
}
}
.store-content{
position: fixed;
width: 100%;
bottom: 0;
left: 0;
display: flex;
box-sizing: border-box;
padding: 30/@r;
background: #de4b4b;
.img {
width: 160 / @r;
height: 160 / @r;
background: #dedede;
background-color: #dedede;
background-size:cover;
background-position:center center;
}
.item-infro {
margin-left: 28/@r;
.title {
font-size: 32 / @r;
color: #333;
}
.infro {
font-size: 24 / @r;
color: #999;
}
.adress {
font-size: 24 / @r;
color: #666;
}
}
}
</style>
<template>
<div class="staff-item">
<img :src="data.workerHomePic" alt="">
<div class="img" :style="{'background-image':`url(${data.workerHomePic})`}"></div>
<div class="infro">{{data.workerName}}:{{data.brief}}</div>
<span class="clicks">点击量:{{data.clicks}}</span>
</div>
</template>
......@@ -23,11 +24,14 @@ export default {
&:nth-child(3n+1){
margin-left: 0;
}
img{
.img{
display: block;
background: #dedede;
width: 100%;
height: 100%;
background-color: #dedede;
background-size:cover;
background-position:center center;
}
.infro{
position: absolute;
......@@ -36,7 +40,7 @@ export default {
left: 0;
bottom: 0;
font-size: 24/@r;
background: rgba(0, 0, 0, .5);
background: rgba(222, 75, 75, .5);
color: #fff;
padding: 5/@r;
display: -webkit-box;
......@@ -44,6 +48,18 @@ export default {
-webkit-line-clamp: 2;
overflow: hidden;
}
.clicks{
position: absolute;
left: 10/@r;
top: 10/@r;
// color: #fff;
font-size: 24/@r;
// text-shadow: 2px 2px 2px rgba(0, 0, 0, .5);
background: rgba(222, 75, 75, .8);
color: #fff;
padding: 8/@r 8/@r;
border-radius: 10/@r;
}
}
</style>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment