WIN-2CJ8FMUT9OF\Administrator 7 місяців тому
батько
коміт
774bd7f1a3

+ 6 - 6
pages-takeout/new-shop.vue

@@ -25,13 +25,13 @@
 				<view class="fs-40 fw-600 text-overflow-ellipsis">
 					{{shopsInfo.shop_name || ''}}
 				</view>
-				<view class="fs-24 fw-400 fc-9 text-overflow-ellipsis-one pt-15" v-if="shopsInfo.notice">
+				<view class="fs-24 fw-400 fc-9 text-overflow-ellipsis-one pt-15">
 					公告:{{shopsInfo.notice || '暂无公告'}}
 				</view>
 			</view>
 		</view>
 
-		<view class="b-b-eee bgc-f box-border-box p-0-32-12 align-items-center flex-justify-space z-3 shop-type-box">
+		<view class="b-b-eee box-border-box p-0-32-12 align-items-center flex-justify-space z-3 shop-type-box">
 			<view class="align-items-center shop-type-list">
 				<view class="shop-item fs-36 mb-8 mr-64" @click="seletShopType(item)"
 					:class="shopType === item.id?'fc-3 fw-600':'fc-6'" v-for="(item,i) in shopTypeList" :key="i">
@@ -74,7 +74,7 @@
 						<view class="" v-if="item.list <= 0">
 							<EnBlank message='暂无商品' :customSrc='true'>
 								<template v-slot:blankImg>
-									<image class="<strong>black-custom-img</strong>"
+									<image class="black-custom-img"
 										src="@/static/img/common/no-order.png" mode="">
 									</image>
 								</template>
@@ -82,16 +82,16 @@
 						</view>
 						<view class="menu-list flex-justify-space box-border-box" v-for="(info,k) in item.list" :key="k"
 							:id="'goods_id'+ info.goods_id">
-							<image class="flex-shrink0 goods_img" :src="info.goods_image" mode="scaleToFill"></image>
+							<image class="flex-shrink0 goods_img b-rad-12" :src="info.goods_image" mode="scaleToFill"></image>
 							<view class="menu-list-right flex-direction flex-justify-space">
 								<view class="mb-8">
 									<view class="mb-4 goods-name text-overflow-ellipsis fs-32 fw-600">
 										{{info.goods_name}}
 									</view>
-									<view class="text-overflow-ellipsis-one fw-400 fc-9 fs-24 mb-2 goods-name"
+<!-- 									<view class="text-overflow-ellipsis fw-400 fc-9 fs-24 mb-2 goods-name"
 										v-if="info.spec_type == 1">
 										{{info.goods_desc?info.goods_desc:''}}
-									</view>
+									</view> -->
 								</view>
 								<view class="flex-justify-space align-items-flex-end">
 									<view class="">

+ 3 - 1
pages-takeout/new-specs-info.vue

@@ -179,7 +179,8 @@
 						}
 					});
 				});
-				specPrice = specPrice === 0 ? 1 : specPrice
+				// specPrice = specPrice === 0 ? 1 : specPrice
+				// console.log(basePrice,specPrice,this.infoData.price,'111111111111');
 				// 计算总价:基础价格 + 规格价格 × 商品数量
 				this.total_price = ((basePrice + specPrice + Number(this.infoData.price)) * this.postData.number);
 				// 拼接规格文字
@@ -312,6 +313,7 @@
 					goods_id: goods_id
 				}).then((res) => {
 					if (res.code * 1 === 1) {
+						this.total_price = Number(res.data.goods.price)
 						this.specsData = res.data.sku
 						this.infoData = res.data.goods
 						this.addSpecNum()

+ 30 - 16
pages/index/search-record.vue

@@ -18,8 +18,13 @@
 				</view>
 			</view>
 		</view>
-
-		<view class="scroll-view-css bgc-f seacrh-info box-border-box p-32" v-if="goodsList.length<=0">
+		<EnBlank message='暂无商品' :customSrc='true' v-if="goodsList.length <=0 && !historyType">
+			<template v-slot:blankImg>
+				<image class="<strong>black-custom-img</strong>" src="@/static/img/common/no-order.png" mode="">
+				</image>
+			</template>
+		</EnBlank>
+		<view class="scroll-view-css bgc-f seacrh-info box-border-box p-32" v-if="goodsList.length<=0 && historyType">
 			<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">
@@ -47,10 +52,10 @@
 						<view class="mb-4 goods-name text-overflow-ellipsis fs-32 fw-600">
 							{{info.goods_name}}
 						</view>
-						<view class="text-overflow-ellipsis-one fw-400 fc-9 fs-24 mb-2 goods-name"
+						<!-- 						<view class="text-overflow-ellipsis-one fw-400 fc-9 fs-24 mb-2 goods-name"
 							v-if="info.spec_type == 1">
 							{{info.goods_desc?info.goods_desc:''}}
-						</view>
+						</view> -->
 					</view>
 					<view class="flex-justify-space align-items-flex-end">
 						<view class="">
@@ -174,12 +179,16 @@
 <script>
 	import cartStore from '@/utils/cartStore.js';
 	import tools from "@/service/tools";
+	import EnBlank from "@/components/en-utils/en-blank/en-blank";
 	import {
 		getSearch,
 		getSearchList,
 		delSearch
 	} from '@/api/goods.js';
 	export default {
+		components: {
+			EnBlank
+		},
 		data() {
 			return {
 				search: '',
@@ -187,14 +196,14 @@
 				showClearIcon: false,
 				list: [],
 				goodsList: [],
-				historyType: false,
+				historyType: true,
 				total: '',
 				page: 1,
 				cartData: { // 添加购物车数据
 					total_price: 0,
 					total_num: 0,
-          pack_price: 0,
-          total_goods_money: 0,
+					pack_price: 0,
+					total_goods_money: 0,
 					goods_list: []
 				}
 			}
@@ -208,11 +217,11 @@
 		},
 		mounted() {},
 		methods: {
-      toConfirmOrder() {
-        uni.navigateTo({
-          url: '/pages-takeout/goods-order'
-        })
-      },
+			toConfirmOrder() {
+				uni.navigateTo({
+					url: '/pages-takeout/goods-order'
+				})
+			},
 			scrolltolower() {
 				if (this.goodsList.length < this.total) {
 					this.page += 1;
@@ -227,7 +236,7 @@
 				const shopCart = cartStore.getShopCart(this.shop_id);
 				if (shopCart) {
 					this.cartData = {
-            ...this.cartData,
+						...this.cartData,
 						total_price: shopCart.total_price || 0,
 						total_num: shopCart.total_num || 0,
 						goods_list: shopCart.goods_list || [],
@@ -268,9 +277,14 @@
 				} else {
 					search = this.search;
 				}
-				this.page = 1
-				this.goodsList = []
-				this.getSearch(search)
+				if (search) {
+					this.historyType = false
+					this.page = 1
+					this.goodsList = []
+					this.getSearch(search)
+				} else {
+					tools.error('请输入搜索内容')
+				}
 			},
 			getSearch(search) {
 				// 搜索商品列表