Explorar el Código

fix(config): 修正开发和试用环境接口配置

- 恢复开发环境 http://192.168.0.157:8080 的启用状态
- 注释掉原本启用的开发环境 http://47.109.84.152:8081
- 启用试用环境 http://47.109.84.152:8081
- 注释掉试用环境 https://smqjh.api.zswlgz.com 的启用状态

fix(integral): 优化积分记录展示逻辑

- 移除废弃的积分类型数组 type
- 修改积分类型显示,优先显示 item.businessTypeName,默认为“未知状态”
- 删除未使用的 getLabel 方法,简化代码

fix(confirmOrder): 修正订单金额计算精度问题

- 使用 Math.round 对配送费和价格乘以 100 后的结果进行四舍五入
- 防止金额乘法导致的浮点数精度误差影响抵扣点数计算
zhangtao hace 4 días
padre
commit
07dabebcf9

+ 4 - 4
src/config/index.ts

@@ -4,14 +4,14 @@ 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.0.19:8080', // 邓
   // develop: 'http://192.168.0.217:8080', // 黄
   // develop: 'http://192.168.0.11:8080', // 王
   // develop: 'http://192.168.1.89:8080', // 田
   // develop: 'http://74949mkfh190.vicp.fun', // 付
-  develop: 'http://47.109.84.152:8081',
+  // develop: 'http://47.109.84.152:8081',
   // develop: 'https://5ed0f7cc.r9.vip.cpolar.cn',
   // develop: 'https://smqjh.api.zswlgz.com',
   /**
@@ -19,9 +19,9 @@ const mapEnvVersion = {
    */
   // trial: "http://192.168.1.166:8080/jeecg-boot",
   // trial: 'http://192.168.0.157:8080',
-  // trial: 'http://47.109.84.152:8081',
+  trial: 'http://47.109.84.152:8081',
   // trial: 'http://192.168.1.166:8080',
-  trial: 'https://smqjh.api.zswlgz.com',
+  // trial: 'https://smqjh.api.zswlgz.com',
   /**
    * 正式版
    */

+ 1 - 5
src/subPack-common/integral/index.vue

@@ -14,7 +14,6 @@ const { data: info } = useRequest(() =>
   Apis.xsb.findUserPoints({}),
 )
 
-const type = ['充值', '下单', '退款', '过期积分', '退款过期积分']
 const { data: pointList, isLastPage, page } = usePagination((pageNum, pageSize) => Apis.xsb.findUserPointsPage({ data: { pageNum, pageSize } }), { data: resp => resp.data?.list, initialPage: 1, initialPageSize: 10, immediate: true, append: true })
 
 function handleScrollBottom() {
@@ -29,9 +28,6 @@ async function getNavList() {
   navTabTypeList.value = res.data?.list || []
 }
 getNavList()
-function getLabel(val: string) {
-  return navTabTypeList.value.find(i => i.value === val)?.name || '未知类型'
-}
 </script>
 
 <template>
@@ -77,7 +73,7 @@ function getLabel(val: string) {
       <view v-for="item, index in pointList" :key="item.pointsId" class="bg-white p-24rpx">
         <view class="flex items-center justify-between text-32rpx font-semibold">
           <view class="text-[#222]">
-            {{ (type[Number(item.pointsType) - 1] == '下单' ? getLabel(item.businessType) : type[Number(item.pointsType) - 1]) || '未知状态' }}
+            {{ item.businessTypeName || '未知状态' }}
           </view>
           <view class="text-[#FF4A39]">
             {{ item?.pointsTypeName }}{{ item?.variablePoints || 0 }}

+ 1 - 1
src/subPack-xsb/confirmOrder/index.vue

@@ -16,7 +16,7 @@ const isPay = ref(false)
 const remarks = ref('')
 
 const offsetPoints = computed(() => {
-  const money = (Number(unref(orderInfo)?.transfee) * 100) + (Number(unref(orderInfo)?.price) * 100)
+  const money = Math.round(Number(unref(orderInfo)?.transfee) * 100) + Math.round(Number(unref(orderInfo)?.price) * 100)
   if (Number(unref(orderInfo)?.offsetPoints) > money) {
     return money
   }