Compare commits
No commits in common. "6d5ce02d4d3bf24808482502e9c8dcb43c8c57ac" and "be422797a07335309d4dca0a74d3c9d37f8f7b0e" have entirely different histories.
6d5ce02d4d
...
be422797a0
|
|
@ -43,7 +43,3 @@ export const setRegion = data =>
|
|||
// 获取可选择区域
|
||||
export const getRegionAreaTree = params =>
|
||||
http.get('/member/api/member/get-region-list', { params })
|
||||
|
||||
// 获取已有区域
|
||||
export const getSelectedRegion = () =>
|
||||
http.get('/member/api/member/get-all-region')
|
||||
|
|
|
|||
|
|
@ -13,10 +13,7 @@
|
|||
selectedData.provinceData.provinceName
|
||||
}}</text>
|
||||
</view>
|
||||
<view
|
||||
v-if="unSelected.includes('province') || selectedData.provinceData"
|
||||
class="region-action"
|
||||
>
|
||||
<view v-if="unSelected.includes('province')" class="region-action">
|
||||
<button class="select-btn" @click="selectProvinceRegion">
|
||||
{{ selectedData.provinceData ? '修改' : '选择' }}省级收益区域
|
||||
</button>
|
||||
|
|
@ -39,10 +36,7 @@
|
|||
selectedData.cityData.cityName
|
||||
}}</text>
|
||||
</view>
|
||||
<view
|
||||
v-if="unSelected.includes('city') || selectedData.cityData"
|
||||
class="region-action"
|
||||
>
|
||||
<view v-if="unSelected.includes('city')" class="region-action">
|
||||
<button class="select-btn" @click="selectCityRegion">
|
||||
{{ selectedData.cityData ? '修改' : '选择' }}市级收益区域
|
||||
</button>
|
||||
|
|
@ -69,10 +63,7 @@
|
|||
selectedData.countyData.countyName
|
||||
}}</text>
|
||||
</view>
|
||||
<view
|
||||
v-if="unSelected.includes('county') || selectedData.countyData"
|
||||
class="region-action"
|
||||
>
|
||||
<view v-if="unSelected.includes('county')" class="region-action">
|
||||
<button class="select-btn" @click="selectCountyRegion">
|
||||
{{ selectedData.countyData ? '修改' : '选择' }}区县收益区域
|
||||
</button>
|
||||
|
|
@ -99,7 +90,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getRegionSelect, getSelectedRegion } from '@/config/mine.js'
|
||||
import { getRegionSelect } from '@/config/mine.js'
|
||||
import RegionSelect from '@/components/region-select/index.vue'
|
||||
|
||||
export default {
|
||||
|
|
@ -133,17 +124,8 @@ export default {
|
|||
},
|
||||
onShow() {
|
||||
this.getRegionSelect()
|
||||
this.getSelectedRegion()
|
||||
},
|
||||
methods: {
|
||||
getSelectedRegion() {
|
||||
return new Promise((resolve, reject) => {
|
||||
getSelectedRegion().then(res => {
|
||||
this.selectedData = res.data?.data || {}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
},
|
||||
async getRegionSelect() {
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
|
|
@ -158,7 +140,7 @@ export default {
|
|||
.filter(key => key !== 'data')
|
||||
.filter(key => res.data[key] === true)
|
||||
this.unSelected = unSelected
|
||||
// this.selectedData = res.data?.data || {}
|
||||
this.selectedData = res.data?.data || {}
|
||||
resolve()
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
@ -191,7 +173,7 @@ export default {
|
|||
this.$refs.regionSelect.open('county')
|
||||
},
|
||||
successHandle(data) {
|
||||
this.getSelectedRegion()
|
||||
this.getRegionSelect()
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue