py 2 lat temu
rodzic
commit
a343650cfb

+ 207 - 198
components/en-utils/en-nav/en-nav.vue

@@ -1,211 +1,220 @@
 <template>
-  <view class="">
-    <view class="header" :style="style">
-      <view class="flexbox" 
-		  :class="{
+	<view class="">
+		<view class="header" :style="style">
+			<view class="flexbox" :class="{
 		  'flexbox-xcx':(isXcx && rightShow),
 		  'flex-justify-space':!customNav,
 		  'align-items-center':!customNav,
-		  }"
-        :style="[{'height': customBarH + 'px', 'padding-top': statusBarH + 'px','background':bgckgroundBox}]">
-        <view @tap="goBack" v-if="leftShow">
-		  <uni-icons type="left" :color="leftColor" size="18"  ></uni-icons>
-        </view>
-
-        <view v-if="!customNav" :style="[{'color': titleColor}]" class="title-text">{{title}}</view>
-		<view v-else class="">
-			<slot name="custom"></slot>
+		  }" :style="[{'height': customBarH + 'px', 'padding-top': statusBarH + 'px','background':bgckgroundBox}]">
+				<view @tap="goBack" v-if="leftShow">
+					<!-- <uni-icons type="left" :color="leftColor" size="18"  ></uni-icons> -->
+					<image class="toLeft" src="@/static/img/toLeft.png" mode=""></image>
+				</view>
+
+				<view v-if="!customNav" :style="[{'color': titleColor}]" class="title-text">{{title}}</view>
+				<view v-else class="">
+					<slot name="custom"></slot>
+				</view>
+
+
+
+				<view v-if="rightShow" class="right-button button" @click="rightClick">
+					<slot name="right">
+						<text class="rightName" v-if="rightType===1">{{rightText}}</text>
+						<text class="rightName r-but" v-else>{{rightText}}</text>
+					</slot>
+				</view>
+				<view v-else class="w-right"></view>
+
+			</view>
+		</view>
+
+		<view class="box-title">
+			<view class="" :style="[{'height': customBarH + 'px', 'padding-top': statusBarH + 'px'}]">
+			</view>
 		</view>
-		
-		
-		
-        <view v-if="rightShow" class="right-button button" @click="rightClick">
-          <slot name="right" >
-            <text class="rightName" v-if="rightType===1">{{rightText}}</text>
-            <text class="rightName r-but" v-else>{{rightText}}</text>
-          </slot>
-        </view>
-		<view v-else class="w-right"></view>
-		
-      </view>
-    </view>
-	
-    <view class="box-title">
-      <view class="" :style="[{'height': customBarH + 'px', 'padding-top': statusBarH + 'px'}]">
-      </view>
-    </view>
-  </view>
+	</view>
 
 
 </template>
 
 <script>
