Bläddra i källkod

更改类目bug

HHE-5476 2 veckor sedan
förälder
incheckning
3b6beb2c9d
3 ändrade filer med 30 tillägg och 30 borttagningar
  1. 4 4
      config/app.js
  2. 24 24
      pages/merchantCenters/releaseProduct.vue
  3. 2 2
      pages/user/index.vue

+ 4 - 4
config/app.js

@@ -1,16 +1,16 @@
 // let domain = "https://www.shuibeibyg.com/front-api"; // 正式环境IP
-// let domain = "https://test.shuibeibyg.com/front-api"; // 测试环境IP
+let domain = "https://test.shuibeibyg.com/front-api"; // 测试环境IP
 // let domain = 'http://192.168.100.199:8081' // 晋守桦IP
 // let domain = 'http://192.168.100.246:8081' // 韩朝龙IP
-let domain = "http://192.168.3.29:8081"; // 宏广IP
+// let domain = "http://192.168.3.29:8081"; // 宏广IP
 let share = "https://www.shuibeibyg.com";
 
 let imgUrl =
   "https://sb-admin.oss-cn-shenzhen.aliyuncs.com/shuibei-mini/new-mini/"; //服務器上图片地址
 
-export const H5_BASE_URL = "http://192.168.3.10:5174"; // 本地测试
+// export const H5_BASE_URL = "http://192.168.3.10:5174"; // 本地测试
 // export const H5_BASE_URL = "http://192.168.100.35:5175"; // 本地测试
-// export const H5_BASE_URL = "https://test.shuibeibyg.com/web-h5/"; // 测试环境H5地址
+export const H5_BASE_URL = "https://test.shuibeibyg.com/web-h5/"; // 测试环境H5地址
 // export const H5_BASE_URL = "https://www.shuibeibyg.com/web-h5/"; // 正式环境H5地址
 
 // PC 后台 API 地址(用于上传图片)

+ 24 - 24
pages/merchantCenters/releaseProduct.vue

@@ -13,12 +13,12 @@
 					</template>
 				</up-form-item>
 
-				<!-- 商类目 -->
-				<view class="card-title" v-if="!isProductCenter">商类目</view>
-				<up-form-item class="form-item" label="商类目" prop="merchantCategoryId" :borderBottom="false"
+				<!-- 商类目 -->
+				<view class="card-title" v-if="!isProductCenter">商类目</view>
+				<up-form-item class="form-item" label="商类目" prop="merchantCategoryId" :borderBottom="false"
 					@click="showMerchantCategory = true" :required="true" v-if="!isProductCenter">
 					<up-input v-model="formData.merchantCategoryDisplayName" disabled disabledColor="#ffffff"
-						placeholder="请选择商类目" inputAlign="right" border="none"></up-input>
+						placeholder="请选择商类目" inputAlign="right" border="none"></up-input>
 					<template #right>
 						<up-icon name="arrow-right"></up-icon>
 					</template>
@@ -287,7 +287,7 @@
 			</view>
 		</up-popup>
 
-		<!-- 商类目选择弹窗 -->
+		<!-- 商类目选择弹窗 -->
 		<up-popup
 		    :show="showMerchantCategory"
 		    @close="showMerchantCategory = false"
@@ -297,7 +297,7 @@
 		>
 		  <view class="popup-content">
 		    <view class="popup-header">
-		      <text class="popup-title">选择商类目</text>
+		      <text class="popup-title">选择商类目</text>
 		    </view>
 
 		    <category-selector
@@ -374,8 +374,8 @@
 	const formData = ref({
 		categoryIds: [], // 选中的分类ID数组
 		categoryDisplayName: '', // 显示的分类名称
-		merchantCategoryId: [], // 选中的商类目ID数组(单选:长度始终为1)
-		merchantCategoryDisplayName: '', // 显示的商类目名称
+		merchantCategoryId: [], // 选中的商类目ID数组(单选:长度始终为1)
+		merchantCategoryDisplayName: '', // 显示的商类目名称
 		tempName: '', // 显示的运费模板名称
 		tempIds: [],
 		storeName: '',
@@ -407,7 +407,7 @@
 	const categoryData = ref([]);
 	const categoryRef = ref();
 
-	// 商类目相关
+	// 商类目相关
 	const showMerchantCategory = ref(false);
 	const merchantCategoryData = ref([]);
 	const merchantCategoryRef = ref();
@@ -464,7 +464,7 @@
 			type: 'array',
 			required: true,
 			len: 1,
-			message: '请选择一个商类目',
+			message: '请选择一个商类目',
 			trigger: ['blur','change']
 		},
 		storeName: {
@@ -575,22 +575,22 @@
 		}
 	}
 
