1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <template>
- <view class="">
- <citySelect @back_city="back_city"></citySelect>
- </view>
- </template>
- <script>
- import citySelect from '@/components/linzq-citySelect/linzq-citySelect.vue';
- export default {
- components: {
- citySelect
- },
- data() {
- return {
- statusBarHeight:''
- }
- },
- onLoad() {
- let that = this
- uni.getSystemInfo({
- success: function(res) {
- console.log("statusBarHeight", res.statusBarHeight)
- that.statusBarHeight += res.statusBarHeight + "px"; //这就是状态栏的高度
- },
- });
- },
- methods: {
- back_city(e) {
- if (e.positionName !== 'no') {
- this.region = e.positionName.cityName
- }
- if(!e.positionName.cityName){
- var tmp = e.positionName
- e.positionName = {}
- e.positionName.cityName = tmp
- }
- console.log("city:",e)
- uni.setStorage({
- key: 'depotAcquisition_selectCity',
- data: e,
- success() {
- uni.navigateBack()
- }
- });
- }
- }
- }
- </script>
- <style>
- .container {
- padding: 20px;
- font-size: 14px;
- line-height: 24px;
- }
- </style>
|