1、新增黄页

2、新增学堂
3、其他调整、修改
This commit is contained in:
2023-12-04 01:32:33 +08:00
parent 78f89f2673
commit 16ebffc27e
50 changed files with 2724 additions and 1325 deletions
+12 -1
View File
@@ -56,6 +56,16 @@
title: "职位",
type: "text"
},
{
key: "phone",
title: "联系电话",
type: "text"
},
{
key: "mobile",
title: "联系电话",
type: "text"
},
{
key: "address",
title: "地区",
@@ -165,7 +175,8 @@
// 是否显示表单1 的弹窗
show: false,
beforeAction: (formData) => {
vk.userCenter.updateUser({
vk.callFunction({
url: 'client/user/kh/addAuth',
data: {
businessCard: formData
},
+69 -29
View File
@@ -8,12 +8,25 @@
<span class="text-40" v-if="vk.getVuex('$user.userInfo.accountType') === 1">个人认证</span>
<span class="text-40" v-if="vk.getVuex('$user.userInfo.accountType') === 2">企业认证</span>
<div class="ml-20 flex justify-start items-center" v-if="!form1.data.fadadaConfirm">
<info theme="outline" size="18" fill="#a92924" strokeLinecap="square" style="height: 18px"/>
<span v-if="vk.getVuex('$user.userInfo.accountType') === 1">您还未提交您的个人资料</span>
<span v-if="vk.getVuex('$user.userInfo.accountType') === 2">您还未提交您的企业资料</span>
<info theme="outline" size="18" fill="#a92924" strokeLinecap="square"
style="height: 18px"/>
<template v-if="form1.data.authStatus === null || form1.data.authStatus === -1">
<span
v-if="vk.getVuex('$user.userInfo.accountType') === 1">您还未提交您的个人资料</span>
<span
v-if="vk.getVuex('$user.userInfo.accountType') === 2">您还未提交您的企业资料</span>
</template>
<template v-else-if="form1.data.authStatus === 0">
<span>审核中</span>
</template>
<template v-else-if="form1.data.authStatus === 2">
<span>审核不通过:{{ form1.data.refuseReason }}</span>
</template>
</div>
</div>
<el-button type="primary" plain class="empty-bg-plain-btn" size="small">制作我的名片</el-button>
<el-button type="primary" plain class="empty-bg-plain-btn" size="small" @click.native="makeCard">
制作我的名片
</el-button>
</div>
</div>
<vk-data-form ref="form1" v-model="form1.data" :action="form1.props.action" :columns="form1.props.columns"
@@ -24,6 +37,7 @@
@success="onFormSuccess1">
<template v-slot:toFadada="{form, keyName}">
<el-button @click="getCertUrl" type="primary" size="small">去认证</el-button>
<el-button @click="getCertRes" type="primary" size="small">获取认证结果</el-button>
</template>
<template v-slot:accountAuth="{form, keyName}">
<div>
@@ -39,7 +53,8 @@
<div class="flex justify-start items-center">
<id-card theme="outline" size="24" fill="#a92924" strokeLinecap="square" style="height: 24px"/>
<span class="text-40 mr-35">企业授权人信息</span>
<el-button type="primary" size="small" @click.native="addManage" v-if="manageList.length === 0">
<el-button type="primary" size="small" @click.native="addManage"
v-if="manageList.length === 0 && (JSON.stringify(form.manager) === '{}' || !form.manager)">
添加授权人
</el-button>
</div>
@@ -48,7 +63,9 @@
<view v-for="(item, index) in manageList" :key="index">
<manage-list v-model="manageList[index]"/>
</view>
<el-button type="primary" @click.native="allSubmit" v-if="form1.data.authType === 2">{{
<el-button type="primary" @click.native="allSubmit"
v-if="form1.data.authType === 2 && (form1.data.authStatus === null || [-1, 2].includes(form1.data.authStatus))">
{{
vk.getVuex('$user.userInfo.accountType') === 2 ? '提交企业认证' : '提交个人认证'
}}
</el-button>
@@ -73,31 +90,33 @@ export default {
data: {
person: {},
company: {},
manager: {},
manager: null,
fadadaConfirm: false,
authType: 1,
authStatus: null,
refuseReason: '',
},
// 表单属性
props: {
// 表单请求地址
action: "user/kh/setCertification",
action: "client/user/kh/addAuth",
// 表单字段显示规则
columns: [
{
key: "authType", title: "认证方式", type: "radio",
data: [
{value: 1, label: "法大大接口认证"},
{value: 2, label: "后台审核认证"},
{value: 2, label: "金九信平台审核"},
],
showRule: ({fadadaConfirm}) => {
return fadadaConfirm
showRule: ({authStatus}) => {
return authStatus === null || [-1, 2].includes(authStatus)
},
},
{
key: "toFadada", title: "认证方式", type: "html",
showLabel: false,
showRule: (formData) => {
return formData.authType === 1 && (!formData.hasOwnProperty('fadadaConfirm') || !formData.fadadaConfirm)
return formData.authType === 1 && (!formData.hasOwnProperty('fadadaConfirm') || !formData.fadadaConfirm) && (formData.authStatus === null || [-1, 2].includes(formData.authStatus))
},
},
{
@@ -167,7 +186,7 @@ export default {
]
},
{
key: "", title: "", type: "group", justify: "start",
key: "address", title: "", type: "group", justify: "start",
columns: [
{key: "addressRegion", title: "公司所在地", type: "address",},
{
@@ -179,6 +198,12 @@ export default {
},
]
},
{
key: "mobile",
title: "联系方式",
type: "text",
placeholder: "请输入您的联系方式",
},
{
key: "mailAddress",
title: "有效通信地址",
@@ -388,19 +413,20 @@ export default {
loading: false,
// 是否显示表单1 的弹窗
show: false,
beforeAction: (formData) => {
// const newFormData = _.pick(formData, ['contactWechat', 'contactEmail',
// 'contactWechatImage', 'contactQq', 'mailAddress'
// ])
vk.userCenter.updateUser({
data: {...formData, ...{manager: this.manageList[0]}},
success: (data) => {
// 成功后的逻辑
}
});
return false;
},
// beforeAction: (formData) => {
// // const newFormData = _.pick(formData, ['contactWechat', 'contactEmail',
// // 'contactWechatImage', 'contactQq', 'mailAddress'
// // ])
// // vk.userCenter.updateUser({
// // data: {...formData, ...{manager: this.manageList[0]}},
// // success: (data) => {
// // // 成功后的逻辑
// //
// // }
// // });
// // return false;
//
// },
}
},
// 表单相关结束-----------------------------------------------------------
@@ -417,7 +443,8 @@ export default {
success: (data) => {
this.form1.data = _.pick(data.userInfo, [
'fadadaConfirm', 'person', 'company', 'manager', 'contactWechat',
'contactEmail', 'contactWechatImage', 'contactQq', 'mailAddress'
'contactEmail', 'contactWechatImage', 'contactQq', 'mailAddress',
'authStatus', 'authType', 'refuseReason'
])
// if (!this.form1.data.hasOwnProperty('fadadaConfirm') || !this.form1.data.fadadaConfirm) this.form1.data.authType = 1
// this.form1.data.authType = 2
@@ -434,7 +461,7 @@ export default {
});
},
onFormSuccess1() {
console.log(123);
window.location.reload()
},
getCertUrl() {
vk.callFunction({
@@ -448,8 +475,21 @@ export default {
this.manageList.push({})
},
allSubmit() {
// this.form1.data.manager = this.manageList[0]
this.form1.data.authStatus = 0
this.form1.data.refuseReason = null
this.form1.data.manager = this.manageList[0]
this.$refs.form1.submitForm()
},
makeCard() {
this.$emit('makeCard')
},
getCertRes() {
vk.callFunction({
url: 'client/user/kh/getFadadaRes',
success: (res) => {
console.log(res)
}
})
}
}
}
+253
View File
@@ -0,0 +1,253 @@
<template>
<view>
<top-bar></top-bar>
<common-header></common-header>
<category-bar></category-bar>
<view class="w-1200 flex justify-start items-start my-25 m-a">
<view class="flex-col flex-col justify-center items-center bg-white text-40 left-wrap pointer">
<view class="flex justify-center items-center" :class="[activeIndex === 0 ? 'active' : '' ]"
@click="changeActive(0)">
<i class="el-icon-upload2"/>
<text class="ml-20">我的上传</text>
</view>
<view class="flex justify-center items-center" :class="[activeIndex === 1 ? 'active' : '' ]"
@click="changeActive(1)">
<i class="el-icon-download"/>
<text class="ml-20">我的收藏</text>
</view>
<view class="flex justify-center items-center" :class="[activeIndex === 2 ? 'active' : '' ]"
@click="changeActive(2)">
<i class="el-icon-star-off"/>
<text class="ml-20">我的下载</text>
</view>
</view>
<view class="ml-35 bg-white p-40 flex-1">
<template v-if="mode === 'list'">
<view v-if="activeIndex === 0" class="flex justify-start items-center text-50">
<view class="flex justify-start items-center mr-35">
<text>累计上传</text>
<text class="text-main">{{ list.length }}</text>
<text>篇</text>
</view>
<el-button type="primary" @click="showAction">我要上传</el-button>
</view>
<view v-if="activeIndex === 1" class="flex justify-start items-center text-50">
<view class="flex justify-start items-center mr-35">
<text>共计收藏</text>
<text class="text-main">{{ list.length }}</text>
<text>篇</text>
</view>
</view>
<view v-if="activeIndex === 2" class="flex justify-start items-center text-50">
<view class="flex justify-start items-center mr-35">
<text>累计下载</text>
<text class="text-main">{{ list.length }}</text>
<text>篇</text>
</view>
<el-button type="primary" @click="showAction">我要上传</el-button>
</view>
<view class="flex flex-col justify-start items-start pointer w-100p">
<view v-for="(item, index) in list" :key="index" class="content-item-wrap">
<file-word theme="outline" size="80" fill="#4a90e2" strokeLinecap="square"/>
<view class="content">
<text class="title">{{ item.name }}</text>
<view class="desc">
<text class="item">{{ item._add_time_str }}</text>
<text class="item">{{ item.viewNum }}人浏览</text>
<text class="item">{{ item.downloadNum }}次下载</text>
<text class="item">{{ item.amount === 0 ? '免费下载' : `${item.amount}元下载` }}</text>
<!-- <text class="item">{{ item._add_time_str }}</text>-->
</view>
</view>
</view>
</view>
</template>
<template v-else>
<view class="flex justify-start items-center">
<text class="text-50">上传文档</text>
<vk-data-upload v-model="form1.data.file" accept="image/*,application/pdf"></vk-data-upload>
</view>
<vk-data-form v-model="form1.data" :rules="form1.props.rules" :action="form1.props.action"
:form-type="form1.props.formType" :columns='form1.props.columns' label-width="120px"
@success="addSuccess"></vk-data-form>
</template>
</view>
</view>
<common-footer></common-footer>
</view>
</template>
<script>
import {FileWord} from "@icon-park/vue";
export default {
name: "school",
components: {FileWord},
data() {
return {
activeIndex: 0,
mode: 'list',
list: [],
cateList: [],
uploadFile: null,
form1: {
// 表单请求数据,此处可以设置默认值
data: {
amount: 0,
},
// 表单属性
props: {
// 表单请求地址
action: "client/article/list/kh/add",
// 表单字段显示规则
columns: [
{
key: "name",
title: "标题",
type: "text",
placeholder: "请输入标题"
},
{
key: "parentId",
title: "分类",
type: "remote-select",
placeholder: "请选择分类",
showAll: true,
action: "client/article/category/pub/getList",
props: {
list: "rows",
value: "_id",
label: "name",
},
},
{
key: "content",
title: "内容",
type: "editor",
placeholder: "请输入内容"
},
{
key: "amount",
title: "金额",
type: "text",
placeholder: "请输入内容",
},
],
// 表单验证规则
rules: {
name: [
{required: true, message: '名称不能为空', trigger: 'blur'},
],
},
// add 代表添加 update 代表修改
formType: "",
// 是否显示表单的弹窗
show: false
}
},
}
},
methods: {
async getList() {
const {rows} = await vk.callFunction({
url: 'client/article/list/kh/getUserList'
})
this.list = rows
},
async getCollectList() {
const {rows} = await vk.callFunction({
url: 'client/article/collect/kh/getList'
})
this.list = rows
},
changeActive(index) {
this.list = []
this.mode = 'list'
this.activeIndex = index
if (index === 0) this.getList()
else if (index === 1) this.getCollectList()
},
showAction() {
this.mode = 'action'
this.activeIndex = null
},
addSuccess() {
this.mode = 'list'
this.activeIndex = 0
this.getList()
}
// beforeUpload(file) {
// this.uploadFile = file
// // return false
// },
// doUpload() {
// vk.uploadFile({
// title: '上传中',
// filePath: this.uploadFile,
// success(res) {
// console.log(res)
// }
// })
// }
},
onLoad() {
this.getList()
}
}
</script>
<style lang="scss" scoped>
.left-wrap {
width: 240px;
view {
padding: 20px;
}
.active {
background-color: #a92924;
color: white;
}
}
.content-item-wrap {
display: flex;
align-items: flex-start;
justify-content: flex-start;
margin: 30px 0;
.content {
margin-left: 25px;
display: flex;
align-items: flex-start;
justify-content: flex-start;
flex-direction: column;
.title{
font-size: 20px;
}
.desc {
font-size: 14px;
color: #bbb;
display: flex;
align-items: flex-start;
justify-content: flex-start;
margin-top: 10px;
.item {
padding: 0 10px;
border-right: 2px solid #bbb;
}
:first-child{
padding-left: 0;
}
:last-child{
border-right: none
}
}
}
}
</style>
+1 -3
View File
@@ -49,11 +49,9 @@
data() {
return {
currMenu: 'fadada',
// currMenu: 'fadada',
};
},
onLoad(options) {
console.log(options);
if(options && options.menu) {
this.currMenu = options.menu
}
@@ -66,7 +64,7 @@
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.w-1200 {
width: 1200px;
margin: 20px auto;