-  import tools from "@/service/tools";
-
-  export default {
-    name: "en-nav",
-    data() {
-      return {
-        statusBarH: 0,
-        customBarH: 0,
-        left: 35,
-        isXcx:false
-      }
-    },
-    props: {
-      title: {
-        type: String,
-        default: ''
-      },
-	  customNav:{
-		  type: Boolean,
-		  default: false
-	  },
-	  leftColor: {
-		  type: String,
-		  default: '#333'
-	  },
-      leftShow: {
-        type: Boolean,
-        default: true
-      },
-      bgckgroundBox: {
-        type: String,
-        default: '#fff'
-      },
-
-      titleColor: {
-        type: String,
-        default: '#333'
-      },
-      bgColor: {
-        type: String,
-        default: '#707'
-      },
-      rightText: {
-        type: String,
-        default: ''
-      },
-      rightShow: {
-        type: Boolean,
-        default: false
-      },
-      rightType: {
-        default: 1
-      },
-    },
-    computed: {
-      style() {
-        let _style = `height: ${this.customBarH}px;`
-        return _style
-      }
-    },
-    watch: {
-      leftShow(e) {
-        if (e == true) {
-          this.left = 0
-        }
-      }
-    },
-    methods: {
-      rightClick() {
-        this.$emit('rightClick')
-      },
-      goBack() {
-        if(!this.leftShow){
-          return ;
-        }
-        tools.leftClick()
-      }
-    },
-    created() {
-      uni.getSystemInfo({
-        success: (e) =>{
-          this.statusBarH = e.statusBarHeight + 10
-          let custom=0;
-          //#ifdef MP-WEIXIN
-          custom = wx.getMenuButtonBoundingClientRect()
-		  
-          this.customBarH = custom.height
-          //#endif
-          //#ifdef H5
-          this.customBarH = 30
-          this.left=0
-          //#endif
-          
-          this.$emit('navHeight', this.customBarH-10)
-        }
-      })
-      //#ifdef MP-WEIXIN
-      this.isXcx=true
-      //#endif
-    }
-  }
+	import tools from "@/service/tools";
+
+	export default {
+		name: "en-nav",
+		data() {
+			return {
+				statusBarH: 0,
+				customBarH: 0,
+				left: 35,
+				isXcx: false
+			}
+		},
+		props: {
+			title: {
+				type: String,
+				default: ''
+			},
+			customNav: {
+				type: Boolean,
+				default: false
+			},
+			leftColor: {
+				type: String,
+				default: '#333'
+			},
+			leftShow: {
+				type: Boolean,
+				default: true
+			},
+			bgckgroundBox: {
+				type: String,
+				default: '#fff'
+			},
+
+			titleColor: {
+				type: String,
+				default: '#333'
+			},
+			bgColor: {
+				type: String,
+				default: '#707'
+			},
+			rightText: {
+				type: String,
+				default: ''
+			},
+			rightShow: {
+				type: Boolean,
+				default: false
+			},
+			rightType: {
+				default: 1
+			},
+		},
+		computed: {
+			style() {
+				let _style = `height: ${this.customBarH}px;`
+				return _style
+			}
+		},
+		watch: {
+			leftShow(e) {
+				if (e == true) {
+					this.left = 0
+				}
+			}
+		},
+		methods: {
+			rightClick() {
+				this.$emit('rightClick')
+			},
+			goBack() {
+				if (!this.leftShow) {
+					return;
+				}
+				tools.leftClick()
+			}
+		},
+		created() {
+			uni.getSystemInfo({
+				success: (e) => {
+					this.statusBarH = e.statusBarHeight + 10
+					let custom = 0;
+					//#ifdef MP-WEIXIN
+					custom = wx.getMenuButtonBoundingClientRect()
+
+					this.customBarH = custom.height
+					//#endif
+					//#ifdef H5
+					this.customBarH = 30
+					this.left = 0
+					//#endif
+
+					this.$emit('navHeight', this.customBarH - 10)
+				}
+			})
+			//#ifdef MP-WEIXIN
+			this.isXcx = true
+			//#endif
+		}
+	}
 </script>
 
 <style scoped lang="scss">
-@import url("../../static/css/en-common.css") ;
-
-  .header {
-    width: 100vw;
-    position: fixed;
-    left: 0;
-    top: 0;
-    z-index: 999999;
-	
-    .flexbox {
-      // display: flex;
-	  // align-items: center;
-      // justify-content: space-between;
-      padding: 0 24rpx;
-      .iconfont{
-        color: #333333;
-		font-size: 34rpx;
-      }
-      .title-text {
-        font-size: 36rpx;
-        font-weight: 600;
-      }
-      .icon-left {
-        width: 20px;
-        height: 20px;
-      }
-
-      .button {
-        position: relative;
-        z-index: 5;
-        // width: 21px;
-        .rightName {
-          font-size: 14px;
-          color: #333333;
-        }
-        .r-but{
-          background-color:#FF0000 ;
-          color: #fff;
-          font-size: 12px;
-          padding: 5px;
-          border-radius: 3px;
-        }
-      }
-    }
-    .flexbox-xcx{
-      justify-content:left;
-      position: relative;
-      .right-button{
-        position: absolute;
-        right: 220rpx;
-      }
-    }
-
-  }
-
-  .w-right{
-	  width: 20rpx;
-  }
-
-  .box-title {
-    width: 100vw;
-  }
-
-
-</style>
+	@import url("../../static/css/en-common.css");
+
+	.toLeft {
+		width: 44rpx;
+		height: 44rpx;
+	}
+
+	.header {
+		width: 100vw;
+		position: fixed;
+		left: 0;
+		top: 0;
+		z-index: 999999;
+
+		.flexbox {
+			// display: flex;
+			// align-items: center;
+			// justify-content: space-between;
+			padding: 0 24rpx;
+
+			.iconfont {
+				color: #333333;
+				font-size: 34rpx;
+			}
+
+			.title-text {
+				font-size: 36rpx;
+				font-weight: 600;
+			}
+
+			.icon-left {
+				width: 20px;
+				height: 20px;
+			}
+
+			.button {
+				position: relative;
+				z-index: 5;
+
+				// width: 21px;
+				.rightName {
+					font-size: 14px;
+					color: #333333;
+				}
+
+				.r-but {
+					background-color: #FF0000;
+					color: #fff;
+					font-size: 12px;
+					padding: 5px;
+					border-radius: 3px;
+				}
+			}
+		}
+
+		.flexbox-xcx {
+			justify-content: left;
+			position: relative;
+
+			.right-button {
+				position: absolute;
+				right: 220rpx;
+			}
+		}
+
+	}
+
+	.w-right {
+		width: 20rpx;
+	}
+
+	.box-title {
+		width: 100vw;
+	}
+</style>

