recycapp/pages/index/location.vue
2025-11-07 20:10:53 +08:00

67 lines
1.5 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="">
<!-- <view :style="{height:statusBarHeight+'px'}" style="width: 100%;"></view>
<view style="" @click="oncity">
<button type="primary">点击选择地区</button>
{{region}}
</view>
<popup-layer ref="popupRef" :direction="'right'">
<view style="width:750upx;height: 100%;">
<citySelect @back_city="back_city"></citySelect>
</view>
</popup-layer> -->
<view style="width:750upx;height: 100%;">
<citySelect @back_city="back_city"></citySelect>
</view>
</view>
</template>
<script>
import citySelect from '@/components/linzq-citySelect/linzq-citySelect.vue';
// import popupLayer from '@/components/popup-layer/popup-layer.vue';
export default {
components: {
citySelect
// popupLayer
},
computed: {},
data() {
return {
statusBarHeight: this.statusBarHeight, //状态栏高度在main.js里
region: '请选择...', //地区
}
},
created() {},
mounted() {
// this.$refs.popupRef.close();
},
methods: {
oncity() {
var that = this
this.$refs.popupRef.show();
},
back_city(e) {
if(e){
// this.selectedCity = e.cityName;
uni.setStorageSync('city',e.cityName+'市')
}
uni.navigateBack({
delta: 1
})
// if (e !== 'no') {
// this.region = e.cityName
// this.$refs.popupRef.close();
// } else {
// this.$refs.popupRef.close();
// }
}
}
};
</script>
<style scoped>
.height {
height: var(--status-bar-height);
}
</style>