下拉隐藏
This commit is contained in:
parent
dcbbe57d64
commit
6d48c1c8d0
|
@ -1,137 +1,142 @@
|
|||
<template>
|
||||
<up-popup :show="show" closeable round="10" @close="close">
|
||||
<view class="address-popup">
|
||||
<view class="head-title">选择提货点</view>
|
||||
<view class="list-admin">
|
||||
<up-search placeholder="请输入提货点名称" @search="searchKeyword" v-model="keyword" @custom="searchKeyword"></up-search>
|
||||
</view>
|
||||
<scroll-view style="height: 600rpx;padding-bottom: 20rpx;" scroll-y>
|
||||
<view class="row" v-for="(item,index) in list" :key="index" @click="addressType=index">
|
||||
<view class="content">
|
||||
<view class="top">
|
||||
<view class="name">{{item.mer_name}}</view>
|
||||
<u-tag v-if="item.distance" style="pointer-events: none;" :text="item.distance" type="success" plain size="mini"></u-tag>
|
||||
</view>
|
||||
<view class="bottom u-line-2">{{item.service_phone}}</view>
|
||||
</view>
|
||||
<image v-if="addressType==index" src="@/static/icon/check.png"></image>
|
||||
<image v-else src="@/static/icon/n-check.png"></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<up-button color="#20B128" shape="circle" @click="submitAddress">确认提货点</up-button>
|
||||
</view>
|
||||
</up-popup>
|
||||
<!-- fixed -->
|
||||
<up-popup :show="show" closeable round="10" @close="close">
|
||||
<view class="address-popup">
|
||||
<view class="head-title">选择提货点</view>
|
||||
<view class="list-admin">
|
||||
<up-search placeholder="请输入提货点名称" @search="searchKeyword" v-model="keyword"
|
||||
@custom="searchKeyword"></up-search>
|
||||
</view>
|
||||
<scroll-view style="height: 600rpx;padding-bottom: 20rpx;" scroll-y>
|
||||
<view class="row" v-for="(item,index) in list" :key="index" @click="addressType=index">
|
||||
<view class="content">
|
||||
<view class="top">
|
||||
<view class="name">{{item.mer_name}}</view>
|
||||
<u-tag v-if="item.distance" style="pointer-events: none;" :text="item.distance"
|
||||
type="success" plain size="mini"></u-tag>
|
||||
</view>
|
||||
<view class="bottom u-line-2">{{item.service_phone}}</view>
|
||||
</view>
|
||||
<image v-if="addressType==index" src="@/static/icon/check.png"></image>
|
||||
<image v-else src="@/static/icon/n-check.png"></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<up-button color="#20B128" shape="circle" @click="submitAddress">确认提货点</up-button>
|
||||
</view>
|
||||
</up-popup>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue"
|
||||
import {
|
||||
ref
|
||||
} from "vue"
|
||||
|
||||
const addressType = ref(-1)
|
||||
const addressType = ref(-1)
|
||||
|
||||
const props = defineProps({
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
list: {
|
||||
type: Array,
|
||||
default: ()=>[]
|
||||
}
|
||||
})
|
||||
const props = defineProps({
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
list: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['close', 'change', 'search']);
|
||||
const close = () => {
|
||||
emit('close');
|
||||
}
|
||||
const emit = defineEmits(['close', 'change', 'search']);
|
||||
const close = () => {
|
||||
emit('close');
|
||||
}
|
||||
|
||||
const submitAddress = () => {
|
||||
emit('change', props.list[addressType.value]);
|
||||
}
|
||||
|
||||
const keyword = ref('')
|
||||
const searchKeyword = ()=>{
|
||||
emit('search', keyword.value);
|
||||
}
|
||||
|
||||
const navTo = (url)=>{
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
}
|
||||
const submitAddress = () => {
|
||||
emit('change', props.list[addressType.value]);
|
||||
}
|
||||
|
||||
const keyword = ref('')
|
||||
const searchKeyword = () => {
|
||||
emit('search', keyword.value);
|
||||
}
|
||||
|
||||
const navTo = (url) => {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.address-popup {
|
||||
padding: 30rpx;
|
||||
.address-popup {
|
||||
padding: 30rpx;
|
||||
|
||||
.head-title {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.head-title {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.list-admin {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
.list-admin {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.admin-btn {
|
||||
display: flex;
|
||||
color: #20B128;
|
||||
.admin-btn {
|
||||
display: flex;
|
||||
color: #20B128;
|
||||
|
||||
.btn {
|
||||
margin-left: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&:active {
|
||||
color: rgba(#20B128, 0.8);
|
||||
transition: background-color 0.5s;
|
||||
animation: disappear 0.5s 0.5s forwards;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
margin-left: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1rpx solid #f6f6f6;
|
||||
margin-bottom: 20rpx;
|
||||
&:active {
|
||||
color: rgba(#20B128, 0.8);
|
||||
transition: background-color 0.5s;
|
||||
animation: disappear 0.5s 0.5s forwards;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1rpx solid #f6f6f6;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.content {
|
||||
.top {
|
||||
display: flex;
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
view {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
.content {
|
||||
.top {
|
||||
display: flex;
|
||||
|
||||
.bottom {}
|
||||
}
|
||||
view {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom {}
|
||||
}
|
||||
|
||||
@keyframes disappear {
|
||||
to {
|
||||
opacity: 0;
|
||||
/* 渐隐 */
|
||||
transform: scale(0);
|
||||
/* 缩小 */
|
||||
}
|
||||
}
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes disappear {
|
||||
to {
|
||||
opacity: 0;
|
||||
/* 渐隐 */
|
||||
transform: scale(0);
|
||||
/* 缩小 */
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<view class="">
|
||||
商品详情
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
|
@ -0,0 +1,18 @@
|
|||
<template>
|
||||
<view class="">
|
||||
<up-navbar placeholder style="z-index: 10080;">
|
||||
<template #left>
|
||||
<view style="font-size: 30rpx;font-weight: bold;" @click="test">报价单</view>
|
||||
</template>
|
||||
</up-navbar>
|
||||
|
||||
dgfsdhjg
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
247
pages.json
247
pages.json
|
@ -1,119 +1,138 @@
|
|||
{
|
||||
"easycom": {
|
||||
"autoscan": true,
|
||||
// 注意一定要放在custom里,否则无效,https://ask.dcloud.net.cn/question/131175
|
||||
"custom": {
|
||||
"^u--(.*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue",
|
||||
"^up-(.*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue",
|
||||
"^u-([^-].*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue"
|
||||
}
|
||||
},
|
||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "pages/login/login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "购物",
|
||||
"disableScroll": true,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/cart/cart",
|
||||
"style": {
|
||||
"navigationBarTitleText": "购物车",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/my/my",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人中心",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
"easycom": {
|
||||
"autoscan": true,
|
||||
// 注意一定要放在custom里,否则无效,https://ask.dcloud.net.cn/question/131175
|
||||
"custom": {
|
||||
"^u--(.*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue",
|
||||
"^up-(.*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue",
|
||||
"^u-([^-].*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue"
|
||||
}
|
||||
},
|
||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "pages/login/login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "购物",
|
||||
"disableScroll": true,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/cart/cart",
|
||||
"style": {
|
||||
"navigationBarTitleText": "购物车",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/my/my",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人中心",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
"subPackages": [{
|
||||
"root": "pagesOrder",
|
||||
"pages": [{
|
||||
"path": "order/order",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的订单",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "detail/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "addressList/addressList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "地址管理",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "addressEdit/addressEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "settle/settle",
|
||||
"style": {
|
||||
"navigationBarTitleText": "确认订单",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"backgroundColor": "#fff"
|
||||
},
|
||||
// "tabBar": {
|
||||
// "color": "#999999",
|
||||
// "selectedColor": "#20b128",
|
||||
// "borderStyle": "white",
|
||||
// "backgroundColor": "#FFFFFF",
|
||||
// "list": [{
|
||||
// "pagePath": "pages/index/index",
|
||||
// "text": "首页",
|
||||
// "iconPath": "static/tab/a.png",
|
||||
// "selectedIconPath": "static/tab/aa.png"
|
||||
// },
|
||||
// {
|
||||
// "pagePath": "pages/cart/cart",
|
||||
// "text": "购物车",
|
||||
// "iconPath": "static/tab/b.png",
|
||||
// "selectedIconPath": "static/tab/ba.png"
|
||||
// },
|
||||
],
|
||||
"subPackages": [{
|
||||
"root": "pagesOrder",
|
||||
"pages": [{
|
||||
"path": "order/order",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的订单",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "detail/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "addressList/addressList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "地址管理",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "addressEdit/addressEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "settle/settle",
|
||||
"style": {
|
||||
"navigationBarTitleText": "确认订单",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"root": "pageQuota",
|
||||
"pages": [{
|
||||
"path": "quotation/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "报价单",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "goodDetail/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}],
|
||||
|
||||
// {
|
||||
// "pagePath": "pages/my/my",
|
||||
// "text": "我的",
|
||||
// "iconPath": "static/tab/c.png",
|
||||
// "selectedIconPath": "static/tab/ca.png"
|
||||
// }
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"backgroundColor": "#fff"
|
||||
},
|
||||
// "tabBar": {
|
||||
// "color": "#999999",
|
||||
// "selectedColor": "#20b128",
|
||||
// "borderStyle": "white",
|
||||
// "backgroundColor": "#FFFFFF",
|
||||
// "list": [{
|
||||
// "pagePath": "pages/index/index",
|
||||
// "text": "首页",
|
||||
// "iconPath": "static/tab/a.png",
|
||||
// "selectedIconPath": "static/tab/aa.png"
|
||||
// },
|
||||
// {
|
||||
// "pagePath": "pages/cart/cart",
|
||||
// "text": "购物车",
|
||||
// "iconPath": "static/tab/b.png",
|
||||
// "selectedIconPath": "static/tab/ba.png"
|
||||
// },
|
||||
|
||||
// ]
|
||||
// },
|
||||
"uniIdRouter": {}
|
||||
// {
|
||||
// "pagePath": "pages/my/my",
|
||||
// "text": "我的",
|
||||
// "iconPath": "static/tab/c.png",
|
||||
// "selectedIconPath": "static/tab/ca.png"
|
||||
// }
|
||||
|
||||
// ]
|
||||
// },
|
||||
"uniIdRouter": {}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue