Browse Source

:hugs:feat: 'pinia'

Ritchie 1 year ago
parent
commit
f39ee6b7f1
42 changed files with 1082 additions and 272 deletions
  1. 1 1
      README.md
  2. 1 0
      package.json
  3. BIN
      src/assets/accountOperation/closingIcon.png
  4. BIN
      src/assets/accountOperation/orderMatchIcon.png
  5. BIN
      src/assets/accountOperation/registerAccountIcon.png
  6. BIN
      src/assets/home/noData.png
  7. BIN
      src/assets/home/titleIcon.png
  8. BIN
      src/assets/position/searchIcon.png
  9. BIN
      src/assets/user/announcementIcon.png
  10. BIN
      src/assets/user/moon.png
  11. BIN
      src/assets/user/star.png
  12. BIN
      src/assets/user/taskMessageIcon.png
  13. 3 2
      src/common/js/utils.js
  14. 7 2
      src/main.js
  15. 50 16
      src/router/index.js
  16. 5 0
      src/service/login/index.js
  17. 3 2
      src/service/login/register.js
  18. 4 4
      src/styles/home/homeRank5.less
  19. 120 1
      src/styles/position/index.less
  20. 27 4
      src/styles/taskMessage/index.less
  21. 7 0
      src/styles/trading/index.less
  22. 2 2
      src/styles/user/index.less
  23. 2 2
      src/utils/axios.js
  24. 7 6
      src/utils/config.js
  25. 1 1
      src/utils/i18n.js
  26. 3 0
      src/views/buyOrSell/BuyConfList.vue
  27. 0 61
      src/views/buyOrSell/BuyOrSellIndex.vue
  28. 254 0
      src/views/buyOrSell/test.vue
  29. 33 0
      src/views/feedback/FeedbackIndex.vue
  30. 4 4
      src/views/home/HomeIndex.vue
  31. 20 8
      src/views/login/LoginIndex.vue
  32. 161 67
      src/views/login/Register.vue
  33. 15 0
      src/views/msgNotice/ClosingNotice.vue
  34. 15 0
      src/views/msgNotice/OrderMatchNotice.vue
  35. 69 2
      src/views/position/PositionIndex.vue
  36. 20 2
      src/views/taskMessage/index.vue
  37. 57 0
      src/views/trading/TradingBuy.vue
  38. 42 12
      src/views/trading/TradingIndex.vue
  39. 44 0
      src/views/trading/TradingSell.vue
  40. 27 0
      src/views/trading/TransactionHistory.vue
  41. 63 60
      src/views/user/UserIndex.vue
  42. 15 13
      vue.config.js

+ 1 - 1
README.md

@@ -33,7 +33,7 @@ Sunzee company internal stock trading system front-end project
 - 红 #FF3456 rgba(255, 52, 86, 1)
 - 蓝 #39a6fe rgba(252, 104, 94, 1)
 
-- 备选苹果红 #ff0077
+- 备选苹果红 #ff0077 rgba(255, 0, 119, 1)
 
 ## Customize configuration
 

+ 1 - 0
package.json

@@ -27,6 +27,7 @@
     "js-md5": "^0.7.3",
     "lib-flexible": "^0.3.2",
     "moment": "^2.29.4",
+    "pinia": "^2.1.7",
     "pushstate-server": "^3.1.0",
     "qrcode-terminal": "^0.12.0",
     "qs": "^6.11.0",

BIN
src/assets/accountOperation/closingIcon.png


BIN
src/assets/accountOperation/orderMatchIcon.png


BIN
src/assets/accountOperation/registerAccountIcon.png


BIN
src/assets/home/noData.png


BIN
src/assets/home/titleIcon.png


BIN
src/assets/position/searchIcon.png


BIN
src/assets/user/announcementIcon.png


BIN
src/assets/user/moon.png


BIN
src/assets/user/star.png


BIN
src/assets/user/taskMessageIcon.png


+ 3 - 2
src/common/js/utils.js

@@ -4406,7 +4406,8 @@ export function navigatorLanguage() {
   console.log("当前语言", lan);
   if (lan != 'en') {
     // 如果不为英文
-    return lan;
+    // return lan;
+    return 'zh';
   }
-  return 'en';
+  return 'zh';
 }

+ 7 - 2
src/main.js

