liu_lake 5 miesięcy temu
rodzic
commit
f292c79521

+ 9 - 2
admin-ui/src/views/agent/modules/edit.vue

@@ -13,11 +13,11 @@ const formRef = ref<FormInstance>();
 // 初始化数据
 const initData = {
   userName: undefined,
+  rate: 0,
   password: undefined,
   status: 1
 };
 
-
 // 页面数据
 const pageData: any = reactive({
   dialogVisible: false,
@@ -148,7 +148,14 @@ defineExpose({open});
               :readonly="isDetail"
           />
         </el-form-item>
-
+        <el-form-item label="费率" prop="rate">
+          <el-input
+            v-model="pageData.formData.rate"
+            clearable
+            placeholder="请输入费率"
+            size="small"
+          />‰
+        </el-form-item>
         <el-form-item label="状态" prop="password">
           <el-select
               v-model="pageData.formData.status"

+ 5 - 0
admin-ui/src/views/agent/modules/list.vue

@@ -124,6 +124,11 @@ const pageData: any = reactive({
         prop: "hasTpop",
         slot: "totpOptions"
       },
+      {
+        label: "费率(‰)",
+        prop: "rate",
+        slot: "rate"
+      },
       {
         label: "状态",
         prop: "status",

+ 3 - 3
admin-ui/src/views/order/index.vue

@@ -128,12 +128,12 @@ const pageData: any = reactive({
       },
       {
         label: "手续费",
-        prop: "fee",
+        prop: "platformRateAmount",
         slot: "fee"
       },{
         label: "费率",
-        prop: "rate",
-        slot: "rate"
+        prop: "platformRate",
+        slot: "platformRate"
       },
       {
         label: "状态",

+ 2 - 1
agent-ui/src/api/auth/index.ts

@@ -6,9 +6,10 @@ import {get, post, Result} from "../base";
  * @param username 用户名
  * @param password 密码
  */
-export function login(username: string, password: string) {
+export function login(username: string, password: string, google: string) {
   return post<any, Result<any>>("/auth/login", {
     username: username,
+    google: google,
     password: RSA.encrypt(password)
   });
 }

+ 3 - 1
agent-ui/src/store/modules/auth.ts

@@ -15,6 +15,7 @@ import router, { resetRouter } from "@/router";
 export type LoginRequest = {
   username: string;
   password: string;
+  google: string;
   remember?: boolean;
 };
 /**
@@ -26,6 +27,7 @@ export const authStore = defineStore({
     loginUser: storageLocal().getItem<LoginRequest>("login_info") ?? {
       username: "",
       password: "",
+      google: "",
       remember: false
     },
     userInfo: storageSession().getItem<AuthInfo>(authInfoKey),
@@ -60,7 +62,7 @@ export const authStore = defineStore({
      */
     login(data: LoginRequest): Promise<Result<any>> {
       this.cacheRemember(data);
-      return login(data.username, data.password).then((res: any) => {
+      return login(data.username, data.password, data.google).then((res: any) => {
         if (res.success) {
           cacheAuth(res.result);
         }

+ 4 - 4
agent-ui/src/views/channel/modules/edit.vue

@@ -168,11 +168,11 @@ defineExpose({open});
             :readonly="isDetail"
           />
         </el-form-item>
-        <el-form-item label="商户ID" prop="sellerId">
+        <el-form-item label="商户" prop="sellerId">
           <el-input
             v-model="pageData.formData.sellerId"
             clearable
-            placeholder="请输入商户ID"
+            placeholder="请输入商户"
             size="small"
             :readonly="isDetail"
           />
@@ -196,13 +196,13 @@ defineExpose({open});
           />
         </el-form-item>
         <el-form-item label="统一费率" prop="rate">
-          <el-input
+          <el-input-number
             v-model="pageData.formData.rate"
             clearable
             placeholder="请输入统一费率"
             size="small"
             :readonly="isDetail"
-          />
+          />
         </el-form-item>
         <el-form-item label="状态" prop="password">
           <el-select

+ 2 - 2
agent-ui/src/views/channel/modules/list.vue

@@ -115,7 +115,7 @@ const pageData: any = reactive({
         slot: "code"
       },
       {
-        label: "商户Id",
+        label: "商户",
         prop: "sellerId",
         slot: "sellerId"
       },
@@ -130,7 +130,7 @@ const pageData: any = reactive({
         slot: "onePayMaxAmount"
       },
       {
-        label: "统一费率",
+        label: "统一费率(‰)",
         prop: "rate",
         slot: "rate"
       },

+ 15 - 0
agent-ui/src/views/login/index.vue

@@ -36,6 +36,7 @@ const { title } = useNav();
 const ruleForm = reactive({
   username: "",
   password: "",
+  google: "",
   remember: false
 });
 
@@ -59,6 +60,7 @@ const onLogin = async (formEl: FormInstance | undefined) => {
         .login({
           username: ruleForm.username,
           password: ruleForm.password,
+          google: ruleForm.google,
           remember: ruleForm.remember
         })
         .then(res => {
@@ -165,6 +167,19 @@ onBeforeUnmount(() => {
                 />
               </el-form-item>
             </Motion>
+
+            <Motion :delay="200">
+              <el-form-item prop="google">
+                <el-input
+                  v-model="ruleForm.google"
+                  clearable
+                  placeholder="谷歌验证码"
+                  :prefix-icon="useRenderIcon('ri:shield-keyhole-line')"
+                >
+
+                </el-input>
+              </el-form-item>
+            </Motion>
             <Motion :delay="150">
               <el-form-item prop="remember">
                 <div class="w-full h-20px flex justify-between items-center">

+ 6 - 5
agent-ui/src/views/order/index.vue

@@ -128,12 +128,13 @@ const pageData: any = reactive({
       },
       {
         label: "手续费",
-        prop: "fee",
-        slot: "fee"
-      },{
+        prop: "agentRateAmount",
+        slot: "agentRateAmount"
+      },
+      {
         label: "费率",
-        prop: "rate",
-        slot: "rate"
+        prop: "agentRate",
+        slot: "agentRate"
       },
       {
         label: "状态",

+ 2 - 1
merchant-ui/src/api/auth/index.ts

@@ -6,9 +6,10 @@ import {get, post, Result} from "../base";
  * @param username 用户名
  * @param password 密码
  */
-export function login(username: string, password: string) {
+export function login(username: string, password: string, google: string) {
   return post<any, Result<any>>("/auth/login", {
     username: username,
+    google: google,
     password: RSA.encrypt(password)
   });
 }

+ 3 - 1
merchant-ui/src/store/modules/auth.ts

@@ -15,6 +15,7 @@ import router, { resetRouter } from "@/router";
 export type LoginRequest = {
   username: string;
   password: string;
+  google: string;
   remember?: boolean;
 };
 /**
@@ -25,6 +26,7 @@ export const authStore = defineStore({
   state: () => ({
     loginUser: storageLocal().getItem<LoginRequest>("login_info") ?? {
       username: "",
+      google: "",
       password: "",
       remember: false
     },
@@ -60,7 +62,7 @@ export const authStore = defineStore({
      */
     login(data: LoginRequest): Promise<Result<any>> {
       this.cacheRemember(data);
-      return login(data.username, data.password).then((res: any) => {
+      return login(data.username, data.password, data.google).then((res: any) => {
         if (res.success) {
           cacheAuth(res.result);
         }

+ 15 - 1
merchant-ui/src/views/login/index.vue

@@ -36,6 +36,7 @@ const { title } = useNav();
 const ruleForm = reactive({
   username: "",
   password: "",
+  google: "",
   remember: false
 });
 
@@ -59,6 +60,7 @@ const onLogin = async (formEl: FormInstance | undefined) => {
         .login({
           username: ruleForm.username,
           password: ruleForm.password,
+          google: ruleForm.google,
           remember: ruleForm.remember
         })
         .then(res => {
@@ -165,6 +167,19 @@ onBeforeUnmount(() => {
                 />
               </el-form-item>
             </Motion>
+
+            <Motion :delay="200">
+              <el-form-item prop="google">
+                <el-input
+                  v-model="ruleForm.google"
+                  clearable
+                  placeholder="谷歌验证码"
+                  :prefix-icon="useRenderIcon('ri:shield-keyhole-line')"
+                >
+
+                </el-input>
+              </el-form-item>
+            </Motion>
             <Motion :delay="150">
               <el-form-item prop="remember">
                 <div class="w-full h-20px flex justify-between items-center">
@@ -174,7 +189,6 @@ onBeforeUnmount(() => {
                 </div>
               </el-form-item>
             </Motion>
-
             <Motion :delay="250">
               <el-button
                 class="w-full mt-4"

+ 0 - 9
merchant-ui/src/views/order/index.vue

@@ -126,15 +126,6 @@ const pageData: any = reactive({
         prop: "amount",
         slot: "amount"
       },
-      {
-        label: "手续费",
-        prop: "fee",
-        slot: "fee"
-      },{
-        label: "费率",
-        prop: "rate",
-        slot: "rate"
-      },
       {
         label: "状态",
         prop: "status",