瀏覽代碼

fix: 更新开发环境API地址并增强服务保障组件的动态显示功能

- 将开发环境的API地址更新为 https://bk.shuhi.com。
- 在服务保障组件中,新增计算属性以动态显示验收时间,提升用户体验。
- 调整相关文案以支持动态内容展示。
ylong 1 周之前
父節點
當前提交
32518ed356

+ 1 - 1
.env.dev.js

@@ -1,5 +1,5 @@
 export default {
     "NODE_ENV": 'development',
-    "apiUrl":"https://bpi.shuhi.com",
+    "apiUrl":"https://bk.shuhi.com",
     "apiUrlPrefix":"/api",
 };

+ 1 - 1
pages-home/components/VerifyPeriodPicker.vue

@@ -40,7 +40,7 @@
                 <view class="benefits-wrap is-visible" :class="{ 'is-visible': tempDays === 15 || tempDays === 7 }">
                     <image
                         class="benefits-img"
-                        src="/pages-home/static/images/verify-period-benefits.png"
+                        :src="tempDays === 15 ? '/pages-home/static/images/verify-period-benefits.png' : '/pages-home/static/images/verify-period-benefits-7.png'"
                         mode="widthFix"
                     ></image>
                 </view>

+ 1 - 1
pages-home/pages/book-order.vue

@@ -73,7 +73,7 @@
                 </view>
             </view>
             <!-- <view class="express-desc">请从【顺丰】或【京东】中选择可正常收寄的快递,如您不选择,则由系统根据区域情况自动分配</view> -->
-             <view class="express-desc">毕业季暂不支持自助选择快递,默认德邦快递,如需备注请联系在线客服</view>
+             <view class="express-desc">毕业季暂不支持自主选择快递,默认德邦快递,如需京东快递请提交订单后,10分钟内联系在线客服</view>
         </view>
 
         <!-- 书籍列表 -->

二進制
pages-home/static/images/verify-period-benefits-7.png


+ 18 - 3
pages-mine/components/order-actions.vue

@@ -21,11 +21,11 @@
 
             <!-- 待初审 -->
             <template v-if="status == 2">
-                <view class="flex-row w-full" style="display: flex;justify-content: space-between;">
+                <view class="status-pending-row">
                     <button class="action-btn info-btn" @click.stop="handleAction('cancel')">取消订单</button>
-                    <view class="flex-row">
+                    <view class="status-pending-row__right">
                         <button class="action-btn plain" @click.stop="handleAction('editAddress')">修改地址</button>
-                        <button v-if="item.canReport == 1" class="action-btn"
+                        <button v-if="order.canReport == 1" class="action-btn"
                             @click.stop="handleAction('report')">一键上报</button>
                     </view>
                 </view>
@@ -112,6 +112,21 @@ export default {
         width: 100%;
     }
 
+    .status-pending-row {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        width: 100%;
+        gap: 40rpx;
+
+        &__right {
+            display: flex;
+            align-items: center;
+            flex-shrink: 0;
+            gap: 16rpx;
+        }
+    }
+
     .action-btn {
         display: flex;
         align-items: center;

+ 1 - 1
pages-mine/pages/order-detail.vue

@@ -95,7 +95,7 @@
 					v-if="orderInfo.confirmCompensationMoney" style="margin-right: 10px">验货超时补偿</u-button>
 				<u-button size="small" type="warning" @click="handleOpenSellLoss"
 					v-if="orderInfo.priceCompensationMoney" style="margin-right: 10px">卖亏必赔</u-button>
-				<order-actions style="width:fit-content" :order="orderInfo" :status="orderInfo.status"
+				<order-actions style="width: 100%" :order="orderInfo" :status="orderInfo.status" size="large"
 					@action="handleAction" @success="getOrderInfo"></order-actions>
 			</view>
 		</view>

+ 24 - 2
pages/home/components/ServiceGuarantee.vue

@@ -17,9 +17,9 @@
                 <view class="guarantee-item">
                     <view class="item-header">
                         <image src="/static/img/1-2.png" mode="widthFix" class="item-icon"></image>
-                        <text class="item-title">5天验</text>
+                        <text class="item-title">{{ verifyPeriodLabel }}</text>
                     </view>
-                    <view class="item-desc">本单获得5天验资格,订单将在"到仓签收"后5天内验货完毕,未完成验货将获得3元补贴到余额,可随验货书款一起提现。</view>
+                    <view class="item-desc">本单获得{{ verifyPeriodLabel }}资格,订单将在到仓签收后{{ verifyCompleteDays }}天内验货完毕,未完成验货将获得3元补贴到余额,可随验货书款一起提现。</view>
                 </view>
 
                 <!-- 极速打款 -->
@@ -48,6 +48,28 @@
 
 <script>
 export default {
+    props: {
+        verifyPeriodDays: {
+            type: [Number, String],
+            default: null,
+        },
+    },
+    computed: {
+        /** 结算时效展示:15/7 天验,未选默认 5 天验 */
+        verifyPeriodDisplayDays() {
+            const days = Number(this.verifyPeriodDays)
+            if (days === 15) return 15
+            if (days === 7) return 7
+            return 5
+        },
+        verifyPeriodLabel() {
+            return `${this.verifyPeriodDisplayDays}天验`
+        },
+        /** 验货完成时限:15 天验为 15 天内,7 天验或未选为 7 天内 */
+        verifyCompleteDays() {
+            return Number(this.verifyPeriodDays) === 15 ? 15 : 7
+        },
+    },
     data() {
         return {
             showPopup: false

+ 1 - 1
pages/home/components/ServiceInfo.vue

@@ -24,7 +24,7 @@
         </view>
 
         <!-- 服务保障弹窗 -->
-        <ServiceGuarantee ref="serviceGuarantee" />
+        <ServiceGuarantee ref="serviceGuarantee" :verify-period-days="verifyPeriodDays" />
     </view>
 </template>