Parcourir la source

:registered:feat: "用户注册审批"

Ritchie il y a 1 an
Parent
commit
b1a99e2932

BIN
src/assets/home/commonTools.png


BIN
src/assets/home/rankingList.png


+ 0 - 3
src/router/index.js

@@ -206,9 +206,6 @@ router.beforeEach((to, from, next) => {
       if (!userObject) {
         router.push("/login");
       }
-      // if (typeof userObject.id !== "number") {
-      //   router.push("/login");
-      // }
     }
     next();
   }

+ 11 - 1
src/service/home/index.js

@@ -1,6 +1,16 @@
 import axios from '../../utils/axios'
 import { stringToUrl } from '@/common/js/utils';
 
+// 获取最新股票详情
+export function getStockInfoForNewest() {
+    return axios.get(`/index/getStockInfoForNewest`);
+}
+
+// 获取月统计股票价格曲线图
+export function getListStockInfoForMonth() {
+    return axios.get(`/index/listStockInfoForMonth`);
+}
+
 // 获取首页统计
 export function getStatistics(params) {
     return axios.post(`/ORDER-SERVER/tOrder/getStatistics?${stringToUrl(params)}`, params);
@@ -15,7 +25,7 @@ export function getAdminList(params) {
 }
 // 获取公告
 export function Api_getNotice(params) {
-    return axios.get(`/SZWL-SERVER/tNotice/getNotice`, { params });
+    return axios.get(`/tNotice/getNotice`, { params });
 }
 // 公告已读修改状态
 export function Api_getUpdateNotice(params) {

+ 7 - 11
src/service/login/index.js

@@ -1,16 +1,12 @@
 import axios from '../../utils/axios'
-import { stringToUrl } from '@/common/js/utils';
+// import { stringToUrl } from '@/common/js/utils';
 
 // 登录
-export function login(params) {
-  return axios.post(`/SZWL-SERVER/tAdmin/login?username=${params.username}&password=${params.password}&hostName=${params.hostName}`, params);
-}
-// 根据系统ID获取logo和系统名称
-export function getSys(params) {
-  return axios.get(`/SZWL-SERVER/tLogo/getLogo?${stringToUrl(params)}`);
-}
+// export function login(params) {
+//   return axios.post(`/SZWL-SERVER/tAdmin/login?username=${params.username}&password=${params.password}&hostName=${params.hostName}`, params);
+// }
 
 // 登录 stock
-// export function login(loginParam) {
-//   return axios.post(`/userLogin/loginByPhone?phone=${loginParam.phone}&password=${loginParam.password}`, loginParam);
-// }
+export function login(loginParam) {
+  return axios.post(`/userLogin/loginByPhone`, loginParam);
+}

+ 3 - 2
src/service/taskAccount/index.js

@@ -6,6 +6,7 @@ export function getPageUserApply(params) {
     return axios.get(`/userApply/pageUserApply`,{params});
 }
 
-export function updateUserInfo(locationCheck) {
-    return axios.post(`/SZWL-SERVER/tLocationCheck/updateUserInfo`, locationCheck);
+// 审核用户注册申请 
+export function auditUserApply(params) {
+    return axios.post(`/userApply/auditUserApply`, params);
 }

+ 15 - 0
src/stores/user.js

@@ -0,0 +1,15 @@
+import { defineStore } from 'pinia';
+
+export const useUserStore = defineStore('user', {
+  state: () => ({
+    userInfo: null,
+  }),
+  actions: {
+    setUserInfo(userInfo) {
+      this.userInfo = userInfo;
+    },
+    clearUserInfo() {
+      this.userInfo = null;
+    },
+  },
+});

+ 2 - 2
src/styles/home/index.less

@@ -299,8 +299,8 @@
               position: relative;
               width: 14px;
               height: 14px;
-              border: 2px rgba(255, 52, 86, 1);
-              background: url("../../assets/home/commonTools.png") center no-repeat;
+              border: 2px rgba(128, 150, 236, 1);
+              background: url("../../assets/home/rankingList.png") center no-repeat;
               background-size: 100%;
             }
 

+ 167 - 37
src/styles/taskAccountList/index.less

@@ -1,46 +1,176 @@
 .taskAccountList {
-    .headCon {
-      height: 30px;
-  
-      .ruleIcon {
-        width: 18px;
-        height: 17px;
+  width: 100%;
+
+  .taskAccountBox {
+    width: 100%;
+    height: calc(100% - 60px);
+    overflow: auto;
+
+    // background: #fff url('../../assets/taskMessage/pageBg.png') top center no-repeat;
+    // background-size: 100%;
+    .taskListRow {
+      width: 100%;
+      height: 53px;
+      flex-wrap: wrap;
+
+      .taskIcon {
+        width: 13%;
+        height: 100%;
+        position: relative;
+
+        &.deviceIcon::after {
+          content: '';
+          position: absolute;
+          background: #fff url('../../assets/taskMessage/deviceIcon.png') top center no-repeat;
+          background-size: 100%;
+          width: 0.6rem;
+          height: 0.6rem;
+          right: 0.15rem;
+          top: 0.4rem;
+        }
+
+        &.retailIcon::after {
+          content: '';
+          position: absolute;
+          background: #fff url('../../assets/taskMessage/retailIcon.png') top center no-repeat;
+          background-size: 100%;
+          width: 0.6rem;
+          height: 0.6rem;
+          right: 0.15rem;
+          top: 0.4rem;
+        }
+
+        &.withIcon::after {
+          content: '';
+          position: absolute;
+          background: #fff url('../../assets/taskMessage/withIcon.png') top center no-repeat;
+          background-size: 100%;
+          width: 0.6rem;
+          height: 0.6rem;
+          right: 0.15rem;
+          top: 0.4rem;
+        }
+      }
+
+      .taskRight {
+        width: 87%;
+        height: 100%;
+        position: relative;
+        border-bottom: 1px solid #e7eaf7;
+
+        &::after {
+          content: '';
+          position: absolute;
+          width: 6px;
+          height: 12px;
+          background: url('../../assets/right.png') top center no-repeat;
+          background-size: 100%;
+          right: 0.55rem;
+          top: 0.5rem;
+        }
+
+        .taskTitle {
+          line-height: 53px;
+        }
+      }
+    }
+
+    .searchRow {
+      width: 95%;
+      height: 48px;
+      margin: 0 auto;
+      background: rgba(255, 255, 255, 1) url("../../assets/home/line.png") bottom center no-repeat;
+      background-size: 100%;
+      align-items: center;
+
+      .bd3 {
+        width: 87px;
+        height: 16px;
+
+        .outer4 {
+          width: 20px;
+          height: 26px;
+          background: url("../../assets/alarmHistory/icon.png") top center no-repeat;
+          background-size: 100%;
+
+          &.equipmentIcon {
+            background: url("../../assets/taskMessage/deviceIcon.png") top center no-repeat;
+            background-size: 100%;
+          }
+
+          &.joinPayMchCheckIcon {
+            background: url("../../assets/taskMessage/withIcon.png") top center no-repeat;
+            background-size: 100%;
+          }
+
+          &.proportionIcon {
+            background: url("../../assets/taskMessage/retailIcon.png") top center no-repeat;
+            background-size: 100%;
+            background-position: center top -2px;  /* 向上移动 2 像素 */
+          }
+        }
+
+        .txt2 {
+          width: 65px;
+          height: 14px;
+          overflow-wrap: break-word;
+          color: rgba(64, 77, 116, 1);
+          font-size: 15px;
+          font-family: PingFangSC-Semibold;
+          text-align: left;
+          white-space: nowrap;
+          line-height: 15px;
+          display: block;
+          font-weight: bold;
+
+          .discountNumber {
+            font-size: 18px;
+            color: red;
+          }
+        }
+      }
+
+      .label3 {
+        color: #4d6add;
         margin-right: 10px;
-        background: url("../../assets/advertManage/ruleIcon.png");
-        background-size: 100%;
       }
     }
-  
-    .contentCon {
-      width: 100%;
-      height: calc(100% - 120px);
-      overflow: auto;
-  
-      .content {
-        .rightCon {
-          .editBtn {
-            border: 1px solid #FF3456;
-            border-radius: 2px;
-            padding: 6px 16px;
-            color: #FF3456;
+
+    .van-tabs__line {
+      background-color: #4d6add !important;
+    }
+
+    .van-tab--active .van-tab__text--ellipsis {
+      color: #4d6add;
+    }
+
+    .listBox {
+      .listItem {
+        width: 100%;
+        background: url("../../assets/home/line.png") bottom center no-repeat;
+        background-size: 100%;
+        position: relative;
+        display: inline-block;
+
+        .itemBox {
+          width: 92%;
+          margin: 20px auto;
+          font-size: 12px;
+          line-height: 1.64;
+
+          .itemRow {
+            width: 100%;
+          }
+
+          .itemTitle {
+            color: #8787a6;
+          }
+
+          .discount {
+            padding-left: 2em;
           }
         }
       }
     }
   }
-  
-  .van-button--primary {
-    background-color: #FF3456;
-    border-color: #FF3456;
-  }
-  
-  .van-radio__icon--checked .van-icon {
-    background-color: #FF3456;
-    border-color: #FF3456;
-  }
-  
-  .van-checkbox__icon--checked .van-icon {
-    background-color: #FF3456;
-    border-color: #FF3456;
-  }
-  
+}

+ 24 - 0
src/styles/trading/index.less

@@ -689,6 +689,30 @@
       }
     }
 
+    .buy-box {
+      margin: auto;
+      margin-top: 1px;
+      border-radius: 10px;
+      background-color: #fff9f7;
+      padding: 15px;
+      width: 95%;
+      max-width: 600px;
+      text-align: center;
+      box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); /* 添加阴影效果 */
+      font-family: 'Roboto', sans-serif; /* 设置页面默认字体为Roboto */
+
+
+      .van-divider {
+        margin-top: 5px;
+        font-weight: bold;
+        color: rgb(125, 205, 5);
+      }
+
+      .bold-row .van-col {
+        font-weight: bold;
+      }
+    }
+
   }
 }
 

+ 4 - 4
src/utils/config.js

@@ -1,16 +1,16 @@
 let baseURL;
 if (process.env.NODE_ENV === "development") {
   // stock dev
-  // baseURL = "http://120.25.151.99:49022"
+  baseURL = "http://120.25.151.99:49022"
 
-  baseURL = "https://sz.sunzee.com.cn/"
+  // baseURL = "https://sz.sunzee.com.cn/"
 } else {
+  baseURL = "http://120.25.151.99:49022"
 
-  baseURL = "https://sz.sunzee.com.cn/" // prod
+  // baseURL = "https://sz.sunzee.com.cn/" // prod
 
   // baseURL = 'https://szwl.sunzee.com.cn/' // test
 
-  // baseURL = "http://120.25.151.99:49022"
 }
 export default {
   baseURL,

+ 46 - 230
src/views/home/HomeIndex.vue

@@ -5,8 +5,8 @@
       <s-header :name="sys ? sys.title : $t('public.homePage')" :noback="true" :isFixed="false"></s-header>
       <!-- 新闻通知 -->
       <template v-if="noticeContent.title">
-        <van-notice-bar @click="noticeClk" mode="link" :scrollable="true" color="rgba(64,77,116,1)" 
-          left-icon="volume-o" :text="noticeContent.title" />
+        <van-notice-bar @click="noticeClk" mode="link" :scrollable="true" color="rgba(64,77,116,1)" left-icon="volume-o"
+          :text="noticeContent.title" />
       </template>
       <div class="intervalRow"></div>
       <div class="nameDeviceRow flex-col">
@@ -25,66 +25,40 @@
         </div>
       </div>
       <!-- 时间选择 -->
-      <date-select-list @update="update($event)"></date-select-list>
+      <!-- <date-select-list @update="update($event)"></date-select-list> -->
       <!-- 类型选择 -->
       <!-- <typeSelectList v-if="showDataDiv" :isHome="true" @upselectdata="upselectdata($event)"></typeSelectList> -->
 
-      <div class="o-plr-8 o-pt-10">
+      <!-- <div class="o-plr-8 o-pt-10">
         <div class="outer5 flex-col" @click="pushOrderCenter">
-          <!-- 收入总额,销售量,订单数 -->
+          // 收入总额,销售量,订单数
         </div>
-      </div>
+      </div> -->
       <!-- 时间范围 -->
       <div class="c-text-c c-text-18">
-        {{ Format_time(dateSelect.startDate, 'YYYY-MM-DD') }}--{{ Format_time(dateSelect.endDate, 'YYYY-MM-DD') }}
+        月K线图
       </div>
       <!-- ECharts -->
-      <!-- <div> -->
-      <div v-if="!noData(salesVolume, salesNumber)">
+      <!-- <div v-if="!noData(salesVolume, salesNumber)"> -->
+      <div v-if="!noData(stockPrice)">
         <div ref="chartBox" class="Chart1 flex-col"></div>
       </div>
       <kNoData v-else></kNoData>
 
-
-
-    </div>
-
-
-    <!-- 买卖榜单 -->
-    <!-- <div class="homeBox">
-      买家Top5
-      <div class="titleBox flex-col">
-        <div class="layer2 l-flex-RC">
-          <div class="section5 flex-col"></div>
-          <div class="TextGroup2 flex-col">
-            <span class="txt4">买卖榜单</span>
+      <!-- 买卖排行榜 -->
+      <div class="outer9 flex-col justify-center">
+        <div class="main24 flex-col justify-between">
+          <div class="ImageText10 flex-col">
+            <div class="wrap2 flex-row justify-between">
+              <div class="outer10 flex-col"></div>
+              <div class="TextGroup13 flex-col">
+                <span class="txt13">买卖排行榜</span>
+              </div>
+            </div>
           </div>
         </div>
       </div>
-
-      下拉排序菜单
-      <van-dropdown-menu>
-        <van-dropdown-item v-model="value1" :options="option1" />
-        <van-dropdown-item v-model="value2" :options="option2" />
-        <van-dropdown-item v-model="value3" :options="option3" />
-      </van-dropdown-menu>
-
-      买单前五
-      <van-cell-group inset style="background-color: antiquewhite;">
-        <van-grid direction="horizontal" :column-num="3" :gutter="1" :border="false" row-gap="1px">
-          <van-grid-item icon="contact-o" text="买家Top5" />
-          <van-grid-item icon="points" text="购买数量" />
-          <van-grid-item icon="refund-o" text="购买数量" />
-
-          <van-grid-item text="王" />
-          <van-grid-item text="200" />
-          <van-grid-item text="11" />
-          <van-grid-item text="李" />
-          <van-grid-item text="300" />
-          <van-grid-item text="12" />
-        </van-grid>
-      </van-cell-group>
-    </div> -->
+    </div>
 
     <div class="top5-box">
       <div class="buy-box">
@@ -140,77 +114,31 @@ import kNoData from "../../components/commom/kNoData/index.vue";
 import kDialog from "../../components/commom/kDialog/index.vue";
 import { onMounted, ref, nextTick } from "vue";
 import sHeader from "@/components/SimpleHeader";
-// import navBar from "../../components/NavBar";
-// import dateSelectList from "@/components/dateSelectList";
-import dateSelectList from "@/components/date-select-list";
-// import typeSelectList from "../../components/typeSelectList";
 import { getLoginUser, Format_time, styleUrl } from "@/common/js/utils";
 import {
-  getStatistics,
+  getListStockInfoForMonth,
   Api_getNotice,
-  // Api_postMachineNum,
   Api_getUpdateNotice,
-  getIsAlarm,
 } from "../../service/home";
-import dateUtil from "../../utils/dateUtil";
-import { useI18n } from "vue-i18n";
 import { showToast } from "vant";
 import RobotIcon from '@/assets/home/robot.png';
-// import { getLocal } from "@/common/js/utils";
 
 export default {
   name: "home",
   components: {
     sHeader,
-    // navBar,
-    dateSelectList,
-    // typeSelectList,
     kDialog,
     kNoData,
-    // [Popup.name]: Popup,
   },
   setup() {
-    const value1 = ref(0);
-    const value2 = ref('a');
-    const value3 = ref('a');
-    const option1 = [
-      { text: '全部', value: 0 },
-      { text: '买家', value: 1 },
-      { text: '卖家', value: 2 },
-    ];
-    const option2 = [
-      { text: '交易数量', value: 'a' },
-      { text: '从少到多', value: 'b' },
-      { text: '从多到少', value: 'c' },
-    ];
-    const option3 = [
-      { text: '每股单价', value: 'a' },
-      { text: '从低到高', value: 'b' },
-      { text: '从高到低', value: 'c' },
-    ];
 
-    // const test = () => {
-    //   DateSelectList,
-    // }; // const test = () => {
-    //   DateSelectList,
-    // };
-    // 设备状况
-    const equipStatus = ref({});
-    // 获取设备情况
-    // const getMachineNum = () => {
-    //   Api_postMachineNum({ adminId: user.id }).then((res) => {
-    //     equipStatus.value = res.data.data || {};
-    //   });
-    // };
     const noticeContent = ref({});
     // 获取公告
     const getNotice = () => {
       Api_getNotice({ adminId: user.id }).then((res) => {
-        // console.log("res", res);
         noticeContent.value = res.data.data || {};
       });
     };
-    const { t } = useI18n();
     // 通知弹窗
     const kDialogRef = ref(null);
     // 点击通知栏
@@ -235,8 +163,6 @@ export default {
     const sys = ref(null);
     const pic1 = ref([
       { url: 'https://fastly.jsdelivr.net/npm/@vant/assets/apple-3.jpeg', isImage: true },
-      // Uploader 根据文件后缀来判断是否为图片文件
-      // 如果图片 URL 中不包含类型信息,可以添加 isImage 标记来声明
     ]);
 
 
@@ -244,71 +170,16 @@ export default {
     const chartBox = ref();
     let chartObj = null;
 
-    const dateSelect = ref({});
-    const update = (uDate) => {
-      dateSelect.value = uDate;
-      getStatisticsFun();
-    };
-    let typeSelectData = {};
-    const upselectdata = (uSData) => {
-      typeSelectData = uSData;
-      getStatisticsFun();
-    };
-    const salesVolume = ref(0);
-    const salesNumber = ref(0);
-    const orderNumber = ref(0);
+    const stockPrice = ref(0);
     // 查询图表
-    const getStatisticsFun = async () => {
-      const params = {
-        ...dateSelect.value,
-        // ...typeSelectData,
-        adminId: user.id,
-        ifForeign: typeSelectData.ifForeign === '' ? user.ifForeign : typeSelectData.ifForeign,
-        payType: typeSelectData.payType,
-        clientId: typeSelectData.clientId,
-        username: typeSelectData.userName, // 商家
-        companyType: typeSelectData.companyType, // 公司平台
-        machineType: typeSelectData.machineType, // 设备类型
-        equipmentId:
-          typeSelectData.equipmentId === "" ? null : typeSelectData.equipmentId,
-      };
-      const { data } = await getStatistics(params);
-      if (data.code && data.data) {
-        salesVolume.value = 0;
-        salesNumber.value = 0;
-        orderNumber.value = 0;
+    const getListStockInfoForMonthFun = async () => {
+      const { data } = await getListStockInfoForMonth();
+      if (data.code === '00000' && data.data) {
+        stockPrice.value = 0;
         data.data.series[0].data.forEach((item) => {
-          salesNumber.value = parseInt(salesNumber.value + item);
+          stockPrice.value = parseInt(stockPrice.value + item);
         });
-        data.data.series[1].data.forEach((item) => {
-          salesVolume.value = parseFloat(salesVolume.value) + parseFloat(item);
-        });
-        data.data.series[2].data.forEach((item) => {
-          orderNumber.value = parseInt(orderNumber.value + item);
-        });
-        data.data.categories.forEach((item, index) => {
-          if (item == "周1") {
-            data.data.categories[index] = t("home.week.mon");
-          }
-          if (item == "周2") {
-            data.data.categories[index] = t("home.week.tue");
-          }
-          if (item == "周3") {
-            data.data.categories[index] = t("home.week.wed");
-          }
-          if (item == "周4") {
-            data.data.categories[index] = t("home.week.thu");
-          }
-          if (item == "周5") {
-            data.data.categories[index] = t("home.week.fri");
-          }
-          if (item == "周6") {
-            data.data.categories[index] = t("home.week.sat");
-          }
-          if (item == "周日") {
-            data.data.categories[index] = t("home.week.sun");
-          }
-        })
+
         // 解决eacharts与v-if的渲染问题
         await nextTick();
         if (chartBox.value) {
@@ -335,6 +206,8 @@ export default {
               itemWidth: 10,
               itemHeight: 10,
               icon: "rect",
+              orient: 'vertical',
+              top: 20,
             },
             // 固定屏幕显示多少个,其余的滑动
             dataZoom: [
@@ -360,23 +233,10 @@ export default {
             series: [
               {
                 ...data.data.series[0],
-                // type: "bar", // 柱状图
-                type: "line", // 折线图
+                type: "line", // line折线图,bar柱状图
                 smooth: true, // 针对折线图,平滑曲线
                 itemStyle: { color: "#39a6fe" },
-                name: "股票价格",
-                label: {
-                  show: true,
-                  position: "top",
-                },
-              },
-              {
-                ...data.data.series[1],
-                // type: "bar", // 柱状图
-                type: "line", // 折线图
-                smooth: true, // 针对折线图,平滑曲线
-                itemStyle: { color: "#FF3456" },
-                name: "交易量",
+                name: "股价¥",
                 label: {
                   show: true,
                   position: "top",
@@ -396,52 +256,21 @@ export default {
       }
     };
     const pushToolList = ref([]);
-    // 是否有报警
-    const showAlarm = ref(false);
-    const alarmList = ref([]);
+
     // 页面初始化
     onMounted(async () => {
       // 加载样式
       styleUrl('home');
-      if (localStorage.getItem("loginSys")) {
-        const loginSysString = localStorage.getItem("loginSys");
-        sys.value = JSON.parse(loginSysString);
-      }
+      // if (localStorage.getItem("loginSys")) {
+      //   const loginSysString = localStorage.getItem("loginSys");
+      //   sys.value = JSON.parse(loginSysString);
+      // }
       firstLogin.value = localStorage.getItem('firstLogin');
-      dateSelect.value = {
-        chartType: "day",
-        startDate: dateUtil.formateDate(
-          new Date(new Date(new Date().getTime()).setHours(0, 0, 0, 0)),
-          "yyyy-MM-dd hh:mm:ss"
-        ),
-        endDate: dateUtil.formateDate(
-          new Date(new Date(new Date().getTime()).setHours(23, 59, 59, 59)),
-          "yyyy-MM-dd hh:mm:ss"
-        ),
-      };
-      typeSelectData = {
-        userName: user.username,
-        clientId: null,
-      };
-      getStatisticsFun();
+
+      // 获取月度曲线
+      getListStockInfoForMonthFun();
       // 获取首页公告
       getNotice();
-      // 获取设备情况
-      // getMachineNum();
-      if (user.type > 1) {
-        // 查询设备是否有报警
-        const queryParams = {
-          adminId: user.id,
-          todayDate: dateUtil.formateDate(new Date(), "yyyy-MM-dd"), // 当天时间
-        };
-        const { data } = await getIsAlarm(queryParams);
-        if (data.data != null) {
-          if (firstLogin.value == 'true') {
-            showAlarm.value = true;
-          }
-          alarmList.value = data.data;
-        }
-      }
 
     });
 
@@ -452,12 +281,13 @@ export default {
     const showDataDiv = ref(false);
 
     // 如果是空数据
-    const noData = (volumes, nums) => {
-      if (!volumes && !nums) {
+    const noData = (stockPrice) => {
+      if (!stockPrice) {
         return true;
       }
       return false;
     };
+
     // 显示logo
     const showLogo = (url) => {
       return require(`../../assets/home/${url}.png`);
@@ -465,36 +295,22 @@ export default {
 
     return {
       userName,
-      update,
-      upselectdata,
       chartBox,
       pushToolList,
-      salesVolume,
-      salesNumber,
-      orderNumber,
+      stockPrice,
       sys,
       noticeClk,
       confirmClk,
       kDialogRef,
       noData,
-      equipStatus,
       noticeContent,
       showLogo,
-      dateSelect,
       Format_time,
       showDataDiv,
       firstLogin,
       pic1,
-      showAlarm,
-      alarmList,
       confirmAlarm,
       robotIcon: RobotIcon,
-      value1,
-      value2,
-      value3,
-      option1,
-      option2,
-      option3,
 
       top5List: [
         { name: '张三', amount: 100, price: 50 },
@@ -510,6 +326,6 @@ export default {
 </script>
 
 <style lang="less" scoped>
-@import "@/common/style/common";
-@import "@/styles/home/homeRank5";
+@import "../../common/style/common";
+@import "../../styles/home/homeRank5";
 </style>

+ 25 - 33
src/views/login/LoginIndex.vue

@@ -11,10 +11,8 @@
     </div>
     <div class="loginFormBox">
       <van-form @submit="onSubmit">
-        <van-field v-model="userName" name="userName" label="" :placeholder="$t('login.userNameInput')"
-          :rules="[{ required: true, message: $t('login.userNameInput') }]" />
-        <!-- <van-field v-model="userPhone" name="userPhone" label="" placeholder="请输入手机号"
-          :rules="[{ required: true, message: '请输入手机号' }]" /> -->
+        <van-field v-model="userPhone" name="userPhone" label="" placeholder="请输入手机号"
+          :rules="[{ required: true, message: '请输入手机号' }]" />
         <van-field v-model="userPwd" type="password" name="userPwd" label="" :placeholder="$t('login.passWordInput')"
           :rules="[{ required: true, message: $t('login.passWordInput') }]" />
         <div class="checkedPasswordBox">
@@ -49,7 +47,8 @@
 import md5 from "js-md5";
 import { onMounted, ref, computed, reactive } from "vue";
 import { showSuccessToast, showFailToast, Dialog, Button } from "vant";
-import { login, getSys } from "@/service/login";
+// import { login, getSys } from "@/service/login";
+import { login } from "@/service/login";
 import { setLocal, styleUrl } from "@/common/js/utils";
 import sHeader from "@/components/SimpleHeader";
 import { useRoute, useRouter } from "vue-router";
@@ -59,8 +58,7 @@ export default {
   setup() {
     const { t } = useI18n();
     const checked = ref(false); // 是否记住密码状态
-    const userName = ref("");
-    // const userPhone = ref('');
+    const userPhone = ref('');
     const userPwd = ref("");
     const router = useRouter();
     const route = useRoute();
@@ -70,49 +68,44 @@ export default {
       // 加载样式
       styleUrl('login');
       if (route.query.relation_admin_id) {
-        getSysFun();
+        // getSysFun();
       }
       const savedCredentials = localStorage.getItem('savedCredentials');
       if (savedCredentials) {
         checked.value = true;
-        const { savedUsername, savedPassword } = JSON.parse(savedCredentials);
-        // const { savedUserPhone, savedPassword } = JSON.parse(savedCredentials);
-        userName.value = savedUsername;
-        // userPhone.value = savedUserPhone;
+        const { savedUserPhone, savedPassword } = JSON.parse(savedCredentials);
+        userPhone.value = savedUserPhone;
         userPwd.value = savedPassword;
       }
 
     });
-    const getSysFun = async () => {
-      const { data } = await getSys({
-        relationAdminId: route.query.relation_admin_id,
-      });
-      if (data.code === "00000") {
-        data.data.relationAdminId = route.query.relation_admin_id;
-        setLocal("loginSys", JSON.stringify(data.data));
-        sys.value = data.data;
-      }
-    };
+
+    // const getSysFun = async () => {
+    //   const { data } = await getSys({
+    //     relationAdminId: route.query.relation_admin_id,
+    //   });
+    //   if (data.code === "00000") {
+    //     data.data.relationAdminId = route.query.relation_admin_id;
+    //     setLocal("loginSys", JSON.stringify(data.data));
+    //     sys.value = data.data;
+    //   }
+    // };
 
     const showPopover = ref(false);
 
     // 登录
     const onSubmit = async (values) => {
-      const { data } = await login({
-        username: values.userName,
+      let loginParam = {
+        phone: values.userPhone,
         password: md5(values.userPwd),
-        hostName: 'Sunzee',
-      });
-      // const { data } = await login({
-      //   phone: values.userPhone,
-      //   password: md5(values.userPwd),
-      // });
+      }
+      const { data } = await login(loginParam);
+      
       console.log("记住密码?", checked.value);
       console.log("data.code", data.code);
       if (data.code === "00000") {
         setLocal("loginUser", JSON.stringify(data.data));
         if (checked.value) {
-          // const savedCredentials = JSON.stringify({ savedUsername: values.userName, savedPassword: values.userPwd });
           const savedCredentials = JSON.stringify({ savedUserPhone: values.userPhone, savedPassword: values.userPwd });
           localStorage.setItem('savedCredentials', savedCredentials);
         } else {
@@ -155,8 +148,7 @@ export default {
 
     return {
       checked,
-      userName,
-      // userPhone,
+      userPhone,
       userPwd,
       onSubmit,
       registerClick,

+ 2 - 37
src/views/role/index.vue

@@ -74,44 +74,18 @@ import { getSysRoleAdminList, deleteSysRole } from '../../service/role/index';
 import { showFailToast } from "vant";
 import { getLoginUser, styleUrl } from "@/common/js/utils";
 import { useRouter } from "vue-router";
-import { useI18n } from 'vue-i18n';
 
 export default {
   name: "role",
   components: { sHeader },
   setup() {
     // 引入语言
-    const { t } = useI18n();
     const user = getLoginUser();
     const router = useRouter();
     const searchRef = ref(null);
     const accountPerList = ref([]); // 列表集合
     const operCheckShow = ref(false);
-    const menuCodeList = [
-      { label: t('role.tradingManagement'), value: 'M1' }, //设备管理
-      { label: t('role.tradingView'), value: 'M2' },
-      // { label: t('role.distributionSettings'), value: 'M3' }, //分销设置
-      { label: t('role.accountOperation'), value: 'M3' }, //账户操作
-      // { label: t('role.alarmHistory'), value: 'M4' },
-      { label: t('role.orderData'), value: 'M4' }, //订单数据
-      { label: t('role.advertisingManagement'), value: 'M5' }, //广告管理
-      { label: t('role.taskMessage'), value: 'M6' }, //任务消息
-      { label: t('role.discountCode'), value: 'M7' }, //优惠码
-      { label: t('role.accountPermission'), value: 'M8' }, //账号权限
-      { label: t('role.orderExport'), value: 'M9' }, //订单导出
-      { label: t('role.shandeSubLedger'), value: 'M10' }, //杉德分账
-      { label: t('role.salesRanking'), value: 'M11' }, //销售排行
-      { label: t('role.withdrawalAccountNo'), value: 'M12' }, //提现账号
-      { label: t('role.standbyWithdrawalAccountNo'), value: 'M13' }, //备用提现账号
-      { label: t('role.dataOverview'), value: 'M14' }, //数据概览
-      // { label: t('role.orderData'), value: 'M15' },
-      { label: t('role.alarmHistory'), value: 'M15' }, //报警历史
-      { label: t('role.orderRefund'), value: 'M16' }, //订单退款
-      { label: t('role.systemOffline'), value: 'M17' }, //系统脱机
-      { label: t('role.labelMan'), value: 'M18' }, //标签管理
-      { label: t('role.apkMan'), value: 'M19' } //apk管理
-      // { label: t('role.merchantMan'), value: 'M20' } //商户管理
-    ];
+    
     let searchParams = reactive({ adminId: user.id });
     // 初始化页面获取列表
     onMounted(async () => {
@@ -143,10 +117,7 @@ export default {
         console.log(accountPerList.value);
       } else { showFailToast(data.message); }
     };
-    const showRole = (name) => {
-      const menuCode = menuCodeList.filter(item => item.value === name);
-      return (menuCode.length > 0) ? menuCode[0].label : name;
-    }
+    
     let deleteRoleId = '';
     const roleDelete = (item) => { console.log('roleDelete', item.roleId); deleteRoleId = item.roleId; operCheckShow.value = true; }
     const operCheckClear = () => { operCheckShow.value = false; }
@@ -159,10 +130,6 @@ export default {
     }
     const roleEdit = async (item) => { localStorage.setItem('roleItem', JSON.stringify(item)); router.push('/roleSet'); };
 
-    // // 回到上一页 账号权限页
-    // const onClickLeft = () => {
-    //   router.push('/accountPer');
-    // };
 
     return {
       searchRef,
@@ -170,14 +137,12 @@ export default {
       pushAdd,
       search,
       accountPerList,
-      showRole,
       roleDelete,
       operCheckShow,
       operCheckClear,
       operCheck,
       roleEdit,
       ...toRefs(searchParams),
-      // onClickLeft,
     };
   },
 };

+ 86 - 23
src/views/taskMessage/TaskAccount.vue

@@ -1,16 +1,23 @@
 <script setup>
 import sHeader from "@/components/SimpleHeader";
-import { updateUserInfo } from "@/service/taskAccount";
-import { ref } from "vue";
+import { auditUserApply } from "@/service/taskAccount";
+import { ref, onMounted, onBeforeUnmount } from "vue";
 import { showToast, showFailToast } from "vant";
+import { useUserStore } from '@/stores/user';
+import { useRouter } from 'vue-router'
 
-const actualName = ref('');
+const userName = ref('');
 const phone = ref('');
 const identityCard = ref('');
 const payeeCode = ref('');
 const allowMaximum = ref('');
+const cardNo = ref('');
+const buyPriorityRank = ref(''); // 买卖优先级/奋斗贡献值
+
+const applyId = ref('');
+const userStore = useUserStore();
+const router = useRouter();
 
-const buyPriorityRank = ref('');
 const showPicker = ref(false);
 const columns = [
   { text: '一级', value: '1' },
@@ -23,6 +30,16 @@ const columns = [
   { text: '八级', value: '8' },
   { text: '九级', value: '9' },
   { text: '十级', value: '10' },
+  { text: '十一级', value: '11' },
+  { text: '十二级', value: '12' },
+  { text: '十三级', value: '13' },
+  { text: '十四级', value: '14' },
+  { text: '十五级', value: '15' },
+  { text: '十六级', value: '16' },
+  { text: '十七级', value: '17' },
+  { text: '十八级', value: '18' },
+  { text: '十九级', value: '19' },
+  { text: '二十级', value: '20' },
 ]
 
 const onConfirm = ({ selectedOptions }) => {
@@ -30,25 +47,70 @@ const onConfirm = ({ selectedOptions }) => {
   showPicker.value = false;
 };
 
-// const loginUser = localStorage.getItem('loginUser');
-// const loginUserInfo = JSON.parse(loginUser);
-// const modUsername = ref(loginUserInfo.username);
 
-// 提交表单
-const onSubmit = async () => {
+onMounted(() => {
+  if (userStore.userInfo) {
+    userName.value = userStore.userInfo.userName;
+    phone.value = userStore.userInfo.phone;
+    identityCard.value = userStore.userInfo.identityCard;
+    payeeCode.value = userStore.userInfo.payeeCode;
+    cardNo.value = userStore.userInfo.cardNo;
+    applyId.value = userStore.userInfo.id;
+  }
+});
+
+// 当组件卸载时清除用户信息
+onBeforeUnmount(() => {
+  userStore.clearUserInfo();
+});
+
+// 拒绝
+const rejectApply = async () => {
+  const userCheck = {
+    userName: userName.value,
+    phone: phone.value,
+    identityCard: identityCard.value,
+    payeeCode: payeeCode.value,
+    cardNo: cardNo.value,
+    applyId: applyId.value,
+    pass: false
+  }
+  const { data } = await auditUserApply(userCheck);
+
+  if (data.code === "00000") {
+    showToast("已拒绝");
+    router.go(-1)
+  } else {
+    showFailToast(data.message);
+  }
+}
+
+// 同意
+const approveApply = async () => {
+
+  if (!buyPriorityRank.value || !allowMaximum.value) {
+    showFailToast('最大额度和奋斗值是必填项');
+    return;
+  }
+
   const userCheck = {
-    actualName: actualName.value,
+    userName: userName.value,
     phone: phone.value,
     identityCard: identityCard.value,
     payeeCode: payeeCode.value,
+    cardNo: cardNo.value,
     allowMaximum: allowMaximum.value,
+    level: buyPriorityRank.value,
+    applyId: applyId.value,
+    pass: true
   }
-  const { data } = await updateUserInfo(userCheck);
+  const { data } = await auditUserApply(userCheck);
 
   if (data.code === "00000") {
     // 成功
     // ElMessage.success("保存成功");
-    showToast(data.data);
+    showToast("已同意");
+    router.go(-1)
   } else {
     showFailToast(data.message);
   }
@@ -61,16 +123,18 @@ const onSubmit = async () => {
   <div class="fife" style="background-color:#ebedf0">
     <s-header :name="'用户信息审批'" :noback="false"></s-header>
     <br>
-    <van-form @submit="onSubmit">
+    <van-form>
       <van-cell-group inset>
-        <van-field v-model="actualName" readonly name="真实姓名" label="真实姓名" placeholder="真实姓名" left-icon="smile-o" />
+        <van-field v-model="userName" readonly name="用户名" label="用户名" placeholder="用户名" left-icon="smile-o" />
         <van-field v-model="phone" readonly name="手机号码" label="手机号码" placeholder="手机号码" left-icon="phone-o"
           :rules="[{ required: true, message: '手机号码不能为空' }]" />
-        <van-field v-model="identityCard" readonly name="身份证号" label="身份证号" placeholder="身份证号" left-icon="idcard" />
-        <van-field v-model="payeeCode" readonly name="收款账号" label="收款账号" placeholder="收款账号" left-icon="certificate"
-          :rules="[{ required: true, message: '收款账号不能为空' }]" />
-        <van-field v-model="buyPriorityRank" is-link readonly name="picker" label="买卖优先级" placeholder="点击选择买卖优先级"
-          left-icon="diamond-o" :rules="[{ required: true, message: '买卖优先级不能为空' }]" @click="showPicker = true" />
+        <van-field v-model="identityCard" readonly name="身份证号" label="身份证号" placeholder="身份证号" left-icon="contact-o" />
+        <van-field v-model="payeeCode" readonly name="支付宝号" label="支付宝号" placeholder="支付宝号" left-icon="certificate"
+          :rules="[{ required: true, message: '支付宝号不能为空' }]" />
+        <van-field v-model="cardNo" readonly name="银行卡号" label="银行卡号" placeholder="银行卡号" left-icon="debit-pay"
+          :rules="[{ required: true, message: '银行卡号不能为空' }]" />
+        <van-field v-model="buyPriorityRank" is-link readonly name="picker" label="奋斗贡献值" placeholder="点击选择买卖优先级"
+          left-icon="diamond-o" :rules="[{ required: true, message: '奋斗贡献值不能为空' }]" @click="showPicker = true" />
         <van-popup v-model:show="showPicker" position="bottom">
           <van-picker :columns="columns" @confirm="onConfirm" @cancel="showPicker = false" />
         </van-popup>
@@ -78,10 +142,9 @@ const onSubmit = async () => {
           :rules="[{ required: true, message: '最大额度不能为空' }]" />
 
       </van-cell-group>
-      <div style="margin: 16px; display: flex; justify-content: center; align-items: center;">
-        <van-button round class="custom-button" type="primary" size="small" native-type="submit" block>
-          通过
-        </van-button>
+      <div style="margin: 20px 30px; display: flex; justify-content: center; align-items: center; gap: 50px;">
+        <van-button round class="custom-button" type="danger" size="small" @click="rejectApply" block>拒绝</van-button>
+        <van-button round class="custom-button" type="success" size="small" @click="approveApply" block>通过</van-button>
       </div>
     </van-form>
 

+ 217 - 136
src/views/taskMessage/TaskAccountList.vue

@@ -1,174 +1,255 @@
 <template>
-    <div class="taskAccountList">
+    <!-- 新人账号申请列表 -->
+    <div class="taskAccountList flex-col">
         <s-header name="账号申请列表" :noback="false"></s-header>
 
-        <div class="headCon l-flex-between o-plr-20 o-pt-26 o-pb-12 kBordBott">
-            <div class="l-flex-RC">
-                <div class="ruleIcon"></div>
-                <div class="c-text-color c-text-b c-text-15">
-                    共
-                    <span class="c-text-20" style="color: #df5e4c">{{ patchTotal }}</span>
-                    条记录
+        <div class="taskAccountBox flex-col">
+            <van-list v-model:loading="loading" v-model:error="error" :error-text="$t('common.reqFailClkReload')"
+                :finished="finished" :finished-text="$t('common.noMoreTxt')" 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">
+                            <div class="flex-col outer4 proportionIcon"></div>
+                            <span class="flex-col txt2">{{ $t("taskMessage.total")
+                                }}<span class="discountNumber">{{ userApplyTotal }}</span>{{
+                                    $t("taskMessage.recordsInTotal") }}</span>
+                        </div>
+                    </div>
+                    <!-- <div class="l-flex-RC"> -->
+                    <!-- <div @click="reviewedClk" class="label3 o-mr-30">
+                        {{ $t("taskMessage.toViewAppro") }}
+                    </div> -->
+                    <!-- </div> -->
                 </div>
-            </div>
-        </div>
-
-        <div class="contentCon">
-            <van-pull-refresh disabled v-model="refreshing" @refresh="onRefresh">
-                <div v-for="(item, index) in tableData" :key="index">
-                    <br />
-                    <van-cell-group inset @click="toSetupAccount(item)">
-                        <van-cell>
-                            <template #title>
-                                <div class="l-flex-RC">
-                                    <span class="c-color c-text-12">姓名:</span>
-                                    <span class="c-text-color c-text-12">{{ item.actualName }}</span>
-                                </div>
-                            </template>
-                            <template #label>
-                                <div class="l-flex-RC">
-                                    <span class="c-color c-text-12">手机号:</span>
-                                    <span class="c-text-color c-text-12">{{ item.phone }}</span>
-                                </div>
-                                <div class="l-flex-RC">
-                                    <span class="c-color c-text-12">支付宝账号:</span>
-                                    <span class="c-text-color c-text-12">{{ item.payeeCode }}</span>
-                                </div>
-                                <div class="l-flex-RC">
-                                    <span class="c-color c-text-12">部门号:</span>
-                                    <span class="c-text-color c-text-12">{{ getDeptName(item.deptId) }}</span>
-                                </div>
-                                <div class="l-flex-RC">
-                                    <span class="c-color c-text-12">申请时间:</span>
-                                    <span class="c-text-color c-text-12">{{ Format_time(item.createTime) }}</span>
-                                </div>
-                                <!-- 审核状态 status:0 申请/待审核,1 通过✓,2 拒绝x -->
-                                <div class="itemRow" style="display: flex; justify-content: flex-end">
-                                    <span v-if="item.status === '0' && user.type > 1" style="color: #FFA500"> {{
-            $t('taskMessage.toBeApproved') }}</span>
-                                    <span v-if="item.status === '1'" style="color: #1989fa"> {{
-            $t('taskMessage.adopt') }}</span>
-                                    <span v-if="item.status === '2'" style="color: #ff0000"> {{
-                                        $t('taskMessage.fail') }}</span>
-                                </div>
-
-                            </template>
-                            <br />
-
-                        </van-cell>
-                    </van-cell-group>
+                <div class="listBox">
+                    <div v-for="(item, index) in userApplyList" :key="index" class="listItem">
+                        <div class="itemBox">
+                            <div class="itemRow">
+                                <span class="itemTitle">用户名:&nbsp;</span>{{
+                                    item.userName }}
+                            </div>
+                            <div class="itemRow">
+                                <span class="itemTitle">部门岗位:&nbsp;</span>{{
+                                    item.deptName }}-{{ item.jobName }}
+                            </div>
+                            <div class="itemRow">
+                                <span class="itemTitle">手机号:&nbsp;</span>{{
+                                    item.phone }}
+                            </div>
+                            <!-- 申请时间 -->
+                            <div class="itemRow">
+                                <span class="itemTitle">{{ $t("taskMessage.applicationTime") }}:&nbsp;</span>{{
+                                    showDateTime(item.applyTime) }}
+                            </div>
+                            <!-- 状态:0red待审批,消失,去审批》 -->
+                            <div class="itemRow" v-if="item.status === '0'">
+                                <span class="itemTitle">状态:&nbsp;</span><span style="color: red">{{
+                                    showItemType(item.status)
+                                }}</span>
+                            </div>
+                            <!-- 审批时间 -->
+                            <div class="itemRow" v-if="item.status !== '0'">
+                                <span class="itemTitle">{{ $t("taskMessage.approvalTime") }}:&nbsp;</span>{{
+                                    showDateTime(item.modifyDate)
+                                }}
+                            </div>
+                            <!-- 去审批 -->
+                            <div v-if="item.status === '0' && isOper" class="itemRow"
+                                style="display: flex; justify-content: flex-end">
+                                <van-button span="5" round type="primary" :style="{
+                                    height: '2em',
+                                    padding: '0 1.2em',
+                                    margin: '0 1em',
+                                    backgroundColor: 'rgb(200, 55, 95 / 80%)', // 红色背景,不透明度为100%
+                                    color: '#fff', // 文字颜色为白色
+                                    boxShadow: '0 2px 8px rgba(255, 55, 95, 0.3)', // 添加阴影效果
+                                    transition: 'all 0.3s ease' // 添加过渡效果,使变化更平滑
+                                }" @click="toTaskAccount(item)">
+                                    审核
+                                </van-button>
+                            </div>
+                            <div class="itemRow" style="display: flex; justify-content: flex-end">
+                                <!-- 已拒绝 -->
+                                <span v-if="item.status === '2'" style="color: #ff0000">{{
+                                    showItemType(item.status)
+                                    }}</span>
+                                <!-- 已同意 -->
+                                <span v-if="item.status === '1'" style="color: #4fc08d">{{
+                                    showItemType(item.status)
+                                    }}</span>
+                            </div>
+                        </div>
+                    </div>
                 </div>
-
-            </van-pull-refresh>
+            </van-list>
         </div>
 
-
     </div>
 </template>
 
 <script>
+import { onMounted, reactive, ref } from "vue";
 import sHeader from "@/components/SimpleHeader";
-import { ref, onMounted, toRefs, reactive } from "vue";
-import { styleUrl } from "../../common/js/utils";
-import { useRouter } from "vue-router";
 import { getPageUserApply } from "@/service/taskAccount";
-import { Format_time } from "@/common/js/utils";
+import { showFailToast } from "vant";
+import { getLoginUser, styleUrl } from "@/common/js/utils";
+import dateUtil from "@/utils/dateUtil";
+import { useI18n } from "vue-i18n";
+import { useRouter } from 'vue-router'
+import { useUserStore } from '@/stores/user';
 
 export default {
     components: { sHeader },
     setup() {
-
-        onMounted(() => {
-            // 加载样式
-            styleUrl('taskAccount');
-            onRefresh();
+        const { t } = useI18n();
+        const router = useRouter()
+        // 筛选弹窗
+        const busiPopList = reactive([
+            {
+                name: t("taskMessage.toBeApproved"),
+                id: "0",
+            },
+            {
+                name: t("taskMessage.rejected"),
+                id: "2",
+            },
+            {
+                name: t("taskMessage.agreed"),
+                id: "1",
+            },
+        ]);
+        const busiPopFieldName = reactive({
+            text: "name",
+            value: "id",
         });
+        const kDialogRef = ref(null);
+        const busiPopShow = ref(false);
 
-        // 多少条规则
-        const patchTotal = ref(0);
-        // 分页
-        const pageNo = ref(1);
-        const pageSize = ref(10);
-        let ruleData = reactive({
-            tableData: [],
+        // 点击查询按钮
+        const confirmClk = () => {
+            isClkReview.value = false;
+            searchGetList();
+        };
+        // 是否点击待审核
+        const isClkReview = ref(true);
+        // 点击查看待审核
+        // const reviewedClk = () => {
+        //     isClkReview.value = true;
+        //     searchParams.statusType = "1";
+
+        //     searchGetList();
+        // };
+        const user = getLoginUser();
+        const loading = ref(false); // 加载状态
+        const error = ref(false); // 错误状态
+        const finished = ref(false); // 结束翻页状态
+        const userApplyList = ref([]); // 列表集合
+        const userApplyTotal = ref(0); // 列表总数
+        let searchParams = reactive({
+            current: 1, // 当前页,默认第一页
+            size: 10, // 页大小,默认10条
         });
-        // 上拉刷新
-        const loading = ref(true);
-        const finished = ref(false);
-        // 下拉刷新
-        const onRefresh = (idx) => {
-            ruleData.tableData = [];
-            // 解决请求两次问题
-            if (!idx) {
-                finished.value = false;
+        // name: "", // 用户userName
+        // status: "", // 审核状态 0 申请中,1通过,2拒绝
+        // 滚动加载
+        const onLoad = () => {
+            if (!finished.value) {
+                searchParams.current = searchParams.current + 1;
+                getList();
             }
-            loading.value = true;
-            // 初始化分页
-            pageNo.value = 1;
-            pageSize.value = 10;
-            getList();
         };
-
-        // 上拉加载
-        const onLoad = () => {
-            pageNo.value++;
+        // 查询列表
+        const searchGetList = () => {
+            userApplyList.value = [];
+            searchParams.current = 1;
             getList();
         };
-        // 下拉刷新
-        const refreshing = ref(false);
-        const getList = () => {
-            let param = {
-                current: pageNo.value,
-                size: pageSize.value,
-            };
-            getPageUserApply(param).then((res) => {
-                const { data } = res.data;
-                refreshing.value = false;
-                ruleData.tableData.push(...data.records);
-                // 加载状态结束
-                loading.value = false;
-                // 总共
-                patchTotal.value = data.total;
-                if (ruleData.tableData.length >= data.total) {
+        // 获取新人账号注册审批列表数据
+        const getList = async () => {
+
+            const { data } = await getPageUserApply(
+                Object.assign({}, searchParams)
+            );
+            if (data.code === "00000") {
+                // 列表值叠加
+                userApplyList.value = userApplyList.value.concat(
+                    data.data.records
+                );
+                userApplyTotal.value = data.data.total;
+                if (userApplyList.value.length === data.data.total) {
                     finished.value = true;
                 }
-            });
+                loading.value = false;
+            } else {
+                showFailToast(data.message);
+            }
         };
 
+        const showDateTime = (date) => {
+            return date
+                ? dateUtil.formateDate(new Date(date), "yyyy-MM-dd hh:mm:ss")
+                : "";
+        };
 
-        // 获取部门名称
-        // const getDeptName = computed(() => {
-        //     const deptId = {
-        //         '0': '研发部',
-        //         '1': '行政部',
-        //     };
-        //     return (item) => deptId[item.deptId] || '';
-        // })
-
-        const router = useRouter();
+        const showItemType = (type) => {
+            if (type === '0') {
+                return t("taskMessage.toBeApproved");
+            }
+            if (type === '2') {
+                return t("taskMessage.rejected");
+            }
+            if (type === '1') {
+                return t("taskMessage.agreed");
+            }
+            return "";
+        };
 
-        const setupAccountObj = ref({});
-        // 点击卡片,跳转对应的审核
-        const toSetupAccount = (item) => {
-            setupAccountObj.value = item;
-            router.push("/setupAccount");
-        }
+        const userStore = useUserStore();
+        // 去审核账号
+        const toTaskAccount = (item) => {
+            userStore.setUserInfo(item);
+            router.push({ name: 'taskAccount' });
+        };
 
+        // 是否有操作的权限
+        const isOper = ref(true);
+        // 初始化页面获取列表
+        onMounted(async () => {
+            // 加载样式
+            styleUrl('taskAccountList');
+            if (user) {
+                searchParams.adminId = user.id;
+                searchGetList();
+                
+                // 如果不是admin账号,不能有操作权限
+                if (user.userName != 'admin') {
+                    isOper.value = false;
+                }
+            }
+        });
         return {
-            patchTotal,
-            onRefresh,
-            onLoad,
-            getList,
             loading,
+            error,
             finished,
-            ...toRefs(ruleData),
-            refreshing,
-            // getTargetAreasText,
-            Format_time,
-            toSetupAccount
+            onLoad,
+            userApplyList,
+            userApplyTotal,
+            showDateTime,
+            showItemType,
+            toTaskAccount,
+            kDialogRef,
+            confirmClk,
+            busiPopShow,
+            busiPopList,
+            busiPopFieldName,
+            // reviewedClk,
+            isOper,
         };
-    }
+    },
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+@import "../../common/style/common.less";
+</style>

+ 6 - 34
src/views/trading/TradingIndex.vue

@@ -88,35 +88,8 @@
         </div>
       </div>
       <!-- 买家挂单详情 -->
-      <div class="buy-box" style="text-align: center;">
-        <van-row justify="center" class="bold-row" style="font-weight: bold; color: #CD5C5C;">
-          <van-col span="8">用户名</van-col>
-          <van-col span="8">交易数量</van-col>
-          <van-col span="8">单价¥</van-col>
-        </van-row>
-        <van-row justify="center">
-          <van-col span="8">王五</van-col>
-          <van-col span="8">1000</van-col>
-          <van-col span="8">11.01</van-col>
-        </van-row>
-        <van-row justify="center">
-          <van-col span="8">赵六</van-col>
-          <van-col span="8">2000</van-col>
-          <van-col span="8">11.02</van-col>
-        </van-row>
-        <van-row justify="center">
-          <van-col span="8">李四</van-col>
-          <van-col span="8">1000</van-col>
-          <van-col span="8">11.5</van-col>
-        </van-row>
-        <van-row justify="center">
-          <van-col span="8">钱七</van-col>
-          <van-col span="8">1400</van-col>
-          <van-col span="8">11.2</van-col>
-        </van-row>
-      </div>
 
-      <div class="buy-box2" style="text-align: center;">
+      <div class="buy-box" >
         <van-row justify="center" class="bold-row" style="font-weight: bold; color: #CD5C5C;">
           <van-col span="8">用户名</van-col>
           <van-col span="8">交易数量</van-col>
@@ -138,7 +111,7 @@
     <!-- 买卖按键 -->
     <div class="buySellBtn">
       <van-row justify="space-around">
-        <van-col span="6"><van-button style="font-size: 20px;" color="linear-gradient(to right, #f718dd, #f7189d)"
+        <van-col span="6"><van-button style="font-size: 20px;" color="linear-gradient(to right, #ff5ebe, #f7189d)"
             size="large" round icon="refund-o" @click="pushPageList('/tradingBuy')">买</van-button></van-col>
         <van-col span="6"><van-button style="font-size: 20px;" color="linear-gradient(to right, #18d9f7, #17aff6)"
             size="large" round icon="after-sale" @click="pushPageList('/tradingSell')">卖</van-button></van-col>
@@ -291,10 +264,10 @@ export default {
     // 初始化
     const init = () => {
       // 获取设备情况
-      if (localStorage.getItem("loginSys")) {
-        const loginSysString = localStorage.getItem("loginSys");
-        sys.value = JSON.parse(loginSysString);
-      }
+      // if (localStorage.getItem("loginSys")) {
+      //   const loginSysString = localStorage.getItem("loginSys");
+      //   sys.value = JSON.parse(loginSysString);
+      // }
       list.value = [];
       searchParams.current = 1;
       if (user) {
@@ -489,5 +462,4 @@ export default {
 
 <style lang="less" scoped>
 @import "../../common/style/common.less";
-@import "../../styles/trading/index.less";
 </style>

+ 66 - 193
src/views/user/UserIndex.vue

@@ -38,47 +38,40 @@
 
         <div class="userInfoBox">
           <!-- 手机号码 -->
-          <div>
-            <div v-if="!phoneNumberShow" class="userInfo l-flex-between">
-              <span class="userInfoLeft">{{ $t("user.phoneNumber") }}: </span>
-              <div>
-                <van-field class="relationClass" v-model="cofficentForm.phone"
-                  :placeholder="$t('user.phoneNumberPlace')">
-
-                  <template #button>
-                    <van-button type="primary" @click="mailboxChg(cofficentForm.phone, 3)">{{ $t("user.confirmLog") }}
-                    </van-button>
-                  </template>
-                </van-field>
-              </div>
-              <van-icon name="edit" class="editIcon" @click="editClk(3)" />
-            </div>
-            <div v-else class="userInfo l-flex-between">
-              <span class="userInfoLeft">{{ $t("user.phoneNumber") }}: </span>
-              <span>{{ accountDetail.phone }}</span>
-              <van-icon name="edit" class="editIcon" @click="editClk(3)" />
+          <div v-if="!phoneNumberShow" class="userInfo l-flex-between">
+            <span class="userInfoLeft">{{ $t("user.phoneNumber") }}: </span>
+            <div>
+              <van-field class="relationClass" v-model="cofficentForm.phone" :placeholder="$t('user.phoneNumberPlace')">
+                <template #button>
+                  <van-button type="primary" @click="mailboxChg(cofficentForm.phone, 1)">{{ $t("user.confirmLog") }}
+                  </van-button>
+                </template>
+              </van-field>
             </div>
+            <van-icon name="edit" class="editIcon" @click="editClk(1)" />
+          </div>
+          <div v-else class="userInfo l-flex-between">
+            <span class="userInfoLeft">{{ $t("user.phoneNumber") }}: </span>
+            <span>{{ accountDetail.phone }}</span>
+            <van-icon name="edit" class="editIcon" @click="editClk(1)" />
           </div>
           <!-- 邮箱 -->
-          <div>
-            <div v-if="!mailboxShow" class="userInfo l-flex-between">
-              <span class="userInfoLeft">{{ $t("user.mailbox") }}: </span>
-              <div>
-                <van-field class="relationClass" v-model="cofficentForm.mailBox" :placeholder="$t('user.mailboxPlace')">
-
-                  <template #button>
-                    <van-button type="primary" @click="mailboxChg(cofficentForm.mailBox, 2)">{{ $t("user.confirmLog") }}
-                    </van-button>
-                  </template>
-                </van-field>
-              </div>
-              <van-icon name="edit" class="editIcon" @click="editClk(2)" />
-            </div>
-            <div v-else class="userInfo l-flex-between">
-              <span class="userInfoLeft">{{ $t("user.mailbox") }}: </span>
-              <span>{{ accountDetail.email }}</span>
-              <van-icon name="edit" class="editIcon" @click="editClk(2)" />
+          <div v-if="!mailboxShow" class="userInfo l-flex-between">
+            <span class="userInfoLeft">{{ $t("user.mailbox") }}: </span>
+            <div>
+              <van-field class="relationClass" v-model="cofficentForm.mailBox" :placeholder="$t('user.mailboxPlace')">
+                <template #button>
+                  <van-button type="primary" @click="mailboxChg(cofficentForm.mailBox, 2)">{{ $t("user.confirmLog") }}
+                  </van-button>
+                </template>
+              </van-field>
             </div>
+            <van-icon name="edit" class="editIcon" @click="editClk(2)" />
+          </div>
+          <div v-else class="userInfo l-flex-between">
+            <span class="userInfoLeft">{{ $t("user.mailbox") }}: </span>
+            <span>{{ accountDetail.email }}</span>
+            <van-icon name="edit" class="editIcon" @click="editClk(2)" />
           </div>
 
           <!-- 支付宝账号 payeeCode -->
@@ -106,7 +99,7 @@
         </div>
         <div class="operListBox">
           <!-- 系统消息 -->
-          <div v-if="roleCheck()" class="taskListRow flex-col" @click="pushPageList('/taskMessage')">
+          <div class="taskListRow flex-col" @click="pushPageList('/taskMessage')">
             <div class="taskIcon taskMessageIcon"></div>
             <div class="taskRight">
               <div class="taskTitle">系统消息</div>
@@ -202,8 +195,7 @@ import {
   $M_PhoneTest,
 } from "@/common/js/utils";
 import { useRouter } from "vue-router";
-import { tAdminGetRelation, updatePayPlatform, updateDIYPassword } from "@/service/user";
-// import { tAdminGetRelation, tAdminSetRelationAdmin, updatePayPlatform } from "@/service/user";
+import { updatePayPlatform } from "@/service/user";
 import { showFailToast, showToast, showSuccessToast, showConfirmDialog } from 'vant';
 import { useI18n } from "vue-i18n";
 import { styleUrl } from "@/common/js/utils";
@@ -215,16 +207,10 @@ export default {
     const { t } = useI18n();
     // 账户信息
     const accountDetail = ref({});
-    // 控制地区显示隐藏
-    const areaShow = ref(true);
     // 控制手机显示隐藏
     const phoneNumberShow = ref(true);
     // 控制邮箱显示隐藏
     const mailboxShow = ref(true);
-    // 控制货币显示隐藏 货币符号,默认“¥”
-    const symbolShow = ref(true);
-    // 控制DIY使用密码显示隐藏
-    const diyPasswordShow = ref(true);
 
     const diyPassword = ref("");
 
@@ -236,9 +222,8 @@ export default {
     const relationAdminName = ref("");
 
     const level = ref('');
-    // level.value = user.level;
-    level.value = user.id;
-    console.log("user.id >>>", user.id);
+    level.value = user.level;
+    // console.log("user等级 >>>", user.level);
 
     const starsCount = ref(Math.floor(level.value % 5));
     const moonsCount = ref(Math.floor(level.value / 5));
@@ -256,7 +241,6 @@ export default {
 
     const showTop = ref(false);
 
-    const relationType = ref(true);
     const sys = ref(null);
     // 修改的个人信息
     const cofficentForm = reactive({
@@ -274,102 +258,21 @@ export default {
     const editClk = (idx) => {
       switch (idx) {
         case 1:
-          cofficentForm.associateParent = relationAdminName.value;
-          relationType.value = !relationType.value;
-          mailboxShow.value = true;
-          phoneNumberShow.value = true;
-          areaShow.value = true;
-          symbolShow.value = true;
-          diyPasswordShow.value = true;
-          break;
-        case 2:
-          cofficentForm.mailBox = accountDetail.value.email;
-          relationType.value = true;
-          mailboxShow.value = !mailboxShow.value;
-          phoneNumberShow.value = true;
-          areaShow.value = true;
-          symbolShow.value = true;
-          diyPasswordShow.value = true;
-          break;
-        case 3:
           cofficentForm.phone = accountDetail.value.phone;
-          relationType.value = true;
-          mailboxShow.value = true;
           phoneNumberShow.value = !phoneNumberShow.value;
-          areaShow.value = true;
-          symbolShow.value = true;
-          diyPasswordShow.value = true;
-          break;
-        case 4:
-          cofficentForm.area = accountDetail.value.area;
-          relationType.value = true;
           mailboxShow.value = true;
-          phoneNumberShow.value = true;
-          areaShow.value = !areaShow.value;
-          symbolShow.value = true;
-          diyPasswordShow.value = true;
-          break;
-        case 5:
-          cofficentForm.currencySymbol = accountDetail.value.currencySymbol;
-          relationType.value = true;
-          mailboxShow.value = true;
-          phoneNumberShow.value = true;
-          areaShow.value = true;
-          symbolShow.value = !symbolShow.value;
-          diyPasswordShow.value = true;
           break;
-        case 6:
-          cofficentForm.currencySymbol = accountDetail.value.currencySymbol;
-          relationType.value = true;
-          mailboxShow.value = true;
+        case 2:
+          cofficentForm.mailBox = accountDetail.value.email;
           phoneNumberShow.value = true;
-          areaShow.value = true;
-          symbolShow.value = true;
-          diyPasswordShow.value = !diyPasswordShow.value;
+          mailboxShow.value = !mailboxShow.value;
           break;
       }
     };
     // 点击邮箱的确定按钮
     const mailboxChg = async (e, idx) => {
       switch (idx) {
-        // case 1:
-        //   if (!e) {
-        //     showToast(t("user.associateParentPlace"));
-        //   } else {
-        //     const { data } = await tAdminSetRelationAdmin({
-        //       adminId: user.id,
-        //       username: e,
-        //     });
-        //     relationType.value = true;
-        //     if (data.code === "00000") {
-        //       showToast(data.message);
-        //       setTimeout(() => {
-        //         gettAdminGetRelation();
-        //       }, 500);
-        //     }
-        //   }
-        //   break;
-        case 2:
-          if (!e) {
-            showToast(t("user.mailboxPlace"));
-          } else if (!$M_EmailAvailable(e)) {
-            showToast(t("user.corrEmailPlace"));
-          } else {
-            const params = {
-              id: user.id,
-              email: e,
-            };
-            const { data } = await updateAdmin(params);
-            mailboxShow.value = true;
-            if (data.code === "00000") {
-              showToast(data.message);
-              setTimeout(() => {
-                getAcccountDetail();
-              }, 500);
-            }
-          }
-          break;
-        case 3:
+        case 1:
           if (!e) {
             showToast(t("user.phoneNumberPlace"));
           } else if (!$M_PhoneTest(e)) {
@@ -389,41 +292,23 @@ export default {
             }
           }
           break;
-        case 5:
+        case 2:
           if (!e) {
-            showToast(t("user.currencySymbolPlace"));
+            showToast(t("user.mailboxPlace"));
+          } else if (!$M_EmailAvailable(e)) {
+            showToast(t("user.corrEmailPlace"));
           } else {
             const params = {
               id: user.id,
-              currencySymbol: e,
+              email: e,
             };
             const { data } = await updateAdmin(params);
-            symbolShow.value = true;
+            mailboxShow.value = true;
             if (data.code === "00000") {
               showToast(data.message);
-              // 更新本地存储缓存中的currencySymbol的值
-              user.currencySymbol = e; // 将新的currencySymbol的值赋值给user
-              localStorage.setItem("loginUser", JSON.stringify(user));
               setTimeout(() => {
                 getAcccountDetail();
-              }, 1000);
-            }
-          }
-          break;
-        case 6:
-          if (!e) {
-            showToast(t("user.diyPasswordPlace"));
-          } else {
-            const params = {
-              diyPassword: e,
-            };
-            const { data } = await updateDIYPassword(params);
-            diyPasswordShow.value = true;
-            if (data.code === "00000") {
-              showToast(t("user.changeSuccess"));
-              setTimeout(() => {
-                getAcccountDetail();
-              }, 1000);
+              }, 500);
             }
           }
           break;
@@ -522,24 +407,16 @@ export default {
     onMounted(async () => {
       // 加载样式
       styleUrl('user');
-      if (localStorage.getItem("loginSys")) {
-        const loginSysString = localStorage.getItem("loginSys");
-        sys.value = JSON.parse(loginSysString);
-      }
-      // 获取关联上级
-      gettAdminGetRelation();
+      // if (localStorage.getItem("loginSys")) {
+      //   const loginSysString = localStorage.getItem("loginSys");
+      //   sys.value = JSON.parse(loginSysString);
+      // }
+
       // 获取账户
       getAcccountDetail();
 
     });
-    const gettAdminGetRelation = async () => {
-      const { data } = await tAdminGetRelation({
-        relationAdminId: user.relationAdminId,
-      });
-      if (typeof data === "string") {
-        relationAdminName.value = data;
-      }
-    };
+
     const operUnipay = () => {
       router.push({ path: "uniPay" });
     };
@@ -549,15 +426,16 @@ export default {
     const pushPageList = (url) => {
       router.push({ path: url });
     };
-    const roleCheck = () => {
-      if (user.isAdmined) {
-        return true;
-      } else {
-        const menuList = user.menuCodeList.filter((item) => item === "M6");
-        return menuList.length > 0;
-      }
-    };
-    
+
+    // const roleCheck = () => {
+    //   if (user.isAdmined) {
+    //     return true;
+    //   } else {
+    //     const menuList = user.menuCodeList.filter((item) => item === "M6");
+    //     return menuList.length > 0;
+    //   }
+    // };
+
     // 选择地区完成
     const areaPopFinish = async (e) => {
       console.log("e", e);
@@ -567,7 +445,7 @@ export default {
         areaId: e.selectId,
       };
       const { data } = await updateAdmin(params);
-      areaShow.value = true;
+      // areaShow.value = true;
       if (data.code === "00000") {
         showToast(data.message);
         setTimeout(() => {
@@ -607,25 +485,20 @@ export default {
       checkIsAbroad();
       haveRelationCheck();
     })
-  
+
     return {
       user,
       operUnipay,
       onperExitSys,
       relationAdminName,
-      relationType,
       pushPageList,
-      roleCheck,
       sys,
       kDialogRef,
       confirmClk,
-      mailboxShow,
       mailboxChg,
-      phoneNumberShow,
       editClk,
       cofficentForm,
       params,
-      areaShow,
       accountDetail,
       areaPopFinish,
       isInWeChat,
@@ -633,8 +506,6 @@ export default {
       haveRelation,
       checkIsAbroad,
       isInland,
-      symbolShow,
-      diyPasswordShow,
       diyPassword,
       sunzeePay,
       sevencloudPay,
@@ -643,7 +514,9 @@ export default {
       level,
       icons,
       showTop,
-      hiddenCardNo
+      hiddenCardNo,
+      phoneNumberShow,
+      mailboxShow,
     };
   }
 };

+ 2 - 2
vue.config.js

@@ -17,8 +17,8 @@ module.exports = {
     open: true,
     proxy: {
       "/": {
-        // target: 'http://120.25.151.99:49022', // 代理地址,这里设置的地址会代替axios中设置的baseURL
-        target: "http://120.25.151.99:49011",
+        target: 'http://120.25.151.99:49022', // 代理地址,这里设置的地址会代替axios中设置的baseURL
+        // target: "http://120.25.151.99:49011",
         // target: 'http://112.74.63.148:49011',
         // secure: true, // 使用的是http协议设置为 false,https协议设置为 true
         changeOrigin: true, // 是否跨域