feat: ✨ 新增店铺入驻功能,买家端可直接申请店铺入驻
commit
99079f0b3d
|
@ -0,0 +1,41 @@
|
|||
/**
|
||||
* 入驻类相关api
|
||||
*/
|
||||
|
||||
import { http, Method } from "@/utils/request.js";
|
||||
|
||||
// 获取当前用户的代理入驻详情
|
||||
export function getCompanyDetail(params) {
|
||||
return http.request({
|
||||
url: "/store/store/apply",
|
||||
method: Method.GET,
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 申请店铺第一步-填写企业信息
|
||||
export function applyFirst(params) {
|
||||
return http.request({
|
||||
url: "/store/store/apply/first",
|
||||
method: Method.PUT,
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 申请店铺第二步-填写银行
|
||||
export function applySecond(params) {
|
||||
return http.request({
|
||||
url: "/store/store/apply/second",
|
||||
method: Method.PUT,
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 申请店铺第三步-填写银行
|
||||
export function applyThird(params) {
|
||||
return http.request({
|
||||
url: "/store/store/apply/third",
|
||||
method: Method.PUT,
|
||||
params,
|
||||
});
|
||||
}
|
15
pages.json
15
pages.json
|
@ -483,6 +483,21 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "entry/seller/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "店铺入驻",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "entry/seller/control",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "article",
|
||||
"style": {
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<script>
|
||||
import { addAddress, editAddress, getAddressDetail } from "@/api/address.js";
|
||||
import city from "@/components/m-city/m-city.vue";
|
||||
import uniMap from "./uniMap";
|
||||
import uniMap from "@/components/uniMap";
|
||||
import permision from "@/js_sdk/wa-permission/permission.js";
|
||||
export default {
|
||||
components: {
|
||||
|
|
|
@ -27,6 +27,10 @@ export default {
|
|||
title: "关于我们",
|
||||
type: "ABOUT",
|
||||
},
|
||||
STORE_REGISTER: {
|
||||
title: "店铺入驻协议",
|
||||
type: "STORE_REGISTER",
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</u-navbar>
|
||||
<u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
|
||||
<div v-else>
|
||||
<view v-for="(item, index) in trackList" :key="index">
|
||||
<view v-if="item" v-for="(item, index) in trackList" :key="index">
|
||||
<view class="myTracks-title" @click="navigateToStore(item)" v-if="item.storeName">{{item.storeName}}</view>
|
||||
<view class="myTracks-items">
|
||||
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
<template>
|
||||
<div>
|
||||
<u-navbar :border-bottom="false"></u-navbar>
|
||||
<step1 v-if="current == 1" :companyData="companyData" @callback="next()" />
|
||||
<step2 v-if="current == 2" :companyData="companyData" @callback="next()" />
|
||||
<step3
|
||||
v-if="current == 3"
|
||||
:companyData="companyData"
|
||||
@callback="finished()"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCompanyDetail } from "@/api/entry";
|
||||
import step1 from "./step1";
|
||||
import step2 from "./step2";
|
||||
import step3 from "./step3";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
companyData: "",
|
||||
current: 1,
|
||||
};
|
||||
},
|
||||
components: {
|
||||
step1,
|
||||
step2,
|
||||
step3,
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
async init(next) {
|
||||
const res = await getCompanyDetail();
|
||||
if (res.data.success) {
|
||||
this.companyData = res.data.result;
|
||||
next ? this.current++ : "";
|
||||
}
|
||||
},
|
||||
next() {
|
||||
this.init("next");
|
||||
},
|
||||
finished() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/passport/entry/seller/index",
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
|
@ -0,0 +1,18 @@
|
|||
.flag-title {
|
||||
font-size: 42rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.submit,
|
||||
.notice {
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
|
||||
height: 92rpx;
|
||||
text-align: center;
|
||||
letter-spacing: 4rpx;
|
||||
line-height: 92rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.wrapper {
|
||||
padding:16rpx;
|
||||
}
|
|
@ -0,0 +1,162 @@
|
|||
<template>
|
||||
<div class="wrapper">
|
||||
<u-navbar :border-bottom="false"></u-navbar>
|
||||
<div>
|
||||
<div class="title">店铺入驻</div>
|
||||
<div class="step-list">
|
||||
<div
|
||||
class="step-item"
|
||||
:class="{ active: current == index }"
|
||||
v-for="(item, index) in entrySteps"
|
||||
:key="index"
|
||||
>
|
||||
{{ item.title }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="submit" @click="keepOn()">开始填写</div>
|
||||
<div class="notice" @click="getEntryNotice">查看店铺入驻协议</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCompanyDetail } from "@/api/entry";
|
||||
export default {
|
||||
components: {},
|
||||
|
||||
data() {
|
||||
return {
|
||||
current: 999,
|
||||
entrySteps: [
|
||||
{
|
||||
title: "填写资质信息",
|
||||
value: "APPLY",
|
||||
},
|
||||
{
|
||||
title: "提交审核",
|
||||
value: "APPLYING",
|
||||
},
|
||||
],
|
||||
|
||||
storeStatusWay: [
|
||||
{
|
||||
title: "申请已通过,请联系管理员",
|
||||
value: "OPEN",
|
||||
},
|
||||
{
|
||||
title: "店铺已关闭,重申请联系管理员",
|
||||
value: "CLOSED",
|
||||
},
|
||||
{
|
||||
title: "审核未通过,请修改资质信息",
|
||||
value: "REFUSED",
|
||||
},
|
||||
],
|
||||
|
||||
companyData: "", // 公司信息
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
mounted() {},
|
||||
|
||||
onLoad(options) {},
|
||||
methods: {
|
||||
getEntryNotice() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/mine/help/tips?type=STORE_REGISTER",
|
||||
});
|
||||
},
|
||||
keepOn() {
|
||||
if (this.companyData && this.companyData.storeDisable == "OPEN") {
|
||||
uni.showToast({
|
||||
title:""
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/passport/entry/seller/control",
|
||||
});
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
this.entrySteps = [
|
||||
{
|
||||
title: "填写资质信息",
|
||||
value: "APPLY",
|
||||
},
|
||||
{
|
||||
title: "提交审核",
|
||||
value: "APPLYING",
|
||||
},
|
||||
];
|
||||
const res = await getCompanyDetail();
|
||||
if (res.data.success) {
|
||||
this.companyData = res.data.result;
|
||||
|
||||
if (this.companyData) {
|
||||
this.storeStatusWay.forEach((item) => {
|
||||
if (item.value == this.companyData.storeDisable) {
|
||||
this.entrySteps.push(item);
|
||||
}
|
||||
});
|
||||
|
||||
this.current =
|
||||
this.entrySteps.findIndex(
|
||||
(item) => item.value == this.companyData.storeDisable
|
||||
) || 0;
|
||||
} else {
|
||||
this.current = 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
@import url("./entry.scss");
|
||||
.wrapper {
|
||||
padding: 0 80rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding-top: calc(104rpx);
|
||||
font-style: normal;
|
||||
line-height: 1;
|
||||
font-weight: 500;
|
||||
font-size: 56rpx;
|
||||
color: #333;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
.step-item {
|
||||
padding: 30rpx 20rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
}
|
||||
.step-list {
|
||||
margin: 80rpx 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.active {
|
||||
color: $light-color;
|
||||
background: rgba($color: $light-color, $alpha: 0.1);
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.submit {
|
||||
color: #fff;
|
||||
margin-top: 120rpx;
|
||||
background: rgba($light-color, 0.8);
|
||||
}
|
||||
.notice {
|
||||
margin-top: 40rpx;
|
||||
color: #333;
|
||||
background: $bg-color;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,392 @@
|
|||
<template>
|
||||
<div class="wrapper">
|
||||
<u-form label-width="200" :model="form" ref="uForm">
|
||||
<div class="column">
|
||||
<div class="flag-title light-color">基础信息</div>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="companyName"
|
||||
label="公司名称"
|
||||
><u-input
|
||||
v-model="form.companyName"
|
||||
:custom-style="defaultInputStyle"
|
||||
/></u-form-item>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="companyAddressPath"
|
||||
label="公司所在地"
|
||||
><u-input
|
||||
type="select"
|
||||
:custom-style="defaultInputStyle"
|
||||
v-model="form.companyAddressPath"
|
||||
disabled
|
||||
@click="showPicker()"
|
||||
/></u-form-item>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="companyAddress"
|
||||
label="公司详细地址"
|
||||
><u-input
|
||||
:custom-style="defaultInputStyle"
|
||||
v-model="form.companyAddress"
|
||||
/></u-form-item>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="employeeNum"
|
||||
label="员工人数"
|
||||
><u-input
|
||||
type="number"
|
||||
:custom-style="defaultInputStyle"
|
||||
v-model="form.employeeNum"
|
||||
/></u-form-item>
|
||||
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="companyPhone"
|
||||
label="公司电话"
|
||||
><u-input
|
||||
type="number"
|
||||
:custom-style="defaultInputStyle"
|
||||
v-model="form.companyPhone"
|
||||
/></u-form-item>
|
||||
<u-form-item
|
||||
:border-bottom="false"
|
||||
prop="registeredCapital"
|
||||
label="注册资金"
|
||||
required
|
||||
><u-input
|
||||
type="number"
|
||||
:custom-style="defaultInputStyle"
|
||||
v-model="form.registeredCapital"
|
||||
/></u-form-item>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="linkName"
|
||||
label="联系人姓名"
|
||||
><u-input :custom-style="defaultInputStyle" v-model="form.linkName"
|
||||
/></u-form-item>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="linkPhone"
|
||||
label="联系人电话"
|
||||
><u-input
|
||||
type="number"
|
||||
:custom-style="defaultInputStyle"
|
||||
v-model="form.linkPhone"
|
||||
/></u-form-item>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="companyEmail"
|
||||
label="电子邮箱"
|
||||
><u-input
|
||||
:custom-style="defaultInputStyle"
|
||||
v-model="form.companyEmail"
|
||||
/></u-form-item>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="flag-title light-color">营业执照信息</div>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="licenseNum"
|
||||
label="营业执照号"
|
||||
><u-input :custom-style="defaultInputStyle" v-model="form.licenseNum"
|
||||
/></u-form-item>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="scope"
|
||||
label="法定经营范围"
|
||||
><u-input :custom-style="defaultInputStyle" v-model="form.scope"
|
||||
/></u-form-item>
|
||||
<u-form-item
|
||||
:border-bottom="false"
|
||||
prop="licencePhoto"
|
||||
label="营业执照电子版"
|
||||
required
|
||||
>
|
||||
<div>
|
||||
<u-upload
|
||||
:file-list="licencePhotoFileList"
|
||||
:header="{ accessToken: storage.getAccessToken() }"
|
||||
:action="action"
|
||||
width="200"
|
||||
@on-uploaded="onUploaded($event, 'licencePhoto')"
|
||||
:max-count="1"
|
||||
:show-progress="false"
|
||||
></u-upload>
|
||||
|
||||
<div class="tips">
|
||||
请压缩图片在2M以内,确保文字清晰以免上传或审核失败
|
||||
</div>
|
||||
</div>
|
||||
</u-form-item>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="flag-title light-color">法人信息</div>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="legalName"
|
||||
label="法人姓名"
|
||||
><u-input :custom-style="defaultInputStyle" v-model="form.legalName"
|
||||
/></u-form-item>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="legalId"
|
||||
label="法人证件号"
|
||||
><u-input :custom-style="defaultInputStyle" v-model="form.legalId"
|
||||
/></u-form-item>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="legalPhoto"
|
||||
label="法人证件电子版"
|
||||
>
|
||||
<div>
|
||||
<u-upload
|
||||
:file-list="legalPhotoFileList"
|
||||
:header="{ accessToken: storage.getAccessToken() }"
|
||||
:action="action"
|
||||
width="200"
|
||||
@on-uploaded="onUploaded($event, 'legalPhoto')"
|
||||
:max-count="1"
|
||||
:show-progress="false"
|
||||
></u-upload>
|
||||
</div>
|
||||
</u-form-item>
|
||||
</div>
|
||||
</u-form>
|
||||
<div class="submit" @click="validatorStep1Form">提交/下一步</div>
|
||||
<m-city
|
||||
:provinceData="list"
|
||||
headTitle="区域选择"
|
||||
ref="cityPicker"
|
||||
@funcValue="getPickerParentValue"
|
||||
pickerSize="4"
|
||||
>
|
||||
</m-city>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { applyFirst } from "@/api/entry";
|
||||
import city from "@/components/m-city/m-city.vue";
|
||||
import storage from "@/utils/storage.js";
|
||||
import { upload } from "@/api/common.js";
|
||||
import * as RegExp from "@/utils/RegExp.js";
|
||||
export default {
|
||||
components: { "m-city": city },
|
||||
data() {
|
||||
return {
|
||||
storage,
|
||||
action: upload, //图片上传数据
|
||||
defaultInputStyle: {
|
||||
background: "#f7f7f7",
|
||||
padding: "0 20rpx",
|
||||
"border-radius": "10rpx",
|
||||
},
|
||||
legalPhotoFileList: [],
|
||||
licencePhotoFileList: [],
|
||||
form: {
|
||||
companyName: "",
|
||||
companyAddressIdPath: [],
|
||||
companyAddressPath: "",
|
||||
companyAddress: "",
|
||||
employeeNum: "",
|
||||
registeredCapital: "",
|
||||
linkName: "",
|
||||
linkPhone: "",
|
||||
companyPhone: "",
|
||||
companyEmail: "",
|
||||
licenseNum: "",
|
||||
scope: "",
|
||||
legalPhoto: "",
|
||||
licencePhoto: "",
|
||||
legalName: "",
|
||||
legalId: "",
|
||||
},
|
||||
list: [
|
||||
{
|
||||
id: "",
|
||||
localName: "请选择",
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
rules: {
|
||||
// 验证规则
|
||||
companyName: [{ required: true, message: "请填写公司信息" }],
|
||||
companyAddressPath: [{ required: true, message: "请选择公司所在地" }],
|
||||
companyAddress: [{ required: true, message: "请填写公司详细地址" }],
|
||||
employeeNum: [{ required: true, message: "请填写公司员工总数" }],
|
||||
registeredCapital: [{ required: true, message: "请填写公司注册资金" }],
|
||||
linkName: [{ required: true, message: "请填写联系人姓名" }],
|
||||
linkPhone: [
|
||||
{ required: true, message: "请填写联系人电话" },
|
||||
{
|
||||
// 自定义验证函数,见上说明
|
||||
validator: (rule, value, callback) => {
|
||||
// 上面有说,返回true表示校验通过,返回false表示不通过
|
||||
// this.$u.test.mobile()就是返回true或者false的
|
||||
return this.$u.test.mobile(value);
|
||||
},
|
||||
message: "手机号码不正确",
|
||||
// 触发器可以同时用blur和change
|
||||
trigger: ["change", "blur"],
|
||||
},
|
||||
],
|
||||
companyPhone: [
|
||||
{ required: true, message: "请填写公司电话" },
|
||||
{
|
||||
// 自定义验证函数,见上说明
|
||||
validator: (rule, value, callback) => {
|
||||
// 上面有说,返回true表示校验通过,返回false表示不通过
|
||||
// this.$u.test.mobile()就是返回true或者false的
|
||||
return this.$u.test.mobile(value);
|
||||
},
|
||||
message: "请填写正确的号码",
|
||||
// 触发器可以同时用blur和change
|
||||
trigger: ["change", "blur"],
|
||||
},
|
||||
],
|
||||
companyEmail: [
|
||||
{ required: true, message: "请填写电子邮箱" },
|
||||
{
|
||||
// 自定义验证函数,见上说明
|
||||
validator: (rule, value, callback) => {
|
||||
// 上面有说,返回true表示校验通过,返回false表示不通过
|
||||
// this.$u.test.mobile()就是返回true或者false的
|
||||
return this.$u.test.email(value);
|
||||
},
|
||||
message: "请填写正确的电子邮箱",
|
||||
// 触发器可以同时用blur和change
|
||||
trigger: ["change", "blur"],
|
||||
},
|
||||
],
|
||||
licenseNum: [
|
||||
{ required: true, message: "请填写营业执照号" },
|
||||
{ pattern: RegExp.licenseNum, message: "请输入正确的营业执照号" },
|
||||
],
|
||||
scope: [{ required: true, message: "请填写营业执照所示经营范围" }],
|
||||
legalPhoto: [{ required: true, message: "请上传法人身份证照片" }],
|
||||
licencePhoto: [{ required: true, message: "请上传营业执照" }],
|
||||
legalName: [{ required: true, message: "请输入法人姓名" }],
|
||||
legalId: [
|
||||
{ required: true, message: "请输入法人证件号" },
|
||||
{ pattern: RegExp.IDCard, message: "请输入正确的证件号" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.uForm.setRules(this.rules);
|
||||
},
|
||||
props: ["companyData"],
|
||||
watch: {
|
||||
companyData: {
|
||||
handler(val) {
|
||||
if (val) {
|
||||
this.$set(this, "form", val);
|
||||
// 给图片赋值
|
||||
const judgeDeepPhoto = ["legalPhoto", "licencePhoto"];
|
||||
judgeDeepPhoto.forEach((key) => {
|
||||
if (this.form[key]) {
|
||||
this.form[key].split(",").forEach((item) => {
|
||||
this[`${key}FileList`].push({ url: item });
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 图片上传
|
||||
onUploaded(lists, key) {
|
||||
let images = [];
|
||||
lists.forEach((item) => {
|
||||
images.push(item.response.result);
|
||||
});
|
||||
this.form[key] = images;
|
||||
},
|
||||
getPickerParentValue(e) {
|
||||
this.form.companyAddressIdPath = [];
|
||||
|
||||
let name = "";
|
||||
e.forEach((item, index) => {
|
||||
if (item.id) {
|
||||
// 遍历数据
|
||||
this.form.companyAddressIdPath.push(item.id);
|
||||
if (index == e.length - 1) {
|
||||
name += item.localName;
|
||||
} else {
|
||||
name += item.localName + ",";
|
||||
}
|
||||
this.form.companyAddressPath = name;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 显示三级地址联动
|
||||
showPicker() {
|
||||
this.$refs.cityPicker.show();
|
||||
},
|
||||
validatorStep1Form() {
|
||||
this.$refs.uForm.validate(async (valid) => {
|
||||
console.log(valid);
|
||||
if (valid) {
|
||||
const params = { ...this.form };
|
||||
|
||||
params.legalPhoto = params.legalPhoto.toString();
|
||||
params.licencePhoto = params.licencePhoto.toString();
|
||||
params.companyAddressIdPath = params.companyAddressIdPath.toString();
|
||||
delete params.complexAddress;
|
||||
|
||||
const res = await applyFirst(params);
|
||||
if (res.data.success) {
|
||||
uni.showToast({
|
||||
title: "提交成功!",
|
||||
icon: "none",
|
||||
});
|
||||
this.$emit("callback");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
/* page {
|
||||
background: #fff;
|
||||
} */
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
@import url("./entry.scss");
|
||||
|
||||
.column {
|
||||
padding: 32rpx;
|
||||
margin-bottom: 20rpx;
|
||||
background: #fff;
|
||||
}
|
||||
.submit {
|
||||
color: #fff;
|
||||
margin-top: 120rpx;
|
||||
background: rgba($light-color, 0.8);
|
||||
}
|
||||
.tips {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.2;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,144 @@
|
|||
<template>
|
||||
<div class="wrapper">
|
||||
<u-form label-width="250" :model="form" ref="uForm">
|
||||
<div class="column">
|
||||
<div class="flag-title light-color">基础信息</div>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="settlementBankAccountName"
|
||||
label="银行开户名"
|
||||
><u-input
|
||||
v-model="form.settlementBankAccountName"
|
||||
:custom-style="defaultInputStyle"
|
||||
/></u-form-item>
|
||||
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="settlementBankAccountNum"
|
||||
label="银行账号"
|
||||
><u-input
|
||||
:custom-style="defaultInputStyle"
|
||||
v-model="form.settlementBankAccountNum"
|
||||
/></u-form-item>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="settlementBankBranchName"
|
||||
label="开户银行支行名称"
|
||||
><u-input
|
||||
:custom-style="defaultInputStyle"
|
||||
v-model="form.settlementBankBranchName"
|
||||
/></u-form-item>
|
||||
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="settlementBankJointName"
|
||||
label="支行联行号"
|
||||
><u-input
|
||||
:custom-style="defaultInputStyle"
|
||||
v-model="form.settlementBankJointName"
|
||||
/></u-form-item>
|
||||
</div>
|
||||
</u-form>
|
||||
<div class="submit" @click="validatorStep2Form">提交/下一步</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { applySecond } from "@/api/entry";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
defaultInputStyle: {
|
||||
background: "#f7f7f7",
|
||||
padding: "0 20rpx",
|
||||
"border-radius": "10rpx",
|
||||
},
|
||||
form: {
|
||||
settlementBankAccountName: "",
|
||||
settlementBankAccountNum: "",
|
||||
settlementBankBranchName: "",
|
||||
settlementBankJointName: "",
|
||||
},
|
||||
|
||||
rules: {
|
||||
// 验证规则
|
||||
settlementBankAccountName: [
|
||||
{ required: true, message: "请填写银行开户名称" },
|
||||
],
|
||||
settlementBankAccountNum: [
|
||||
{ required: true, message: "请填写银行账号" },
|
||||
],
|
||||
settlementBankBranchName: [
|
||||
{ required: true, message: "请填写开户银行支行名称" },
|
||||
],
|
||||
settlementBankJointName: [
|
||||
{ required: true, message: "请填写支行联行号" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.uForm.setRules(this.rules);
|
||||
},
|
||||
props: ["companyData"],
|
||||
watch: {
|
||||
companyData: {
|
||||
handler(val) {
|
||||
this.$set(this, "form", val);
|
||||
console.log(this.form)
|
||||
},
|
||||
deep: true,
|
||||
immediate:true
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
validatorStep2Form() {
|
||||
this.$refs.uForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
const params = { ...this.form };
|
||||
const res = await applySecond(params);
|
||||
if (res.data.success) {
|
||||
uni.showToast({
|
||||
title: "提交成功!",
|
||||
icon: "none",
|
||||
});
|
||||
this.$emit("callback");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
/* page {
|
||||
background: #fff;
|
||||
} */
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
@import url("./entry.scss");
|
||||
.wrapper {
|
||||
// padding: 50rpx 32rpx 16rpx 32rpx;
|
||||
}
|
||||
.column {
|
||||
padding: 32rpx;
|
||||
margin-bottom: 20rpx;
|
||||
background: #fff;
|
||||
}
|
||||
.submit {
|
||||
color: #fff;
|
||||
margin-top: 120rpx;
|
||||
background: rgba($light-color, 0.8);
|
||||
}
|
||||
.tips {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.2;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,369 @@
|
|||
<template>
|
||||
<div class="wrapper">
|
||||
<u-form label-width="200" :model="form" ref="uForm">
|
||||
<div class="column">
|
||||
<div class="flag-title light-color">基础信息</div>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="storeName"
|
||||
label="店铺名称"
|
||||
><u-input v-model="form.storeName" :custom-style="defaultInputStyle"
|
||||
/></u-form-item>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="storeLogo"
|
||||
label="店铺logo"
|
||||
>
|
||||
<div>
|
||||
<u-upload
|
||||
:file-list="storeLogoFileList"
|
||||
:header="{ accessToken: storage.getAccessToken() }"
|
||||
:action="action"
|
||||
width="200"
|
||||
@on-uploaded="onUploaded($event, 'storeLogo')"
|
||||
:max-count="1"
|
||||
:show-progress="false"
|
||||
></u-upload>
|
||||
</div>
|
||||
</u-form-item>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="goodsManagementCategory"
|
||||
label="店铺经营类目"
|
||||
><u-input
|
||||
:custom-style="defaultInputStyle"
|
||||
v-model="goodsManagementCategory"
|
||||
disabled
|
||||
@click="showCategory()"
|
||||
/></u-form-item>
|
||||
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="storeAddressPath"
|
||||
label="店铺所在地"
|
||||
>
|
||||
<u-input
|
||||
:custom-style="defaultInputStyle"
|
||||
v-model="form.storeAddressPath"
|
||||
disabled
|
||||
@click="showPicker()"
|
||||
/>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="storeAddressPath"
|
||||
label="店铺定位"
|
||||
>
|
||||
<div class="get-center" @click="clickUniMap()">开始定位</div>
|
||||
<div class="tips-success" v-if="form.storeCenter">已成功定位</div>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="storeAddressDetail"
|
||||
label="店铺详细地址"
|
||||
><u-input
|
||||
:custom-style="defaultInputStyle"
|
||||
v-model="form.storeAddressDetail"
|
||||
/></u-form-item>
|
||||
<u-form-item
|
||||
required
|
||||
:border-bottom="false"
|
||||
prop="storeDesc"
|
||||
label="店铺简介"
|
||||
><u-input
|
||||
type="textarea"
|
||||
:custom-style="defaultInputStyle"
|
||||
v-model="form.storeDesc"
|
||||
/></u-form-item>
|
||||
</div>
|
||||
</u-form>
|
||||
<div class="submit" @click="validatorStep1Form">提交平台审核</div>
|
||||
<m-city
|
||||
:provinceData="list"
|
||||
headTitle="区域选择"
|
||||
ref="cityPicker"
|
||||
@funcValue="getPickerParentValue"
|
||||
pickerSize="4"
|
||||
>
|
||||
</m-city>
|
||||
|
||||
<u-select
|
||||
v-model="enableCategory"
|
||||
@confirm="confirmCategory"
|
||||
:list="categoryList"
|
||||
></u-select>
|
||||
|
||||
<uniMap v-if="mapFlag" @close="closeMap" @callback="callBackAddress" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { applyThird } from "@/api/entry";
|
||||
import { getCategoryList } from "@/api/goods";
|
||||
import city from "@/components/m-city/m-city.vue";
|
||||
import storage from "@/utils/storage.js";
|
||||
import { upload } from "@/api/common.js";
|
||||
import uniMap from "@/components/uniMap";
|
||||
import permision from "@/js_sdk/wa-permission/permission.js";
|
||||
export default {
|
||||
components: { "m-city": city, uniMap },
|
||||
data() {
|
||||
return {
|
||||
storage,
|
||||
mapFlag: false,
|
||||
action: upload, //图片上传数据
|
||||
defaultInputStyle: {
|
||||
background: "#f7f7f7",
|
||||
padding: "0 20rpx",
|
||||
"border-radius": "10rpx",
|
||||
},
|
||||
goodsManagementCategory: "",
|
||||
storeLogoFileList: [],
|
||||
categoryList: [],
|
||||
form: {
|
||||
storeName: "",
|
||||
storeLogo: "",
|
||||
goodsManagementCategory: "",
|
||||
storeAddressPath: "",
|
||||
storeAddressDetail: "",
|
||||
storeDesc: "",
|
||||
},
|
||||
list: [
|
||||
{
|
||||
id: "",
|
||||
localName: "请选择",
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
rules: {
|
||||
// 验证规则
|
||||
goodsManagementCategory: [
|
||||
{ required: true, message: "请选择店铺经营类目" },
|
||||
],
|
||||
storeName: [{ required: true, message: "请填写店铺名称" }],
|
||||
storeLogo: [{ required: true, message: "请上传店铺logo" }],
|
||||
storeDesc: [{ required: true, message: "请填写店铺简介" }],
|
||||
storeCenter: [{ required: true, message: "请选择店铺位置" }],
|
||||
storeAddressIdPath: [{ required: true, message: "请选择店铺位置" }],
|
||||
storeAddressDetail: [{ required: true, message: "请输入店铺详细地址" }],
|
||||
},
|
||||
enableCategory: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.uForm.setRules(this.rules);
|
||||
this.fetchCategoryList();
|
||||
},
|
||||
props: ["companyData"],
|
||||
watch: {
|
||||
companyData: {
|
||||
handler(val) {
|
||||
this.$set(this, "form", val);
|
||||
// 给图片赋值
|
||||
const judgeDeepPhoto = ["storeLogo"];
|
||||
|
||||
judgeDeepPhoto.forEach((key) => {
|
||||
if (this.form[key]) {
|
||||
this.form[key].split(",").forEach((item) => {
|
||||
this[`${key}FileList`].push({ url: item });
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
callBackAddress(val) {
|
||||
console.log(val);
|
||||
this.form.storeAddressDetail = val.address;
|
||||
this.form.storeCenter = `${val.longitude},${val.latitude}`;
|
||||
},
|
||||
// 关闭地图
|
||||
closeMap() {
|
||||
this.mapFlag = false;
|
||||
},
|
||||
// 打开地图并访问权限
|
||||
clickUniMap() {
|
||||
console.log("click");
|
||||
// #ifdef APP-PLUS
|
||||
if (plus.os.name == "iOS") {
|
||||
// ios系统
|
||||
permision.judgeIosPermission("location")
|
||||
? (this.mapFlag = true)
|
||||
: this.refuseMap();
|
||||
} else {
|
||||
// 安卓
|
||||
this.requestAndroidPermission(
|
||||
"android.permission.ACCESS_FINE_LOCATION"
|
||||
);
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifndef APP-PLUS
|
||||
this.mapFlag = true;
|
||||
// #endif
|
||||
},
|
||||
|
||||
// 如果拒绝权限 提示区设置
|
||||
refuseMap() {
|
||||
uni.showModal({
|
||||
title: "温馨提示",
|
||||
content: "您已拒绝定位,请开启",
|
||||
confirmText: "去设置",
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
//打开授权设置
|
||||
// #ifndef MP-WEIXIN
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
if (res.platform == "ios") {
|
||||
//IOS
|
||||
plus.runtime.openURL("app-settings://");
|
||||
} else if (res.platform == "android") {
|
||||
//安卓
|
||||
let main = plus.android.runtimeMainActivity();
|
||||
let Intent = plus.android.importClass(
|
||||
"android.content.Intent"
|
||||
);
|
||||
let mIntent = new Intent("android.settings.ACTION_SETTINGS");
|
||||
main.startActivity(mIntent);
|
||||
}
|
||||
},
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
// 获取安卓是否拥有地址权限
|
||||
async requestAndroidPermission(permisionID) {
|
||||
var result = await permision.requestAndroidPermission(permisionID);
|
||||
|
||||
if (result == 1) {
|
||||
this.mapFlag = true;
|
||||
} else {
|
||||
this.refuseMap();
|
||||
}
|
||||
},
|
||||
|
||||
confirmCategory(val) {
|
||||
this.form.goodsManagementCategory = val[0].value;
|
||||
this.goodsManagementCategory = val[0].label;
|
||||
},
|
||||
async fetchCategoryList() {
|
||||
const res = await getCategoryList(0);
|
||||
if (res.data.success) {
|
||||
if (res.data.result.length) {
|
||||
this.categoryList = res.data.result.map((item) => {
|
||||
return { label: item.name, value: item.id };
|
||||
});
|
||||
|
||||
if (this.form.goodsManagementCategory) {
|
||||
this.goodsManagementCategory = this.categoryList.find(
|
||||
(item) => this.form.goodsManagementCategory == item.value
|
||||
).label;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 图片上传
|
||||
onUploaded(lists, key) {
|
||||
let images = [];
|
||||
lists.forEach((item) => {
|
||||
images.push(item.response.result);
|
||||
});
|
||||
this.form[key] = images;
|
||||
},
|
||||
getPickerParentValue(e) {
|
||||
this.form.storeAddressIdPath = [];
|
||||
|
||||
let name = "";
|
||||
e.forEach((item, index) => {
|
||||
if (item.id) {
|
||||
// 遍历数据
|
||||
this.form.storeAddressIdPath.push(item.id);
|
||||
if (index == e.length - 1) {
|
||||
name += item.localName;
|
||||
} else {
|
||||
name += item.localName + ",";
|
||||
}
|
||||
this.form.storeAddressPath = name;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 显示三级地址联动
|
||||
showPicker() {
|
||||
this.$refs.cityPicker.show();
|
||||
},
|
||||
showCategory() {
|
||||
this.enableCategory = true;
|
||||
},
|
||||
validatorStep1Form() {
|
||||
this.$refs.uForm.validate(async (valid) => {
|
||||
console.log(valid);
|
||||
if (valid) {
|
||||
const params = { ...this.form };
|
||||
params.storeLogo = params.storeLogo.toString();
|
||||
params.storeAddressIdPath = params.storeAddressIdPath.toString();
|
||||
const res = await applyThird(params);
|
||||
if (res.data.success) {
|
||||
uni.showToast({
|
||||
title: "提交成功!",
|
||||
icon: "none",
|
||||
});
|
||||
this.$emit("callback");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
/* page {
|
||||
background: #fff;
|
||||
} */
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
@import url("./entry.scss");
|
||||
.get-center {
|
||||
padding: 12rpx 30rpx;
|
||||
background: $light-color;
|
||||
border-radius: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
display: inline;
|
||||
}
|
||||
.column {
|
||||
padding: 32rpx;
|
||||
margin-bottom: 20rpx;
|
||||
background: #fff;
|
||||
}
|
||||
.submit {
|
||||
color: #fff;
|
||||
margin-top: 120rpx;
|
||||
background: rgba($light-color, 0.8);
|
||||
}
|
||||
.tips {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.2;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.tips-success {
|
||||
color: $weChat-color;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
</style>
|
|
@ -295,6 +295,16 @@
|
|||
// -webkit-animation-direction: alternate; /*轮流反向播放动画。*/
|
||||
// -webkit-animation-timing-function: ease-in-out; /*动画的速度曲线*/
|
||||
}
|
||||
.btn-callback {
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
background: #ededed;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 100px;
|
||||
width: 92%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.btn-callback {
|
||||
text-align: center;
|
||||
|
|
|
@ -91,6 +91,11 @@
|
|||
<view>关于</view>
|
||||
</view>
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/passport/entry/seller/index')">
|
||||
<image src="/static/mine/feedback.png" mode=""></image>
|
||||
<view>店铺入驻</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="interact-item" @click="navigateTo('/pages/mine/set/setUp')">
|
||||
<image src="/static/mine/setting.png" mode=""></image>
|
||||
|
|
|
@ -45,3 +45,7 @@ export const URL =
|
|||
|
||||
// 固话
|
||||
export const TEL = /0\d{2,3}-\d{7,8}/
|
||||
|
||||
|
||||
// 营业执照号
|
||||
export const licenseNum = /(^(?:(?![IOZSV])[\dA-Z]){2}\d{6}(?:(?![IOZSV])[\dA-Z]){10}$)|(^\d{15}$)/;
|
||||
|
|
|
@ -456,6 +456,10 @@ export function navigateToLogin (type = "navigateTo") {
|
|||
* 微信小程序跳转到微信小程序登录页面
|
||||
* H5/App跳转到普通登录页面
|
||||
*/
|
||||
uni[type]({
|
||||
url: "/pages/passport/login",
|
||||
});
|
||||
return
|
||||
// #ifdef MP-WEIXIN
|
||||
uni[type]({
|
||||
url: "/pages/passport/wechatMPLogin",
|
||||
|
|
Loading…
Reference in New Issue