diff --git a/src/common/axios.js b/src/common/axios.js index cf2586d8..af110f08 100644 --- a/src/common/axios.js +++ b/src/common/axios.js @@ -13,9 +13,6 @@ instance.interceptors.request.use(config => { if (/AppCountryAlbum/.test(location.pathname)) { config.url = config.url.replace(/(app|auth|admin)\//, "api/") } - if (sessionStorage.getItem("prj") == "saas") { - config.url = config.url.replace(/(app|auth|admin)\//, "api/") - } if (!config.withoutToken && store.state.token) { config.headers["Authorization"] = store.state.token } diff --git a/src/manifest.json b/src/manifest.json index ef7e18da..a227f680 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -36,7 +36,7 @@ } }, "/online": { - "target": "https://test87xcxc.cunwuyun.cn", + "target": "http://192.168.1.34:19898", "changeOrigin": true, "pathRewrite": { "^/online": "/" diff --git a/src/saas/AppGridManagement/SelectGird.vue b/src/saas/AppGridManagement/SelectGird.vue index 8808830e..47ebacff 100644 --- a/src/saas/AppGridManagement/SelectGird.vue +++ b/src/saas/AppGridManagement/SelectGird.vue @@ -80,19 +80,24 @@ export default { } }) }, - treeInit() { - this.treeList = this.allData.filter(e => !e.parentGirdId || this.isMyGirds) - this.treeList.map((item) => { - item.isChecked = false - }) - let obj = { - girdName: '可选范围', - id: '', + let last = uni.getStorageSync("lastSelectedGrid") + if (last) { + this.$http.post("/app/appgirdinfo/listFatherGirdInfo", null, { + params: {girdId: last} + }).then(res => { + if (res?.data) { + this.slectList = [{girdName: '可选范围', id: ''}, res.data].flat() + this.getGridsByGridMemberAndParent({id: last}) + } + }) + } else { + this.treeList = this.allData.filter(e => !e.parentGirdId || this.isMyGirds) + this.treeList.map((item) => item.isChecked = false) + let obj = {girdName: '可选范围', id: ''} + this.slectList.push(obj) } - this.slectList.push(obj) }, - itemClick(row) { if (row.hasChildren) { let obj = { @@ -103,7 +108,6 @@ export default { this.getGridsByGridMemberAndParent(row) } }, - getGridsByGridMemberAndParent(row) { let {id: parentGirdId} = row this.treeList = this.allData.filter(e => e.parentGirdId == parentGirdId) @@ -124,8 +128,6 @@ export default { this.getGridsByGridMemberAndParent(row) } }, - - girdClick(row, index) { if (this.treeList[index].isChecked) {//取消 this.treeList[index].isChecked = false @@ -139,10 +141,9 @@ export default { } this.$forceUpdate() }, - - submit() { if (this.SelectGird.id != null) { + uni.setStorageSync("lastSelectedGrid", this.SelectGird.parentGirdId) uni.navigateBack({ success: () => { uni.$emit("pagePicker:custom", this.SelectGird)