Просмотр исходного кода

feat: enhance red packet navigation and update delivery instructions

- Added logic to handle navigation based on the source of red packet receipt, directing users to the home page if received via sharing.
- Updated delivery instructions to clarify the selection of courier services during the order process, ensuring users are informed about default options.
ylong 5 дней назад
Родитель
Сommit
211685efe4
3 измененных файлов с 14 добавлено и 3 удалено
  1. 7 0
      packet/pages/get.vue
  2. 6 1
      packet/pages/index.vue
  3. 1 2
      pages-home/pages/book-order.vue

+ 7 - 0
packet/pages/get.vue

@@ -145,6 +145,13 @@ export default {
             try {
                 const res = await this.$u.api.getRedBagAjax(this.bianhao);
                 if (res.code === 200 || res.code === 0) {
+                    // getWay: 0-扫码(A) 1-被分享(B);被分享用户无二次分享,直接回首页
+                    if (Number(res.data && res.data.getWay) === 1) {
+                        uni.switchTab({
+                            url: '/pages/sell/index'
+                        });
+                        return;
+                    }
                     this.redBagData = res.data;
                 } else {
                     uni.showToast({

+ 6 - 1
packet/pages/index.vue

@@ -343,8 +343,13 @@
                             title: '领取成功',
                             icon: 'success'
                         });
-                        // 跳转到 get 页面,并传递红包数据
+                        // getWay: 0-扫码(A) 1-被分享(B);被分享领取后不再二次分享,直接回首页
+                        const isSharedReceive = Number(res.data.getWay) === 1;
                         setTimeout(() => {
+                            if (isSharedReceive) {
+                                this.goHome();
+                                return;
+                            }
                             uni.redirectTo({
                                 url: '/packet/pages/get?bianhao=' + this.bianhao
                             });

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

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