diff --git a/admin-web-master/src/utils/request.js b/admin-web-master/src/utils/request.js index 5894530..0391e48 100644 --- a/admin-web-master/src/utils/request.js +++ b/admin-web-master/src/utils/request.js @@ -15,8 +15,15 @@ let hostall = window.location.href; // const baseURL = 'http://192.168.2.38:9003'; let baseURL = '' if(host === 'localhost:8080' || host === 'localhost:8081' || host === 'localhost:9528'|| host === '192.168.31.45:9528'|| host === 'localhost:9529' ) { +<<<<<<< HEAD + // baseURL = process.env.VUE_APP_DOMAIN_PREFIX_1; + // baseURL = 'http://192.168.2.225:9003'; + baseURL = 'http://172.16.61.125:9003'; + // baseURL = 'http://192.168.2.36:9003'; +======= baseURL = process.env.VUE_APP_DOMAIN_PREFIX_1; // baseURL = 'http://192.168.2.225:9003'; +>>>>>>> 6ab1cdc6a7eebe6d21d1f3bf2da0133245334a38 } else { console.error('---------------------') console.error(hostall) diff --git a/admin-web-master/src/utils/request2.js b/admin-web-master/src/utils/request2.js index 8cf5245..2af102a 100644 --- a/admin-web-master/src/utils/request2.js +++ b/admin-web-master/src/utils/request2.js @@ -15,6 +15,12 @@ let hostall = window.location.href; // const baseURL = 'http://192.168.2.38:9003'; let baseURL = '' // || host === 'localhost:9528' +<<<<<<< HEAD +if(host === 'localhost:8080' || host === 'localhost:8081'|| host === 'localhost:9528' || host === '192.168.31.45:9528'|| host === 'localhost:9529' ) { + // baseURL = 'https://zhld.028wlkj.com:49008/cdwlMall/business-server'; + baseURL = 'http://172.16.61.125:9004'; + // baseURL = 'http://192.168.2.225:9004'; +======= // if(host === 'localhost:8080' || host === 'localhost:8081'|| host === 'localhost:9528' || host === '192.168.31.45:9528'|| host === 'localhost:9529' ) { // // baseURL = 'https://zhld.028wlkj.com:49008/cdwlMall/business-server'; // baseURL = 'http://192.168.2.36:9003'; @@ -28,6 +34,7 @@ let baseURL = '' if(host === 'localhost:8080' || host === 'localhost:8081' || host === 'localhost:9528'|| host === '192.168.31.45:9528'|| host === 'localhost:9529' ) { baseURL = process.env.VUE_APP_DOMAIN_PREFIX_1; // baseURL = 'http://192.168.2.225:9003'; +>>>>>>> 6ab1cdc6a7eebe6d21d1f3bf2da0133245334a38 } else { console.error('---------------------') console.error(hostall) diff --git a/lvdao-miniapp/main.js b/lvdao-miniapp/main.js index b0a5f89..7ee2145 100644 --- a/lvdao-miniapp/main.js +++ b/lvdao-miniapp/main.js @@ -14,8 +14,9 @@ Vue.prototype.$imgUrl = (url) => { } // Vue.prototype.$upload = "https://zhld.028wlkj.com:49008/cdwlMall/admin-server/miniio/upload" // Vue.prototype.$img = "https://zhld.028wlkj.com:49008/cdwlMall" -// Vue.prototype.$upload = 'http://172.16.61.125/miniio/upload' -Vue.prototype.$upload = 'http://192.168.2.225:9003/miniio/upload' +Vue.prototype.$upload = 'http://172.16.61.125:9003/miniio/upload' +// Vue.prototype.$upload = 'http://172.16.61.125:9003/miniio/uploadQuestion' +// Vue.prototype.$upload = 'http://192.168.2.225:9003/miniio/upload' Vue.prototype.$img = 'http://172.16.61.125/cdwlMall' // Vue.prototype.$upload = "https://jy.scjysm.asia:18086/admin-server/file/upload" diff --git a/lvdao-miniapp/pages/advertisementAdd/advertisementAdd.vue b/lvdao-miniapp/pages/advertisementAdd/advertisementAdd.vue index c8adcd9..32727f1 100644 --- a/lvdao-miniapp/pages/advertisementAdd/advertisementAdd.vue +++ b/lvdao-miniapp/pages/advertisementAdd/advertisementAdd.vue @@ -6,7 +6,7 @@ - + @@ -291,24 +291,11 @@ ziyuanId: '', ziyuanType:'', selected: [ - { - date: '2025-01-08', - info: '¥850', - infoColor: '#3f9b6a', - disable: true // 禁用 - }, - { - date: '2025-01-11', - info: '¥950', - infoColor: '#3f9b6a', - }, - { - date: '2025-01-14', - info: '¥900', - infoColor: '#6ac695', - }, ], - establishow:false + establishow:false, + today:['',''], + startDate:'', + endDate:'' } }, @@ -321,35 +308,21 @@ }, onShow() { - let shopId = { - shopId: uni.getStorageSync('shopId') || '' - } - const isLogin = uni.getStorageSync('token'); - if (isLogin == '') { - // 如果未登录,跳转到登录页面 - uni.navigateTo({ - url: '/pages/login/login' - }) - } else { - let page = { - condition: 2 + this.calculateDates() + let pageHe={ + pageNumber: 0, + pageSize: 10, + shopNumber:`gg${this.ziyuanId}`, + dataStatus:1 + } + this.$http.sendRequest('/cereContractInformation/getPage', 'POST', pageHe,1).then(res => { + if(res.data.data.content.length !=0){ + res.data.data.content.map(item=>{ + this.generateDateRange([item.contractTerminationDate,item.leaseStartDate]) + }) + } - this.$http.sendRequest('/shop/getById', 'POST', shopId).then(res => { - if (res.data.code != "20004") { - this.shopMsg = res.data.data - this.Islogin = false - this.$http.sendRequest('/index/index', 'POST', page).then(res => { - //成功回调 - this.tongji = res.data.data - }) - } else { - uni.navigateTo({ - url: '/pages/login/login' - }) - } - }) - } - + }) }, methods: { generateDateRange(datas) { @@ -365,13 +338,14 @@ const month = String(currentDate.getMonth() + 1).padStart(1, '0'); const day = String(currentDate.getDate()).padStart(1, '0'); const dateString = `${year}-${month}-${day}`; - result.push({ + this.selected.push({ date: dateString, - info: '¥850', + info: '已租', disable: true }); currentDate.setDate(currentDate.getDate() + 1); } + console.log( this.selected) return result; }, calendarChange(e){ @@ -390,6 +364,22 @@ establiChange(val){ this.model1.establishmentDate = this.timeChange(val) }, + calculateDates() { + const today = new Date(); + const year = today.getFullYear(); + const month = today.getMonth(); + this.startDate = this.formatDate(today); + + // 获取后一个月的最后一天 + const nextMonthLastDay = new Date(year, month + 2, 0); + this.endDate = this.formatDate(nextMonthLastDay); + }, + formatDate(date) { + const year = date.getFullYear(); + const month = ('0' + (date.getMonth() + 1)).slice(-2); // 月份是从0开始的 + const day = ('0' + date.getDate()).slice(-2); + return `${year}-${month}-${day}`; + }, formatter(day) { const d = new Date() let month = d.getMonth() + 1 diff --git a/lvdao-miniapp/pages/leaseAdd/leaseAdd.vue b/lvdao-miniapp/pages/leaseAdd/leaseAdd.vue index 5fce04e..d7b7b1b 100644 --- a/lvdao-miniapp/pages/leaseAdd/leaseAdd.vue +++ b/lvdao-miniapp/pages/leaseAdd/leaseAdd.vue @@ -6,7 +6,7 @@ - + @@ -290,26 +290,12 @@ zhengce: '', shuoming: '', zujin: '', - selected: [ - { - date: '2025-01-08', - info: '¥850', - infoColor: '#3f9b6a', - disable: true // 禁用 - }, - { - date: '2025-01-11', - info: '¥950', - infoColor: '#3f9b6a', - }, - { - date: '2025-01-14', - info: '¥900', - infoColor: '#6ac695', - }, - ], + selected: [], map:0, - establishow:false + establishow:false, + today:['',''], + startDate:'', + endDate:'' }; }, onLoad(option) { @@ -339,37 +325,25 @@ console.log(err) //请求失败 }) + }, onShow() { - let shopId = { - shopId: uni.getStorageSync('shopId') || '' - } - const isLogin = uni.getStorageSync('token'); - if (isLogin == '') { - // 如果未登录,跳转到登录页面 - uni.navigateTo({ - url: '/pages/login/login' - }) - } else { - let page = { - condition: 2 - } - this.$http.sendRequest('/shop/getById', 'POST', shopId).then(res => { - if (res.data.code != "20004") { - this.shopMsg = res.data.data - this.Islogin = false - this.$http.sendRequest('/index/index', 'POST', page).then(res => { - //成功回调 - this.tongji = res.data.data - }) - } else { - uni.navigateTo({ - url: '/pages/login/login' - }) - } - }) + this.calculateDates() + let pageHe={ + pageNumber: 0, + pageSize: 10, + shopNumber:this.ziyuanId, + dataStatus:1 } - + this.$http.sendRequest('/cereContractInformation/getPage', 'POST', pageHe,1).then(res => { + if(res.data.data.content.length !=0){ + res.data.data.content.map(item=>{ + this.generateDateRange([item.contractTerminationDate,item.leaseStartDate]) + }) + + } + }) + }, methods: { generateDateRange(datas) { @@ -385,9 +359,9 @@ const month = String(currentDate.getMonth() + 1).padStart(1, '0'); const day = String(currentDate.getDate()).padStart(1, '0'); const dateString = `${year}-${month}-${day}`; - result.push({ + this.selected.push({ date: dateString, - info: '¥850', + info: '已租', disable: true }); currentDate.setDate(currentDate.getDate() + 1); @@ -407,6 +381,22 @@ typeChange(e) { this.model1.entityType = e[0].label; }, + calculateDates() { + const today = new Date(); + const year = today.getFullYear(); + const month = today.getMonth(); + this.startDate = this.formatDate(today); + + // 获取后一个月的最后一天 + const nextMonthLastDay = new Date(year, month + 2, 0); + this.endDate = this.formatDate(nextMonthLastDay); + }, + formatDate(date) { + const year = date.getFullYear(); + const month = ('0' + (date.getMonth() + 1)).slice(-2); // 月份是从0开始的 + const day = ('0' + date.getDate()).slice(-2); + return `${year}-${month}-${day}`; + }, getCurrentTime() { const now = new Date(); const year = now.getFullYear(); diff --git a/lvdao-miniapp/pages/record/record.vue b/lvdao-miniapp/pages/record/record.vue index d78d8c6..5202338 100644 --- a/lvdao-miniapp/pages/record/record.vue +++ b/lvdao-miniapp/pages/record/record.vue @@ -28,7 +28,7 @@ return { recordList:'', pageindex: { - pageNumber: 1, + pageNumber: 0, pageSize: 10 }, }; diff --git a/lvdao-miniapp/pagesA/myZiyuan/addMyshop.vue b/lvdao-miniapp/pagesA/myZiyuan/addMyshop.vue index 8fba468..e91e557 100644 --- a/lvdao-miniapp/pagesA/myZiyuan/addMyshop.vue +++ b/lvdao-miniapp/pagesA/myZiyuan/addMyshop.vue @@ -11,7 +11,8 @@ - @@ -27,7 +28,7 @@ - + @@ -42,7 +43,26 @@ - + + + + + + + + + + - + @@ -78,15 +98,14 @@ - + - - + 提交 @@ -98,41 +117,43 @@ export default { data() { return { - fileList:[], + fist:[], ruleForm:{ - onSitePhoto:'', - deviceName:'', - deviceType:'', - warrantyIssue:'', - memo:'', - applicationTime:'', - enterpriseAuthorization:[], - status:'1' + shopName:'', + shopDescription:'', + businessHours:'', + contactNumber:'', + locationDescription:'', + shopPhotos:[], + contractId:'' }, - lableXian:'', - shelei:'', - list: [{ - value: '水管问题', - label: '水管问题' - }, - { - value: '物业问题', - label: '物业问题' - } - ], - list1: [{ - value: '类型1', - label: '类型1' - }, - { - value: '类型2', - label: '类型2' - } - ], - popup1:false, - popup2:false + edit:false, + } }, + onLoad(options) { + + if(options.msg!='' && options.msg){ + this.ruleForm = JSON.parse(options.msg) + // this.ruleForm.shopPhotos = shopPhotos + this.ruleForm.shopPhotos.map((item,index)=>{ + let obj = { + url:item + } + + this.fist.push(obj) + }) + + // this.fileList = this.ruleForm.shopPhotos + this.edit =true + } + console.log(this.ruleForm,this.fist) + if(options.ids){ + this.ruleForm.contractId = options.ids + } + + + }, methods:{ chooseLocation(val, item) { this.popup1 = true @@ -148,35 +169,49 @@ this.ruleForm.deviceType = val[0].label }, check(){ - if (this.ruleForm.onSitePhoto.length== 0) { + if (this.ruleForm.shopPhotos.length== 0) { uni.showToast({ icon: 'none', title: '请上传现场图片' }); return false; } - if (!this.ruleForm.complaintType) { + if (!this.ruleForm.shopName) { uni.showToast({ icon: 'none', - title: '请选择投诉类型' + title: '请输入店铺名称' }); return false; } - if (!this.ruleForm.problemDescription) { + if (!this.ruleForm.shopDescription) { uni.showToast({ icon: 'none', - title: '请输入问题描述' + title: '请输入店铺介绍' }); return false; } - if (!this.ruleForm.remark) { + if (!this.ruleForm.businessHours) { uni.showToast({ icon: 'none', - title: '请输入备注信息' + title: '请输入营业时间' }); return false; } - + if (!this.ruleForm.contactNumber) { + uni.showToast({ + icon: 'none', + title: '请输入联系电话' + }); + return false; + } + if (!this.ruleForm. locationDescription) { + uni.showToast({ + icon: 'none', + title: '请输入位置描述' + }); + return false; + } + return true; }, submit() { @@ -184,23 +219,45 @@ if(show == false){ return } - this.ruleForm.enterpriseAuthorization.map(item=>{ - item.replace(this.$img,'') + this.ruleForm.shopPhotos.map(item=>{ + item = item.replace(this.$img,'') }) + console.log(this.ruleForm) + // return this.ruleForm.applicationTime = this.currentTime() let info = { ...this.ruleForm, - enterpriseAuthorization:this.ruleForm.enterpriseAuthorization.join(','), + shopPhotos:this.ruleForm.shopPhotos.join(','), + } + + if(this.edit){ + this.$http.sendRequest('/cereAssetShopInformation/edit', 'POST',info,1).then(res => { + uni.showToast({ + title: '修改成功', + icon: 'none', + }); + uni.switchTab({ + url: '/pages/my/my' + }); + }).catch(err => { + console.log(err) + //请求失败 + }) + }else{ + this.$http.sendRequest('/cereAssetShopInformation/add', 'POST',info,1).then(res => { + uni.showToast({ + title: '提交成功', + icon: 'none', + }); + uni.switchTab({ + url: '/pages/my/my' + }); + }).catch(err => { + console.log(err) + //请求失败 + }) } - this.$http.sendRequest('/cereReportIssuesRepairs/add', 'POST',info,1).then(res => { - uni.navigateTo({ - url: '/pages/serve/serve' - }) - }).catch(err => { - console.log(err) - //请求失败 - }) }, // 获取时间 @@ -234,7 +291,12 @@ filePath: 'xcx', // 其他表单数据 }, success: (uploadFileRes) => { - this.ruleForm.enterpriseAuthorization.push(this.$img + JSON.parse(uploadFileRes.data).data) + console.log(this.fist) + this.ruleForm.shopPhotos.push(this.$img + JSON.parse(uploadFileRes.data).data) + // let obj ={ + // url:this.$img + JSON.parse(uploadFileRes.data).data + // } + // this.fist.push(obj) uni.showToast({ title: '上传成功', icon: 'success', @@ -249,6 +311,10 @@ }, }); }, + removeList(e, file, fileList){ + this.ruleForm.shopPhotos.splice(e,1) + this.fist.splice(e,1) + } } } diff --git a/lvdao-miniapp/pagesA/myZiyuan/myZiDetails.vue b/lvdao-miniapp/pagesA/myZiyuan/myZiDetails.vue index 9d27674..c323621 100644 --- a/lvdao-miniapp/pagesA/myZiyuan/myZiDetails.vue +++ b/lvdao-miniapp/pagesA/myZiyuan/myZiDetails.vue @@ -16,67 +16,74 @@ 租赁期限 - {{record.contractTerminationDate}} + {{heData.contractTerminationDate || '无'}} 租金 - {{record.contractAmount}} + {{heData.contractAmount || '无'}} 付款日 - {{record.paymentCycle}} + {{heData.paymentDay || '无'}} - - - + + 商铺名称 - {{record.warrantyIssue || record.complaintType}} + {{record.cereBasicInformationShop.shopName}} 商铺类型 - {{record.applicationTime}} + {{record.cereBasicInformationShop.shopType=='1'?'移动铺位':record.cereBasicInformationShop.shopType=='2'?'固定铺位':'无'}} + - 租赁期限 - {{record.deviceType || record.problemDescription}} + 实际使用面积 + {{record.cereBasicInformationShop.actualUsableArea || '无'}} - 租金 - {{record.memo || record.remark}} + 产权面积 + {{record.cereBasicInformationShop.propertyArea || '无' }} - 付款日 - {{record.memo || record.remark}} + 所属区域 + {{record.cereBasicInformationShop.belongingRegion}} + + + 归属部门 + {{record.cereBasicInformationShop.belongingDepartment || '无'}} + + + 详细地址 + {{record.cereBasicInformationShop.detailedLocation}} - - + + 广告位名称 - {{record.warrantyIssue || record.complaintType}} + {{record.cereAdvertisingInformation.advertisingName}} + 广告位类型 + {{record.cereAdvertisingInformation.advertisingType}} + + 所属端 - {{record.applicationTime}} + {{record.cereAdvertisingInformation.applicationTime}} - - 租赁期限 - {{record.deviceType || record.problemDescription}} + + 广告材质 + {{record.cereAdvertisingInformation.advertisingMaterial}} - 租金 - {{record.memo || record.remark}} + 广告尺寸 + {{record.cereAdvertisingInformation.dimensions}} - - 付款日 - {{record.memo || record.remark}} - - @@ -84,71 +91,85 @@ 场地名称 - {{record.warrantyIssue || record.complaintType}} + {{record.cereBasicInformationVenue.venueName}} 场地类型 - {{record.applicationTime}} + {{record.cereBasicInformationVenue.venueType}} 实际使用面积 - {{record.deviceType || record.problemDescription}} + {{record.cereBasicInformationVenue.actualArea}} - 租金 - {{record.memo || record.remark}} + 所属区域 + {{record.cereBasicInformationVenue.district}} - 付款日 - {{record.memo || record.remark}} + 详细位置 + {{record.cereBasicInformationVenue.detailedLocation}} - - 添加我的店铺信息 - - + + + - 商铺名称 - {{record.warrantyIssue || record.complaintType}} + 店铺名称 + {{myshopMsg.shopName}} - 商铺类型 - {{record.applicationTime}} + 店铺介绍 + + + {{myshopMsg.shopDescription}} - 租赁期限 - {{record.deviceType || record.problemDescription}} + 营业时间 + + + {{myshopMsg.businessHours}} - 租金 - {{record.memo || record.remark}} + 联系电话 + {{myshopMsg.contactNumber}} - 付款日 - {{record.memo || record.remark}} + 位置描述 - - + + {{myshopMsg.locationDescription}} + + + 店内照片 + + + + + - - + 投放内容 - + + + 添加我的店铺信息 申请退租 申请续租 修改资料 - + @@ -158,43 +179,122 @@ data() { return { record:{}, - btnShow:true, + btnShow:false, hoverStyle:{ color:'#3f9b6a' }, - mapType:'商铺', - content:'

