Переглянути джерело

fix(config): 更新开发环境API配置

- 注释掉旧的开发服务器地址 http://192.168.0.157:8080
- 启用新的开发服务器地址 http://47.109.84.152:8081

fix(xsb/goods): 添加购物车错误提示

- 在添加购物车异常处理中增加全局toast提示
- 将错误信息显示给用户
zhangtao 2 днів тому
батько
коміт
10cdb92c04
2 змінених файлів з 5 додано та 4 видалено
  1. 2 2
      src/config/index.ts
  2. 3 2
      src/subPack-xsb/goods/index.vue

+ 2 - 2
src/config/index.ts

@@ -13,10 +13,10 @@ const mapEnvVersion = {
    */
   // develop: 'http://192.168.1.166:8080', // 张
   // develop: 'http://192.168.1.101:8080',
-  develop: 'http://192.168.0.157:8080',
+  // develop: 'http://192.168.0.157:8080',
   // develop: 'http://192.168.1.253:8080',
   // develop: 'http://192.168.1.89:8080', // 田
-  // develop: 'http://47.109.84.152:8081',
+  develop: 'http://47.109.84.152:8081',
   /**
    * 体验版
    */

+ 3 - 2
src/subPack-xsb/goods/index.vue

@@ -120,6 +120,7 @@ async function handleAddCart() {
   }
   catch (error) {
     console.log(error)
+    useGlobalToast().show(String(error))
   }
 }
 </script>
@@ -139,7 +140,7 @@ async function handleAddCart() {
           </view>
         </template>
       </wd-swiper>
-      <view class="header view-0 relative z-3 rounded-t-32rpx px24rpx pt24rpx -mt30rpx">
+      <view class="view-0 header relative z-3 rounded-t-32rpx px24rpx pt24rpx -mt30rpx">
         <view class="flex items-center justify-between">
           <view class="flex items-end text-#FF4D3A font-semibold">
             <view class="text-24rpx">
@@ -340,7 +341,7 @@ async function handleAddCart() {
 
           <view class="flex items-center">
             <view class="w220rpx">
-              <wd-button plain hairline block @click="selectGoods = true">
+              <wd-button hairline plain block @click="selectGoods = true">
                 加入购物车
               </wd-button>
             </view>