LI-CCONG\李聪聪 8 months ago
commit 24c0d71d94

@ -1,3 +1,11 @@
/*
* @Author: 王文杰
* @Date: 2024-01-29 16:49:24
* @LastEditors: 王文杰
* @LastEditTime: 2024-02-29 13:08:35
* @FilePath: /jnpf-web/src/permission.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import router from './router'
import store from './store'
import { Message } from 'element-ui'
@ -8,7 +16,7 @@ import getPageTitle from '@/utils/get-page-title'
NProgress.configure({ showSpinner: false }) // NProgress Configuration
const whiteList = ['/login', '/auth-redirect', '/sso', '/formShortLink'] // no redirect whitelist
const whiteList = ['/login','/regsiter', '/forget', '/auth-redirect', '/sso', '/formShortLink'] // no redirect whitelist
router.beforeEach(async (to, from, next) => {
// start progress bar

@ -49,6 +49,16 @@ export const constantRoutes = [{
component: (resolve) => require(['@/views/login'], resolve),
hidden: true
},
{
path: '/regsiter',
component: (resolve) => require(['@/views/login/regsiter'], resolve),
hidden: true
},
{
path: '/forget',
component: (resolve) => require(['@/views/login/forget'], resolve),
hidden: true
},
{
path: '/sso',
component: (resolve) => require(['@/views/login/sso-redirect'], resolve),

@ -2,13 +2,13 @@
* @Author: 王文杰
* @Date: 2024-02-02 14:19:40
* @LastEditors: 王文杰
* @LastEditTime: 2024-02-05 15:38:26
* @LastEditTime: 2024-02-29 14:40:37
* @FilePath: /jnpf-web/src/utils/apiUrl.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
module.exports = {
// 开发环境接口配置
APIURl: 'http://127.0.0.1:30000'
// APIURl: 'http://127.0.0.1:30000'
// 测试环境接口配置
//APIURl: 'http://222.71.165.187:30000'
APIURl: 'http://222.71.165.187:3333'
}

@ -252,6 +252,7 @@ export default {
{
mobilePhone: [
{
required: true,
pattern: /^1[3456789]\d{9}$|^0\d{2,3}-?\d{7,8}$/,
message: '请输入正确的联系方式',
trigger: 'blur'

@ -38,7 +38,7 @@
<el-col :span="8">
<jnpf-form-tip-item label="流水编号" prop="billNumber">
<JnpfInput v-model="dataForm.billNumber" @change="changeData('billNumber',-1)"
placeholder="请输入" disabled readonly clearable :style='{"width":"100%"}'>
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>

@ -0,0 +1,96 @@
<template>
<div class="JNPF-common-reister">
<el-dialog
title="找回密码"
width="60%"
:show-close="false"
:modal="false"
:close-on-click-modal="false"
:visible="dialogVisible">
<div class="cont">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="160px" class="demo-ruleForm">
<el-form-item label="账号" prop="people">
<el-input v-model="ruleForm.iphone"></el-input>
</el-form-item>
<el-form-item label="短信验证码" prop="code">
<el-input v-model="ruleForm.code"></el-input>
</el-form-item>
<el-form-item label="输入新密码" prop="name">
<el-input v-model="ruleForm.name"></el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogVisible = false">确认修改</el-button>
</span>
</el-dialog>
<div class="foot">Copyright © 上海长江云息数字科技有限公司 © 2012 - 2023 All Rights Reserved 专业的数字信息解决方案专家</div>
</div>
</template>
<script>
export default {
name: 'login-resiter',
mixins: [],
components: {},
data() {
return {
dialogVisible: true,
active: 1,
ruleForm: {
},
rules: {
},
}
},
methods: {
download(row) {
this.downloadFormVisible = true
this.$nextTick(() => {
this.$refs.downloadForm.init(row.tables, row.id, 0, row.hasPackage)
})
},
pre(row) {
this.active -= 1
},
next() {
this.active += 1
},
complete() {
this.$router.push({
path: '/login',
query: ''
})
}
}
}
</script>
<style lang="scss" scoped>
.JNPF-common-reister {
width: 100vw;
height: 100vh;
position: fixed;
background: linear-gradient(90deg, #9064FF 3%, #5996FD 97%);
padding: 40px;
>>>.el-dialog {
.el-dialog__body {
height: 400px;
overflow: auto;
}
}
.cont {}
.foot {
position: absolute;
width: 100%;
margin: 0 auto;
bottom: 40px;
color: #fff;
text-align: center;
}
}
</style>

@ -279,14 +279,20 @@
.foot {
width: 100%;
display: flex;
justify-content: space-between;
justify-content: flex-end;
align-items: center;
font-size: 12px;
color: #188ae2;
.register,
.forget {
margin: 20px 0;
.register,.forget {
cursor: pointer;
}
.line {
background-color: #999A9F;
width: 1px;
height: 12px;
margin: 0 10px;
}
}
}

@ -64,6 +64,11 @@
</el-form-item>
<el-button :loading="loading" type="primary" class="login-btn" size="large"
@click.native.prevent="handleLogin">{{ $t('login.logIn') }}</el-button>
<div class="foot">
<div class="register" @click="handleRegsiter"></div>
<div class="line"></div>
<div class="forget" @click="handleForget"></div>
</div>
<template v-if="socialsList.length">
<el-divider content-position="center" class="divider__text">其他登录方式</el-divider>
<div class="other-list">
@ -276,6 +281,19 @@ export default {
}
})
},
handleRegsiter() {
this.$router.push({
path: '/regsiter',
query: ''
})
},
handleForget() {
this.$router.push({
path: '/forget',
query: ''
})
},
changeImg() {
let timestamp = Math.random()
this.timestamp = timestamp

@ -0,0 +1,421 @@
.login-container {
width: 100%;
height: 100%;
overflow: hidden;
position: relative;
display: flex;
justify-content: center;
align-items: center;
}
.login-container .login-version {
position: fixed;
right: 0px;
top: 0px;
width: 82px;
height: 82px;
background: url("../../assets/images/login_version.png") no-repeat center;
background-size: 100%;
}
.login-container .login-version .login-version-text {
width: 82px;
height: 82px;
line-height: 50px;
text-align: center;
color: #fff;
font-size: 16px;
transform: rotate(45deg);
}
.login-container .login-left {
flex: 1;
height: 100%;
background: #4393FA;
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.login-container .login-left .login-company-logo {
position: absolute;
left: 0;
top: 93px;
display: block;
height: 76px;
padding-top: 18px;
padding-left: 40px;
width: 806px;
max-width: 100%;
margin-bottom: 82px;
background: linear-gradient(270deg, rgba(67, 147, 250, 0.5) 0%, rgba(133, 182, 252, 0.5) 100%);
}
.login-container .login-left .login-company-logo .login-company-logo-img {
height: 40px;
position: fixed;
left: 40px;
top: 111px;
}
.login-container .login-left .login-banner {
display: block;
width: 682px;
height: 464px;
}
.login-container .login-left .login-left-txt {
position: absolute;
left: 0;
right: 0;
bottom: 80px;
}
.login-container .login-left .title1 {
text-align: center;
font-size: 20px;
line-height: 28px;
color: #F8F8F8;
font-weight: 700;
}
.login-container .login-left .title2 {
text-align: center;
font-size: 14px;
font-weight: 400;
line-height: 20px;
color: #BCD7FA;
margin: 12px 0 30px;
}
.login-container .login-left .link {
margin: 30px auto 0;
display: block;
color: #fff;
width: 88px;
height: 40px;
border: 1px solid #FFFFFF;
opacity: 1;
border-radius: 4px;
line-height: 38px;
text-align: center;
font-size: 14px;
}
.login-container .login-content {
width: 700px;
height: 100%;
flex-shrink: 0;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.login-container .login-content .copyright {
color: #a0acb7;
font-size: 12px;
position: fixed;
bottom: 20px;
text-align: center;
}
.login-container .login-content .login-cap {
font-size: 26px;
line-height: 38px;
margin-bottom: 26px;
color: #666666;
}
.login-container .login-content .sso-login-btn {
width: 100%;
font-size: 16px;
margin-top: 100px;
}
.login-container .login-form {
height: 530px;
width: 400px;
padding: 50px 0;
border-radius: 6px;
}
.login-container .login-form .sms-input {
width: 260px;
}
.login-container .login-form .sms-right {
width: 120px;
}
.login-container .login-form .sms-right.code-right {
height: 40px;
cursor: pointer;
}
.login-container .login-form .sms-right #imgcode {
width: 100%;
height: 40px;
}
.login-container .login-form .sms-right .smsBtn {
width: 100%;
}
.login-container .login-form .login-logo {
width: 100%;
height: 36px;
margin-bottom: 35px;
}
.login-container .login-form .login-tab {
height: 58px;
margin-bottom: 30px;
position: relative;
border-bottom: 1px solid #DCDFE6;
}
.login-container .login-form .login-tab::after {
position: absolute;
left: 0;
width: 50%;
height: 2px;
content: '';
display: block;
bottom: -1px;
background-color: #1890ff;
z-index: 100;
transition: .5s;
}
.login-container .login-form .login-tab.active1::after {
left: 0;
}
.login-container .login-form .login-tab.active2::after {
left: 50%;
}
.login-container .login-form .login-tab .item {
position: relative;
width: 50%;
font-size: 20px;
line-height: 58px;
color: #666;
display: inline-block;
height: 58px;
text-align: center;
}
.login-container .login-form .login-tab .item.active {
color: #1890ff;
}
.login-container .login-form .rule-tip {
color: #a0acb7;
font-size: 12px;
line-height: 12px;
text-align: left;
}
.login-container .login-form .rule-tip > > > .el-form-item__content {
line-height: 12px;
}
.login-container .login-form .el-divider__text {
color: #a0acb7;
}
.login-container .login-form .other-list {
display: flex;
align-items: center;
justify-content: space-around;
}
.login-container .login-form .other-list .other-item {
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
cursor: pointer;
border-radius: 50%;
}
.login-container .login-form .other-list .other-item i {
font-size: 20px;
color: #a0acb7;
}
.login-container .login-form .other-list .other-item:hover {
background-color: #1890ff;
}
.login-container .login-form .other-list .other-item:hover i {
color: #fff;
}
.login-container .login-form .el-form input:-webkit-autofill {
box-shadow: 0 0 0px 1000px #fff inset !important;
-webkit-text-fill-color: #606266 !important;
}
.login-container .login-form .el-form input::-webkit-input-placeholder {
color: #a0acb7;
}
.login-container .login-form .el-form .login-btn {
width: 100%;
font-size: 16px;
margin-top: 12px;
}
.login-container .login-form .el-form .foot {
width: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
font-size: 12px;
color: #188ae2;
margin: 20px 0;
}
.login-container .login-form .el-form .foot .register, .login-container .login-form .el-form .foot .forget {
cursor: pointer;
}
.login-container .login-form .el-form .foot .line {
background-color: #999A9F;
width: 1px;
height: 12px;
margin: 0 10px;
}
.login-container .login-form .login-form-QRCode {
width: 100%;
text-align: center;
}
.login-container .login-form .login-form-QRCode .qrcode-img {
position: relative;
margin-bottom: 18px;
width: 220px;
height: 220px;
}
.login-container .login-form .login-form-QRCode .qrcode-tip {
color: #334d65;
line-height: 22px;
font-size: 16px;
text-align: center;
}
.login-container .login-foot {
position: absolute;
width: 1060px;
color: #999;
font-size: 12px;
position: fixed;
bottom: 20px;
left: 31%;
text-align: left;
margin-left: 110px;
}
.login-container .other-login-dialog > > > .el-dialog__header {
display: none;
}
.login-container .other-login-dialog > > > .el-dialog__body {
width: 100%;
height: 450px;
overflow: hidden;
background: url("../../assets/images/other-login-dialog.png") no-repeat center !important;
background-size: 100%;
}
.login-container .divider__text {
margin-top: 30px;
margin-bottom: 16px;
}
.login-container .divider__text > > > .el-divider__text {
padding: 0px 10px;
font-size: 12px;
}
.login-container .other-login-card {
border-radius: 5px;
border-left: 5px solid #9DC8FA;
font-size: 12px;
margin-bottom: 15px;
background-color: white;
cursor: pointer;
}
.login-container .other-login-card:hover {
border-color: #1890ff;
}
.login-container .other-login-card:hover i {
color: #fff;
}
.login-container .other-login-des {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-top: 15px;
font-size: 14px;
}
.login-container .other-body {
padding: 0;
width: 100%;
}
.login-container .other-title {
display: flex;
height: 50px;
line-height: 50px;
text-align: center;
justify-content: center;
margin: auto;
}
.login-container .other-title .other-icon {
width: 24px;
height: 24px;
line-height: 24px;
text-align: center;
border-radius: 50%;
border: 2px solid #1890ff;
}
.login-container .other-title .other-icon i {
font-size: 16px;
color: #1890ff;
}
.login-container .other-title .other-text {
height: 24px;
line-height: 24px;
font-size: 18px;
color: #000;
font-weight: bold;
margin: 0 5px;
}
.login-container .other-body {
width: 100%;
height: 350px;
overflow-x: hidden;
overflow-y: auto;
}
.JNPF-dialog-sso > > > .el-dialog__body {
padding: 0 !important;
height: 600px !important;
overflow: hidden !important;
}

@ -0,0 +1,381 @@
<!--
* @Author: 王文杰
* @Date: 2024-02-29 10:07:34
* @LastEditors: 王文杰
* @LastEditTime: 2024-02-29 14:33:28
* @FilePath: /jnpf-web/src/views/login/register.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="JNPF-common-regsiter">
<el-dialog
title=""
width="80%"
:show-close="false"
:modal="false"
:close-on-click-modal="false"
:visible="dialogVisible">
<div class="cont">
<div class="steps">
<el-steps :active="active" class="steps" align-center finish-status="success">
<el-step title="注册须知" description="确认注册须知内容"></el-step>
<el-step title="商户描述" description="完善商户基本信息"></el-step>
<el-step title="资质上传" description="确认商户开店资质"></el-step>
</el-steps>
</div>
<div class="step step1" v-if="!active">
<div id="u9_text" class="text ">
<p style="font-size:15px;"><span style="font-family:&quot;Helvetica-Bold&quot;, &quot;Helvetica Bold&quot;, &quot;Helvetica&quot;, sans-serif;font-weight:700;">1</span><span style="font-family:&quot;PingFangSC-Semibold&quot;, &quot;PingFang SC Semibold&quot;, &quot;PingFang SC&quot;, sans-serif;font-weight:650;">我在西夏聚宝回收已经开了个店了我用别人的身份证再开一个店可以吗</span></p><p style="font-size:13px;"><span style="font-family:&quot;Helvetica&quot;, sans-serif;font-weight:400;"><br></span></p><p style="font-size:13px;"><span style="font-family:&quot;PingFangSC-Regular&quot;, &quot;PingFang SC&quot;, sans-serif;font-weight:400;">不可以未经西夏聚宝平台同意将本人西夏聚宝回收账号提供给他人做开店使用由此导致相关争议诉讼及因店铺经营中的违法违规行为导致一切人身财产权益损害均由本人自行承担全部民事行政及刑事责任</span></p><p style="font-size:13px;"><span style="font-family:&quot;Helvetica&quot;, sans-serif;font-weight:400;"><br></span></p><p style="font-size:15px;"><span style="font-family:&quot;Helvetica-Bold&quot;, &quot;Helvetica Bold&quot;, &quot;Helvetica&quot;, sans-serif;font-weight:700;">2</span><span style="font-family:&quot;PingFangSC-Semibold&quot;, &quot;PingFang SC Semibold&quot;, &quot;PingFang SC&quot;, sans-serif;font-weight:650;">开企业店铺需要满足什么条件</span></p><p style="font-size:13px;"><span style="font-family:&quot;Helvetica&quot;, sans-serif;font-weight:400;"><br></span></p><p style="font-size:13px;"><span style="font-family:&quot;PingFangSC-Regular&quot;, &quot;PingFang SC&quot;, sans-serif;font-weight:400;">企业开店需完成支付宝认证和责任人认证店铺负责人需要对该西夏聚宝回收店铺的运营及管理全面负责包含但不限于该企业的法定代表人股东西夏聚宝回收店铺的运营人等具体请参考企业店铺开店流程</span></p><p style="font-size:13px;"><span style="font-family:&quot;Helvetica&quot;, sans-serif;font-weight:400;">3</span><span style="font-family:&quot;PingFangSC-Regular&quot;, &quot;PingFang SC&quot;, sans-serif;font-weight:400;">我可以开多个店铺吗</span></p><p style="font-size:13px;"><span style="font-family:&quot;Helvetica&quot;, sans-serif;font-weight:400;"><br></span></p><p style="font-size:15px;"><span style="font-family:&quot;PingFangSC-Semibold&quot;, &quot;PingFang SC Semibold&quot;, &quot;PingFang SC&quot;, sans-serif;font-weight:650;">同一会员已开设的店铺均须同时满足以下要求才能获得多店权益</span></p><p style="font-size:13px;"><span style="font-family:&quot;PingFangSC-Regular&quot;, &quot;PingFang SC&quot;, sans-serif;font-weight:400;">近365天无出售假冒商品违规严重违规一般违规扣分达12分以上等违规记录且无其他风险特征</span></p><p style="font-size:13px;"><span style="font-family:&quot;PingFangSC-Regular&quot;, &quot;PingFang SC&quot;, sans-serif;font-weight:400;">满足一定经营条件如近365天确认收货金额&gt;=120万且近12个自然月持续有成交</span></p><p style="font-size:13px;"><span style="font-family:&quot;Helvetica&quot;, sans-serif;font-weight:400;"><br></span></p><p style="font-size:15px;"><span style="font-family:&quot;Helvetica-Bold&quot;, &quot;Helvetica Bold&quot;, &quot;Helvetica&quot;, sans-serif;font-weight:700;">4</span><span style="font-family:&quot;PingFangSC-Semibold&quot;, &quot;PingFang SC Semibold&quot;, &quot;PingFang SC&quot;, sans-serif;font-weight:650;">我已经开过西夏聚宝回收店现在想要注销原来的店铺重新开店可以吗?</span></p><p style="font-size:13px;"><span style="font-family:&quot;Helvetica&quot;, sans-serif;font-weight:400;"><br></span></p><p style="font-size:13px;"><span style="font-family:&quot;PingFangSC-Regular&quot;, &quot;PingFang SC&quot;, sans-serif;font-weight:400;">满足条件就可以注销具体请参考如何注销西夏聚宝回收店铺</span></p>
</div>
</div>
<div class="step step2" v-if="active == 1">
<el-form :model="ruleForm1" :rules="rules1" ref="ruleForStep1" label-width="100px" class="demo-ruleForm">
<el-form-item label="手机号" prop="iphone">
<el-input v-model="ruleForm1.iphone"></el-input>
</el-form-item>
<el-form-item label="验证码" prop="code">
<el-input v-model="ruleForm1.code"></el-input>
</el-form-item>
<el-form-item label="商户名称" prop="name">
<el-input v-model="ruleForm1.name"></el-input>
</el-form-item>
<el-form-item label="商户位置" prop="location">
<el-input v-model="ruleForm1.location"></el-input>
</el-form-item>
<el-form-item label="商户LOGO" prop="logo">
<el-upload
ref="upload"
class="avatar-uploader"
list-type="picture-card"
action
:file-list="fileList"
:show-file-list="true"
:limit="uploadLimit"
:before-upload="beforeUpload"
:http-request="uploadPicture"
:class="{ hide: hideUploadEdit }"
>
<i slot="default" class="el-icon-plus"></i>
<div slot="file" slot-scope="{ file }">
<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
<span class="el-upload-list__item-actions">
<span
class="el-upload-list__item-preview"
@click="handlePictureCardPreview(file)"
>
<i class="el-icon-zoom-in"></i>
</span>
<span
v-if="!disabled"
class="el-upload-list__item-delete"
@click="handleRemove(file)"
>
<i class="el-icon-delete"></i>
</span>
</span>
</div>
</el-upload>
</el-form-item>
</el-form>
</div>
<div class="step step3" v-if="active == 2">
<el-form :model="ruleForm2" :rules="rules2" ref="ruleForStep2" label-width="160px" class="demo-ruleForm">
<el-form-item label="注册人姓名" prop="people">
<el-input v-model="ruleForm2.iphone"></el-input>
</el-form-item>
<el-form-item label="注册人身份证号" prop="code">
<el-input v-model="ruleForm2.code"></el-input>
</el-form-item>
<el-form-item label="注册名称" prop="name">
<el-input v-model="ruleForm2.name"></el-input>
</el-form-item>
<el-form-item label="社会信用代码证号" prop="location">
<el-input v-model="ruleForm2.location"></el-input>
</el-form-item>
<el-form-item label="注册地址" prop="location">
<el-input v-model="ruleForm2.location"></el-input>
</el-form-item>
<el-form-item label="注册人手持身份证照片" prop="logo">
<el-upload
ref="upload"
class="avatar-uploader"
list-type="picture-card"
action
:file-list="fileList"
:show-file-list="true"
:limit="uploadLimit"
:before-upload="beforeUpload"
:http-request="uploadPicture"
:class="{ hide: hideUploadEdit }"
>
<i slot="default" class="el-icon-plus"></i>
<div slot="file" slot-scope="{ file }">
<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
<span class="el-upload-list__item-actions">
<span
class="el-upload-list__item-preview"
@click="handlePictureCardPreview(file)"
>
<i class="el-icon-zoom-in"></i>
</span>
<span
v-if="!disabled"
class="el-upload-list__item-delete"
@click="handleRemove(file)"
>
<i class="el-icon-delete"></i>
</span>
</span>
</div>
</el-upload>
</el-form-item>
<el-form-item label="社会信用代码证照片" prop="logo">
<el-upload
ref="upload"
class="avatar-uploader"
list-type="picture-card"
action
:file-list="fileList"
:show-file-list="true"
:limit="uploadLimit"
:before-upload="beforeUpload"
:http-request="uploadPicture"
:class="{ hide: hideUploadEdit }"
>
<i slot="default" class="el-icon-plus"></i>
<div slot="file" slot-scope="{ file }">
<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
<span class="el-upload-list__item-actions">
<span
class="el-upload-list__item-preview"
@click="handlePictureCardPreview(file)"
>
<i class="el-icon-zoom-in"></i>
</span>
<span
v-if="!disabled"
class="el-upload-list__item-delete"
@click="handleRemove(file)"
>
<i class="el-icon-delete"></i>
</span>
</span>
</div>
</el-upload>
</el-form-item>
</el-form>
</div>
</div>
<span slot="footer" class="dialog-footer">
<template v-if="!active">
<el-button @click="reject"></el-button>
<el-button type="primary" @click="next"></el-button>
</template>
<template v-if="active == 1">
<el-button @click="pre"></el-button>
<el-button type="primary" @click="next"></el-button>
</template>
<template v-if="active == 2">
<el-button @click="pre"></el-button>
<el-button type="primary" @click="complete"></el-button>
</template>
</span>
</el-dialog>
<div class="foot">Copyright © 上海长江云息数字科技有限公司 © 2012 - 2023 All Rights Reserved 专业的数字信息解决方案专家</div>
</div>
</template>
<script>
export default {
name: 'login-regsiter',
mixins: [],
components: {},
data() {
let validatePhone = (rule, value, callback) => {
if (!value) {
callback(new Error('手机号不能为空'));
}
//使
if (!/^1[3456789]\d{9}$/.test(value)) {
callback(new Error('手机号不正确'));
}
// callback()
callback();
};
return {
dialogVisible: true,
active: 2,
ruleForm1: {
iphone: '',
code: '',
name: '',
location: '',
logo: ''
},
fileList: [],
fileInfo: '',
uploadLimit: 2,
disabled: false,
hideUploadEdit: false,
rules1: {
iphone: [
{ required: true, validator: validatePhone, trigger: 'blur' }
],
code: [
{ required: true, message: '请选择收入验证码', trigger: 'change' }
],
name: [
{ required: true, message: '请输入商户名称', trigger: 'change' }
],
location: [
{required: true, message: '请选择位置', trigger: 'change' }
],
logo: [
{required: true, message: '请上传logo', trigger: 'change' }
]
},
ruleForm2: {
},
rules2: {
}
}
},
methods: {
async uploadPicture(param) {
// http-requestparam
// console.log('param:', param);
const fileInfo = this.fileInfo;
// id使
const path = `xxxr/${fileInfo.lastModified}`;
console.log('path:', path);
const formData = new FormData();
formData.append(fileInfo.name, fileInfo);
const res = await commonUploadFiles(path, formData);
if (res) {
this.formData.logo = res[0];
}
},
beforeUpload(file) {
// console.log('beforeUpload:');
// console.log(file);
// 1MB=1024*1024(1MB=1024KB 1KB=1024B)
const isAllowSize = file.size / 1024 / 1024 < 10;
const allowType = ['jpeg', 'jpg', 'png'];
const isAllowType = allowType.some(e => 'image/' + e === file.type);
if (!isAllowType) {
this.$notify({
message: `上传图片只能是 ${allowType} 格式!`,
type: 'warning'
});
// return
return Promise.reject();
}
if (!isAllowSize) {
this.$notify({
message: `上传图片大小不能超过 2MB!`,
type: 'warning'
});
return Promise.reject();
}
this.fileChange(file);
return isAllowType && isAllowSize;
},
fileChange(file) {
console.log('fileChange:', file);
//
this.fileInfo = file;
const url = URL.createObjectURL(file);
// console.log(url);
this.fileList.push({ uid: file.uid, url });
//
this.hideUploadEdit = this.fileList.length >= this.uploadLimit;
},
pre(row) {
this.active -= 1
},
next() {
if (this.active ==2) {
debugger
this.$refs['ruleForStep1'].validate((valid) => {
if (valid) {
//
} else {
return false;
}
});
} else {
this.active += 1
}
},
reject() {
this.$router.push({
path: '/login',
query: ''
})
},
handleRemove(file) {
console.log(file);
for (let i = 0; i < this.fileList.length; i++) {
if (this.fileList[i]['uid'] === file.uid) {
this.fileList.splice(i, 1);
break;
}
}
if (this.fileList.length <= 0) {
this.formData.logo = '';
}
//
this.hideUploadEdit = this.fileList.length > this.uploadLimit - 1;
console.log('handleRemove:', this.hideUploadEdit);
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
complete() {
this.$router.push({
path: '/login',
query: ''
})
}
}
}
</script>
<style lang="scss" scoped>
.JNPF-common-regsiter {
width: 100vw;
height: 100vh;
position: fixed;
background: linear-gradient(90deg, #9064FF 3%, #5996FD 97%);
padding: 40px;
>>>.el-dialog {
.el-dialog__body {}
}
.step {
margin: 40px 100px;
// height: 300px;
overflow: auto;
}
.step1 {
// height: 300px;
}
.step2 {
// height: 300px;
}
.step3 {
height: 600px;
}
.foot {
position: absolute;
width: 100%;
margin: 0 auto;
bottom: 40px;
color: #fff;
text-align: center;
}
}
</style>

@ -8,7 +8,7 @@ function resolve(dir) {
return path.join(__dirname, dir)
}
const name = defaultSettings.title || 'JNPF快速开发平台' // page title
const name = defaultSettings.title || '西夏聚宝' // page title
// If your port is set to 80,
// use administrator privileges to execute the command line.

Loading…
Cancel
Save