|
@@ -10,18 +10,20 @@
|
|
|
</view>
|
|
</view>
|
|
|
<image v-else class="upload-image" :src="pic" @click="uploadImage(1)"></image>
|
|
<image v-else class="upload-image" :src="pic" @click="uploadImage(1)"></image>
|
|
|
<view class="form-limit">* 图片尺寸限制:680*350</view>
|
|
<view class="form-limit">* 图片尺寸限制:680*350</view>
|
|
|
- <view class="form-item-title">活动详情轮播图</view>
|
|
|
|
|
- <view class="ddflex" style="margin-top: 30rpx;">
|
|
|
|
|
- <view class="upload-photo-image" v-for="item ,index in fileList" @click="uploadImage(2,index+1)">
|
|
|
|
|
- <image :src="item" mode="aspectFill"></image>
|
|
|
|
|
- <image class="upload-photo-close" src="/static/pages/images/close3.png"
|
|
|
|
|
- @click.stop="deleteImage(2,index+1)"></image>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="upload-photo ddflex" @click="uploadImage(2)" v-if="fileList.length<9">
|
|
|
|
|
- <image src="../static/images/photo.png"></image>
|
|
|
|
|
|
|
+ <block v-if="type==1">
|
|
|
|
|
+ <view class="form-item-title">活动详情轮播图</view>
|
|
|
|
|
+ <view class="ddflex" style="margin-top: 30rpx;">
|
|
|
|
|
+ <view class="upload-photo-image" v-for="item ,index in fileList" @click="uploadImage(2,index+1)">
|
|
|
|
|
+ <image :src="item" mode="aspectFill"></image>
|
|
|
|
|
+ <image class="upload-photo-close" src="/static/pages/images/close3.png"
|
|
|
|
|
+ @click.stop="deleteImage(2,index+1)"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="upload-photo ddflex" @click="uploadImage(2)" v-if="fileList.length<9">
|
|
|
|
|
+ <image src="../static/images/photo.png"></image>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
- <view class="form-limit">* 图片尺寸限制:670*350</view>
|
|
|
|
|
|
|
+ <view class="form-limit">* 图片尺寸限制:670*350</view>
|
|
|
|
|
+ </block>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="form-border"></view>
|
|
<view class="form-border"></view>
|
|
|
<view class="form">
|
|
<view class="form">
|
|
@@ -29,29 +31,103 @@
|
|
|
<view class="form-input-box">
|
|
<view class="form-input-box">
|
|
|
<input v-model="title" placeholder-class="form-input-placeholder" placeholder="请输入活动标题" />
|
|
<input v-model="title" placeholder-class="form-input-placeholder" placeholder="请输入活动标题" />
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="form-item-title">活动说明</view>
|
|
|
|
|
- <view class="form-input-box">
|
|
|
|
|
- <input v-model="brief" placeholder-class="form-input-placeholder" placeholder="请填写活动简介说明" />
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="form-item-title">
|
|
|
|
|
- 活动详情
|
|
|
|
|
- <view class="more ddflex" @click="jumpUrl('/match/editorContent/editorContent')">
|
|
|
|
|
- <text v-if="!text">编辑</text>
|
|
|
|
|
- <text v-else style="color: var(--main);">已完善</text>
|
|
|
|
|
- <image src="../../static/pages/images/more.png"></image>
|
|
|
|
|
|
|
+ <view class="form-item-title">活动类型</view>
|
|
|
|
|
+ <view class="form-input-box ddflex">
|
|
|
|
|
+ <view class="ddflex" @click="changeType(1)">
|
|
|
|
|
+ <image v-if="type!=1" style="width: 28rpx;height: 28rpx;margin-right: 10rpx;" src="/static/images/select.png"></image>
|
|
|
|
|
+ <image v-else style="width: 28rpx;height: 28rpx;margin-right: 10rpx;" src="/static/images/select_h.png"></image>
|
|
|
|
|
+ <view>普通活动</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
- <view class="form-input-box" style="padding: 18rpx 0;">
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="form-item-title">
|
|
|
|
|
- 自定义报名信息
|
|
|
|
|
- <view class="more ddflex" @click="jumpUrl('/match/addForm/addForm')">
|
|
|
|
|
- <text style="color: #999;" v-if="!extForm">添加(非必填)</text>
|
|
|
|
|
- <text v-else style="color: var(--main);">已添加</text>
|
|
|
|
|
- <image src="../../static/pages/images/more.png"></image>
|
|
|
|
|
|
|
+ <view class="ddflex" style="margin-left:30rpx" @click="changeType(2)">
|
|
|
|
|
+ <image v-if="type!=2" style="width: 28rpx;height: 28rpx;margin-right: 10rpx;" src="/static/images/select.png"></image>
|
|
|
|
|
+ <image v-else style="width: 28rpx;height: 28rpx;margin-right: 10rpx;" src="/static/images/select_h.png"></image>
|
|
|
|
|
+ <view>外链活动</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="next-btn" @click="next">下一步</view>
|
|
|
|
|
|
|
+ <block v-if="type==2">
|
|
|
|
|
+ <view class="form-item-title">活动链接</view>
|
|
|
|
|
+ <view class="form-input-box">
|
|
|
|
|
+ <input v-model="link" placeholder-class="form-input-placeholder" placeholder="请填写活动链接" />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </block>
|
|
|
|
|
+ <block v-if="type==1">
|
|
|
|
|
+ <view class="form-item-title">活动说明</view>
|
|
|
|
|
+ <view class="form-input-box">
|
|
|
|
|
+ <input v-model="brief" placeholder-class="form-input-placeholder" placeholder="请填写活动简介说明" />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="form-item-title">
|
|
|
|
|
+ 活动详情
|
|
|
|
|
+ <view class="more ddflex" @click="jumpUrl('/match/editorContent/editorContent')">
|
|
|
|
|
+ <text v-if="!text">编辑</text>
|
|
|
|
|
+ <text v-else style="color: var(--main);">已完善</text>
|
|
|
|
|
+ <image src="../../static/pages/images/more.png"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="form-input-box" style="padding: 18rpx 0;">
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="form-item-title">
|
|
|
|
|
+ 自定义报名信息
|
|
|
|
|
+ <view class="more ddflex" @click="jumpUrl('/match/addForm/addForm')">
|
|
|
|
|
+ <text style="color: #999;" v-if="!extForm">添加(非必填)</text>
|
|
|
|
|
+ <text v-else style="color: var(--main);">已添加</text>
|
|
|
|
|
+ <image src="../../static/pages/images/more.png"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="form-input-box" style="padding: 18rpx 0;">
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="form-item-title">
|
|
|
|
|
+ 活动分类
|
|
|
|
|
+ <view class="more ddflex" @click="jumpUrl('/match/sort/sort')">
|
|
|
|
|
+ <text style="color: #999;" v-if="!matchType">添加(非必填)</text>
|
|
|
|
|
+ <text v-else style="color: var(--main);">已添加</text>
|
|
|
|
|
+ <image src="../../static/pages/images/more.png"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </block>
|
|
|
|
|
+ <block v-if="type==2">
|
|
|
|
|
+ <view class="form-item-title ddflex" style="justify-content: space-between;">
|
|
|
|
|
+ 是否全省通用
|
|
|
|
|
+ <switch v-model="isAllSee" :checked="isAllSee" style="transform:scale(0.7)" color="var(--main)"
|
|
|
|
|
+ @change="powerChange"></switch>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <block v-if="!isAllSee">
|
|
|
|
|
+ <view class="form-input-box" style="border-bottom: none;" @click="showPop()">
|
|
|
|
|
+ 已选择{{checkNum}}个区域
|
|
|
|
|
+ <view class="more ddflex">
|
|
|
|
|
+ <!-- <text v-if="!text">编辑</text>
|
|
|
|
|
+ <text v-else style="color: var(--main);">已完善</text> -->
|
|
|
|
|
+ <image src="../../static/pages/images/more.png"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="form-item-title" style="color: red;font-size: 24rpx;margin-top: 0rpx;" v-if="checkNum==0">
|
|
|
|
|
+ *请选择活动生效区域
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="mask" v-if="isShowPop" @click="hidePop"></view>
|
|
|
|
|
+ <view class="popup" v-if="isShowPop">
|
|
|
|
|
+ <view class="popupc ddflex">
|
|
|
|
|
+ <view class="pleft">
|
|
|
|
|
+ <view :class="'li ddflex' + (checkIndex == index ? ' active':'')" style="justify-content: space-between;"
|
|
|
|
|
+ v-for="(item,index) in industryList" :key="index" @click="checkIndustry(index)">
|
|
|
|
|
+ <view class="fflex tover">{{item.label}}</view>
|
|
|
|
|
+ <image v-if="item.isActive" style="width: 25rpx;height: 25rpx;margin-left: 10rpx;" src="/match/static/images/checkBox_h.png" @click.stop="checkBoxIndustry(index)"></image>
|
|
|
|
|
+ <image v-else style="width: 25rpx;height: 25rpx;margin-left: 10rpx;" src="/match/static/images/checkBox.png" @click.stop="checkBoxIndustry(index)"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="pright">
|
|
|
|
|
+ <view :class="'li ddflex' + (arrayIndex == index ? ' active':'')" style="justify-content: space-between;"
|
|
|
|
|
+ v-for="(item,index) in rightArray" :key="index" @click="checkArray(index)">
|
|
|
|
|
+ <view class="fflex tover">{{item.label}}</view>
|
|
|
|
|
+ <image v-if="item.isActive" style="width: 25rpx;height: 25rpx;margin-left: 10rpx;" src="/match/static/images/checkBox_h.png" @click.stop="checkBoxArray(index)"></image>
|
|
|
|
|
+ <image v-else style="width: 25rpx;height: 25rpx;margin-left: 10rpx;" src="/match/static/images/checkBox.png" @click.stop="checkBoxArray(index)"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </block>
|
|
|
|
|
+ </block>
|
|
|
|
|
+ <view class="next-btn" v-if="type==1" @click="next">下一步</view>
|
|
|
|
|
+ <view class="next-btn" v-if="type==2" @click="submit()">提交</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -59,7 +135,7 @@
|
|
|
<view v-if="stepTwo">
|
|
<view v-if="stepTwo">
|
|
|
<view class="form">
|
|
<view class="form">
|
|
|
<view class="form-title">报名设置</view>
|
|
<view class="form-title">报名设置</view>
|
|
|
- <view class="form-item-title">最大报名人数</view>
|
|
|
|
|
|
|
+ <view class="form-item-title">活动最大报名人数</view>
|
|
|
<view class="form-number-select ddflex">
|
|
<view class="form-number-select ddflex">
|
|
|
<view @click="jian">-</view>
|
|
<view @click="jian">-</view>
|
|
|
<input v-model="personLimit" type="number" placeholder="最大报名人数"
|
|
<input v-model="personLimit" type="number" placeholder="最大报名人数"
|
|
@@ -69,6 +145,16 @@
|
|
|
<view class="form-item-title" style="color: red;font-size: 24rpx;margin-top: 20rpx;" v-if="checkNum==0">
|
|
<view class="form-item-title" style="color: red;font-size: 24rpx;margin-top: 20rpx;" v-if="checkNum==0">
|
|
|
*-1为不限制报名人数
|
|
*-1为不限制报名人数
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="form-item-title">单次最大报名人数</view>
|
|
|
|
|
+ <view class="form-number-select ddflex">
|
|
|
|
|
+ <view @click="jianEnlistPerson">-</view>
|
|
|
|
|
+ <input v-model="enlistPersonLimit" type="number" placeholder="单次最大报名人数"
|
|
|
|
|
+ placeholder-class="form-input-placeholder" />
|
|
|
|
|
+ <view @click="jiaEnlistPerson">+</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="form-item-title" style="color: red;font-size: 24rpx;margin-top: 20rpx;" v-if="checkNum==0">
|
|
|
|
|
+ *-1为不限制单次最大报名人数
|
|
|
|
|
+ </view>
|
|
|
<view class="form-item-title">报名时间</view>
|
|
<view class="form-item-title">报名时间</view>
|
|
|
<view class="ddflex" style="margin-top: 20rpx;">
|
|
<view class="ddflex" style="margin-top: 20rpx;">
|
|
|
<picker v-model="enlistStartTime" mode="date" class="flex" @change="enlistStartTimeChange">
|
|
<picker v-model="enlistStartTime" mode="date" class="flex" @change="enlistStartTimeChange">
|
|
@@ -185,7 +271,11 @@
|
|
|
title: '',
|
|
title: '',
|
|
|
brief: '',
|
|
brief: '',
|
|
|
text: '',
|
|
text: '',
|
|
|
|
|
+ type:1,//1普通活动 2外链活动
|
|
|
|
|
+ link:'',
|
|
|
|
|
+ matchType:'',//活动分类
|
|
|
personLimit: -1,
|
|
personLimit: -1,
|
|
|
|
|
+ enlistPersonLimit:-1,
|
|
|
enlistStartTime: '',
|
|
enlistStartTime: '',
|
|
|
enlistEndTime: '',
|
|
enlistEndTime: '',
|
|
|
startTime: '',
|
|
startTime: '',
|
|
@@ -295,12 +385,20 @@
|
|
|
this.title = res.title
|
|
this.title = res.title
|
|
|
this.brief = res.brief
|
|
this.brief = res.brief
|
|
|
this.text = res.text
|
|
this.text = res.text
|
|
|
|
|
+ this.type = res.type?res.type:1
|
|
|
|
|
+ if(this.type==2){
|
|
|
|
|
+ this.link = res.text
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.link = ''
|
|
|
|
|
+ }
|
|
|
|
|
+ this.matchType = res.matchType?res.matchType:''
|
|
|
this.personLimit = res.personLimit
|
|
this.personLimit = res.personLimit
|
|
|
|
|
+ this.enlistPersonLimit = res.enlistPersonLimit&&res.enlistPersonLimit>0?res.enlistPersonLimit:-1
|
|
|
this.extForm = res.extForm
|
|
this.extForm = res.extForm
|
|
|
- this.enlistStartTime = this.formatTime(res.enlistStartTime)
|
|
|
|
|
- this.enlistEndTime = this.formatTime(res.enlistEndTime)
|
|
|
|
|
- this.startTime = this.formatTime(res.startTime)
|
|
|
|
|
- this.endTime = this.formatTime(res.endTime)
|
|
|
|
|
|
|
+ this.enlistStartTime = res.enlistStartTime?this.formatTime(res.enlistStartTime):''
|
|
|
|
|
+ this.enlistEndTime = res.enlistEndTime?this.formatTime(res.enlistEndTime):''
|
|
|
|
|
+ this.startTime = res.startTime?this.formatTime(res.startTime):''
|
|
|
|
|
+ this.endTime = res.endTime?this.formatTime(res.endTime):''
|
|
|
this.house = res.house?res.house:''
|
|
this.house = res.house?res.house:''
|
|
|
if(res.province&&res.city&&res.country){
|
|
if(res.province&&res.city&&res.country){
|
|
|
this.regionCode = [res.province, res.city, res.country]
|
|
this.regionCode = [res.province, res.city, res.country]
|
|
@@ -336,16 +434,16 @@
|
|
|
if (!this.pic) {
|
|
if (!this.pic) {
|
|
|
return req.msg('请上传封面图')
|
|
return req.msg('请上传封面图')
|
|
|
}
|
|
}
|
|
|
- if (this.fileList.length == 0) {
|
|
|
|
|
|
|
+ if (this.type==1 && this.fileList.length == 0) {
|
|
|
return req.msg('请上传活动轮播图')
|
|
return req.msg('请上传活动轮播图')
|
|
|
}
|
|
}
|
|
|
if (!this.title) {
|
|
if (!this.title) {
|
|
|
return req.msg('请填写活动名称')
|
|
return req.msg('请填写活动名称')
|
|
|
}
|
|
}
|
|
|
- if (!this.brief) {
|
|
|
|
|
|
|
+ if (this.type==1 && !this.brief) {
|
|
|
return req.msg('请填写活动简介')
|
|
return req.msg('请填写活动简介')
|
|
|
}
|
|
}
|
|
|
- if (!this.text) {
|
|
|
|
|
|
|
+ if (this.type==1 && !this.text) {
|
|
|
return req.msg('请填写活动详情')
|
|
return req.msg('请填写活动详情')
|
|
|
}
|
|
}
|
|
|
this.stepOne = false
|
|
this.stepOne = false
|
|
@@ -504,28 +602,31 @@
|
|
|
if (!this.pic) {
|
|
if (!this.pic) {
|
|
|
return req.msg('请上传封面图')
|
|
return req.msg('请上传封面图')
|
|
|
}
|
|
}
|
|
|
- if (this.fileList.length == 0) {
|
|
|
|
|
|
|
+ if (this.type==1 && this.fileList.length == 0) {
|
|
|
return req.msg('请上传活动轮播图')
|
|
return req.msg('请上传活动轮播图')
|
|
|
}
|
|
}
|
|
|
if (!this.title) {
|
|
if (!this.title) {
|
|
|
return req.msg('请填写活动名称')
|
|
return req.msg('请填写活动名称')
|
|
|
}
|
|
}
|
|
|
- if (!this.brief) {
|
|
|
|
|
|
|
+ if (this.type==2 && !this.link) {
|
|
|
|
|
+ return req.msg('请填写活动链接')
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.type==1 && !this.brief) {
|
|
|
return req.msg('请填写活动简介')
|
|
return req.msg('请填写活动简介')
|
|
|
}
|
|
}
|
|
|
- if (!this.text) {
|
|
|
|
|
|
|
+ if (this.type==1 && !this.text) {
|
|
|
return req.msg('请填写活动详情')
|
|
return req.msg('请填写活动详情')
|
|
|
}
|
|
}
|
|
|
- if (!this.enlistStartTime) {
|
|
|
|
|
|
|
+ if (this.type==1 && !this.enlistStartTime) {
|
|
|
return req.msg('请选择报名开始时间')
|
|
return req.msg('请选择报名开始时间')
|
|
|
}
|
|
}
|
|
|
- if (!this.enlistEndTime) {
|
|
|
|
|
|
|
+ if (this.type==1 && !this.enlistEndTime) {
|
|
|
return req.msg('请选择报名结束时间')
|
|
return req.msg('请选择报名结束时间')
|
|
|
}
|
|
}
|
|
|
- if (!this.startTime) {
|
|
|
|
|
|
|
+ if (this.type==1 && !this.startTime) {
|
|
|
return req.msg('请选择活动开始时间')
|
|
return req.msg('请选择活动开始时间')
|
|
|
}
|
|
}
|
|
|
- if (!this.endTime) {
|
|
|
|
|
|
|
+ if (this.type==1 && !this.endTime) {
|
|
|
return req.msg('请选择活动结束时间')
|
|
return req.msg('请选择活动结束时间')
|
|
|
}
|
|
}
|
|
|
// if (!this.house) {
|
|
// if (!this.house) {
|
|
@@ -569,6 +670,7 @@
|
|
|
brief: this.brief,
|
|
brief: this.brief,
|
|
|
text: this.text,
|
|
text: this.text,
|
|
|
personLimit: this.personLimit,
|
|
personLimit: this.personLimit,
|
|
|
|
|
+ enlistPersonLimit:this.enlistPersonLimit,
|
|
|
enlistStartTime: this.enlistStartTime,
|
|
enlistStartTime: this.enlistStartTime,
|
|
|
enlistEndTime: this.enlistEndTime,
|
|
enlistEndTime: this.enlistEndTime,
|
|
|
startTime: this.startTime,
|
|
startTime: this.startTime,
|
|
@@ -581,7 +683,9 @@
|
|
|
address: this.address,
|
|
address: this.address,
|
|
|
lng: this.longitude,
|
|
lng: this.longitude,
|
|
|
lat: this.latitude,
|
|
lat: this.latitude,
|
|
|
- areaCodeList:areaCodeList
|
|
|
|
|
|
|
+ areaCodeList:areaCodeList,
|
|
|
|
|
+ type:this.type,
|
|
|
|
|
+ matchType:this.matchType
|
|
|
}
|
|
}
|
|
|
let prices = [{
|
|
let prices = [{
|
|
|
title: "VIP",
|
|
title: "VIP",
|
|
@@ -594,6 +698,11 @@
|
|
|
}]
|
|
}]
|
|
|
dataP.prices = prices
|
|
dataP.prices = prices
|
|
|
dataP.extForm = this.extForm?this.extForm:null
|
|
dataP.extForm = this.extForm?this.extForm:null
|
|
|
|
|
+
|
|
|
|
|
+ if(dataP.type==2){
|
|
|
|
|
+ dataP.text = this.link
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
let url = '/api/match/save'
|
|
let url = '/api/match/save'
|
|
|
if (this.id) {
|
|
if (this.id) {
|
|
|
dataP.id = this.id
|
|
dataP.id = this.id
|
|
@@ -647,6 +756,17 @@
|
|
|
jia(){
|
|
jia(){
|
|
|
if(this.personLimit==-1) this.personLimit = 1
|
|
if(this.personLimit==-1) this.personLimit = 1
|
|
|
else this.personLimit = this.personLimit+1
|
|
else this.personLimit = this.personLimit+1
|
|
|
|
|
+ },
|
|
|
|
|
+ jianEnlistPerson(){
|
|
|
|
|
+ if(this.enlistPersonLimit>0) this.enlistPersonLimit = this.enlistPersonLimit-1
|
|
|
|
|
+ if(this.enlistPersonLimit==0) this.enlistPersonLimit = -1
|
|
|
|
|
+ },
|
|
|
|
|
+ jiaEnlistPerson(){
|
|
|
|
|
+ if(this.enlistPersonLimit==-1) this.enlistPersonLimit = 1
|
|
|
|
|
+ else this.enlistPersonLimit = this.enlistPersonLimit+1
|
|
|
|
|
+ },
|
|
|
|
|
+ changeType(val){
|
|
|
|
|
+ this.type = val
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|