Browse Source

上传

master
前端-胡立永 4 months ago
parent
commit
b3e5e7a915
14 changed files with 347 additions and 245 deletions
  1. +7
    -0
      api/api.js
  2. +6
    -1
      components/config/configPopup.vue
  3. +8
    -1
      components/list/dynamic/daynamicInfo.vue
  4. +6
    -0
      components/list/dynamic/dynamicItem.vue
  5. +96
    -0
      components/list/dynamic/dynamicToShop.vue
  6. +13
    -2
      components/list/gourmet/gourmetItem.vue
  7. +30
    -1
      pages/index/center.vue
  8. +2
    -2
      pages/index/index.vue
  9. +133
    -137
      pages_order/car/addCar.vue
  10. +0
    -74
      pages_order/car/carList - 副本.vue
  11. +13
    -17
      pages_order/components/list/cart/cartItem.vue
  12. +1
    -6
      pages_order/gourmet/gourmetList.vue
  13. +26
    -4
      pages_order/post/addPost.vue
  14. +6
    -0
      pages_order/post/postDetail.vue

+ 7
- 0
api/api.js View File

@ -349,6 +349,13 @@ const config = {
method: 'GET',
auth : true,
},
// 查询我的店铺
myShop : {
url: '/token/myShop',
method: 'GET',
auth : true,
}
}
const models = ['order']


+ 6
- 1
components/config/configPopup.vue View File

