Browse Source

```
feat(mibiShop): 优化米币商城页面显示逻辑

- 修改.env.development配置文件,注释掉不同环境的API地址配置
- 调整mibiShop.vue页面的商品显示条件,使用item.discountPoints字段判断
- 修复价格计算逻辑,当存在折扣积分时使用折扣积分,否则使用原积分
- 在样式文件中为详情右侧区域添加最大高度限制和滚动条
```

zhangningning 3 weeks ago
parent
commit
74e0aa3601
3 changed files with 6 additions and 3 deletions
  1. 2 1
      .env.development
  2. 2 2
      src/pages/mibiShop/mibiShop.vue
  3. 2 0
      src/styles/index.scss

+ 2 - 1
.env.development

@@ -1,9 +1,10 @@
 # 乔功
 VITE_API_BASE_URL=http://192.168.100.134:8080/api
+# VITE_API_BASE_URL=http://47.104.167.40/prod-api/api
 # VITE_API_BASE_URL=http://192.168.100.134:8080/api
 # VITE_API_BASE_URL=http://192.168.101.12:8080/api
 # 高运甲
-VITE_API_BASE_URL=http://192.168.100.89:8080/api
+# VITE_API_BASE_URL=http://192.168.100.89:8080/api
 # VITE_API_BASE_URL=http://192.168.101.12:8080/api
 
 

+ 2 - 2
src/pages/mibiShop/mibiShop.vue

@@ -11,7 +11,7 @@
             {{item.itemName}}
           </div>
           <div class="flex-center-between">
-            <div v-if="appStore.userInfo?.memberType==1 || appStore.userInfo?.memberType==2">
+            <div v-if="item.discountPoints">
               <div class="font_size20">
                 <div class="bold color_price "> {{item.discountPoints}} {{$t('common.mibi')}}</div>
                 <div class="line_through gray999 mr10 ml10 font_size14">{{item.points}}{{$t('common.mibi')}}</div>
@@ -24,7 +24,7 @@
                 appStore,
                 router,
                 type:'pointsBalance',
-                price:appStore.userInfo?.memberType==1 || appStore.userInfo?.memberType==2 ? item.discountPoints:item.points,
+                price:item.discountPoints ? item.discountPoints:item.points,
                 t,
                 productId:item.itemId,
                 orderType:'mi_mall',

+ 2 - 0
src/styles/index.scss

@@ -66,6 +66,8 @@ li {
 .detail_right {
 	width: 410px;
 	height: fit-content;
+	max-height: calc(100vh - 200px);
+	overflow-y: auto;
 }
 
 .detail_right_content {