ext.liuqiwen3 2 days ago
parent
commit
9b630f5e3b

+ 7 - 0
api/api.js

@@ -47,3 +47,10 @@ export function getCity() {
 export function getMerchantBannerList(data) {
 export function getMerchantBannerList(data) {
   return request.get("sbmerchant/banner/list", data, { noAuth: true });
   return request.get("sbmerchant/banner/list", data, { noAuth: true });
 }
 }
+
+/**
+ * 为用户添加加盟角色
+ */
+export function addJoinTeamUserRole(data) {
+  return request.post("join-team/user-role/add", data);
+}

+ 51 - 0
api/joinus.js

@@ -0,0 +1,51 @@
+import request from "@/utils/request.js";
+
+/**
+ *
+ * @returns
+ */
+export function getJoinSettings() {
+  return request.get("join/team/list");
+}
+
+/**
+ *
+ * @param {*} data
+ * @returns
+ */
+export function applicationJoin(data) {
+  return request.post("join-team/application/submit", data);
+}
+
+// 获取申请详情
+export function applicationDetailAPI(roleType) {
+  return request.get(
+    `join-team/application/detail/user-role/?roleType=${roleType}`
+  );
+}
+// 获取用户所有加盟角色
+export function getJoinRolesAPI() {
+  return request.get("join-team/user-role/user");
+}
+// 根据用户id获取代购详情
+export function getJoinDetailAPI(uid) {
+  return request.get(`daigou/detail/${uid}`);
+}
+
+/**
+ * 获取推荐官看板数据
+ * @returns
+ */
+export function getPromoterDashboard() {
+  return request.get("promoter/dashboard");
+}
+
+// 获取推荐官拉新用户列表
+export function getPromoterInvites(params) {
+  return request.get("promoter/invites", { params });
+}
+
+// 获取推荐官收入明细列表
+export function getPromoterIncomeDetails(params) {
+  return request.get("promoter/income-details", { params });
+}

+ 1 - 1
components/OrderListCard/index.vue

@@ -4,7 +4,7 @@
       <view class="title acea-row row-between-wrapper">
       <view class="title acea-row row-between-wrapper">
         <view class="acea-row row-middle" @click.stop="toMerchant(order.sbMerchant.id)">
         <view class="acea-row row-middle" @click.stop="toMerchant(order.sbMerchant.id)">
           <image class="merchantImg" :src="order.sbMerchant.merchantLogo"></image>
           <image class="merchantImg" :src="order.sbMerchant.merchantLogo"></image>
-          <view>{{order.sbMerchant.merchantName}}</view>
+          <view style="margin-left: 10rpx;">{{order.sbMerchant.merchantName}}</view>
           <uni-icons style="margin-left: 10rpx;" type="right" size="16" color="#999999"></uni-icons>
           <uni-icons style="margin-left: 10rpx;" type="right" size="16" color="#999999"></uni-icons>
 <!--          <view>{{ order.createTime }}</view>-->
 <!--          <view>{{ order.createTime }}</view>-->
         </view>
         </view>

+ 3 - 1
components/orderGoods/index.vue

@@ -6,7 +6,7 @@
     <view class="total"  @click="toMerchant(sbMerchant.id)"
     <view class="total"  @click="toMerchant(sbMerchant.id)"
     >
     >
       <image class="merchantImg" :src="sbMerchant.merchantLogo"></image>
       <image class="merchantImg" :src="sbMerchant.merchantLogo"></image>
-      <text>{{sbMerchant.merchantName}}</text>
+      <text style="margin-left: 10rpx;">{{sbMerchant.merchantName}}</text>
       <uni-icons style="margin-left: 10rpx;" type="right" size="16" color="#999999"></uni-icons>
       <uni-icons style="margin-left: 10rpx;" type="right" size="16" color="#999999"></uni-icons>
     </view>
     </view>
     <view class="goodWrapper pad30">
     <view class="goodWrapper pad30">
@@ -132,6 +132,8 @@ const toMerchant = (merchantId) => {
   color: #282828;
   color: #282828;
   line-height: 86rpx;
   line-height: 86rpx;
   box-sizing: border-box;
   box-sizing: border-box;
+  display: flex;
+  align-items: center;
 }
 }
 
 
 .pictrue image {
 .pictrue image {

+ 1 - 1
components/productWindow/index.vue

@@ -453,7 +453,7 @@ function getCheckedValue() {
       background: #fff;
       background: #fff;
       color: #333;
       color: #333;
       font-size: 24rpx;
       font-size: 24rpx;
-      border-radius: 12rpx;
+      //border-radius: 12rpx;
       line-height: 29px;
       line-height: 29px;
       height: 50rpx;
       height: 50rpx;
 
 

+ 8 - 0
pages.json

@@ -81,6 +81,14 @@
 				}
 				}
 			}
 			}
 		},
 		},
