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

4
pages/notes/detail.vue

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

2
pages/notes/publish.vue

@ -324,7 +324,7 @@ export default {
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title: title:
error.message || error.data.msg ||
(this.isEditMode ? "修改失败,请重试" : "发布失败,请重试"), (this.isEditMode ? "修改失败,请重试" : "发布失败,请重试"),
icon: "none", 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.js-dyyj.com';
const PROD_API_URL = 'https://epic.dayunyuanjian.cn'; const PROD_API_URL = 'https://epic.dayunyuanjian.cn';
const NEWAPIURL = process.env.NODE_ENV === 'development' ? DEV_API_URL : PROD_API_URL; 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 = 'https://des.dayunyuanjian.cn/xcx'; // const DEV_API_URL_DES = 'http://192.168.124.8:8083/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 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; 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, // 穿 popShow: false, // 穿
addressTitle: "添加收货地址", addressTitle: "添加收货地址",
isShipping: false,
shipperMsg: "",
}; };
}, },
onLoad() { onLoad() {
@ -814,6 +816,7 @@ export default {
) )
.then((res) => { .then((res) => {
if (res && res.code === 200) { if (res && res.code === 200) {
this.isShipping = true;
this.post = Number(res.data.total) || 0; this.post = Number(res.data.total) || 0;
this.flag = true; this.flag = true;
} else { } else {
@ -825,6 +828,9 @@ export default {
} }
}) })
.catch((err) => { .catch((err) => {
this.shipperMsg = err.data.msg;
this.isShipping = false;
console.error("运费计算错误:", err); console.error("运费计算错误:", err);
this.flag = true; this.flag = true;
}); });
@ -949,6 +955,13 @@ export default {
}); });
return; return;
} }
if (!this.isShipping) {
uni.showToast({
title: this.shipperMsg,
icon: "none",
});
return;
}
this.isOrderLoading = true; // this.isOrderLoading = true; //

Loading…
Cancel
Save