activityEdit.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  1. <template>
  2. <view>
  3. <view v-if="stepOne">
  4. <view class="form">
  5. <view class="form-title">基本信息</view>
  6. <view class="form-item-title">封面图</view>
  7. <view class="upload-pic ddflex" v-if="!pic" @click="uploadImage(1)">
  8. <image src="../static/images/pic.png"></image>
  9. <view style="margin-top: 30rpx;">上传封面图</view>
  10. </view>
  11. <image v-else class="upload-image" :src="pic" @click="uploadImage(1)"></image>
  12. <view class="form-limit">* 图片尺寸限制:680*350</view>
  13. <view class="form-item-title">活动详情轮播图</view>
  14. <view class="ddflex" style="margin-top: 30rpx;">
  15. <view class="upload-photo-image" v-for="item ,index in fileList" @click="uploadImage(2,index+1)">
  16. <image :src="item" mode="aspectFill"></image>
  17. <image class="upload-photo-close" src="/static/pages/images/close3.png"
  18. @click.stop="deleteImage(2,index+1)"></image>
  19. </view>
  20. <view class="upload-photo ddflex" @click="uploadImage(2)" v-if="fileList.length<9">
  21. <image src="../static/images/photo.png"></image>
  22. </view>
  23. </view>
  24. <view class="form-limit">* 图片尺寸限制:670*350</view>
  25. </view>
  26. <view class="form-border"></view>
  27. <view class="form">
  28. <view class="form-item-title">活动标题</view>
  29. <view class="form-input-box">
  30. <input v-model="title" placeholder-class="form-input-placeholder" placeholder="请输入活动标题" />
  31. </view>
  32. <view class="form-item-title">活动说明</view>
  33. <view class="form-input-box">
  34. <input v-model="brief" placeholder-class="form-input-placeholder" placeholder="请填写活动简介说明" />
  35. </view>
  36. <view class="form-item-title">
  37. 活动详情
  38. <view class="more ddflex" @click="jumpUrl('/match/editorContent/editorContent')">
  39. <text v-if="!text">编辑</text>
  40. <text v-else style="color: var(--main);">已完善</text>
  41. <image src="../../static/pages/images/more.png"></image>
  42. </view>
  43. </view>
  44. <view class="form-input-box" style="padding: 18rpx 0;">
  45. </view>
  46. <view class="form-item-title">
  47. 自定义报名信息
  48. <view class="more ddflex" @click="jumpUrl('/match/addForm/addForm')">
  49. <text style="color: #999;" v-if="!extForm">添加(非必填)</text>
  50. <text v-else style="color: var(--main);">已添加</text>
  51. <image src="../../static/pages/images/more.png"></image>
  52. </view>
  53. </view>
  54. <view class="next-btn" @click="next">下一步</view>
  55. </view>
  56. </view>
  57. <!-- 第二步 -->
  58. <view v-if="stepTwo">
  59. <view class="form">
  60. <view class="form-title">报名设置</view>
  61. <view class="form-item-title">最大报名人数</view>
  62. <view class="form-number-select ddflex">
  63. <view @click="jian">-</view>
  64. <input v-model="personLimit" type="number" placeholder="最大报名人数"
  65. placeholder-class="form-input-placeholder" />
  66. <view @click="jia">+</view>
  67. </view>
  68. <view class="form-item-title" style="color: red;font-size: 24rpx;margin-top: 20rpx;" v-if="checkNum==0">
  69. *-1为不限制报名人数
  70. </view>
  71. <view class="form-item-title">报名时间</view>
  72. <view class="ddflex" style="margin-top: 20rpx;">
  73. <picker v-model="enlistStartTime" mode="date" class="flex" @change="enlistStartTimeChange">
  74. <view class="form-date-select" :style="enlistStartTime?'color:#333':''">
  75. {{enlistStartTime?enlistStartTime:'开始日期'}}
  76. </view>
  77. </picker>
  78. <text style="margin: 0 20rpx;">至</text>
  79. <picker v-model="enlistEndTime" mode="date" class="flex" @change="enlistEndTimeChange">
  80. <view class="form-date-select" :style="enlistEndTime?'color:#333':''">
  81. {{enlistEndTime?enlistEndTime:'结束日期'}}
  82. </view>
  83. </picker>
  84. </view>
  85. <view class="form-item-title">活动时间</view>
  86. <view class="ddflex" style="margin-top: 20rpx;">
  87. <picker v-model="startTime" mode="date" class="flex" @change="startTimeChange">
  88. <view class="form-date-select" :style="startTime?'color:#333':''">
  89. {{startTime?startTime:"开始日期"}}
  90. </view>
  91. </picker>
  92. <text style="margin: 0 20rpx;">至</text>
  93. <picker v-model="endTime" mode="date" class="flex" @change="endTimeChange">
  94. <view class="form-date-select" :style="endTime?'color:#333':''">
  95. {{endTime?endTime:"结束日期"}}
  96. </view>
  97. </picker>
  98. </view>
  99. </view>
  100. <view class="form-border"></view>
  101. <view class="form">
  102. <view class="form-title">活动地址</view>
  103. <view class="form-item-title">地址名称</view>
  104. <view class="form-input-box">
  105. <input v-model="house" placeholder-class="form-input-placeholder" placeholder="请输入活动地址简称" />
  106. </view>
  107. <view class="form-item-title">选择城市</view>
  108. <view class="form-input-box">
  109. <!-- <picker class="form-input-placeholder" mode="region" @change="bindRegionChange" :value="region" > -->
  110. <view class="picker" :style="region.length>0?'color: #333;':'color:#cccccc'"
  111. @click="chooseLocation()">
  112. {{region.length > 0 ? region[0]+region[1]+region[2] : '请选择所在城市'}}
  113. </view>
  114. <!-- </picker> -->
  115. <!-- <image src="/card/static/images/area.png" class="loca" @click="chooseLocation()"></image> -->
  116. </view>
  117. <view class="form-item-title">
  118. 详细地址
  119. </view>
  120. <view class="form-input-box">
  121. <input v-model="address" placeholder-class="form-input-placeholder" placeholder="请输入详细地址" />
  122. </view>
  123. <view class="form-item-title ddflex" style="justify-content: space-between;">
  124. 是否全省通用
  125. <switch v-model="isAllSee" :checked="isAllSee" style="transform:scale(0.7)" color="var(--main)"
  126. @change="powerChange"></switch>
  127. </view>
  128. <block v-if="!isAllSee">
  129. <view class="form-input-box" style="border-bottom: none;" @click="showPop()">
  130. 已选择{{checkNum}}个区域
  131. <view class="more ddflex">
  132. <!-- <text v-if="!text">编辑</text>
  133. <text v-else style="color: var(--main);">已完善</text> -->
  134. <image src="../../static/pages/images/more.png"></image>
  135. </view>
  136. </view>
  137. <view class="form-item-title" style="color: red;font-size: 24rpx;margin-top: 0rpx;" v-if="checkNum==0">
  138. *请选择活动生效区域
  139. </view>
  140. <view class="mask" v-if="isShowPop" @click="hidePop"></view>
  141. <view class="popup" v-if="isShowPop">
  142. <view class="popupc ddflex">
  143. <view class="pleft">
  144. <view :class="'li ddflex' + (checkIndex == index ? ' active':'')" style="justify-content: space-between;"
  145. v-for="(item,index) in industryList" :key="index" @click="checkIndustry(index)">
  146. <view class="fflex tover">{{item.label}}</view>
  147. <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>
  148. <image v-else style="width: 25rpx;height: 25rpx;margin-left: 10rpx;" src="/match/static/images/checkBox.png" @click.stop="checkBoxIndustry(index)"></image>
  149. </view>
  150. </view>
  151. <view class="pright">
  152. <view :class="'li ddflex' + (arrayIndex == index ? ' active':'')" style="justify-content: space-between;"
  153. v-for="(item,index) in rightArray" :key="index" @click="checkArray(index)">
  154. <view class="fflex tover">{{item.label}}</view>
  155. <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>
  156. <image v-else style="width: 25rpx;height: 25rpx;margin-left: 10rpx;" src="/match/static/images/checkBox.png" @click.stop="checkBoxArray(index)"></image>
  157. </view>
  158. </view>
  159. </view>
  160. </view>
  161. </block>
  162. <view class="next-btn" @click="submit()">提交</view>
  163. </view>
  164. </view>
  165. </view>
  166. </template>
  167. <script>
  168. import util from "../../utils/util.js";
  169. const app = getApp();
  170. const req = require("../../utils/request.js");
  171. export default {
  172. components: {},
  173. props: {},
  174. data() {
  175. return {
  176. stepOne: true,
  177. stepTwo: false,
  178. pic: '', //封面图
  179. fileList: [], //banner
  180. title: '',
  181. brief: '',
  182. text: '',
  183. personLimit: -1,
  184. enlistStartTime: '',
  185. enlistEndTime: '',
  186. startTime: '',
  187. endTime: '',
  188. house: '',
  189. region: [],
  190. address: '',
  191. regionCode: [],
  192. id: '',
  193. longitude: null,
  194. latitude: null,
  195. isAllSee: true,
  196. isShowPop: false,
  197. checkIndex: 0,
  198. industryList: [],
  199. arrayIndex: -1,
  200. rightArray: [],
  201. companyTreeList:[],
  202. checkNum:0,
  203. extForm:''
  204. }
  205. },
  206. async onLoad(options) {
  207. this.id = options.id
  208. await this.getCompanyTreeList()
  209. if (this.id) {
  210. this.getActivityInfo()
  211. }
  212. },
  213. onShow() {
  214. },
  215. methods: {
  216. jumpUrl(url) {
  217. uni.navigateTo({
  218. url: url
  219. })
  220. },
  221. // 获取公司代码
  222. getCompanyTreeList(){
  223. return new Promise((r,j)=>{
  224. req.getRequest('/api/company/treeList',{},res=>{
  225. this.companyTreeList = res
  226. this.industryList = this.companyTreeList[0]&&this.companyTreeList[0].children?this.companyTreeList[0].children:[]
  227. this.rightArray = this.industryList[0]&&this.industryList[0].children?this.industryList[0].children:[]
  228. r()
  229. })
  230. })
  231. },
  232. checkIndustry(index){
  233. if(this.checkIndex == index) return false;
  234. this.checkIndex = index;
  235. this.rightArray = this.industryList[this.checkIndex].children;
  236. },
  237. checkBoxIndustry(index){
  238. if(this.industryList[index].isActive){
  239. this.industryList[index].isActive = false
  240. this.industryList[index].children.map(item=>{item.isActive = false})
  241. }else{
  242. this.industryList[index].isActive = true
  243. this.industryList[index].children.map(item=>{item.isActive = true})
  244. }
  245. this.industryList = JSON.parse(JSON.stringify(this.industryList))
  246. this.checkIndex = index;
  247. this.rightArray = this.industryList[this.checkIndex].children;
  248. },
  249. checkBoxArray(index){
  250. if(this.industryList[this.checkIndex].children[index].isActive){
  251. this.industryList[this.checkIndex].children[index].isActive = false
  252. }else{
  253. this.industryList[this.checkIndex].children[index].isActive = true
  254. }
  255. console.log(this.industryList[this.checkIndex].children.some(item=>item.isActive == false))
  256. if(this.industryList[this.checkIndex].children.some(item=>item.isActive == true)){
  257. this.industryList[this.checkIndex].isActive = true
  258. }else{
  259. this.industryList[this.checkIndex].isActive = false
  260. }
  261. this.industryList = JSON.parse(JSON.stringify(this.industryList))
  262. this.rightArray = this.industryList[this.checkIndex].children;
  263. },
  264. getCheckNum(){
  265. console.log(this.checkNum)
  266. this.checkNum = 0
  267. if(!this.isAllSee){
  268. this.industryList.map(item=>{
  269. item.children.map(it=>{
  270. if(it.isActive){
  271. this.checkNum++
  272. }
  273. })
  274. })
  275. }
  276. },
  277. getActivityInfo() {
  278. req.getRequest('/api/match/detail', {
  279. id: this.id
  280. }, res => {
  281. this.pic = res.pic
  282. this.fileList = res.imageList.map(item => {
  283. return item.url
  284. })
  285. this.title = res.title
  286. this.brief = res.brief
  287. this.text = res.text
  288. this.personLimit = res.personLimit
  289. this.extForm = res.extForm
  290. this.enlistStartTime = this.formatTime(res.enlistStartTime)
  291. this.enlistEndTime = this.formatTime(res.enlistEndTime)
  292. this.startTime = this.formatTime(res.startTime)
  293. this.endTime = this.formatTime(res.endTime)
  294. this.house = res.house?res.house:''
  295. if(res.province&&res.city&&res.country){
  296. this.regionCode = [res.province, res.city, res.country]
  297. }
  298. this.region = res.areaAdd?res.areaAdd.split(','):[]
  299. this.address = res.address?res.address:''
  300. this.longitude = res.lng ? res.lng : null
  301. this.latitude = res.lat ? res.lat : null
  302. if(res.areaCodeList.length>0){
  303. this.isAllSee = false
  304. let areaCodeList = res.areaCodeList.map(item=>item.areaCode)
  305. this.industryList.map(item=>{
  306. item.children.map(it=>{
  307. if(areaCodeList.indexOf(it.value)>-1){
  308. it.isActive = true
  309. }else{
  310. it.isActive = false
  311. }
  312. })
  313. if(item.children.some(it=>it.isActive == true)){
  314. item.isActive = true
  315. }else{
  316. item.isActive = false
  317. }
  318. })
  319. this.getCheckNum()
  320. }else{
  321. this.isAllSee = true
  322. }
  323. })
  324. },
  325. next() {
  326. if (!this.pic) {
  327. return req.msg('请上传封面图')
  328. }
  329. if (this.fileList.length == 0) {
  330. return req.msg('请上传活动轮播图')
  331. }
  332. if (!this.title) {
  333. return req.msg('请填写活动名称')
  334. }
  335. if (!this.brief) {
  336. return req.msg('请填写活动简介')
  337. }
  338. if (!this.text) {
  339. return req.msg('请填写活动详情')
  340. }
  341. this.stepOne = false
  342. this.stepTwo = true
  343. },
  344. uploadImage(type, index) {
  345. let that = this;
  346. let count = 1
  347. if (type == 1) {
  348. count = 1
  349. } else if (type == 2) {
  350. if (index) {
  351. count = 1
  352. } else {
  353. count = 9 - that.fileList.length
  354. }
  355. }
  356. uni.chooseImage({
  357. count: count,
  358. sizeType: ['original', 'compressed'],
  359. sourceType: ['album', 'camera'],
  360. success: function({
  361. tempFilePaths
  362. }) {
  363. uni.showLoading({
  364. title:'上传中'
  365. })
  366. var promise = Promise.all(
  367. tempFilePaths.map(tempFilePath => {
  368. return new Promise(function(resolve, reject) {
  369. req.uploadFile('/api/nocheck/upload', tempFilePath,
  370. res => {
  371. // type 1 封面图
  372. if (type == 1) {
  373. that.pic = res.src
  374. } else if (type == 2) {
  375. if (index) {
  376. that.fileList[index] = res.src
  377. that.fileList = JSON.parse(JSON
  378. .stringify(that.fileList))
  379. } else {
  380. that.fileList = that.fileList.concat(
  381. res.src)
  382. }
  383. }
  384. resolve()
  385. });
  386. });
  387. })
  388. );
  389. promise
  390. .then(function(results) {
  391. uni.hideLoading()
  392. console.log(results);
  393. })
  394. .catch(function(err) {
  395. uni.hideLoading()
  396. console.log(err);
  397. });
  398. }
  399. });
  400. },
  401. deleteImage(type, index) {
  402. if (type == 2)
  403. this.fileList.splice(index, 1)
  404. },
  405. enlistStartTimeChange(e) {
  406. if (this.enlistEndTime) {
  407. if (this.enlistEndTime < e.detail.value)
  408. return req.msg('报名开始时间不能大于结束时间')
  409. }
  410. this.enlistStartTime = e.detail.value
  411. },
  412. enlistEndTimeChange(e) {
  413. if (this.enlistStartTime) {
  414. if (this.enlistStartTime > e.detail.value)
  415. return req.msg('报名结束时间不能小于开始时间')
  416. }
  417. this.enlistEndTime = e.detail.value
  418. },
  419. startTimeChange(e) {
  420. if (this.endTime) {
  421. if (this.endTime < e.detail.value)
  422. return req.msg('活动开始时间不能大于结束时间')
  423. }
  424. this.startTime = e.detail.value
  425. },
  426. endTimeChange(e) {
  427. if (this.startTime) {
  428. if (this.startTime > e.detail.value)
  429. return req.msg('活动结束时间不能小于开始时间')
  430. }
  431. this.endTime = e.detail.value
  432. },
  433. chooseLocation() {
  434. var tha = this;
  435. uni.chooseLocation({
  436. success: function(res) {
  437. if (res.name) {
  438. tha.address = res.name;
  439. tha.reverseGeocoder(res);
  440. console.log('地址数据》》》:', res);
  441. }
  442. }
  443. });
  444. },
  445. reverseGeocoder(location) {
  446. // #ifdef H5
  447. location = location.latitude + ',' + location.longitude
  448. let url = 'https://apis.map.qq.com/ws/geocoder/v1/?address=';
  449. this.$jsonp(url, {
  450. key: req.public.mapLBSKEY,
  451. location: location,
  452. output: 'jsonp'
  453. }).then(data => {
  454. console.log('解析后的地址地址数据:', data);
  455. data = data.result
  456. this.region = [data.ad_info.province, data.ad_info.city, data.ad_info.district]
  457. this.regionCode = [data.ad_info.adcode.substring(0, 2) + '0000', data.ad_info.adcode.substring(
  458. 0, 4) + '00', data.ad_info.adcode]
  459. this.longitude = data.ad_info.location.lng
  460. this.latitude = data.ad_info.location.lat
  461. }).catch(err => {
  462. console.log(err);
  463. });
  464. // #endif
  465. // #ifndef H5
  466. QQMapWX.initMap();
  467. QQMapWX.reverseGeocoder(location, data => {
  468. console.log('解析后的地址地址数据:', data);
  469. this.region = [data.ad_info.province, data.ad_info.city, data.ad_info.district]
  470. this.regionCode = [data.ad_info.adcode.substring(0, 2) + '0000', data.ad_info.adcode.substring(
  471. 0, 4) + '00', data.ad_info.adcode]
  472. this.longitude = data.ad_info.location.lng
  473. this.latitude = data.ad_info.location.lat
  474. });
  475. //#endif
  476. },
  477. bindRegionChange(event) {
  478. console.log(event)
  479. this.region = event.detail.value
  480. this.regionCode = event.detail.code
  481. },
  482. powerChange(e) {
  483. this.isAllSee = e.detail.value
  484. },
  485. showPop(){
  486. this.isShowPop = true;
  487. },
  488. hidePop(){
  489. this.isShowPop = false;
  490. this.getCheckNum()
  491. },
  492. submit() {
  493. if (!this.pic) {
  494. return req.msg('请上传封面图')
  495. }
  496. if (this.fileList.length == 0) {
  497. return req.msg('请上传活动轮播图')
  498. }
  499. if (!this.title) {
  500. return req.msg('请填写活动名称')
  501. }
  502. if (!this.brief) {
  503. return req.msg('请填写活动简介')
  504. }
  505. if (!this.text) {
  506. return req.msg('请填写活动详情')
  507. }
  508. if (!this.enlistStartTime) {
  509. return req.msg('请选择报名开始时间')
  510. }
  511. if (!this.enlistEndTime) {
  512. return req.msg('请选择报名结束时间')
  513. }
  514. if (!this.startTime) {
  515. return req.msg('请选择活动开始时间')
  516. }
  517. if (!this.endTime) {
  518. return req.msg('请选择活动结束时间')
  519. }
  520. // if (!this.house) {
  521. // return req.msg('请填写活动地址')
  522. // }
  523. // if (this.regionCode.length == 0) {
  524. // return req.msg('请选择活动所在城市')
  525. // }
  526. // if (!this.address) {
  527. // return req.msg('请填写详细地址')
  528. // }
  529. let areaCodeList = []
  530. if(!this.isAllSee){
  531. this.industryList.map(item=>{
  532. item.children.map(it=>{
  533. if(it.isActive){
  534. areaCodeList.push({
  535. areaCode:it.value
  536. })
  537. }
  538. })
  539. })
  540. if(areaCodeList.length==0){
  541. return req.msg('请选择活动生效区域')
  542. }
  543. }else{
  544. areaCodeList.push({
  545. areaCode:this.companyTreeList[0].value
  546. })
  547. }
  548. let dataP = {
  549. pic: this.pic,
  550. fileList: JSON.stringify(this.fileList.map(item => {
  551. return {
  552. url: item
  553. }
  554. })),
  555. title: this.title,
  556. brief: this.brief,
  557. text: this.text,
  558. personLimit: this.personLimit,
  559. enlistStartTime: this.enlistStartTime,
  560. enlistEndTime: this.enlistEndTime,
  561. startTime: this.startTime,
  562. endTime: this.endTime,
  563. house: this.house,
  564. province: this.regionCode[0],
  565. city: this.regionCode[1],
  566. country: this.regionCode[2],
  567. areaAdd: this.region.join(','),
  568. address: this.address,
  569. lng: this.longitude,
  570. lat: this.latitude,
  571. areaCodeList:areaCodeList
  572. }
  573. let prices = [{
  574. title: "VIP",
  575. marketMoney: 0,
  576. money: 0,
  577. vipMoney: 0,
  578. vipModels: [],
  579. personCount: 1,
  580. isDefault: 0
  581. }]
  582. dataP.prices = prices
  583. dataP.extForm = this.extForm?this.extForm:null
  584. let url = '/api/match/save'
  585. if (this.id) {
  586. dataP.id = this.id
  587. url = '/api/match/update'
  588. uni.showModal({
  589. title: '提示',
  590. content: '修改活动将重新审核,确定修改?',
  591. success: (res) => {
  592. if (res.confirm) {
  593. req.postRequest(url, dataP, res => {
  594. req.msg('创建成功')
  595. let pages = getCurrentPages();
  596. var prevPage = pages[pages.length - 2];
  597. if (prevPage) {
  598. prevPage.$vm.isLoad = true
  599. prevPage.$vm.form.page = 1
  600. prevPage.$vm.getPageList()
  601. }
  602. setTimeout(() => {
  603. uni.navigateBack()
  604. }, 1000)
  605. })
  606. }
  607. }
  608. })
  609. } else {
  610. req.postRequest(url, dataP, res => {
  611. req.msg('创建成功')
  612. let pages = getCurrentPages();
  613. var prevPage = pages[pages.length - 2];
  614. if (prevPage) {
  615. prevPage.$vm.isLoad = true
  616. prevPage.$vm.form.page = 1
  617. prevPage.$vm.getPageList()
  618. }
  619. setTimeout(() => {
  620. uni.navigateBack()
  621. }, 1000)
  622. })
  623. }
  624. },
  625. formatTime(date) {
  626. date = new Date(date.replace(/-/g, '/'))
  627. return util.formatTime(date).t3
  628. },
  629. jian(){
  630. if(this.personLimit>0) this.personLimit = this.personLimit-1
  631. if(this.personLimit==0) this.personLimit = -1
  632. },
  633. jia(){
  634. if(this.personLimit==-1) this.personLimit = 1
  635. else this.personLimit = this.personLimit+1
  636. }
  637. },
  638. mounted() {
  639. }
  640. }
  641. </script>
  642. <style>
  643. @import "./activityEdit.css";
  644. </style>