Browse Source

fix:运费不通过的时候提示

dev_des
1054425342@qq.com 3 weeks ago
parent
commit
5020a8c59e
  1. 27
      pages/index/timeShopBank.vue
  2. 4
      pages/notes/detail.vue
  3. 2
      pages/notes/publish.vue
  4. 5
      static/js/request.js
  5. 13
      subPackages/techan/order.vue

27
pages/index/timeShopBank.vue

@ -43,7 +43,7 @@
<!-- 内容区域 -->
<view class="content-area">
<view v-if="currentTab == 0" class="notes-content">
<!-- <view v-if="currentTab == 0" class="notes-content">
<WaterfallLayout
:items="waterfallItems"
:column-count="2"
@ -53,18 +53,18 @@
@like-change="handleNoteLikeChange"
style="margin-top: 20rpx"
/>
</view>
<!-- <view v-if="currentTab === 0" class="follow-content recommend-content">
<text class="coming-soon">笔记功能开发中...</text>
</view> -->
<view v-if="currentTab === 0" class="follow-content recommend-content">
<text class="coming-soon">笔记功能开发中...</text>
</view>
<!-- 关注tab内容 -->
<view v-if="currentTab == 1" class="follow-content">
<FollowTab ref="followTab" />
<!-- <text class="coming-soon">关注功能开发中...</text> -->
<view v-if="currentTab == 1" class="follow-content recommend-content">
<!-- <FollowTab ref="followTab" /> -->
<text class="coming-soon">关注功能开发中...</text>
</view>
<!-- 推荐tab内容 -->
<view v-if="currentTab == 2" class="notes-content">
<!-- <view v-if="currentTab == 2" class="notes-content">
<WaterfallLayout
:items="waterfallItems"
:column-count="2"
@ -74,15 +74,18 @@
@like-change="handleNoteLikeChange"
style="margin-top: 20rpx"
/>
</view>
</view> -->
<view v-if="currentTab ==2" class="notes-content recommend-content">
<text class="coming-soon">笔记功能开发中...</text>
</view>
</view>
<view class="fab-container" v-if="canPublish">
<image
<!-- <view class="fab-container" v-if="canPublish"> -->
<!-- <image
@click="goToPublish"
:src="showImg('/uploads/20250825/7ea7864b8abb89c3dd7834f025e49b3f.png')"
style="width: 91rpx; height: 91rpx"
></image>
</view>
</view> -->
<!-- 控制按钮 -->
<!-- <view class="controls">
<button @click="addRandomItem" class="control-btn primary">

4
pages/notes/detail.vue

@ -846,9 +846,9 @@ export default {
});
}
} catch (error) {
console.error("提交评论失败:", error);
let _res = error.data
uni.showToast({
title: "评论失败",
title: error.data.msg,
icon: "none",
});
} finally {

2
pages/notes/publish.vue

@ -324,7 +324,7 @@ export default {
uni.hideLoading();
uni.showToast({
title:
error.message ||
error.data.msg ||
(this.isEditMode ? "修改失败,请重试" : "发布失败,请重试"),
icon: "none",
});

5
static/js/request.js

@ -8,9 +8,8 @@ const DEV_API_URL = 'https://epic.dayunyuanjian.cn';
// const PROD_API_URL = 'https://epic.js-dyyj.com';
const PROD_API_URL = 'https://epic.dayunyuanjian.cn';
const NEWAPIURL = process.env.NODE_ENV === 'development' ? DEV_API_URL : PROD_API_URL;
// const DEV_API_URL_DES = 'https://des.dayunyuanjian.cn/xcx';
// const DEV_API_URL_DES = 'https://des.dayunyuanjian.cn/xcx';
const DEV_API_URL_DES = 'http://192.168.124.8:8083/xcx';
const DEV_API_URL_DES = 'https://des.dayunyuanjian.cn/xcx';
// const DEV_API_URL_DES = 'http://192.168.124.8:8083/xcx';
// const PROD_API_URL_DES = 'https://des.dayunyuanjian.cn/xcx';
const PROD_API_URL_DES = 'https://des.dayunyuanjian.cn/xcx';
const NEWAPIURL_DES = process.env.NODE_ENV === 'development' ? DEV_API_URL_DES : PROD_API_URL_DES;

13
subPackages/techan/order.vue

@ -404,6 +404,8 @@ export default {
popShow: false, // 穿
addressTitle: "添加收货地址",
isShipping: false,
shipperMsg: "",
};
},
onLoad() {
@ -814,6 +816,7 @@ export default {
)
.then((res) => {
if (res && res.code === 200) {
this.isShipping = true;
this.post = Number(res.data.total) || 0;
this.flag = true;
} else {
@ -825,6 +828,9 @@ export default {
}
})
.catch((err) => {
this.shipperMsg = err.data.msg;
this.isShipping = false;
console.error("运费计算错误:", err);
this.flag = true;
});
@ -949,6 +955,13 @@ export default {
});
return;
}
if (!this.isShipping) {
uni.showToast({
title: this.shipperMsg,
icon: "none",
});
return;
}
this.isOrderLoading = true; //

Loading…
Cancel
Save