@ -2,7 +2,7 @@
<view class="configPopup">
<uv-popup ref="popup" :round="30" :customStyle="{height: '50vh'}">
<view class="content">
<uv-parse :content="content"></uv-parse>
<uv-parse :content="text || content"></uv-parse>
</view>
</uv-popup>
</view>
@ -12,6 +12,11 @@
import { mapState } from 'vuex'
export default {
name: 'configPoup',
props : {
text : {
default : ''
}
},
data() {
return {
content : ''


+ 8
- 1
components/list/dynamic/daynamicInfo.vue View File

@ -28,7 +28,14 @@
if(!this.item.image){
return []
}
return this.item.image.split(',')
let arr = this.item.image.split(',')
if(this.item.wxImage){
arr.unshift(this.item.wxImage)
}
return arr
}
},
data() {


+ 6
- 0
components/list/dynamic/dynamicItem.vue View File

@ -4,6 +4,10 @@
<userHeadItem :item="item" />
<daynamicInfo :item="item" />
<dynamicToShop
:shop="item.shop"
/>
<statisticalDataInfo
:item="item"
@ -15,12 +19,14 @@
<script>
import userHeadItem from '@/components/list/dynamic/userHeadItem.vue'
import daynamicInfo from '@/components/list/dynamic/daynamicInfo.vue'
import dynamicToShop from '@/components/list/dynamic/dynamicToShop.vue'
import statisticalDataInfo from '@/components/list/statisticalDataInfo.vue'
export default {
components: {
userHeadItem,
daynamicInfo,
statisticalDataInfo,
dynamicToShop,
},
props: {
item: {},


+ 96
- 0
components/list/dynamic/dynamicToShop.vue View File

@ -0,0 +1,96 @@
<template>
<view
class="shop"
@click.stop="toShop"
v-if="shop">
<view class="image">
<image :src="shop.logoImage" mode=""></image>
</view>
<view class="shop-box"
>
<view class="title">
{{ shop.title }}
</view>
<view class="desc">
{{ shop.address }}
</view>
</view>
<view class="arrow-right">
进店
<uv-icon
name="arrow-right"
size="40rpx"
color="#5baaff"
></uv-icon>
</view>
</view>
</template>
<script>
export default {
props : {
shop : {
default : null,
}
},
data() {
return {
}
},
methods: {
toShop(){
uni.navigateTo({
url: '/pages_order/gourmet/gourmetDetail?id=' + this.shop.id
})
},
}
}
</script>
<style scoped lang="scss">
.shop{
display: flex;
align-items: center;
background-color: rgba($uni-color, 0.1);
padding: 10rpx 20rpx;
border-radius: 20rpx;
color: $uni-color;
.image{
width: 90rpx;
height: 90rpx;
margin-right: 10rpx;
flex-shrink: 0;
image{
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
.shop-box{
flex: 1;
width: calc(100% - 220rpx);
.title{
font-size: 28rpx;
overflow:hidden; //
text-overflow:ellipsis; //
white-space:nowrap; //
}
.desc{
margin-top: 10rpx;
color: rgba($uni-color, 0.6);
font-size: 24rpx;
overflow:hidden; //
text-overflow:ellipsis; //
white-space:nowrap; //
}
}
.arrow-right{
flex-shrink: 0;
margin-left: auto;
display: flex;
align-items: center;
font-size: 26rpx;
}
}
</style>

pages_order/components/list/gourmet/gourmetItem.vue → components/list/gourmet/gourmetItem.vue View File

@ -25,9 +25,9 @@
<view class="list">
<view class="item-detail"
:key="index"
v-for="(t, index) in item.image">
v-for="(t, index) in images">
<image :src="t"
@click.stop="previewImage(item.image, index)"
@click.stop="previewImage(images, index)"
mode="aspectFill"></image>
<!-- <view class="text-ellipsis">
{{ item.details[index] }}
@ -53,6 +53,17 @@
}
},
computed : {
images(){
if(!this.item.image){
return []
}
let arr = this.item.image.split(',')
return arr
}
},
methods: {
}
}

+ 30
- 1
pages/index/center.vue View File

@ -124,6 +124,7 @@
lineWidth="50rpx"></uv-tabs>
</view>
<!-- 我的帖子 -->
<view v-if="type == 0">
<dynamicItemEdit
:key="index"
@ -135,9 +136,23 @@
/>
</view>
<view class="no-data">
<!-- 我的店铺 -->
<view v-if="type == 3">
<gourmetItem :key="index" v-for="(item, index) in list" :item="item"
@click="$utils.navigateTo('/pages_order/gourmet/gourmetDetail?id=' + item.id)" />
</view>
<view class="no-data"
v-if="!tabs[type].show">
暂未开放
</view>
<uv-empty
v-else-if="list.length == 0"
text="空空如也"
textSize="30rpx"
iconSize="200rpx"
icon="list"></uv-empty>
<tabber select="3" />
</view>
@ -146,6 +161,7 @@
<script>
import tabber from '@/components/base/tabbar.vue'
import dynamicItemEdit from '@/components/list/dynamic/dynamicItemEdit.vue'
import gourmetItem from '@/components/list/gourmet/gourmetItem.vue'
import mixinsList from '@/mixins/list.js'
import mixinsSex from '@/mixins/sex.js'
import { mapState } from 'vuex'
@ -153,6 +169,7 @@
mixins: [mixinsList, mixinsSex],
components: {
tabber,
gourmetItem,
dynamicItemEdit,
},
computed: {
@ -163,6 +180,7 @@
tabs: [
{
name: '帖子',
show : true,
},
{
name: '租房',
@ -172,10 +190,17 @@
},
{
name: '店铺',
show : true,
},
],
vipList : ['vip', 'vipBig'],
mixinsListApi : 'getMyPostPage',
apiList : [
'getMyPostPage',//
'',
'',
'myShop',//
],
auth : ['审核中', '个人认证', '店铺认证'],
type : 0,
}
@ -186,7 +211,11 @@
methods: {
click({index}) {
this.type = index
this.mixinsListApi = this.apiList[index]
this.list = []
this.getData()
},
//
delDynamic(postId){
let self = this
uni.showModal({


+ 2
- 2
pages/index/index.vue View File

@ -176,7 +176,7 @@
menu: [],
mixinsListApi: 'getPostPage',
bannerList: [],
onShowData: false,
// onShowData: false,
}
},
onLoad(query) {
@ -184,7 +184,7 @@
uni.setStorageSync('shareId', query.shareId)
}
this.getData()
// this.getData()
// this.getIndexHeaderInfo()
this.$store.commit('getIndexHeaderInfo')
this.getClassifyList()


+ 133
- 137
pages_order/car/addCar.vue View File

@ -1,108 +1,151 @@
<template>
<view class="page">
<navbar title="发布优质出行" leftClick @leftClick="$utils.navigateBack" />
<navbar title="发布" leftClick @leftClick="$utils.navigateBack" />
<view class="form">
<view class="help-issue">
<text>出行标题</text>
<text style="color: #BD3624;">*</text>
</view>
<view class="form-sheet-cell">
<input type="text"
v-model="form.title"
class="title-input"/>
<view class="label">
师傅头像
</view>
<view class="images box">
<uv-upload
:fileList="imageTitle"
:maxCount="1"
multiple
width="150rpx"
height="150rpx"
name="imageTitle"
@delete="deleteImage"
@afterRead="afterRead"
:previewFullImage="true"></uv-upload>
</view>
</view>
<uv-cell
title="工作地点"
rightIconStyle="fontSize: 30rpx;"
:value="form.address || '请选择招工地点'"
@click="selectAddr"
isLink
></uv-cell>
<uv-cell
title="工龄要求"
rightIconStyle="fontSize: 30rpx;"
:value="form.workYear || '请选择工龄要求'"
@click="openPicker('workYear')"
isLink
></uv-cell>
<view class="form-sheet-cell">
<view class="label">
师傅名称
</view>
<input placeholder="请输入师傅名称" v-model="form.title" />
</view>
<view class="form-sheet-cell">
<view class="label">
招聘公司
起点
</view>
<input placeholder="请输入招聘公司" v-model="form.company" />
<input placeholder="请输入起点" v-model="form.startAddress" />
</view>
<view class="form-sheet-cell">
<view class="label">
薪资范围
终点
</view>
<input placeholder="请输入终点" v-model="form.endAddress" />
</view>
<view class="form-sheet-cell"
@click="$refs.datetimePicker.open()">
<view class="label">
出发时间
</view>
<input placeholder="请输入薪资范围" v-model="form.minPrice" />
<input placeholder="请选择出发时间"
disabled
v-model="form.startTime" />
</view>
<view class="form-sheet-cell">
<view class="label">
标签
车辆座位
</view>
<input placeholder="请输入标签(多个用,号分割)" v-model="form.iconText" />
<!-- <input placeholder="请输入车辆座位" v-model="form.num" /> -->
<uv-number-box v-model="form.num"></uv-number-box>
</view>
<view class="form-sheet-cell">
<view class="label">
联系人
师傅电话
</view>
<input placeholder="请输入联系人" v-model="form.userName" />
<input placeholder="请输入师傅电话" v-model="form.phone" />
</view>
<!-- <view class="form-sheet-cell">
<view class="label">
网约证书
</view>
<view class="images box">
<uv-upload
:fileList="titleDetails"
:maxCount="1"
multiple
width="150rpx"
height="150rpx"
name="titleDetails"
@delete="deleteImage"
@afterRead="afterRead"
:previewFullImage="true"></uv-upload>
</view>
</view> -->
<view class="form-sheet-cell">
<view class="label">
联系电话
车型
</view>
<input placeholder="请输入联系电话" v-model="form.userPhone" />
<input placeholder="请输入车型" v-model="form.catType" />
</view>
<view class="form-sheet-cell">
<view class="label">
车牌号
</view>
<input placeholder="请输入车牌号" v-model="form.catNo" />
</view>
<view class="category">
<view class="title">
选择地区
<view class="form-sheet-cell">
<view class="label">
车辆照片与网约证书
</view>
<view class="tagList">
<view
:class="{act : t.id == form.addId}"
@click="form.addId = t.id"
v-for="(t, i) in cityList"
:key="i">
{{ t.name }}
</view>
<view class="images box">
<uv-upload
:fileList="catImage"
:maxCount="2"
multiple
width="150rpx"
height="150rpx"
name="catImage"
@delete="deleteImage"
@afterRead="afterRead"
:previewFullImage="true"></uv-upload>
</view>
</view>
<view class=""
style="margin-top: 20rpx;">
<view class="content-input">
<uv-textarea
v-model="form.jobDetails"
count
:maxlength="300"
v-model="form.titleDetails"
:maxlength="200"
autoHeight
placeholder="请输入岗位详细介绍"></uv-textarea>
count
style="min-height: 400rpx;"
placeholder="途径地点说明"></uv-textarea>
</view>
<view class="uni-color-btn"
@click="submit">
发布
</view>
</view>
<uv-datetime-picker
ref="datetimePicker"
v-model="dateTime"
mode="datetime"
@confirm="confirmTime">
</uv-datetime-picker>
<uv-picker ref="picker"
:columns="columns"
@confirm="pickerConfirm"></uv-picker>
</view>
</template>
@ -112,108 +155,59 @@
export default {
data() {
return {
imageTitle : [],//
titleDetails : [],//
catImage : [],//
form : {
school : '',
workYear : '',
minPrice : '',
maxPrice : '',
address : '',
addId : '',
company : '',
gsContext : '',
jobContext : '',
},
radiovalue : '',
priceList : [
{
name : '日结',
},
{
name : '月结',
},
],
jopList : [
{
name : '正式工',
},
{
name : '临时工',
},
],
picker : {
workYear : [
'不限',
],
school : [
'不限',
'初中',
'高中',
'专科',
'本科',
'研究生',
'博士',
],
num : 2,
startTime : '',
},
pickerKey : 'workYear',
dateTime : new Date().getTime(),
}
},
onLoad() {
for (var i = 0; i < 30; i++) {
this.picker.workYear.push((i + 1) + '年')
}
this.form.addId = this.cityList[0].id
},
computed : {
columns(){
return [this.picker[this.pickerKey]]
},
...mapState(['cityList', 'category']),
},
methods: {
openPicker(key){
this.pickerKey = key
this.$refs.picker.open()
},
pickerConfirm(e){
this.form[this.pickerKey] = e.value[0]
deleteImage(e){
this[e.name].splice(e.index, 1)
},
//
selectAddr() {
Position.selectAddress(res => {
//
this.form.latitude = res.latitude
this.form.longitude = res.longitude
if (res.name) {
return this.form.address = res.name
}
this.form.address = ''
afterRead(e){
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self[e.name].push({
url
})
})
})
},
//
submit(){
// if(this.fileList.length == 0){
// return uni.showToast({
// title: '',
// icon : 'none'
// })
// }
this.form.imageTitle = this.imageTitle.map(n => n.url).join(',')
this.form.catImage = this.catImage.map(n => n.url).join(',')
if (this.$utils.verificationAll(this.form, {
title: '请输入招工标题',
address : '请选择工作地点',
workYear : '请选择工龄要求',
company : '请输入招聘公司',
minPrice : '请输入薪资范围',
iconText: '请输入标签',
userName: '请输入联系人',
userPhone: '请输入联系电话',
jobDetails: '请输入岗位详细介绍',
imageTitle: '请上传师傅头像',
title : '请输入师傅名称',
startAddress : '请输入起点',
endAddress : '请输入终点',
startTime : '请选择出发时间',
num : '请选择车辆座位',
phone : '请输入师傅电话',
catType : '请输入车型',
catNo : '请输入车牌号',
catImage : '请上传车辆照片与网约证书',
titleDetails : '请输入途径地点说明',
})) {
return
}
this.$api('publishJob', this.form, res => {
this.$api('publishCar', this.form, res => {
if(res.code == 200){
uni.showToast({
title: '发布成功!',
@ -224,7 +218,9 @@
}
})
},
confirmTime(e){
this.form.startTime = this.$dayjs(e.value).format('YYYY-MM-DD HH:mm:ss')
},
}
}
</script>


+ 0
- 74
pages_order/car/carList - 副本.vue View File

@ -1,74 +0,0 @@
<template>
<view class="page pageList">
<navbar title="找车" bgColor="#5baaff" color="#fff" leftClick @leftClick="$utils.navigateBack" />
<view class="top-bg"></view>
<view style="padding: 10rpx 30rpx 0 30rpx;">
<uv-search bgColor="#fff" @search="getData" :showAction="false" searchIconSize="30rpx"
placeholder="请输入搜索关键字..." v-model="queryParams.title"></uv-search>
</view>
<view class="">
<screenRen :isArea="false" @clickItem="clickItem" />
</view>
<!-- <view class="list">
<cartItem :key="index" v-for="(item, index) in list" :item="item"
@click="$utils.navigateTo('/pages_order/car/carListDetail?id=' + item.id)" />
</view> -->
<!-- <view class="heid">
<view class="pepo">
人找车
</view>
<view class="car">
车找人
</view>
</view> -->
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
import screenRen from '../components/screen/screenRen.vue'
import cartItem from '../components/list/cart/cartItem.vue'
export default {
mixins: [mixinsList],
components: {
cartItem,
screenRen,
},
data() {
return {
mixinsListApi: 'getCatPage',
}
},
methods: {
clickItem(result) {
this.queryParams = {
pageNo: 1,
pageSize: 10,
}
result.forEach(n => {
this.queryParams[n.name] = n.value
})
this.getData()
},
}
}
</script>
<style scoped lang="scss">
.page {
.list {
padding: 0 20rpx;
}
}
.top-bg {
position: absolute;
height: 500rpx;
width: 100%;
background: linear-gradient($uni-color, #fff);
}
</style>

+ 13
- 17
pages_order/components/list/cart/cartItem.vue View File

@ -35,25 +35,22 @@
<view class="box">
<view class="chezhaoren">
<uv-icon name="car-fill" color="#2979ff" size="50"></uv-icon>
<!-- 车找人 -->{{item.createBy}}
<!-- 车找人 -->{{item.userId_dictText}}
</view>
<view class="lianxi">
<!-- <uv-icon name="phone-fill" color="#fff" size="40"></uv-icon>
联系 -->
<callPhone
style="margin-left: auto;"
:phone="item.phone"
type="2"
:phoneTitle="item.title"
:pid="item.id"
title="应聘"/>
<callPhone
style="margin-left: auto;"
:phone="item.phone"
type="2"
:phoneTitle="item.title"
:pid="item.id"
title="联系"/>
</view>
</view>
</view>
<view class="address">
@ -61,7 +58,6 @@
<view class="zhi">
{{item.startAddress}}
</view>
</view>
@ -79,7 +75,7 @@
</view>
<view class="pepo">
{{item.num}}
车辆座{{item.num}}
</view>
@ -90,13 +86,11 @@
<view class="Vehicleinformation">
<view class="chexing">
车型suv
车型{{ item.catType }}
</view>
<view class="Licenseplate">
车牌湘A.9999
车牌{{ item.catNo }}
</view>
</view>
@ -164,6 +158,7 @@
image {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
@ -185,6 +180,7 @@
padding: 16rpx;
color: $uni-color;
border-radius: 10rpx;
max-width: 300rpx;
}
.lianxi {


+ 1
- 6
pages_order/gourmet/gourmetList.vue View File

@ -24,7 +24,7 @@
<script>
import mixinsList from '@/mixins/list.js'
import screenSearch from '../components/screen/screenSearch.vue'
import gourmetItem from '../components/list/gourmet/gourmetItem.vue'
import gourmetItem from '@/components/list/gourmet/gourmetItem.vue'
export default {
mixins: [mixinsList],
components: {
@ -37,11 +37,6 @@
}
},
methods: {
getDataThen(list) {
list.forEach(n => {
n.image = n.image ? n.image.split(',') : []
})
},
clickItem(result) {
this.queryParams = {
pageNo: 1,


+ 26
- 4
pages_order/post/addPost.vue View File

@ -69,7 +69,7 @@
<view class="category"
v-if="categoryRole.includes('code')">
<view class="title">
上传二维码
上传微信二维码
</view>
<view class="images box">
@ -123,7 +123,7 @@
<view class="configBtn"
@click="$refs.configPopup.open('getPublishPostNotice')">
@click="$refs.configPopup.open()">
发布须知
</view>
@ -135,6 +135,7 @@
<configPopup
ref="configPopup"
:text="headInfo.save_no && headInfo.save_no.keyDetails"
/>
<pickerHospital
@ -173,7 +174,7 @@
};
},
computed : {
...mapState(['cityList', 'category']),
...mapState(['cityList', 'category', 'headInfo']),
categoryRole(){
if(!this.form.classId){
return []
@ -181,7 +182,8 @@
for(let i = 0;i < this.category.length;i++){
let c = this.category[i]
if(c.id == this.form.classId){
return 'code,phone,address,shop'.split(',')
return c.linkType ? c.linkType.split(',') : []
// return 'code,phone,address,shop'.split(',')
}
}
return []
@ -221,6 +223,16 @@
self.form.classId = res.result.classId || self.form.classId
self.form.latitude = res.result.latitude || self.form.latitude
self.form.longitude = res.result.longitude || self.form.longitude
self.form.shop = res.result.shop || self.form.shop
self.form.shopId = res.result.shopId || self.form.shopId
if(res.result.wxImage){
self.codeFileList = [
{
url : res.result.wxImage
}
]
}
if(res.result.image){
res.result.image.split(',')
@ -263,7 +275,17 @@
return
}
if(this.categoryRole.includes('code') && this.codeFileList.length == 0){
return uni.showToast({
title: '请上传微信二维码',
icon : 'none'
})
}
delete this.form.shop
this.form.image = this.fileList.map((item) => item.url).join(",")
this.form.wxImage = this.codeFileList.map((item) => item.url).join(",")
this.$api('publishPost', this.form, res => {
if(res.code == 200){


+ 6
- 0
pages_order/post/postDetail.vue View File

@ -8,6 +8,10 @@
<daynamicInfo :item="detail"/>
<dynamicToShop
:shop="detail.shop"
/>
<statisticalDataInfo :item="detail"/>
</view>
@ -28,6 +32,7 @@
import userHeadItem from '@/components/list/dynamic/userHeadItem.vue'
import daynamicInfo from '@/components/list/dynamic/daynamicInfo.vue'
import statisticalDataInfo from '@/components/list/statisticalDataInfo.vue'
import dynamicToShop from '@/components/list/dynamic/dynamicToShop.vue'
export default {
mixins: [mixinsSex, mixinsList],
components: {
@ -35,6 +40,7 @@
userHeadItem,
daynamicInfo,
statisticalDataInfo,
dynamicToShop,
},
data() {
return {


Loading…
Cancel
Save