@ -1,169 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 选择门店 -->
|
||||
<uni-popup ref="share" type="share">
|
||||
<view class="allcon">
|
||||
<view class="hcon">
|
||||
<view class="htitle">选择门店 <view class="bottom-line"></view></view>
|
||||
<view class="rclose" @tap="_cancel">
|
||||
取消
|
||||
</view>
|
||||
</view>
|
||||
<view class="selcon">
|
||||
<view class="sitem" v-for="(item,index) in areas" :key="index">
|
||||
<view class="sname">{{item.value_name}}</view>
|
||||
<view class="selbtn" :class="item.value_name==city?'cur':''" @click="changeArea(item)" >选择</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { myCache } from '../../utils/utils.js';
|
||||
export default {
|
||||
props: {
|
||||
city: {
|
||||
type: String,
|
||||
default: myCache('mycity'),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
areas:[]
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
console.log('mounted')
|
||||
this.loadarea();
|
||||
},
|
||||
computed:{
|
||||
selcity(){
|
||||
return this.city;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
_show() {
|
||||
console.log('_show')
|
||||
this.$refs.share.open();
|
||||
},
|
||||
_hide() {
|
||||
this.$refs.share.close();
|
||||
},
|
||||
_cancel() {
|
||||
this._hide();
|
||||
this.$emit("cancel", "");
|
||||
},
|
||||
changeArea(item){
|
||||
myCache('mycity',item.value_name);
|
||||
this.$emit("change", item.value_name);
|
||||
this._hide();
|
||||
},
|
||||
async loadarea(){
|
||||
const {data: ress} = await uni.$http.get('/api/dict/CITY');
|
||||
if(ress.data){
|
||||
this.areas=ress.data;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
|
||||
.allcon{
|
||||
width: 750rpx;
|
||||
/* #ifdef MP-ALIPAY */
|
||||
height: calc(100vh/2 + 300rpx);
|
||||
/* #endif */
|
||||
/* #ifdef MP-WEIXIN */
|
||||
height: calc(100vh - var(--window-top));
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
height: calc(100vh - var(--window-top));
|
||||
/* #endif */
|
||||
overflow: hidden;
|
||||
background-color: #FFFFFF;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.hcon{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: 20rpx 20rpx 20rpx;
|
||||
.htitle{
|
||||
flex:1;
|
||||
justify-content: flex-start;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
letter-spacing: 5rpx;
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
.rclose{
|
||||
width: 70rpx;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
font-size: 28rpx;
|
||||
color:#949494;
|
||||
}
|
||||
}
|
||||
.selcon{
|
||||
padding: 0;
|
||||
position: relative;
|
||||
display: block;
|
||||
overflow-y: auto;
|
||||
/* #ifdef MP-ALIPAY */
|
||||
height: calc(100vh/2 + 200rpx);
|
||||
/* #endif */
|
||||
/* #ifdef MP-WEIXIN */
|
||||
height: calc(100vh - var(--window-top) - 120rpx);
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
height: calc(100vh - var(--window-top) - var(--window-bottom) - 120rpx);
|
||||
/* #endif */
|
||||
.lineb{
|
||||
height: 50rpx;
|
||||
}
|
||||
.sitem {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
background-color: #FFFFFF;
|
||||
border-top: 1rpx solid #eeeeee;
|
||||
margin: 16rpx 0;
|
||||
.selbtn{
|
||||
width: 100rpx;
|
||||
height: 44rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 20rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 6rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
.selbtn.cur{
|
||||
background-color: rgb(30, 209, 162);
|
||||
color: #FFF;
|
||||
}
|
||||
.sname{
|
||||
display: flex;
|
||||
flex: 1;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: rgb(29, 29, 29);
|
||||
padding: 10rpx 10rpx 0 10rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 166 KiB After Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 1017 B After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 615 B |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 3.0 KiB |