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

修改11-19 下午

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