+		{
+			"path": "pages/order_pay_status/index",
+			"style": {
+				"navigationBarTitleText": "支付成功",
+				"navigationBarBackgroundColor": "#FFFFFF",
+				"navigationBarTextStyle": "black"
+			}
+		},
 		{
 		{
 			"path": "pages/merchantCenter/index",
 			"path": "pages/merchantCenter/index",
 			"style": {
 			"style": {

+ 2 - 0
pages/index/index.vue

@@ -1189,6 +1189,7 @@ page {
 
 
       .ssjj {
       .ssjj {
         width: 150rpx;
         width: 150rpx;
+        height: 36rpx;
         vertical-align: middle;
         vertical-align: middle;
       }
       }
 
 
@@ -1287,6 +1288,7 @@ page {
 
 
   .classify-img {
   .classify-img {
     width: 100rpx;
     width: 100rpx;
+    height: 100rpx;
   }
   }
 
 
   .classify-txt {
   .classify-txt {

+ 3 - 0
pages/merchantCenter/index.vue

@@ -319,6 +319,7 @@ function formatMoney(value) {
   justify-content: center;
   justify-content: center;
   .setting{
   .setting{
     width: 40rpx;
     width: 40rpx;
+    height: 40rpx;
   }
   }
   .btn-text {
   .btn-text {
     font-size: 24rpx;
     font-size: 24rpx;
@@ -483,6 +484,7 @@ function formatMoney(value) {
 .function-icon {
 .function-icon {
   .img{
   .img{
     width: 60rpx;
     width: 60rpx;
+    height: 60rpx;
   }
   }
 }
 }
 
 
@@ -587,6 +589,7 @@ function formatMoney(value) {
 .status-icon {
 .status-icon {
   .img{
   .img{
     width: 60rpx;
     width: 60rpx;
+    height: 60rpx;
   }
   }
 }
 }
 
 

+ 2 - 0
pages/merchantCenters/merchant.vue

@@ -240,11 +240,13 @@ const makePhoneCall = () => {
     align-items: center;
     align-items: center;
     background-color: #F9F7F0;
     background-color: #F9F7F0;
     border-radius: 16rpx;
     border-radius: 16rpx;
+    padding: 20rpx 0;
     .left{
     .left{
       width: 140rpx;
       width: 140rpx;
       .storeImg{
       .storeImg{
         width: 100rpx;
         width: 100rpx;
         height: 100rpx;
         height: 100rpx;
+        border-radius: 50%;
       }
       }
     }
     }
     .center{
     .center{

+ 1 - 1
pages/merchantCenters/postInformation.vue

@@ -115,7 +115,7 @@ const handleTemplatePublish = () => {
 }
 }
 
 
 .option-icon {
 .option-icon {
-  width: 96rpx;
+  width: 116rpx;
 }
 }
 
 
 .option-title {
 .option-title {

+ 29 - 27
pages/merchantCenters/productManagement.vue

@@ -291,32 +291,32 @@ const batchPutOnShell = async () => {
 }
 }
 
 
 // 批量删除
 // 批量删除
-const batchDelete = async () => {
-  if (!checkHasSelected()) return;
-
-  uni.showModal({
-    title: '警告',
-    content: `确定要删除选中的${selectValue.value.length}件商品吗?此操作不可恢复!`,
-    success: async (res) => {
-      if (res.confirm) {
-        try {
-          const { code, message } = await batchDeleteApi({ ids: selectValue.value.join(',') });
-          if (code === 200) {
-            uni.showToast({ title: '批量删除成功', icon: 'success' });
-            // 从列表中移除删除的商品
-            goodsList.value = goodsList.value.filter(item => !selectValue.value.includes(item.id.toString()));
-            resetSelection();
-            footerswitch.value = true; // 退出管理模式
-          } else {
-            uni.showToast({ title: message || '操作失败', icon: 'none' });
-          }
-        } catch (err) {
-          uni.showToast({ title: err.message || '操作失败', icon: 'none' });
-        }
-      }
-    }
-  });
-}
+// const batchDelete = async () => {
+//   if (!checkHasSelected()) return;
+//
+//   uni.showModal({
+//     title: '警告',
+//     content: `确定要删除选中的${selectValue.value.length}件商品吗?此操作不可恢复!`,
+//     success: async (res) => {
+//       if (res.confirm) {
+//         try {
+//           const { code, message } = await batchDeleteApi({ ids: selectValue.value.join(',') });
+//           if (code === 200) {
+//             uni.showToast({ title: '批量删除成功', icon: 'success' });
+//             // 从列表中移除删除的商品
+//             goodsList.value = goodsList.value.filter(item => !selectValue.value.includes(item.id.toString()));
+//             resetSelection();
+//             footerswitch.value = true; // 退出管理模式
+//           } else {
+//             uni.showToast({ title: message || '操作失败', icon: 'none' });
+//           }
+//         } catch (err) {
+//           uni.showToast({ title: err.message || '操作失败', icon: 'none' });
+//         }
+//       }
+//     }
+//   });
+// }
 
 
 const tabChange = (item) => {
 const tabChange = (item) => {
   console.log('item',item)
   console.log('item',item)
@@ -464,6 +464,7 @@ onReachBottom(() => {
   font-size: 28rpx;
   font-size: 28rpx;
   color: #282828;
   color: #282828;
   margin-left: 16rpx;
   margin-left: 16rpx;
+  line-height: 56rpx;
 }
 }
 
 
 .footer .button {
 .footer .button {
@@ -484,7 +485,8 @@ onReachBottom(() => {
 }
 }
 
 
 .footer .button .delete-btn {
 .footer .button .delete-btn {
-  background-color: #e64340;
+  color:#F52929;
+  background-color: #FEEAEA;
 }
 }
 
 
 /* 商品卡片调整 */
 /* 商品卡片调整 */

+ 3 - 6
pages/merchantCenters/releaseProduct.vue

@@ -95,16 +95,15 @@
           <view class="upload-item">
           <view class="upload-item">
             <view class="upload-label"><text class="required">*</text>商品封面图</view>
             <view class="upload-label"><text class="required">*</text>商品封面图</view>
             <up-upload
             <up-upload
-                :fileList="previewImages"
                 @afterRead="async (e) => {
                 @afterRead="async (e) => {
                   await afterRead(e);
                   await afterRead(e);
                   getImage();
                   getImage();
                 }"
                 }"
+                capture="album"
                 @delete="onPreviewImageDelete"
                 @delete="onPreviewImageDelete"
                 name="preview"
                 name="preview"
                 max-count="1"
                 max-count="1"
-                :maxSize="5 * 1024 * 1024"
-                accept=".png,.jpg,.jpeg"
+                :fileList="previewImages"
             >
             >
               <view class="upload-btn">
               <view class="upload-btn">
                 <up-icon name="plus" size="20" color="#ccc"></up-icon>
                 <up-icon name="plus" size="20" color="#ccc"></up-icon>
@@ -119,7 +118,6 @@
           <view class="upload-item">
           <view class="upload-item">
             <view class="upload-label"><text class="required">*</text>商品图片</view>
             <view class="upload-label"><text class="required">*</text>商品图片</view>
             <up-upload
             <up-upload
-                :fileList="productImages"
                 @afterRead="async (e) => {
                 @afterRead="async (e) => {
                   await afterRead(e);
                   await afterRead(e);
                   getImageProduct();
                   getImageProduct();
@@ -128,8 +126,7 @@
                 name="product"
                 name="product"
                 multiple
                 multiple
                 :maxCount="10"
                 :maxCount="10"
-                :maxSize="5 * 1024 * 1024"
-                accept=".png,.jpg,.jpeg"
+                :fileList="productImages"
             >
             >
               <view class="upload-btn">
               <view class="upload-btn">
                 <up-icon name="plus" size="20" color="#ccc"></up-icon>
                 <up-icon name="plus" size="20" color="#ccc"></up-icon>

+ 278 - 0
pages/order_pay_status/index.vue

@@ -0,0 +1,278 @@
+<template>
+  <view>
+    <view class="payment-status">
+      <!--失败时: 用icon-iconfontguanbi fail替换icon-duihao2 bg-color-->
+      <view
+        class="iconfont icons icon-success bg-color"
+        v-if="order_pay_info.paid || order_pay_info.payType == 'offline'"
+      ></view>
+      <view class="iconfont icons fail-status icon-fail" v-else></view>
+      <!-- 失败时:订单支付失败 -->
+      <view class="status" v-if="order_pay_info.payType != 'offline'">{{
+        order_pay_info.paid ? "订单支付成功" : "订单支付失败"
+      }}</view>
+      <view class="status" v-else>订单创建成功</view>
+      <view class="wrapper">
+        <view class="item acea-row row-between-wrapper">
+          <view>订单编号</view>
+          <view class="itemCom">{{ order_pay_info.orderId }}</view>
+        </view>
+        <view class="item acea-row row-between-wrapper">
+          <view>下单时间</view>
+          <view class="itemCom">{{
+            order_pay_info.createTime ? order_pay_info.createTime : "-"
+          }}</view>
+        </view>
+        <view class="item acea-row row-between-wrapper">
+          <view>支付方式</view>
+          <block v-if="order_pay_info.mallType === 0">
+            <!-- <view class="itemCom" v-if="order_pay_info.payType == 'weixin'"
+              >微信支付</view
+            > -->
+            <view class="itemCom" v-if="order_pay_info.payType == 'yue'"
+              >余额支付</view
+            >
+            <view
+              class="itemCom"
+              v-else-if="order_pay_info.payType == 'offline'"
+              >线下支付</view
+            >
+            <!-- <view class="itemCom" v-else-if="order_pay_info.payType == 'alipay'"
+              >支付宝支付</view
+            > -->
+          </block>
+          <view class="itemCom" v-else>贝币支付</view>
+        </view>
+        <view class="item acea-row row-between-wrapper">
+          <view>支付金额</view>
+          <view class="itemCom" v-if="order_pay_info.mallType === 0">{{
+            order_pay_info.payPrice
+          }}</view>
+          <view class="itemCom" v-else>{{ order_pay_info.totalPrice }}</view>
+        </view>
+        <!--失败时加上这个  -->
+        <view
+          class="item acea-row row-between-wrapper"
+          v-if="order_pay_info.paid == 0 && order_pay_info.payType != 'offline'"
+        >
+          <view>失败原因</view>
+          <!-- <view class="itemCom">{{ status == 2 ? "取消支付" : msg }}</view> -->
+          <view class="itemCom">{{ msg }}</view>
+        </view>
+      </view>
+      <!--失败时: 重新购买 -->
+      <view @tap="goOrderDetails">
+        <button formType="submit" class="returnBnt bg-color" hover-class="none">
+          查看订单
+        </button>
+      </view>
+      <button
+        @click="goMallIndex"
+        class="returnBnt cart-color"
+        formType="submit"
+        hover-class="none"
+      >
+        返回商城
+      </button>
+    </view>
+  </view>
+</template>
+
+<script setup>
+import { ref, computed, watch } from "vue";
+import { useAppStore } from "@/stores/app.js";
+import { onLoad, onBackPress } from "@dcloudio/uni-app";
+import { getOrderDetail } from "@/api/order.js";
+import { openOrderSubscribe } from "@/utils/SubscribeMessage.js";
+import { toLogin } from "@/libs/login.js";
+import { usePayment } from "@/hooks/usePayment";
+import { addRecommenderRole, getJoinTeamUserRoles } from "@/utils/util";
+
+const appStore = useAppStore();
+const { paymentResult } = usePayment();
+
+const orderId = ref("");
+const order_pay_info = ref({
+  paid: 1,
+  _status: {},
+});
+const isAuto = ref(false);
+const isShowAuth = ref(false);
+const status = ref(0);
+const msg = ref("");
+const join_roles = ref([]);
+
+function getOrderPayInfo() {
+  uni.showLoading({
+    title: "正在加载中",
+  });
+  getOrderDetail(orderId.value)
+    .then((res) => {
+      uni.hideLoading();
+      order_pay_info.value = res.data;
+      uni.setNavigationBarTitle({
+        title: res.data.paid ? "支付成功" : "支付失败",
+      });
+      // 自动成为推荐官
+      if (res.data.paid && !join_roles.value.includes("推荐官")) {
+        addRecommenderRole();
+      }
+    })
+    .catch(() => {
+      uni.hideLoading();
+    });
+}
+
+function goMallIndex() {
+  console.log("mallType", order_pay_info.value.mallType);
+  uni.navigateTo({
+    url: "/pages/index/index",
+  });
+}
+
+onBackPress((options) => {
+  if (order_pay_info.value.mallType === 1) {
+    uni.navigateTo({
+      url: "/pages/index/index",
+    });
+    return true;
+  }
+  const productId = order_pay_info.value.orderInfoList?.[0].productId || "";
+  if (productId) {
+    uni.reLaunch({
+      url: `/pages/goods_details/index?id=${productId}`,
+    });
+    return true;
+  }
+  uni.reLaunch({
+    url: `/pages/index/index`,
+  });
+
+  return true;
+});
+
+function goOrderDetails() {
+  uni.navigateTo({
+    url: "/pages/order_details/index?order_id=" + orderId.value,
+  });
+}
+
+// 授权回调
+function onLoadFun() {
+  getOrderPayInfo();
+}
+
+// 监听登录状态
+watch(
+  () => appStore.isLogin,
+  (newV) => {
+    if (newV) {
+      getOrderPayInfo();
+    }
+  }
+);
+
+// 页面加载
+onLoad(async (options) => {
+  console.log({ options });
+  if (!options.order_id) {
+    return uni.showToast({
+      title: "缺少参数无法查看订单支付状态",
+      icon: "none",
+    });
+  }
+  orderId.value = options.order_id;
+  status.value = options.status || 0;
+  msg.value = options.msg || "";
+  join_roles.value = await getJoinTeamUserRoles();
+  if (appStore.isLogin) {
+    getOrderPayInfo();
+  } else {
+    toLogin();
+  }
+});
+</script>
+
+<style lang="scss" scoped>
+.fail-status {
+  background-color: #999 !important;
+  text-shadow: none !important;
+}
+.payment-status {
+  background-color: #fff;
+  margin: 120rpx 30rpx 0 30rpx;
+  border-radius: 10rpx;
+  padding: 1rpx 0 28rpx 0;
+}
+.payment-status .icons {
+  font-size: 70rpx;
+  width: 140rpx;
+  height: 140rpx;
+  border-radius: 50%;
+  color: #fff;
+  text-align: center;
+  line-height: 140rpx;
+  // text-shadow: 0px 4px 0px #df1e14;
+  border: 6rpx solid #f5f5f5;
+  margin: -76rpx auto 0 auto;
+  background-color: #999;
+}
+
+.payment-status .iconfont {
+  font-size: 75rpx;
+  width: 140rpx;
+  height: 140rpx;
+  border-radius: 50%;
+  color: #fff;
+  text-align: center;
+  line-height: 140rpx;
+  // text-shadow: 0px 4px 0px #df1e14;
+  border: 6rpx solid #f5f5f5;
+  margin: -76rpx auto 0 auto;
+  background-color: #999;
+  background-color: $theme-color;
+}
+
+.payment-status .iconfont.fail {
+  text-shadow: 0px 4px 0px #7a7a7a;
+}
+
+.payment-status .status {
+  font-size: 32rpx;
+  font-weight: bold;
+  text-align: center;
+  margin: 25rpx 0 37rpx 0;
+}
+
+.payment-status .wrapper {
+  border: 1rpx solid #eee;
+  margin: 0 30rpx 47rpx 30rpx;
+  padding: 35rpx 0;
+  border-left: 0;
+  border-right: 0;
+}
+
+.payment-status .wrapper .item {
+  font-size: 28rpx;
+  color: #282828;
+}
+
+.payment-status .wrapper .item ~ .item {
+  margin-top: 20rpx;
+}
+
+.payment-status .wrapper .item .itemCom {
+  color: #666;
+}
+
+.payment-status .returnBnt {
+  width: 630rpx;
+  height: 86rpx;
+  border-radius: 50rpx;
+  color: #fff;
+  font-size: 30rpx;
+  text-align: center;
+  line-height: 86rpx;
+  margin: 0 auto 20rpx auto;
+}
+</style>

+ 7 - 2
pages/user/index.vue

@@ -203,8 +203,8 @@ const commonFunctions = ref([
   { src: `${HTTP_REQUEST_URL_IMG}setting/zuji.png`, name: '浏览足迹',pageUrl:'/pages/users/browsing_history/index',show:true },
   { src: `${HTTP_REQUEST_URL_IMG}setting/zuji.png`, name: '浏览足迹',pageUrl:'/pages/users/browsing_history/index',show:true },
   { src: `${HTTP_REQUEST_URL_IMG}setting/shoucang.png`, name: '我的收藏',pageUrl:'/pages/users/user_goods_collection/index' ,show:true},
   { src: `${HTTP_REQUEST_URL_IMG}setting/shoucang.png`, name: '我的收藏',pageUrl:'/pages/users/user_goods_collection/index' ,show:true},
   { src: `${HTTP_REQUEST_URL_IMG}setting/dingwei.png`, name: '收货地址',pageUrl:'/pages/users/user_address_list/index' ,show:true},
   { src: `${HTTP_REQUEST_URL_IMG}setting/dingwei.png`, name: '收货地址',pageUrl:'/pages/users/user_address_list/index' ,show:true},
-  { src: `${HTTP_REQUEST_URL_IMG}setting/dianpu.png`, name: '联系商家',pageUrl: '/pages/users/my_merchant/index' ,show:appStore.merchantId?true:false},
-  { src: `${HTTP_REQUEST_URL_IMG}setting/dianpu.png`, name: '门店主页',pageUrl: '/pages/merchantCenter/index' ,show:appStore.userInfo.merchant.id?true:false},
+  { src: `${HTTP_REQUEST_URL_IMG}setting/dianpu.png`, name: '联系商家',pageUrl: '/pages/users/my_merchant/index' ,show:!!(appStore.merchantId || appStore.userInfo?.merchant?.id)},
+  { src: `${HTTP_REQUEST_URL_IMG}setting/dianpu.png`, name: '门店主页',pageUrl: '/pages/merchantCenter/index' ,show:!!appStore.userInfo?.merchant?.id},
   // { src: `${HTTP_REQUEST_URL_IMG}setting/yijianjianyi.png`, name: '意见建议' ,show:true},
   // { src: `${HTTP_REQUEST_URL_IMG}setting/yijianjianyi.png`, name: '意见建议' ,show:true},
   { src: `${HTTP_REQUEST_URL_IMG}setting/xiazaiapp.png`, name: '下载APP',show:true },
   { src: `${HTTP_REQUEST_URL_IMG}setting/xiazaiapp.png`, name: '下载APP',show:true },
   { src: `${HTTP_REQUEST_URL_IMG}setting/lianxikefu.png`, name: '平台客服' ,show:true},
   { src: `${HTTP_REQUEST_URL_IMG}setting/lianxikefu.png`, name: '平台客服' ,show:true},
@@ -463,6 +463,7 @@ const getHistoryList = async () => {
   justify-content: center;
   justify-content: center;
   .setting{
   .setting{
     width: 40rpx;
     width: 40rpx;
+    height: 40rpx;
   }
   }
   .btn-text {
   .btn-text {
     font-size: 24rpx;
     font-size: 24rpx;
@@ -499,6 +500,7 @@ const getHistoryList = async () => {
       align-items: center;
       align-items: center;
       .vipIcon{
       .vipIcon{
         width: 70rpx;
         width: 70rpx;
+        height: 60rpx;
         margin-right: 10rpx;
         margin-right: 10rpx;
       }
       }
       .bigText{
       .bigText{
@@ -517,6 +519,7 @@ const getHistoryList = async () => {
       border-radius: 16rpx 16rpx 16rpx 16rpx;
       border-radius: 16rpx 16rpx 16rpx 16rpx;
       .bofang{
       .bofang{
         width: 24rpx;
         width: 24rpx;
+        height: 24rpx;
         margin-left: 10rpx;
         margin-left: 10rpx;
       }
       }
     }
     }
@@ -637,6 +640,7 @@ const getHistoryList = async () => {
 .function-icon {
 .function-icon {
   .img{
   .img{
     width: 60rpx;
     width: 60rpx;
+    height: 60rpx;
   }
   }
 }
 }
 
 
@@ -721,6 +725,7 @@ const getHistoryList = async () => {
 .status-icon {
 .status-icon {
   .img{
   .img{
     width: 60rpx;
     width: 60rpx;
+    height: 60rpx;
   }
   }
 }
 }
 
 

+ 16 - 8
pages/users/my_merchant/index.vue

@@ -42,6 +42,7 @@
 import { ref } from 'vue';
 import { ref } from 'vue';
 import { onLoad, onShow, onReachBottom } from "@dcloudio/uni-app";
 import { onLoad, onShow, onReachBottom } from "@dcloudio/uni-app";
 import { getSbmerchantInfo } from "@/api/merchant.js";
 import { getSbmerchantInfo } from "@/api/merchant.js";
+import { getQrcode } from "@/api/user.js"
 import { toLogin } from "@/libs/login.js";
 import { toLogin } from "@/libs/login.js";
 import { useAppStore } from "@/stores/app.js";
 import { useAppStore } from "@/stores/app.js";
 import { HTTP_REQUEST_URL_IMG } from "@/config/app";
 import { HTTP_REQUEST_URL_IMG } from "@/config/app";
@@ -50,18 +51,23 @@ const appStore = useAppStore();
 const merchantInfo = ref('')
 const merchantInfo = ref('')
 const isLogin = appStore.isLogin;
 const isLogin = appStore.isLogin;
 
 
-onLoad((options) => {
-  getSbmerchantInfoFn();
+onLoad(() => {
+  if(appStore.merchantId || appStore.userInfo?.merchant?.id){
+    let merchantId = appStore.merchantId || appStore.userInfo?.merchant?.id;
+    getSbmerchantInfoFn(merchantId);
+  }
 });
 });
 
 
-const getSbmerchantInfoFn = () => {
+const getSbmerchantInfoFn = async (merchantId) => {
   let data = {
   let data = {
-    merchantId:2
+    merchantId
+  }
+  const res = await getSbmerchantInfo(data);
+  merchantInfo.value = res.data;
+  if(!merchantInfo.value.merchantCodeUrl){
+    const response = await getQrcode({id:merchantId})
+    merchantInfo.value.merchantCodeUrl = response.message;
   }
   }
-  getSbmerchantInfo(data).then((res) => {
-        console.log(res);
-    merchantInfo.value = res.data;
-  })
 
 
 }
 }
 // 分享功能
 // 分享功能
@@ -180,11 +186,13 @@ const makePhoneCall = () => {
     align-items: center;
     align-items: center;
     background-color: #F9F7F0;
     background-color: #F9F7F0;
     border-radius: 16rpx;
     border-radius: 16rpx;
+    padding: 20rpx 0;
     .left{
     .left{
       width: 140rpx;
       width: 140rpx;
       .storeImg{
       .storeImg{
         width: 100rpx;
         width: 100rpx;
         height: 100rpx;
         height: 100rpx;
+        border-radius: 50%;
       }
       }
     }
     }
     .center{
     .center{

+ 3 - 2
pages/users/order_confirm/index.vue

@@ -381,7 +381,7 @@ const avaliablePayments = computed(() => {
 console.log(avaliablePayments)
 console.log(avaliablePayments)
 
 
 // 响应式变量:当前选中的支付方式(默认余额支付)
 // 响应式变量:当前选中的支付方式(默认余额支付)
-const payType = ref("alipay");
+const payType = ref("yue");
 // 响应式变量:优惠券打开方式(1表示"使用"场景)
 // 响应式变量:优惠券打开方式(1表示"使用"场景)
 const openType = ref(1);
 const openType = ref(1);
 // 响应式变量:当前选中的支付方式索引(用于UI高亮)
 // 响应式变量:当前选中的支付方式索引(用于UI高亮)
@@ -550,7 +550,8 @@ const getloadPreOrder = () => {
         // 根据商城类型设置是否使用积分(mallType=1时默认使用)
         // 根据商城类型设置是否使用积分(mallType=1时默认使用)
         useIntegral.value = orderInfoVo.value.mallType === 1;
         useIntegral.value = orderInfoVo.value.mallType === 1;
         // 根据商城类型设置默认支付方式(mallType=1时用贝币支付)
         // 根据商城类型设置默认支付方式(mallType=1时用贝币支付)
-        payType.value = orderInfoVo.value.mallType === 1 ? "yue" : "alipay";
+        // payType.value = orderInfoVo.value.mallType === 1 ? "yue" : "alipay";
+        payType.value = "yue";
 
 
         // 动态更新支付方式状态(根据接口返回的配置)
         // 动态更新支付方式状态(根据接口返回的配置)
         payments.value.forEach((item) => {
         payments.value.forEach((item) => {

+ 9 - 7
pages/users/user_goods_collection/index.vue

@@ -10,10 +10,10 @@
       </view>
       </view>
       <!-- #endif -->
       <!-- #endif -->
       <view class="list">
       <view class="list">
-        <up-checkbox-group shape="circle" @change="checkboxChange" class="centent" activeColor="#ffe079">
+        <up-checkbox-group shape="circle" @change="checkboxChange" class="centent" activeColor="#F8C008">
           <view v-for="(item,index) in collectProductList" :key="index" class='item acea-row row-middle' style="width: 100%;">
           <view v-for="(item,index) in collectProductList" :key="index" class='item acea-row row-middle' style="width: 100%;">
             <up-checkbox :name="item.id.toString()" :checked="item.checked" v-if="!footerswitch"
             <up-checkbox :name="item.id.toString()" :checked="item.checked" v-if="!footerswitch"
-                      style="margin-right: 10rpx;" activeColor="#ffe079" />
+                      style="margin-right: 10rpx;" activeColor="#F8C008" />
             <navigator :url='"/pages/goods/goods_details/index?id="+item.productId' hover-class='none'
             <navigator :url='"/pages/goods/goods_details/index?id="+item.productId' hover-class='none'
                        class="acea-row">
                        class="acea-row">
               <view class='pictrue'>
               <view class='pictrue'>
@@ -33,7 +33,7 @@
       <view v-if="!footerswitch" class='footer acea-row row-between-wrapper'>
       <view v-if="!footerswitch" class='footer acea-row row-between-wrapper'>
         <view>
         <view>
           <up-checkbox-group shape="circle" @change="checkboxAllChange">
           <up-checkbox-group shape="circle" @change="checkboxAllChange">
-            <up-checkbox value="all" :checked="!!isAllSelect" activeColor="#ffe079"  />
+            <up-checkbox value="all" :checked="!!isAllSelect" activeColor="#F8C008"  />
             <text class='checkAll'>全选</text>
             <text class='checkAll'>全选</text>
           </up-checkbox-group>
           </up-checkbox-group>
         </view>
         </view>
@@ -212,13 +212,14 @@ const get_user_collect_product = async () => {
     }
     }
 
 
     loadend.value = isLoadend;
     loadend.value = isLoadend;
-    loadTitle.value = isLoadend ? '已全部加载' : '加载更多';
+    console.log(isLoadend)
+    loadTitle.value = isLoadend ? '我是有底线的' : '加载更多';
+    console.log(loadTitle.value)
     page.value++;
     page.value++;
   } catch (err) {
   } catch (err) {
     console.error(err);
     console.error(err);
   } finally {
   } finally {
     loading.value = false;
     loading.value = false;
-    loadTitle.value = '加载更多';
   }
   }
 };
 };
 
 
@@ -347,7 +348,7 @@ onReachBottom(() => {
 
 
   .list {
   .list {
     padding: 30rpx;
     padding: 30rpx;
-    margin-top: 90rpx;
+    margin-top: 110rpx;
 
 
     .name {
     .name {
       width: 434rpx;
       width: 434rpx;
@@ -368,7 +369,7 @@ onReachBottom(() => {
   background-color: #fff;
   background-color: #fff;
   padding-left: 24rpx;
   padding-left: 24rpx;
   height: 180rpx;
   height: 180rpx;
-  margin-bottom: 15rpx;
+  margin-bottom: 20rpx;
   border-radius: 14rpx;
   border-radius: 14rpx;
 }
 }
 
 
@@ -438,6 +439,7 @@ onReachBottom(() => {
     font-size: 28rpx;
     font-size: 28rpx;
     color: #282828;
     color: #282828;
     margin-left: 16rpx;
     margin-left: 16rpx;
+    line-height: 56rpx;
   }
   }
 
 
   .button .bnt {
   .button .bnt {

+ 61 - 0
utils/util.js

@@ -1,6 +1,8 @@
 import { TOKENNAME, HTTP_REQUEST_URL } from "../config/app.js";
 import { TOKENNAME, HTTP_REQUEST_URL } from "../config/app.js";
 import { HTTP_ADMIN_URL, BASE_OSS_URL } from "@/config/app.js";
 import { HTTP_ADMIN_URL, BASE_OSS_URL } from "@/config/app.js";
 import { useAppStore } from "@/stores/app.js";
 import { useAppStore } from "@/stores/app.js";
+import { addJoinTeamUserRole } from "@/api/api.js";
+import { getJoinRolesAPI } from "@/api/joinus";
 import { pathToBase64 } from "@/plugin/image-tools/index.js";
 import { pathToBase64 } from "@/plugin/image-tools/index.js";
 import { useToast } from "@/hooks/useToast";
 import { useToast } from "@/hooks/useToast";
 import pageJson from '@/pages.json';
 import pageJson from '@/pages.json';
@@ -904,3 +906,62 @@ export function getSceneInfo(e) {
   }
   }
   return {};
   return {};
 }
 }
+// 获取用户所有的加盟角色列表
+export async function getJoinTeamUserRoles() {
+  let join_roles = [];
+  const { data: list } = await getJoinRolesAPI();
+
+  list.forEach((item) => {
+    join_roles.push(item.roleName);
+  });
+
+  return join_roles;
+}
+// 为用户添加加盟角色(推荐官)
+// addRecommenderRole();
+//
+export async function addRecommenderRole(remark) {
+  try {
+    const appStore = useAppStore();
+    const uid = appStore.uid;
+    console.log("appStore", appStore.uid);
+
+    if (!uid) {
+      console.error("添加推荐官角色失败:用户ID不存在");
+      uni.showToast({ title: "用户信息异常", icon: "none" });
+      return;
+    }
+
+    const requestParams = {
+      remark: remark || "自动成为推荐官",
+      roleName: "推荐官",
+      roleType: 2, // 2-推荐官
+      uid,
+    };
+
+    const response = await addJoinTeamUserRole(requestParams);
+
+    console.log("response", response);
+
+    uni.showModal({
+      title: "恭喜",
+      content: "您已成为推荐官,推荐用户注册、消费立得好礼,是否立即查看?",
+      confirmText: "立即查看",
+      cancelText: "稍后",
+      success: (res) => {
+        if (res.confirm) {
+          uni.navigateTo({
+            url: "/pages/join_us/recommed",
+          });
+        }
+      },
+    });
+  } catch (error) {
+    console.error("添加推荐官角色请求异常:", error);
+    uni.showToast({
+      title: error || "网络异常,请稍后重试",
+      icon: "none",
+      duration: 2000,
+    });
+  }
+}