Compare commits
1 Commits
main
...
gyq_openag
| Author | SHA1 | Date | |
|---|---|---|---|
| 786bceb7a4 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,7 +10,6 @@ lerna-debug.log*
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
dist.zip
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
|
||||
26
index.html
26
index.html
@@ -1,16 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favico.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>vue admin</title>
|
||||
</head>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favico.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>vue admin</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "vue-admin",
|
||||
"private": true,
|
||||
"version": "1.3.7",
|
||||
"version": "1.3.3",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -273,16 +273,3 @@ export function updateAuthentication(params) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 收银点列表
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
export function queryMerchantCashPlace(params) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/agency/queryMerchantCashPlace',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import request from "@/utils/request.js";
|
||||
export function login(data) {
|
||||
return request({
|
||||
method: "POST",
|
||||
url: "/user/doLogin",
|
||||
url: "agent/login",
|
||||
data,
|
||||
});
|
||||
}
|
||||
@@ -26,3 +26,16 @@ export function getNotices(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
export function register(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/agent/register',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
NProgress.start();
|
||||
const token = _hook.useLocalStorage.get("token");
|
||||
const storeUser = useUser();
|
||||
if (to.path === "/login" && !token) {
|
||||
if ((to.path === "/login" || to.path === "/register") && !token) {
|
||||
next();
|
||||
NProgress.done();
|
||||
} else {
|
||||
|
||||
@@ -59,6 +59,15 @@ export const fullScreenRouting = [
|
||||
isHide: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/register",
|
||||
name: "register",
|
||||
component: () => import("@/views/register/register.vue"),
|
||||
meta: {
|
||||
title: "注册",
|
||||
isHide: true,
|
||||
},
|
||||
}
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -280,7 +289,7 @@ export const asyncRoutes = [
|
||||
component: layout,
|
||||
meta: {
|
||||
title: '大机构管理',
|
||||
roles: ['MG'],
|
||||
// roles: ['MG'],
|
||||
isHide: true
|
||||
},
|
||||
redirect: '/organization/big_organization',
|
||||
@@ -310,7 +319,7 @@ export const asyncRoutes = [
|
||||
component: layout,
|
||||
meta: {
|
||||
title: '小机构管理',
|
||||
roles: ['FO'],
|
||||
// roles: ['FO'],
|
||||
isHide: true
|
||||
},
|
||||
redirect: '/mini_organization_manage/mini_organization',
|
||||
@@ -340,7 +349,7 @@ export const asyncRoutes = [
|
||||
component: layout,
|
||||
meta: {
|
||||
title: '大代理管理',
|
||||
roles: ['FO', 'SO'],
|
||||
// roles: ['FO', 'SO'],
|
||||
isHide: true
|
||||
},
|
||||
redirect: '/agent_manage/agent_list',
|
||||
@@ -370,7 +379,7 @@ export const asyncRoutes = [
|
||||
meta: {
|
||||
title: '一级代理',
|
||||
icon: 'User',
|
||||
roles: ['FO', 'SO', 'AG']
|
||||
// roles: ['FO', 'SO', 'AG']
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -379,7 +388,7 @@ export const asyncRoutes = [
|
||||
meta: {
|
||||
title: '二级代理',
|
||||
icon: 'User',
|
||||
roles: ['FO', 'SO', 'AG', 'FB']
|
||||
// roles: ['FO', 'SO', 'AG', 'FB']
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -389,7 +398,7 @@ export const asyncRoutes = [
|
||||
component: layout,
|
||||
meta: {
|
||||
title: '商家管理',
|
||||
roles: ['FO', 'SO', 'AG', 'FB', 'SB'],
|
||||
// roles: ['FO', 'SO', 'AG', 'FB', 'SB'],
|
||||
icon: 'Handbag'
|
||||
},
|
||||
redirect: '/shop_manage/shop_list',
|
||||
@@ -420,25 +429,6 @@ export const asyncRoutes = [
|
||||
title: '创客申请',
|
||||
icon: 'User'
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: '/shop_manage/cashier_dot',
|
||||
// component: () => import('@/views/organization/cashier_dot.vue'),
|
||||
// meta: {
|
||||
// title: '收银点列表',
|
||||
// icon: 'PieChart',
|
||||
// roles: ['MG']
|
||||
// }
|
||||
// },
|
||||
{
|
||||
path: '/shop_manage/cashierdot_detail',
|
||||
name: 'cashierdot_detail',
|
||||
component: () => import('@/views/organization/cashierdot_detail.vue'),
|
||||
meta: {
|
||||
title: '详情',
|
||||
isHide: true,
|
||||
activeMenu: '/shop_manage/cashier_dot'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -447,7 +437,7 @@ export const asyncRoutes = [
|
||||
component: layout,
|
||||
meta: {
|
||||
title: '提现管理',
|
||||
roles: ['FO', 'SO'],
|
||||
// roles: ['FO', 'SO'],
|
||||
isHide: true
|
||||
},
|
||||
redirect: '/withdraw_manage/withdraw_list',
|
||||
@@ -506,7 +496,7 @@ export const asyncRoutes = [
|
||||
meta: {
|
||||
title: '推广图片管理',
|
||||
isHide: true,
|
||||
roles: ['MG']
|
||||
// roles: ['MG']
|
||||
},
|
||||
redirect: '/promotion/promotion_list',
|
||||
children: [
|
||||
@@ -526,7 +516,7 @@ export const asyncRoutes = [
|
||||
meta: {
|
||||
title: 'APP管理',
|
||||
icon: 'Iphone',
|
||||
roles: ['MG']
|
||||
// roles: ['MG']
|
||||
},
|
||||
redirect: '/app_manage/menu_list',
|
||||
children: [
|
||||
@@ -546,7 +536,7 @@ export const asyncRoutes = [
|
||||
meta: {
|
||||
title: '系统设置',
|
||||
icon: 'Setting',
|
||||
roles: ['MG']
|
||||
// roles: ['MG']
|
||||
},
|
||||
redirect: '/setting/appid_manage',
|
||||
children: [
|
||||
@@ -566,7 +556,7 @@ export const asyncRoutes = [
|
||||
meta: {
|
||||
title: '消息管理',
|
||||
isHide: true,
|
||||
roles: ['MG']
|
||||
// roles: ['MG']
|
||||
},
|
||||
redirect: '/notice/index',
|
||||
children: [
|
||||
|
||||
@@ -30,9 +30,9 @@ export const useUser = defineStore("useUser", {
|
||||
userlogin(param) {
|
||||
return login(param).then((res) => {
|
||||
// console.log(res);
|
||||
this.userInfo = res;
|
||||
this.userInfo = res.userinfo;
|
||||
_hook.useLocalStorage.set("token", this.userInfo.token);
|
||||
_hook.useLocalStorage.set("userInfo", this.userInfo.user);
|
||||
_hook.useLocalStorage.set("userInfo", this.userInfo);
|
||||
return this.userInfo;
|
||||
});
|
||||
},
|
||||
|
||||
@@ -39,7 +39,7 @@ service.interceptors.response.use(
|
||||
NProgress.done();
|
||||
// 对响应数据做点什么
|
||||
if (+response.status === 200) {
|
||||
if (+response.data.code == '000000') {
|
||||
if (+response.data.code == 1) {
|
||||
return response.data.data;
|
||||
} else if (+response.data.code == '999999') {
|
||||
ElMessage.error('登录已过期,请重新登录')
|
||||
@@ -49,8 +49,8 @@ service.interceptors.response.use(
|
||||
return Promise.reject('登录已过期,请重新登录')
|
||||
} else {
|
||||
// 响应错误
|
||||
ElMessage.error(response.data.message)
|
||||
return Promise.reject(response.data.message)
|
||||
ElMessage.error(response.data.msg)
|
||||
return Promise.reject(response.data.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2,23 +2,23 @@
|
||||
<div class="login-case">
|
||||
<div class="form-case">
|
||||
<span class="Hello">Hello !</span>
|
||||
<span class="title">欢迎来到银收客</span>
|
||||
<span class="title">欢迎登录银收客开放平台代理</span>
|
||||
<el-form ref="ruleFormRef" :rules="rules" :model="form">
|
||||
<el-form-item prop="loginName">
|
||||
<el-input class="inp" v-model="form.loginName" clearable autocomplete="new-password" size="large"
|
||||
:prefix-icon="User" placeholder="请输入账号" style="width: 100%;" />
|
||||
:prefix-icon="User" placeholder="请输入手机号" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input class="inp" v-model="form.password" clearable autocomplete="new-password" size="large" type="password"
|
||||
:prefix-icon="Lock" placeholder="请输入密码" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<!-- <el-form-item>
|
||||
<el-select v-model="form.userType" placeholder="请选择机构类型" size="large" style="width: 100%;">
|
||||
<el-option key="MG" label="平台" value="MG"></el-option>
|
||||
<el-option key="FO" label="大机构" value="FO"></el-option>
|
||||
<el-option key="SO" label="小机构" value="SO"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item prop="code">
|
||||
<div class="code-case">
|
||||
<el-input class="inp" v-model="form.code" clearable autocomplete="new-password" size="large"
|
||||
@@ -26,6 +26,11 @@
|
||||
<verificationCode @getCode="getCode" :key="verificationCodeKey"></verificationCode>
|
||||
</div>
|
||||
</el-form-item> -->
|
||||
<div class="to_register">
|
||||
<router-link :to="{ name: 'register' }">
|
||||
<el-text type="primary">注册代理商</el-text>
|
||||
</router-link>
|
||||
</div>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="large" :loading="loading" @click="login" style="width: 100%;">登录</el-button>
|
||||
</el-form-item>
|
||||
@@ -63,8 +68,8 @@ function getCode(code) {
|
||||
}
|
||||
|
||||
const form = reactive({
|
||||
loginName: "",
|
||||
password: "",
|
||||
loginName: "15619297569",
|
||||
password: "123456",
|
||||
userType: 'MG',
|
||||
code: "",
|
||||
});
|
||||
@@ -107,9 +112,9 @@ async function login() {
|
||||
if (valid) {
|
||||
loading.value = true
|
||||
const params = {
|
||||
loginName: form.loginName,
|
||||
password: form.password,
|
||||
userType: form.userType
|
||||
account: form.loginName,
|
||||
password: form.password
|
||||
// userType: form.userType
|
||||
};
|
||||
store.userlogin(params).then((res) => {
|
||||
router.replace("/home");
|
||||
@@ -166,4 +171,11 @@ _hook.useKeyStroke("Enter", login);
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.to_register {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
font-size: 14px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
<template>
|
||||
<div class="card">
|
||||
<el-space>
|
||||
<el-input v-model="tableOptions.phone" placeholder="请输入手机号" style="width: 200px;" />
|
||||
<el-input v-model="tableOptions.name" placeholder="请输入姓名" style="width: 200px;" />
|
||||
<el-button type="primary" icon="Search" @click="searchHandle">搜索</el-button>
|
||||
<el-button icon="RefreshRight" @click="resizeTable">重置</el-button>
|
||||
</el-space>
|
||||
<div class="table mt15">
|
||||
<el-table ref="table" :data="tableOptions.list" border height="100%" v-loading="tableOptions.loading">
|
||||
<el-table-column prop="name" label="收银点名称"></el-table-column>
|
||||
<el-table-column prop="subcode" label="收银点code"></el-table-column>
|
||||
<el-table-column prop="address" label="收银点地址"></el-table-column>
|
||||
<el-table-column prop="masterName" label="店铺名称"></el-table-column>
|
||||
<el-table-column label="操作" width="120">
|
||||
<template #default="scope">
|
||||
<RouterLink
|
||||
:to="{ name: 'cashierdot_detail', query: { id: scope.row.masterUserId, name: scope.row.name, account: scope.row.subcode, merchantcode: scope.row.masterCode } }">
|
||||
<el-button type="primary" size="small" icon="Search" v-permission="['MG']">
|
||||
商户详情
|
||||
</el-button>
|
||||
</RouterLink>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="mt15">
|
||||
<el-pagination layout="prev, pager, next, total, sizes, jumper" background
|
||||
v-model:current-page="tableOptions.pageNum" v-model:page-size="tableOptions.pageSzie"
|
||||
:page-size="tableOptions.pageSzie" :page-sizes="[10, 20, 30, 50]" :total="tableOptions.total"
|
||||
@size-change="paginationChange" @current-change="paginationChange" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted } from 'vue';
|
||||
import { dayjs, ElMessage } from 'element-plus';
|
||||
import { queryMerchantCashPlace } from '@/api/shop.js'
|
||||
|
||||
const table = ref(null)
|
||||
|
||||
|
||||
// 表格参数
|
||||
const tableOptions = reactive({
|
||||
loading: true,
|
||||
phone: '',
|
||||
name: '',
|
||||
list: [],
|
||||
total: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
})
|
||||
|
||||
// 重置表格
|
||||
function resizeTable() {
|
||||
tableOptions.phone = ''
|
||||
tableOptions.name = ''
|
||||
searchHandle()
|
||||
}
|
||||
|
||||
// 搜索
|
||||
function searchHandle() {
|
||||
tableOptions.pageNum = 1;
|
||||
paginationChange()
|
||||
}
|
||||
|
||||
// 分页回调
|
||||
function paginationChange() {
|
||||
tableOptions.loading = true
|
||||
getUserMarkAjax()
|
||||
}
|
||||
|
||||
// 审核
|
||||
async function checkHandle(row, type) {
|
||||
try {
|
||||
await updateUserMark({
|
||||
status: type,
|
||||
id: row.userId,
|
||||
remark: ''
|
||||
})
|
||||
ElMessage.success('提交成功')
|
||||
resizeTable()
|
||||
} catch (error) {
|
||||
}
|
||||
}
|
||||
|
||||
// 获取创客审核列表
|
||||
async function getUserMarkAjax() {
|
||||
try {
|
||||
const res = await queryMerchantCashPlace({
|
||||
pageNum: tableOptions.pageNum,
|
||||
pageSzie: tableOptions.pageSize
|
||||
})
|
||||
tableOptions.loading = false
|
||||
tableOptions.list = res.list
|
||||
tableOptions.total = res.total
|
||||
table.value.setScrollTop(0)
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getUserMarkAjax()
|
||||
})
|
||||
</script>
|
||||
@@ -1,270 +0,0 @@
|
||||
<template>
|
||||
<div class="card">
|
||||
<div class="nav_wrap">
|
||||
<el-radio-group v-model="type">
|
||||
<el-radio-button :label="item.type" v-for="item in navs" :key="item.type">
|
||||
{{ item.label }}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div class="container mt15">
|
||||
<div class="compont_wrap">
|
||||
<component :is="componentList[type]" />
|
||||
</div>
|
||||
<div class="shop_info">
|
||||
<div class="header">
|
||||
<el-text size="large">商户关联信息</el-text>
|
||||
</div>
|
||||
<div class="title_wrap">
|
||||
<el-text>身份信息关联(进件成功的)商户数量</el-text>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="row">
|
||||
<el-space>
|
||||
<el-text>实名身份证</el-text>
|
||||
<el-text type="warning" tag="ins">{{ authInfo.CertNoCount }}</el-text>
|
||||
</el-space>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-space>
|
||||
<el-text>结算身份证</el-text>
|
||||
<el-text type="warning" tag="ins">{{ authInfo.countMbiName }}</el-text>
|
||||
</el-space>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-space>
|
||||
<el-text>同名商户</el-text>
|
||||
<el-text type="warning" tag="ins">{{ authInfo.countAccountCount }}</el-text>
|
||||
</el-space>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title_wrap">
|
||||
<el-text>用户IP记录</el-text>
|
||||
</div>
|
||||
<div class="mt15">
|
||||
<el-table :data="tableOptions.list" border height="200" v-loading="tableOptions.loading">
|
||||
<el-table-column prop="ip" label="IP地址"></el-table-column>
|
||||
<el-table-column prop="remark" label="操作"></el-table-column>
|
||||
<el-table-column prop="createtime" label="操作时间">
|
||||
<template #default="scope">
|
||||
{{ dayjs(scope.row.createtime).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="mt15">
|
||||
<el-pagination layout="prev, pager, next, total, sizes, jumper" background
|
||||
v-model:current-page="tableOptions.pageNum" v-model:page-size="tableOptions.pageSzie" small
|
||||
:page-size="tableOptions.pageSzie" :page-sizes="[10, 20, 30, 50]" :total="tableOptions.total"
|
||||
@size-change="paginationChange" @current-change="paginationChange" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { connectInfo, merchBaseInfo, merchantInfoDetail, merchBaseAccount, messageChannel, userIpPage, merchLicense } from '@/api/shop.js'
|
||||
|
||||
import authentication from './components/authentication.vue'
|
||||
import shopInfo from './components/shopInfo.vue'
|
||||
import settleInfo from './components/settleInfo.vue'
|
||||
import aisleInfo from './components/aisleInfo.vue'
|
||||
import businessLicense from './components/businessLicense.vue'
|
||||
|
||||
import { useRoute } from 'vue-router'
|
||||
import { reactive } from 'vue'
|
||||
import { dayjs } from 'element-plus'
|
||||
const route = useRoute()
|
||||
|
||||
const authInfo = ref({})
|
||||
|
||||
const type = ref(1)
|
||||
|
||||
const componentList = {
|
||||
1: authentication,
|
||||
2: shopInfo,
|
||||
3: businessLicense,
|
||||
4: settleInfo,
|
||||
5: aisleInfo
|
||||
}
|
||||
|
||||
const navs = reactive([])
|
||||
|
||||
// 表格参数
|
||||
const tableOptions = reactive({
|
||||
loading: true,
|
||||
list: [],
|
||||
total: 0,
|
||||
pageNum: 1,
|
||||
pageSzie: 10
|
||||
})
|
||||
|
||||
// 分页回调
|
||||
function paginationChange() {
|
||||
tableOptions.loading = true
|
||||
userIpPageAjax()
|
||||
}
|
||||
|
||||
// 实名认证信息页面(实名个数)
|
||||
async function connectInfoAjax() {
|
||||
try {
|
||||
const res = await connectInfo(route.query.id)
|
||||
authInfo.value = res
|
||||
} catch (error) {
|
||||
console.log('实名认证信息页面error:', error)
|
||||
}
|
||||
}
|
||||
|
||||
// ip记录
|
||||
async function userIpPageAjax() {
|
||||
try {
|
||||
const res = await userIpPage({
|
||||
userId: route.query.id,
|
||||
currPage: tableOptions.pageNum,
|
||||
size: tableOptions.pageSzie
|
||||
})
|
||||
tableOptions.loading = false
|
||||
tableOptions.list = res.list
|
||||
tableOptions.total = res.total
|
||||
} catch (error) {
|
||||
console.log('ip记录', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 实名认证信息
|
||||
async function merchantInfoDetailAjax() {
|
||||
try {
|
||||
const res = await merchantInfoDetail(route.query.id)
|
||||
if (res.bankCard.bankname) {
|
||||
navs.push(
|
||||
{
|
||||
type: 1,
|
||||
label: '实名认证信息'
|
||||
}
|
||||
)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('实名认证信息===', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 商户基本信息
|
||||
async function merchBaseInfoAjax() {
|
||||
try {
|
||||
const res = await merchBaseInfo(route.query.id)
|
||||
if (res.merchantBaseInfo.mccname) {
|
||||
navs.push(
|
||||
{
|
||||
type: 2,
|
||||
label: '商户基本信息'
|
||||
}
|
||||
)
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('商户基本信息===', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 营业执照信息
|
||||
async function merchLicenseAjax() {
|
||||
try {
|
||||
const res = await merchLicense(route.query.id)
|
||||
if (res.license.principalperson) {
|
||||
navs.push(
|
||||
{
|
||||
type: 3,
|
||||
label: '营业执照信息'
|
||||
}
|
||||
)
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('商户基本信息===', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 结算信息
|
||||
async function merchBaseAccountAjax() {
|
||||
try {
|
||||
const res = await merchBaseAccount(route.query.id)
|
||||
if (res.D0.bankCard) {
|
||||
navs.push(
|
||||
{
|
||||
type: 4,
|
||||
label: '结算信息'
|
||||
}
|
||||
)
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('结算信息===', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 通道进件信息
|
||||
async function messageChannelAjax() {
|
||||
try {
|
||||
const res = await messageChannel(route.query.id, route.query.merchantcode)
|
||||
if (res.merchantChannelMessage.length) {
|
||||
navs.push(
|
||||
{
|
||||
type: 5,
|
||||
label: '通道进件信息'
|
||||
}
|
||||
)
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('通道进件信息===', error)
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
tableOptions.loading = false
|
||||
connectInfoAjax()
|
||||
userIpPageAjax()
|
||||
await merchantInfoDetailAjax()
|
||||
await merchBaseInfoAjax()
|
||||
await merchLicenseAjax()
|
||||
await merchBaseAccountAjax()
|
||||
await messageChannelAjax()
|
||||
type.value = navs[0].type
|
||||
if (route.query.type && route.query.type == 'msg1') {
|
||||
type.value = 5
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import './components/common.scss';
|
||||
|
||||
.nav_wrap {
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 1px solid #ececec;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
|
||||
.compont_wrap {
|
||||
flex: 2;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.shop_info {
|
||||
flex: 1;
|
||||
|
||||
.header {
|
||||
padding-bottom: 14px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 14px 20px;
|
||||
|
||||
.row {
|
||||
&:not(:first-child) {
|
||||
margin-top: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,17 +1,6 @@
|
||||
<template>
|
||||
<div class="img_box" v-if="fileList.length">
|
||||
<el-image :src="fileList[0].url" style="width: 150px;height: 150px;display: block;" fit="cover"></el-image>
|
||||
<div class="mask">
|
||||
<el-icon @click="previewHandle({ url: fileList[0].url })">
|
||||
<Search />
|
||||
</el-icon>
|
||||
<el-icon @click="fileList = []">
|
||||
<Delete />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
<el-upload ref="uploadRef" v-model:file-list="fileList" list-type="picture-card" :limit="1" :on-exceed="handleExceed"
|
||||
:auto-upload="false" @change="selectFile" @remove="removeFile" @preview="previewHandle" v-else>
|
||||
:auto-upload="false" @change="selectFile" @remove="removeFile" @preview="previewHandle">
|
||||
<el-icon>
|
||||
<Plus />
|
||||
</el-icon>
|
||||
@@ -67,35 +56,4 @@ defineExpose({
|
||||
.img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.img_box {
|
||||
position: relative;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
|
||||
.mask {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.mask {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
display: none;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
font-size: 18px;
|
||||
gap: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -26,11 +26,11 @@
|
||||
<el-input v-model="item.valid" disabled placeholder="请输入默认结算方式" style="width: 50%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="微信小程序appid">
|
||||
<el-input v-model="item.wxLiteAppId" :disabled="item.thirdStatus != '-100'" placeholder="请输入微信小程序appid"
|
||||
<el-input v-model="item.wxLiteAppld" :disabled="item.thirdStatus != '-100'" placeholder="请输入微信小程序appid"
|
||||
style="width: 50%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="微信公众号appld">
|
||||
<el-input v-model="item.wxPubAppId" :disabled="item.thirdStatus != '-100'" placeholder="请输入微信公众号appld"
|
||||
<el-input v-model="item.wxPubAppld" :disabled="item.thirdStatus != '-100'" placeholder="请输入微信公众号appld"
|
||||
style="width: 50%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="微信公众号支付路径">
|
||||
@@ -105,8 +105,8 @@ async function submitHandle(state, index) {
|
||||
errMsg: form.value[index].remake || '',
|
||||
userId: route.query.id,
|
||||
channelId: form.value[index].channel || '',
|
||||
wxLiteAppId: form.value[index].wxLiteAppId,
|
||||
wxPubAppId: form.value[index].wxPubAppId,
|
||||
wxLiteAppld: form.value[index].wxLiteAppld,
|
||||
wxPubAppld: form.value[index].wxPubAppld,
|
||||
wxPubPath: form.value[index].wxPubPath
|
||||
})
|
||||
loading.value = false
|
||||
|
||||
187
src/views/register/register.vue
Normal file
187
src/views/register/register.vue
Normal file
@@ -0,0 +1,187 @@
|
||||
<template>
|
||||
<div class="login-case">
|
||||
<div class="form-case">
|
||||
<span class="Hello">Hello !</span>
|
||||
<span class="title">欢迎注册银收客开放平台代理</span>
|
||||
<el-form ref="ruleFormRef" :rules="rules" :model="form">
|
||||
<el-form-item prop="loginName">
|
||||
<el-input class="inp" v-model="form.loginName" clearable autocomplete="new-password" size="large"
|
||||
:prefix-icon="User" placeholder="请输入昵称" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input class="inp" v-model="form.password" clearable autocomplete="new-password" size="large"
|
||||
type="password" :prefix-icon="Lock" placeholder="请输入手机号" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item>
|
||||
<el-select v-model="form.userType" placeholder="请选择机构类型" size="large" style="width: 100%;">
|
||||
<el-option key="MG" label="平台" value="MG"></el-option>
|
||||
<el-option key="FO" label="大机构" value="FO"></el-option>
|
||||
<el-option key="SO" label="小机构" value="SO"></el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item prop="code">
|
||||
<div class="code-case">
|
||||
<el-input class="inp" v-model="form.code" clearable autocomplete="new-password" size="large"
|
||||
:prefix-icon="CircleCheck" width="100px" placeholder="验证码" />
|
||||
<verificationCode @getCode="getCode" :key="verificationCodeKey"></verificationCode>
|
||||
</div>
|
||||
</el-form-item> -->
|
||||
<div class="to_register">
|
||||
<router-link :to="{ name: 'login' }">
|
||||
<el-text type="primary">登录代理商</el-text>
|
||||
</router-link>
|
||||
</div>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="large" :loading="loading" @click="login"
|
||||
style="width: 100%;">注册</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import verificationCode from "@/components/verificationCode.vue"
|
||||
import { User, Lock, CircleCheck } from "@element-plus/icons-vue"
|
||||
import { useUser } from "@/store/user.js"
|
||||
import { register } from "@/api/user.js"
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
const ruleFormRef = ref("");
|
||||
const store = useUser();
|
||||
const router = useRouter();
|
||||
const loading = ref(false)
|
||||
|
||||
onMounted(() => {
|
||||
// ElMessage({
|
||||
// message: "请使用用户名为 admin、yonghu1、yonghu2 进行登录测试,来获取不同的权限",
|
||||
// type: "success",
|
||||
// duration: 5000,
|
||||
// });
|
||||
});
|
||||
|
||||
let verificationCodeKey = ref(0);
|
||||
let trueCode = ref("");
|
||||
|
||||
/**
|
||||
* @description: 获取正确的验证码值
|
||||
* @param {*} code: 正确的验证码
|
||||
*/
|
||||
function getCode(code) {
|
||||
trueCode.value = code;
|
||||
}
|
||||
|
||||
const form = reactive({
|
||||
loginName: "",
|
||||
password: "",
|
||||
userType: 'MG',
|
||||
code: "",
|
||||
});
|
||||
/**
|
||||
* @description: 自定义验证 - 验证账号
|
||||
*/
|
||||
function checkName(rule, value, callback) {
|
||||
if (value === "") {
|
||||
callback(new Error("账号不可为空"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 自定义验证 - 验证验证码
|
||||
*/
|
||||
function checkCode(rule, value, callback) {
|
||||
if (value === "") {
|
||||
callback(new Error("验证码不可为空"));
|
||||
} else if (value !== trueCode.value) {
|
||||
verificationCodeKey.value++;
|
||||
callback(new Error("验证码不正确"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
// form 验证
|
||||
const rules = reactive({
|
||||
loginName: [{ validator: checkName, required: true, trigger: "blur" }],
|
||||
password: [{ required: true, message: "密码不可为空", trigger: "blur" }],
|
||||
code: [{ validator: checkCode, required: true, trigger: "blur" }],
|
||||
});
|
||||
|
||||
// 登录
|
||||
async function login() {
|
||||
//通过 ref 的值触发验证
|
||||
await ruleFormRef.value.validate((valid) => {
|
||||
if (valid) {
|
||||
loading.value = true
|
||||
const params = {
|
||||
nickname: form.loginName,
|
||||
mobile: form.password
|
||||
};
|
||||
register(params).then((res) => {
|
||||
ElMessage.success('注册成功,请等待审核!')
|
||||
loading.value = false
|
||||
// router.replace("/home");
|
||||
}).catch(err => {
|
||||
loading.value = false
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
// 回车键触发登录操作
|
||||
_hook.useKeyStroke("Enter", login);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.login-case {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: url('../../assets/logo_bg.png') no-repeat right bottom / contain;
|
||||
}
|
||||
|
||||
.form-case {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
// height: 450px;
|
||||
left: 20%;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.Hello {
|
||||
font-weight: bold;
|
||||
font-size: 30px;
|
||||
color: #000;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: 600;
|
||||
font-size: 40px;
|
||||
color: #000;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.code-case {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.inp {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.to_register {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
font-size: 14px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -12,8 +12,9 @@ export default defineConfig({
|
||||
// target: 'http://192.168.2.161:18071/admin/',
|
||||
// target: 'http://newadminapi.sxczgkj.cn/admin/',
|
||||
// target: 'http://admintestapi.sxczgkj.cn/admin/',
|
||||
target: 'http://gw.sxczgkj.cn/admin/', // 测试
|
||||
// target: 'http://gw.sxczgkj.cn/admin/', // 测试
|
||||
// target: 'http://192.168.2.128:18071/admin/',
|
||||
target: 'http://192.168.2.23:7777/proxy/',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user