From 56d7ebbc6297c306ec7197f29737a59703ca4bda Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 04 三月 2026 10:38:19 +0800
Subject: [PATCH] 合并

---
 mini-program/pages/index/index.vue |   45 ++++++++++++++++++---------------------------
 1 files changed, 18 insertions(+), 27 deletions(-)

diff --git a/mini-program/pages/index/index.vue b/mini-program/pages/index/index.vue
index ed2c49d..692fa9f 100644
--- a/mini-program/pages/index/index.vue
+++ b/mini-program/pages/index/index.vue
@@ -118,7 +118,7 @@
 							</view>
 						</view>
 						<view class="commodity-item-shou">
-							<text>宸插敭{{item.saleNum + item.realSaleNum}}</text>
+							<text>宸插敭{{item.shou}}</text>
 							<view class="commodity-item-shou-add" @click.stop="addCard(item)">+</view>
 						</view>
 					</view>
@@ -152,14 +152,8 @@
 		data() {
 			return {
 				list: [],
-				labels: [
-					[],
-					[]
-				],
-				brand: [
-					[],
-					[],
-				],
+				labels: [],
+				brand: [],
 				specialZone: [],
 				goodsList: [],
 				page: 1,
@@ -282,6 +276,7 @@
 					if (res.code === 200) {
 						res.data.records.forEach(item => {
 							item.minPrice = item.minPrice.toFixed(2).split('.')
+							item.shou = (item.salenum || 0) + (item.realSaleNum || 0)
 						})
 						this.goodsList.push(...res.data.records)
 						this.page++
@@ -353,26 +348,17 @@
 			openLoacing() {
 				var that = this;
 				uni.chooseLocation({
-					success(res1) {
-						const locParam = {
-							latitude: res1.latitude,
-							longitude: res1.longitude
-						};
-						const qqmapsdk = new QQMapWX({
-							key: 'HEIBZ-QJLLM-SZ36X-6ZBHI-S6Y2J-S6FND'
-						});
-						// 鑵捐鍦板浘閫嗗湴鐞嗙紪鐮�
-						qqmapsdk.reverseGeocoder({
-							locParam,
-							success: function(res) {
-								console.log(res,  '==================index鑾峰彇鍦板潃')
-								console.log(locParam)
-								that.$store.commit('setPosition', res.result)
+					success(res) {
+						let obj = {
+							formatted_addresses: {
+								recommend: res.name
 							},
-							fail: (err) => {
-								console.error('鑾峰彇浣嶇疆澶辫触===========', err);
+							location: {
+								lat: res.latitude,
+								lng: res.longitude
 							}
-						});
+						}
+						that.$store.commit('setPosition', obj)
 					}
 				})
 			},
@@ -591,6 +577,11 @@
 						box-sizing: border-box;
 
 						.commodity-item-box-title {
+							width: 100%;
+							display: -webkit-box;
+							-webkit-box-orient: vertical;
+							-webkit-line-clamp: 2;
+							overflow: hidden;
 							font-weight: 600;
 							font-size: 30rpx;
 							color: #222222;

--
Gitblit v1.9.3