diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 4ccd172..9b0d791 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -13,7 +13,7 @@ "type" : "uniCloud" }, { - "playground" : "custom", + "playground" : "standard", "type" : "uni-app:app-android" } ] diff --git a/config.js b/config.js index a42952c..23ecb87 100644 --- a/config.js +++ b/config.js @@ -25,7 +25,7 @@ module.exports = { //实名制移动端 realBmwUrl: 'http://192.168.0.14:1911/bmw', //实名制移动端 -- 新 - realNewBmwUrl: 'http://192.168.0.14:1911', + realNewBmwUrl: 'http://112.29.103.165:1616', // 应用信息 appInfo: { diff --git a/pages/realName/index/pages/personDetail.vue b/pages/realName/index/pages/personDetail.vue index ed2b15b..20f30f1 100644 --- a/pages/realName/index/pages/personDetail.vue +++ b/pages/realName/index/pages/personDetail.vue @@ -271,6 +271,7 @@ export default { this.idNumber=option.idNumber||""; if(this.idNumber!=""){ this.selectPersonQualificationsContent() + this.$forceUpdate() } }, onShow() { diff --git a/pages/realName/index/pages/personList.vue b/pages/realName/index/pages/personList.vue index e759378..8c5c1df 100644 --- a/pages/realName/index/pages/personList.vue +++ b/pages/realName/index/pages/personList.vue @@ -22,7 +22,7 @@ - + {{ index + 1 }} @@ -39,7 +39,7 @@ 工种 {{item.postName}} - + 联系方式 {{item.phone}} @@ -52,7 +52,7 @@ - + 红绿灯状态 绿灯 @@ -469,35 +469,36 @@ export default { }, /* 点击跳转详情 */ onViewWorkDetails(row) { + console.log(row) uni.navigateTo({ url: `/pages/realName/index/pages/personDetail?idNumber=${row.idNumber}` }) }, /* 收藏与取消收藏 */ onCollection(e, row) { - e.stopPropagation() - // const params = { - // id: row.collectId, - // userId: uni.getStorageSync('realNameUser').userId, - // foreignId: row.proId, - // type: 1 - // } - - // // console.log('params参数', params) - - // uni.request({ - // url: `${config.loginBaseUrl}${ - // row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect' - // }`, - // method: 'POST', - // data: JSON.stringify(params), - // header: { - // 'Content-Type': 'application/json', - // token: this.token - // }, - // success: res => { - // console.log('res收藏结果', res) - // }, - // fail: err => {} - // }) + e.stopPropagation() + const params = { + id: row.collectId, + userId: uni.getStorageSync('realNameUser').userId, + foreignId: row.proId, + type: 1 + } + uni.request({ + url: `${config.loginBaseUrl}${ + row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect' + }`, + method: 'POST', + data: JSON.stringify(params), + header: { + 'Content-Type': 'application/json', + token: this.token + }, + success: res => { + if (res.data.code === 200) { + uni.showToast({ icon: 'none', title: ` ${row.isCollect == 0 ? '收藏成功' : '已取消收藏'}` }) + this.getWorkPlantData() + } + }, + fail: err => {} + }) } } } diff --git a/pages/realName/index/pages/project.vue b/pages/realName/index/pages/project.vue index 3fab2e0..f3f8164 100644 --- a/pages/realName/index/pages/project.vue +++ b/pages/realName/index/pages/project.vue @@ -27,17 +27,13 @@ - - {{ index + 1 }} - {{ item.proName }} - - + + + {{ index + 1 }} + {{ item.proName }} + + + {{ item.subComName }} {{ item.voltageLevel }} @@ -372,31 +368,31 @@ export default { /* 收藏与取消收藏 */ onCollection(e, row) { - e.stopPropagation() - // const params = { - // id: row.collectId, - // userId: uni.getStorageSync('realNameUser').userId, - // foreignId: row.proId, - // type: 1 - // } - - // // console.log('params参数', params) - - // uni.request({ - // url: `${config.loginBaseUrl}${ - // row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect' - // }`, - // method: 'POST', - // data: JSON.stringify(params), - // header: { - // 'Content-Type': 'application/json', - // token: this.token - // }, - // success: res => { - // console.log('res收藏结果', res) - // }, - // fail: err => {} - // }) + console.log(row) + const params = { + id: row.collectId, + userId: uni.getStorageSync('realNameUser').userId, + foreignId: row.proId, + type: 1 + } + uni.request({ + url: `${config.loginBaseUrl}${ + row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect' + }`, + method: 'POST', + data: JSON.stringify(params), + header: { + 'Content-Type': 'application/json', + token: this.token + }, + success: res => { + if (res.data.code === 200) { + uni.showToast({ icon: 'none', title: ` ${row.isCollect == 0 ? '收藏成功' : '已取消收藏'}` }) + this.getWorkPlantData() + } + }, + fail: err => {} + }) } } } diff --git a/pages/realName/index/pages/subList.vue b/pages/realName/index/pages/subList.vue index 3eb7736..e4b065a 100644 --- a/pages/realName/index/pages/subList.vue +++ b/pages/realName/index/pages/subList.vue @@ -302,30 +302,30 @@ export default { /* 收藏与取消收藏 */ onCollection(e, row) { e.stopPropagation() - // const params = { - // id: row.collectId, - // userId: uni.getStorageSync('realNameUser').userId, - // foreignId: row.proId, - // type: 1 - // } - - // // console.log('params参数', params) - - // uni.request({ - // url: `${config.loginBaseUrl}${ - // row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect' - // }`, - // method: 'POST', - // data: JSON.stringify(params), - // header: { - // 'Content-Type': 'application/json', - // token: this.token - // }, - // success: res => { - // console.log('res收藏结果', res) - // }, - // fail: err => {} - // }) + const params = { + id: row.collectId, + userId: uni.getStorageSync('realNameUser').userId, + foreignId: row.proId, + type: 1 + } + uni.request({ + url: `${config.loginBaseUrl}${ + row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect' + }`, + method: 'POST', + data: JSON.stringify(params), + header: { + 'Content-Type': 'application/json', + token: this.token + }, + success: res => { + if (res.data.code === 200) { + uni.showToast({ icon: 'none', title: ` ${row.isCollect == 0 ? '收藏成功' : '已取消收藏'}` }) + this.getWorkPlantData() + } + }, + fail: err => {} + }) } } } diff --git a/pages/realName/index/pages/teamList.vue b/pages/realName/index/pages/teamList.vue index 142a1f0..fca2fce 100644 --- a/pages/realName/index/pages/teamList.vue +++ b/pages/realName/index/pages/teamList.vue @@ -223,30 +223,30 @@ export default { /* 收藏与取消收藏 */ onCollection(e, row) { e.stopPropagation() - // const params = { - // id: row.collectId, - // userId: uni.getStorageSync('realNameUser').userId, - // foreignId: row.proId, - // type: 1 - // } - - // // console.log('params参数', params) - - // uni.request({ - // url: `${config.loginBaseUrl}${ - // row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect' - // }`, - // method: 'POST', - // data: JSON.stringify(params), - // header: { - // 'Content-Type': 'application/json', - // token: this.token - // }, - // success: res => { - // console.log('res收藏结果', res) - // }, - // fail: err => {} - // }) + const params = { + id: row.collectId, + userId: uni.getStorageSync('realNameUser').userId, + foreignId: row.proId, + type: 1 + } + uni.request({ + url: `${config.loginBaseUrl}${ + row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect' + }`, + method: 'POST', + data: JSON.stringify(params), + header: { + 'Content-Type': 'application/json', + token: this.token + }, + success: res => { + if (res.data.code === 200) { + uni.showToast({ icon: 'none', title: ` ${row.isCollect == 0 ? '收藏成功' : '已取消收藏'}` }) + this.getWorkPlantData() + } + }, + fail: err => {} + }) } } } diff --git a/pages/realName/my/my.vue b/pages/realName/my/my.vue index 5673977..ba1e180 100644 --- a/pages/realName/my/my.vue +++ b/pages/realName/my/my.vue @@ -22,7 +22,7 @@ 修改密码 --> - +