diff --git a/jsFile/requst.js b/jsFile/requst.js index 325795e..49acd9d 100644 --- a/jsFile/requst.js +++ b/jsFile/requst.js @@ -70,20 +70,20 @@ const request = (method, url, options) => { methods = 'POST' headers = { 'Content-Type': 'application/json; charset=UTF-8', - 'Authorization': 'Bearer '+uni.getStorageSync('token') || '' + 'token':uni.getStorageSync('token') || '' } break; case 'postForm': methods = 'POST' headers = { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', - 'Authorization': 'Bearer '+uni.getStorageSync('token') || '' + 'token':uni.getStorageSync('token') || '' } break; } let params = {}; if(options!=undefined) params = options; - params.token = uni.getStorageSync('token'); + // params.token = uni.getStorageSync('token'); return new Promise((resolve, reject) => { uni.request({ url: `${hostapi}${url}`, @@ -124,7 +124,7 @@ const uploadFile = (url, options) => { formData: tempData, header: { 'Content-Type': 'multipart/form-data;charset=UTF-8', - 'Authorization': 'Bearer '+uni.getStorageSync('token') || '' + 'token':uni.getStorageSync('token') || '' }, success: res => { if (res.statusCode == 200) { diff --git a/pages/appreciationServe/appreciationServe.vue b/pages/appreciationServe/appreciationServe.vue index 9ee3b15..0fe1fa9 100644 --- a/pages/appreciationServe/appreciationServe.vue +++ b/pages/appreciationServe/appreciationServe.vue @@ -98,6 +98,19 @@ }, data() { return { + data:{ + type_id:1, + title:"", + brand:"", + model:"型号", + width:"", + height:"", + contact_name:"", + contact_phone:"", + appointment_time:'', + addres:"", + pictures:"", + }, typeIndex: 0, typeData: [{ title: '巡检', @@ -124,6 +137,7 @@ methods: { typeIndexFun(index) { this.typeIndex = index + this.data.type_id=this.typeData } } } diff --git a/pages/project/details.vue b/pages/project/details.vue index a6bf4e3..4a36e42 100644 --- a/pages/project/details.vue +++ b/pages/project/details.vue @@ -242,6 +242,7 @@ autoplay: true, interval: 3000, index: 1, + projectId:"", recordState: [{ title: '维修记录', state: true @@ -257,11 +258,27 @@ ] } }, + onLoad(option) { + this.projectId=option.id + this.getData() + }, + methods: { changeAutoplay(data) { console.log() this.index = data.detail.current - 0 + 1 }, + getData(){ + this.$requst.get('/universal/api.project/project_info', { + id: this.projectId, + }).then(res => { + if (res.code == 1) { + console.log(res.data.data) + } else { + + } + }) + }, recordNav(index) { for (var i = 0; i < this.recordState.length; i++) { this.recordState[i].state = false diff --git a/pages/project/projectList.vue b/pages/project/projectList.vue index 546eae0..9cc8a5a 100644 --- a/pages/project/projectList.vue +++ b/pages/project/projectList.vue @@ -32,16 +32,16 @@ - + - {{item.title}} + {{item.project_name}} 项目编号:{{item.projectCode}} - 规格型号:{{item.model}} + 规格型号:{{item.project_number}} 产品尺寸:{{item.size}} - 安装位置:{{item.installationSite}} + 安装位置:{{item.installation_location}} @@ -55,7 +55,7 @@ {{item.date}} - 质保中 + 质保中 质保到期 @@ -101,98 +101,7 @@ dataList: { list_rows: 10, page: 1, - data: [{ - title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏", - projectCode: "20220108-1001", - model: "DS-CK25FI/H", - installationSite: "xxx综合楼2楼会议室", - address: "湖南省长沙市高新开发区谷园路109号像素大厦1205", - date: "2022/01/08", - size: "3.94m*2.02m", - state: 0 - }, - { - title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏", - projectCode: "20220108-1001", - model: "DS-CK25FI/H", - installationSite: "xxx综合楼2楼会议室", - address: "湖南省长沙市高新开发区谷园路109号像素大厦1205", - date: "2022/01/08", - size: "3.94m*2.02m", - state: 1 - }, { - title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏", - projectCode: "20220108-1001", - model: "DS-CK25FI/H", - installationSite: "xxx综合楼2楼会议室", - address: "湖南省长沙市高新开发区谷园路109号像素大厦1205", - date: "2022/01/08", - size: "3.94m*2.02m", - state: 1 - }, { - title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏", - projectCode: "20220108-1001", - model: "DS-CK25FI/H", - installationSite: "xxx综合楼2楼会议室", - address: "湖南省长沙市高新开发区谷园路109号像素大厦1205", - date: "2022/01/08", - size: "3.94m*2.02m", - state: 1 - }, { - title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏", - projectCode: "20220108-1001", - model: "DS-CK25FI/H", - installationSite: "xxx综合楼2楼会议室", - address: "湖南省长沙市高新开发区谷园路109号像素大厦1205", - date: "2022/01/08", - size: "3.94m*2.02m", - state: 0 - }, { - title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏", - projectCode: "20220108-1001", - model: "DS-CK25FI/H", - installationSite: "xxx综合楼2楼会议室", - address: "湖南省长沙市高新开发区谷园路109号像素大厦1205", - date: "2022/01/08", - size: "3.94m*2.02m", - state: 0 - }, { - title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏", - projectCode: "20220108-1001", - model: "DS-CK25FI/H", - installationSite: "xxx综合楼2楼会议室", - address: "湖南省长沙市高新开发区谷园路109号像素大厦1205", - date: "2022/01/08", - size: "3.94m*2.02m", - state: 1 - }, { - title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏", - projectCode: "20220108-1001", - model: "DS-CK25FI/H", - installationSite: "xxx综合楼2楼会议室", - address: "湖南省长沙市高新开发区谷园路109号像素大厦1205", - date: "2022/01/08", - size: "3.94m*2.02m", - state: 0 - }, { - title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏", - projectCode: "20220108-1001", - model: "DS-CK25FI/H", - installationSite: "xxx综合楼2楼会议室", - address: "湖南省长沙市高新开发区谷园路109号像素大厦1205", - date: "2022/01/08", - size: "3.94m*2.02m", - state: 0 - }, { - title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏", - projectCode: "20220108-1001", - model: "DS-CK25FI/H", - installationSite: "xxx综合楼2楼会议室", - address: "湖南省长沙市高新开发区谷园路109号像素大厦1205", - date: "2022/01/08", - size: "3.94m*2.02m", - state: 1 - }, + data: [ ] } } @@ -204,21 +113,23 @@ methods: { getData() { - this.$requst.post('/universal/api.project/project_list', { + this.$requst.get('/universal/api.project/project_list', { list_rows: this.dataList.list_rows, page: this.dataList.page, }).then(res => { // this.$toolAll.tools.showToast(res.msg); - if (res.code == 0) { - this.dataList = res.data.data + console.log(res.data.data) + if (res.code == 1) { + this.dataList.data = res.data.data + } else { } }) }, - projectDetailsFun() { + projectDetailsFun(id) { uni.navigateTo({ - url: "/pages/project/details" + url: `/pages/project/details?id=${id}` }) }, // 查询 diff --git a/pages/repairsPage/repairsPage.vue b/pages/repairsPage/repairsPage.vue index fcf10a1..daa2e3f 100644 --- a/pages/repairsPage/repairsPage.vue +++ b/pages/repairsPage/repairsPage.vue @@ -17,9 +17,9 @@ 故障类型: - - {{item.title}} + {{item.name}} @@ -30,9 +30,9 @@ - - - + + + @@ -41,25 +41,27 @@ -