Commit 75a36aea authored by 燕南天's avatar 燕南天

串接口,一系列操作

parent 89ac8db1
......@@ -51,7 +51,7 @@ module.exports = {
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
assetsPublicPath: './',
/**
* Source Maps
......
......@@ -17,6 +17,7 @@ export default {
padding: 0;
margin: 0;
// font-size: 24/@r;
box-sizing: border-box;
}
body,html {
font-family:'微软雅黑';
......
......@@ -8,20 +8,33 @@ export function getAdvertList() {
})
}
export function getStoreList() {
export function getStoreList(data) {
return request({
url: 'h5/index/getStoreList',
method: 'post'
method: 'post',
data:qs.stringify(data)
})
}
export function getWorkerList() {
export function getWorkerList(data) {
return request({
url: '/h5/index/getWorkerList',
method: 'post',
data:qs.stringify(data)
})
}
export function getCitys() {
return request({
url: 'pca/getCitys',
method: 'post'
})
}
const host = "http://192.168.1.100:8080/store-system"
const host = " http://47.105.32.6:8990/storeSystem"
export default host
\ No newline at end of file
......@@ -13,7 +13,6 @@ service.interceptors.request.use(config => {
return config
}, error => {
alert('请求拦截,出现错误了')
})
// respone interceptor
......@@ -21,8 +20,7 @@ service.interceptors.response.use(
response => response.data,
error => {
alert('响应拦截出现错误了')
})
export default service
import request from './request'
import qs from 'qs'
export function storeDetails(data) {
return request({
url: '/h5/shop/storeDetails',
method: 'post',
data:qs.stringify(data)
})
}
export function searchWorkerResult(data) {
return request({
url: '/h5/index/searchWorkerResult',
method: 'post',
data:qs.stringify(data)
})
}
import request from './request'
import qs from 'qs'
export function workerDetails(data) {
return request({
url: '/h5/worker/workerDetails',
method: 'post',
data:qs.stringify(data)
})
}
<template>
<div class="header">
<div class="header" :class="{'seach-header':seach}">
<span v-if="!noBack" class="back" @click="bankFun">返回</span>
{{title}}
<span v-if="!seach">{{title}}</span>
<div class="seach-wrapper" v-if="seach">
<input class="seach-input" type="text" placeholder="请输入关键字" v-model="storeName" @keyup.enter="handleSeach">
<span class="select-wrapper" @click='handleShowSheet'>{{cityItem.name}}</span>
<div class="city-bg" :class="{active:showSheet}" @click="handleCancle"></div>
<div class="choose-city" :class="{active:showSheet}">
<div class="choose-header">
<span class="choose-btn cancle" @click="handleCancle">取消</span>
<span>请选择地址</span>
<span class="choose-btn confirm" @click="handleConfirm">确定</span>
</div>
<div class="radio" v-for="(item,idx) in seach" :key="idx">
<input :id="item.codeC" name='chooseCity' type="radio" :value="item" v-model="cityItem">
<label :for="item.codeC"><span>{{item.name}}</span></label>
</div>
</div>
</div>
</div>
</template>
<script>
import {searchShopResult} from "../../api/shopList"
export default {
props:['title','noBack'],
methods:{
bankFun(){
this.$router.go(-1)
props: ["title", "noBack", "seach"],
data(){
return {
storeName:'',
showSheet:false,
cityItem:{
name:'西安',codeC:'610100'
}
}
},
beforeMount(){
let obj = {name:'西安',codeC:'610100'}
const cityItem = localStorage.getItem('cityItem')
this.cityItem = cityItem?JSON.parse(cityItem):obj
},
methods: {
bankFun() {
this.$router.go(-1);
},
handleShowSheet(){
this.showSheet = !this.showSheet;
},
handleCancle(){
this.showSheet = !this.showSheet;
},
handleConfirm(){
const cityItem = this.cityItem
localStorage.setItem('cityItem',JSON.stringify(cityItem))
this.$emit('emitChangeCity')
},
handleSeach(){
const name = this.storeName
this.$router.push({
path:'shopList',
query:{storeName:name}
})
// searchShopResult({storeName:this.storeName}).then(res=>{
// })
}
}
}
};
</script>
<style lang="less" scoped>
@r:100rem;
.header{
font-size: 36/@r;
line-height:90/@r;
text-align: center;
border-bottom: solid 1px #dedede;
@r: 100rem;
.header {
font-size: 36 / @r;
line-height: 90 / @r;
text-align: center;
border-bottom: solid 1px #dedede;
position: fixed;
width: 100%;
left: 0;
top: 0;
z-index: 10000;
background: #de4b4b;
color: #fff;
.back {
cursor: pointer;
position: absolute;
left: 30 / @r;
font-size: 28/@r;
}
&.seach-header {
background: none;
border: none;
text-align: left;
line-height: 90 / @r;
.seach-wrapper {
background: rgba(255,255,255,.6);
padding: 0 30 / @r;
border-radius: 60 / @r;
display: flex;
justify-content: space-between;
margin-top: 20/@r;
box-shadow: 2px 2px 2px rgba(0,0,0,.2)
}
input.seach-input {
width: 500/@r;
background: none;
border: none;
border: solid 1px #dedede;
height: 60 / @r;
border-radius: 60 / @r;
padding-left: 30 / @r;
outline: none;
position: relative;
top: 14/@r;
}
.select-wrapper{
right: 0/@r;
top: 0/@r;
background: none;
border: none;
outline: none;
font-size: 24/@r;
color: #de4b4b;
font-weight: 700;
}
.city-bg{
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 10000;
background: rgba(0,0,0,.5);
display: none;
&.active{
display: block;
}
}
.choose-city{
position: fixed;
width: 100%;
left: 0;
background: #fff;
.back{
cursor: pointer;
position: absolute;
left: 30/@r;
max-height: 400/@r;
overflow-y: auto;
opacity: 0;
bottom: -400/@r;
transition: all .3s;
&.active{
opacity: 1;
bottom: 0;
.choose-header{
opacity: 1;
bottom: 400/@r;
}
}
.choose-header{
position: fixed;
width: 100%;
height: 80/@r;
line-height: 80/@r;
left: 0;
bottom: 400/@r;
background: #de4b4b;
color: #fff;
font-size: 28/@r;
text-align: center;
opacity: 0;
bottom:-80/@r;
transition: all .3s;
.cancle,
.confirm{
position: absolute;
}
.cancle{
left: 0;
padding-left: 20/@r;
}
.confirm{
right: 0;
padding-right: 20/@r;
}
}
// 自定义多选框的样式
label {
margin: 0;
cursor: pointer;
font-size: 28 / @r;
color: #555;
position: relative;
span {
font-size: 28 / @r;
color: #999;
display: inline-block;
width: 100%;
height: 80/@r;
text-align: center;
line-height: 80 / @r;
position: absolute;
left: 0;
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Chrome/Safari/Opera */
-khtml-user-select: none; /* Konqueror */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
not supported by any browser */
}
}
input:focus {
outline: none;
}
input[type="radio"] + label::before,
input[type="checkbox"] + label::before {
margin: 0;
content: "\a0"; /*不换行空格*/
display: inline-block;
width: 100%;
background: #fafafa;
}
input[type="radio"]:checked + label::before,
input[type="checkbox"]:checked + label::before {
margin: 0;
content: "\a0";
background: #de4b4b;
}
input[type="radio"]:checked + label,
input[type="checkbox"]:checked + label {
span {
color: #fff;
}
}
input[type="radio"],
input[type="checkbox"] {
position: absolute;
clip: rect(0, 0, 0, 0);
outline: none;
}
}
}
}
</style>
......
<template>
<div class="nodata">
<div class="img">
<img :src="require('../../assets/images/nodata.png')" alt="">
</div>
<div class="text">暂无数据</div>
</div>
</template>
<style lang="less" scoped>
@r:100rem;
.nodata{
padding: 20/@r 0;
.img{
width: 300/@r;
margin: 0 auto;
img{
width: 100%;
}
}
.text{
text-align: center;
font-size: 30/@r;
color: #999;
}
}
</style>
......@@ -5,6 +5,8 @@ import Home from '@/views/home/index.vue'
import ShopList from '@/views/shopList/index.vue'
import WorkerList from '@/views/workerList/index.vue'
import ShopDetails from '@/views/shopDetails/index.vue'
import WorkerDetails from '@/views/workerDetails/index.vue'
import WebView from '@/views/webView/index.vue'
......@@ -14,6 +16,10 @@ export default new Router({
routes: [
{
path: '/',
redirect:'index'
},
{
path: '/index',
name: 'index',
component: Home
},
......@@ -28,11 +34,16 @@ export default new Router({
component: WorkerList
},
{
path: '/shopDetails',
path: '/shopDetails/:id',
name: 'shopDetails',
component: ShopDetails
},
{
path: '/workerDetails/:id',
name: 'workerDetails',
component: WorkerDetails
},
{
path: '/webView',
name: 'webView',
component: WebView
......
<template>
<swiper :options="swiperOption">
<swiper-slide v-for="(item,index) in data" :key="index">
<img :src="item.advertPicUrl" :alt="item.advertPicUrl" @click="toWebview(item)">
<div class="img" :style="{'background-image':`url(${item.advertPicUrl})`}" @click="toWebview(item)"></div>
</swiper-slide>
<div class="swiper-pagination swiper-pagination-bullets" slot="pagination"></div>
......@@ -50,11 +50,12 @@ export default {
}
.swiper-slide {
height: 410 / @r;
img {
display: block;
.img {
width: 100%;
height: 100%;
background: #dedede;
background-color: #dedede;
background-size:cover;
background-position:center center;
}
}
</style>
......
......@@ -27,13 +27,13 @@ export default {
padding:0 20/@r;
margin: 20/@r 0;
line-height: 90/@r;
background: #dedede;
background: #de4b4b;
.name{
font-size: 36/@r;
color: #333;
color: #fff;
}
.btn{
color: #666;
color: #fff;
font-size: 28/@r;
cursor: pointer;
}
......
<template>
<div class="shop-list-wrapper">
<div class="list-item">
<div class="img">
<img :src="data.storeHomePic" alt="">
</div>
<div class="list-item">
<div class="img" :style="{'background-image':`url(${data.storeHomePic})`}"></div>
<div class="item-infro">
<div class="name" >{{data.storeName}}</div>
<div class="details">{{data.brief}}</div>
<div class="details">{{data.storePosition}}</div>
</div>
</div>
</div>
</template>
......@@ -37,7 +35,9 @@ export default {
.img{
width: 120/@r;
height: 120/@r;
background: #dedede;
background-color: #dedede;
background-size:cover;
background-position:center center;
}
.item-infro{
width: 540/@r;
......
<template>
<div class="staff-item">
<img :src="data.workerHomePic" alt="">
<div class="infro">{{data.workerName}}</div>
<div class="img" :style="{'background-image':`url(${data.workerHomePic})`}"></div>
<div class="infro">{{data.workerName}}:{{data.brief}}</div>
</div>
</template>
......@@ -22,23 +22,32 @@ export default {
position: relative;
margin-bottom: 15/@r;
margin-left: 15/@r;
box-shadow: 2px 2px 2px rgba(0,0,0,.2);
&:nth-child(3n+1){
margin-left: 0;
}
img{
display: block;
.img{
background: #dedede;
width: 100%;
height: 100%;
background-color: #dedede;
background-size:cover;
background-position:center center;
}
.infro{
position: absolute;
width: 100%;
height: 80/@r;
// height: 80/@r;
left: 0;
bottom: 0;
font-size: 28/@r;
font-size: 24/@r;
background: rgba(0, 0, 0, .5);
color: #fff;
padding: 10/@r;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
}
</style>
......
<template>
<div class="page-wrapper">
<c-header title="首页" noBack="1"></c-header>
<div class="">
<c-header ref="chanceCity" title="首页" noBack="1" :seach='citySelectData' @emitChangeCity='changeCityGetPgeData'></c-header>
<h-banner :data="bannerData"></h-banner>
<h-item-title title="精选商家" href="/shopList"></h-item-title>
<h-shop-list v-for="(item,index) in shopListData" :key="index" @click.native="toShopDetails(item.storeId)" :data="item"></h-shop-list>
<div class="shop-list-wrapper" v-if="shopListData">
<h-shop-list v-for="(item,index) in shopListData" :key="index" @click.native="toShopDetails(item.storeId)" :data="item"></h-shop-list>
</div>
<no-data v-else></no-data>
<h-item-title title="闪亮之星" href="/workerList"></h-item-title>
<div class="staff-wrapper">
<div class="staff-wrapper" v-if="staffData">
<h-staff v-for="(item,index) in staffData" :key="index" @click.native="toDetails(item.workerId)" :data="item"></h-staff>
</div>
<no-data v-else></no-data>
</div>
</template>
<script>
import CHeader from "@/components/CHeader";
import NoData from "@/components/noData";
import HBanner from "./components/HBanner";
import HShopList from "./components/HShopList";
import HItemTitle from "./components/HItemTitle";
......@@ -25,14 +31,17 @@ import * as home from "../../api/home";
import axios from "axios";
export default {
components: { CHeader, HBanner, HShopList, HItemTitle, HStaff },
components: { CHeader, HBanner, HShopList, HItemTitle, HStaff, NoData},
data() {
return {
bannerData: [],
shopListData: [],
staffData: []
staffData: [],
citySelectData:null
};
},
......@@ -43,14 +52,18 @@ export default {
methods: {
toShopDetails(id) {
this.$router.push({ name: "shopDetails", params: { id: id } });
this.$router.push({ path:`/shopDetails/${id}`})
},
toDetails(id) {
alert(id);
this.$router.push({ path:`/workerDetails/${id}`})
},
getPageData(cb) {
const cityItem = localStorage.getItem('cityItem')
let code = cityItem?JSON.parse(cityItem).codeC:'610100'
const getAdvertList = () => {
home.getAdvertList().then(res => {
this.bannerData = res.data;
......@@ -58,21 +71,51 @@ export default {
};
const getStoreList = () => {
home.getStoreList().then(res => {
home.getStoreList({cityId:code}).then(res => {
this.shopListData = res.data;
});
};
const getWorkerList = () => {
home.getWorkerList().then(res => {
home.getWorkerList({}).then(res => {
this.staffData = res.data;
});
};
axios.all([getAdvertList(), getStoreList(),getWorkerList()]).then((s, f) => {
const getCitys = () => {
home.getCitys().then(res => {
this.citySelectData = res.data;
});
};
axios.all([getAdvertList(), getStoreList(),getWorkerList(),getCitys()]).then((s, f) => {
cb ? cb() : "";
});
},
changeCityGetPgeData(){
const cityItem = localStorage.getItem('cityItem')
let code = cityItem?JSON.parse(cityItem).codeC:'610100'
const getStoreList = () => {
home.getStoreList({cityId:code}).then(res => {
this.shopListData = res.data;
});
};
// const getWorkerList = () => {
// home.getWorkerList({cityId:code}).then(res => {
// this.staffData = res.data;
// });
// };
axios.all([getStoreList()]).then((s, f) => {
this.$refs.chanceCity.handleCancle()
});
}
}
};
</script>
......
......@@ -38,6 +38,8 @@ export default {
border-radius: 10/@r;
background: #f0f0f0;
padding: 20/@r;
font-size: 32/@r!important;
color: #666;
}
}
</style>
......
......@@ -2,28 +2,24 @@
<div class="page-wrapper">
<c-header title="商家详情"></c-header>
<div class="shop-main-infro">
<div class="shop-name">商家名称{{id}}</div>
<div class="address">西安市雁塔区110号,欢迎您的光临</div>
<div class="shop-name">{{shopData.storeName}}</div>
<div class="brief">{{shopData.brief}}</div>
<div class="address">{{shopData.province}} {{shopData.cityName}} {{shopData.county}} {{shopData.storePosition}}</div>
</div>
<s-infro-content title="商家详情" :data="shopDetailsData" type='1'></s-infro-content>
<s-infro-content title="商家详情" :data="shopData.storeDetails" type='1'></s-infro-content>
<s-infro-content title="在线员工" type='2'>
<div class="employee-wrapper">
<div class="employee-item">
<div class="img"></div>
<div class="infro">个人简介:我是水水,漂亮贤惠,温柔大方,快来找我吧!我喜欢听音乐,打篮球,交朋友</div>
</div>
<div class="employee-item">
<div class="img"></div>
<div class="infro">个人简介:我是水水,漂亮贤惠,温柔大方,快来找我吧!我喜欢听音乐,打篮球,交朋友</div>
</div>
<div class="employee-wrapper" v-if="workerData">
<div class="employee-item">
<div class="img"></div>
<div class="infro">个人简介:我是水水,漂亮贤惠,温柔大方,快来找我吧!我喜欢听音乐,打篮球,交朋友</div>
<div class="employee-item" v-for="(item,idx) in workerData" :key="idx" @click="toWorkerDetails(item.workerId)">
<div class="img" :style="{'background-image':`url(${item.workerHomePic})`}"></div>
<div class="infro">个人简介:{{item.brief}}</div>
</div>
</div>
<div class="nodata-wrapper" v-else>
<no-data></no-data>
</div>
</s-infro-content>
......@@ -32,18 +28,42 @@
</template>
<script>
import CHeader from '@/components/CHeader'
import NoData from '@/components/noData'
import SInfroContent from './components/SInfroContent'
import * as shopDetails from "../../api/shopDetails"
export default {
components:{CHeader,SInfroContent},
components:{CHeader,SInfroContent,NoData},
data(){
return {
id:'',
shopDetailsData:"<p style='font-size:14px;color:#666'>试试是这个对不对</p>"
shopData:{
storeName:'',
province:'',
cityName:'',
county:'',
storePosition:'',
storeDetails:''
},
workerData:[]
}
},
beforeMount(){
const id = this.$route.params.id
this.id = id;
this.getPageData(id)
},
methods:{
getPageData(id){
const param = {storeId:id}
shopDetails.storeDetails(param).then(res=>{
this.shopData = res.data
shopDetails.searchWorkerResult(param).then(res=>{
this.workerData = res.data
})
})
},
toWorkerDetails(id){
this.$router.push({ path:`/workerDetails/${id}`})
}
}
}
</script>
......@@ -55,7 +75,13 @@ export default {
.shop-name{
font-size: 40/@r;
color: #333;
}
font-weight: 700
}
.brief{
font-size: 32/@r;
color: #666;
margin-top: 10/@r;
}
.address{
font-size: 24/@r;
color: #666;
......@@ -76,7 +102,10 @@ export default {
margin-bottom: 30/@r;
.img{
height: 250/@r;
background: #ca0c16 ;
background: rgba(222,75,75,.5) ;
background-color: #dedede;
background-size:cover;
background-position:center center;
}
.infro{
......@@ -92,5 +121,9 @@ export default {
}
}
.nodata-wrapper{
margin-top: 150/@r;
}
</style>
......@@ -14,19 +14,14 @@
<div class="choose-item">
<div class="title">地址选择</div>
<div class="item-content">
<div class="select-wrapper">
<label>市区:</label>
<select v-model="CID" @change="chooseCityFun">
<option v-for="(item,idx) in CData" :key="idx" :value="item.codeC">{{item.name}}</option>
</select>
</div>
<div class="select-wrapper">
<label>县区:</label>
<select v-model="AID">
<option v-for="(item,idx) in AData" :key="idx" :value="item.codeA">{{item.name}}</option>
</select>
</div>
</div>
</div>
......@@ -70,9 +65,7 @@ export default {
data() {
return {
show: false,
CData: [],
CID: "",
AData: [],
AID: "",
......@@ -85,14 +78,14 @@ export default {
},
methods: {
taggleModelFun() {
this.getChooseData(() => {
const cityItem = localStorage.getItem('cityItem')
let code = cityItem?JSON.parse(cityItem).codeC:'610100'
this.getChooseData(code,() => {
this.show = !this.show;
});
},
handleCancle() {
this.CData = [];
this.CID = "";
this.AData = [];
this.AID = "";
this.priceData = [];
......@@ -103,28 +96,21 @@ export default {
},
// 获取选择数据
getChooseData(cb) {
this.getCData(() => {
getChooseData(code,cb) {
this.chooseCityFun(code,()=>{
this.getPriceData(() => {
cb ? cb() : "";
});
});
})
},
// 获取市区下拉数据
getCData(cb) {
this.AData = [];
this.AID = "";
getCityList({ codeP: "610000" }).then(res => {
this.CData = res.data;
cb ? cb() : "";
});
},
chooseCityFun() {
getAreaList({ codeC: this.CID }).then(res => {
chooseCityFun(code,cb) {
getAreaList({ codeC: code }).then(res => {
this.AData = res.data;
cb ? cb() : "";
});
},
......
......@@ -6,7 +6,7 @@
<div class="item-infro">
<div class="title">{{data.storeName}}</div>
<div class="infro">{{data.storePosition}}</div>
<div class="adress">管理员:{{data.administratorsName}}</div>
<div class="adress">{{data.brief}}</div>
</div>
</div>
</template>
......@@ -24,6 +24,7 @@ export default {
display: flex;
box-sizing: border-box;
padding: 30/@r;
.img {
width: 160 / @r;
height: 160 / @r;
......
<template>
<div class="page-wrapper">
<c-header title="商家列表"></c-header>
<s-item v-for="(item,index) in shopListData" :key="index" :data="item" @click.native="toDetails(item.id)"></s-item>
<div v-if="shopListData">
<s-item v-for="(item,index) in shopListData" :key="index" :data="item" @click.native="toDetails(item.storeId)"></s-item>
</div>
<div class="nodata-wrapper" v-else>
<no-data></no-data>
</div>
<more-shop ref="chooseMore" @emitSuccess="handleChooseSuccess"></more-shop>
</div>
</template>
<script>
import CHeader from '@/components/CHeader'
import NoData from "@/components/noData";
import SItem from './components/SItem'
import MoreShop from './components/MoreShop'
import * as shopList from "../../api/shopList"
export default {
components:{CHeader,SItem,MoreShop},
components:{CHeader,SItem,MoreShop,NoData},
data(){
return {
shopListData:[]
}
},
beforeMount(){
this.getPageData({})
const name = this.$route.query
const cityItem = localStorage.getItem('cityItem')
let code = cityItem?JSON.parse(cityItem).codeC:'610100'
let param
if(name){
param = {
storeName:name.storeName
}
}else{
param = {
cityId:code,
}
}
this.getPageData(param)
},
methods:{
toDetails(id){
this.$router.push({ name: 'shopDetails', params: { id: id }})
this.$router.push({ path: `/shopDetails/${id}`})
},
handleChooseSuccess(data){
alert('参数'+JSON.stringify(data))
this.getPageData(data,()=>{
this.$refs.chooseMore.handleCancle()
})
......@@ -46,3 +66,12 @@ export default {
}
</script>
<style lang="less" scoped>
@r:100rem;
.nodata-wrapper{
padding-top: 200/@r;
}
</style>
......@@ -25,11 +25,9 @@ export default {
<style lang="less" scoped>
@r:100rem;
.web-view-content{
background: #ff0;
padding: 20/@r;
*{
font-size: inherit!important;
}
font-size: 32/@r!important;
color: #666;
}
</style>
......
<template>
<div class="page-wrapper">
<c-header title="人员详情"></c-header>
<div class="worker-details">
<div class="img" :style="{'background-image':`url(${workerData.workerHomePic})`}"></div>
<div class="infro">
<div class="name">{{workerData.workerName}}</div>
<div class="bref-wrapper">{{workerData.brief}}</div>
<div class="bref" v-html="workerData.workerResume"></div>
</div>
</div>
</div>
</template>
<script>
import CHeader from "@/components/CHeader";
import * as workerDetails from "../../api/workerDetails"
export default {
components:{CHeader},
data(){
return {
workerData:{
workerName:'',
workerHomePic:'',
workerResume:''
}
}
},
beforeMount(){
const id = this.$route.params.id
this.getPageData(id)
},
methods:{
getPageData(id){
const param = {
workerId:id
}
workerDetails.workerDetails(param).then(res=>{
this.workerData = res.data
})
}
}
}
</script>
<style lang="less" scoped>
@r:100rem;
.worker-details{
.img{
height: 900/@r;
background-color: #dedede;
background-size:cover;
background-position:center center;
}
.infro{
padding: 20/@r;
.name{
font-size: 34/@r;
color: #333;
font-weight: 700;
}
.bref-wrapper{
font-size: 28/@r;
color: #666;
margin-top: 10/@r;
}
.bref{
background: #dedede;
min-height: 300/@r;
border-radius: 8/@r;
margin-top: 20/@r;
color: #666;
padding: 20/@r;
font-size: 24/@r!important;
color: #666;
}
}
}
</style>
<template>
<div class="staff-item">
<img :src="data.workerHomePic" alt="">
<div class="infro">{{data.workerName}}</div>
<div class="infro">{{data.workerName}}:{{data.brief}}</div>
</div>
</template>
......@@ -19,6 +19,7 @@ export default {
position: relative;
margin-bottom: 15/@r;
margin-left: 15/@r;
box-shadow: 2px 2px 2px rgba(0,0,0,.2);
&:nth-child(3n+1){
margin-left: 0;
}
......@@ -34,8 +35,14 @@ export default {
height: 80/@r;
left: 0;
bottom: 0;
font-size: 28/@r;
font-size: 24/@r;
background: rgba(0, 0, 0, .5);
color: #fff;
padding: 5/@r;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
}
</style>
......
<template>
<div class="page-wrapper">
<c-header title="人员列表"></c-header>
<div class="staff-wrapper">
<div class="staff-wrapper" v-if="staffData">
<w-staff v-for="(item,index) in staffData" :key="index" :data="item" @click.native="toWorkerDetails(item.workerId)"></w-staff>
</div>
<div class="nodata-wrapper" v-else>
<no-data></no-data>
</div>
<more-worker ref="chooseMore" @emitSuccess="handleChooseSuccess"></more-worker>
</div>
</template>
<script>
import CHeader from "@/components/CHeader";
import NoData from "@/components/noData";
import WStaff from "./components/WStaff";
import MoreWorker from "./components/MoreWorker"
import * as workerList from "../../api/workerList"
export default {
components: { CHeader, WStaff,MoreWorker },
components: { CHeader, WStaff,MoreWorker,NoData },
data() {
return {
staffData: []
......@@ -27,7 +32,7 @@ export default {
},
methods:{
toWorkerDetails(id){
alert(id)
this.$router.push({ path:`/workerDetails/${id}`})
},
getPageData(data,cb){
workerList.searchWorkerResult(data).then(res=>{
......@@ -37,7 +42,6 @@ export default {
},
handleChooseSuccess(data){
alert('参数'+JSON.stringify(data))
this.getPageData(data,()=>{
this.$refs.chooseMore.handleCancle()
})
......@@ -55,5 +59,8 @@ export default {
padding: 0 30 / @r;
padding-top: 20/@r;
}
.nodata-wrapper{
padding-top: 200/@r;
}
</style>
......@@ -4,7 +4,8 @@
* @param prod==>正式上线环境
* */
module.exports = {
sit:"http://192.168.1.100:8080/store-system",//毅豪本地
sit:"http://47.105.32.6:8990/storeSystem",//毅豪本地
// sit:"http://192.168.1.112:8080/store-system",
// -----------------------------------------------------------------
prod: "http:正式环境"
......
......@@ -157,6 +157,16 @@
<el-row :gutter="15">
<el-col :span="3" class="content-left"><label>店铺简介</label></el-col>
<el-col :span="21" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" type="textarea" :rows="2" placeholder="请输入店铺简介" v-model="dialogBindData.brief"></el-input>
<span v-else>{{dialogBindData.brief}}</span>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="3" class="content-left"><label>管理员</label></el-col>
<el-col :span="21" class="content-right">
<el-select v-if="dialogType===1 || dialogType===2" v-model="dialogBindData.administratorsId" placeholder="请选择">
......@@ -429,6 +439,7 @@ export default {
dialogBindData: {
storeId: "",
storeName: "",
brief:'',
contactNumber: "",
contacts: "",
qq: "",
......
......@@ -152,6 +152,16 @@
<el-row :gutter="15">
<el-col :span="6" class="content-left"><label>简介</label></el-col>
<el-col :span="18" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" type="textarea" :rows="2" placeholder="请输入员工简介" v-model="dialogBindData.brief"></el-input>
<span v-else>{{dialogBindData.brief}}</span>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="6" class="content-left"><label>性别</label></el-col>
<el-col :span="18" class="content-right">
......@@ -355,6 +365,7 @@ export default {
workerId: "",
workerNumber: "",
workerName: "",
brief:'',
workerSex: 1,
workerAge: "",
workerBirthday: "",
......
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