-	// 获取商类目列表
+	// 获取商类目列表
 	async function getMerchantCategoryList(){
 	  try {
 	    const { data } = await getMerchantCategory();
-	    console.log('原始商类目数据:', data);
+	    console.log('原始商类目数据:', data);
 	    
 	    merchantCategoryData.value = data.map(item => ({
 	      id: item.id,
 	      name: item.categoryName, 
 	      child: [] 
 	    }));
-	    console.log('适配后的商类目数据:', merchantCategoryData.value);
+	    console.log('适配后的商类目数据:', merchantCategoryData.value);
 
 	  } catch (error) {
-	    console.error('获取商类目失败:', error);
-	    uni.showToast({ title: '获取商类目失败', icon: 'none' });
+	    console.error('获取商类目失败:', error);
+	    uni.showToast({ title: '获取商类目失败', icon: 'none' });
 	  }
 	}
 
@@ -663,7 +663,7 @@
 			productImages.value = [];
 
 			console.log('分类IDs:', formData.value.categoryIds);
-			console.log('商类目IDs:', formData.value.merchantCategoryId); 
+			console.log('商类目IDs:', formData.value.merchantCategoryId); 
 			console.log('运费模板IDs:', formData.value.tempIds);
 
 			await nextTick();
@@ -725,7 +725,7 @@
 				}
 			}
 
-			// 设置商类目选择器
+			// 设置商类目选择器
 			if (merchantCategoryRef.value && formData.value.merchantCategoryId.length > 0) {
 				await nextTick();
 				if (merchantCategoryRef.value.setSelectedIds) {
@@ -767,9 +767,9 @@
 		console.log('分类选择变化:', result);
 	}
 
-	// 商类目选择变化
+	// 商类目选择变化
 	const onMerchantCategoryChange = (result) => {
-		console.log('商类目选择变化:', result);
+		console.log('商类目选择变化:', result);
 	}
 
 	// 确认分类选择
@@ -798,25 +798,25 @@
 		}
 	}
 
-	// 确认商类目选择
+	// 确认商类目选择
 	const confirmMerchantCategory = () => {
 	  if (merchantCategoryRef.value) {
 	    let selectedIds = merchantCategoryRef.value.getSelectedIds()
 
 	    if (selectedIds.length === 0) {
-	      uni.showToast({ title: '请选择一个商类目', icon: 'none' })
+	      uni.showToast({ title: '请选择一个商类目', icon: 'none' })
 	      return
 	    }
 	    if (selectedIds.length > 1) {
 	      selectedIds = [selectedIds[0]]
-	      uni.showToast({ title: '商类目仅支持选择一个', icon: 'none' })
+	      uni.showToast({ title: '商类目仅支持选择一个', icon: 'none' })
 	    }
 
 	    formData.value.merchantCategoryId = selectedIds
 	    formData.value.merchantCategoryDisplayName = getMerchantCategoryDisplayName(selectedIds)
 
 	    showMerchantCategory.value = false
-	    console.log('最终选中的商类目ID(单选):', selectedIds)
+	    console.log('最终选中的商类目ID(单选):', selectedIds)
 	    setTimeout(() => {
 	      if (formRef.value) {
 	        formRef.value.validateField('merchantCategoryId');
@@ -858,7 +858,7 @@
 		return names.join('、')
 	}
 
-	// 生成商类目显示名称
+	// 生成商类目显示名称
 	const getMerchantCategoryDisplayName = (selectedIds) => {
 	  if (!selectedIds || selectedIds.length === 0) return ''
 

+ 2 - 2
pages/user/index.vue

@@ -707,7 +707,7 @@ function handleFaceDetect() {
   display: flex;
   justify-content: space-between;
   align-items: center;
-  margin-bottom: 20rpx;
+  margin:24rpx 0;
 }
 .user-detail{
   display: flex;
@@ -829,7 +829,7 @@ function handleFaceDetect() {
 /* 钱包余额 */
 .wallet-section {
   background: #fff;
-  margin: -176rpx 20rpx 20rpx;
+  margin: -150rpx 20rpx 20rpx;
   border-radius: 24rpx;
   padding: 32rpx;
 }