@@ -1,4 +1,6 @@
-import { createApp } from "vue";
+import { createApp } from 'vue'
+import { createPinia } from 'pinia'
+import App from './App.vue'
 import {
   ActionBar,
   ActionBarIcon,
@@ -68,9 +70,9 @@ import {
   Space,
   Rate,
   NumberKeyboard,
+  Empty,
 } from "vant";
 import { Image as VanImage } from "vant";
-import App from "./App.vue";
 import store from "./store";
 import router from "./router";
 import "lib-flexible/flexible";
@@ -80,6 +82,7 @@ import "@vant/touch-emulator";
 import i18n from "./utils/i18n";
 
 const app = createApp(App); // 创建实例
+const pinia = createPinia()
 // 全局过滤器
 app.config.globalProperties.$filters = {
   prefix(url) {
@@ -162,9 +165,11 @@ app
   .use(Space)
   .use(Rate)
   .use(NumberKeyboard)
+  .use(Empty)
 
 app.use(router);
 app.use(store);
+app.use(pinia)
 
 app.use(i18n);
 

+ 50 - 16
src/router/index.js

@@ -30,12 +30,11 @@ const router = createRouter({
     },
     // 忘记密码页面
     {
-      path: "/forgetpassword",
+      path: "/forgetPassword",
       name: "forgetPassword",
       component: () => import("@/views/login/ForgetPassword.vue"),
       meta: { index: 1, noLogin: true },
     },
-    
     // 修改密码页面
     {
       path: "/changepassword",
@@ -43,48 +42,61 @@ const router = createRouter({
       component: () => import("@/views/user/ChangePassword.vue"),
       meta: { index: 1, noLogin: true },
     },
-  
     // 交易中心
     {
       path: "/trading",
       name: "trading",
       component: () => import("@/views/trading/TradingIndex.vue"),
-      meta: { index: 1, keepAlive: true },
+      meta: { index: 1 },
+    },
+    // 买入股票
+    {
+      path: "/tradingBuy",
+      name: "tradingBuy",
+      component: () => import("@/views/trading/TradingBuy.vue"),
+      meta: { index: 1 },
+    },
+    // 卖出股票
+    {
+      path: "/tradingSell",
+      name: "tradingSell",
+      component: () => import("@/views/trading/TradingSell.vue"),
+      meta: { index: 1 },
     },
-    // 买卖
+    // 交易历史
     {
-      path: "/buyOrSell",
-      name: "buyOrSell",
-      component: () => import("@/views/buyOrSell/BuyOrSellIndex.vue"),
-      meta: { index: 1, keepAlive: true },
+      path: "/transactionHistory",
+      name: "transactionHistory",
+      component: () => import("@/views/trading/TransactionHistory.vue"),
+      meta: { index: 1 },
     },
     // 买家付款确认列表
     {
       path: "/buyConfList",
       name: "buyConfList",
       component: () => import("@/views/buyOrSell/BuyConfList.vue"),
-      meta: { index: 1, keepAlive: true },
+      meta: { index: 1 },
     },
     // 买家付款图片
     {
       path: "/buyConf",
       name: "buyConf",
       component: () => import("@/views/buyOrSell/BuyConf.vue"),
-      meta: { index: 1, keepAlive: true },
+      meta: { index: 1 },
     },
     // 卖家收款确认列表
     {
       path: "/sellConfList",
       name: "sellConfList",
       component: () => import("@/views/buyOrSell/SellConfList.vue"),
-      meta: { index: 1, keepAlive: true },
+      meta: { index: 1 },
     },
     // 卖家确认收款
     {
       path: "/sellConf",
       name: "sellConf",
       component: () => import("@/views/buyOrSell/SellConf.vue"),
-      meta: { index: 1, keepAlive: true },
+      meta: { index: 1 },
     },
     // 持仓
     {
@@ -107,6 +119,13 @@ const router = createRouter({
       component: () => import("@/views/announcement/index"),
       meta: { index: 1 },
     },
+    // 异议反馈
+    {
+      path: "/objectionFeedback",
+      name: "feedback",
+      component: () => import("@/views/feedback/FeedbackIndex.vue"),
+      meta: { index: 1 },
+    },
     // 账号权限
     {
       path: "/accountPer",
@@ -121,6 +140,20 @@ const router = createRouter({
       component: () => import("@/views/taskMessage/index"),
       meta: { index: 1 },
     },
+    // 挂单匹配通知
+    {
+      path: "/orderMatchNotice",
+      name: "orderMatchNotice",
+      component: () => import("@/views/msgNotice/OrderMatchNotice.vue"),
+      meta: { index: 1 },
+    },
+    // 成交通知
+    {
+      path: "/closingNotice",
+      name: "closingNotice",
+      component: () => import("@/views/msgNotice/ClosingNotice.vue"),
+      meta: { index: 1 },
+    },
     // 账号审核列表
     {
       path: "/taskAccountList",
@@ -168,13 +201,14 @@ router.beforeEach((to, from, next) => {
       router.push("/login");
     } else {
       const userObject = JSON.parse(user);
+      console.log("userObject是什么", userObject);
       // 登录信息异常跳转登录页面
       if (!userObject) {
         router.push("/login");
       }
-      if (typeof userObject.id !== "number") {
-        router.push("/login");
-      }
+      // if (typeof userObject.id !== "number") {
+      //   router.push("/login");
+      // }
     }
     next();
   }

+ 5 - 0
src/service/login/index.js

@@ -9,3 +9,8 @@ export function login(params) {
 export function getSys(params) {
   return axios.get(`/SZWL-SERVER/tLogo/getLogo?${stringToUrl(params)}`);
 }
+
+// 登录 stock
+// export function login(loginParam) {
+//   return axios.post(`/userLogin/loginByPhone?phone=${loginParam.phone}&password=${loginParam.password}`, loginParam);
+// }

+ 3 - 2
src/service/login/register.js

@@ -19,5 +19,6 @@ export function getLastSendTime(params) {
 
 // 注册股票账户
 export function addUserApply(params) {
-  return axios.post(`/userApply/addUserApply`, params);
-}
+  return axios.post(`/userLogin/addUserApply`, params);
+}
+

+ 4 - 4
src/styles/home/homeRank5.less

@@ -87,7 +87,7 @@
     .buy-box {
       margin: auto;
       border-radius: 10px;
-      background-color: #eeebff;
+      background-color:	#eaf5ff;
       padding: 15px;
       width: 95%;
       max-width: 600px;
@@ -110,13 +110,13 @@
       margin: auto;
       margin-top: 1px;
       border-radius: 10px;
-      background-color: #eeebff;
+      background-color: #eaf5ff;
       padding: 15px;
       width: 95%;
       max-width: 600px;
       text-align: center;
-      box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
-      /* 添加阴影效果 */
+      box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); /* 添加阴影效果 */
+      font-family: 'Roboto', sans-serif; /* 设置页面默认字体为Roboto */
 
       .van-divider {
         margin-top: 5px;

+ 120 - 1
src/styles/position/index.less

@@ -109,10 +109,11 @@ button:active {
   background-color: #fff;
   width: 100%;
   // height: calc(100vh - 100px);
+  position: relative;
 
   .box1 {
-    height: 100%;
     width: 100%;
+    height: 100%;
     height: calc(100% - 50px);
     padding-bottom: 10px;
     overflow: auto;
@@ -378,6 +379,124 @@ button:active {
     }
   }
 
+  .bd1 {
+    width: 100%;
+    height: 108px;
+    // background: url(../../assets/home/outer.png) no-repeat;
+    background: #eaf5ff;
+    background-size: 100% 100%;
+
+    .box2 {
+      width: 100%;
+      height: 100%;
+
+      .TextGroup {
+        height: 57px;
+        width: 48px;
+
+        .main6 {
+          width: 48px;
+          height: 57px;
+
+          .word5 {
+            height: 26px;
+            overflow-wrap: break-word;
+            color: rgba(223, 94, 76, 1);
+            font-size: 22px;
+            font-family: Helvetica;
+            text-align: center;
+            white-space: nowrap;
+            line-height: 26px;
+            display: block;
+          }
+
+          .word6 {
+            height: 17px;
+            overflow-wrap: break-word;
+            color: rgb(107, 107, 255);
+            font-size: 12px;
+            text-align: center;
+            white-space: nowrap;
+            line-height: 17px;
+            margin-top: 14px;
+            display: block;
+          }
+        }
+      }
+    }
+  }
+
+  .baseRow {
+    width: 90%;
+    height: 20px;
+    margin-left: 15px;
+    margin-top: 5px;
+    justify-content: flex-start;
+
+    .group2 {
+      background-color: #ff3456;
+      border-radius: 2px;
+      width: 4px;
+      height: 16px;
+      margin-top: 4px;
+    }
+
+    .baseText {
+      width: 150px;
+      height: 20px;
+      margin-top: 2px;
+      overflow-wrap: break-word;
+      color: rgba(64, 77, 116, 1);
+      font-size: 14px;
+      font-family: PingFangSC-Medium;
+      text-align: left;
+      // white-space: nowrap;
+      line-height: 20px;
+      display: block;
+      margin-left: 15px;
+    }
+  }
+
+  .searchRow {
+    margin: 18px 15px;
+
+    .bd3 {
+      width: 87px;
+      height: 16px;
+
+      .outer4 {
+        width: 16px;
+        height: 16px;
+        background: url("../../assets/home/titleIcon.png") top center no-repeat;
+        background-size: 100%;
+      }
+
+      .txt2 {
+        width: 65px;
+        height: 15px;
+        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;
+      }
+    }
+
+    .main5 {
+      width: auto;
+      cursor: pointer;
+
+      .label2 {
+        width: 23px;
+        height: 23px;
+        margin-right: 5px;
+      }
+    }
+  }
+
   .van-field__label {
     width: auto;
   }

+ 27 - 4
src/styles/taskMessage/index.less

@@ -29,13 +29,36 @@
           top: 0.4rem;
         }
 
-        &.retailIcon::after {
+        
+        &.registerAccountIcon::after {
           content: '';
           position: absolute;
-          background: #fff url('../../assets/taskMessage/retailIcon.png') top center no-repeat;
+          background: #fff url('../../assets/accountOperation/registerAccountIcon.png') top center no-repeat;
           background-size: 100%;
-          width: 0.6rem;
-          height: 0.6rem;
+          width: 0.5rem;
+          height: 0.5rem;
+          right: 0.15rem;
+          top: 0.4rem;
+        }
+
+        &.orderMatchIcon::after {
+          content: '';
+          position: absolute;
+          background: #fff url('../../assets/accountOperation/orderMatchIcon.png') top center no-repeat;
+          background-size: 100%;
+          width: 0.5rem;
+          height: 0.5rem;
+          right: 0.15rem;
+          top: 0.4rem;
+        }
+
+        &.closingIcon::after {
+          content: '';
+          position: absolute;
+          background: #fff url('../../assets/accountOperation/closingIcon.png') top center no-repeat;
+          background-size: 100%;
+          width: 0.5rem;
+          height: 0.5rem;
           right: 0.15rem;
           top: 0.4rem;
         }

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

@@ -681,6 +681,13 @@
       }
     }
     
+    .buySellBtn{
+      font-size: 18px;
+      .van-button {
+        border-radius: 8px;
+        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
+      }
+    }
 
   }
 }

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

@@ -225,8 +225,8 @@
                         position: absolute;
                         background: #fff url("../../assets/user/feedback.png") top center no-repeat;
                         background-size: 100%;
-                        width: 0.6rem;
-                        height: 0.6rem;
+                        width: 0.55rem;
+                        height: 0.55rem;
                         right: 0.2rem;
                         top: 0.4rem;
                     }

+ 2 - 2
src/utils/axios.js

@@ -20,9 +20,9 @@ service.interceptors.request.use(config => {
   const curLang = localStorage.getItem('curLang');
   // 增加用户体验
   showLoadingToast({
-    message: curLang === 'zh' ? '加载中...' : 'Loading...',
+    message: curLang === 'zh' ? '加载中...' : '加载中...',
     forbidClick: true,
-    duration: 0,
+    duration: 5000,
   });
   // 把localStorage的token放在Authorization里
   let loginUser = localStorage.getItem('loginUser');

+ 7 - 6
src/utils/config.js

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

+ 1 - 1
src/utils/i18n.js

@@ -5,7 +5,7 @@ import zhCN from 'vant/es/locale/lang/zh-CN';
 let language = 'zh';
 // 储存语言
 const curLang = localStorage.getItem('curLang');
-if (curLang) {
+if (curLang === 'zh') {
     language = curLang;
     localStorage.setItem('curLang', curLang);
 } else {

+ 3 - 0
src/views/buyOrSell/BuyConfList.vue

@@ -95,6 +95,7 @@ export default {
         // 上拉刷新
         const loading = ref(true);
         const finished = ref(false);
+
         // 下拉刷新
         const onRefresh = (idx) => {
             ruleData.tableData = [];
@@ -107,6 +108,8 @@ export default {
             pageNo.value = 1;
             pageSize.value = 10;
             getList();
+
+
         };
 
         // 上拉加载

+ 0 - 61
src/views/buyOrSell/BuyOrSellIndex.vue

@@ -1,61 +0,0 @@
-<script setup>
-import { ref } from 'vue';
-import sHeader from "@/components/SimpleHeader";
-const buyNum = ref('');
-const unitPrice = ref('');
-const onSubmitBuy = (values) => {
-    console.log('submitBuy', values);
-};
-const onSubmitSell = (values) => {
-    console.log('submitSell', values);
-};
-
-
-</script>
-
-<template>
-    <div class="buyOrSellIndex">
-        <s-header :name="'买卖'" :noback="false"></s-header>
-        <div style="height: 200px;">
-            <van-tabs v-model:active="active" animated>
-                <van-tab><template #title> <van-icon name="points" />买入 </template>
-                    <van-form @submit="onSubmitBuy">
-                        <van-cell-group inset>
-                            <van-field v-model="buyNum" type="digit" name="买入量" label="买入量" placeholder="买入量"
-                                :rules="[{ required: true, message: '请填写买入量' }]" />
-
-                            <van-field v-model="unitPrice" type="number" name="单价" label="单价" placeholder="每股单价"
-                                :rules="[{ required: true, message: '请填写单价' }]" />
-                        </van-cell-group>
-                        <div style="margin: 16px;">
-                            <van-button round block type="warning" native-type="submit">
-                                提交
-                            </van-button>
-                        </div>
-                    </van-form>
-
-                </van-tab>
-                <van-tab><template #title> <van-icon name="after-sale" />卖出 </template>
-
-                    <van-form @submit="onSubmitSell">
-                        <van-cell-group inset>
-                            <van-field v-model="buyNum" type="digit" name="买入量" label="买入量" placeholder="买入量"
-                                :rules="[{ required: true, message: '请填写买入量' }]" />
-
-                            <van-field v-model="unitPrice" type="number" name="单价" label="单价" placeholder="每股单价"
-                                :rules="[{ required: true, message: '请填写单价' }]" />
-                        </van-cell-group>
-                        <div style="margin: 16px;">
-                            <van-button round block type="success" native-type="submit">
-                                提交
-                            </van-button>
-                        </div>
-                    </van-form>
-
-                </van-tab>
-            </van-tabs>
-        </div>
-    </div>
-</template>
-
-<style scoped></style>

+ 254 - 0
src/views/buyOrSell/test.vue

@@ -0,0 +1,254 @@
+<template>
+    <!-- 买入确认列表 -->
+    <div class="taskMessagePage flex-col">
+      <s-header :name="'买家确认列表'" :noback="false"></s-header>
+      <div class="taskMessageBox flex-col">
+        <van-list v-model:loading="loading" v-model:error="error" error-text="请求失败"
+          :finished="finished" finished-text="没有更多了" 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">共<span class="discountNumber">{{ alarmHistoryTotal
+                }}</span>条记录</span>
+              </div>
+            </div>
+            <div class="l-flex-RC">
+              <div @click="reviewedClk" class="label3 o-mr-30">查看待审批的申请</div>
+            </div>
+          </div>
+
+
+          <div class="listBox">
+            <div v-for="(item, index) in alarmHistoryList" :key="index" class="listItem">
+              <div class="itemBox">
+                <!-- 用户名 -->
+                <div class="itemRow">
+                  <span class="itemTitle">用户名:&nbsp;</span>
+                  ritchie
+                </div>
+                <!-- 收款账号 -->
+                <div class="itemRow">
+                  <span class="itemTitle">收款账号:&nbsp;</span>
+                  186....2721
+                </div>
+                <!-- 部门岗位 -->
+                <div class="itemRow">
+                  <span class="itemTitle">部门:&nbsp;</span>
+                  研发部
+                  <span class="itemTitle discount">岗位:&nbsp;</span>
+                  软件工程师
+                </div>
+                <!-- 申请时间 -->
+                <div class="itemRow">
+                  <span class="itemTitle">申请时间:&nbsp;</span>
+                  {{ showDateTime(item.createDate) }}
+                </div>
+                <!-- 审批时间 -->
+                <div class="itemRow" v-if="item.checkType !== '0'">
+                  <span class="itemTitle">审批时间:&nbsp;</span>
+                  {{ showDateTime(item.modifyDate) }}
+                </div>
+                <div class="itemRow" style="display: flex; justify-content: flex-end"
+                  v-if="item.checkType === '0' && isOper">
+                  <van-button span="5" round type="primary" style="
+                        height: 2em;
+                        padding: 0 1em;
+                        margin: 0 0.5em;
+                        background: rgb(255 0 0 / 20%);
+                        color: #ff0000;
+                        border-color: #ff0000;
+                      " @click="changeStatusFun(item, 3)">
+                    不通过
+                  </van-button>
+                  <van-button span="5" round type="primary" style="
+                        height: 2em;
+                        padding: 0 1em;
+                        margin: 0 0.5em;
+                        background: rgb(25 137 250 / 20%);
+                        color: #1989fa;
+                      " @click="changeStatusFun(item, 1)">
+                    通过
+                  </van-button>
+                </div>
+                <!-- 审批状态 -->
+                <!-- 确认状态 status:0 未确认...,1 已确认✓ -->
+                <div class="itemRow" style="display: flex; justify-content: flex-end">
+                  <span v-if="item.checkType === '0' && user.type > 1" style="color: #FFA500"> {{ $t('taskMessage.toBeApproved') }}</span>
+                  <span v-if="item.checkType === '1'" style="color: #1989fa"> 通过</span>
+                  <span v-if="item.checkType === '2'" style="color: #ff0000"> 取消</span>
+                  <span v-if="item.checkType === '3'" style="color: #ff0000"> 不通过</span>
+                </div>
+              </div>
+            </div>
+          </div>
+        </van-list>
+      </div>
+
+    </div>
+  </template>
+  
+  <script>
+  import { onMounted, reactive, ref } from "vue";
+  import sHeader from "@/components/SimpleHeader";
+  import {
+    getTaskProportionList,
+    changeProportionStatus,
+  } from "@/service/taskMessage";
+  import { showFailToast } from "vant";
+  import { getLoginUser, styleUrl } from "@/common/js/utils";
+  import dateUtil from "@/utils/dateUtil";
+  
+  export default {
+    components: { sHeader },
+    setup() {
+      
+      const busiPopFieldName = reactive({
+        text: "name",
+        value: "id",
+      });
+      const kDialogRef = ref(null);
+      const busiPopShow = ref(false);
+      // 筛选条件
+      const searchForm = reactive({
+        merchantName: "",
+        state: "",
+        stateName: '',
+      });
+      // 点击状态输入框
+      const busiInpClk = () => {
+        busiPopShow.value = true;
+      };
+      const busiPopConfirm = ({ selectedOptions }) => {
+        busiPopShow.value = false;
+        searchForm.state = selectedOptions[0].id;
+        searchForm.stateName = selectedOptions[0].name;
+      };
+    
+      // 点击查询按钮
+      const confirmClk = () => {
+        isClkReview.value = false;
+        searchGetList();
+      };
+      // 是否点击待审核
+      const isClkReview = ref(true);
+      // 点击查看待审核
+      const reviewedClk = () => {
+        isClkReview.value = true;
+        // 改为未审核状态
+        searchParams.type = "0";
+        searchGetList();
+      };
+      const user = getLoginUser();
+      const loading = ref(false); // 加载状态
+      const error = ref(false); // 错误状态
+      const finished = ref(false); // 结束翻页状态
+      const alarmHistoryList = ref([]); // 列表集合
+      const alarmHistoryTotal = ref(0); // 列表总数
+      
+      let searchParams = reactive({
+        adminId: "", // 当前登录账户的id
+        type: "1", // 审核状态 未审核_0;全部_1
+        current: 1, // 当前页
+        size: 20, // 页大小
+        username: "", // 商家名称
+      });
+      // 滚动加载
+      const onLoad = () => {
+        if (!finished.value) {
+          searchParams.current = searchParams.current + 1;
+          getList();
+        }
+      };
+      // 查询列表
+      const searchGetList = () => {
+        alarmHistoryList.value = [];
+        searchParams.current = 1;
+        getList();
+      };
+      // 获取设备初始化审批列表数据
+      const getList = async () => {
+        // 把弹窗的筛选条件组合到请求参数里面
+        if (!isClkReview.value) {
+          searchParams.type = searchForm.state;
+        }
+        searchParams.userName = searchForm.merchantName;
+        const { data } = await getTaskProportionList(
+          Object.assign({}, searchParams)
+        );
+        if (data.code === "00000") {
+          // 列表值叠加
+          alarmHistoryList.value = alarmHistoryList.value.concat(
+            data.data.records
+          );
+          alarmHistoryTotal.value = data.data.total;
+          if (alarmHistoryList.value.length === data.data.total) {
+            finished.value = true;
+          }
+          loading.value = false;
+          console.log(alarmHistoryList);
+        } else {
+          showFailToast(data.message);
+        }
+      };
+      // 是否有操作的权限
+      const isOper = ref(true);
+      // 初始化页面获取列表
+      onMounted(async () => {
+        // 加载样式
+        styleUrl('taskMessage');
+        if (user) {
+          searchParams.adminId = user.id;
+          searchGetList();
+          // 如果是type大于1,那么不能有操作的权限
+          if (user.type > 1) {
+            isOper.value = false;
+          }
+        }
+      });
+      const showDateTime = (date) => {
+        return date
+          ? dateUtil.formateDate(new Date(date), "yyyy-MM-dd hh:mm:ss")
+          : "";
+      };
+      const changeStatusFun = async (item, type) => {
+        const { data } = await changeProportionStatus({
+          id: item.id,
+          type: type,
+        });
+        if (data.code === "00000") {
+          showFailToast("操作成功");
+          searchGetList();
+        } else {
+          showFailToast(data.message);
+        }
+        console.log(data);
+      };
+      return {
+        loading,
+        error,
+        finished,
+        onLoad,
+        alarmHistoryList,
+        alarmHistoryTotal,
+        showDateTime,
+        changeStatusFun,
+        kDialogRef,
+        confirmClk,
+        busiInpClk,
+        busiPopConfirm,
+        busiPopShow,
+        searchForm,
+        busiPopFieldName,
+        reviewedClk,
+        isOper,
+        user,
+      };
+    },
+  };
+  </script>
+  
+  <style lang="less" scoped>
+  @import "../../../common/style/common.less";
+  </style>
+  

+ 33 - 0
src/views/feedback/FeedbackIndex.vue

@@ -0,0 +1,33 @@
+<script setup>
+// 导入接口
+import sHeader from "@/components/SimpleHeader";
+import { onMounted, ref } from '@vue/runtime-core';
+import { getLocal } from '@/common/js/utils';
+
+// const user = getLoginUser();
+const surveyUrl = ref('');
+let languageName = ref(getLocal("curLang"));
+// 刚进页面
+onMounted(() => {
+    // 加载样式
+    // styleUrl('feedback');
+    console.log(languageName.value);
+    if (languageName.value == 'zh') {
+        surveyUrl.value = 'https://form.antdv.com/r/666c079f89b600d7';
+    } else {
+        surveyUrl.value = 'https://form.antdv.com/r/666c079f89b600d7';
+    }
+});
+
+</script>
+
+<template>
+    <div class="feedback">
+        <s-header name="交易异议" :noback="false"></s-header>
+        <iframe height="100%" width="100%" :src="surveyUrl" frameborder="0" allowfullscreen></iframe>
+    </div>
+</template>
+
+
+
+<style lang="less" scoped></style>

+ 4 - 4
src/views/home/HomeIndex.vue

@@ -5,7 +5,7 @@
       <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)" background="#fff"
+        <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>
@@ -20,7 +20,7 @@
         <div class="layer2 l-flex-RC">
           <div class="section5 flex-col"></div>
           <div class="TextGroup2 flex-col">
-            <span class="txt4">{{ $t("home.dataOverview") }}</span>
+            <span class="txt4">行情数据</span>
           </div>
         </div>
       </div>
@@ -95,7 +95,7 @@
           <van-col span="8">单价</van-col>
         </van-row>
         <van-row v-for="(item, index) in top5List" :key="index" justify="center">
-          <van-col span="8">{{ item.name }}</van-col>
+          <van-col span="8">买家{{ index + 1 }}</van-col>
           <van-col span="8">{{ item.amount }}</van-col>
           <van-col span="8">{{ item.price }}</van-col>
         </van-row>
@@ -109,7 +109,7 @@
           <van-col span="8">单价</van-col>
         </van-row>
         <van-row v-for="(item, index) in top5List" :key="index" justify="center">
-          <van-col span="8">{{ item.name }}</van-col>
+          <van-col span="8">卖家{{ index + 1 }}</van-col>
           <van-col span="8">{{ item.amount }}</van-col>
           <van-col span="8">{{ item.price }}</van-col>
         </van-row>

+ 20 - 8
src/views/login/LoginIndex.vue

@@ -4,7 +4,7 @@
     <s-header :name="sys ? sys.title : $t('public.sysName')" :noback="true"></s-header>
     <div class="loginLogoBox l-re">
       <div class="loginLogo"></div>
-      
+
     </div>
     <div class="loginTitleBox l-flex-center">
       <span class="loginTitle">{{ $t("login.title") }}</span>
@@ -13,6 +13,8 @@
       <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="userPwd" type="password" name="userPwd" label="" :placeholder="$t('login.passWordInput')"
           :rules="[{ required: true, message: $t('login.passWordInput') }]" />
         <div class="checkedPasswordBox">
@@ -22,8 +24,8 @@
           </van-checkbox>
           <!-- 忘记密码 -->
           <span class="forgetPassWord" @click="forgetPassword">{{
-            $t("login.forgetPassWord")
-          }}</span>
+      $t("login.forgetPassWord")
+    }}</span>
         </div>
         <br>
         <br>
@@ -34,8 +36,8 @@
           </van-button>
           <!-- 登录 -->
           <van-button round type="primary" native-type="submit">{{
-            $t("login.loginButton")
-          }}
+      $t("login.loginButton")
+            }}
           </van-button>
         </div>
       </van-form>
@@ -58,6 +60,7 @@ export default {
     const { t } = useI18n();
     const checked = ref(false); // 是否记住密码状态
     const userName = ref("");
+    // const userPhone = ref('');
     const userPwd = ref("");
     const router = useRouter();
     const route = useRoute();
@@ -73,7 +76,9 @@ export default {
       if (savedCredentials) {
         checked.value = true;
         const { savedUsername, savedPassword } = JSON.parse(savedCredentials);
+        // const { savedUserPhone, savedPassword } = JSON.parse(savedCredentials);
         userName.value = savedUsername;
+        // userPhone.value = savedUserPhone;
         userPwd.value = savedPassword;
       }
 
@@ -98,11 +103,17 @@ export default {
         password: md5(values.userPwd),
         hostName: 'Sunzee',
       });
-      console.log(checked.value);
+      // const { data } = await login({
+      //   phone: values.userPhone,
+      //   password: md5(values.userPwd),
+      // });
+      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({ savedUsername: values.userName, savedPassword: values.userPwd });
+          const savedCredentials = JSON.stringify({ savedUserPhone: values.userPhone, savedPassword: values.userPwd });
           localStorage.setItem('savedCredentials', savedCredentials);
         } else {
           const savedCredentials = localStorage.getItem('savedCredentials');
@@ -129,7 +140,7 @@ export default {
     };
     // 跳转忘记密码页面
     const forgetPassword = async () => {
-      await router.push("/forgetpassword");
+      await router.push("/forgetPassword");
     };
 
     const state = reactive({
@@ -145,6 +156,7 @@ export default {
     return {
       checked,
       userName,
+      // userPhone,
       userPwd,
       onSubmit,
       registerClick,

+ 161 - 67
src/views/login/Register.vue

@@ -4,38 +4,23 @@
     <s-header :name="$t('register.header')" :noback="false"></s-header>
     <div class="registerFormBox">
       <van-form @submit="registerSubmit">
-        <van-field v-model="userName" name="userName" :label="$t('register.usernameLabel')"
-          :placeholder="$t('register.usernamePlaceholder')"
+        <!-- 账号昵称 -->
+        <van-field v-model="userName" name="userName" label="账号昵称" :placeholder="$t('register.usernamePlaceholder')"
           :rules="[{ pattern: /^[a-zA-Z0-9]+$/, message: $t('register.usernameRequired') }]" />
         <br>
         <!-- <van-field v-model="actualName" name="actualName" :label="$t('register.nameLabel')" placeholder="请输入真实姓名"
           :rules="[{ required: true, message: '请输入真实姓名' }]" />
         <br> -->
-        <van-field v-model="password" name="password" type="password" :label="$t('register.passwordLabel')"
-          :placeholder="$t('register.passwordPlaceholder')"
-          :rules="[{ required: true, message: $t('register.passwordRequired') }]" />
-        <br>
-        <van-field v-model="passwordCheck" name="passwordCheck" type="password"
-          :label="$t('register.passwordCheckLabel')" :placeholder="$t('register.passwordCheckPlaceholder')"
-          :rules="[{ required: true, message: $t('register.passwordCheckRequired') }]" />
-        <br>
-        <van-field v-model="identityCard" name="identityCard" label="身份证号" placeholder="请输入身份证号码"
-          :rules="[{ validator, message: '请输入合法的身份证号码' }]" /><br />
-        <!-- 收款账号 payeeCode 不可修改 -->
-        <van-field v-model="payeeCode" name="payeeCode" label="收款账号" placeholder="请输入支付宝账户(不可修改)"
-          :rules="[{ required: true, message: '请输入支付宝账户' }]" />
-        <br />
         <div>
           <!-- 国内手机 -->
-          <van-field v-model="phone" name="phone" type="tel" :label="$t('register.phoneLabel')"
-            :placeholder="$t('register.phonePlaceholder')"
+          <van-field v-model="phone" name="phone" type="tel" label="登录手机" :placeholder="$t('register.phonePlaceholder')"
             :rules="[{ required: true, pattern: /^1[3456789]\d{9}$/, message: $t('register.phoneRequired') }]" />
           <br />
           <!-- 短信验证码 -->
           <!-- <van-field v-model="code" name="code" :label="$t('register.codeLabel')"
             :placeholder="$t('register.codePlaceholder')"
             :rules="[{ required: true, message: $t('register.codeRequired') }]"> -->
-            <van-field v-model="code" name="code" :label="$t('register.codeLabel')"
+          <van-field v-model="code" name="code" :label="$t('register.codeLabel')"
             :placeholder="$t('register.codePlaceholder')">
             <template #button>
               <van-button size="small" type="primary" @click="seedVerCode()"
@@ -47,6 +32,25 @@
             </template>
           </van-field>
         </div><br />
+        <van-field v-model="password" name="password" type="password" :label="$t('register.passwordLabel')"
+          :placeholder="$t('register.passwordPlaceholder')"
+          :rules="[{ required: true, message: $t('register.passwordRequired') }]" />
+        <br>
+        <van-field v-model="passwordCheck" name="passwordCheck" type="password"
+          :label="$t('register.passwordCheckLabel')" :placeholder="$t('register.passwordCheckPlaceholder')"
+          :rules="[{ required: true, message: $t('register.passwordCheckRequired') }]" />
+        <br>
+        <van-field v-model="identityCard" name="identityCard" label="身份证号" placeholder="请输入身份证号码"
+          :rules="[{ validator, message: '请输入合法的身份证号码' }]" /><br />
+        <!-- 支付宝账号 payeeCode 不可修改 -->
+        <van-field v-model="payeeCode" name="payeeCode" label="支付宝账号" placeholder="请输入支付宝账号(不可修改)"
+          :rules="[{ required: true, message: '请输入支付宝账号' }]" />
+        <br />
+        <!-- 银行卡号 cardNo 不可修改 -->
+        <van-field v-model="cardNo" name="cardNo" label="银行卡号" placeholder="请输入银行卡号(不可修改)"
+          :rules="[{ required: true, message: '请输入银行卡号' }]" />
+        <br />
+
         <!-- 邮箱地址 -->
         <van-field v-model="email" name="email" label="邮箱地址" placeholder="请输入邮箱地址"
           :rules="[{ required: true, message: '请输入邮箱地址' }]" /><br />
@@ -58,19 +62,12 @@
           <van-date-picker @confirm="onConfirm" @cancel="showPicker = false"></van-date-picker>
         </van-popup>
         <br />
-        <!-- 部门id deptName -->
-        <van-field v-model="deptName" is-link readonly name="deptName" label="部门名称" placeholder="点击选择部门名称"
-          @click="showDeptPicker = true" />
-        <van-popup v-model:show="showDeptPicker" position="bottom">
-          <van-picker :columns="deptColumns" @confirm="onDeptConfirm" @cancel="showDeptPicker = false" />
-        </van-popup>
-
-        <!-- 岗位id jobName -->
-        <van-field v-model="jobName" is-link readonly name="jobName" label="岗位名称" placeholder="点击选择岗位名称"
-          @click="showJobPicker = true" />
-        <van-popup v-model:show="showJobPicker" position="bottom">
-          <van-picker :columns="jobColumns" @confirm="onJobConfirm" @cancel="showJobPicker = false" />
-        </van-popup>
+        <!-- 部门dept-岗位job -->
+        <van-field v-model="deptName" is-link readonly label="部门岗位" placeholder="请选择部门-岗位" @click="show = true" />
+        <van-popup v-model:show="show" round position="bottom">
+          <van-cascader v-model="jobName" title="请选择部门-岗位" :options="options" @close="show = false"
+            @finish="onFinish" />
+        </van-popup><br />
 
         <!-- 提交验证信息 -->
         <van-button round type="primary" class="register" native-type="submit">{{
@@ -107,6 +104,7 @@ export default {
     const passwordCheck = ref('');
     const identityCard = ref('');
     const payeeCode = ref('');
+    const cardNo = ref('');
     const phone = ref('');
     const code = ref('');
     const email = ref('');
@@ -117,37 +115,136 @@ export default {
     });
 
     const deptId = ref('');
+    const jobId = ref('');
+    const show = ref(false);
     const deptName = ref('');
-    const showDeptPicker = ref(false);
-    const deptColumns = [
-      { text: '研发部', value: '1' },
-      { text: '生产部', value: '2' },
-      { text: '营销部', value: '3' },
-      { text: '售后', value: '4' },
-      { text: '行政部', value: '5' },
+    // 选项列表,children 代表子选项,支持多级嵌套
+    const options = [
+      {
+        text: '营销部',
+        value: '1',
+        children: [
+          { text: '营销业务员', value: '3' },
+          { text: '营销助理', value: '4' },
+          { text: '营销其他', value: '6' },
+          { text: '营销运维', value: '5' },
+          { text: '营销部长', value: '2' },
+        ],
+      },
+      {
+        text: '采购部',
+        value: '10',
+        children: [
+          { text: '采购主管', value: '41' },
+          { text: '采购工程师', value: '42' },
+          { text: '采购文员', value: '43' },
+          { text: '采购其他', value: '44' },
+        ],
+      }, {
+        text: '人事部',
+        value: '11',
+        children: [
+          { text: '人事专员', value: '47' },
+          { text: '人事主管', value: '45' },
+          { text: '人事其他', value: '46' },
+        ],
+      }, {
+        text: '总经办',
+        value: '12',
+        children: [
+          { text: '总经理', value: '48' },
+          { text: '副总经理', value: '49' },
+          { text: '总经理助理', value: '50' },
+        ],
+      },
+      {
+        text: '推广部',
+        value: '2',
+        children: [
+          { text: '推广运营', value: '7' },
+          { text: '推广美工', value: '8' },
+          { text: '推广其他', value: '9' },
+          { text: '推广部长', value: '1' },
+        ],
+      },
+      {
+        text: '市场部',
+        value: '3',
+        children: [
+          { text: '市场部长', value: '10' },
+          { text: '市场专员', value: '11' },
+          { text: '市场其他', value: '12' },
+        ],
+      }, {
+        text: '售后部',
+        value: '4',
+        children: [
+          { text: '售后部长', value: '13' },
+          { text: '售后文员', value: '14' },
+          { text: '售后工程师', value: '15' },
+          { text: '售后其他', value: '16' },
+        ],
+      }, {
+        text: '研发部',
+        value: '5',
+        children: [
+          { text: '研发主管', value: '17' },
+          { text: '研发组长', value: '18' },
+          { text: '研发项目经理', value: '19' },
+          { text: '研发工程师', value: '20' },
+          { text: '研发助理工程师', value: '21' },
+          { text: '研发其他', value: '22' },
+        ],
+      }, {
+        text: '生产部',
+        value: '6',
+        children: [
+          { text: '生产工程师', value: '25' },
+          { text: '生产部长', value: '23' },
+          { text: '生产组长', value: '24' },
+          { text: '生产助理', value: '28' },
+          { text: '生产助理工程师', value: '26' },
+          { text: '生产专员', value: '27' },
+          { text: '生产其他', value: '29' },
+        ],
+      }, {
+        text: '品质部',
+        value: '7',
+        children: [
+          { text: '品质其他', value: '32' },
+          { text: '品质质检员', value: '31' },
+          { text: '品质部长', value: '30' },
+        ],
+      }, {
+        text: '财务部',
+        value: '8',
+        children: [
+          { text: '财务其他', value: '37' },
+          { text: '财务助理', value: '36' },
+          { text: '财务出纳', value: '35' },
+          { text: '财务会计', value: '34' },
+          { text: '财务主管', value: '33' },
+        ],
+      }, {
+        text: '行政后勤',
+        value: '9',
+        children: [
+          { text: '行政后勤其他', value: '40' },
+          { text: '行政文员', value: '39' },
+          { text: '行政主管', value: '38' },
+        ],
+      },
     ];
-    const onDeptConfirm = ({ selectedOptions }) => {
-      deptName.value = selectedOptions[0]?.text;
-      deptId.value = selectedOptions[0]?.value;
-      showDeptPicker.value = false;
-    };
+    // 全部选项选择完毕后,会触发 finish 事件
+    const onFinish = ({ selectedOptions }) => {
+      show.value = false;
+      deptName.value = selectedOptions.map((option) => option.text).join('-');
 
-    const jobId = ref('');
-    const jobName = ref('');
-    const showJobPicker = ref(false);
-    const jobColumns = [
-      { text: '电器工程师', value: '1' },
-      { text: '结构工程师', value: '2' },
-      { text: '软件工程师', value: '3' },
-      { text: '售后', value: '4' },
-      { text: '财务', value: '5' },
-    ];
-    const onJobConfirm = ({ selectedOptions }) => {
-      jobName.value = selectedOptions[0]?.text;
-      jobId.value = selectedOptions[0]?.value;
-      showJobPicker.value = false;
+      deptId.value = selectedOptions[0].value;
+      jobId.value = selectedOptions[1].value;
     };
 
+
     const router = useRouter();
     const reqApi = ref(false);
 
@@ -156,7 +253,7 @@ export default {
 
     const showPicker = ref(false);
     const onConfirm = ({ selectedValues }) => {
-      hireDate.value = selectedValues.join('/');
+      hireDate.value = selectedValues.join('-');
       showPicker.value = false;
     }
     // 注册点击
@@ -165,13 +262,13 @@ export default {
         showFailToast(t('register.twoTypedDiff'));
         return false;
       }
-      console.log(jobId.value, '哈哈哈', deptId.value);
       const { data } = await addUserApply({
         userName: userName.value,
         // actualName: actualName.value,
         password: md5(password.value),
         identityCard: identityCard.value,
         payeeCode: payeeCode.value,
+        cardNo: cardNo.value,
         phone: phone.value,
         code: code.value,
         email: email.value,
@@ -259,17 +356,14 @@ export default {
       showPicker,
       identityCard,
       payeeCode,
+      cardNo,
       hireDate,
       deptId,
       deptName,
       jobId,
-      jobName,
-      showDeptPicker,
-      deptColumns,
-      onDeptConfirm,
-      showJobPicker,
-      jobColumns,
-      onJobConfirm
+      show,
+      options,
+      onFinish,
     }
   },
   components: { sHeader }

+ 15 - 0
src/views/msgNotice/ClosingNotice.vue

@@ -0,0 +1,15 @@
+<script setup>
+// import { ref } from 'vue';
+import sHeader from "@/components/SimpleHeader";
+</script>
+
+<template>
+    <div class="closingNotice flex-col">
+        <div class="closingNoticeBox">
+            <s-header :name="'成交通知'" :noback="false" :isFixed="false"></s-header>
+            订单成交通知
+        </div>
+    </div>
+</template>
+
+<style scoped></style>

+ 15 - 0
src/views/msgNotice/OrderMatchNotice.vue

@@ -0,0 +1,15 @@
+<script setup>
+// import { ref } from 'vue';
+import sHeader from "@/components/SimpleHeader";
+</script>
+
+<template>
+    <div class="orderMatchNotice flex-col">
+        <div class="orderMatchNoticeBox">
+            <s-header :name="'挂单匹配通知'" :noback="false" :isFixed="false"></s-header>
+            挂单匹配通知
+        </div>
+    </div>
+</template>
+
+<style scoped></style>

+ 69 - 2
src/views/position/PositionIndex.vue

@@ -15,13 +15,80 @@
         </div>
       </div>
 
-      <img class="img1" referrerpolicy="no-referrer" src="../../assets/line.png" />
+      <img class="pic1" src="../../assets/device/line.png" />
 
-      <div class="groove"></div>
+    </div>
+    <div>
+      <div class="o-plr-15 o-ptb-20">
+        <div class="bd1 flex-col">
+          <div class="box2 l-f l-flex-c l-flex-j-a">
+            <div class="TextGroup flex-col">
+              <div class="main6 flex-col justify-between align-center">
+                <span class="word5">11.5</span>
+                <span class="word6">现价</span>
+              </div>
+            </div>
 
+            <div class="TextGroup flex-col">
+              <div class="main6 flex-col justify-between align-center">
+                <span class="word5">100.8</span>
+                <span class="word6">当日盈亏</span>
+              </div>
+            </div>
 
+            <div class="TextGroup flex-col">
+              <div class="main6 flex-col justify-between align-center">
+                <span class="word5">2000.50</span>
+                <span class="word6">总盈亏</span>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <div class="positionBox">
+
+    </div>
+
+    <img class="img1" referrerpolicy="no-referrer" src="../../assets/line.png" />
+    <div class="groove"></div>
+
+    <div class="tradingHistory">
+      <!-- 交易历史 -->
+      <!-- <div class="baseRow flex-row justify-between">
+        <div class="group2 flex-col"></div>
+        <span class="baseText">交易历史</span>
+      </div> -->
+      <!-- 交易历史2 -->
+      <div class="searchRow flex-row justify-between">
+        <div class="flex-col">
+          <div class="flex-row justify-between bd3">
+            <div class="flex-col outer4"></div>
+            <span class="flex-col txt2">
+              交易历史</span>
+          </div>
+        </div>
+        <div class="flex-col">
+          <div class="main5 flex-row justify-between">
+            <van-popover v-model:show="showPopover" placement="left-start" theme="dark" :actions="actions"
+              @select="selectLabel">
+              <template #reference>
+                <van-icon name="bars" class="fixed-icon o-pr-15" size="23" color="#ff0077" />
+              </template>
+            </van-popover>
+            <img class="label2" src="../../assets/position/searchIcon.png" @click="searchClick" />
+          </div>
+        </div>        
+      </div>
+    </div>
+    <van-empty image="search" description="暂无交易历史" />
+
+
+    <div class="historyList">
       
     </div>
+
   </div>
 </template>
 

+ 20 - 2
src/views/taskMessage/index.vue

@@ -5,12 +5,30 @@
     <div class="taskMessageBox flex-col">
       <!-- 账号申请 -->
       <div class="taskListRow flex-col" @click="pushPageList('/taskAccountList')">
-        <div class="taskIcon retailIcon"></div>
+        <div class="taskIcon registerAccountIcon"></div>
         <div class="taskRight">
-          <div class="taskTitle">账号申请审批</div>
+          <div class="taskTitle">新人注册</div>
         </div>
       </div>
 
+      <!-- 挂单匹配通知 -->
+      <div class="taskListRow flex-col" @click="pushPageList('/orderMatchNotice')">
+        <div class="taskIcon orderMatchIcon"></div>
+        <div class="taskRight">
+          <div class="taskTitle">挂单匹配通知</div>
+        </div>
+      </div>
+
+      <!-- 成交通知 -->
+      <div class="taskListRow flex-col" @click="pushPageList('/closingNotice')">
+        <div class="taskIcon closingIcon"></div>
+        <div class="taskRight">
+          <div class="taskTitle">成交通知</div>
+        </div>
+      </div>
+
+      
+
     </div>
   </div>
 </template>

+ 57 - 0
src/views/trading/TradingBuy.vue

@@ -0,0 +1,57 @@
+<script setup>
+import { ref } from 'vue';
+import sHeader from "@/components/SimpleHeader";
+const buyNum = ref('');
+const unitPrice = ref('');
+const onSubmitBuy = (values) => {
+    console.log('submitBuy', values);
+};
+const handleInput = () => {
+    unitPrice.value = unitPrice.value.replace(/[^\d.]/g, '')
+    const parts = unitPrice.value.split('.');
+    if (parts.length > 2) {
+        unitPrice.value = parts[0] + '.' + parts[1];
+    }
+    if (parts.length === 2) {
+        unitPrice.value = parts[0] + '.' + parts[1].slice(0, 2);
+    }
+}
+
+
+</script>
+
+<template>
+    <div class="tradingBuy flex-col">
+        <div class="tradingBuyBox">
+            <s-header :name="'股票交易'" :noback="false" :isFixed="false"></s-header>
+
+            <div style="height: 200px;">
+                <van-tabs v-model:active="active" animated>
+                    <van-tab><template #title> <van-icon name="points" />买入股票 </template>
+                        <van-form @submit="onSubmitBuy">
+                            <van-cell-group inset>
+                                <van-field v-model="buyNum" type="digit" name="买入量" label="买入量" placeholder="买入量"
+                                    :rules="[{ required: true, message: '请填写买入量' }]" />
+
+                                <van-field v-model="unitPrice" type="number" name="单价" label="单价"
+                                    placeholder="每股单价,小数点后两位有效" :rules="[{ required: true, message: '请填写单价' }]"
+                                    @input="handleInput" />
+                            </van-cell-group>
+                            <div style="margin: 16px;">
+                                <van-button round block type="warning" native-type="submit" @click="showConfirmPopup">
+                                    提交
+                                </van-button>
+                                
+                                <van-popup v-model:show="showCenter" round :style="{ padding: '64px' }" >挂单后不可撤回</van-popup>
+                            </div>
+                        </van-form>
+
+                    </van-tab>
+                </van-tabs>
+            </div>
+
+        </div>
+    </div>
+</template>
+
+<style scoped></style>

+ 42 - 12
src/views/trading/TradingIndex.vue

@@ -51,10 +51,10 @@
 
       <!-- 卖家挂单详情 -->
       <div class="buy-box" style="text-align: center;">
-        <van-row justify="center" class="bold-row">
-          <van-col span="8">名</van-col>
+        <van-row justify="center" class="bold-row" style="font-weight: bold; color: #3CB371;">
+          <van-col span="8">用户名</van-col>
           <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>
@@ -66,6 +66,7 @@
           <van-col span="8">1500</van-col>
           <van-col span="8">11.21</van-col>
         </van-row>
+
       </div>
 
       <!-- 分割线 -->
@@ -88,10 +89,10 @@
       </div>
       <!-- 买家挂单详情 -->
       <div class="buy-box" style="text-align: center;">
-        <van-row justify="center" class="bold-row">
-          <van-col span="8">名</van-col>
+        <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-col span="8">单价</van-col>
         </van-row>
         <van-row justify="center">
           <van-col span="8">王五</van-col>
@@ -115,6 +116,18 @@
         </van-row>
       </div>
 
+      <div class="buy-box2" 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 v-for="(item, index) in buyerList" :key="index" justify="center">
+          <van-col span="8">买家{{ index + 1 }}</van-col>
+          <van-col span="8">{{ item.amount }}</van-col>
+          <van-col span="8">{{ item.price }}</van-col>
+        </van-row>
+      </div>
       <!-- 分割线 -->
       <img class="pic1" src="../../assets/trading/line.png" />
 
@@ -123,10 +136,12 @@
 
     <div style="height: 40px;"></div>
     <!-- 买卖按键 -->
-    <div>
+    <div class="buySellBtn">
       <van-row justify="space-around">
-        <van-col span="6"><van-button type="danger" size="large" icon="refund-o">买</van-button></van-col>
-        <van-col span="6"><van-button type="success" size="large" icon="after-sale">卖</van-button></van-col>
+        <van-col span="6"><van-button style="font-size: 20px;" color="linear-gradient(to right, #f718dd, #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>
       </van-row>
     </div>
 
@@ -135,9 +150,10 @@
     <!-- 分割线 -->
     <img class="pic1" src="../../assets/trading/line.png" />
     <!-- 交易历史记录 -->
-    <van-cell-group inset>
+    <!-- <van-cell-group inset>
       <van-cell title="交易历史记录" icon="underway-o" is-link to="transactionHistory"/>
-    </van-cell-group>
+    </van-cell-group> -->
+
 
 
     <div style="height: 100px;"></div>
@@ -184,6 +200,15 @@ export default {
 
     const countDownTime = ref(0);
 
+    const buyerList = ref([]);
+    buyerList.value = [
+      { name: '张三', amount: 100, price: 50 },
+      { name: '李四', amount: 90, price: 55 },
+      { name: '王五', amount: 80, price: 60 },
+      { name: '赵六', amount: 70, price: 65 },
+      { name: '钱七', amount: 60, price: 70 }
+    ];
+
     const calculateCountDownTime = () => {
       const nowTime = new Date();
       const endTime = new Date();
@@ -198,6 +223,9 @@ export default {
       }
     };
 
+    const pushPageList = (url) => {
+      router.push(url);
+    };
 
     // 返回顶部
     const backTop = () => {
@@ -451,7 +479,9 @@ export default {
       clickLabel,
       active,
       selectLabel,
-      countDownTime
+      countDownTime,
+      pushPageList,
+      buyerList
     };
   },
 };

+ 44 - 0
src/views/trading/TradingSell.vue

@@ -0,0 +1,44 @@
+<script setup>
+import { ref } from 'vue';
+import sHeader from "@/components/SimpleHeader";
+const buyNum = ref('');
+const unitPrice = ref('');
+const onSubmitSell = (values) => {
+    console.log('submitSell', values);
+};
+</script>
+
+<template>
+  <div class="tradingSell flex-col">
+    <div class="tradingSellBox">
+      <s-header :name="'股票交易'" :noback="false" :isFixed="false"></s-header>
+
+      <div style="height: 200px;">
+            <van-tabs v-model:active="active" animated>
+                <van-tab><template #title> <van-icon name="after-sale" />卖出股票 </template>
+
+                    <van-form @submit="onSubmitSell">
+                        <van-cell-group inset>
+                            <van-field v-model="buyNum" type="digit" name="卖出量" label="卖出量" placeholder="卖出量"
+                                :rules="[{ required: true, message: '请填写卖出量' }]" />
+
+                            <van-field v-model="unitPrice" type="number" name="单价" label="单价" placeholder="每股单价"
+                                :rules="[{ required: true, message: '请填写单价' }]" />
+                        </van-cell-group>
+                        <div style="margin: 16px;">
+                            <van-button round block type="success" native-type="submit">
+                                提交
+                            </van-button>
+                        </div>
+                    </van-form>
+
+                </van-tab>
+            </van-tabs>
+        </div>
+
+    </div>
+  </div>
+</template>
+
+<style scoped>
+</style>

+ 27 - 0
src/views/trading/TransactionHistory.vue

@@ -0,0 +1,27 @@
+<script setup>
+// import { ref } from 'vue';
+import sHeader from "@/components/SimpleHeader";
+
+</script>
+
+<template>
+    <div class="transactionHistory flex-col">
+        <div class="transactionHistoryBox">
+            <s-header :name="'交易历史记录'" :noback="false" :isFixed="false"></s-header>
+
+            <div class="tradingBox1 flex-col">
+                <div class="searchRow flex-row justify-between">
+                    <div class="flex-col">
+                        <div class="flex-row justify-between bd3">
+                            <div class="flex-col outer4"></div>
+                            <span class="flex-col txt2">交易历史</span>
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+        </div>
+    </div>
+</template>
+
+<style scoped></style>

+ 63 - 60
src/views/user/UserIndex.vue

@@ -13,32 +13,32 @@
         <div class="userMessage flex-row justify-between">
           <!-- 初始份额 stockNum -->
           <div class="userId">
-            <p class="userText">{{ accountDetail.stockNum }}</p>
-            <p class="userText">初始份额</p>
+            <!-- <p class="userText">{{ accountDetail.stockNum }}</p> -->
+            <p class="userText">5000</p>
+            <p class="userText">剩余份额</p>
           </div>
           <!-- 竖线 -->
           <div class="userLine"></div>
           <!-- 会员等级 level -->
           <div class="userId">
-            <template v-if="level <= 5">
-              <van-rate v-model="level" color="#ffd21e" readonly />
-            </template>
-            <template v-else>
-              <van-rate v-model="levelPro" icon="diamond" void-icon="diamond-o" color="#00ddff" readonly />
-            </template>
-            <p class="userText">会员等级</p>
+            <van-image v-for="(icon, index) in icons" :key="index" :src="icon" round width="0.4rem" height="0.4rem"
+              @click="showTop = true"></van-image>
+            <van-popup v-model:show="showTop" round position="top"
+              :style="{ height: '10%' }"><br />一个⭐代表1贡献值<br />一个🌙代表5贡献值</van-popup>
+            <p class="userText">奋斗贡献值</p>
           </div>
           <div class="userLine"></div>
           <!-- 用户名 userName -->
           <div class="userId">
-            <p class="userText">{{ accountDetail.userName }}</p>
+            <!-- <p class="userText">{{ accountDetail.userName }}</p> -->
+            <p class="userText">test</p>
             <p class="userText">用户名</p>
           </div>
         </div>
 
         <div class="userInfoBox">
           <!-- 手机号码 -->
-          <div v-if="user.type != '0'">
+          <div>
             <div v-if="!phoneNumberShow" class="userInfo l-flex-between">
               <span class="userInfoLeft">{{ $t("user.phoneNumber") }}: </span>
               <div>
@@ -60,7 +60,7 @@
             </div>
           </div>
           <!-- 邮箱 -->
-          <div v-if="user.type != '0'">
+          <div>
             <div v-if="!mailboxShow" class="userInfo l-flex-between">
               <span class="userInfoLeft">{{ $t("user.mailbox") }}: </span>
               <div>
@@ -81,12 +81,18 @@
             </div>
           </div>
 
-          <!-- 收款账号 payeeCode-->
+          <!-- 支付宝账号 payeeCode -->
           <div class="userInfo l-flex-between">
-            <span class="userInfoLeft">收款账号: </span>
+            <span class="userInfoLeft">支付宝账号: </span>
             <span>{{ accountDetail.payeeCode }}</span>
           </div>
 
+          <!-- 银行卡号 cardNo -->
+          <div class="userInfo l-flex-between">
+            <span class="userInfoLeft">银行卡号: </span>
+            <span>{{ hiddenCardNo }}</span>
+          </div>
+
         </div>
 
       </div>
@@ -128,12 +134,22 @@
           </div>
 
 
-          <!-- 公告编辑 -->
-          <div v-if="user.type == '0'" class="taskListRow flex-col" @click="pushPageList('/announcement')">
+          <!-- 首页通知 -->
+          <div class="taskListRow flex-col" @click="pushPageList('/announcement')">
             <div class="taskIcon announcementIcon"></div>
             <div class="taskRight">
               <div class="taskTitle">
-                {{ $t("user.announcement") }}
+                首页通知
+              </div>
+            </div>
+          </div>
+
+          <!-- 异议反馈 -->
+          <div class="taskListRow flex-col" @click="pushPageList('/objectionFeedback')">
+            <div class="taskIcon feedbackIcon"></div>
+            <div class="taskRight">
+              <div class="taskTitle">
+                异议反馈
               </div>
             </div>
           </div>
@@ -153,6 +169,7 @@
               <div class="taskTitle">{{ $t("user.logOut") }}</div>
             </div>
           </div>
+
         </div>
       </div>
     </div>
@@ -176,7 +193,7 @@ import { getAdmin } from "@/service/merchantManage";
 import { updateAdmin } from "@/service/merchantManage";
 // 引入弹窗
 import kDialog from "@/components/commom/kDialog/index.vue";
-import { onMounted, reactive, ref } from "vue";
+import { onMounted, reactive, ref, computed } from "vue";
 import sHeader from "@/components/SimpleHeader";
 // import navBar from "@/components/NavBar";
 import {
@@ -208,9 +225,6 @@ export default {
     const symbolShow = ref(true);
     // 控制DIY使用密码显示隐藏
     const diyPasswordShow = ref(true);
-    // 控制切换支付平台按钮显示隐藏
-    const chaSzPayShow = ref(false);
-    const chaScPayShow = ref(false);
 
     const diyPassword = ref("");
 
@@ -222,10 +236,25 @@ export default {
     const relationAdminName = ref("");
 
     const level = ref('');
-    level.value = '8';
+    // level.value = user.level;
+    level.value = user.id;
+    console.log("user.id >>>", user.id);
+
+    const starsCount = ref(Math.floor(level.value % 5));
+    const moonsCount = ref(Math.floor(level.value / 5));
+
+    const icons = computed(() => {
+      const iconsArray = [];
+      for (let i = 0; i < moonsCount.value; i++) {
+        iconsArray.push(require('@/assets/user/moon.png'));
+      }
+      for (let i = 0; i < starsCount.value; i++) {
+        iconsArray.push(require('@/assets/user/star.png'));
+      }
+      return iconsArray;
+    });
 
-    const levelPro = ref('');
-    levelPro.value = level.value - 5;
+    const showTop = ref(false);
 
     const relationType = ref(true);
     const sys = ref(null);
@@ -400,25 +429,18 @@ export default {
           break;
       }
     };
+
+    const hiddenCardNo = "23123123123128479187".replace(/^(.{6})(?:\w+)(.{4})$/, "$1********$2");
+    // const hiddenCardNo = user.cardNo.replace(/^(.{6})(?:\w+)(.{4})$/, "$1********$2");
+
+
     // 获取账户详情
     const getAcccountDetail = () => {
       getAdmin({ id: user.id }).then((res) => {
         accountDetail.value = res.data.data;
-        // 查询地址回显
-        kCascaderRef.value.init(accountDetail.value.areaId);
       });
     };
 
-    // 获取七云支付平台
-    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);
     // 点击右侧按钮
@@ -508,11 +530,6 @@ export default {
       gettAdminGetRelation();
       // 获取账户
       getAcccountDetail();
-      if (user.id == 1) {
-        chaSzPayShow.value = true;
-        chaScPayShow.value = true;
-        getSevenCloudDetail();
-      }
 
     });
     const gettAdminGetRelation = async () => {
@@ -540,17 +557,10 @@ export default {
         return menuList.length > 0;
       }
     };
-    // 地区弹窗
-    const fieldValue = ref("");
-    const kCascaderRef = ref(null);
-    // 点击地区输入框
-    const fieldValueInpClk = () => {
-      kCascaderRef.value.openPop();
-    };
+    
     // 选择地区完成
     const areaPopFinish = async (e) => {
       console.log("e", e);
-      fieldValue.value = e.selectName;
       accountDetail.value.areaId = e.selectId;
       const params = {
         id: user.id,
@@ -597,10 +607,7 @@ export default {
       checkIsAbroad();
       haveRelationCheck();
     })
-    // 获取回显的值
-    const getAreaName = (e) => {
-      fieldValue.value = e;
-    };
+  
     return {
       user,
       operUnipay,
@@ -620,19 +627,13 @@ export default {
       params,
       areaShow,
       accountDetail,
-      fieldValue,
-      kCascaderRef,
-      fieldValueInpClk,
       areaPopFinish,
       isInWeChat,
-      getAreaName,
       isAbroad,
       haveRelation,
       checkIsAbroad,
       isInland,
       symbolShow,
-      chaSzPayShow,
-      chaScPayShow,
       diyPasswordShow,
       diyPassword,
       sunzeePay,
@@ -640,7 +641,9 @@ export default {
       changeSunzeePay,
       changeSevenCloudPay,
       level,
-      levelPro
+      icons,
+      showTop,
+      hiddenCardNo
     };
   }
 };

+ 15 - 13
vue.config.js

@@ -1,30 +1,32 @@
 module.exports = {
-  outputDir: 'shenze',
+  outputDir: "shenze",
   publicPath: "/shenze",
-  assetsDir: 'static',
+  // publicPath: '/sunzee-stock',
+  assetsDir: "static",
   css: {
-    extract: false
+    extract: false,
   },
   filenameHashing: true,
   configureWebpack: {
     output: {
-      filename: '[name].[hash].js',
-      chunkFilename: '[id].[hash].chunk.js'
-    }
+      filename: "[name].[hash].js",
+      chunkFilename: "[id].[hash].chunk.js",
+    },
   },
   devServer: {
     open: true,
     proxy: {
-      '/': { //前端任何含/api的URL请求都会被反向代理。如http://localhost:8000/xxx/api/source/xxx的请求会变成服务器的反向代理请求
-        target: 'http://120.25.151.99:49011', //原来请求的服务器IP地址会换成此地址,如以上地址会变成http://localhost:5000/xxx/api/source/xxx
-        // target: 'http://112.74.63.148:49011', //原来请求的服务器IP地址会换成此地址,如以上地址会变成http://localhost:5000/xxx/api/source/xxx
+      "/": {
+        // 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, // 是否跨域
         pathRewrite: {
-          // '.+?/api': '/api'
-        } // 这里会对反向代理的地址进行重写。比如我的实际后端资源的URI是http://localhost:5000/api/resource,那么不加这个配置属性的话是访问不到我这个有效地址的。这里配置是一个正则替换,替换后就是后端api真正有效的地址了
+          // '.+?/api': '/api' // 对反向代理的地址进行重写,因为正确的接口路径是没有/api的,所以需要用'^/api': '/',表示请求接口时去掉api
+        },
       },
     },
     disableHostCheck: true,
-  }
-}
+  },
+};