露从今夜白,月是故乡明

', + mapType:'', + content:'', xuShow:false, - content:'您确定是否需要续租' + contentxu:'您确定是否需要续租', + pageindex: { + pageNumber: 0, + pageSize: 10, + contractId:'' + }, + myshopMsg:{}, + heData:{}, + xuForm: { + reasonForApplication:'', + applicationTime:'', + contractId:0, + contractType:1, + createTime:'', + createUser:'' + }, } }, onLoad(options) { const item = JSON.parse(decodeURIComponent(options.item)); console.log('Received item:', item); this.record = item + let pageHe={ + pageNumber: 0, + pageSize: 10, + shopNumber:'', + dataStatus:1 + } + if(item.cereBasicInformationShop && item.cereBasicInformationShop.shopName){ + this.mapType = '商铺' + pageHe.shopNumber = `sp${item.cereBasicInformationShop.id}` + }else if( item.cereBasicInformationVenue && item.cereBasicInformationVenue.venueName){ + this.mapType = '场地' + pageHe.shopNumber = `cd${item.cereBasicInformationVenue.id}` + }else if(item.cereAdvertisingInformation && item.cereAdvertisingInformation.advertisingName){ + this.mapType = '广告位' + pageHe.shopNumber = `gg${item.cereAdvertisingInformation.id}` + } + + this.$http.sendRequest('/cereContractInformation/getPage', 'POST', pageHe,1).then(res => { + + this.heData = res.data.data.content[0] || {} + + }) + }, + onShow() { + if(this.mapType == '商铺'){ + this.$http.sendRequest('/cereAssetShopInformation/queryByPage', 'POST', this.pageindex,1).then(res => { + if(res.data.data.content.length == 0){ + this.btnShow = true + }else{ + this.btnShow = false + this.myshopMsg = res.data.data.content[0] + this.myshopMsg.shopPhotos = this.myshopMsg.shopPhotos.split(',') + + this.myshopMsg.shopPhotos.map(item=>{ + item = this.$img + item + }) + + } + }) + } }, methods: { getQuit(urls){ - console.log(urls) uni.navigateTo({ - url: urls + url: urls+`?ids=${this.heData.id}` }) }, xufirm(){ + console.log('11111s') + this.xuForm.createUser = uni.getStorageSync('user').phone + this.xuForm.createTime = this.getCurrentTime() + this.xuForm.contractId = Number(this.heData.id) + this.$http.sendRequest('/changeContractInformation/add', 'POST',this.xuForm, 1).then(res => { + uni.showToast({ + title: '提交成功', + icon: 'none', + }) + uni.switchTab({ + url: '/pages/my/my' + }) + }) }, xiuMsg(val){ if(val == 1){ uni.navigateTo({ - url: '/pagesA/myZiyuan/addMyshop' + url: `/pagesA/myZiyuan/addMyshop?ids=${this.heData.id}` }) }else{ + let lists = JSON.stringify(this.myshopMsg) uni.navigateTo({ - url: '/pagesA/myZiyuan/addMyshop' + url: `/pagesA/myZiyuan/addMyshop?ids=${this.heData.id}&msg=${lists}` }) } - } + }, + getCurrentTime() { + const now = new Date(); + const year = now.getFullYear(); + const month = ('0' + (now.getMonth() + 1)).slice(-2); + const day = ('0' + now.getDate()).slice(-2); + const hours = ('0' + now.getHours()).slice(-2); + const minutes = ('0' + now.getMinutes()).slice(-2); + const seconds = ('0' + now.getSeconds()).slice(-2); + + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; + }, } } @@ -205,8 +305,9 @@ left: 0; top: 0; width: 100%; - height: 100%; + padding: 0 24rpx; + } .zhutu{ margin: 15px 0; @@ -366,6 +467,7 @@ background-color: #FFFFFF; padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom); + z-index: 20; .footer-buy{ display: flex; align-items: center; @@ -386,4 +488,14 @@ } } } + .image-container { + display: flex; + flex-wrap: wrap; /* 启用换行 */ + justify-content: space-between; /* 图片之间均匀分布 */ + } + + .image-item { + box-sizing: border-box; + margin-bottom: 10rpx; /* 图片之间的垂直间距 */ + } diff --git a/lvdao-miniapp/pagesA/myZiyuan/myZiyuan.vue b/lvdao-miniapp/pagesA/myZiyuan/myZiyuan.vue index 2007f93..ac10308 100644 --- a/lvdao-miniapp/pagesA/myZiyuan/myZiyuan.vue +++ b/lvdao-miniapp/pagesA/myZiyuan/myZiyuan.vue @@ -43,7 +43,7 @@ typeShow:false, recordList:[], pageindex: { - pageNumber: 1, + pageNumber: 0, pageSize: 10 }, } @@ -66,6 +66,7 @@ }, recordXq(item){ + const encodedItem = encodeURIComponent(JSON.stringify(item)); uni.navigateTo({ url: `/pagesA/myZiyuan/myZiDetails?item=${encodedItem}`, diff --git a/lvdao-miniapp/pagesA/myZiyuan/myZiyuanQuit.vue b/lvdao-miniapp/pagesA/myZiyuan/myZiyuanQuit.vue index 747c8b6..40498a3 100644 --- a/lvdao-miniapp/pagesA/myZiyuan/myZiyuanQuit.vue +++ b/lvdao-miniapp/pagesA/myZiyuan/myZiyuanQuit.vue @@ -2,16 +2,16 @@ - - + + - + - - - + + @@ -30,9 +30,13 @@ export default { data() { return { - model1: { - businessStartDate:'', - businessPurpose:'' + ruleForm: { + reasonForApplication:'', + applicationTime:'', + contractId:0, + contractType:0, + createTime:'', + createUser:'' }, busStartshow: false, params: { @@ -53,9 +57,9 @@ }; }, onLoad(option) { - - - + if(option.ids){ + this.ruleForm.contractId = Number(option.ids) + } }, onShow() {}, methods: { @@ -71,14 +75,14 @@ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; }, chek() { - if (!this.model1.businessStartDate) { + if (!this.ruleForm.reasonForApplication) { uni.showToast({ icon: 'none', title: '请输入申请原因' }); return; } - if (!this.model1.businessPurpose) { + if (!this.ruleForm.applicationTime) { uni.showToast({ icon: 'none', title: '请选择退租申请时间' @@ -88,20 +92,19 @@ }, go() { - this.model1.rentalResourcesId = '' - this.model1.applicant = uni.getStorageSync('user').phone - this.model1.applicationTime = this.getCurrentTime() - this.chek() - // this.$http.sendRequest('/cereBusinessInfo/add', 'POST',info, 1).then(res => { - // uni.showToast({ - // title: '提交成功', - // icon: 'none', - // }); - // setTimeout(() => { - // uni.navigateBack() - // }, 1000) + this.ruleForm.createUser = uni.getStorageSync('user').phone + this.ruleForm.createTime = this.getCurrentTime() + this.chek() + this.$http.sendRequest('/changeContractInformation/add', 'POST',this.ruleForm, 1).then(res => { + uni.showToast({ + title: '提交成功', + icon: 'none', + }); + uni.switchTab({ + url: '/pages/my/my' + }); - // }) + }) }, timeChange(val) { const { @@ -112,7 +115,7 @@ return `${year}-${month}-${day}`; }, busStTimeChange(val) { - this.model1.businessStartDate = this.timeChange(val) + this.ruleForm.applicationTime = this.timeChange(val) }, diff --git a/lvdao-miniapp/utils/request.js b/lvdao-miniapp/utils/request.js index 375166e..e6d2949 100644 --- a/lvdao-miniapp/utils/request.js +++ b/lvdao-miniapp/utils/request.js @@ -15,8 +15,8 @@ const sendRequest = (url, method = 'GET', data = {}, baseUrl,contentType) => { var bases = '' if(baseUrl == 1){ // bases = 'http://8.130.38.56:8027/admin-server' + url; - // bases = 'http://172.16.61.125:9003' + url; - bases = 'http://192.168.2.225:9003' + url; + bases = 'http://172.16.61.125:9003' + url; + // bases = 'http://192.168.2.225:9003' + url; // bases = 'https://zhld.028wlkj.com:49008/cdwlMall/admin-server' + url; // bases = 'https://jy.scjysm.asia:18086/admin-server' + url; @@ -24,8 +24,8 @@ const sendRequest = (url, method = 'GET', data = {}, baseUrl,contentType) => { }else{ // bases = 'http://8.130.38.56:8027/business-server' + url; // bases = 'http://172.16.61.48/business-server' + url; - // bases = 'http://172.16.61.125:9004' + url; - bases = 'http://192.168.2.225:9004' + url; + bases = 'http://172.16.61.125:9004' + url; + // bases = 'http://192.168.2.225:9004' + url; // bases = 'https://zhld.028wlkj.com:49008/cdwlMall/business-server' + url; // bases = 'https://jy.scjysm.asia:18086/merchant-business' + url;