chengjunhui il y a 4 semaines
Parent
commit
cd4dbed8a4

+ 3 - 1
pages.json

@@ -515,7 +515,9 @@
 				{
 					"path": "myGbOrder/list",
 					"style": {
-						"navigationBarTitleText": "全部订单"
+						"navigationBarTitleText": "全部订单",
+						"enablePullDownRefresh": true,
+						"navigationBarBackgroundColor": "#f7f7f7"
 					}
 				},
 				{

+ 26 - 16
pages/groupBuying/details.vue

@@ -37,7 +37,7 @@
                 >
                 <!-- <text class="discount u-font24 u-ml15">{{ dataForm.discount }}折</text> -->
                 <!-- #DCCDA4 -->
-                <view v-if="dataForm.groupPeopleNum > 0">
+                <view v-if="dataForm.groupPersonNumber > 0">
                   <text
                     style="
                       font-size: 22rpx;
@@ -49,7 +49,7 @@
                       border-radius: 20rpx;
                     "
                   >
-                    {{ dataForm.groupPeopleNum }}人拼
+                    {{ dataForm.groupPersonNumber }}人拼
                   </text>
                 </view>
               </view>
@@ -73,7 +73,7 @@
                   <view v-show="dataForm.activeState != 2 && !selectGroup">
                     <uni-countdown
                       :backgroundColor="'none'"
-                      @timeup="overDown2"
+                      @timeup="$throttle(overDown2, 500)"
                       :color="'#3775F6'"
                       :splitorColor="'#3775F6'"
                       :show-day="time1[0] > 0"
@@ -130,7 +130,7 @@
               >
               <view class="u-999 u-font24" @click="goGb">
                 更多拼团
-                <text class="iconfont u-ml15">&#xe6c7;</text>
+                <text class="iconfont u-ml15 u-font24">&#xe671;</text>
               </view>
             </view>
           </view>
@@ -183,7 +183,7 @@
                             :hour="item.time[1]"
                             :minute="item.time[2]"
                             :second="item.time[3]"
-                            @timeup="overDown2"
+                            @timeup="$throttle(overDown2, 500)"
                           ></uni-countdown>
                         </view>
                       </view>
@@ -195,7 +195,7 @@
                       >
                         还差
                         <text class="u-FF0000">{{
-                          item.groupPeopleNum - item.memberUserInfos.length
+                          item.groupPersonNumber - item.memberUserInfos.length
                         }}</text>
                         人拼成
                       </view>
@@ -466,7 +466,7 @@
             </view>
             <view class="specOpen-btn">
               <view
-                ><button class="u-btn-two" @click="btnBuy(1)">
+                ><button class="u-btn-two" @click="$throttle(btnBuy(1), 500)">
                   立即购买
                 </button></view
               >
@@ -482,12 +482,12 @@
       ref="gbOpenRef"
       round="30rpx"
     >
-      <view class="iconfont u-text-right u-font40 u-FFF" @click="gbClose"
-        >&#xe603;</view
-      >
       <view class="u-bg-D5C49B u-mt30 br-rd20">
-        <view class="br-284534">
+        <view class="br-284534" style="position: relative;">
           <view class="u-text-center gb-te">正在拼团</view>
+          <view class="gbCloseIcon" @click="gbClose">
+            <uv-icon name="close-circle" color="#999999" size="40rpx"></uv-icon>
+          </view>
         </view>
         <view class="gb-list pb50">
           <view class="gb-item u-plr30" v-for="item in teamlist" :key="item.id">
@@ -513,7 +513,7 @@
                     <div class="u-font24 u-flex-center">
                       <text>还差</text>
                       <text class="u-FF0000">{{
-                        item.groupPeopleNumber - item.memberUserInfos.length
+                        item.groupPersonNumber - item.memberUserInfos.length
                       }}</text>
                       <text>人拼成</text>
                     </div>
@@ -532,7 +532,7 @@
                           :hour="item.time[1]"
                           :minute="item.time[2]"
                           :second="item.time[3]"
-                          @timeup="overDown2"
+                          @timeup="$throttle(overDown2, 500)"
                         ></uni-countdown>
                       </view>
                     </view>
@@ -681,11 +681,12 @@ const gogroup = (item) => {
 };
 
 const goGdProduct = () => {
-  // checkSku(selectGroup.value.groupBuyGoodsId);
+  chonseSku();
   specOpenRef.value.open();
 };
 
 const overDown2 = () => {
+  // console.log("拼团活动已结束");
   getTeam();
 };
 
@@ -705,8 +706,9 @@ const getTeam = () => {
     (res) => {
       if (res && res.code == 200) {
         res.data = res.data.map((val) => {
+          let endTime = new Date(val.endTime).getTime() / 1000;
           val.time = utils
-            .countDown(val.endTime)
+            .countDown(endTime)
             .split(":")
             .map((val) => Number(val));
           return val;
@@ -715,8 +717,9 @@ const getTeam = () => {
         if (teamId.value) {
           selectGroup.value = res.data.find((val) => val.id == teamId.value);
           console.log("团队信息2" + JSON.stringify(selectGroup.value));
+          let endTime = new Date(selectGroup.value.endTime).getTime() / 1000;
           time2.value = utils
-            .countDown(selectGroup.value.endTime)
+            .countDown(endTime)
             .split(":")
             .map((val) => Number(val));
         }
@@ -883,6 +886,7 @@ const psotJson = () => {
     userUsePoint: true,
     businessId: dataForm.value.businessId,
     activityId: dataForm.value.groupBuyId,
+    sponsorActivityId: selectGroup.value ? selectGroup.value.id : 0, // 拼团活动ID
   };
   specOpenRef.value.close();
   console.log("dataJson", dataJson);
@@ -909,6 +913,12 @@ page {
   display: flex;
   align-items: baseline;
 }
+.gbCloseIcon{
+  position: absolute;
+  top: -10rpx;
+  right: 30rpx;
+  z-index: 1;
+}
 
 .per-num {
   display: flex;

Fichier diff supprimé car celui-ci est trop grand
+ 203 - 340
pages/groupBuying/myGbOrder/details.vue


+ 44 - 270
pages/groupBuying/myGbOrder/list.vue

@@ -18,31 +18,31 @@
     </view>
     <view class="plrbottom">
       <!--订单列表-->
-      <view class="order-list" v-for="item in orderList" :key="item.id">
+      <view class="order-list" v-for="item in RowsList" :key="item.id">
         <view class="u-bg-fff order-item" @click="goGbOrderDetails(item)">
           <view class="u-shop-teile-pd">
             <view class="u-text1 viewWidthTitle">
-              <text class="iconfont2 u-font34 u-bold" style="color: #fa6138"
-                >&#xe611;</text
+              <text class="iconfont u-font34 u-bold" style="color: #fa6138"
+                >&#xe71b;</text
               >
-              <text class="u-1A1A1A u-font30 u-ml15">{{ item.shop_name }}</text>
-              <text class="u-CCC right-icon iconfont">&#xe6c7;</text>
+              <text class="u-1A1A1A u-font30 u-ml15">{{ item.businessName }}</text>
+              <text class="u-CCC right-icon iconfont">&#xe671;</text>
             </view>
 
-            <text class="u-FF0000 u-font28" v-if="item.pay_status == 0"
+            <text class="u-FF0000 u-font28" v-if="item.payStatus == 0"
               >待付款</text
             >
 
             <text
               class="u-FF0000 u-font28"
               v-if="
-                item.pay_status == 5 && (item.status == 0 || item.status == 1)
+                item.payStatus == 5 && (item.status == 0 || item.status == 1)
               "
               >待成团</text
             >
             <text
               class="u-FF0000 u-font28"
-              v-if="item.pay_status == 5 && item.status == 2"
+              v-if="item.payStatus == 5 && item.status == 2"
               >组团成功</text
             >
             <text
@@ -53,42 +53,42 @@
           </view>
 
           <view class="u-border-one-one"></view>
-          <view v-if="orderList.length > 0">
+          <view v-if="RowsList.length > 0">
             <!-- <ldgoods :value="item" :isGroup="true" @click.native="goProductDetails(item)"></ldgoods> -->
 
             <view class="details-top">
               <view class="details-left">
                 <image
-                  :src="`${item.goods_cover}?x-oss-process=style/w_350`"
-                  v-if="item.goods_cover"
+                  :src="`${item.productCover}?x-oss-process=style/w_350`"
+                  v-if="item.productCover"
                   class="u-goods200 u-ml15"
                   mode=""
                 ></image>
                 <image
-                  :src="`${item.goods_img}?x-oss-process=style/w_350`"
-                  v-if="item.goods_img"
+                  :src="`${item.productImg}?x-oss-process=style/w_350`"
+                  v-if="item.productImg"
                   class="u-goods200 u-ml15"
                   mode=""
                 ></image>
               </view>
               <view class="details-right">
                 <view class="right-top">
-                  {{ item.goods_title }}
+                  {{ item.productTitle }}
                 </view>
                 <view class="specifications">
-                  规格:{{ item.sku_set_name }}
+                  规格:{{ item.skuSetName }}
                 </view>
                 <view class="amount-of-money">
                   <view
                     style="font-size: 26rpx"
-                    v-if="item.real_price % 1 === 0"
+                    v-if="item.realPrice % 1 === 0"
                   >
-                    ¥{{ item.real_price }}.00
+                    ¥{{ item.realPrice }}
                   </view>
                   <view style="font-size: 26rpx" v-else>
-                    ¥{{ item.real_price }}0
+                    ¥{{ item.realPrice }}
                   </view>
-                  <text class="group">{{ item.group_people_num }}人拼</text>
+                  <text class="group">{{ item.memberInfos ? item.memberInfos.length || 0 : 0 }}人拼</text>
                 </view>
               </view>
             </view>
@@ -100,33 +100,33 @@
                 </view>
                 <view class="u-FF0000">
                   <rich-text
-                    :nodes="$mUtil.priceBigSmall(item.total_amount)"
+                    :nodes="$mUtil.priceBigSmall(item.totalAmount)"
                   ></rich-text>
                 </view>
-                <text v-if="item.total_point > 0"
-                  >,总积分:{{ item.total_point }}</text
+                <text v-if="item.totalPoint > 0"
+                  >,总积分:{{ item.totalPoint }}</text
                 >
               </view>
 
-              <view class="u-mt10">含运费¥{{ item.real_freight }}</view>
+              <view class="u-mt10">含运费¥{{ item.realFreight || 0 }}</view>
               <view class="u-flex-column-end u-mt30">
                 <view class="u-flex">
                   <!--去付款-->
                   <view class="u-flex-center">
-                    <view v-if="item.pay_status == 0">
+                    <view v-if="item.payStatus == 0">
                       <text class="iconfont">&#xe681;</text> 支付剩余({{
                         item | dateFilter
                       }})
                     </view>
                     <view
                       class="btn-item u-text-center u-FF0000 br-FF0000"
-                      v-if="item.pay_status == 0"
+                      v-if="item.payStatus == 0"
                       @click.stop="goGbOrderDetails(item)"
                       >去付款</view
                     >
                     <view
                       class="btn-item u-text-center u-060606 br-999"
-                      v-if="item.pay_status != 0"
+                      v-if="item.payStatus != 0"
                       @click.stop="goGbOrderDetails(item)"
                       >查看详情</view
                     >
@@ -137,11 +137,9 @@
           </view>
         </view>
       </view>
-      <loadMore v-if="orderList.length > 0" :status="status"></loadMore>
-      <nodata v-else :config="{ top: 15, content: '暂无订单~' }"></nodata>
+      <loadMore v-if="RowsList.length > 0" :status="LoadStatus"></loadMore>
+      <noData v-else :config="{ top: 15, content: '暂无订单~' }"></noData>
     </view>
-    <!--页面加载动画-->
-    <ldLoading isFullScreen :active="loading"></ldLoading>
   </view>
 </template>
 
@@ -149,292 +147,68 @@
 import { ref, reactive, onMounted, onUnmounted } from "vue";
 import {
   onLoad,
-  onUnload,
-  onReachBottom,
-  onPullDownRefresh,
+  onUnload
 } from "@dcloudio/uni-app";
+import { groupbuyingTeamMy_Api } from "@/api/groupbuy";
 
-// 响应式数据
-const list = ref(1);
+import { usePageData } from "@/hooks/usePageData.ts";
 
+const { RowsList, LoadStatus, initData } = usePageData(groupbuyingTeamMy_Api);
 const isChange = ref(0);
 const timeCount = ref(0);
 const timer = ref(null);
 const orderType = ref(["全部订单", "待付款", "待成团", "组团成功", "组团失败"]);
-const loading = ref(true);
-const orderList = ref([]);
-const status = ref("more");
-const noData = ref(false);
-const parmas = reactive({
-  page: 1,
-  limit: 10,
-});
-const orderid = ref(null);
-const currentKey = ref(null);
-const tabTop = ref(0);
 
-// 全局变量
-let vObj;
-const app = getApp();
+const tabTop = ref(0);
 
 // 页面生命周期
 onLoad((options) => {
-  vObj = getCurrentInstance().proxy;
 
   timer.value = setInterval(() => {
     timeCount.value++;
   }, 1000);
 
-  tabTop.value = app.globalData.barHeight + 44;
+  tabTop.value = uni.getSystemInfoSync().statusBarHeight + 44;
 
   if (options.keys) {
     // 处理选项
   }
-  getOrderList();
+  initData();
 });
 
 onUnload(() => {
-//   console.log(66666666);
+  //   console.log(66666666);
   clearInterval(timer.value);
 });
 
-onReachBottom(() => {
-  status.value = "loading";
-  parmas.page++;
-  getOrderList();
-});
-
-onPullDownRefresh(() => {
-  rest();
-  getOrderList();
-});
-
 // 过滤器函数
 const dateFilter = (item) => {
-  let time = item.pay_expire_time - item.now_millis - vObj.timeCount * 1000;
-  let str = vObj.$mUtil.countDownClock(time);
-  return str;
+  return ''
+  // let time = item.pay_expire_time - item.now_millis - timeCount.value * 1000;
+  // let str = $mUtil.countDownClock(time);
+  // return str;
 };
 
-const payStatus = (val) => {
-  switch (val) {
-    case 0:
-      return "待支付";
-    case 1:
-      return "待发货";
-    case 2:
-      return "部分发货";
-    case 3:
-      return "待收货";
-    case 4:
-      return "已收货";
-    case 5:
-      return "待评价";
-    case 6:
-      return "关闭";
-    default:
-      return "";
-  }
-};
 
-const payStatusRight = (val) => {
-  switch (val) {
-    case 0:
-      return "申请退款中";
-    case 1:
-      return "商家同意";
-    case 4:
-      return "商家发起退款支付";
-    case 5:
-      return "退款成功";
-    case 6:
-      return "商家拒绝";
-    default:
-      return "";
-  }
-};
-
-const payStatusRights = (val) => {
-  switch (val) {
-    case 0:
-      return "申请退款/退货中";
-    case 1:
-      return "等待买家发货";
-    case 2:
-      return "待商家收货";
-    case 3:
-      return "商家已收货";
-    case 4:
-      return "商家待打款";
-    case 5:
-      return "退款/退货成功";
-    case 6:
-      return "商家拒绝";
-    case 7:
-      return "自动关闭";
-    case 8:
-      return "撤销";
-    default:
-      return "";
-  }
-};
 
 // 方法定义
 const goGbOrderDetails = (item) => {
-  if (item.pay_status == 0) {
-    uni.navigateTo({
-      url: `./gbOrderDetails?id=${item.pay_order_id}&status=waitpay`,
-    });
-  } else {
-    uni.navigateTo({
-      url: `./gbOrderDetails?id=${item.order_id}&groupId=${item.id}&status=pay`,
-    });
-  }
-};
-
-const goProductDetails = (item) => {
-  uni.navigateTo({
-    url: "/pages/product/goods/puzzleGoods?id=" + item.group_buy_goods_id,
-  });
-};
-
-const goPhone = (phone) => {
-  if (phone) {
-    uni.makePhoneCall({
-      phoneNumber: phone,
-    });
-  }
-};
-
-const lookLoginsList = (orderid, num, img, type) => {
-  uni.navigateTo({
-    url: `../logistics?id=${orderid}&num=${num}&img=${img}&type=${type}`,
-  });
-};
-
-const goRefundType = (i, code, time, list, orderid, childid) => {
-  uni.setStorageSync("blackgoodsList", list);
-  if (i == 1) {
+  if (item.payStatus == 0) {
     uni.navigateTo({
-      url: `applicationDrawback?keystatus=${i}&title=申请退款&orderid=${orderid}`,
+      url: `/pages/groupBuying/myGbOrder/details?id=${item.payOrderId}&status=waitpay`,
     });
   } else {
     uni.navigateTo({
-      url: `refundType?order_code=${code}&format_order_time=${time}&keystatus=${i}&orderid=${orderid}&childid=${childid}`,
+      url: `/pages/groupBuying/myGbOrder/details?id=${item.orderId}&groupId=${item.id}&status=pay`,
     });
   }
 };
 
-const sureGetOrder = (id, k) => {
-  uni.showModal({
-    title: "提示",
-    content: "确定已经收到了该商品?",
-    success: (res) => {
-      if (res.confirm) {
-        globalThis.$http
-          .post("/order/receipt", {
-            order_id: id,
-          })
-          .then((res) => {
-            if (res && res.code == 200) {
-              globalThis.$mUtil.toast("收货成功");
-              rest();
-              if (k == 1) {
-                getOrderList();
-              } else if (k == 2) {
-                otherPay(currentKey.value);
-              }
-            }
-          });
-      }
-    },
-  });
-};
-
-const otherFun = (object) => {
-  if (object) {
-    console.log(object.addressid);
-    globalThis.$http
-      .put("/order/update-receipt/" + orderid.value + "/" + object.addressid)
-      .then((res) => {
-        if (res && res.code == 200) {
-          globalThis.$mUtil.toast("修改成功");
-        }
-      });
-  }
-};
-
-const changeAddress = (id) => {
-  orderid.value = id;
-  uni.navigateTo({
-    url: "/pages/user/address/addressList",
-  });
-};
-
-const rest = () => {
-  parmas.page = 1;
-  orderList.value = [];
-};
-
-const getOrderList = () => {
-  globalThis.$http.get("/groupbuy/team/my", parmas).then((res) => {
-    loading.value = false;
-    if (res && res.code == 200) {
-      uni.stopPullDownRefresh();
-      orderList.value = orderList.value.concat(res.page.list);
-      if (orderList.value.length == 0) {
-        noData.value = true;
-      } else {
-        noData.value = false;
-      }
-      if (res.page.totalPage <= res.page.currPage) {
-        status.value = "noMore";
-      } else {
-        status.value = "more";
-      }
-    }
-  });
-};
-
 const clickBtn = (index) => {
-  rest();
   isChange.value = index;
-  if (index > 0) {
-    parmas.status = index;
-  } else {
-    delete parmas.status;
-  }
-  getOrderList();
-};
-
-const waitpayOrder = (id, total_amount, expired_pay_time) => {
-  uni.navigateTo({
-    url: `../../order/pay?id=${id}&total_amount=${total_amount}&expired_pay_time=${expired_pay_time}`,
-  });
+  initData({ status: index > 0 ? index : undefined });
 };
 
-const goOrderDetails = (id) => {
-  uni.navigateTo({
-    url: `orderDetails?id=${id}&status=pay`,
-  });
-};
-
-const gotoBalckDetail = (id, shopid, type, status) => {
-  uni.navigateTo({
-    url: `orderblackDetails?id=${id}&shopid=${shopid}&type=${type}&status=${status}`,
-  });
-};
-
-const goOrderDetailsPay = (id) => {
-  uni.navigateTo({
-    url: `orderDetails?id=${id}&status=waitpay`,
-  });
-};
-
-const otherPay = (key) => {
-  // 需要实现 otherPay 方法
-  console.log("otherPay called with key:", key);
-};
 </script>
 
 <style>

+ 108 - 106
pages/order/pay.vue

@@ -91,6 +91,7 @@ import {
   shopOrderIsPay_Api,
 } from "@/api/order";
 import { totalBalance_Api } from "@/api/userInfo.js";
+import { shoporderWxMinPay_Api } from "@/api/order.js";
 import $mUtil from "@/util/index";
 // 响应式数据
 const total_amount = ref(null);
@@ -146,11 +147,12 @@ onLoad((options) => {
   }
   if (options.pagesType) pagesType.value = options.pagesType;
   if (options.expired_pay_time) {
-    expired_pay_time.value = options.expired_pay_time;
+    expired_pay_time.value = options.expired_pay_time / 1000;
     const timeArray = $mUtil
       .countDown(expired_pay_time.value)
       .split(":")
       .map((val) => Number(val));
+    console.log(timeArray, "timeArray");
     time1[0] = timeArray[0];
     time1[1] = timeArray[1];
     time1[2] = timeArray[2];
@@ -328,114 +330,114 @@ const confirm = () => {
 };
 
 // 提交支付
-const submitPay = () => {
-  if (!orderId.value) {
-    uni.$uv.toast("未获取到订单号");
-    return;
-  }
-
-  if (payStatus.value != orderInfo.value.paymentMethod) {
-    uni.showLoading({ title: "支付中...", mask:true });
-    shopOrderGoPay_Api({ orderId: orderId.value, paymentMethod: payStatus.value }).then(res => {
-      uni.hideLoading();
-      if (res && res.code == 200) {
-        confirm();
-      }
-    })
-  } else {
-    confirm();
-  }
-  
-};
-
-// // 提交支付
 // const submitPay = () => {
-//   //微信支付
-//   if (
-//     payStatus.value == 1 ||
-//     payStatus.value == 2 ||
-//     payStatus.value == 10 ||
-//     payStatus.value == 12 ||
-//     payStatus.value == 14
-//   ) {
-//     let data = {
-//       orderNo: orderNo.value,
-//     };
-//     loading.value = true;
-//     shoporderWxMinPay_Api(data)
-//       .then((res) => {
-//         if (res && res.data.code == 200) {
-//           loading.value = false;
-//           let target = res.data.data;
-//           console.log("target==>>", target);
-//           if (payStatus.value == 1) {
-//             uni.requestPayment({
-//               provider: "wxpay",
-//               timeStamp: target.timeStamp,
-//               nonceStr: target.nonceStr,
-//               package: target.package,
-//               signType: target.signType,
-//               paySign: target.paySign,
-//               success: (res) => {
-//                 uni.$uv.toast("支付成功");
-//                 uni.removeStorageSync("orderreminder");
-//                 goJump();
-//               },
-//               fail: function (err) {
-//                 console.log("err==>", err);
-//                 loading.value = false;
-//                 console.log("fail:" + JSON.stringify(err));
-//               },
-//             });
-//           } else if (payStatus.value == 2) {
-//             uni.requestPayment({
-//               provider: "alipay",
-//               orderInfo: target.prePayOrderInfo,
-
-//               success: (res) => {
-//                 uni.$uv.toast("支付成功");
-//                 uni.removeStorageSync("orderreminder");
-//                 goJump();
-//               },
-//               fail: function (err) {
-//                 loading.value = false;
-//                 console.log("fail:" + JSON.stringify(err));
-//               },
-//             });
-//           }
-//         } else {
-//           loading.value = false;
-//           uni.$uv.toast("交易失败");
-//         }
-//       })
-//       .catch((err) => {
-//         loading.value = false;
-//         // getApp().globalData.$mUtil.toast('交易失败');
-//       });
-//   } else if (payStatus.value == 0) {
-//     //余额支付
-//     loading.value = false;
-//     uni.showModal({
-//       title: "余额支付",
-//       content: "确定使用余额支付吗?",
-//       success: (res) => {
-//         if (res.confirm) {
-//           let data = {
-//             orderNo: orderNo.value,
-//           };
-//           shoporderBalance_Api(data).then((res) => {
-//             if (res && res.code == 200) {
-//               uni.removeStorageSync("orderreminder");
-//               uni.$uv.toast("支付成功");
-//               goJump();
-//             }
-//           });
-//         } else if (res.cancel) {
-//         }
-//       },
-//     });
+//   if (!orderId.value) {
+//     uni.$uv.toast("未获取到订单号");
+//     return;
+//   }
+
+//   if (payStatus.value != orderInfo.value.paymentMethod) {
+//     uni.showLoading({ title: "支付中...", mask:true });
+//     shopOrderGoPay_Api({ orderId: orderId.value, paymentMethod: payStatus.value }).then(res => {
+//       uni.hideLoading();
+//       if (res && res.code == 200) {
+//         confirm();
+//       }
+//     })
+//   } else {
+//     confirm();
 //   }
+  
 // };
+
+// 提交支付
+const submitPay = () => {
+  //微信支付
+  if (
+    payStatus.value == 1 ||
+    payStatus.value == 2 ||
+    payStatus.value == 10 ||
+    payStatus.value == 12 ||
+    payStatus.value == 14
+  ) {
+    let data = {
+      orderNo: orderNo.value,
+    };
+    loading.value = true;
+    shoporderWxMinPay_Api(data)
+      .then((res) => {
+        if (res && res.data.code == 200) {
+          loading.value = false;
+          let target = res.data.data;
+          console.log("target==>>", target);
+          if (payStatus.value == 1) {
+            uni.requestPayment({
+              provider: "wxpay",
+              timeStamp: target.timeStamp,
+              nonceStr: target.nonceStr,
+              package: target.package,
+              signType: target.signType,
+              paySign: target.paySign,
+              success: (res) => {
+                uni.$uv.toast("支付成功");
+                uni.removeStorageSync("orderreminder");
+                goJump();
+              },
+              fail: function (err) {
+                console.log("err==>", err);
+                loading.value = false;
+                console.log("fail:" + JSON.stringify(err));
+              },
+            });
+          } else if (payStatus.value == 2) {
+            uni.requestPayment({
+              provider: "alipay",
+              orderInfo: target.prePayOrderInfo,
+
+              success: (res) => {
+                uni.$uv.toast("支付成功");
+                uni.removeStorageSync("orderreminder");
+                goJump();
+              },
+              fail: function (err) {
+                loading.value = false;
+                console.log("fail:" + JSON.stringify(err));
+              },
+            });
+          }
+        } else {
+          loading.value = false;
+          uni.$uv.toast("交易失败");
+        }
+      })
+      .catch((err) => {
+        loading.value = false;
+        // getApp().globalData.$mUtil.toast('交易失败');
+      });
+  } else if (payStatus.value == 0) {
+    //余额支付
+    loading.value = false;
+    uni.showModal({
+      title: "余额支付",
+      content: "确定使用余额支付吗?",
+      success: (res) => {
+        if (res.confirm) {
+          let data = {
+            orderNo: orderNo.value,
+          };
+          shoporderBalance_Api(data).then((res) => {
+            if (res && res.code == 200) {
+              uni.removeStorageSync("orderreminder");
+              uni.$uv.toast("支付成功");
+              goJump();
+            }
+          });
+        } else if (res.cancel) {
+        }
+      },
+    });
+  }
+};
 </script>
 
 <style lang="scss">

+ 15 - 1
pages/surePay/surePay.vue

@@ -156,7 +156,7 @@
         </view>
       </view>
 
-      <view class="listText u-p30" v-if="!dataJson.exchange">
+      <view class="listText u-p30" v-if="!dataJson.exchange && dataJson.marketingType == 0">
         <view class="u-flex-center-sb">
           <view class="u-font28 u-181818"><text>共减</text></view>
           <view class="u-font30 c-da4f4f">
@@ -193,6 +193,15 @@
         </view>
       </view>
 
+      <view class="listText u-p30" v-if="dataJson.marketingType != 0">
+        <view class="u-flex-center-sb">
+          <view class="u-font28 u-181818"><text>{{ dataJson.marketingType == 5 ? '秒杀' : '拼团' }}活动折扣</text></view>
+          <view class="u-font30 c-da4f4f">
+            -¥{{ sureDataAll.totalActivityReduced || 0 }}
+          </view>
+        </view>
+      </view>
+
       <view
         class="listText u-border-one-one border u-p30 u-flex-center-sb"
         v-if="dataJson.exchange"
@@ -311,6 +320,11 @@ const orderCreated = () => {
     title: "正在创建订单",
     mask: true,
   });
+  // console.log({
+  //   ...dataJson.value,
+  //   userUsePoint: usePlatformPoint.value,
+  // })
+  // return;
   shoporderCreate_Api({
     ...dataJson.value,
     userUsePoint: usePlatformPoint.value,

+ 27 - 0
static/style/common.scss

@@ -500,8 +500,14 @@
   overflow-x: hidden !important;
 }
 
+
 // 定义u-开头的通用样式类
 // 颜色相关
+
+.u-shop-teile-pd {
+  padding: 15rpx 30rpx 24rpx;
+}
+
 .u-1A1A1A {
   color: #1a1a1a;
 }
@@ -659,6 +665,13 @@
   padding-right: 30rpx;
 }
 
+/* 文本溢出隐藏 */
+.u-text1 {
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+
 .u-text2 {
   display: -webkit-box;
   -webkit-line-clamp: 2; /* 限制为2行 */
@@ -764,6 +777,20 @@
   margin-right: 10rpx;
 }
 
+.u-avatar65{
+  width: 65rpx;
+  height: 65rpx;
+  border-radius: 20rpx;
+  margin-right: 10rpx;
+}
+
+.u-avatar92{
+  width: 92rpx;
+  height: 92rpx;
+  border-radius: 20rpx;
+  margin-right: 10rpx;
+}
+
 .u-del{
   text-decoration: line-through;
 }