+ 6 - 2
pages-address/select-school.vue

@@ -2,14 +2,14 @@
 	<view class="select-school-index iPhone-bottom flex-common-css box-border-box">
 		<Nav  :leftShow='leftShow' title='选择学校'></Nav>
 		
-		<view class="bgc-f box-border-box p-24 mb-28">
+		<view class="bgc-f box-border-box p-24 mb-20">
 			<view class="head-search mb-32">
 				<input v-model="fromData.search" type="text" placeholder="搜索学校名称">
 				<view class="fs-28 fc-f index-search-box-buttom" @click="search()">搜索</view>
 			</view>
 			
 			<view class="head-address display-flex" v-if="schoolData.school_name">
-				<uni-icons type="location-filled" size="24"></uni-icons>
+				<image class="wh-48" src="@/static/img/index/dw.png" mode=""></image>
 				<view class="ml-16">
 					<view class="fs-36 fw-600 mb-12">{{schoolData.school_name||''}}</view>
 				</view>
@@ -156,6 +156,10 @@
 
 
 <style scoped lang="scss">
+	.wh-48 {
+		width: 48rpx;
+		height: 48rpx;
+	}
 	.select-school-index{
 		.head-search{
 			position: relative;

+ 9 - 7
pages/index/index.vue

@@ -8,7 +8,7 @@
 					<view slot="custom" class="align-items-center" @click="toSelectSchool()">
 						<!-- <uni-icons type="location-filled" size="20"></uni-icons> -->
 						<image class="wh-40" src="@/static/img/index/dw.png" mode=""></image>
-						<view class="fs-32 w-220 fw-600 ml-10 text-overflow-ellipsis-one">{{schoolData.school_name||''}}
+						<view class="fs-32 maxw-220 fw-600 ml-10 text-overflow-ellipsis-one">{{schoolData.school_name||''}}
 						</view>
 						<image class="nav-icon ml-10" src="@/static/img/index/index-right.png" mode="aspectFit"></image>
 					</view>
@@ -110,13 +110,13 @@
 							<image class="right-box-title-img" src="@/static/img/toRight.png" mode=""></image>
 						</view>
 						<view class="align-items-center mb-12">
-							<image class="img-x mr-12" src="@/static/img/my/wdpj.png" mode=""></image>
+							<image class="img-x mr-12" src="@/static/img/index/index-x.png" mode=""></image>
 							<view class="fs-26 fw-600 fc-FF7F00 mr-12">{{item.shop_score}}分</view>
 							<view class="fc-6 fs-24 mr-12">| 预计{{item.delivery_time}}分钟 |</view>
 							<view class="fc-6 fs-24 mr-12">{{item.shop_sales}}人购买</view>
 						</view>
 						<view class="align-items-center flex-wrap-wrap">
-							<view class="quan-list display-flex mr-12 mb-12" v-for="(info1,index1) in item.coupon"
+							<view class="quan-list align-items-center mr-12 mb-16" v-for="(info1,index1) in item.coupon"
 								:key="index1">
 								<view class="quan-list-1 fs-24 fc-f">券</view>
 								<view class="quan-list-2 fs-24 fc-FB3D03">{{info1.money}}元</view>
@@ -553,15 +553,15 @@
 	}
 
 	.index-box {
-		.w-220 {
-			width: 220rpx;
+		.maxw-220 {
+			max-width: 220rpx;
 		}
 
 		position: relative;
 
 		.bg-img {
 			width: 100%;
-			height: 900rpx;
+			height: 930rpx;
 			position: absolute;
 			top: 0;
 			left: 0;
@@ -797,12 +797,14 @@
 						background: #FB3D03;
 						border-radius: 5rpx 0rpx 0rpx 5rpx;
 						text-align: center;
+						line-height: 34rpx;
 					}
 
 					.quan-list-2 {
 						box-sizing: border-box;
-						padding: 0 2rpx;
 						height: 34rpx;
+						line-height: 34rpx;
+						padding: 0 4rpx;
 						border-radius: 0 5rpx 5rpx 0;
 						border: 1rpx solid #FB3D03;
 						text-align: center;

+ 81 - 49
pages/index/search-record.vue

@@ -2,75 +2,98 @@
 	<view class="seacrh-record-index iPhone-bottom flex-common-css box-border-box">
 		<view class="seacrh-bg"></view>
 		<Nav title='搜索' bgckgroundBox='transparent'></Nav>
-		
+
 		<view class="s-input">
-			<view class="input-icon">
+			<!-- <view class="input-icon">
 				<uni-icons type="search" size="18" color="#999"></uni-icons>
-			</view>
+			</view> -->
+			<image class="wh32" src="@/static/img/index/ss.png" mode=""></image>
 			<input v-model="search" type="text" placeholder="店铺名称或者商品名称">
 			<view class="input-buttom fs-28 fc-f fw-500" @click="toList()">搜索</view>
 		</view>
-		
+
 		<view class="scroll-view-css bgc-f seacrh-info box-border-box p-32">
 			<view class="flex-justify-space mb-32">
 				<view class="fs-32 fw-600 fc-3">搜索历史</view>
-				<view class="align-items-center" v-if="list.length > 0">
-					<view @click="isOpen=!isOpen" class="">{{isOpen?'收起':'展开'}}</view>
-					<view @click="isOpen=!isOpen" :class="isOpen?'down':'up'">
+				<view class="align-items-center" v-if="list.length > 0 && historyType">
+					<view @click="isOpen=!isOpen" class="">{{!isOpen?'收起':'展开'}}</view>
+					<view @click="isOpen=!isOpen" :class="!isOpen?'down':'up'">
 						<uni-icons type="right" size="14" color="#999"></uni-icons>
 					</view>
 					<view class="view-x"></view>
 					<uni-icons @click="delList()" type="trash" size="18" color="#999"></uni-icons>
 				</view>
 			</view>
-			<view :class="!isOpen?'hide-h':''" class="flex-wrap-wrap mb-50" v-if="list.length > 0">
-				<view class="fs-28 list-item text-overflow-ellipsis-one" @click="toList(item)" v-for="(item,i) in list" :key="i">{{item}}</view>
+			<view id='' :class="isOpen?'hide-h':''" class="flex-wrap-wrap mb-50 search-history" v-if="list.length > 0">
+				<view class="fs-28 list-item text-overflow-ellipsis-one" @click="toList(item)" v-for="(item,i) in list"
+					:key="i">{{item}}</view>
 			</view>
-			
-		
+
+
 		</view>
 	</view>
 </template>
 
 <script>
 	import tools from "@/service/tools";
-	import {getSearchList,delSearch} from '@/api/goods.js';
+	import {
+		getSearchList,
+		delSearch
+	} from '@/api/goods.js';
 	export default {
-		data(){
-			return{
-				search:'',
-				isOpen:false,
-				list:[],
+		data() {
+			return {
+				search: '',
+				isOpen: false,
+				list: [],
+				historyType: false
 			}
 		},
 		onShow() {
 			this.getList()
 		},
-		methods:{
-			getList(){
-				getSearchList().then((res)=>{
-					if(res.code === 1){
+		mounted() {},
+		methods: {
+			history() {
+				// uni.createSelectorQuery().select('.search-history').boundingClientRect(data => {
+				// 	if (data.height > 116) {
+				// 		this.historyType = true
+				// 	}
+				// 	console.log(this.historyType);
+				// }).exec()
+				const query = uni.createSelectorQuery().in(this)
+				query
+					.select('.search-history')
+					.boundingClientRect(data => {
+						console.log(data.height)
+					})
+					.exec();
+
+			},
+			getList() {
+				getSearchList().then((res) => {
+					if (res.code === 1) {
 						this.list = res.data.my_search;
 					}
 				})
 			},
-			toList(name){
+			toList(name) {
 				let search = '';
-				if(name){
+				if (name) {
 					search = name;
-				}else{
+				} else {
 					search = this.search;
 				}
-				if(!search){
+				if (!search) {
 					return tools.error('请输入搜索内容')
 				}
 				uni.navigateTo({
-					url:"pages/index/search-list?search=" + search
+					url: "pages/index/search-list?search=" + search
 				})
 			},
-			delList(){
-				delSearch().then((res)=>{
-					if(res.code === 1){
+			delList() {
+				delSearch().then((res) => {
+					if (res.code === 1) {
 						tools.success('删除成功');
 						this.list = [];
 					}
@@ -81,35 +104,37 @@
 </script>
 
 <style scoped lang="scss">
-	.seacrh-record-index{
+	.seacrh-record-index {
 		position: relative;
-		
-		.hide-h{
+
+		.hide-h {
 			height: 232rpx !important;
 			overflow: hidden !important;
 		}
-		
-		.down{
+
+		.down {
 			transform: rotate(-90deg);
 			transition: all 0.5s;
 		}
-		.up{
+
+		.up {
 			transform: rotate(90deg);
 			transition: all 0.5s;
 		}
-		.view-x{
+
+		.view-x {
 			width: 2rpx;
 			height: 20rpx;
 			background-color: #eee;
 			margin: 0 24rpx;
 		}
-		
-		.find-item{
+
+		.find-item {
 			width: 48%;
 			text-align: left;
 		}
-		
-		.list-item{
+
+		.list-item {
 			max-height: 688rpx;
 			min-width: 10rpx;
 			height: 56rpx;
@@ -120,30 +145,35 @@
 			box-sizing: border-box;
 			padding: 0 24rpx;
 		}
-		
-		.seacrh-bg{
+
+		.seacrh-bg {
 			position: absolute;
 			top: 0;
 			left: 0;
 			width: 100%;
 			height: 376rpx;
 			filter: blur(80rpx);
-			background-image: linear-gradient(to right, #C9F7FC,#F9F6E0,#F6F5F3);
+			background-image: linear-gradient(to right, #C9F7FC, #F9F6E0, #F6F5F3);
 			z-index: -1;
 		}
-		.s-input{
+
+		.s-input {
 			margin-top: 24rpx;
 			width: 100%;
 			height: 72rpx;
 			padding: 0 24rpx;
 			box-sizing: border-box;
 			position: relative;
-			.input-icon{
+
+			.wh32 {
 				position: absolute;
 				left: 48rpx;
 				top: 20rpx;
+				width: 32rpx;
+				height: 32rpx;
 			}
-			input{
+
+			input {
 				font-size: 32rpx;
 				width: 100%;
 				height: 72rpx;
@@ -152,10 +182,11 @@
 				box-sizing: border-box;
 				padding: 0 126rpx 0 78rpx;
 			}
-			.input-buttom{
+
+			.input-buttom {
 				width: 120rpx;
 				height: 60rpx;
-				background: linear-gradient( 90deg, #57CAFF 0%, #41ABF5 100%);
+				background: linear-gradient(90deg, #57CAFF 0%, #41ABF5 100%);
 				border-radius: 200rpx;
 				text-align: center;
 				line-height: 60rpx;
@@ -164,7 +195,8 @@
 				top: 6rpx;
 			}
 		}
-		.seacrh-info{
+
+		.seacrh-info {
 			margin-top: 20rpx;
 			border-radius: 24rpx 24rpx 0rpx 0rpx;
 		}

BIN
static/img/toLeft.png