BUG 29626

This commit is contained in:
aixianling
2022-05-20 18:29:50 +08:00
parent 1f15148979
commit 226fa3ab3c
3 changed files with 17 additions and 19 deletions

View File

@@ -13,9 +13,6 @@ instance.interceptors.request.use(config => {
if (/AppCountryAlbum/.test(location.pathname)) { if (/AppCountryAlbum/.test(location.pathname)) {
config.url = config.url.replace(/(app|auth|admin)\//, "api/") 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) { if (!config.withoutToken && store.state.token) {
config.headers["Authorization"] = store.state.token config.headers["Authorization"] = store.state.token
} }

View File

@@ -36,7 +36,7 @@
} }
}, },
"/online": { "/online": {
"target": "https://test87xcxc.cunwuyun.cn", "target": "http://192.168.1.34:19898",
"changeOrigin": true, "changeOrigin": true,
"pathRewrite": { "pathRewrite": {
"^/online": "/" "^/online": "/"

View File

@@ -80,19 +80,24 @@ export default {
} }
}) })
}, },
treeInit() { treeInit() {
this.treeList = this.allData.filter(e => !e.parentGirdId || this.isMyGirds) let last = uni.getStorageSync("lastSelectedGrid")
this.treeList.map((item) => { if (last) {
item.isChecked = false this.$http.post("/app/appgirdinfo/listFatherGirdInfo", null, {
}) params: {girdId: last}
let obj = { }).then(res => {
girdName: '可选范围', if (res?.data) {
id: '', 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) { itemClick(row) {
if (row.hasChildren) { if (row.hasChildren) {
let obj = { let obj = {
@@ -103,7 +108,6 @@ export default {
this.getGridsByGridMemberAndParent(row) this.getGridsByGridMemberAndParent(row)
} }
}, },
getGridsByGridMemberAndParent(row) { getGridsByGridMemberAndParent(row) {
let {id: parentGirdId} = row let {id: parentGirdId} = row
this.treeList = this.allData.filter(e => e.parentGirdId == parentGirdId) this.treeList = this.allData.filter(e => e.parentGirdId == parentGirdId)
@@ -124,8 +128,6 @@ export default {
this.getGridsByGridMemberAndParent(row) this.getGridsByGridMemberAndParent(row)
} }
}, },
girdClick(row, index) { girdClick(row, index) {
if (this.treeList[index].isChecked) {//取消 if (this.treeList[index].isChecked) {//取消
this.treeList[index].isChecked = false this.treeList[index].isChecked = false
@@ -139,10 +141,9 @@ export default {
} }
this.$forceUpdate() this.$forceUpdate()
}, },
submit() { submit() {
if (this.SelectGird.id != null) { if (this.SelectGird.id != null) {
uni.setStorageSync("lastSelectedGrid", this.SelectGird.parentGirdId)
uni.navigateBack({ uni.navigateBack({
success: () => { success: () => {
uni.$emit("pagePicker:custom", this.SelectGird) uni.$emit("pagePicker:custom", this.SelectGird)