Commit 29d6e053 authored by 石建新(贵阳日报)'s avatar 石建新(贵阳日报)
parents 17587c1c 700a3e67
......@@ -9,15 +9,7 @@
:style="{ color: backIcon }"
></wd-icon>
<slot></slot>
<view class="searchBox" :style="{ border }" v-if="type === 1">
<image
class="magnifyingGlass"
src="../../static/index/magnifyingGlass.png"
mode="aspectFit|aspectFill|widthFix"
/>
<input type="text" :value="test" class="text" @confirm="search" confirm-type="搜索" />
</view>
<text class="title" :style="{ color: textColor }" v-else>{{ title }}</text>
<text class="title" :style="{ color: textColor }" v-if="showTitle">{{ title }}</text>
</view>
</view>
</template>
......@@ -42,13 +34,9 @@ const props = defineProps({
type: String,
default: '',
},
border: {
type: String,
default: '',
},
type: {
type: Number,
default: 1,
showTitle: {
type: Boolean,
default: false,
},
textColor: {
type: String,
......@@ -63,7 +51,6 @@ const contentHeight = ref('100rpx');
const emit = defineEmits(['toSearch']);
// const title = ref('小程序平台');
const { countInfo, addCount } = useCountStore();
const test = ref('');
onLoad(() => {
xma.xh.getSystemInfo({
success(res) {
......@@ -72,12 +59,12 @@ onLoad(() => {
});
xma.xh.getMenuButtonBoundingClientRect({
success(res) {
console.log('宽度', res.width); // 宽度,单位:px
console.log('高度', res.height); // 高度,单位:px
console.log('上边界坐标', res.top); // 上边界坐标,单位:px
console.log('右边界坐标', res.right); // 右边界坐标,单位:px
console.log('下边界坐标', res.bottom); // 下边界坐标,单位:px
console.log('左边界坐标', res.left);
// console.log('宽度', res.width); // 宽度,单位:px
// console.log('高度', res.height); // 高度,单位:px
// console.log('上边界坐标', res.top); // 上边界坐标,单位:px
// console.log('右边界坐标', res.right); // 右边界坐标,单位:px
// console.log('下边界坐标', res.bottom); // 下边界坐标,单位:px
// console.log('左边界坐标', res.left);
contentHeight.value = res.bottom * 2 + 10 + 'rpx'; // 左边界坐标,单位:px
},
});
......@@ -135,25 +122,7 @@ function onHandleClick() {
// left: 10rpx;
position: absolute;
}
.searchBox {
opacity: 1;
width: 256rpx;
height: 56rpx;
background: #ffffff;
border-radius: 28rpx 28rpx 28rpx 28rpx;
display: flex;
align-items: center;
padding-left: 20rpx;
margin-left: 20rpx;
.magnifyingGlass {
width: 26rpx;
height: 26rpx;
}
.text {
margin-left: 10rpx;
font-size: 24rpx;
}
}
.title {
width: 100%;
font-size: 36rpx;
......
......@@ -113,10 +113,12 @@ const hdSubmit = async () => {
uni.showToast({
title: '提交成功',
duration: 2000,
icon: 'success',
success: () => {
uni.navigateBack();
},
});
uni.navigateTo({
url: '/pages/address/addressList',
});
} catch (error) {
console.log(error, 'error');
}
......
......@@ -7,7 +7,14 @@
:border="border"
>
<text class="title-icon" :style="{ color: textColor }">{{ categoryNames }}</text>
<!-- <image class="food" :src="pics" mode="widthFix" /> -->
<view class="searchBox" :style="{ border }">
<image
class="magnifyingGlass"
src="../../static/index/magnifyingGlass.png"
mode="aspectFit|aspectFill|widthFix"
/>
<input type="text" class="text" @confirm="toSearch" confirm-type="搜索" />
</view>
</Search>
<view class="container" style="padding-bottom: 10rpx">
<view class="bg-img"></view>
......@@ -379,6 +386,26 @@ page {
margin-left: 50rpx;
margin-right: 10rpx;
}
.searchBox {
opacity: 1;
width: 256rpx;
height: 56rpx;
background: #ffffff;
border-radius: 28rpx 28rpx 28rpx 28rpx;
display: flex;
align-items: center;
padding-left: 20rpx;
margin-left: 20rpx;
text-align: start;
.magnifyingGlass {
width: 26rpx;
height: 26rpx;
}
.text {
margin-left: 10rpx;
font-size: 24rpx;
}
}
.container {
.bg-img {
width: 100%;
......
<template>
<!-- 搜索 -->
<Search
:backgroundBox="backgroundBox"
background="rgba(255, 255, 255, 0.8)"
@toSearch="toSearch"
:show="false"
>
<Search :backgroundBox="backgroundBox" background="rgba(255, 255, 255, 0.8)" :show="false">
<image class="food" src="../../static/index/food.png" mode="widthFix" />
<view class="searchBox">
<image
class="magnifyingGlass"
src="../../static/index/magnifyingGlass.png"
mode="aspectFit|aspectFill|widthFix"
/>
<input type="text" class="text" @confirm="toSearch" confirm-type="搜索" />
</view>
</Search>
<view class="container">
<view class="top">
......@@ -537,6 +540,26 @@ page {
height: 45rpx;
margin-left: 25rpx;
}
.searchBox {
opacity: 1;
width: 256rpx;
height: 56rpx;
background: #ffffff;
border-radius: 28rpx 28rpx 28rpx 28rpx;
display: flex;
align-items: center;
padding-left: 20rpx;
margin-left: 20rpx;
text-align: start;
.magnifyingGlass {
width: 26rpx;
height: 26rpx;
}
.text {
margin-left: 10rpx;
font-size: 24rpx;
}
}
.container {
.top {
width: 100%;
......
......@@ -222,9 +222,22 @@ const hdSubmit = async () => {
...formdata,
images: proImage(),
});
uToast.success('评价成功');
xma.showToast({
title: '发布中',
icon: 'none',
duration: 2000,
success: () => {
xma.redirectTo({
url: `/pages/order/order?status=not_eval`,
complete: () => {
xma.showToast({
title: '评价成功',
icon: 'none',
duration: 2000,
});
},
});
},
});
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment