Bläddra i källkod

feat:“优化商户管理和结算账号功能,添加切换登陆功能,添加切换支付平台功能”

soobin 1 år sedan
förälder
incheckning
6e61bc160d

+ 24 - 6
src/assets/language/en.json

@@ -644,6 +644,9 @@
     "shoppingVoucher": "Shopping Voucher"
   },
   "joinpayMch": {
+    "huifuAuditStatus": "Huifu settled status",
+    "joinpayAuditStatus": "JoinpayMch settled status",
+    "settlementAccount": "Settlement account",
     "withdrawalAccountNo": "Withdrawal account No",
     "merchantNameLabel": "Merchant name",
     "merchantNamePlaceholder": "Please enter the merchant name",
@@ -708,6 +711,8 @@
     "uploYourIdCard": "Please upload your ID card",
     "uploPortrait": "Upload portrait",
     "uploNatiEmblem": "Upload the National Emblem",
+    "upStatementCard": "Please upload your statement card",
+    "statementCard": "Statement card front",
     "businessLicensePlace": "Please upload the business license",
     "businessLicense": "Enterprise business license",
     "accountOpeningLicensePlace": "Please upload the account opening license",
@@ -785,7 +790,11 @@
     "bankAccount": "bank account",
     "bankNo": "Bank No",
     "theTwoPasswordsAreDifferent": "The two passwords are different",
-    "modificationSucceeded": "Modification succeeded"
+    "modificationSucceeded": "Modification succeeded",
+    "joinpayMch":"JoinpayMch status",
+    "huifuMch":"HuifuMch Status",
+    "tips": "Remind",
+    "autoLogin": "Do you want to switch login?"
   },
   "orderCenter": {
     "orderCenter": "Order Center",
@@ -900,6 +909,7 @@
     "orderExport": "Order Export",
     "shandeSubLedger": "Shande Sub ledger",
     "salesRanking": "Sales Ranking",
+    "settlementAccount": "Settlement account",
     "withdrawalAccountNo": "Withdrawal account No",
     "standbyWithdrawalAccountNo": "Standby withdrawal account No",
     "dataOverview": "Data overview",
@@ -1169,7 +1179,7 @@
     "header": "User Registration",
     "usernameLabel": "Account name",
     "usernamePlaceholder": "Please enter the account name",
-    "usernameRequired": "Please enter the account name",
+    "usernameRequired": "Alphanumeric with letter as the first character",
     "nameLabel": "User Name",
     "namePlaceholder": "Please enter the user name",
     "nameRequired": "Please enter the user name",
@@ -1185,7 +1195,7 @@
     "logonMode": "Logon mode",
     "phoneLabel": "Phone number",
     "phonePlaceholder": "Please enter your mobile number",
-    "phoneRequired": "Please enter your mobile number",
+    "phoneRequired": "Please enter the correct mobile number",
     "seedVerCode": "Send verification code",
     "codeLabel": "verification code",
     "codePlaceholder": "Please enter SMS verification code",
@@ -1198,8 +1208,8 @@
     "emailCodeRequired": "Please enter the email verification code",
     "registerButton": "Register",
     "replaysInSeconds": "Replays in seconds",
-    "emailRegistration": "Email registration",
-    "phoneRegistration": "Phone registration"
+    "emailRegistration": "Email",
+    "phoneRegistration": "Phone"
   },
   "robotRanking": {
     "machineSalesRanking": "Machine sales ranking",
@@ -1249,6 +1259,7 @@
     "associateParentPlace": "Please enter the related superior",
     "commonOperations": "Common Operations",
     "taskMessage": "Task Message",
+    "settlementAccount": "Settlement account",
     "withdrawalAccountNo": "Withdrawal account No",
     "standbyWithdrawalAccountNo": "Standby withdrawal account No",
     "changePassword": "Change Password",
@@ -1263,7 +1274,13 @@
     "bindWechat": "Bind WeChat",
     "airwallex": "Airwallex",
     "currencySymbol": "Custom Currency",
-    "currencySymbolPlace": "Please enter currency symbol"
+    "currencySymbolPlace": "Please enter currency symbol",
+    "szPayType": "Sunzee payment",
+    "scPayType": "Sevencloud payment",
+    "currentChoose": "Current selection",
+    "tips": "Remind",
+    "changeTips": "Whether to switch payment platforms?",
+    "changeSuccess": "Switchover successful"
   },
   "bindWechat": {
     "cancel": "Cancel",
@@ -1343,6 +1360,7 @@
     "title": "Acount operation",
     "accountAuthority": "Account authority",
     "distributionSettings": "Distribution Settings",
+    "settlementAccount": "Settlement account",
     "withdrawalAccountNo": "Standby withdrawal account No",
     "standbyWithdrawalAccountNo": "Standby withdrawal account No",
     "merchantManagement": "Merchant management",

+ 24 - 6
src/assets/language/zh.json

@@ -645,6 +645,9 @@
     "shoppingVoucher": "购物凭证"
   },
   "joinpayMch": {
+    "huifuAuditStatus": "汇付入驻状态",
+    "joinpayAuditStatus": "汇聚入驻状态",
+    "settlementAccount": "结算账号",
     "withdrawalAccountNo": "提现账号",
     "merchantNameLabel": "商户名称",
     "merchantNamePlaceholder": "请输入商户名称",
@@ -709,6 +712,8 @@
     "uploYourIdCard": "请上传身份证",
     "uploPortrait": "上传人像面",
     "uploNatiEmblem": "上传国徽面",
+    "upStatementCard": "请上传结算卡",
+    "statementCard": "结算卡正面",
     "businessLicensePlace": "请上传企业营业执照",
     "businessLicense": "企业营业执照",
     "accountOpeningLicensePlace": "请上传开户许可证",
@@ -784,9 +789,13 @@
     "corporateAccount": "对公账户",
     "bankAccountName": "银行账户名称",
     "bankAccount": "银行账号",
-    "bankNo": "行号",
+    "bankNo": "行号",
     "theTwoPasswordsAreDifferent": "两次密码输入不相同",
-    "modificationSucceeded": "修改成功"
+    "modificationSucceeded": "修改成功",
+    "joinpayMch": "汇聚账号状态",
+    "huifuMch": "汇付账号状态",
+    "tips": "提醒",
+    "autoLogin": "是否切换登陆?"
   },
   "orderCenter": {
     "orderCenter": "订单中心",
@@ -907,6 +916,7 @@
     "orderExport": "订单导出",
     "shandeSubLedger": "杉德分账",
     "salesRanking": "销售排行",
+    "settlementAccount": "结算账号",
     "withdrawalAccountNo": "提现账号",
     "standbyWithdrawalAccountNo": "备用提现账号",
     "dataOverview": "数据概览",
@@ -1181,7 +1191,7 @@
     "header": "用户注册",
     "usernameLabel": "账号名称",
     "usernamePlaceholder": "请输入账号名称",
-    "usernameRequired": "请输入账号名称",
+    "usernameRequired": "账号名称由字母数字组成,且只能字母开头",
     "nameLabel": "用户姓名",
     "namePlaceholder": "请输入用户姓名",
     "nameRequired": "请输入用户姓名",
@@ -1197,7 +1207,7 @@
     "logonMode": "注册方式",
     "phoneLabel": "手机号码",
     "phonePlaceholder": "请输入手机号码",
-    "phoneRequired": "请输入手机号码",
+    "phoneRequired": "请输入正确的手机号码",
     "emailWordSpan": "输入注册海外账户邮箱",
     "emailWordSpanChina": "输入注册时的国内邮箱",
     "seedVerCode": "发送验证码",
@@ -1263,6 +1273,7 @@
     "associateParentPlace": "请输入关联上级",
     "commonOperations": "常用操作",
     "taskMessage": "任务消息",
+    "settlementAccount": "结算账号",
     "withdrawalAccountNo": "提现账号",
     "standbyWithdrawalAccountNo": "备用提现账号",
     "changePassword": "修改密码",
@@ -1277,7 +1288,13 @@
     "bindWechat": "绑定微信",
     "airwallex": "空中云汇",
     "currencySymbol": "自定义货币",
-    "currencySymbolPlace": "请输入自定义货币"
+    "currencySymbolPlace": "请输入自定义货币",
+    "szPayType": "申泽支付平台",
+    "scPayType": "七云支付平台",
+    "currentChoose": "当前选择",
+    "tips": "提醒",
+    "changeTips": "是否切换支付平台?",
+    "changeSuccess": "切换成功"
   },
   "bindWechat": {
     "cancel": "取消",
@@ -1357,6 +1374,7 @@
     "title": "账户操作",
     "accountAuthority": "账户权限",
     "distributionSettings": "分销设置",
+    "settlementAccount": "结算账号",
     "withdrawalAccountNo": "提现账号",
     "standbyWithdrawalAccountNo": "备用提现账号",
     "merchantManagement": "商户管理",
@@ -1371,4 +1389,4 @@
   "广告管理": "广告管理",
   "订单导出": "订单导出",
   "apk管理": "apk管理"
-}
+}

+ 7 - 0
src/router/index.js

@@ -190,6 +190,13 @@ const router = createRouter({
     },
     // 提现账号
     {
+      path: "/settlement",
+      name: "settlement",
+      component: () => import("@/views/settlement/index"),
+      meta: { index: 1 },
+    },
+    // 提现账号
+    {
       path: "/joinpayMch",
       name: "joinpayMch",
       component: () => import("@/views/joinpayMch/index"),

+ 15 - 0
src/service/huifuMch/index.js

@@ -16,6 +16,11 @@ export function uploadPic(params) {
     return axios.post(`/SZWL-SERVER/tHuifuMch/uploadPic`, params);
 }
 
+// 新上传材料图片
+export function newUploadPic(params) {
+    return axios.post(`/SZWL-SERVER/tHuifuMch/newUploadPic`, params);
+}
+
 // 提交审核
 export function submitHuifuCheck(params) {
     return axios.post(`/SZWL-SERVER/tHuifuMch/submitCheck`, params);
@@ -36,3 +41,13 @@ export function getHuifuId(params) {
     return axios.get(`/SZWL-SERVER/tHuifuMch/getHuifuId?${stringToUrl(params)}`);
 }
 
+// 直接审核商户修改
+export function auditMerchantUpdate(params) {
+    return axios.post(`/SZWL-SERVER/tHuifuMch/auditMerchantUpdate`, params);
+}
+
+// 汇付账号修改审批
+export function auditUpdateMerchant(params) {
+    return axios.get(`/SZWL-SERVER/tHuifuMch/auditUpdateMerchant?${stringToUrl(params)}`);
+}
+

+ 12 - 0
src/service/joinpayMch/index.js

@@ -17,7 +17,19 @@ export function updateJoinPayMchCheck(params) {
 export function sentImage(params) {
   return axios.post(`/SZWL-SERVER/tJoinpayMch/sentImage`, params);
 }
+// 更新图片审核情况
+export function updateApproveStatus(params) {
+  return axios.post(`/SZWL-SERVER/tJoinpayMch/updateApproveStatus`, params);
+}
 // 签约
 export function altMchSign(params) {
   return axios.get(`/SZWL-SERVER/tJoinpayMch/altMchSign?${stringToUrl(params)}`);
 }
+// 汇付账号入驻审批
+export function auditAddMerchant(params) {
+  return axios.get(`/SZWL-SERVER/tHuifuMch/auditAddMerchant?${stringToUrl(params)}`);
+}
+// 更新汇付签约状态
+export function updateConStat(params) {
+  return axios.post(`/SZWL-SERVER/tHuifuMch/updateConStat`, params);
+}

+ 8 - 0
src/service/merchantManage/index.js

@@ -27,3 +27,11 @@ export function updateAdmin(params) {
   // tAdmin/update
   return axios.post(`/SZWL-SERVER/tAdmin/update`, params);
 }
+// 获取汇付信息
+export function getHuifuMch(params) {
+  return axios.get(`/SZWL-SERVER/tHuifuMch/getHuifuMchCheck?${stringToUrl(params)}`);
+}
+// 切换登陆
+export function autoLoginMerchant(params) {
+  return axios.get(`/SZWL-SERVER/tAdmin/autoLogin?${stringToUrl(params)}`);
+}

+ 5 - 1
src/service/user.js

@@ -27,4 +27,8 @@ export function Api_getAreaDetail(params) {
 // 是否海外用户
 export function getIfForeign(adminId) {
   return axios.get(`/SZWL-SERVER/tAdmin/getIfForeign/${adminId}`);
-}
+}
+// 批量修改支付平台
+export function updatePayPlatform(params) {
+  return axios.get(`/SZWL-SERVER/tAdmin/updatePayPlatform?${stringToUrl(params)}`, params);
+} 

+ 6 - 4
src/styles/home/index.less

@@ -49,11 +49,13 @@
         overflow-wrap: break-word;
         white-space: nowrap;
         line-height: 16px;
+        font-size: 15px;
         // margin-left: 36px;
         display: block;
       }
 
       .word2 {
+        font-size: 15px;
         height: 16px;
         overflow-wrap: break-word;
         white-space: nowrap;
@@ -119,7 +121,7 @@
             height: 17px;
             overflow-wrap: break-word;
             color: #4d6add;
-            font-size: 12px;
+            font-size: 14px;
             text-align: center;
             white-space: nowrap;
             line-height: 17px;
@@ -178,7 +180,7 @@
             height: 17px;
             overflow-wrap: break-word;
             color: rgba(135, 135, 166, 1);
-            font-size: 12px;
+            font-size: 15px;
             text-align: center;
             white-space: nowrap;
             line-height: 17px;
@@ -212,7 +214,7 @@
               height: 17px;
               overflow-wrap: break-word;
               color: rgba(135, 135, 166, 1);
-              font-size: 12px;
+              font-size: 15px;
               text-align: center;
               white-space: nowrap;
               line-height: 17px;
@@ -247,7 +249,7 @@
               height: 17px;
               overflow-wrap: break-word;
               color: rgba(135, 135, 166, 1);
-              font-size: 12px;
+              font-size: 15px;
               text-align: center;
               white-space: nowrap;
               line-height: 17px;

+ 13 - 2
src/styles/merchantManage/index.less

@@ -96,7 +96,7 @@
                 box-shadow: 1px 1px 4px 2px rgba(70, 95, 198, 0.14);
                 background-color: rgba(255, 255, 255, 1);
                 border-radius: 4px;
-                height: 206px;
+                height: 250px;
                 margin: 0 auto;
                 margin-bottom: 20px;
                 width: 100%;
@@ -200,7 +200,7 @@
                         background-color: rgba(246, 247, 252, 1);
                         border-radius: 1px;
                         height: 26px;
-                        margin-top: 10px;
+                        margin: 10px 0;
                         width: 100%;
 
                         .txt3 {
@@ -216,6 +216,17 @@
                             margin: 8px 0 0 10px;
                         }
                     }
+
+
+                    .button-container {
+                        display: flex;
+                        justify-content: center;
+
+                        .btn1 {
+                            margin: 0 30px;
+                            padding: 0 20px;
+                        }
+                    }
                 }
             }
         }

+ 3 - 3
src/utils/axios.js

@@ -64,9 +64,9 @@ service.interceptors.response.use(res => {
       case '00000':
         break;
       default:
-        if(res.data.message){
-          Toast.fail(res.data.message)
-        }
+        // if(res.data.message){
+        //   Toast.fail(res.data.message)
+        // }
         break;
     }
     if (res.data.code === 'L0006') {

+ 6 - 0
src/utils/dateUtil.js

@@ -43,6 +43,12 @@ const dateUtil = {
     }
     return format;
   },
+  formatDate(dateString) {
+    const year = dateString.slice(0, 4);
+    const month = dateString.slice(4, 6);
+    const day = dateString.slice(6, 8);
+    return `${year}-${month}-${day}`;
+  },
   // 根据时区转换时间
   timeZoneDate(currentDate) {
     // 获取设备的时区偏移量(分钟)

+ 3 - 4
src/views/home/index.vue

@@ -12,10 +12,9 @@
       <div class="nameDeviceRow flex-col">
         <span class="txt3">{{ userName }}</span>
         <div class="l-flex-RC">
-          <span class="info3">{{ equipStatus.machineTotalNum }}
-            {{ $t("home.totalEquipment") }}</span>
+          <span class="info3" style="color: #4d6add;">{{ $t("home.totalEquipment") }} : {{ equipStatus.machineTotalNum }}</span>
           <div class="lineCon o-mlr-6"></div>
-          <span class="word2">{{ equipStatus.machineUseNum }} {{ $t("home.running") }}</span>
+          <span class="word2" style="color: #07c160;">{{ $t("home.running") }} : {{ equipStatus.machineUseNum }}</span>
         </div>
       </div>
       <!-- 没有数据概览M14权限的人看不到数据概览和ECharts -->
@@ -197,7 +196,7 @@ export default {
     } else {
       currencySymbol.value = "¥";
     }
-    console.log("currencySymbol是》》》" + user.currencySymbol);
+    // console.log("currencySymbol是》》》" + user.currencySymbol);
 
     // 图表对象
     const chartBox = ref();

+ 42 - 103
src/views/huifuMch/index.vue

@@ -273,7 +273,7 @@ import sHeader from "@/components/SimpleHeader";
 import dateUtil from "@/utils/dateUtil";
 import { Toast } from "vant";
 import { areaList } from "@vant/area-data";
-import { saveHuifuMch, getHuifuMchCheck, uploadPic, submitHuifuCheck } from "@/service/huifuMch";
+import { saveHuifuMch, getHuifuMchCheck, submitHuifuCheck, newUploadPic } from "@/service/huifuMch";
 import { getLoginUser } from "@/common/js/utils";
 import { useRouter } from "vue-router";
 import { useI18n } from "vue-i18n";
@@ -310,7 +310,7 @@ export default {
     const regAcctPic = ref();
     let addParams = reactive({
       adminId: user.id, // 当前登录账户的id
-      type: '0', // 类型 String 必填 对公企业:type=0; 个人:type=1
+      type: '0', // 类型 String 必填 对公企业:type=1; 个人:type=0
       regName: '', // 商户名称
       shortName: '', // 商户简称
       foundDate: '', // 成立时间
@@ -344,45 +344,30 @@ export default {
       certBeginDate: '', // 有效期开始日期
       certEndDate: '', // 有效期截止日期
     });
+    const params = {
+      adminId: user.id,
+      base64Str: null,
+      fileType: null,
+    };
     // 上传身份证正面
     const upCertFrontPic = async (file) => {
       file.status = 'uploading';
       file.message = '上传中...';
-      const formData = new FormData();
-      formData.append('file', file.file, file.file.name);
-      formData.append('adminId', user.id);
-      formData.append('fileType', "F40");
-      // console.log(formData.get("file"));
-      if (addParams.type === '1') {
-        formData.append('fileType', "F02");
+      params.base64Str = certFrontPic.value[0].content;
+      if (addParams.type === '0') {
+        params.fileType = "F40";
+      } else {
+        params.fileType = "F02";
       }
+      console.log("params", params);
       try {
-        const { data } = await uploadPic(formData, {
-          headers: {
-            'Content-Type': 'multipart/form-data',
-          },
-        });
-        if (addParams.type === '1') {
-          const { data1 } = await uploadPic(formData, {
-            headers: {
-              'Content-Type': 'multipart/form-data',
-            },
-          });
-          if (data.code == "00000" && data1.code == "00000") {
-            console.log(data);
-            file.status = 'done';
-          } else {
-            file.status = 'failed';
-            file.message = '上传失败';
-          }
+        const { data } = await newUploadPic(params);
+        if (data.code == "00000") {
+          console.log(data);
+          file.status = 'done';
         } else {
-          if (data.code == "00000") {
-            console.log(data);
-            file.status = 'done';
-          } else {
-            file.status = 'failed';
-            file.message = '上传失败';
-          }
+          file.status = 'failed';
+          file.message = '上传失败';
         }
       } catch {
         file.status = 'failed';
@@ -393,43 +378,21 @@ export default {
     const upCertBackPic = async (file) => {
       file.status = 'uploading';
       file.message = '上传中...';
-      // 此时可以自行将文件上传至服务器
-      // const fileObject = new File([file.content], file.file.name, { type: file.file.type });
-      const formData = new FormData();
-      formData.append('file', file.file, file.file.name);
-      formData.append('adminId', user.id);
-      formData.append('fileType', "F41");
-      if (addParams.type == '1') {
-        formData.append('fileType', "F03");
+      params.base64Str = certBackPic.value[0].content;
+      if (addParams.type === '0') {
+        params.fileType = "F41";
+      } else {
+        params.fileType = "F03";
       }
-      console.log(formData.get("file"));
+      console.log("params", params);
       try {
-        const { data } = await uploadPic(formData, {
-          headers: {
-            'Content-Type': 'multipart/form-data',
-          },
-        });
-        if (addParams.type == '1') {
-          const { data1 } = await uploadPic(formData, {
-            headers: {
-              'Content-Type': 'multipart/form-data',
-            },
-          });
-          if (data.code == "00000" && data1.code == "00000") {
-            console.log(data1);
-            file.status = 'done';
-          } else {
-            file.status = 'failed';
-            file.message = '上传失败';
-          }
+        const { data } = await newUploadPic(params);
+        if (data.code == "00000") {
+          console.log(data);
+          file.status = 'done';
         } else {
-          if (data.code == "00000") {
-            console.log(data);
-            file.status = 'done';
-          } else {
-            file.status = 'failed';
-            file.message = '上传失败';
-          }
+          file.status = 'failed';
+          file.message = '上传失败';
         }
       } catch {
         file.status = 'failed';
@@ -440,15 +403,10 @@ export default {
     const upCardFrontPic = async (file) => {
       file.status = 'uploading';
       file.message = '上传中...';
-      // 此时可以自行将文件上传至服务器
-      const formData = new FormData();
-      formData.append('file', file.file, file.file.name);
-      formData.append('adminId', user.id);
-      formData.append('fileType', "F13");
-      console.log(formData.get("file"));
+      params.base64Str = cardFrontPic.value[0].content;
+      params.fileType = "F13";
       try {
-        const { data } = await uploadPic(formData, 'multipart/form-data'
-        );
+        const { data } = await newUploadPic(params);
         if (data.code == "00000") {
           console.log(data);
           file.status = 'done';
@@ -465,18 +423,10 @@ export default {
     const upLicensePic = async (file) => {
       file.status = 'uploading';
       file.message = '上传中...';
-      // 此时可以自行将文件上传至服务器
-      const formData = new FormData();
-      formData.append('file', file.file, file.file.name);
-      formData.append('adminId', user.id);
-      formData.append('fileType', "F07");
-      console.log(formData.get("file"));
+      params.base64Str = licensePic.value[0].content;
+      params.fileType = "F07";
       try {
-        const { data } = await uploadPic(formData, {
-          headers: {
-            'Content-Type': 'multipart/form-data',
-          },
-        });
+        const { data } = await newUploadPic(params);
         if (data.code == "00000") {
           console.log(data);
           file.status = 'done';
@@ -493,21 +443,10 @@ export default {
     const upRegAcctPic = async (file) => {
       file.status = 'uploading';
       file.message = '上传中...';
-      // 此时可以自行将文件上传至服务器
-      // const fileObject = new File([file.content], file.file.name, { type: file.file.type });
-      // const formData = new FormData();
-      // formData.append('file', fileObject);
-      const formData = new FormData();
-      formData.append('file', file.file, file.file.name);
-      formData.append('adminId', user.id);
-      formData.append('fileType', "F08");
-      console.log(formData.get("file"));
+      params.base64Str = regAcctPic.value[0].content;
+      params.fileType = "F08";
       try {
-        const { data } = await uploadPic(formData, {
-          headers: {
-            'Content-Type': 'multipart/form-data',
-          },
-        });
+        const { data } = await newUploadPic(params);
         if (data.code == "00000") {
           console.log(data);
           file.status = 'done';
@@ -595,10 +534,10 @@ export default {
     });
     // 提交审核
     const submitCheck = async () => {
-      if (certBackPic.value == null) {
+      if (certFrontPic.value == null) {
         Toast("请上传身份证正面照片");
         return;
-      } else if (certFrontPic.value == null) {
+      } else if (certBackPic.value == null) {
         Toast("请上传身份证背面照片");
         return;
       }

+ 55 - 13
src/views/merchantManage/index.vue

@@ -4,7 +4,7 @@
     <s-header :name="$t('merchantManage.merchantManagement')" :noback="false"></s-header>
     <div class="merchantBox flex-col">
       <van-list v-model:loading="loading" v-model:error="error" :error-text="$t('public.requestFailed')"
-                :finished="finished" :finished-text="$t('public.noMore')" offset="300" :immediate-check="false" @load="onLoad">
+        :finished="finished" :finished-text="$t('public.noMore')" offset="300" :immediate-check="false" @load="onLoad">
         <div class="searchRow flex-row justify-between">
           <div class="flex-col">
             <div class="flex-row justify-between bd3">
@@ -23,20 +23,28 @@
           </div>
         </div>
         <div class="main4 flex-col">
-          <div class="bd1 flex-col" v-for="(item, index) in adminList" :key="index" @click="merchantSet(item)">
+          <div class="bd1 flex-col" v-for="(item, index) in adminList" :key="index">
             <div class="outer2 flex-col">
               <div class="box2 flex-row justify-between">
                 <span class="word3" v-html="item.username + '&nbsp;' + item.name"></span>
-                <div class="group6 flex-col"></div>
+                <!-- <div class="group6 flex-col"></div> -->
               </div>
-              <span class="word4" v-html="`${$t('merchantManage.telephone')}:` + item.phone"></span>
-              <span class="word5" v-html="`${$t('merchantManage.mailbox')}:` + item.email"></span>
-              <span class="word6" v-html="`${$t('merchantManage.loginTime')}:` + item.loginDate"></span>
-              <span class="info6" v-html="`${$t('merchantManage.loginIPAddress')}:` + item.loginIp"></span>
-              <span class="txt2" v-html="`${$t('merchantManage.managementSystemId')}:` + item.managerId"></span>
+              <span class="word4"
+                v-html="`${$t('merchantManage.telephone')}:` + (item.phone == null ? '' : item.phone)"></span>
+              <span class="word5"
+                v-html="`${$t('merchantManage.mailbox')}:` + (item.email == null ? '' : item.email)"></span>
+              <span class="word6"
+                v-html="`${$t('merchantManage.loginTime')}:` + (item.loginDate == null ? '' : item.loginDate)"></span>
+              <span class="info6"
+                v-html="`${$t('merchantManage.loginIPAddress')}:` + (item.loginIp == null ? '' : item.loginIp)"></span>
+              <span class="txt2"
+                v-html="`${$t('merchantManage.managementSystemId')}:` + (item.managerId == null ? '' : item.managerId)"></span>
               <div class="box3 flex-col">
-                <span class="txt3"
-                      v-html="`${$t('merchantManage.creationTime')}:` + Format_time(item.createDate)"></span>
+                <span class="txt3" v-html="`${$t('merchantManage.creationTime')}:` + Format_time(item.createDate)"></span>
+              </div>
+              <div class="button-container">
+                <van-button v-if="user.type < 2" class="btn1" round type="success" @click="autoLogin(item.id)">切换登陆</van-button>
+                <van-button class="btn1" round type="primary" @click="merchantSet(item)">详细信息</van-button>
               </div>
             </div>
           </div>
@@ -49,15 +57,18 @@
 <script>
 import { onMounted, reactive, ref } from "vue";
 import sHeader from "../../components/SimpleHeader";
-import { getAdminList } from '../../service/merchantManage';
-import { getLoginUser, Format_time, styleUrl } from "../../common/js/utils";
-import { Toast } from 'vant';
+import { getAdminList, autoLoginMerchant } from '../../service/merchantManage';
+import { getLoginUser, Format_time, styleUrl, setLocal } from "../../common/js/utils";
+import { Toast, Dialog } from 'vant';
 import merchantSearch from './merchantSearch.vue';
 import { useRouter } from "vue-router";
+import { useI18n } from "vue-i18n";
+
 
 export default {
   components: { sHeader, merchantSearch },
   setup() {
+    const { t } = useI18n();
     const user = getLoginUser();
     const router = useRouter();
     const searchRef = ref(null);
@@ -104,6 +115,35 @@ export default {
     };
     // 跳转设备编辑
     const merchantSet = (e) => { router.push({ path: 'merchantSet', query: { merchantId: e.id } }) }
+    // 切换登陆
+    const autoLogin = (id) => {
+      Dialog.confirm({
+        title: t('merchantManage.tips'),
+        message: t('merchantManage.autoLogin'),
+      }).then(() => {
+        autoLoginMerchant({ id }).then(res =>{
+          if (res.data.code === "00000") {
+            // 获取缓存的语言
+            const curLang = localStorage.getItem("curLang");
+            // 清空缓存
+            localStorage.clear();
+            localStorage.setItem("curLang", curLang);
+            setLocal("loginUser", JSON.stringify(res.data.data));
+            // console.log('loginUser JSON:', JSON.stringify(data.data));
+            Toast.success(t('login.loginSucess'));
+            // 需要刷新页面,否则 axios.js 文件里的 token 不会被重置
+            window.location.href = '/shenze/';
+            setTimeout(() => {
+              router.push("/home");
+            }, 200);
+          } else {
+            Toast.fail(res.data.message);
+          }
+        });
+      }).catch((error) => {
+        console.error(error);
+      })
+    }
     return {
       adminList,
       adminTotal,
@@ -115,7 +155,9 @@ export default {
       searchRef,
       search,
       merchantSet,
+      autoLogin,
       Format_time,
+      user,
     };
   },
 };

+ 63 - 26
src/views/merchantManage/set.vue

@@ -17,15 +17,21 @@
               src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng8947935ab81635fdedd8124b11e305eef66286421b69c84fef22233014a3fa9a" />
           </div>
           <div v-if="tabType === '0'">
-            <div class="wrap2 l-flex-RC">
+            <!-- <div class="wrap2 l-flex-RC">
               <span class="info2">*</span>
               <span class="info3">{{ $t('merchantManage.region') }}:
-                <!-- 广东省&gt;广州市&gt;天河区 -->
               </span>
-            </div>
-            <span class="info4">{{ $t('merchantManage.accountNumber') }}:{{ adminObj.username }}</span>
-            <span class="info5">{{ $t('merchantManage.subscriptionAdministrator') }}:</span>
+            </div> -->
+
+            <!-- <span class="info5">{{ $t('merchantManage.subscriptionAdministrator') }}:</span> -->
             <van-form @submit="onSubmit">
+              <div class="van-cell van-field">
+                <div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.accountNumber') }}</span>
+                </div>
+                <div class="van-cell__value van-field__value o-pt-8" style="text-align: left;">
+                  <span> {{ adminObj.username }}</span>
+                </div>
+              </div>
               <van-field v-model="adminObj.name" name="password" :label="$t('merchantManage.fullNameLabel')"
                 :placeholder="$t('merchantManage.fullNamePlaceholder')"
                 :rules="[{ required: true, message: $t('merchantManage.fullNamePlaceholder') }]" />
@@ -53,7 +59,7 @@
               </div>
               <div v-if="adminType === 0 || adminType === 1">
                 <div class="van-cell van-field">
-                  <div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.discountCode') }}:</span>
+                  <div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.discountCode') }}</span>
                   </div>
                   <div class="van-cell__value van-field__value radioBox">
                     <van-radio-group v-model="adminObj.promoCodeOpen" direction="horizontal">
@@ -63,7 +69,7 @@
                   </div>
                 </div>
                 <div class="van-cell van-field">
-                  <div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.paymentPlatform') }}:</span>
+                  <div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.paymentPlatform') }}</span>
                   </div>
                   <div class="van-cell__value van-field__value radioBox">
                     <van-radio-group v-model="adminObj.payPlatform" direction="horizontal">
@@ -82,7 +88,8 @@
           </div>
           <div v-if="tabType === '1'" class="tab2">
             <div class="kBordBott o-w o-pb-10">
-              <span class="info3">{{ $t('merchantManage.merchantType') }}:个人</span>
+              <span class="info3">{{ $t('merchantManage.merchantType') }}:{{ adminMchObj.altMerchantType == 10 ? "个人" :
+                (adminMchObj.altMerchantType == 12 ? "企业" : "") }}</span>
               <span class="info4">{{ $t('merchantManage.contactName') }}:{{ adminMchObj.busiContactName }}</span>
               <span class="word4">{{ $t('merchantManage.cellPhone') }}:{{ adminMchObj.busiContactMobileNo }}</span>
             </div>
@@ -95,22 +102,31 @@
               <span class="word6">{{ $t('merchantManage.legalPerson/IndividualIDNumber') }}:{{ adminMchObj.idCardNo
               }}</span>
               <span class="txt3">{{ $t('merchantManage.validityOfIDCard') }}:{{ adminMchObj.idCardExpiry }}</span>
-              <span class="txt4">{{ $t('merchantManage.businessLicenseCode') }}:{{ adminMchObj.licenseNo }}</span>
-              <span class="word7">{{ $t('merchantManage.validityOfBusinessLicense') }}:{{ adminMchObj.licenseExpiry
-              }}</span>
+              <span v-if="adminMchObj.altMerchantType == 12" class="txt4">{{ $t('merchantManage.businessLicenseCode')
+              }}:{{ adminMchObj.licenseNo }}</span>
+              <span v-if="adminMchObj.altMerchantType == 12" class="word7">{{
+                $t('merchantManage.validityOfBusinessLicense') }}:{{ adminMchObj.licenseExpiry
+  }}</span>
               <span class="txt5">{{ $t('merchantManage.natureOfBusiness') }}:{{ adminMchObj.manageScope }}</span> <span
                 class="word8">{{ $t('merchantManage.businessAddress') }}:{{ adminMchObj.manageAddr }}</span>
             </div>
 
             <div class="block5 flex-row justify-between">
-              <span class="txt6">{{ $t('merchantManage.accountType') }}:</span> <span class="word9">{{
-                adminMchObj.bankAccountType === 1 ? $t('merchantManage.debitCard') :
-                ''
-              }}{{ adminMchObj.bankAccountType === 4 ? $t('merchantManage.corporateAccount') : '' }}</span>
+              <span class="txt6">{{ $t('merchantManage.accountType') }}
+                :{{ adminMchObj.bankAccountType === 1 ? $t('merchantManage.debitCard') : (adminMchObj.bankAccountType === 4
+                  ? $t('merchantManage.corporateAccount') : "") }}</span>
+              <!-- <span class="word9"></span> -->
             </div>
             <span class="word10">{{ $t('merchantManage.bankAccountName') }}:{{ adminMchObj.bankAccountName }}</span>
             <span class="word11">{{ $t('merchantManage.bankAccount') }}:{{ adminMchObj.bankAccountNo }}</span>
-            <span class="word12">{{ $t('merchantManage.bankNo') }}:{{ adminMchObj.bankChannelNo }}</span>
+            <span v-if="adminMchObj.bankAccountType == 4" class="word12">{{ $t('merchantManage.bankNo') }}:{{
+              adminMchObj.bankChannelNo }}</span>
+            <div v-if="adminType < 2">
+              <span class="word12">{{ $t('merchantManage.joinpayMch') }}:{{ adminMchObj.signStatus == '签约成功' ?
+                adminMchObj.signStatus : '未签约' }}</span>
+              <span class="word12">{{ $t('merchantManage.huifuMch') }}:{{ huifuMchObj != null && huifuMchObj.conStat ==
+                '5' && huifuMchObj.status == '2' ? '签约成功' : '未签约' }}</span>
+            </div>
           </div>
         </div>
       </div>
@@ -119,11 +135,11 @@
 </template>
 <script>
 import { onMounted, ref } from "vue";
-import sHeader from "../../components/SimpleHeader";
-import { getAdmin, getAdminMch, updateAdmin } from "../../service/merchantManage";
+import sHeader from "@/components/SimpleHeader";
+import { getAdmin, getAdminMch, updateAdmin, getHuifuMch } from "@/service/merchantManage";
 import { Toast } from "vant";
 import { useRoute } from "vue-router";
-import { getLoginUser, styleUrl } from "../../common/js/utils";
+import { getLoginUser, styleUrl } from "@/common/js/utils";
 import { useI18n } from "vue-i18n";
 
 export default {
@@ -138,22 +154,44 @@ export default {
     const merchantId = ref('');
     const adminObj = ref({});
     const adminMchObj = ref({});
+    const huifuMchObj = ref({});
+    const ifForeign = ref('0');
     onMounted(async () => {
       // 加载样式
       styleUrl('merchantManage');
       merchantId.value = route.query.merchantId;
       getAdminFun();
+      console.log(ifForeign.value);
       getAdminMchFun();
+      getHuifuMchFun();
+
     });
     const getAdminFun = async () => {
       const { data } = await getAdmin({ id: merchantId.value });
-      if (data.code === "00000") { adminObj.value = data.data; adminObj.value.password = ''; adminObj.value.checkPassword = ''; } else { Toast.fail(data.message); }
+      if (data.code === "00000") {
+        adminObj.value = data.data;
+        adminObj.value.password = '';
+        adminObj.value.checkPassword = '';
+        if (data.data.payPlatform == null) {
+          adminObj.value.payPlatform = '0';
+        }
+        if (data.data.promoCodeOpen == null) {
+          adminObj.value.promoCodeOpen = '1';
+        }
+        ifForeign.value = data.data.ifForeign;
+      } else { Toast.fail(data.message); }
       console.log('getAdminFun', data);
     };
     const getAdminMchFun = async () => {
       const { data } = await getAdminMch({ id: merchantId.value });
       if (data.code === "00000") { adminMchObj.value = data.data; } else { Toast.fail(data.message); }
       console.log('getAdminMchFun', data);
+      console.log('adminMchObj', adminMchObj.value.signStatus);
+    }
+    const getHuifuMchFun = async () => {
+      const { data } = await getHuifuMch({ adminId: merchantId.value });
+      if (data.code === "00000") { huifuMchObj.value = data.data; } else { Toast.fail(data.message); }
+      console.log('getHuifuMchFun', data);
     }
     const onSubmit = async () => {
       const params = {
@@ -180,11 +218,11 @@ export default {
         }
       }
       const { data } = await updateAdmin(params);
-      if (data.code === "00000") { 
-        Toast.success(t('merchantManage.modificationSucceeded')); 
+      if (data.code === "00000") {
+        Toast.success(t('merchantManage.modificationSucceeded'));
         setTimeout(() => {
           // router.go(0);
-          getAdminFun(); 
+          getAdminFun();
         }, 1500);
       } else { Toast.fail(data.message); }
       console.log('onSubmit', data);
@@ -194,11 +232,10 @@ export default {
       adminType,
       adminObj,
       adminMchObj,
+      huifuMchObj,
       onSubmit
     };
   },
 };
 </script>
-<style lang="less" scoped>
-@import "../../common/style/common.less";
-</style>
+<style lang="less" scoped>@import "../../common/style/common.less";</style>

+ 2 - 2
src/views/register.vue

@@ -6,7 +6,7 @@
       <van-form @submit="registerSubmit">
         <van-field v-model="username" name="username" :label="$t('register.usernameLabel')"
           :placeholder="$t('register.usernamePlaceholder')"
-          :rules="[{ required: true, message: $t('register.usernameRequired') }]" />
+          :rules="[{ pattern: /^[a-zA-Z][a-zA-Z0-9]*$/, message: $t('register.usernameRequired') }]" />
         <br>
         <van-field v-model="name" name="name" :label="$t('register.nameLabel')"
           :placeholder="$t('register.namePlaceholder')"
@@ -44,7 +44,7 @@
           <!-- 国内手机 -->
           <van-field v-if="logonMode === '10'" v-model="phone" name="phone" type="tel" :label="$t('register.phoneLabel')"
             :placeholder="$t('register.phonePlaceholder')"
-            :rules="[{ required: ifForeign === '0' && logonMode === '10', message: $t('register.phoneRequired') }]" />
+            :rules="[{ required: ifForeign === '0' && logonMode === '10', pattern: /^1[3456789]\d{9}$/, message: $t('register.phoneRequired') }]" />
           <br v-if="ifForeign === '0' && logonMode === '10'">
           <!-- 短信验证码 -->
           <van-field v-if="logonMode === '10'" v-model="code" name="code" :label="$t('register.codeLabel')"

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 46
src/views/scrap/About.vue


+ 0 - 96
src/views/scrap/Address.vue

@@ -1,96 +0,0 @@
-<template>
-  <div class="address-box">
-    <s-header :name="'地址管理'" :back="from == 'create-order' ? '' : '/user'"></s-header>
-    <div class="address-item">
-      <van-address-list
-        v-if="from != 'mine'"
-        v-model="chosenAddressId"
-        :list="list"
-        default-tag-text="默认"
-        @add="onAdd"
-        @edit="onEdit"
-        @select="select"
-      />
-      <van-address-list
-        v-else
-        v-model="chosenAddressId"
-        :list="list"
-        default-tag-text="默认"
-        @add="onAdd"
-        @edit="onEdit"
-      />
-    </div>
-  </div>
-</template>
-
-<script>
-import { reactive, toRefs, onMounted } from 'vue'
-import sHeader from '@/components/SimpleHeader'
-import { getAddressList } from '@/service/scrap/address'
-import { useRoute, useRouter } from 'vue-router'
-export default {
-  components: {
-    sHeader
-  },
-  setup() {
-    const route = useRoute()
-    const router = useRouter()
-    const state = reactive({
-      chosenAddressId: '1',
-      list: [],
-      from: route.query.from
-    })
-
-    onMounted(async () => {
-      const { data } = await getAddressList()
-      if (!data) {
-        state.list = []
-        return
-      }
-      state.list = data.map(item => {
-        return {
-          id: item.addressId,
-          name: item.userName,
-          tel: item.userPhone,
-          address: `${item.provinceName} ${item.cityName} ${item.regionName} ${item.detailAddress}`,
-          isDefault: !!item.defaultFlag
-        }
-      })
-    })
-
-    const onAdd = () => {
-      router.push({ path: '/address-edit', query: { type: 'add', from: state.from }})
-    }
-
-    const onEdit = (item) => {
-      router.push({ path: 'address-edit', query: { type: 'edit', addressId: item.id, from: state.from }})
-    }
-
-    const select = (item) => {
-      router.push({ path: 'create-order', query: { addressId: item.id, from: state.from }})
-    }
-
-    return {
-      ...toRefs(state),
-      onAdd,
-      onEdit,
-      select
-    }
-  }
-}
-</script>
-
-<style lang="less">
-  @import '../common/style/mixin';
-  .address-box {
-    .van-radio__icon {
-      display: none;
-    }
-    .address-item {
-      .van-button {
-        background: @primary;
-        border-color: @primary;
-      }
-    }
-  }
-</style>

+ 0 - 155
src/views/scrap/AddressEdit.vue

@@ -1,155 +0,0 @@
-<template>
-  <div class="address-edit-box">
-    <s-header :name="`${type == 'add' ? '新增地址' : '编辑地址'}`"></s-header>
-    <van-address-edit
-      class="edit"
-      :area-list="areaList"
-      :address-info="addressInfo"
-      :show-delete="type == 'edit'"
-      show-set-default
-      show-search-result
-      :search-result="searchResult"
-      :area-columns-placeholder="['请选择', '请选择', '请选择']"
-      @save="onSave"
-      @delete="onDelete"
-    />
-  </div>
-</template>
-
-<script>
-import { reactive, onMounted, toRefs } from 'vue'
-import { Toast } from 'vant'
-import sHeader from '@/components/SimpleHeader'
-import { addAddress, EditAddress, DeleteAddress, getAddressDetail } from '@/service/address'
-import { tdist } from '@/common/js/utils'
-import { useRoute, useRouter } from 'vue-router'
-export default {
-  components: {
-    sHeader
-  },
-  setup() {
-    const route = useRoute()
-    const router = useRouter()
-    const state = reactive({
-      areaList: {
-        province_list: {},
-        city_list: {},
-        county_list: {}
-      },
-      searchResult: [],
-      type: 'add',
-      addressId: '',
-      addressInfo: {},
-      from: route.query.from
-    })
-
-    onMounted(async () => {
-      // 省市区列表构造
-      let _province_list = {}
-      let _city_list = {}
-      let _county_list = {}
-      tdist.getLev1().forEach(p => {
-        _province_list[p.id] = p.text
-        tdist.getLev2(p.id).forEach(c => {
-          _city_list[c.id] = c.text
-          tdist.getLev3(c.id).forEach(q => _county_list[q.id] = q.text)
-        })
-      })
-      state.areaList.province_list = _province_list
-      state.areaList.city_list = _city_list
-      state.areaList.county_list = _county_list
-
-      const { addressId, type, from } = route.query
-      state.addressId = addressId
-      state.type = type
-      state.from = from || ''
-      if (type == 'edit') {
-        const { data: addressDetail } = await getAddressDetail(addressId)
-        let _areaCode = ''
-        const province = tdist.getLev1()
-        Object.entries(state.areaList.county_list).forEach(([id, text]) => {
-          // 先找出当前对应的区
-          if (text == addressDetail.regionName) {
-            // 找到区对应的几个省份
-            const provinceIndex = province.findIndex(item => item.id.substr(0, 2) == id.substr(0, 2))
-            // 找到区对应的几个市区
-            // eslint-disable-next-line no-unused-vars
-            const cityItem = Object.entries(state.areaList.city_list).filter(([cityId, cityName]) => cityId.substr(0, 4) == id.substr(0, 4))[0]
-            // 对比找到的省份和接口返回的省份是否相等,因为有一些区会重名
-            if (province[provinceIndex].text == addressDetail.provinceName && cityItem[1] == addressDetail.cityName) {
-              _areaCode = id
-            }
-          }
-        })
-        state.addressInfo = {
-          id: addressDetail.addressId,
-          name: addressDetail.userName,
-          tel: addressDetail.userPhone,
-          province: addressDetail.provinceName,
-          city: addressDetail.cityName,
-          county: addressDetail.regionName,
-          addressDetail: addressDetail.detailAddress,
-          areaCode: _areaCode,
-          isDefault: !!addressDetail.defaultFlag
-        }
-      }
-    })
-
-    const onSave = async (content) => {
-      const params = {
-        userName: content.name,
-        userPhone: content.tel,
-        provinceName: content.province,
-        cityName: content.city,
-        regionName: content.county,
-        detailAddress: content.addressDetail,
-        defaultFlag: content.isDefault ? 1 : 0,
-      }
-      if (state.type == 'edit') {
-        params['addressId'] = state.addressId
-      }
-      await state.type == 'add' ? addAddress(params) : EditAddress(params)
-      Toast('保存成功')
-      setTimeout(() => {
-        router.back()
-      }, 1000)
-    }
-
-    const onDelete = async () => {
-      await DeleteAddress(state.addressId)
-      Toast('删除成功')
-      setTimeout(() => {
-        router.back()
-      }, 1000)
-    }
-
-    return {
-      ...toRefs(state),
-      onSave,
-      onDelete
-    }
-  }
-}
-</script>
-
-<style lang="less">
-  @import '../common/style/mixin';
-  .edit {
-    .van-field__body {
-      textarea {
-        height: 26px!important;
-      }
-    }
-  }
-  .address-edit-box {
-    .van-address-edit {
-      .van-button--danger {
-        background: @primary;
-        border-color: @primary;
-      }
-      .van-switch--on {
-        background: @primary;
-      }
-    }
-  }
-</style>

+ 0 - 283
src/views/scrap/Cart.vue

@@ -1,283 +0,0 @@
-<template>
-  <div class="cart-box">
-    <s-header :name="'购物车'" :noback="true"></s-header>
-    <div class="cart-body">
-      <van-checkbox-group @change="groupChange" v-model="result" ref="checkboxGroup">
-        <van-swipe-cell :right-width="50" v-for="(item, index) in list" :key="index">
-          <div class="good-item">
-            <van-checkbox :name="item.cartItemId" />
-            <div class="good-img"><img :src="$filters.prefix(item.goodsCoverImg)" alt=""></div>
-            <div class="good-desc">
-              <div class="good-title">
-                <span>{{ item.goodsName }}</span>
-                <span>x{{ item.goodsCount }}</span>
-              </div>
-              <div class="good-btn">
-                <div class="price">¥{{ item.sellingPrice }}</div>
-                <van-stepper
-                  integer
-                  :min="1"
-                  :max="5"
-                  :model-value="item.goodsCount"
-                  :name="item.cartItemId"
-                  async-change
-                  @change="onChange"
-                />
-              </div>
-            </div>
-          </div>
-          <template #right>
-            <van-button
-              square
-              icon="delete"
-              type="danger"
-              class="delete-button"
-              @click="deleteGood(item.cartItemId)"
-            />
-          </template>
-        </van-swipe-cell>
-      </van-checkbox-group>
-    </div>
-    <van-submit-bar
-      v-if="list.length > 0"
-      class="submit-all van-hairline--top"
-      :price="total * 100"
-      button-text="结算"
-      @submit="onSubmit"
-    >
-      <van-checkbox @click="allCheck" v-model:checked="checkAll">全选</van-checkbox>
-    </van-submit-bar>
-    <div class="empty" v-if="!list.length">
-      <img class="empty-cart" src="https://s.yezgea02.com/1604028375097/empty-car.png" alt="空购物车">
-      <div class="title">购物车空空如也</div>
-      <van-button round color="#1baeae" type="primary" @click="goTo" block>前往选购</van-button>
-    </div>
-    <nav-bar></nav-bar>
-  </div>
-</template>
-
-<script>
-import { reactive, onMounted, computed, toRefs } from 'vue'
-import { useRouter } from 'vue-router'
-import { useStore } from 'vuex'
-import { Toast } from 'vant'
-import navBar from '@/components/NavBar'
-import sHeader from '@/components/SimpleHeader'
-import { getCart, deleteCartItem, modifyCart } from '@/service/scrap/cart'
-
-export default {
-  components: {
-    navBar,
-    sHeader
-  },
-  setup() {
-    const router = useRouter()
-    const store = useStore()
-    const state = reactive({
-      checked: false,
-      list: [],
-      all: false,
-      result: [],
-      checkAll: true
-    })
-
-    onMounted(() => {
-      init()
-    })
-
-    const init = async () => {
-      Toast.loading({ message: '加载中...', forbidClick: true });
-      const { data } = await getCart({ pageNumber: 1 })
-      state.list = data
-      state.result = data.map(item => item.cartItemId)
-      Toast.clear()
-    }
-
-    const total = computed(() => {
-      let sum = 0
-      let _list = state.list.filter(item => state.result.includes(item.cartItemId))
-      _list.forEach(item => {
-        sum += item.goodsCount * item.sellingPrice
-      })
-      return sum
-    })
-
-    const goBack = () => {
-      router.go(-1)
-    }
-
-    const goTo = () => {
-      router.push({ path: '/home' })
-    }
-
-    const onChange = async (value, detail) => {
-      if (value > 5) {
-        Toast.fail('超出单个商品的最大购买数量')
-        return
-      }
-      if (value < 1) {
-        Toast.fail('商品不得小于0')
-        return
-      }
-      if (state.list.filter(item => item.cartItemId == detail.name)[0].goodsCount == value) return
-      Toast.loading({ message: '修改中...', forbidClick: true });
-      const params = {
-        cartItemId: detail.name,
-        goodsCount: value
-      }
-      await modifyCart(params)
-      state.list.forEach(item => {
-        if (item.cartItemId == detail.name) {
-          item.goodsCount = value
-        }
-      })
-      Toast.clear();
-    }
-
-    const onSubmit = async () => {
-      if (state.result.length == 0) {
-        Toast.fail('请选择商品进行结算')
-        return
-      }
-      const params = JSON.stringify(state.result)
-      router.push({ path: '/create-order', query: { cartItemIds: params } })
-    }
-
-    const deleteGood = async (id) => {
-      await deleteCartItem(id)
-      store.dispatch('updateCart')
-      init()
-    }
-
-    const groupChange = (result) => {
-      console.log(1)
-      if (result.length == state.list.length) {
-        console.log(2)
-        state.checkAll = true
-      } else {
-        console.log(3)
-        state.checkAll = false
-      }
-      state.result = result
-    }
-    
-    const allCheck = () => {
-      if (!state.checkAll) {
-        state.result = state.list.map(item => item.cartItemId)
-      } else {
-        state.result = []
-      }
-    }
-
-    
-
-    return {
-      ...toRefs(state),
-      total,
-      goBack,
-      goTo,
-      onChange,
-      onSubmit,
-      deleteGood,
-      groupChange,
-      allCheck
-    }
-  }
-}
-</script>
-
-<style lang="less">
-  @import '../common/style/mixin';
-  .cart-box {
-    .cart-header {
-      position: fixed;
-      top: 0;
-      left: 0;
-      z-index: 10000;
-      .fj();
-      .wh(100%, 44px);
-      line-height: 44px;
-      padding: 0 10px;
-      .boxSizing();
-      color: #252525;
-      background: #fff;
-      border-bottom: 1px solid #dcdcdc;
-      .cart-name {
-        font-size: 14px;
-      }
-    }
-    .cart-body {
-      margin: 16px 0 100px 0;
-      padding-left: 10px;
-      .good-item {
-        display: flex;
-        .good-img {
-          img {
-            .wh(100px, 100px)
-          }
-        }
-        .good-desc {
-          display: flex;
-          flex-direction: column;
-          justify-content: space-between;
-          flex: 1;
-          padding: 20px;
-          .good-title {
-            display: flex;
-            justify-content: space-between;
-          }
-          .good-btn {
-            display: flex;
-            justify-content: space-between;
-            .price {
-              font-size: 16px;
-              color: red;
-              line-height: 28px;
-            }
-            .van-icon-delete {
-              font-size: 20px;
-              margin-top: 4px;
-            }
-          }
-        }
-      }
-      .delete-button {
-        width: 50px;
-        height: 100%;
-      }
-    }
-    .empty {
-      width: 50%;
-      margin: 0 auto;
-      text-align: center;
-      margin-top: 200px;
-      .empty-cart {
-        width: 150px;
-        margin-bottom: 20px;
-      }
-      .van-icon-smile-o {
-        font-size: 50px;
-      }
-      .title {
-        font-size: 16px;
-        margin-bottom: 20px;
-      }
-    }
-    .submit-all {
-      margin-bottom: 50px;
-      .van-checkbox {
-        margin-left: 10px
-      }
-      .van-submit-bar__text {
-        margin-right: 10px
-      }
-      .van-submit-bar__button {
-        background: @primary;
-      }
-    }
-    .van-checkbox__icon--checked .van-icon {
-      background-color: @primary;
-      border-color: @primary;
-    }
-  }
-</style>

+ 0 - 227
src/views/scrap/Category.vue

@@ -1,227 +0,0 @@
-<template>
-  <div class="categray">
-    <div>
-      <header class="category-header wrap van-hairline--bottom">
-        <i class="nbicon nbfanhui" @click="goHome"></i>
-        <div class="header-search">
-          <i class="nbicon nbSearch"></i>
-          <router-link tag="span" class="search-title" to="./product-list?from=category">全场50元起步</router-link>
-        </div>
-        <i class="iconfont icon-More"></i>
-      </header>
-      <nav-bar></nav-bar>
-      <div class="search-wrap" ref="searchWrap">
-        <list-scroll :scroll-data="categoryData" class="nav-side-wrapper">
-          <ul class="nav-side">
-            <li
-              v-for="item in categoryData"
-              :key="item.categoryId"
-              v-text="item.categoryName"
-              :class="{'active' : currentIndex == item.categoryId}"
-              @click="selectMenu(item.categoryId)"
-            ></li>
-          </ul>
-        </list-scroll>
-        <div class="search-content">
-          <list-scroll :scroll-data="categoryData" >
-            <div class="swiper-container">
-              <div class="swiper-wrapper">
-                <template v-for="(category, index) in categoryData">
-                  <div class="swiper-slide" v-if="currentIndex == category.categoryId" :key="index">
-                    <!-- <img class="category-main-img" :src="category.mainImgUrl" v-if="category.mainImgUrl"/> -->
-                    <div class="category-list" v-for="(products, index) in category.secondLevelCategoryVOS" :key="index">
-                      <p class="catogory-title">{{products.categoryName}}</p>
-                      <div class="product-item" v-for="(product, index) in products.thirdLevelCategoryVOS" :key="index" @click="selectProduct(product)">
-                        <img src="//s.weituibao.com/1583591077131/%E5%88%86%E7%B1%BB.png" class="product-img"/>
-                        <p v-text="product.categoryName" class="product-title"></p>
-                      </div>
-                    </div>
-                  </div>
-                </template>
-              </div>
-            </div>
-          </list-scroll>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import { reactive, onMounted, ref, toRefs } from 'vue'
-import { useRouter } from 'vue-router'
-import navBar from '@/components/NavBar'
-import listScroll from '@/components/ListScroll'
-import { getCategory } from "@/service/good";
-import { Toast } from 'vant'
-export default {
-  components: {
-    navBar,
-    listScroll
-  },
-  setup() {
-    const router = useRouter()
-    // composition API 获取 refs 的形式
-    const searchWrap = ref(null)
-    const state = reactive({
-      categoryData: [],
-      currentIndex: 15
-    })
-
-    onMounted(async () => {
-      let $screenHeight = document.documentElement.clientHeight
-      console.log('searchWrap.value', searchWrap.value)
-      searchWrap.value.style.height = $screenHeight - 100 + 'px'
-      Toast.loading('加载中...')
-      const { data } = await getCategory()
-      Toast.clear()
-      state.categoryData = data
-    })
-
-    const goHome = () => {
-      router.push({ path: 'home' })
-    }
-
-    const selectMenu = (index) => {
-      state.currentIndex = index
-    }
-
-    const selectProduct = (item) => {
-      console.log('item', item.categoryId)
-      router.push({ path: '/product-list', query: { categoryId: item.categoryId } })
-    }
-    return {
-      ...toRefs(state),
-      goHome,
-      selectMenu,
-      selectProduct,
-      searchWrap
-    }
-  }
-}
-</script>
-<style lang="less" scoped>
-  @import '../common/style/mixin';
-  .categray {
-    .category-header {
-      background: #fff;
-      position: fixed;
-      left: 0;
-      top: 0;
-      .fj();
-      .wh(100%, 50px);
-      line-height: 50px;
-      padding: 0 15px;
-      box-sizing: border-box;
-      font-size: 15px;
-      color: #656771;
-      z-index: 10000;
-      &.active {
-        background: @primary;
-      }
-      .icon-left {
-        font-size: 25px;
-        font-weight: bold;
-      }
-      .header-search {
-        display: flex;
-        width: 80%;
-        height: 20px;
-        line-height: 20px;
-        margin: 10px 0;
-        padding: 5px 0;
-        color: #232326;
-        background: #F7F7F7;
-        border-radius: 20px;
-        .nbSearch {
-          padding: 0 10px 0 20px;
-          font-size: 17px;
-        }
-        .search-title {
-          font-size: 12px;
-          color: #666;
-          line-height: 21px;
-        }
-      }
-      .icon-More {
-        font-size: 20px;
-      }
-    }
-  }
-  .search-wrap {
-    .fj();
-    width: 100%;
-    margin-top: 50px;
-    background: #F8F8F8;
-    .nav-side-wrapper {
-      width: 28%;
-      height: 100%;
-      overflow: hidden;
-      .nav-side {
-        width: 100%;
-        .boxSizing();
-        background: #F8F8F8;
-        li {
-          width: 100%;
-          height: 56px;
-          text-align: center;
-          line-height: 56px;
-          font-size: 14px;
-          &.active {
-            color: @primary;
-            background: #fff;
-          }
-        }
-      }
-    }
-    .search-content {
-      width: 72%;
-      height: 100%;
-      padding: 0 10px;
-      background: #fff;
-      overflow-y: scroll;
-      touch-action: pan-y;
-      * {
-          touch-action: pan-y;
-        }
-      .boxSizing();
-      .swiper-container {
-        width: 100%;
-        .swiper-slide {
-          width: 100%;
-          .category-main-img {
-            width: 100%;
-          }
-          .category-list {
-            display: flex;
-            flex-wrap: wrap;
-            flex-shrink: 0;
-            width: 100%;
-            .catogory-title {
-              width: 100%;
-              font-size: 17px;
-              font-weight: 500;
-              padding: 20px 0;
-            }
-            .product-item {
-              width: 33.3333%;
-              margin-bottom: 10px;
-              text-align: center;
-              font-size: 15px;
-              .product-img {
-                .wh(30px, 30px);
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-  .fade-out-enter-active, .fade-out-leave-active {
-    // transition: opacity 0.5s;
-  }
-
-  .fade-out-enter, .fade-out-leave-to {
-    // opacity: 0;
-  }
-</style>

+ 0 - 248
src/views/scrap/CreateOrder.vue

@@ -1,248 +0,0 @@
-<template>
-  <div class="create-order">
-    <s-header :name="'生成订单'" @callback="deleteLocal"></s-header>
-    <div class="address-wrap">
-      <div class="name" @click="goTo">
-        <span>{{ address.userName }} </span>
-        <span>{{ address.userPhone }}</span>
-      </div>
-      <div class="address">
-        {{ address.provinceName }} {{ address.cityName }} {{ address.regionName }} {{ address.detailAddress }}
-      </div>
-      <van-icon class="arrow" name="arrow" />
-    </div>
-    <div class="good">
-      <div class="good-item" v-for="(item, index) in cartList" :key="index">
-        <div class="good-img"><img :src="$filters.prefix(item.goodsCoverImg)" alt=""></div>
-        <div class="good-desc">
-          <div class="good-title">
-            <span>{{ item.goodsName }}</span>
-            <span>x{{ item.goodsCount }}</span>
-          </div>
-          <div class="good-btn">
-            <div class="price">¥{{ item.sellingPrice }}</div>
-          </div>
-        </div>
-      </div>
-    </div>
-    <div class="pay-wrap">
-      <div class="price">
-        <span>商品金额</span>
-        <span>¥{{ total }}</span>
-      </div>
-      <van-button @click="handleCreateOrder" class="pay-btn" color="#1baeae" type="primary" block>生成订单</van-button>
-    </div>
-    <van-popup
-      closeable
-      :close-on-click-overlay="false"
-      v-model:show="showPay"
-      position="bottom"
-      :style="{ height: '30%' }"
-      @close="close"
-    >
-      <div :style="{ width: '90%', margin: '0 auto', padding: '50px 0' }">
-        <van-button :style="{ marginBottom: '10px' }" color="#1989fa" block @click="handlePayOrder(1)">支付宝支付</van-button>
-        <van-button color="#4fc08d" block @click="handlePayOrder(2)">微信支付</van-button>
-      </div>
-    </van-popup>
-  </div>
-</template>
-
-<script>
-import { reactive, onMounted, toRefs, computed } from 'vue'
-import sHeader from '@/components/SimpleHeader'
-import { getByCartItemIds } from '@/service/cart'
-import { getDefaultAddress, getAddressDetail } from '@/service/address'
-import { createOrder, payOrder } from '@/service/order'
-import { setLocal, getLocal } from '@/common/js/utils'
-import { Toast } from 'vant'
-import { useRoute, useRouter } from 'vue-router'
-export default {
-  components: {
-    sHeader
-  },
-  setup() {
-    const router = useRouter()
-    const route = useRoute()
-    const state = reactive({
-      cartList: [],
-      address: {},
-      showPay: false,
-      orderNo: '',
-      cartItemIds: []
-    })
-
-    onMounted(() => {
-      init()
-    })
-    
-    const init = async () => {
-      Toast.loading({ message: '加载中...', forbidClick: true });
-      const { addressId, cartItemIds } = route.query
-      const _cartItemIds = cartItemIds ? JSON.parse(cartItemIds) : JSON.parse(getLocal('cartItemIds'))
-      console.log('cartItemIds', cartItemIds)
-      setLocal('cartItemIds', JSON.stringify(_cartItemIds))
-      const { data: list } = await getByCartItemIds({ cartItemIds: _cartItemIds.join(',') })
-      const { data: address } = addressId ? await getAddressDetail(addressId) : await getDefaultAddress()
-      if (!address) {
-        router.push({ path: '/address' })
-        return
-      }
-      state.cartList = list
-      state.address = address
-      Toast.clear()
-    }
-
-    const goTo = () => {
-      router.push({ path: '/address', query: { cartItemIds: JSON.stringify(state.cartItemIds), from: 'create-order' }})
-    }
-
-    const deleteLocal = () => {
-      setLocal('cartItemIds', '')
-    }
-
-    const handleCreateOrder = async () => {
-      const params = {
-        addressId: state.address.addressId,
-        cartItemIds: state.cartList.map(item => item.cartItemId)
-      }
-      const { data } = await createOrder(params)
-      setLocal('cartItemIds', '')
-      state.orderNo = data
-      state.showPay = true
-    }
-
-    const close = () => {
-      router.push({ path: '/order' })
-    }
-
-    const handlePayOrder = async (type) => {
-      await payOrder({ orderNo: state.orderNo, payType: type })
-      Toast.success('支付成功')
-      setTimeout(() => {
-        router.push({ path: '/order' })
-      }, 2000)
-    }
-
-    const total = computed(() => {
-      let sum = 0
-      state.cartList.forEach(item => {
-        sum += item.goodsCount * item.sellingPrice
-      })
-      return sum
-    })
-
-    return {
-      ...toRefs(state),
-      goTo,
-      deleteLocal,
-      handleCreateOrder,
-      close,
-      handlePayOrder,
-      total
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-  @import '../common/style/mixin';
-  .create-order {
-    background: #f9f9f9;
-    .address-wrap {
-      margin-bottom: 20px;
-      background: #fff;
-      position: relative;
-      font-size: 14px;
-      padding: 15px;
-      color: #222333;
-      .name, .address {
-        margin: 10px 0;
-      }
-      .arrow {
-        position: absolute;
-        right: 10px;
-        top: 50%;
-        transform: translateY(-50%);
-        font-size: 20px;
-      }
-      &::before {
-        position: absolute;
-        right: 0;
-        bottom: 0;
-        left: 0;
-        height: 2px;
-        background: -webkit-repeating-linear-gradient(135deg, #ff6c6c 0, #ff6c6c 20%, transparent 0, transparent 25%, #1989fa 0, #1989fa 45%, transparent 0, transparent 50%);
-        background: repeating-linear-gradient(-45deg, #ff6c6c 0, #ff6c6c 20%, transparent 0, transparent 25%, #1989fa 0, #1989fa 45%, transparent 0, transparent 50%);
-        background-size: 80px;
-        content: '';
-      }
-    }
-    .good {
-      margin-bottom: 120px;
-    }
-    .good-item {
-      padding: 10px;
-      background: #fff;
-      display: flex;
-      .good-img {
-        img {
-          .wh(100px, 100px)
-        }
-      }
-      .good-desc {
-        display: flex;
-        flex-direction: column;
-        justify-content: space-between;
-        flex: 1;
-        padding: 20px;
-        .good-title {
-          display: flex;
-          justify-content: space-between;
-        }
-        .good-btn {
-          display: flex;
-          justify-content: space-between;
-          .price {
-            font-size: 16px;
-            color: red;
-            line-height: 28px;
-          }
-          .van-icon-delete {
-            font-size: 20px;
-            margin-top: 4px;
-          }
-        }
-      }
-    }
-    .pay-wrap {
-      position: fixed;
-      bottom: 0;
-      left: 0;
-      width: 100%;
-      background: #fff;
-      padding: 10px 0;
-      padding-bottom: 50px;
-      border-top: 1px solid #e9e9e9;
-      >div {
-        display: flex;
-        justify-content: space-between;
-        padding: 0 5%;
-        margin: 10px 0;
-        font-size: 14px;
-        span:nth-child(2) {
-          color: red;
-          font-size: 18px;
-        }
-      }
-      .pay-btn {
-        position: fixed;
-        bottom: 7px;
-        right: 0;
-        left: 0;
-        width: 90%;
-        margin: 0 auto;
-      }
-    }
-  }
-</style>

+ 0 - 180
src/views/scrap/Order.vue

@@ -1,180 +0,0 @@
-<template>
-  <div class="order-box">
-    <s-header :name="'我的订单'" :back="'/user'"></s-header>
-    <van-tabs @click="onChangeTab" :color="'#1baeae'" :title-active-color="'#1baeae'" class="order-tab" v-model="status">
-      <van-tab title="全部" name=''></van-tab>
-      <van-tab title="待付款" name="0"></van-tab>
-      <van-tab title="待确认" name="1"></van-tab>
-      <van-tab title="待发货" name="2"></van-tab>
-      <van-tab title="已发货" name="3"></van-tab>
-      <van-tab title="交易完成" name="4"></van-tab>
-    </van-tabs>
-    <div class="content">
-      <van-pull-refresh v-model="refreshing" @refresh="onRefresh" class="order-list-refresh">
-        <van-list
-          v-model:loading="loading"
-          :finished="finished"
-          finished-text="没有更多了"
-          @load="onLoad"
-          @offset="10"
-        >
-          <div v-for="(item, index) in list" :key="index" class="order-item-box" @click="goTo(item.orderNo)">
-            <div class="order-item-header">
-              <span>订单时间:{{ item.createTime }}</span>
-              <span>{{ item.orderStatusString }}</span>
-            </div>
-            <van-card
-              v-for="one in item.newBeeMallOrderItemVOS"
-              :key="one.orderId"
-              :num="one.goodsCount"
-              :price="one.sellingPrice"
-              desc="全场包邮"
-              :title="one.goodsName"
-              :thumb="$filters.prefix(one.goodsCoverImg)"
-            />
-          </div>
-        </van-list>
-      </van-pull-refresh>
-    </div>
-  </div>
-</template>
-
-<script>
-import { reactive, toRefs } from 'vue';
-import sHeader from '@/components/SimpleHeader'
-import { getOrderList } from '@/service/order'
-import { useRouter } from 'vue-router';
-
-export default {
-  name: 'Order',
-  components: {
-    sHeader
-  },
-  setup() {
-    const router = useRouter()
-    const state = reactive({
-      status: '',
-      loading: false,
-      finished: false,
-      refreshing: false,
-      list: [],
-      page: 1,
-      totalPage: 0
-    })
-
-    const loadData = async () => {
-      const { data, data: { list } } = await getOrderList({ pageNumber: state.page, status: state.status })
-      state.list = state.list.concat(list)
-      state.totalPage = data.totalPage
-      state.loading = false;
-      if (state.page >= data.totalPage) state.finished = true
-    }
-
-    const onChangeTab = (name) => {
-      // 这里 Tab 最好采用点击事件,@click,如果用 @change 事件,会默认进来执行一次。
-      state.status = name
-      onRefresh()
-    }
-
-    const goTo = (id) => {
-      router.push({ path: '/order-detail', query: { id } })
-    }
-
-    const goBack = () => {
-      router.go(-1)
-    }
-
-    const onLoad = () => {
-      if (!state.refreshing && state.page < state.totalPage) {
-        console.log(state.page)
-        console.log(state.totalPage)
-        state.page = state.page + 1
-      }
-      if (state.refreshing) {
-        state.list = [];
-        state.refreshing = false;
-      }
-      loadData()
-    }
-
-    const onRefresh = () => {
-      state.refreshing = true
-      state.finished = false
-      state.loading = true
-      state.page = 1
-      onLoad()
-    }
-
-    return {
-      ...toRefs(state),
-      onChangeTab,
-      goTo,
-      goBack,
-      onLoad,
-      onRefresh
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-  @import '../common/style/mixin';
-  .order-box {
-    .order-header {
-      position: fixed;
-      top: 0;
-      left: 0;
-      z-index: 10000;
-      .fj();
-      .wh(100%, 44px);
-      line-height: 44px;
-      padding: 0 10px;
-      .boxSizing();
-      color: #252525;
-      background: #fff;
-      border-bottom: 1px solid #dcdcdc;
-      .order-name {
-        font-size: 14px;
-      }
-    }
-    .order-tab {
-      position: fixed;
-      left: 0;
-      z-index: 1000;
-      width: 100%;
-      border-bottom: 1px solid #e9e9e9;
-    }
-    .skeleton {
-      margin-top: 60px;
-    }
-    .content {
-      height: calc(~"(100vh - 70px)");
-      overflow: hidden;
-      overflow-y: scroll; 
-      margin-top: 34px;
-    }
-    .order-list-refresh {
-      .van-card__content {
-        display: flex;
-        flex-direction: column;
-        justify-content: center;
-      }
-      .van-pull-refresh__head {
-        background: #f9f9f9;
-      }
-      .order-item-box {
-        margin: 20px 10px;
-        background-color: #fff;
-        .order-item-header {
-          padding: 10px 20px 0 20px;
-          display: flex;
-          justify-content: space-between;
-        }
-        .van-card {
-          background-color: #fff;
-          margin-top: 0;
-        }
-      }
-    }
-  }
-</style>

+ 0 - 186
src/views/scrap/OrderDetail.vue

@@ -1,186 +0,0 @@
-<template>
-  <div class="order-detail-box">
-    <s-header :name="'订单详情'" @callback="close"></s-header>
-    <div class="order-status">
-      <div class="status-item">
-        <label>订单状态:</label>
-        <span>{{ detail.orderStatusString }}</span>
-      </div>
-      <div class="status-item">
-        <label>订单编号:</label>
-        <span>{{ detail.orderNo }}</span>
-      </div>
-      <div class="status-item">
-        <label>下单时间:</label>
-        <span>{{ detail.createTime }}</span>
-      </div>
-      <van-button v-if="detail.orderStatus == 3" style="margin-bottom: 10px" color="#1baeae" block @click="handleConfirmOrder(detail.orderNo)">确认收货</van-button>
-      <van-button v-if="detail.orderStatus == 0" style="margin-bottom: 10px" color="#1baeae" block @click="showPayFn">去支付</van-button>
-      <van-button v-if="!(detail.orderStatus < 0 || detail.orderStatus == 4)" block @click="handleCancelOrder(detail.orderNo)">取消订单</van-button>
-    </div>
-    <div class="order-price">
-      <div class="price-item">
-        <label>商品金额:</label>
-        <span>¥ {{ detail.totalPrice }}</span>
-      </div>
-      <div class="price-item">
-        <label>配送方式:</label>
-        <span>普通快递</span>
-      </div>
-    </div>
-    <van-card
-      v-for="item in detail.newBeeMallOrderItemVOS"
-      :key="item.goodsId"
-      style="background: #fff"
-      :num="item.goodsCount"
-      :price="item.sellingPrice"
-      desc="全场包邮"
-      :title="item.goodsName"
-      :thumb="$filters.prefix(item.goodsCoverImg)"
-    />
-    <van-popup
-      v-model:show="showPay"
-      position="bottom"
-      :style="{ height: '24%' }"
-    >
-      <div :style="{ width: '90%', margin: '0 auto', padding: '20px 0' }">
-        <van-button :style="{ marginBottom: '10px' }" color="#1989fa" block @click="handlePayOrder(detail.orderNo, 1)">支付宝支付</van-button>
-        <van-button color="#4fc08d" block @click="handlePayOrder(detail.orderNo, 2)">微信支付</van-button>
-      </div>
-    </van-popup>
-  </div>
-</template>
-
-<script>
-import { reactive, toRefs, onMounted } from 'vue'
-import sHeader from '@/components/SimpleHeader'
-import { getOrderDetail, cancelOrder, confirmOrder, payOrder } from '@/service/order'
-import { Dialog, Toast } from 'vant'
-import { useRoute } from 'vue-router'
-export default {
-  name: 'OrderDetail',
-  components: {
-    sHeader
-  },
-  setup() {
-    const route = useRoute()
-    const state = reactive({
-      detail: {},
-      showPay: false
-    })
-
-    onMounted(() => {
-      init()
-    })
-
-    const init = async () => {
-      Toast.loading({
-        message: '加载中...',
-        forbidClick: true
-      });
-      const { id } = route.query
-      const { data } = await getOrderDetail(id)
-      state.detail = data
-      Toast.clear()
-    }
-
-    const handleCancelOrder = (id) => {
-      Dialog.confirm({
-        title: '确认取消订单?',
-      }).then(() => {
-        cancelOrder(id).then(res => {
-          if (res.resultCode == 200) {
-            Toast('删除成功')
-            init()
-          }
-        })
-      }).catch(() => {
-        // on cancel
-      });
-    }
-
-    const handleConfirmOrder = (id) => {
-      Dialog.confirm({
-        title: '是否确认订单?',
-      }).then(() => {
-        confirmOrder(id).then(res => {
-          if (res.resultCode == 200) {
-            Toast('确认成功')
-            init()
-          }
-        })
-      }).catch(() => {
-        // on cancel
-      });
-    }
-
-    const showPayFn = () => {
-      state.showPay = true
-    }
-
-    const handlePayOrder = async (id, type) => {
-      Toast.loading
-      await payOrder({ orderNo: id, payType: type })
-      state.showPay = false
-      init()
-    }
-
-    const close = () => {
-      Dialog.close()
-    }
-
-    return {
-      ...toRefs(state),
-      handleCancelOrder,
-      handleConfirmOrder,
-      showPayFn,
-      handlePayOrder,
-      close
-    }
-
-  }
-}
-</script>
-
-<style lang="less" scoped>
-  .order-detail-box {
-    background: #f7f7f7;
-    .order-status {
-      background: #fff;
-      padding: 20px;
-      font-size: 15px;
-      .status-item {
-        margin-bottom: 10px;
-        label {
-          color: #999;
-        }
-        span {
-
-        }
-      }
-    }
-    .order-price {
-      background: #fff;
-      margin: 20px 0;
-      padding: 20px;
-      font-size: 15px;
-      .price-item {
-        margin-bottom: 10px;
-        label {
-          color: #999;
-        }
-        span {
-
-        }
-      }
-    }
-    .van-card {
-      margin-top: 0;
-    }
-    .van-card__content {
-      display: flex;
-      flex-direction: column;
-      justify-content: center;
-    }
-  }
-</style>

+ 0 - 207
src/views/scrap/ProductDetail.vue

@@ -1,207 +0,0 @@
-<template>
-  <div class="product-detail">
-    <s-header :name="'商品详情'"></s-header>
-    <div class="detail-content">
-      <div class="detail-swipe-wrap">
-        <van-swipe class="my-swipe" indicator-color="#1baeae">
-          <van-swipe-item v-for="(item, index) in detail.goodsCarouselList" :key="index">
-            <img :src="item" alt="">
-          </van-swipe-item>
-        </van-swipe>
-      </div>
-      <div class="product-info">
-        <div class="product-title">
-          {{ detail.goodsName || '' }}
-        </div>
-        <div class="product-desc">免邮费 顺丰快递</div>
-        <div class="product-price">
-          <span>¥{{ detail.sellingPrice || '' }}</span>
-          <!-- <span>库存203</span> -->
-        </div>
-      </div>
-      <div class="product-intro">
-        <ul>
-          <li>概述</li>
-          <li>参数</li>
-          <li>安装服务</li>
-          <li>常见问题</li>
-        </ul>
-        <div class="product-content" v-html="detail.goodsDetailContent || ''"></div>
-      </div>
-    </div>
-    <van-action-bar>
-      <van-action-bar-icon icon="chat-o" text="客服" />
-      <van-action-bar-icon icon="cart-o" :badge="!count ? '' : count" @click="goTo()" text="购物车" />
-      <van-action-bar-button type="warning" @click="handleAddCart" text="加入购物车" />
-      <van-action-bar-button type="danger" @click="goToCart" text="立即购买" />
-    </van-action-bar>
-  </div>
-</template>
-
-<script>
-import { reactive, onMounted, computed, toRefs, nextTick } from 'vue'
-import { useRoute, useRouter } from 'vue-router'
-import { useStore } from 'vuex'
-import { getDetail } from '@/service/good'
-import { addCart } from '@/service/cart'
-import sHeader from '@/components/SimpleHeader'
-import { Toast } from 'vant'
-import { prefix } from '@/common/js/utils'
-export default {
-  setup() {
-    const route = useRoute()
-    const router = useRouter()
-    const store = useStore()
-
-    const state = reactive({
-      detail: {
-        goodsCarouselList: []
-      }
-    })
-
-    onMounted(async () => {
-      const { id } = route.params
-      const { data } = await getDetail(id)
-      data.goodsCarouselList = data.goodsCarouselList.map(i => prefix(i))
-      state.detail = data
-      store.dispatch('updateCart')
-    })
-
-    nextTick(() => {
-      // 一些和DOM有关的东西
-      const content = document.querySelector('.detail-content')
-      content.scrollTop = 0
-    })
-
-    const goBack = () => {
-      router.go(-1)
-    }
-
-    const goTo = () => {
-      router.push({ path: '/cart' })
-    }
-
-    const handleAddCart = async () => {
-      const { resultCode } = await addCart({ goodsCount: 1, goodsId: state.detail.goodsId })
-      if (resultCode == 200 ) Toast.success('添加成功')
-      store.dispatch('updateCart')
-    }
-
-    const goToCart = async () => {
-      await addCart({ goodsCount: 1, goodsId: state.detail.goodsId })
-      store.dispatch('updateCart')
-      router.push({ path: '/cart' })
-    }
-
-    const count = computed(() => {
-      console.log(111, store.state.cartCount)
-      return store.state.cartCount
-    })
-
-    return {
-      ...toRefs(state),
-      goBack,
-      goTo,
-      handleAddCart,
-      goToCart,
-      count
-    }
-  },
-  components: {
-    sHeader
-  }
-}
-</script>
-
-<style lang="less">
-  @import '../common/style/mixin';
-  .product-detail {
-    .detail-header {
-      position: fixed;
-      top: 0;
-      left: 0;
-      z-index: 10000;
-      .fj();
-      .wh(100%, 44px);
-      line-height: 44px;
-      padding: 0 10px;
-      .boxSizing();
-      color: #252525;
-      background: #fff;
-      border-bottom: 1px solid #dcdcdc;
-      .product-name {
-        font-size: 14px;
-      }
-    }
-    .detail-content {
-      height: calc(100vh - 50px);
-      overflow: hidden;
-      overflow-y: auto;
-      .detail-swipe-wrap {
-        .my-swipe .van-swipe-item {
-          img {
-            width: 100%;
-            // height: 300px;
-          }
-        }
-      }
-      .product-info {
-        padding: 0 10px;
-        .product-title {
-          font-size: 18px;
-          text-align: left;
-          color: #333;
-        }
-        .product-desc {
-          font-size: 14px;
-          text-align: left;
-          color: #999;
-          padding: 5px 0;
-        }
-        .product-price {
-          .fj();
-          span:nth-child(1) {
-            color: #F63515;
-            font-size: 22px;
-          }
-          span:nth-child(2) {
-            color: #999;
-            font-size: 16px;
-          }
-        }
-      }
-      .product-intro {
-        width: 100%;
-        padding-bottom: 50px;
-        ul {
-          .fj();
-          width: 100%;
-          margin: 10px 0;
-          li {
-            flex: 1;
-            padding: 5px 0;
-            text-align: center;
-            font-size: 15px;
-            border-right: 1px solid #999;
-            box-sizing: border-box;
-            &:last-child {
-              border-right: none;
-            }
-          }
-        }
-        .product-content {
-          padding: 0 20px;
-          img {
-            width: 100%;
-          }
-        }
-      }
-    }
-    .van-action-bar-button--warning {
-      background: linear-gradient(to right,#6bd8d8, @primary)
-    }
-    .van-action-bar-button--danger {
-      background: linear-gradient(to right, #0dc3c3, #098888)
-    }
-  }
-</style>

+ 0 - 260
src/views/scrap/ProductList.vue

@@ -1,260 +0,0 @@
-<template>
-  <div class="product-list-wrap">
-    <div class="product-list-content">
-      <header class="category-header wrap">
-        <i class="nbicon nbfanhui" @click="goBack"></i>
-        <div class="header-search">
-          <i class="nbicon nbSearch"></i>
-          <input
-            type="text"
-            class="search-title"
-            v-model="keyword"/>
-        </div>
-        <span class="search-btn" @click="getSearch">搜索</span>
-      </header>
-      <van-tabs type="card" color="#1baeae" @click="changeTab" >
-        <van-tab title="推荐" name=""></van-tab>
-        <van-tab title="新品" name="new"></van-tab>
-        <van-tab title="价格" name="price"></van-tab>
-      </van-tabs>
-    </div>
-    <div class="content">
-      <van-pull-refresh v-model="refreshing" @refresh="onRefresh" class="product-list-refresh">
-        <van-list
-          v-model:loading="loading"
-          :finished="finished"
-          :finished-text="productList.length ? '没有更多了' : '搜索想要的商品'"
-          @load="onLoad"
-          @offset="10"
-        >
-          <!-- <p v-for="item in list" :key="item">{{ item }}</p> -->
-          <template v-if="productList.length">
-            <div class="product-item" v-for="(item, index) in productList" :key="index" @click="productDetail(item)">
-              <img :src="$filters.prefix(item.goodsCoverImg)" />
-              <div class="product-info">
-                <p class="name">{{item.goodsName}}</p>
-                <p class="subtitle">{{item.goodsIntro}}</p>
-                <span class="price">¥ {{item.sellingPrice}}</span>
-              </div>
-            </div>
-          </template>
-          <img class="empty" v-else src="https://s.yezgea02.com/1604041313083/kesrtd.png" alt="搜索">
-        </van-list>
-      </van-pull-refresh>
-    </div>
-  </div>
-</template>
-
-<script>
-import { reactive, toRefs } from 'vue'
-import { useRoute, useRouter } from 'vue-router'
-import { search } from '@/service/good'
-export default {
-  setup() {
-    const route = useRoute()
-    const router = useRouter()
-    const state = reactive({
-      keyword: route.query.keyword || '',
-      searchBtn: false,
-      seclectActive: false,
-      refreshing: false,
-      list: [],
-      loading: false,
-      finished: false,
-      productList: [],
-      totalPage: 0,
-      page: 1,
-      orderBy: ''
-    })
-
-    // onMounted(() => {
-    //   init()
-    // })
-
-    const init = async () => {
-      const { categoryId } = route.query
-      if (!categoryId && !state.keyword) {
-        // Toast.fail('请输入关键词')
-        state.finished = true
-        state.loading = false;
-        return
-      }
-      const { data, data: { list } } = await search({ pageNumber: state.page, goodsCategoryId: categoryId, keyword: state.keyword, orderBy: state.orderBy })
-      
-      state.productList = state.productList.concat(list)
-      state.totalPage = data.totalPage
-      state.loading = false;
-      if (state.page >= data.totalPage) state.finished = true
-    }
-
-    const goBack = () => {
-      router.go(-1)
-    }
-
-    const productDetail = (item) => {
-      router.push({ path: `/product/${item.goodsId}` })
-    }
-
-    const getSearch = () => {
-      onRefresh()
-    }
-
-    const onLoad = () => {
-      if (!state.refreshing && state.page < state.totalPage) {
-        state.page = state.page + 1
-      }
-      if (state.refreshing) {
-        state.productList = [];
-        state.refreshing = false;
-      }
-      init()
-    }
-
-    const onRefresh = () => {
-      state.refreshing = true
-      state.finished = false
-      state.loading = true
-      state.page = 1
-      onLoad()
-    }
-
-    const changeTab = (name) => {
-      console.log('name', name)
-      state.orderBy = name
-      onRefresh()
-    }
-
-    return {
-      ...toRefs(state),
-      goBack,
-      productDetail,
-      getSearch,
-      changeTab,
-      onLoad,
-      onRefresh
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-  @import '../common/style/mixin';
-  .product-list-content {
-    position: fixed;
-    left: 0;
-    top: 0;
-    width: 100%;
-    z-index: 1000;
-    background: #fff;
-    .category-header {
-      .fj();
-      width: 100%;
-      height: 50px;
-      line-height: 50px;
-      padding: 0 15px;
-      .boxSizing();
-      font-size: 15px;
-      color: #656771;
-      z-index: 10000;
-      &.active {
-        background: @primary;
-      }
-      .icon-left {
-        font-size: 25px;
-        font-weight: bold;
-      }
-      .header-search {
-        display: flex;
-        width: 76%;
-        height: 20px;
-        line-height: 20px;
-        margin: 10px 0;
-        padding: 5px 0;
-        color: #232326;
-        background: #F7F7F7;
-        .borderRadius(20px);
-        .nbSearch {
-          padding: 0 5px 0 20px;
-          font-size: 17px;
-        }
-        .search-title {
-          font-size: 12px;
-          color: #666;
-          background: #F7F7F7;
-        }
-    }
-    .icon-More {
-      font-size: 20px;
-    }
-    .search-btn {
-      height: 28px;
-      margin: 8px 0;
-      line-height: 28px;
-      padding: 0 5px;
-      color: #fff;
-      background: @primary;
-      .borderRadius(5px);
-      margin-top: 10px;
-    }
-  }
-}
-  .content {
-    height: calc(~"(100vh - 70px)");
-    overflow: hidden;
-    overflow-y: scroll; 
-    margin-top: 78px;
-  }
-  .product-list-refresh {
-    .product-item {
-      .fj();
-      width: 100%;
-      height: 120px;
-      padding: 10px 0;
-      border-bottom: 1px solid #dcdcdc;
-      img {
-        width: 140px;
-        height: 120px;
-        padding: 0 10px;
-        .boxSizing();
-      }
-      .product-info {
-          width: 56%;
-          height: 120px;
-          padding: 5px;
-          text-align: left;
-          .boxSizing();
-          p {
-            margin: 0
-          }
-          .name {
-            width: 100%;
-            max-height: 40px;
-            line-height: 20px;
-            font-size: 15px;
-            color: #333;
-            overflow: hidden;
-            text-overflow:ellipsis;
-            white-space: nowrap;
-          }
-          .subtitle {
-            width: 100%;
-            max-height: 20px;
-            padding: 10px 0;
-            line-height: 25px;
-            font-size: 13px;
-            color: #999;
-            overflow: hidden;
-          }
-          .price {
-            color: @primary;
-            font-size: 16px;
-          }
-      }
-  }
-  .empty {
-    display: block;
-    width: 150px;
-    margin: 50px auto 20px;
-  }
-}
-</style>

+ 0 - 73
src/views/scrap/Setting.vue

@@ -1,73 +0,0 @@
-<template>
-  <div class="seting-box">
-    <s-header :name="'账号管理'"></s-header>
-    <div class="input-item">
-      <van-field v-model="nickName" label="昵称" />
-      <van-field v-model="introduceSign" label="个性签名" />
-      <van-field v-model="password" type='password' label="修改密码" />
-    </div>
-    <van-button round class="save-btn" color="#1baeae" type="primary" @click="save" block>保存</van-button>
-    <van-button round class="save-btn" color="#1baeae" type="primary" @click="handleLogout" block>退出登录</van-button>
-  </div>
-</template>
-
-<script>
-import { reactive, onMounted, toRefs } from 'vue'
-import md5 from 'js-md5'
-import sHeader from '@/components/SimpleHeader'
-import { setLocal } from '@/common/js/utils'
-import { Toast } from 'vant'
-export default {
-  components: {
-    sHeader
-  },
-  setup() {
-    const state = reactive({
-      nickName: '',
-      introduceSign: '',
-      password: ''
-    })
-
-    onMounted(async () => {
-      const { data } = await getUserInfo()
-      state.nickName = data.nickName
-      state.introduceSign = data.introduceSign
-    })
-
-    const save = async () => {
-      const params = {
-        introduceSign: state.introduceSign,
-        nickName: state.nickName
-      }
-      if (state.password) {
-        params.passwordMd5 = md5(state.password)
-      } 
-      await EditUserInfo(params)
-      Toast.success('保存成功')
-    }
-
-    const handleLogout = async () => {
-      const { resultCode } = await logout()
-      if (resultCode == 200) {
-        setLocal('token', '')
-        window.location.href = '/home'
-      }
-    }
-
-    return {
-      ...toRefs(state),
-      save,
-      handleLogout
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-  .seting-box {
-    .save-btn {
-      width: 80%;
-      margin: 20px auto ;
-    }
-  }
-</style>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1206 - 0
src/views/settlement/index.vue


+ 1 - 1
src/views/taskMessage/joinpayMchCheck/info/index.vue

@@ -282,7 +282,7 @@
           </div>
         </div>
       </div>
-      <div v-if="isOper && infoData.status == '1'" class="itemRow" style="display: flex; justify-content: center; padding: 0.5rem;">
+      <div v-if="isOper && (infoData.status == '1' || infoData.status == '4')" class="itemRow" style="display: flex; justify-content: center; padding: 0.5rem;">
         <van-button span="5" round type="primary"
           style="height: 2em; padding: 0 2em; margin: 0 1em; background: rgb(255 0 0 / 20%); color: #ff0000; border-color: #ff0000;"
           @click="changeStatusFun('3')">

+ 134 - 8
src/views/user.vue

@@ -128,6 +128,24 @@
             <van-icon name="edit" class="editIcon" @click="editClk(5)" />
           </div>
 
+          <!-- 切换支付平台 -->
+          <div v-if="chaSzPayShow" class="userInfo l-flex-between">
+            <span class="userInfoLeft">{{ $t("user.szPayType") }}: </span>
+            <div class="cust_vantBorder o-pl-15">
+              <van-switch :model-value="sunzeePay" active-color="#0090fa" inactive-color="#30c25c" size="21px"
+                @update:model-value="changeSunzeePay" />
+            </div>
+            <span class="o-pl-50">{{ $t("user.currentChoose") }}: {{ sunzeePay ? "汇付" : "汇聚" }}</span>
+          </div>
+
+          <div v-if="chaScPayShow" class="userInfo l-flex-between">
+            <span class="userInfoLeft">{{ $t("user.scPayType") }}: </span>
+            <div class="cust_vantBorder o-pl-15">
+              <van-switch :model-value="sevencloudPay" active-color="#0090fa" inactive-color="#30c25c" size="21px"
+                @update:model-value="changeSevenCloudPay" />
+            </div>
+            <span class="o-pl-50">{{ $t("user.currentChoose") }}: {{ sevencloudPay ? "汇付" : "汇聚" }}</span>
+          </div>
         </div>
       </div>
       <div class="lineBox"></div>
@@ -147,13 +165,21 @@
           </div>
 
           <!-- 提现帐号 -->
-          <div v-if="isInland" class="taskListRow flex-col" @click="pushPageList('/joinpayMch')">
+          <div v-if="isInland" class="taskListRow flex-col" @click="pushPageList('/settlement')">
             <div class="taskIcon joinPayMchIcon"></div>
             <div class="taskRight">
-              <div class="taskTitle">{{ $t("user.withdrawalAccountNo") }}</div>
+              <div class="taskTitle">{{ $t("user.settlementAccount") }}</div>
             </div>
           </div>
 
+          <!-- 提现帐号 -->
+          <!-- <div v-if="isInland" class="taskListRow flex-col" @click="pushPageList('/joinpayMch')">
+            <div class="taskIcon joinPayMchIcon"></div>
+            <div class="taskRight">
+              <div class="taskTitle">{{ $t("user.withdrawalAccountNo") }}</div>
+            </div>
+          </div> -->
+
           <!-- Airwallex 钱包 -->
           <div v-if="isAbroad && user.companyType != '1'" class="taskListRow flex-col"
             @click="pushPageList('/airwallex')">
@@ -164,14 +190,14 @@
           </div>
 
           <!-- 备用提现账号 -->
-          <div v-if="isInland" class="taskListRow flex-col" @click="pushPageList('/huifuMch')">
+          <!-- <div v-if="isInland" class="taskListRow flex-col" @click="pushPageList('/huifuMch')">
             <div class="taskIcon shandeMchIcon"></div>
             <div class="taskRight">
               <div class="taskTitle">
                 {{ $t("user.standbyWithdrawalAccountNo") }}
               </div>
             </div>
-          </div>
+          </div> -->
           <!--          <div class="taskListRow flex-col" @click="pushPageList('/shandeMch')">
                       <div class="taskIcon shandeMchIcon"></div>
                       <div class="taskRight">
@@ -245,8 +271,8 @@ import {
   $M_PhoneTest,
 } from "@/common/js/utils";
 import { useRouter } from "vue-router";
-import { tAdminGetRelation, tAdminSetRelationAdmin } from "@/service/user";
-import { Toast } from "vant";
+import { tAdminGetRelation, tAdminSetRelationAdmin, updatePayPlatform } from "@/service/user";
+import { Toast, Dialog } from "vant";
 import { useI18n } from "vue-i18n";
 import { styleUrl } from "../common/js/utils";
 
@@ -265,6 +291,13 @@ export default {
     const mailboxShow = ref(true);
     // 控制货币显示隐藏 货币符号,默认“¥”
     const symbolShow = ref(true);
+    // 控制切换支付平台按钮显示隐藏
+    const chaSzPayShow = ref(false);
+    const chaScPayShow = ref(false);
+
+
+    const sunzeePay = ref(false);
+    const sevencloudPay = ref(false);
 
     const user = getLoginUser();
     const router = useRouter();
@@ -280,6 +313,11 @@ export default {
       area: "",
       currencySymbol: accountDetail.value.currencySymbol,
     });
+    // 
+    const params = reactive({
+      id: '', // 用户ID	
+      payPlatform: '', //支付平台	
+    });
     // 点击修改图标
     const editClk = (idx) => {
       switch (idx) {
@@ -412,11 +450,30 @@ export default {
     const getAcccountDetail = () => {
       getAdmin({ id: user.id }).then((res) => {
         accountDetail.value = res.data.data;
-
         // 查询地址回显
         kCascaderRef.value.init(accountDetail.value.areaId);
       });
     };
+    // 获取申泽支付平台
+    const getSunzeeDetail = () => {
+      getAdmin({ id: 2738 }).then((res) => {
+        // sunzeePay.value = res.data.data.payPlatform;
+        if (res.data.data.payPlatform == '1') {
+          sunzeePay.value = true;
+        }
+        console.log("sunzeePay", sunzeePay.value)
+      });
+    };
+    // 获取七云支付平台
+    const getSevenCloudDetail = () => {
+      getAdmin({ id: 2739 }).then((res) => {
+        // sevencloudPay.value = res.data.data.payPlatform;
+        if (res.data.data.payPlatform == '1') {
+          sevencloudPay.value = true;
+        }
+        console.log("sevencloudPay", sevencloudPay.value)
+      });
+    };
     // 退出登录弹窗
     const kDialogRef = ref(null);
     // 点击右侧按钮
@@ -439,6 +496,56 @@ export default {
         }, 200);
       }
     };
+    //切换申泽支付平台
+    const changeSunzeePay = (value) => {
+      Dialog.confirm({
+        title: t('user.tips'),
+        message: t('user.changeTips'),
+      }).then(() => {
+        // checked.value = newValue;
+        console.log(value);
+        params.id = 2738;
+        if (value) {
+          params.payPlatform = '1';
+        } else {
+          params.payPlatform = '0';
+        }
+        const { data } = updatePayPlatform(params);
+        if (data.code) {
+          Toast.success(t('user.changeSuccess'));
+          sunzeePay.value = value;
+        } else {
+          Toast.fail(data.message);
+        }
+      }).catch((error) => {
+        console.error(error);
+      })
+    }
+    //切换七云支付平台
+    const changeSevenCloudPay = (value) => {
+      Dialog.confirm({
+        title: t('user.tips'),
+        message: t('user.changeTips'),
+      }).then(() => {
+        // checked.value = newValue;
+        console.log(value);
+        params.id = 2739;
+        if (value) {
+          params.payPlatform = '1';
+        } else {
+          params.payPlatform = '0';
+        }
+        const { data } = updatePayPlatform(params);
+        if (data.code) {
+          Toast.success(t('user.changeSuccess'));
+          sunzeePay.value = value;
+        } else {
+          Toast.fail(data.message);
+        }
+      }).catch((error) => {
+        console.error(error);
+      })
+    }
 
     // 初始化页面获取列表
     onMounted(async () => {
@@ -452,6 +559,18 @@ export default {
       gettAdminGetRelation();
       // 获取账户
       getAcccountDetail();
+      if (user.id == 1 ) {
+        chaSzPayShow.value = true;
+        chaScPayShow.value = true;
+        getSunzeeDetail();
+        getSevenCloudDetail();
+      } else if (user.id == 2738) {
+        chaSzPayShow.value = true;
+        getSunzeeDetail();
+      } else if (user.id == 2739) {
+        chaScPayShow.value = true;
+        getSevenCloudDetail();
+      }
     });
     const gettAdminGetRelation = async () => {
       const { data } = await tAdminGetRelation({
@@ -567,6 +686,7 @@ export default {
       phoneNumberShow,
       editClk,
       cofficentForm,
+      params,
       areaShow,
       accountDetail,
       fieldValue,
@@ -578,7 +698,13 @@ export default {
       isAbroad,
       checkIsAbroad,
       isInland,
-      symbolShow
+      symbolShow,
+      chaSzPayShow,
+      chaScPayShow,
+      sunzeePay,
+      sevencloudPay,
+      changeSunzeePay,
+      changeSevenCloudPay,
     };
   }
 };