1、新增旧货市场
2、新增用户等级
This commit is contained in:
@@ -1,218 +1,223 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>我的名片</span>
|
||||
</div>
|
||||
|
||||
<!-- 表单开始 -->
|
||||
<vk-data-form
|
||||
ref="form1"
|
||||
v-model="form1.data"
|
||||
:rules="form1.props.rules"
|
||||
:action="form1.props.action"
|
||||
:form-type="form1.props.formType"
|
||||
:columns='form1.props.columns'
|
||||
:loading.sync="form1.props.loading"
|
||||
label-width="140px"
|
||||
input-width="400px"
|
||||
:before-action="form1.props.beforeAction"
|
||||
:show-cancel="false"
|
||||
submit-text="保存名片"
|
||||
@success="onFormSuccess"
|
||||
>
|
||||
<!-- v-slot:editor 中的 editor 对应 columns中的 key, form对应 form1.data keyName 对应 columns中的 key -->
|
||||
<!-- <template v-slot:editor="{ form, keyName }">
|
||||
<vk-data-input-editor v-model="form[keyName]" placeholder="开始输入" width="750px"></vk-data-input-editor>
|
||||
</template> -->
|
||||
|
||||
</vk-data-form>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>我的名片</span>
|
||||
</div>
|
||||
|
||||
<!-- 表单开始 -->
|
||||
<vk-data-form
|
||||
ref="form1"
|
||||
v-model="form1.data"
|
||||
:rules="form1.props.rules"
|
||||
:action="form1.props.action"
|
||||
:form-type="form1.props.formType"
|
||||
:columns='form1.props.columns'
|
||||
:loading.sync="form1.props.loading"
|
||||
label-width="140px"
|
||||
input-width="400px"
|
||||
:before-action="form1.props.beforeAction"
|
||||
:show-cancel="false"
|
||||
submit-text="保存名片"
|
||||
@success="onFormSuccess"
|
||||
>
|
||||
<!-- v-slot:editor 中的 editor 对应 columns中的 key, form对应 form1.data keyName 对应 columns中的 key -->
|
||||
<!-- <template v-slot:editor="{ form, keyName }">
|
||||
<vk-data-input-editor v-model="form[keyName]" placeholder="开始输入" width="750px"></vk-data-input-editor>
|
||||
</template> -->
|
||||
|
||||
</vk-data-form>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
companyIntroduction: ''
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "no",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "logo",
|
||||
title: "Logo",
|
||||
type: "image",
|
||||
limit: 1
|
||||
},
|
||||
{
|
||||
key: "position",
|
||||
title: "职位",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "phone",
|
||||
title: "联系电话",
|
||||
type: "text"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
companyIntroduction: ''
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "no",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{
|
||||
type: 'group',
|
||||
columns: [
|
||||
{
|
||||
key: "logo",
|
||||
title: "Logo",
|
||||
type: "image",
|
||||
limit: 1
|
||||
},
|
||||
{
|
||||
key: "personalWechat",
|
||||
title: "个人微信",
|
||||
type: "image",
|
||||
limit: 1
|
||||
},
|
||||
{
|
||||
key: "companyWechat",
|
||||
title: "企业微信",
|
||||
type: "image",
|
||||
limit: 1
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "position",
|
||||
title: "职位",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "companyMobile",
|
||||
title: "公司电话",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "managerMobile",
|
||||
title: "负责人电话",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "address",
|
||||
title: "地区",
|
||||
type: "address"
|
||||
},
|
||||
{
|
||||
key: "addressDetail",
|
||||
title: "详细地址",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "email",
|
||||
title: "邮箱",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "website",
|
||||
title: "网址",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "mainBusiness",
|
||||
title: "主营业务",
|
||||
type: "textarea"
|
||||
},
|
||||
{
|
||||
key: "companyIntroduction",
|
||||
title: "企业简介",
|
||||
type: "editor"
|
||||
},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
logo: [{
|
||||
required: true,
|
||||
message: "请上传Logo",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
personalWechat: [{
|
||||
required: true,
|
||||
message: "请上传个人微信",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
companyWechat: [{
|
||||
required: true,
|
||||
message: "请上传企业微信",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
personName: [{
|
||||
required: true,
|
||||
message: "姓名不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
position: [{
|
||||
required: true,
|
||||
message: "职位不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
address: [{
|
||||
required: true,
|
||||
message: "地区不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
addressDetail: [{
|
||||
required: true,
|
||||
message: "详细地址不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
email: [{
|
||||
required: true,
|
||||
message: "邮箱不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
// website: [{
|
||||
// required: true,
|
||||
// message: "logo不能为空",
|
||||
// trigger: ['blur', 'change']
|
||||
// }],
|
||||
mainBusiness: [{
|
||||
required: true,
|
||||
message: "主营业务不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
mainSpotCategoryIds: [{
|
||||
required: true,
|
||||
message: "主营商品不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "update",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false,
|
||||
beforeAction: (formData) => {
|
||||
vk.callFunction({
|
||||
url: 'client/user/kh/addAuth',
|
||||
data: {
|
||||
businessCard: formData
|
||||
},
|
||||
{
|
||||
key: "mobile",
|
||||
title: "联系电话",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "address",
|
||||
title: "地区",
|
||||
type: "address"
|
||||
},
|
||||
{
|
||||
key: "addressDetail",
|
||||
title: "详细地址",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "email",
|
||||
title: "邮箱",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "website",
|
||||
title: "网址",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "mainBusiness",
|
||||
title: "主营业务",
|
||||
type: "textarea"
|
||||
},
|
||||
{
|
||||
key: "mainSpotCategoryIds",
|
||||
title: "主营商品",
|
||||
type: "checkbox",
|
||||
action: "client/spot/category/pub/getList",
|
||||
actionData: {
|
||||
whereJson: {
|
||||
level: 2
|
||||
}
|
||||
},
|
||||
props: {
|
||||
list: "data",
|
||||
value: "_id",
|
||||
label: "name"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
key: "companyIntroduction",
|
||||
title: "企业简介",
|
||||
type: "editor"
|
||||
},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
logo: [{
|
||||
required: true,
|
||||
message: "Logo不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
personName: [{
|
||||
required: true,
|
||||
message: "姓名不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
position: [{
|
||||
required: true,
|
||||
message: "职位不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
address: [{
|
||||
required: true,
|
||||
message: "地区不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
addressDetail: [{
|
||||
required: true,
|
||||
message: "详细地址不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
email: [{
|
||||
required: true,
|
||||
message: "邮箱不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
// website: [{
|
||||
// required: true,
|
||||
// message: "logo不能为空",
|
||||
// trigger: ['blur', 'change']
|
||||
// }],
|
||||
mainBusiness: [{
|
||||
required: true,
|
||||
message: "主营业务不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
mainSpotCategoryIds: [{
|
||||
required: true,
|
||||
message: "主营商品不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
companyIntroduction: [{
|
||||
required: true,
|
||||
message: "企业简介不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "update",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false,
|
||||
beforeAction: (formData) => {
|
||||
vk.callFunction({
|
||||
url: 'client/user/kh/addAuth',
|
||||
data: {
|
||||
businessCard: formData
|
||||
},
|
||||
success: (data) => {
|
||||
// 成功后的逻辑
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '保存成功'
|
||||
})
|
||||
}
|
||||
});
|
||||
return false;
|
||||
},
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUserInfo()
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
if(data.userInfo.businessCard) {
|
||||
this.form1.data = data.userInfo.businessCard
|
||||
}
|
||||
// 成功后的逻辑
|
||||
console.log('用户信息: ', data);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
success: (data) => {
|
||||
// 成功后的逻辑
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '保存成功'
|
||||
})
|
||||
}
|
||||
});
|
||||
return false;
|
||||
},
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUserInfo()
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
if (data.userInfo.businessCard) {
|
||||
this.form1.data = data.userInfo.businessCard
|
||||
}
|
||||
// 成功后的逻辑
|
||||
console.log('用户信息: ', data);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -2,27 +2,27 @@
|
||||
<el-card shadow="never">
|
||||
<view class="welcome">
|
||||
尊敬的平台商家您好,目前您是我们平台的
|
||||
<text>黄金VIP LV1</text>
|
||||
<text>{{ userLevelStr }} LV{{ userInfo.userGrade + 1 }}</text>
|
||||
客户,可享受相应会员权益~
|
||||
</view>
|
||||
<view class="user-info">
|
||||
<view class="left">
|
||||
<view class="member-card">
|
||||
<view class="card-name">
|
||||
<text class="name">黄金VIP</text>
|
||||
<text class="level">LV1</text>
|
||||
<text class="name">{{ userLevelStr }}</text>
|
||||
<text class="level">LV{{ userInfo.userGrade + 1 }}</text>
|
||||
<text class="grade">
|
||||
当前等级
|
||||
</text>
|
||||
</view>
|
||||
<view class="exp-time">
|
||||
有效期至:2023-09-18
|
||||
<view class="exp-time" v-if="userInfo.upgradeExpiredAt">
|
||||
有效期至:{{ userInfo.upgradeExpiredAt }}
|
||||
</view>
|
||||
<view class="progress-box">
|
||||
<view class="left">
|
||||
<view class="total-pay">当前交易额</view>
|
||||
<view class="progress">
|
||||
<view class="price">60W</view>
|
||||
<view class="price">{{ userInfo.transactionAmount }}</view>
|
||||
<view class="desc">还差40W升级LV2</view>
|
||||
</view>
|
||||
<view class="progress-line">
|
||||
@@ -55,136 +55,60 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="equity">
|
||||
<view class="equity" v-if="userInfo.userGrade > -1">
|
||||
<el-image src="https://oss.wsdns.cn/20231205/5ba845c9570e4fba95516b68ae661056.png"/>
|
||||
<!-- <i class="el-icon-minus"></i>-->
|
||||
<!-- <text>可享受一下权益</text>-->
|
||||
<!-- <i class="el-icon-minus"></i>-->
|
||||
</view>
|
||||
|
||||
<div class="grade-list">
|
||||
<div class="item">
|
||||
<div class="item-box" style="background-color: #f7f7f7">
|
||||
<div class="title">会员等级</div>
|
||||
<div class="title">平台认证商家</div>
|
||||
<div class="title">黄金VIP</div>
|
||||
<div class="title">铂金VIP</div>
|
||||
<div class="title">钻石VIP</div>
|
||||
<div class="title">实力厂家</div>
|
||||
<div class="title">实力商家</div>
|
||||
<div class="title">实力加工厂</div>
|
||||
<div class="title" v-for="(item, index) in userLevelList" :key="index">{{ item.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item-box">
|
||||
<div class="title">身份图标</div>
|
||||
<div class="title">
|
||||
<div class="title" v-for="(item, index) in userLevelList" :key="index">
|
||||
<el-image class="level"
|
||||
src="https://oss.wsdns.cn/20231205/cb35648023de4c40a0790c275962222f.png"></el-image>
|
||||
</div>
|
||||
<div class="title">
|
||||
<el-image class="level"
|
||||
src="https://oss.wsdns.cn/20231205/9816e24079d349068f52ba45c2786fb5.png"></el-image>
|
||||
</div>
|
||||
<div class="title">
|
||||
<el-image class="level"
|
||||
src="https://oss.wsdns.cn/20231205/11f497e8c11d45bb97b1939ac8ed68a1.png"></el-image>
|
||||
</div>
|
||||
<div class="title">
|
||||
<el-image class="level"
|
||||
src="https://oss.wsdns.cn/20231205/45ae2b50ca044f208edf2f411ed72da1.png"></el-image>
|
||||
</div>
|
||||
<div class="title">
|
||||
<el-image class="level"
|
||||
src="https://oss.wsdns.cn/20231205/10ae319c1bb045d3b871046c85f97432.png"></el-image>
|
||||
</div>
|
||||
<div class="title">
|
||||
<el-image class="level"
|
||||
src="https://oss.wsdns.cn/20231205/cea0d711c9004c57b14aec491e48c3ff.png"></el-image>
|
||||
</div>
|
||||
<div class="title">
|
||||
<el-image class="level"
|
||||
src="https://oss.wsdns.cn/20231205/a7445b2a6c224aee9115317f29867851.png"></el-image>
|
||||
:src="item.icon[0]"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item-box">
|
||||
<div class="title">认证缴费</div>
|
||||
<div class="title red">去认证<i class="el-icon-arrow-right"></i></div>
|
||||
<div class="title red">去认证<i class="el-icon-arrow-right"></i></div>
|
||||
<div class="title red">去认证<i class="el-icon-arrow-right"></i></div>
|
||||
<div class="title red">去认证<i class="el-icon-arrow-right"></i></div>
|
||||
<div class="title red">去认证<i class="el-icon-arrow-right"></i></div>
|
||||
<div class="title red">去认证<i class="el-icon-arrow-right"></i></div>
|
||||
<div class="title red">去认证<i class="el-icon-arrow-right"></i></div>
|
||||
<div class="title red" v-for="(item, index) in userLevelList" :key="index">
|
||||
去认证<i class="el-icon-arrow-right"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item-box">
|
||||
<div class="title">获得身份方式</div>
|
||||
<div class="title">
|
||||
<div class="title" v-for="(item, index) in userLevelList" :key="index">
|
||||
<div class="get-way">
|
||||
<div>企业平台认证</div>
|
||||
<div>VIP认证方法</div>
|
||||
<div class="red">去升级<i class="el-icon-arrow-right"></i></div>
|
||||
<template v-if="parseInt(item.amount) === 0">
|
||||
<div>企业平台认证</div>
|
||||
<div>VIP认证方法</div>
|
||||
<div class="red pointer" @click="showForm('fadada')">去升级<i class="el-icon-arrow-right"></i></div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div>购买</div>
|
||||
<div>{{ item.amount }}元/年</div>
|
||||
<div class="red pointer" @click="showForm('grade')">去升级<i class="el-icon-arrow-right"></i></div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title">
|
||||
<div class="get-way">
|
||||
<div>购买</div>
|
||||
<div>999元/年</div>
|
||||
<div class="red">去升级<i class="el-icon-arrow-right"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title">
|
||||
<div class="get-way">
|
||||
<div>购买</div>
|
||||
<div>1999元/年</div>
|
||||
<div class="red">去升级<i class="el-icon-arrow-right"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title">
|
||||
<div class="get-way">
|
||||
<div>购买</div>
|
||||
<div>5999元/年</div>
|
||||
<div class="red">去升级<i class="el-icon-arrow-right"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title">
|
||||
<div class="get-way">
|
||||
<div>购买+交易保证金</div>
|
||||
<div>5999+20000</div>
|
||||
<div class="red">去升级<i class="el-icon-arrow-right"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title">
|
||||
<div class="get-way">
|
||||
<div>购买+交易保证金</div>
|
||||
<div>5999+20000</div>
|
||||
<div class="red">去升级<i class="el-icon-arrow-right"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title">
|
||||
<div class="get-way">
|
||||
<div>购买+交易保证金</div>
|
||||
<div>5999+20000</div>
|
||||
<div class="red">去升级<i class="el-icon-arrow-right"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item-box">
|
||||
<div class="title">询报价权益</div>
|
||||
<div class="title">-</div>
|
||||
<div class="title">-</div>
|
||||
<div class="title">-</div>
|
||||
<div class="title">-</div>
|
||||
<div class="title">-</div>
|
||||
<div class="title">-</div>
|
||||
<div class="title">-</div>
|
||||
<div class="title" v-for="(item, index) in userLevelList" :key="index">{{
|
||||
parseInt(item.offerOffRate) === 100 ? '-' : `${parseInt(item.offerOffRate) / 10}折`
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -199,12 +123,12 @@
|
||||
<div class="title">会员权益</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" v-for="(item, index) in gradeList" :key="index" @click="onChange(index)">
|
||||
<div class="item" v-for="(item, index) in userPayEnsureList" :key="index" @click="onChange(index)">
|
||||
<div class="item-box">
|
||||
<div class="title">2023-01-01</div>
|
||||
<div class="title">{{ item._add_time_str }}</div>
|
||||
<div class="title">缴纳保证金</div>
|
||||
<div class="title">¥20000</div>
|
||||
<div class="title">钻石VIP LV1</div>
|
||||
<div class="title">¥{{ item.amount }}</div>
|
||||
<div class="title">-</div>
|
||||
</div>
|
||||
</div>
|
||||
<view class="paginatio">
|
||||
@@ -212,7 +136,8 @@
|
||||
@current-change="search"
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="10">
|
||||
:page-size="pageSize"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
</view>
|
||||
</div>
|
||||
@@ -290,93 +215,64 @@ export default {
|
||||
select: 0,
|
||||
comments: '实现视频并记录存档,收集相关纸质文件'
|
||||
},
|
||||
]
|
||||
],
|
||||
userLevelList: [],
|
||||
userLevelStr: '普通用户',
|
||||
userPayEnsureList: [],
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUserLevelList()
|
||||
this.getUserPayEnsureList()
|
||||
},
|
||||
methods: {
|
||||
getUserPayEnsureList(pageIndex = 1) {
|
||||
vk.callFunction({
|
||||
url: 'client/order/kh/getList',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: this.pageSize
|
||||
},
|
||||
success: (res) => {
|
||||
this.total = res.total
|
||||
this.userPayEnsureList = res.rows
|
||||
}
|
||||
});
|
||||
},
|
||||
getUserInfo() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
if (data.userInfo.businessCard) {
|
||||
this.form1.data = data.userInfo.businessCard
|
||||
}
|
||||
this.userInfo = data.userInfo
|
||||
// 成功后的逻辑
|
||||
console.log('用户信息: ', data);
|
||||
if (data.userInfo.userLevel > -1) {
|
||||
this.userLevelStr = this.userLevelList.find(level => parseInt(level.level) === parseInt(data.userInfo.userLevel)).name
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
onChange(money) {
|
||||
this.money = money
|
||||
},
|
||||
onPay() {
|
||||
const requestTimestamp = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
||||
const timestamp = dayjs().format('YYYYMMDDHHmmss')
|
||||
let data = {
|
||||
queryUrl: 'https://test-api-open.chinaums.com/v1/netpay/bills/get-qrcode',
|
||||
timestamp,
|
||||
nonce: 'rp84ufhfn20yneo3tp',
|
||||
content: {
|
||||
requestTimestamp,
|
||||
mid: '898201612345678',
|
||||
tid: '88880001',
|
||||
instMid: 'QRPAYDEFAULT',
|
||||
totalAmount: 1,
|
||||
notifyUrl: 'https://static-mp-0737e52b-fffa-4223-bcdf-d4ad3d9968a5.next.bspapp.com/#/'
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 调用函数
|
||||
*/
|
||||
sdk.exec(data).then(res => {
|
||||
const h = this.$createElement;
|
||||
const result = JSON.parse(res);
|
||||
if (result.errCode === 'SUCCESS') {
|
||||
this.showQrcode = true
|
||||
this.billQRCode = result.billQRCode
|
||||
// this.$alert('', '请打开手机微信,扫一扫完成支付', {
|
||||
// confirmButtonText: '确定',
|
||||
// callback: action => {
|
||||
// this.$message({
|
||||
// type: 'success',
|
||||
// message: `已完成支付`
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
}
|
||||
})
|
||||
},
|
||||
navTo(url) {
|
||||
vk.navigateTo(url);
|
||||
},
|
||||
showForm(index) {
|
||||
this.$emit('done', index);
|
||||
},
|
||||
search(pageIndex) {
|
||||
// vk.callFunction({
|
||||
// url: 'client/spot/goods/pub/getList',
|
||||
// data: {
|
||||
// pageIndex: pageIndex,
|
||||
// pageSize: 20,
|
||||
// keyword: this.keyword,
|
||||
// categoryIds: this.checkCategoryList,
|
||||
// provinceCodes: this.checkProvinceList
|
||||
// },
|
||||
// success: (data) => {
|
||||
// console.log('data: ', data);
|
||||
// data.rows.forEach(item => {
|
||||
// try {
|
||||
// item.addressStr = item.address.province.name + "-" + item.address.city.name + "-" + item.address.area.name
|
||||
// } catch (err) {
|
||||
// item.addressStr = ""
|
||||
// }
|
||||
// })
|
||||
// this.goodsData = data
|
||||
// }
|
||||
// });
|
||||
},
|
||||
getUserLevelList() {
|
||||
vk.callFunction({
|
||||
url: 'client/userLevel/pub/getList',
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 200
|
||||
},
|
||||
success: (data) => {
|
||||
this.userLevelList = data.rows
|
||||
this.getUserInfo()
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -681,6 +577,11 @@ export default {
|
||||
font-size: 13px;
|
||||
line-height: 2em;
|
||||
}
|
||||
|
||||
.level {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
.info {
|
||||
|
||||
+259
-272
@@ -1,304 +1,291 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>会员等级</span>
|
||||
</div>
|
||||
<div class="grade-list">
|
||||
<div class="item" v-for="(item,index) in gradeList" :key="index" :class="gradeIndex === index ? 'active' : ''" @click="onChange(index)">
|
||||
<div class="item-box">
|
||||
<div class="title">{{ item.name }}</div>
|
||||
<div class="title">{{ item.price }}</div>
|
||||
</div>
|
||||
<div class="select">
|
||||
<div class="icon">
|
||||
<i class="el-icon-check"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bzj-readme">
|
||||
<div class="sub-title">保证金说明</div>
|
||||
<div class="content">
|
||||
保证金说明内容...
|
||||
</div>
|
||||
</div>
|
||||
<div class="payment">
|
||||
<div class="sub-title">支付方式</div>
|
||||
<div class="content">
|
||||
<el-radio-group v-model="paymentIndex" class="ml-4">
|
||||
<el-radio v-for="(item,index) in payment" :key="index" :label="index"
|
||||
size="large">{{ item }}</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pay-price">
|
||||
<div class="sub-title">支付金额:¥{{ money }}元</div>
|
||||
</div>
|
||||
<div class="pay-price" v-if="billQRCode">
|
||||
<uv-qrcode ref="qrcode" size="240px" :value="billQRCode"></uv-qrcode>
|
||||
<div class="pay-desc">请打开手机微信,扫一扫完成支付</div>
|
||||
<el-button type="success" @click="onPayStatus">已完成支付</el-button>
|
||||
</div>
|
||||
<el-button v-else type="danger" @click="onPay">立即支付</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>会员等级</span>
|
||||
</div>
|
||||
<div class="grade-list">
|
||||
<div class="item pointer" v-for="(item,index) in gradeList" :key="index"
|
||||
:class="gradeIndex === index ? 'active' : ''" @click="onChange(index)">
|
||||
<div class="item-box">
|
||||
<div class="title">{{ item.name }}</div>
|
||||
<div class="title">
|
||||
<span>{{ item.amount }}元/年</span>
|
||||
<span v-if="parseFloat(item.ensureAmount) > 0">+交易保证金</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="select">
|
||||
<div class="icon">
|
||||
<i class="el-icon-check"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bzj-readme">
|
||||
<div class="sub-title">保证金说明</div>
|
||||
<div class="content">
|
||||
保证金说明内容...
|
||||
</div>
|
||||
</div>
|
||||
<div class="payment">
|
||||
<div class="sub-title">支付方式</div>
|
||||
<div class="content">
|
||||
<el-radio-group v-model="paymentIndex" class="ml-4">
|
||||
<el-radio v-for="(item,index) in payment" :key="index" :label="index"
|
||||
size="large">{{ item }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pay-price">
|
||||
<div class="sub-title">支付金额:¥{{ amount }}元</div>
|
||||
</div>
|
||||
<div class="pay-price" v-if="billQRCode">
|
||||
<uv-qrcode ref="qrcode" size="240px" :value="billQRCode"></uv-qrcode>
|
||||
<div class="pay-desc">请打开手机微信,扫一扫完成支付</div>
|
||||
<el-button type="success" @click="onPayStatus">已完成支付</el-button>
|
||||
</div>
|
||||
<el-button v-else type="danger" @click="onPay">立即支付</el-button>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import UQRCode from 'uqrcodejs';
|
||||
const OpenSdk = require('../lib/base').default;
|
||||
// const OpenSdk = require('ums-sdk-nodejs').default;
|
||||
import UQRCode from 'uqrcodejs';
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const sdk = new OpenSdk({
|
||||
appId: '10037e6f6823b20801682b6a5e5a0006',
|
||||
appKey: '1c4e3b16066244ae9b236a09e5b312e8'
|
||||
})
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
paymentIndex: 0,
|
||||
payment: ["银联支付"],
|
||||
money: 5000,
|
||||
showQrcode: false,
|
||||
billQRCode: '',
|
||||
gradeIndex: 1,
|
||||
gradeList: [
|
||||
{
|
||||
id: 1,
|
||||
name: '黄金VIP',
|
||||
price: '699元/年'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '铂金VIP',
|
||||
price: '1999元/年'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '钻石VIP',
|
||||
price: '2999元/年'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '实力厂家',
|
||||
price: '20000元/年+交易保证金'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '实力加工厂',
|
||||
price: '20000元/年+交易保证金'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: '实力采购商',
|
||||
price: '20000元/年+交易保证金'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
if (data.userInfo.businessCard) {
|
||||
this.form1.data = data.userInfo.businessCard
|
||||
}
|
||||
// 成功后的逻辑
|
||||
console.log('用户信息: ', data);
|
||||
}
|
||||
});
|
||||
const OpenSdk = require('../lib/base').default;
|
||||
// const OpenSdk = require('ums-sdk-nodejs').default;
|
||||
|
||||
},
|
||||
onChange(index) {
|
||||
this.gradeIndex = index
|
||||
},
|
||||
onPay() {
|
||||
const date = new Date()
|
||||
const requestTimestamp = this.dateFormat('YYYY-mm-dd HH:MM:SS', date)
|
||||
const timestamp = this.dateFormat('YYYYmmddHHMMSS', date)
|
||||
console.log(timestamp)
|
||||
console.log(requestTimestamp)
|
||||
let data = {
|
||||
queryUrl: 'https://test-api-open.chinaums.com/v1/netpay/bills/get-qrcode',
|
||||
timestamp,
|
||||
nonce: 'rp84ufhfn20yneo3tp',
|
||||
content: {
|
||||
requestTimestamp,
|
||||
mid: '898201612345678',
|
||||
tid: '88880001',
|
||||
instMid: 'QRPAYDEFAULT',
|
||||
totalAmount: 1,
|
||||
notifyUrl: 'https://static-mp-0737e52b-fffa-4223-bcdf-d4ad3d9968a5.next.bspapp.com/#/'
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 调用函数
|
||||
*/
|
||||
sdk.exec(data).then(res => {
|
||||
const h = this.$createElement;
|
||||
const result = JSON.parse(res);
|
||||
if (result.errCode === 'SUCCESS') {
|
||||
this.showQrcode = true
|
||||
this.billQRCode = result.billQRCode
|
||||
// this.$alert('', '请打开手机微信,扫一扫完成支付', {
|
||||
// confirmButtonText: '确定',
|
||||
// callback: action => {
|
||||
// this.$message({
|
||||
// type: 'success',
|
||||
// message: `已完成支付`
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
}
|
||||
})
|
||||
},
|
||||
dateFormat(fmt, date) {
|
||||
const opt = {
|
||||
"Y+": date.getFullYear().toString(), // 年
|
||||
"m+": (date.getMonth() + 1).toString(), // 月
|
||||
"d+": date.getDate().toString(), // 日
|
||||
"H+": date.getHours().toString(), // 时
|
||||
"M+": date.getMinutes().toString(), // 分
|
||||
"S+": date.getSeconds().toString() // 秒
|
||||
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
||||
};
|
||||
let ret
|
||||
for (let k in opt) {
|
||||
ret = new RegExp("(" + k + ")").exec(fmt)
|
||||
if (ret) {
|
||||
fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
|
||||
};
|
||||
};
|
||||
return fmt
|
||||
}
|
||||
}
|
||||
}
|
||||
const sdk = new OpenSdk({
|
||||
appId: '10037e6f6823b20801682b6a5e5a0006',
|
||||
appKey: '1c4e3b16066244ae9b236a09e5b312e8'
|
||||
})
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
paymentIndex: 0,
|
||||
payment: ["银联支付"],
|
||||
showQrcode: false,
|
||||
billQRCode: '',
|
||||
gradeIndex: 1,
|
||||
gradeList: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUserLevelList()
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
if (data.userInfo.businessCard) {
|
||||
this.form1.data = data.userInfo.businessCard
|
||||
}
|
||||
// 成功后的逻辑
|
||||
console.log('用户信息: ', data);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
onChange(index) {
|
||||
this.gradeIndex = index
|
||||
},
|
||||
async onPay() {
|
||||
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/order/kh/add',
|
||||
data: {
|
||||
goods: {
|
||||
name: '会员升级',
|
||||
amount: this.amount,
|
||||
cover: null
|
||||
},
|
||||
type: 3,
|
||||
goodsId: parseInt(this.gradeList[this.gradeIndex].level),
|
||||
num: 1,
|
||||
}
|
||||
})
|
||||
const requestTimestamp = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
||||
const timestamp = dayjs().format('YYYYMMDDHHmmss')
|
||||
let data = {
|
||||
queryUrl: 'https://test-api-open.chinaums.com/v1/netpay/bills/get-qrcode',
|
||||
timestamp,
|
||||
nonce: 'rp84ufhfn20yneo3tp',
|
||||
content: {
|
||||
billNo: res.data,
|
||||
requestTimestamp,
|
||||
mid: '898201612345678',
|
||||
tid: '88880001',
|
||||
instMid: 'QRPAYDEFAULT',
|
||||
totalAmount: 1,
|
||||
notifyUrl: 'https://static-mp-0737e52b-fffa-4223-bcdf-d4ad3d9968a5.next.bspapp.com/#/'
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 调用函数
|
||||
*/
|
||||
sdk.exec(data).then(res => {
|
||||
const h = this.$createElement;
|
||||
const result = JSON.parse(res);
|
||||
if (result.errCode === 'SUCCESS') {
|
||||
this.showQrcode = true
|
||||
this.billQRCode = result.billQRCode
|
||||
// this.$alert('', '请打开手机微信,扫一扫完成支付', {
|
||||
// confirmButtonText: '确定',
|
||||
// callback: action => {
|
||||
// this.$message({
|
||||
// type: 'success',
|
||||
// message: `已完成支付`
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
}
|
||||
})
|
||||
},
|
||||
getUserLevelList() {
|
||||
vk.callFunction({
|
||||
url: 'client/userLevel/pub/getList',
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 200
|
||||
},
|
||||
success: (data) => {
|
||||
this.gradeList = data.rows.filter(item => parseFloat(item.amount) > 0)
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
amount() {
|
||||
return parseFloat(this.gradeList[this.gradeIndex].amount) + parseFloat(this.gradeList[this.gradeIndex].ensureAmount)
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.clearfix {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
}
|
||||
.clearfix {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.grade-list {
|
||||
display: flex;
|
||||
.grade-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
justify-content: space-between;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
border: 1px solid #eee;
|
||||
.item {
|
||||
position: relative;
|
||||
border: 1px solid #eee;
|
||||
|
||||
.item-box {
|
||||
display: flex;
|
||||
.item-box {
|
||||
display: flex;
|
||||
|
||||
.title {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
.title {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.info {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 230px;
|
||||
.info {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 230px;
|
||||
|
||||
.price {
|
||||
font-size: 28px;
|
||||
}
|
||||
.price {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.desc {
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
.desc {
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.select {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
border: 2px solid #bf2b28 !important;
|
||||
.active {
|
||||
border: 2px solid #bf2b28 !important;
|
||||
|
||||
.item-box {
|
||||
.title {
|
||||
color: #bf2b28;
|
||||
}
|
||||
.item-box {
|
||||
.title {
|
||||
color: #bf2b28;
|
||||
}
|
||||
|
||||
.info {
|
||||
.price {
|
||||
color: #bf2b28;
|
||||
}
|
||||
.info {
|
||||
.price {
|
||||
color: #bf2b28;
|
||||
}
|
||||
|
||||
.desc {
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
.desc {
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-top: 20px solid transparent;
|
||||
border-right: 20px solid #bf2b28;
|
||||
border-left: 20px solid transparent;
|
||||
border-bottom: 20px solid #bf2b28;
|
||||
display: flex;
|
||||
.select {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-top: 20px solid transparent;
|
||||
border-right: 20px solid #bf2b28;
|
||||
border-left: 20px solid transparent;
|
||||
border-bottom: 20px solid #bf2b28;
|
||||
display: flex;
|
||||
|
||||
.icon {
|
||||
position: relative;
|
||||
.icon {
|
||||
position: relative;
|
||||
|
||||
.el-icon-check {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-icon-check {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box-card {
|
||||
margin-top: 20px;
|
||||
border: none;
|
||||
}
|
||||
.box-card {
|
||||
margin-top: 20px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.sub-title {
|
||||
color: #bf2b28;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
border-left: 5px solid #bf2b28;
|
||||
padding-left: 10px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
.sub-title {
|
||||
color: #bf2b28;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
border-left: 5px solid #bf2b28;
|
||||
padding-left: 10px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.bzj-readme {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.bzj-readme {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.payment {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.payment {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.pay-price {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.pay-price {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.pay-desc {
|
||||
font-size: 16px;
|
||||
line-height: 2em;
|
||||
}
|
||||
.pay-desc {
|
||||
font-size: 16px;
|
||||
line-height: 2em;
|
||||
}
|
||||
</style>
|
||||
|
||||
+146
-247
@@ -1,263 +1,162 @@
|
||||
<template>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>您有<em style="color: #bf2b28;padding: 0 3px;font-weight: 500">{{ num }}</em>条未读消息</span>
|
||||
<el-button style="float: right; padding: 3px 0; color: #666" type="text" @click="onSetting"><i class="el-icon-setting"></i> 消息推送设置</el-button>
|
||||
</div>
|
||||
<!-- 消息列表 -->
|
||||
<div class="notice-list">
|
||||
<div class="item" v-for="(item,index) in noticeList" :key="index">
|
||||
<div class="title-box">
|
||||
<div class="title-box">
|
||||
<el-badge is-dot class="badge" v-if="item.status === 0"></el-badge>
|
||||
<div class="title">{{ item.title }}</div>
|
||||
<div class="time">{{ item.time }}</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="btn" @click="onStatus(index)">
|
||||
<i class="el-icon-sunset"></i>标记为已读
|
||||
</div>
|
||||
<div class="btn" @click="onDelete(index)">
|
||||
<i class="el-icon-delete"></i>删除
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="desc">
|
||||
{{ item.comments }}
|
||||
</div>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>您有<em style="color: #bf2b28;padding: 0 3px;font-weight: 500">{{ unreadNum }}</em>条未读消息</span>
|
||||
<el-button style="float: right; padding: 3px 0; color: #666" type="text" @click="onSetting"
|
||||
v-if="parseInt(vk.getVuex('$user.userInfo.userLevel')) > 0"><i
|
||||
class="el-icon-setting"></i> 消息推送设置
|
||||
</el-button>
|
||||
</div>
|
||||
<!-- 消息列表 -->
|
||||
<div class="notice-list">
|
||||
<div class="item" v-for="(item,index) in noticeList" :key="index">
|
||||
<div class="title-box">
|
||||
<div class="title-box pointer" @click="toDetail(item, index)">
|
||||
<el-badge is-dot class="badge" v-if="!item.hasRead"></el-badge>
|
||||
<div class="title">{{ item.title }}</div>
|
||||
<div class="time">{{ item._add_time_str }}</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="btn" @click="setRead(index)" v-if="!item.hasRead">
|
||||
<i class="el-icon-sunset"></i>标记为已读
|
||||
</div>
|
||||
<div class="btn" @click="del(index)">
|
||||
<i class="el-icon-delete"></i>删除
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="desc">
|
||||
{{ item.content }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center mt-20">
|
||||
<el-pagination @current-change="getList" background layout="prev, pager, next"
|
||||
:total="total"></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 添加或编辑的弹窗结束 -->
|
||||
</el-card>
|
||||
<!-- 添加或编辑的弹窗结束 -->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let that;
|
||||
const originalForms = {sort: 0, enable: true}
|
||||
// import { VueCropper } from 'vue-cropper'
|
||||
export default {
|
||||
components: {
|
||||
// VueCropper
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
num: 1,
|
||||
noticeList: [
|
||||
{
|
||||
id: 1,
|
||||
title: '恭喜!您已注册成功!',
|
||||
comments: '尊敬的用户,恭喜您已成功注册金久信钢铁交易平台,感谢您的支持!',
|
||||
time: '2023-05-18 10:15:00',
|
||||
status: 0
|
||||
}
|
||||
],
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: "client/seal/kh/getList",
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "imageUrl",
|
||||
title: "印章",
|
||||
type: "image",
|
||||
width: 280,
|
||||
},
|
||||
{
|
||||
key: "remark",
|
||||
title: "备注",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "_add_time",
|
||||
title: "添加时间",
|
||||
type: "time",
|
||||
width: 160
|
||||
},
|
||||
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: ""
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
// 表单相关开始 -----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
enable: true
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key:"imageUrl", title:"印章图片", type:"image",
|
||||
limit: 1,
|
||||
tips: '图片格式:PNG,需设置为透明底;图片尺寸:企业章 166x166 像素,个人章 134x60 像素,印章紧密贴紧四周,尽量避免留白;',
|
||||
watch: (data) => {
|
||||
const { value, formData, column, index, option, $set } = data
|
||||
if(!value) {
|
||||
this.form1.data.imageBase64 = ""
|
||||
}else {
|
||||
vk.showLoading('正在上传')
|
||||
vk.myfn.urlTobase64(value).then(res => {
|
||||
this.form1.data.imageBase64 = res
|
||||
vk.hideLoading();
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
key:"remark", title:"备注", type:"text"
|
||||
},
|
||||
{ key: "enable", title: "启用", type: "switch", activeValue: true, inactiveValue: false, width: 100 },
|
||||
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
imageUrl: [
|
||||
{ required:true, message:'印章不能为空', trigger:'blur' },
|
||||
{ required:true, message:'印章不能为空', trigger:'blur' },
|
||||
],
|
||||
label:[
|
||||
{ required:true, message:'属性名称不能为空', trigger:'blur' },
|
||||
],
|
||||
values:[
|
||||
{ required:true, message:'可选值不能为空', trigger:'blur' },
|
||||
],
|
||||
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
// 是否显示表单的弹窗
|
||||
show: false,
|
||||
beforeAction:(formData)=>{
|
||||
// 可在此处修改 formData 后返回 formData,若在此处return false,则表单不触发提交请求。
|
||||
|
||||
return formData;
|
||||
},
|
||||
}
|
||||
},
|
||||
// 其他弹窗表单
|
||||
// 表单相关结束 -----------------------------------------------------------
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
that = this
|
||||
},
|
||||
methods: {
|
||||
addBtn() {
|
||||
that.resetForm();
|
||||
that.form1.props.action = 'client/seal/kh/add';
|
||||
that.form1.props.formType = 'add';
|
||||
that.form1.props.title = '添加';
|
||||
that.form1.props.show = true;
|
||||
},
|
||||
// 显示修改页面
|
||||
updateBtn({
|
||||
item
|
||||
}) {
|
||||
that.form1.props.action = 'client/seal/kh/update';
|
||||
that.form1.props.formType = 'update';
|
||||
that.form1.props.title = '编辑';
|
||||
that.form1.props.show = true;
|
||||
that.form1.data = item;
|
||||
},
|
||||
closeForm() {
|
||||
this.form1.props.show = false
|
||||
this.form1.data = {
|
||||
sort: 0,
|
||||
enable: true
|
||||
}
|
||||
},
|
||||
// 删除按钮
|
||||
deleteBtn({
|
||||
item,
|
||||
deleteFn
|
||||
}) {
|
||||
deleteFn({
|
||||
action: "client/seal/kh/delete",
|
||||
data: {
|
||||
_id: item._id
|
||||
},
|
||||
});
|
||||
},
|
||||
// 表单重置
|
||||
resetForm() {
|
||||
vk.pubfn.resetForm(originalForms, that);
|
||||
},
|
||||
// 搜索
|
||||
search() {
|
||||
that.$refs.table1.search();
|
||||
},
|
||||
// 刷新
|
||||
refresh() {
|
||||
that.$refs.table1.refresh();
|
||||
},
|
||||
onStatus(index){
|
||||
this.noticeList[index].status = 1;
|
||||
},
|
||||
onDelete(index){
|
||||
this.noticeList.splice(index,1)
|
||||
},
|
||||
onSetting(){
|
||||
this.$emit('done','setting')
|
||||
}
|
||||
}
|
||||
}
|
||||
let that;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
unreadNum: 0,
|
||||
noticeList: [],
|
||||
pageSize: 20,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
async getList(pageIndex = 1) {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/message/kh/getList',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
}
|
||||
})
|
||||
this.unreadNum = 0
|
||||
this.noticeList = rows
|
||||
this.noticeList.forEach(item => {
|
||||
if (!item.hasRead) this.unreadNum++
|
||||
})
|
||||
},
|
||||
async setRead(index) {
|
||||
this.noticeList[index].hasRead = true
|
||||
await vk.callFunction({
|
||||
url: 'client/message/kh/setRead',
|
||||
data: {
|
||||
id: this.noticeList[index]._id
|
||||
}
|
||||
})
|
||||
},
|
||||
async del(index) {
|
||||
await vk.callFunction({
|
||||
url: 'client/message/kh/delete',
|
||||
data: {
|
||||
id: this.noticeList[index]._id
|
||||
}
|
||||
})
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功'
|
||||
})
|
||||
await this.getList()
|
||||
},
|
||||
onSetting() {
|
||||
this.$emit('done', 'setting')
|
||||
},
|
||||
toDetail(item, index) {
|
||||
this.setRead(index)
|
||||
let url = null
|
||||
if (item.type === 'old') url = `/pages/index/old/detail?id=${item.pk}`
|
||||
else if (item.type === 'enquiry') url = `/pages/enquiry/detail?id=${item.pk}`
|
||||
else if (item.type === 'process') url = `/pages/process/detail?id=${item.pk}`
|
||||
if (url) vk.navigateTo({url})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.el-icon-setting{
|
||||
padding: 0 5px;
|
||||
.el-icon-setting {
|
||||
padding: 0 5px;
|
||||
}
|
||||
.notice-list{
|
||||
.item{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.title-box{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.title{
|
||||
font-size: 14px;
|
||||
}
|
||||
.time{
|
||||
margin-left: 10px;
|
||||
color: #999999;
|
||||
}
|
||||
.badge{
|
||||
|
||||
.notice-list {
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.desc{
|
||||
color: #999999;
|
||||
line-height: 2em;
|
||||
}
|
||||
.right{
|
||||
display: flex;
|
||||
.btn{
|
||||
color: #bf2b28;
|
||||
cursor: pointer;
|
||||
i{
|
||||
padding: 0 5px;
|
||||
margin-left: 10px;
|
||||
|
||||
.title-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.title {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.time {
|
||||
margin-left: 10px;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.desc {
|
||||
color: #999999;
|
||||
line-height: 2em;
|
||||
}
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
|
||||
.btn {
|
||||
color: #bf2b28;
|
||||
cursor: pointer;
|
||||
|
||||
i {
|
||||
padding: 0 5px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
}
|
||||
}
|
||||
}
|
||||
.active{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
+289
-272
@@ -1,303 +1,320 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>交易保证金缴纳</span>
|
||||
</div>
|
||||
<div class="bzj-price">
|
||||
<div class="item" :class="money === 5000 ? 'active' : ''" @click="onChange(5000)">
|
||||
<div class="item-box">
|
||||
<div class="title">保证金</div>
|
||||
<div class="info">
|
||||
<text class="price">¥5000</text>
|
||||
<text class="desc">文字信息后台编辑</text>
|
||||
</div>
|
||||
</div>
|
||||
<div class="select">
|
||||
<div class="icon">
|
||||
<i class="el-icon-check"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" :class="money === 10000 ? 'active' : ''" @click="onChange(10000)">
|
||||
<div class="item-box">
|
||||
<div class="title">保证金</div>
|
||||
<div class="info">
|
||||
<text class="price">¥10000</text>
|
||||
<text class="desc">文字信息后台编辑</text>
|
||||
</div>
|
||||
</div>
|
||||
<div class="select">
|
||||
<div class="icon">
|
||||
<i class="el-icon-check"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" :class="money === 20000 ? 'active' : ''" @click="onChange(20000)">
|
||||
<div class="item-box">
|
||||
<div class="title">保证金</div>
|
||||
<div class="info">
|
||||
<text class="price">¥20000</text>
|
||||
<text class="desc">文字信息后台编辑</text>
|
||||
</div>
|
||||
</div>
|
||||
<div class="select">
|
||||
<div class="icon">
|
||||
<i class="el-icon-check"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bzj-readme">
|
||||
<div class="sub-title">保证金说明</div>
|
||||
<div class="content">
|
||||
保证金说明内容...
|
||||
</div>
|
||||
</div>
|
||||
<div class="payment">
|
||||
<div class="sub-title">支付方式</div>
|
||||
<div class="content">
|
||||
<el-radio-group v-model="paymentIndex" class="ml-4">
|
||||
<el-radio v-for="(item,index) in payment" :key="index" :label="index"
|
||||
size="large">{{ item }}</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pay-price">
|
||||
<div class="sub-title">支付金额:¥{{ money }}元</div>
|
||||
</div>
|
||||
<div class="pay-price" v-if="billQRCode">
|
||||
<uv-qrcode ref="qrcode" size="240px" :value="billQRCode"></uv-qrcode>
|
||||
<div class="pay-desc">请打开手机微信,扫一扫完成支付</div>
|
||||
<el-button type="success" @click="onPayStatus">已完成支付</el-button>
|
||||
</div>
|
||||
<el-button v-else type="danger" @click="onPay">立即支付</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>交易保证金缴纳</span>
|
||||
</div>
|
||||
<div class="bzj-price">
|
||||
<div class="item" :class="money === 5000 ? 'active' : ''" @click="onChange(5000)">
|
||||
<div class="item-box">
|
||||
<div class="title">保证金</div>
|
||||
<div class="info">
|
||||
<text class="price">¥5000</text>
|
||||
<text class="desc">文字信息后台编辑</text>
|
||||
</div>
|
||||
</div>
|
||||
<div class="select">
|
||||
<div class="icon">
|
||||
<i class="el-icon-check"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" :class="money === 10000 ? 'active' : ''" @click="onChange(10000)">
|
||||
<div class="item-box">
|
||||
<div class="title">保证金</div>
|
||||
<div class="info">
|
||||
<text class="price">¥10000</text>
|
||||
<text class="desc">文字信息后台编辑</text>
|
||||
</div>
|
||||
</div>
|
||||
<div class="select">
|
||||
<div class="icon">
|
||||
<i class="el-icon-check"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" :class="money === 20000 ? 'active' : ''" @click="onChange(20000)">
|
||||
<div class="item-box">
|
||||
<div class="title">保证金</div>
|
||||
<div class="info">
|
||||
<text class="price">¥20000</text>
|
||||
<text class="desc">文字信息后台编辑</text>
|
||||
</div>
|
||||
</div>
|
||||
<div class="select">
|
||||
<div class="icon">
|
||||
<i class="el-icon-check"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bzj-readme">
|
||||
<div class="sub-title">保证金说明</div>
|
||||
<div class="content">
|
||||
保证金说明内容...
|
||||
</div>
|
||||
</div>
|
||||
<div class="payment">
|
||||
<div class="sub-title">支付方式</div>
|
||||
<div class="content">
|
||||
<el-radio-group v-model="paymentIndex" class="ml-4">
|
||||
<el-radio v-for="(item,index) in payment" :key="index" :label="index"
|
||||
size="large">{{ item }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pay-price">
|
||||
<div class="sub-title">支付金额:¥{{ money }}元</div>
|
||||
</div>
|
||||
<div class="pay-price" v-if="billQRCode">
|
||||
<uv-qrcode ref="qrcode" size="240px" :value="billQRCode"></uv-qrcode>
|
||||
<div class="pay-desc">请打开手机微信,扫一扫完成支付</div>
|
||||
<el-button type="success" @click="onPayStatus">已完成支付</el-button>
|
||||
</div>
|
||||
<el-button v-else type="danger" @click="onPay">立即支付</el-button>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import UQRCode from 'uqrcodejs';
|
||||
const OpenSdk = require('../lib/base').default;
|
||||
// const OpenSdk = require('ums-sdk-nodejs').default;
|
||||
import UQRCode from 'uqrcodejs';
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const sdk = new OpenSdk({
|
||||
appId: '10037e6f6823b20801682b6a5e5a0006',
|
||||
appKey: '1c4e3b16066244ae9b236a09e5b312e8'
|
||||
})
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
paymentIndex: 0,
|
||||
payment: ["银联支付"],
|
||||
money: 5000,
|
||||
showQrcode: false,
|
||||
billQRCode: ''
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
if (data.userInfo.businessCard) {
|
||||
this.form1.data = data.userInfo.businessCard
|
||||
}
|
||||
// 成功后的逻辑
|
||||
console.log('用户信息: ', data);
|
||||
}
|
||||
});
|
||||
const OpenSdk = require('../lib/base').default;
|
||||
// const OpenSdk = require('ums-sdk-nodejs').default;
|
||||
|
||||
},
|
||||
onChange(money) {
|
||||
this.money = money
|
||||
},
|
||||
onPay() {
|
||||
const date = new Date()
|
||||
const requestTimestamp = this.dateFormat('YYYY-mm-dd HH:MM:SS', date)
|
||||
const timestamp = this.dateFormat('YYYYmmddHHMMSS', date)
|
||||
console.log(timestamp)
|
||||
console.log(requestTimestamp)
|
||||
let data = {
|
||||
queryUrl: 'https://test-api-open.chinaums.com/v1/netpay/bills/get-qrcode',
|
||||
timestamp,
|
||||
nonce: 'rp84ufhfn20yneo3tp',
|
||||
content: {
|
||||
requestTimestamp,
|
||||
mid: '898201612345678',
|
||||
tid: '88880001',
|
||||
instMid: 'QRPAYDEFAULT',
|
||||
totalAmount: 1,
|
||||
notifyUrl: 'https://static-mp-0737e52b-fffa-4223-bcdf-d4ad3d9968a5.next.bspapp.com/#/'
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 调用函数
|
||||
*/
|
||||
sdk.exec(data).then(res => {
|
||||
const h = this.$createElement;
|
||||
const result = JSON.parse(res);
|
||||
if (result.errCode === 'SUCCESS') {
|
||||
this.showQrcode = true
|
||||
this.billQRCode = result.billQRCode
|
||||
// this.$alert('', '请打开手机微信,扫一扫完成支付', {
|
||||
// confirmButtonText: '确定',
|
||||
// callback: action => {
|
||||
// this.$message({
|
||||
// type: 'success',
|
||||
// message: `已完成支付`
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
}
|
||||
})
|
||||
},
|
||||
dateFormat(fmt, date) {
|
||||
const opt = {
|
||||
"Y+": date.getFullYear().toString(), // 年
|
||||
"m+": (date.getMonth() + 1).toString(), // 月
|
||||
"d+": date.getDate().toString(), // 日
|
||||
"H+": date.getHours().toString(), // 时
|
||||
"M+": date.getMinutes().toString(), // 分
|
||||
"S+": date.getSeconds().toString() // 秒
|
||||
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
||||
};
|
||||
let ret
|
||||
for (let k in opt) {
|
||||
ret = new RegExp("(" + k + ")").exec(fmt)
|
||||
if (ret) {
|
||||
fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
|
||||
};
|
||||
};
|
||||
return fmt
|
||||
}
|
||||
}
|
||||
}
|
||||
const sdk = new OpenSdk({
|
||||
appId: '10037e6f6823b20801682b6a5e5a0006',
|
||||
appKey: '1c4e3b16066244ae9b236a09e5b312e8'
|
||||
})
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
paymentIndex: 0,
|
||||
payment: ["银联支付"],
|
||||
money: 5000,
|
||||
showQrcode: false,
|
||||
billQRCode: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
if (data.userInfo.businessCard) {
|
||||
this.form1.data = data.userInfo.businessCard
|
||||
}
|
||||
// 成功后的逻辑
|
||||
console.log('用户信息: ', data);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
onChange(money) {
|
||||
this.money = money
|
||||
},
|
||||
async onPay() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/order/kh/add',
|
||||
data:{
|
||||
goods: {
|
||||
name: '缴纳保证金',
|
||||
amount: this.money,
|
||||
cover: null
|
||||
},
|
||||
type: 2,
|
||||
goodsId: null,
|
||||
num: 1,
|
||||
}
|
||||
})
|
||||
const requestTimestamp = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
||||
const timestamp = dayjs().format('YYYYMMDDHHmmss')
|
||||
let data = {
|
||||
queryUrl: 'https://test-api-open.chinaums.com/v1/netpay/bills/get-qrcode',
|
||||
timestamp,
|
||||
nonce: 'rp84ufhfn20yneo3tp',
|
||||
content: {
|
||||
billNo: res.data,
|
||||
requestTimestamp,
|
||||
mid: '898201612345678',
|
||||
tid: '88880001',
|
||||
instMid: 'QRPAYDEFAULT',
|
||||
totalAmount: 1,
|
||||
notifyUrl: 'https://static-mp-0737e52b-fffa-4223-bcdf-d4ad3d9968a5.next.bspapp.com/#/'
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 调用函数
|
||||
*/
|
||||
sdk.exec(data).then(res => {
|
||||
const h = this.$createElement;
|
||||
const result = JSON.parse(res);
|
||||
if (result.errCode === 'SUCCESS') {
|
||||
this.showQrcode = true
|
||||
this.billQRCode = result.billQRCode
|
||||
// this.$alert('', '请打开手机微信,扫一扫完成支付', {
|
||||
// confirmButtonText: '确定',
|
||||
// callback: action => {
|
||||
// this.$message({
|
||||
// type: 'success',
|
||||
// message: `已完成支付`
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
}
|
||||
})
|
||||
},
|
||||
dateFormat(fmt, date) {
|
||||
const opt = {
|
||||
"Y+": date.getFullYear().toString(), // 年
|
||||
"m+": (date.getMonth() + 1).toString(), // 月
|
||||
"d+": date.getDate().toString(), // 日
|
||||
"H+": date.getHours().toString(), // 时
|
||||
"M+": date.getMinutes().toString(), // 分
|
||||
"S+": date.getSeconds().toString() // 秒
|
||||
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
||||
};
|
||||
let ret
|
||||
for (let k in opt) {
|
||||
ret = new RegExp("(" + k + ")").exec(fmt)
|
||||
if (ret) {
|
||||
fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
|
||||
}
|
||||
;
|
||||
}
|
||||
;
|
||||
return fmt
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.clearfix {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
}
|
||||
.clearfix {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.bzj-price {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.bzj-price {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
border: 1px solid #eee;
|
||||
.item {
|
||||
position: relative;
|
||||
border: 1px solid #eee;
|
||||
|
||||
.item-box {
|
||||
display: flex;
|
||||
.item-box {
|
||||
display: flex;
|
||||
|
||||
.title {
|
||||
padding: 10px;
|
||||
border-right: 1px solid #eee;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 40px;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
.title {
|
||||
padding: 10px;
|
||||
border-right: 1px solid #eee;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 40px;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.info {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 230px;
|
||||
.info {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 230px;
|
||||
|
||||
.price {
|
||||
font-size: 28px;
|
||||
}
|
||||
.price {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.desc {
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
.desc {
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.select {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
border: 2px solid #bf2b28 !important;
|
||||
.active {
|
||||
border: 2px solid #bf2b28 !important;
|
||||
|
||||
.item-box {
|
||||
.title {
|
||||
border-right: 2px solid #bf2b28 !important;
|
||||
color: #bf2b28;
|
||||
}
|
||||
.item-box {
|
||||
.title {
|
||||
border-right: 2px solid #bf2b28 !important;
|
||||
color: #bf2b28;
|
||||
}
|
||||
|
||||
.info {
|
||||
.price {
|
||||
color: #bf2b28;
|
||||
}
|
||||
.info {
|
||||
.price {
|
||||
color: #bf2b28;
|
||||
}
|
||||
|
||||
.desc {
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
.desc {
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-top: 20px solid transparent;
|
||||
border-right: 20px solid #bf2b28;
|
||||
border-left: 20px solid transparent;
|
||||
border-bottom: 20px solid #bf2b28;
|
||||
display: flex;
|
||||
.select {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-top: 20px solid transparent;
|
||||
border-right: 20px solid #bf2b28;
|
||||
border-left: 20px solid transparent;
|
||||
border-bottom: 20px solid #bf2b28;
|
||||
display: flex;
|
||||
|
||||
.icon {
|
||||
position: relative;
|
||||
.icon {
|
||||
position: relative;
|
||||
|
||||
.el-icon-check {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-icon-check {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box-card {
|
||||
margin-top: 20px;
|
||||
border: none;
|
||||
}
|
||||
.box-card {
|
||||
margin-top: 20px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.sub-title {
|
||||
color: #bf2b28;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
border-left: 5px solid #bf2b28;
|
||||
padding-left: 10px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
.sub-title {
|
||||
color: #bf2b28;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
border-left: 5px solid #bf2b28;
|
||||
padding-left: 10px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.bzj-readme {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.bzj-readme {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.payment {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.payment {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.pay-price {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.pay-price {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.pay-desc {
|
||||
font-size: 16px;
|
||||
line-height: 2em;
|
||||
}
|
||||
.pay-desc {
|
||||
font-size: 16px;
|
||||
line-height: 2em;
|
||||
}
|
||||
</style>
|
||||
|
||||
+406
-124
@@ -7,68 +7,285 @@
|
||||
<id-card theme="outline" size="24" fill="#a92924" strokeLinecap="square" style="height: 24px"/>
|
||||
<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">
|
||||
<div class="ml-20 flex justify-start items-center" v-if="!userInfo.fadadaConfirm">
|
||||
<info theme="outline" size="18" fill="#a92924" strokeLinecap="square"
|
||||
style="height: 18px"/>
|
||||
<template v-if="form1.data.authStatus === null || form1.data.authStatus === -1">
|
||||
<template v-if="userInfo.authStatus === null || userInfo.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">
|
||||
<template v-else-if="userInfo.authStatus === 0">
|
||||
<span>审核中</span>
|
||||
</template>
|
||||
<template v-else-if="form1.data.authStatus === 2">
|
||||
<span>审核不通过:{{ form1.data.refuseReason }}</span>
|
||||
<template v-else-if="userInfo.authStatus === 1">
|
||||
<span>审核通过</span>
|
||||
</template>
|
||||
<template v-else-if="userInfo.authStatus === 2">
|
||||
<span>审核不通过:{{ userInfo.refuseReason }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<span class="ml-20" v-else>认证成功</span>
|
||||
</div>
|
||||
<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"
|
||||
:footer-show="false"
|
||||
:before-action="form1.props.beforeAction" :rules="form1.props.rules"
|
||||
:form-type="form1.props.formType"
|
||||
:loading.sync="form1.props.loading" :auto-close="true" label-width="140px"
|
||||
@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>
|
||||
<p>请用个人账户向以下账户转账0.10元。请备注:账号认证,平台将7个工作日内退回原账户。</p>
|
||||
<el-form ref="form" :model="form" label-width="120px">
|
||||
<el-form-item label="认证方式">
|
||||
<el-radio-group v-model="form.authType" :disabled="[0].includes(userInfo.authStatus)">
|
||||
<el-radio :label="1">法大大接口认证</el-radio>
|
||||
<el-radio :label="2">金九信平台审核</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<template v-if="form.authType === 2 || (userInfo.hasOwnProperty('fadadaConfirm') && userInfo.fadadaConfirm)">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="企业名称">
|
||||
<el-input v-model="userInfo.company.companyName" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="信用代码" required>
|
||||
<el-input v-model="form.company.organization"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="公司所在地" required>
|
||||
<el-row :gutter="10" class="border-bottom pb-20">
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[0]" placeholder="请选择省"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)">
|
||||
<el-option v-for="(item, index) in provinceData" :key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[1]" placeholder="请选择市"
|
||||
:disabled="addressIndex.length === 0 || [0, 1].includes(userInfo.authStatus)">
|
||||
<template v-if="addressIndex[0] !== null">
|
||||
<el-option v-for="(item, index) in cityData[addressIndex[0]]" :key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[2]" placeholder="请选择区"
|
||||
:disabled="addressIndex.length === 1 || [0, 1].includes(userInfo.authStatus)">
|
||||
<template v-if="addressIndex[0] !== null && addressIndex[1] !== null">
|
||||
<el-option v-for="(item, index) in areaData[addressIndex[0]][addressIndex[1]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="form.company.addressDetail" placeholder="请输入详细地址"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式" required>
|
||||
<el-input v-model="form.company.mobile" :disabled="[0, 1].includes(userInfo.authStatus)"/>
|
||||
</el-form-item>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="有效通信地址">
|
||||
<el-input v-model="form.company.mailAddress"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="有效邮箱地址">
|
||||
<el-input v-model="form.company.contactEmail"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="对公账号" required>
|
||||
<el-input v-model="form.company.companyAccount"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开户行" required>
|
||||
<el-input v-model="form.company.companyBankName"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="个人账号">
|
||||
<el-input v-model="form.company.personAccount"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="个人开户行">
|
||||
<el-input v-model="form.company.personBankName"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="个人账户名">
|
||||
<el-input v-model="form.company.accountName"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="经营类目" required>
|
||||
<el-input v-model="form.company.businessType" :disabled="[0, 1].includes(userInfo.authStatus)"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="主营商品" required>
|
||||
<el-checkbox-group v-model="form.company.mainSpotCategoryIds"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)">
|
||||
<el-checkbox v-for="(item, index) in goodsCate" :key="index" :label="item._id">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="上传营业执照" required>
|
||||
<view class="flex justify-start items-center">
|
||||
<vk-data-upload :limit="1" v-model="form.company.organizationPath"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)"></vk-data-upload>
|
||||
<text class="text-main ml-20">请您上传盖章的扫描件或者复印件</text>
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="上传开票资料" required>
|
||||
<view class="flex justify-start items-center">
|
||||
<vk-data-upload :limit="1" v-model="form.company.invoiceInfo"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)"></vk-data-upload>
|
||||
<text class="text-main ml-20">加盖公章</text>
|
||||
<view class="ml-35">
|
||||
<el-radio-group v-model="form.company.taxType"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)">
|
||||
<el-radio label="一般纳税人">一般纳税人</el-radio>
|
||||
<el-radio label="小规模纳税人">小规模纳税人</el-radio>
|
||||
<el-radio label="其他">其他</el-radio>
|
||||
</el-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="纳税人资格">
|
||||
<view class="flex justify-start items-center">
|
||||
<vk-data-upload :limit="1" v-model="form.company.taxImage"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)"></vk-data-upload>
|
||||
<text class="text-main ml-20">加盖公章</text>
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="平台交易账号认证" required>
|
||||
<div>
|
||||
<span>户名:金久信</span>
|
||||
<span class="ml-35">开户行:中国广发银行南宁支行</span>
|
||||
<span class="ml-35">账号:6222XXXXX</span>
|
||||
<p>请用个人账户向以下账户转账0.10元。请备注:账号认证,平台将7个工作日内退回原账户。</p>
|
||||
<div>
|
||||
<span>户名:金久信</span>
|
||||
<span class="ml-35">开户行:中国广发银行南宁支行</span>
|
||||
<span class="ml-35">账号:6222XXXXX</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:manageList="{form, keyName}">
|
||||
</el-form-item>
|
||||
<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 && (JSON.stringify(form.manager) === '{}' || !form.manager)">
|
||||
添加授权人
|
||||
</el-button>
|
||||
</div>
|
||||
<el-form-item label="代理人类型" required>
|
||||
<el-radio-group v-model="form.manager.type" :disabled="[0, 1].includes(userInfo.authStatus)">
|
||||
<el-radio :label="1">法人</el-radio>
|
||||
<el-radio :label="2">代理人</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="代理人姓名" required>
|
||||
<el-input v-model="form.manager.personName" :disabled="[0, 1].includes(userInfo.authStatus)"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="证件类型" required>
|
||||
<el-radio-group v-model="form.manager.certType"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)">
|
||||
<el-radio :label="0">身份证</el-radio>
|
||||
<el-radio :label="1">护照</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="代理人证件号" required>
|
||||
<el-input v-model="form.manager.idCard" :disabled="[0, 1].includes(userInfo.authStatus)"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="代理人电话" required>
|
||||
<el-input v-model="form.manager.mobile" :disabled="[0, 1].includes(userInfo.authStatus)"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证正面" required>
|
||||
<vk-data-upload :limit="1" v-model="form.manager.headPhotoPath"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)"></vk-data-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证反面" required>
|
||||
<vk-data-upload :limit="1" v-model="form.manager.backgroundIdCardPath"
|
||||
:disabled="[0, 1].includes(userInfo.authStatus)"></vk-data-upload>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click.native="submitAuth"
|
||||
v-if="form.authType === 2 && (userInfo.authStatus === null || [-1, 2].includes(userInfo.authStatus))">
|
||||
{{
|
||||
vk.getVuex('$user.userInfo.accountType') === 2 ? '提交企业认证' : '提交个人认证'
|
||||
}}
|
||||
</el-button>
|
||||
</template>
|
||||
</vk-data-form>
|
||||
<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 && (form1.data.authStatus === null || [-1, 2].includes(form1.data.authStatus))">
|
||||
{{
|
||||
vk.getVuex('$user.userInfo.accountType') === 2 ? '提交企业认证' : '提交个人认证'
|
||||
}}
|
||||
</el-button>
|
||||
<template v-else>
|
||||
<el-button @click="getCertUrl" type="primary" size="small">去认证</el-button>
|
||||
<el-button @click="getCertRes" type="primary" size="small">获取认证结果</el-button>
|
||||
</template>
|
||||
</el-form>
|
||||
|
||||
<!-- <vk-data-form ref="form1" v-model="form1.data" :action="form1.props.action" :columns="form1.props.columns"-->
|
||||
<!-- :footer-show="false"-->
|
||||
<!-- :before-action="form1.props.beforeAction" :rules="form1.props.rules"-->
|
||||
<!-- :form-type="form1.props.formType"-->
|
||||
<!-- :loading.sync="form1.props.loading" :auto-close="true" label-width="140px"-->
|
||||
<!-- @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:company.organizationPath="{form, keyName}">-->
|
||||
<!-- <vk-data-upload v-model="form1.data.organizationPath" limit="1"></vk-data-upload>-->
|
||||
<!-- <text class="text-main">请您上传盖章的扫描件或者复印件</text>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-slot:accountAuth="{form, keyName}">-->
|
||||
<!-- <div>-->
|
||||
<!-- <p>请用个人账户向以下账户转账0.10元。请备注:账号认证,平台将7个工作日内退回原账户。</p>-->
|
||||
<!-- <div>-->
|
||||
<!-- <span>户名:金久信</span>-->
|
||||
<!-- <span class="ml-35">开户行:中国广发银行南宁支行</span>-->
|
||||
<!-- <span class="ml-35">账号:6222XXXXX</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-slot:manageList="{form, keyName}">-->
|
||||
<!-- <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 && (JSON.stringify(form.manager) === '{}' || !form.manager)">-->
|
||||
<!-- 添加授权人-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </vk-data-form>-->
|
||||
<!-- <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 && (form1.data.authStatus === null || [-1, 2].includes(form1.data.authStatus))">-->
|
||||
<!-- {{-->
|
||||
<!-- vk.getVuex('$user.userInfo.accountType') === 2 ? '提交企业认证' : '提交个人认证'-->
|
||||
<!-- }}-->
|
||||
<!-- </el-button>-->
|
||||
</el-card>
|
||||
</view>
|
||||
</template>
|
||||
@@ -76,6 +293,10 @@
|
||||
<script>
|
||||
import {IdCard, Info} from '@icon-park/vue'
|
||||
import ManageList from "./manageList.vue";
|
||||
import form from "@icon-park/vue/lib/icons/Form";
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
|
||||
var _ = require('lodash');
|
||||
export default {
|
||||
@@ -83,7 +304,44 @@ export default {
|
||||
data() {
|
||||
// 页面数据变量
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
addressIndex: [null, null, null],
|
||||
manageList: [],
|
||||
goodsCate: [],
|
||||
form: {
|
||||
authType: null,
|
||||
company: {
|
||||
organization: '',
|
||||
addressRegion: {},
|
||||
addressDetail: '',
|
||||
mobile: '',
|
||||
mailAddress: '',
|
||||
contactEmail: '',
|
||||
companyAccount: '',
|
||||
companyBankName: '',
|
||||
personAccount: '',
|
||||
personBankName: '',
|
||||
accountName: '',
|
||||
businessType: '',
|
||||
invoiceInfo: '',
|
||||
taxType: '',
|
||||
taxImage: '',
|
||||
mainSpotCategoryIds: [],
|
||||
},
|
||||
manager: {
|
||||
type: null,
|
||||
personName: '',
|
||||
certType: '',
|
||||
idCard: '',
|
||||
mobile: '',
|
||||
headPhotoPath: '',
|
||||
backgroundIdCardPath: '',
|
||||
},
|
||||
|
||||
},
|
||||
userInfo: {},
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
@@ -95,6 +353,7 @@ export default {
|
||||
authType: 1,
|
||||
authStatus: null,
|
||||
refuseReason: '',
|
||||
organizationPath: '',
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
@@ -188,7 +447,7 @@ export default {
|
||||
{
|
||||
key: "address", title: "", type: "group", justify: "start",
|
||||
columns: [
|
||||
{key: "addressRegion", title: "公司所在地", type: "address",},
|
||||
{key: "addressRegion", title: "公司所在地", type: "address"},
|
||||
{
|
||||
key: "addressDetail",
|
||||
title: "详细地址",
|
||||
@@ -250,11 +509,16 @@ export default {
|
||||
},
|
||||
]
|
||||
},
|
||||
{key: "accountName", title: "户名", type: "text", placeholder: "请输入户名",},
|
||||
{
|
||||
key: "accountName",
|
||||
title: "个人账户名",
|
||||
type: "text",
|
||||
placeholder: "请输入个人账户名",
|
||||
},
|
||||
{
|
||||
key: "", title: "", type: "group", justify: "start",
|
||||
columns: [
|
||||
{key: "organizationPath", title: "上传营业执照", type: "image", limit: 1},
|
||||
{key: "organizationPath", title: "上传营业执照", type: "html"},
|
||||
{key: "businessType", title: "经营类目", type: "text"},
|
||||
]
|
||||
},
|
||||
@@ -319,68 +583,51 @@ export default {
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
// {
|
||||
// key: "bankCardNo",
|
||||
// title: "银行卡号",
|
||||
// type: "text",
|
||||
// disabled: true,
|
||||
// // tips: `请用个人账户向以下账户转账0.10元。请备注:账号认证,平台将7个工作日内退回原账户。\r\n,
|
||||
// // 户名:金久信开户行:中国广发银行南宁支行账号:622252 20151145678XX'`
|
||||
// },
|
||||
// {
|
||||
// key: "mailAddress",
|
||||
// title: "有效通讯地址",
|
||||
// type: "text"
|
||||
// },
|
||||
// {
|
||||
// key: "contactQq",
|
||||
// title: "QQ号码",
|
||||
// type: "text",
|
||||
// },
|
||||
// {
|
||||
// key: "contactEmail",
|
||||
// title: "邮箱",
|
||||
// type: "text",
|
||||
// },
|
||||
// {
|
||||
// key: "",
|
||||
// title: "",
|
||||
// type: "group",
|
||||
// justify: "start",
|
||||
// columns: [{
|
||||
// key: "contactWechatImage",
|
||||
// title: "微信二维码",
|
||||
// type: "image",
|
||||
// limit: 1
|
||||
// },
|
||||
// {
|
||||
// key: "contactWechat",
|
||||
// title: "微信号",
|
||||
// type: "text",
|
||||
// },
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// key: "bank_name",
|
||||
// title: "开户行",
|
||||
// type: "text",
|
||||
// },
|
||||
// {
|
||||
// key: "bank_account_name",
|
||||
// title: "户名",
|
||||
// type: "text",
|
||||
// },
|
||||
|
||||
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
mailAddress: [{
|
||||
required: true,
|
||||
message: "通讯地址不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
'company.organization': [
|
||||
{
|
||||
required: true,
|
||||
message: "统一社会信用代码不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
],
|
||||
'company.address.addressRegion': [
|
||||
{
|
||||
required: true,
|
||||
message: "公司所在地不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
],
|
||||
'company.mobile': [
|
||||
{
|
||||
required: true,
|
||||
message: "公司联系方式不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
],
|
||||
'company.companyAccount': [
|
||||
{
|
||||
required: true,
|
||||
message: "公司对公账号不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
],
|
||||
'company.companyBankName': [
|
||||
{
|
||||
required: true,
|
||||
message: "公司对公账号开户行不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
],
|
||||
mailAddress: [
|
||||
{
|
||||
required: true,
|
||||
message: "通讯地址不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
],
|
||||
contactQq: [{
|
||||
required: true,
|
||||
message: "QQ号码不能为空",
|
||||
@@ -396,15 +643,17 @@ export default {
|
||||
message: "微信二维码不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
contactEmail: [{
|
||||
required: true,
|
||||
message: "邮箱不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}, {
|
||||
validator: vk.pubfn.validator("email"),
|
||||
message: '邮箱格式错误',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
contactEmail: [
|
||||
{
|
||||
required: true,
|
||||
message: "邮箱不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}, {
|
||||
validator: vk.pubfn.validator("email"),
|
||||
message: '邮箱格式错误',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
@@ -413,20 +662,6 @@ 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;
|
||||
//
|
||||
// },
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
@@ -434,13 +669,25 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
this.getUserInfo()
|
||||
this.getGoodsCate()
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
this.userInfo = data.userInfo
|
||||
for (let key in this.form) this.form[key] = data.userInfo[key]
|
||||
if (JSON.stringify(data.userInfo.addressRegion) !== "{}") {
|
||||
this.addressIndex[0] = this.provinceData.findIndex(item => item.code === data.userInfo.addressRegion.province.code)
|
||||
if (this.addressIndex[0] !== -1) {
|
||||
this.addressIndex[1] = this.cityData[this.addressIndex[0]].findIndex(item => item.code === data.userInfo.addressRegion.city.code)
|
||||
if (this.addressIndex[1] !== -1) {
|
||||
this.addressIndex[2] = this.areaData[this.addressIndex[0]][this.addressIndex[1]].findIndex(item => item.code === data.userInfo.addressRegion.area.code)
|
||||
console.log(this.addressIndex[2], this.areaData[this.addressIndex[0]][this.addressIndex[1]], data.userInfo.addressRegion.area.code)
|
||||
}
|
||||
}
|
||||
}
|
||||
this.form1.data = _.pick(data.userInfo, [
|
||||
'fadadaConfirm', 'person', 'company', 'manager', 'contactWechat',
|
||||
'contactEmail', 'contactWechatImage', 'contactQq', 'mailAddress',
|
||||
@@ -460,6 +707,17 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
getGoodsCate() {
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getList',
|
||||
data: {
|
||||
level: 2
|
||||
},
|
||||
success: (res) => {
|
||||
this.goodsCate = res.data
|
||||
}
|
||||
});
|
||||
},
|
||||
onFormSuccess1() {
|
||||
window.location.reload()
|
||||
},
|
||||
@@ -480,6 +738,30 @@ export default {
|
||||
this.form1.data.manager = this.manageList[0]
|
||||
this.$refs.form1.submitForm()
|
||||
},
|
||||
async submitAuth() {
|
||||
if (this.addressIndex[2] === null || !this.form.company.addressDetail) return this.$message({
|
||||
type: 'error',
|
||||
message: '请完善公司所在地'
|
||||
})
|
||||
if (this.form.company.mainSpotCategoryIds.length === 0) return this.$message({
|
||||
type: 'error',
|
||||
message: '请选择主营商品'
|
||||
})
|
||||
this.form.company.addressRegion.province = this.provinceData[this.addressIndex[0]]
|
||||
this.form.company.addressRegion.city = this.cityData[this.addressIndex[0]][this.addressIndex[1]]
|
||||
this.form.company.addressRegion.area = this.areaData[this.addressIndex[0]][this.addressIndex[1]][this.addressIndex[2]]
|
||||
await vk.callFunction({
|
||||
url: 'client/user/kh/addAuth',
|
||||
data: {...this.form, ...{authStatus: 0}},
|
||||
})
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '提交成功'
|
||||
})
|
||||
setTimeout(() => {
|
||||
window.location.reload()
|
||||
}, 1500)
|
||||
},
|
||||
makeCard() {
|
||||
this.$emit('makeCard')
|
||||
},
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "_add_time",
|
||||
key: "_add_time_srt",
|
||||
title: "添加时间",
|
||||
type: "time",
|
||||
width: 160
|
||||
|
||||
+204
-153
@@ -1,169 +1,220 @@
|
||||
<template>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix" style="text-align: center">
|
||||
<span style="font-size: 20px;line-height: 2em;">消息推送设置</span>
|
||||
<div style="color: #999999">我们将针对您的选择,为您精准推送询价信息</div>
|
||||
</div>
|
||||
<el-row class="setting-list" :gutter="50">
|
||||
<el-col span="12" v-for="(item,index) in settingList" :key="index">
|
||||
<div class="item">
|
||||
<div class="title">
|
||||
<el-badge is-dot class="badge"></el-badge>
|
||||
{{ item.title }}
|
||||
</div>
|
||||
<div class="btn">
|
||||
<el-switch
|
||||
v-model="item.status">
|
||||
</el-switch>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider></el-divider>
|
||||
<div class="form">
|
||||
<div class="form-title">
|
||||
* 请选择产品:
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix" style="text-align: center">
|
||||
<span style="font-size: 20px;line-height: 2em;">消息推送设置</span>
|
||||
<div style="color: #999999">我们将针对您的选择,为您精准推送询价信息</div>
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-position="left" label-width="120px">
|
||||
<el-form-item label="螺纹钢、高线">
|
||||
<el-checkbox-group v-model="group1" size="small">
|
||||
<el-checkbox label="螺纹钢" border></el-checkbox>
|
||||
<el-checkbox label="盘螺" border></el-checkbox>
|
||||
<el-checkbox label="盘圆" border></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="钢材">
|
||||
<el-checkbox-group v-model="group1" size="small">
|
||||
<el-checkbox label="螺纹钢" border></el-checkbox>
|
||||
<el-checkbox label="盘螺" border></el-checkbox>
|
||||
<el-checkbox label="盘圆" border></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="钢版">
|
||||
<el-checkbox-group v-model="group1" size="small">
|
||||
<el-checkbox label="螺纹钢" border></el-checkbox>
|
||||
<el-checkbox label="盘螺" border></el-checkbox>
|
||||
<el-checkbox label="盘圆" border></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="型材">
|
||||
<el-checkbox-group v-model="group1" size="small">
|
||||
<el-checkbox label="螺纹钢" border></el-checkbox>
|
||||
<el-checkbox label="盘螺" border></el-checkbox>
|
||||
<el-checkbox label="盘圆" border></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="配件、耗材">
|
||||
<el-checkbox-group v-model="group1" size="small">
|
||||
<el-checkbox label="螺纹钢" border></el-checkbox>
|
||||
<el-checkbox label="盘螺" border></el-checkbox>
|
||||
<el-checkbox label="盘圆" border></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="二手钢材、设备">
|
||||
<el-checkbox-group v-model="group1" size="small">
|
||||
<el-checkbox label="螺纹钢" border></el-checkbox>
|
||||
<el-checkbox label="盘螺" border></el-checkbox>
|
||||
<el-checkbox label="盘圆" border></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="form">
|
||||
<div class="form-title">
|
||||
* 请选择服务地区:
|
||||
<el-row class="setting-list" :gutter="50">
|
||||
<el-col :span="12" v-for="(item,index) in settingList" :key="index">
|
||||
<div class="item">
|
||||
<div class="title">
|
||||
<el-badge is-dot class="badge"></el-badge>
|
||||
{{ item.title }}
|
||||
</div>
|
||||
<div class="btn">
|
||||
<el-switch
|
||||
v-model="item.status">
|
||||
</el-switch>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider></el-divider>
|
||||
<div class="form">
|
||||
<div class="form-title">
|
||||
* 请选择产品:
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-position="left" label-width="120px">
|
||||
<el-form-item :label="item.name" v-for="(item, index) in productList" :key="index">
|
||||
<el-checkbox-group v-model="productList[index].idList" size="small">
|
||||
<el-checkbox v-for="(productItem, productIndex) in item.children" :key="productIndex"
|
||||
:label="productItem._id" border
|
||||
:checked="productList[index].idList.includes(item._id)">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-position="left" label-width="120px">
|
||||
广西-南宁
|
||||
</el-form>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<el-button type="danger" round>保存设置</el-button>
|
||||
</el-card>
|
||||
<el-divider></el-divider>
|
||||
<div class="form">
|
||||
<div class="form-title">
|
||||
* 请选择服务地区:
|
||||
</div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[0]" placeholder="请选择省">
|
||||
<el-option v-for="(item, index) in provinceData" :key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[1]" placeholder="请选择市"
|
||||
:disabled="addressIndex.length === 0">
|
||||
<template v-if="addressIndex[0] !== null">
|
||||
<el-option v-for="(item, index) in cityData[addressIndex[0]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[2]" placeholder="请选择区"
|
||||
:disabled="addressIndex.length === 1">
|
||||
<template
|
||||
v-if="addressIndex[0] !== null && addressIndex[1] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in areaData[addressIndex[0]][addressIndex[1]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<el-button type="danger" round @click.native="save">保存设置</el-button>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let that;
|
||||
const originalForms = {sort: 0, enable: true}
|
||||
// import { VueCropper } from 'vue-cropper'
|
||||
export default {
|
||||
components: {
|
||||
// VueCropper
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
settingList: [
|
||||
{
|
||||
id: 1,
|
||||
title: '金融服务',
|
||||
status: true
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: '金融服务',
|
||||
status: true
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: '找合作信息推送服务',
|
||||
status: true
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
title: '找加工信息推送服务',
|
||||
status: false
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
title: '旧货信息交易推送服务',
|
||||
status: true
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
title: '询价单和选项推送服务',
|
||||
status: false
|
||||
}
|
||||
],
|
||||
form: {},
|
||||
group1: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
that = this
|
||||
},
|
||||
methods: {
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
|
||||
}
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
addressIndex: [null, null, null],
|
||||
settingList: {
|
||||
article: {
|
||||
title: '行情信息推送服务',
|
||||
status: false
|
||||
},
|
||||
process: {
|
||||
title: '找加工信息推送服务',
|
||||
status: false
|
||||
},
|
||||
old: {
|
||||
title: '旧货交易信息推送服务',
|
||||
status: false
|
||||
},
|
||||
enquiry: {
|
||||
title: '询价单和选项推送服务',
|
||||
status: false
|
||||
},
|
||||
},
|
||||
form: {},
|
||||
group1: [],
|
||||
productList: [],
|
||||
addressRegion: {}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.getCate()
|
||||
await this.getConfig()
|
||||
},
|
||||
methods: {
|
||||
async getConfig() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/message/config/kh/getConfig'
|
||||
})
|
||||
for (let key in this.settingList) this.settingList[key].status = res[key]
|
||||
this.productList.forEach((item, index) => {
|
||||
item.children.forEach(productItem => {
|
||||
if (res.productList.includes(productItem._id)) {
|
||||
this.productList[index].idList.push(productItem._id)
|
||||
}
|
||||
})
|
||||
})
|
||||
if (res.addressRegion.province) {
|
||||
this.addressIndex[0] = this.provinceData.findIndex(item => item.code === res.addressRegion.province.code)
|
||||
if (this.addressIndex[0] !== -1) {
|
||||
this.addressIndex[1] = this.cityData[this.addressIndex[0]].findIndex(item => item.code === res.addressRegion.city.code)
|
||||
if (this.addressIndex[1] !== -1) {
|
||||
this.addressIndex[2] = this.areaData[this.addressIndex[0]][this.addressIndex[1]].findIndex(item => item.code === res.addressRegion.area.code)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async getCate() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
});
|
||||
this.productList = rows.map(item => {
|
||||
item.idList = []
|
||||
return item
|
||||
})
|
||||
},
|
||||
async save() {
|
||||
let productList = []
|
||||
this.productList.forEach(item => {
|
||||
productList = [...productList, ...item.idList]
|
||||
})
|
||||
await vk.callFunction({
|
||||
url: 'client/message/config/kh/update',
|
||||
data: {
|
||||
article: this.settingList.article.status,
|
||||
process: this.settingList.process.status,
|
||||
old: this.settingList.old.status,
|
||||
enquiry: this.settingList.enquiry.status,
|
||||
productList,
|
||||
addressRegion: {
|
||||
province: this.provinceData[this.addressIndex[0]],
|
||||
city: this.cityData[this.addressIndex[0]][this.addressIndex[1]],
|
||||
area: this.areaData[this.addressIndex[0]][this.addressIndex[1]][this.addressIndex[2]],
|
||||
}
|
||||
}
|
||||
})
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '保存成功'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.setting-list{
|
||||
.item{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
margin: 5px auto;
|
||||
.title{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.badge{
|
||||
.setting-list {
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 5px;
|
||||
}
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
margin: 5px auto;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.badge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.form-title{
|
||||
color: #bf2b28;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 2em;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.form-title {
|
||||
color: #bf2b28;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.form{
|
||||
padding: 10px;
|
||||
|
||||
.form {
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
+246
-178
@@ -1,189 +1,257 @@
|
||||
<template>
|
||||
<view class="yaoqing">
|
||||
<view class="title">邀请新用户免费兑换会员</view>
|
||||
<view class="p2">
|
||||
<view class="item">
|
||||
<view class="text">共邀请<text class="red">7</text>人</view>
|
||||
<view class="btn">邀请列表</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="text">我的邀请码</view>
|
||||
<text class="red">12456</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="p3">
|
||||
<view class="item" v-for="item in huiyuan">
|
||||
<view class="t">{{item.title}}</view>
|
||||
<view class="b">{{item.subtitle}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="p4">
|
||||
<view class="wrapper">
|
||||
<view class="bg" :style="`width: ${p}%;`"></view>
|
||||
</view>
|
||||
<view class="tip" :style="`left: ${p}%;`">已邀请7人</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<view class="btn">复制邀请码</view>
|
||||
<view class="btn red" @click="openDuihuan">兑换会员</view>
|
||||
</view>
|
||||
|
||||
<el-dialog
|
||||
title="请选择要兑换的会员"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
:before-close="handleClose">
|
||||
<view class="p3">
|
||||
<view class="item" v-for="(item,index) in huiyuan" :key="index" :class="index == current ? 'active' : ''" @click="onSelect(index)">
|
||||
<view class="t">{{item.title}}</view>
|
||||
<view class="b">{{item.subtitle}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<view class="yaoqing">
|
||||
<view class="title">邀请新用户免费兑换会员</view>
|
||||
<view class="p2">
|
||||
<view class="item">
|
||||
<view class="text">共邀请
|
||||
<text class="red">{{ user.inviteNum }}</text>
|
||||
人
|
||||
</view>
|
||||
<view class="btn">邀请列表</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="text">我的邀请码</view>
|
||||
<text class="red">{{ user.my_invite_code }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="p3">
|
||||
<view v-for="(item, index) in userLevelList" :key="index">
|
||||
<view class="item" v-if="item.recommendUpgrade && parseInt(item.recommendUpgrade) > 0">
|
||||
<view class="t">{{ item.name }}</view>
|
||||
<view class="b">{{ item.upgradeDesc }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="p4">
|
||||
<view class="wrapper">
|
||||
<view class="bg" :style="`width: ${progress}%;`"></view>
|
||||
</view>
|
||||
<view class="tip" :style="`left: ${progress}%;`">已邀请{{ user.inviteNum }}人</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<view class="btn pointer" @click="copy">复制邀请码</view>
|
||||
<view class="btn red pointer" @click="openDuihuan">兑换会员</view>
|
||||
</view>
|
||||
|
||||
<el-dialog
|
||||
title="请选择要兑换的会员"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
:before-close="handleClose">
|
||||
<view class="p3">
|
||||
<view v-for="(item, index) in userLevelList" :key="index">
|
||||
<view class="item pointer"
|
||||
v-if="item.recommendUpgrade && parseInt(item.recommendUpgrade) > 0"
|
||||
:class="index == current ? 'active' : ''" @click="onSelect(item, index)">
|
||||
<view class="t">{{ item.name }}</view>
|
||||
<view class="b">{{ item.upgradeDesc }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确定兑换</el-button>
|
||||
<el-button type="primary" @click="exchangeUpgrade">确定兑换</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
huiyuan:[
|
||||
{title:'黄金vip LV1',subtitle:'邀请4人可兑换'},
|
||||
{title:'铂金vip LV1',subtitle:'邀请6人可兑换'},
|
||||
{title:'钻石vip LV1',subtitle:'邀请9人可兑换'},
|
||||
],
|
||||
p:45,
|
||||
current: 0,
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openDuihuan(){
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose(){
|
||||
this.dialogVisible = false
|
||||
},
|
||||
onSelect(index){
|
||||
this.current = index
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
progress: 0,
|
||||
current: 0,
|
||||
dialogVisible: false,
|
||||
user: this.vk.getVuex('$user.userInfo'),
|
||||
userLevelList: [],
|
||||
maxUpgradeNum: 100
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openDuihuan() {
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
onSelect(item, index) {
|
||||
if (parseInt(this.user.inviteNum) >= item.recommendUpgrade && item.level > parseInt(this.user.userLevel)) this.current = index
|
||||
},
|
||||
copy() {
|
||||
const url = window.location.origin + `/#/pages/auth/register/register?code=${this.user.my_invite_code}`
|
||||
document.oncopy = function (e) {
|
||||
e.clipboardData.setData('text', url);
|
||||
e.preventDefault();
|
||||
document.oncopy = null;
|
||||
}
|
||||
document.execCommand('Copy');
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '邀请码已复制'
|
||||
})
|
||||
},
|
||||
getUserLevelList() {
|
||||
vk.callFunction({
|
||||
url: 'client/userLevel/pub/getList',
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 200
|
||||
},
|
||||
success: (data) => {
|
||||
this.userLevelList = data.rows
|
||||
this.userLevelList.forEach(item => {
|
||||
if (item.recommendUpgrade && parseInt(item.recommendUpgrade) > 0)
|
||||
this.maxUpgradeNum = Math.max(this.maxUpgradeNum, item.recommendUpgrade)
|
||||
})
|
||||
this.progress = parseInt(this.vk.getVuex('$user.userInfo').inviteNum) / this.maxUpgradeNum * 100
|
||||
}
|
||||
});
|
||||
},
|
||||
async exchangeUpgrade(){
|
||||
await vk.callFunction({
|
||||
url: 'client/user/kh/exchangeUpgrade',
|
||||
data: {
|
||||
id: this.userLevelList[this.current]._id
|
||||
}
|
||||
});
|
||||
this.$message({
|
||||
type:'success',
|
||||
message: '兑换成功'
|
||||
})
|
||||
this.dialogVisible = false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getUserLevelList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.yaoqing{
|
||||
padding: 100upx;
|
||||
background-color: #fff;
|
||||
.title{
|
||||
font-size: 50upx;
|
||||
color: #A92924;
|
||||
}
|
||||
.p2{
|
||||
margin-top: 80upx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.item{
|
||||
display: flex;align-items: center;
|
||||
font-size: 30upx;
|
||||
margin-right: 100upx;
|
||||
text.red{
|
||||
color: #A92924;
|
||||
}
|
||||
.btn{
|
||||
margin-left:10upx;
|
||||
padding: 4upx 10upx;
|
||||
border-radius: 10upx;
|
||||
color: #fff;
|
||||
background-color: #ff8100;
|
||||
font-size: 24upx;
|
||||
.yaoqing {
|
||||
padding: 100upx;
|
||||
background-color: #fff;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.p3{
|
||||
margin-top: 80upx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
.item{
|
||||
width: 250upx;
|
||||
height: 180upx;
|
||||
border-radius: 10upx;
|
||||
box-shadow: 1px 1px 5px 1px #A92924;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24upx;
|
||||
color: #A92924;
|
||||
.t{
|
||||
font-size: 30upx;
|
||||
}
|
||||
}
|
||||
.active{
|
||||
background-color: #A92924;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.p4{
|
||||
margin-top: 80upx;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
.wrapper{
|
||||
position: relative;
|
||||
height: 30upx;
|
||||
border-radius: 15upx;
|
||||
overflow: hidden;
|
||||
background-color: #ddd;
|
||||
}
|
||||
.bg{
|
||||
position: absolute;
|
||||
// width: 50%;
|
||||
height: 100%;
|
||||
background-color: #A92924;
|
||||
}
|
||||
.tip{
|
||||
position: absolute;
|
||||
// left: 45%;
|
||||
top: -15upx;
|
||||
transform: translateX(-5%);
|
||||
padding: 0 20upx;
|
||||
height: 60upx;
|
||||
line-height: 60upx;
|
||||
border-radius: 30upx;
|
||||
background-color: #A92924;
|
||||
color: #fff;
|
||||
font-size: 26upx;
|
||||
}
|
||||
}
|
||||
|
||||
.btns{
|
||||
margin-top: 80upx;
|
||||
display: flex;
|
||||
.btn{
|
||||
width: 360upx;
|
||||
height: 80upx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 30upx;
|
||||
border: 1px solid #A92924;
|
||||
}
|
||||
.btn.red{
|
||||
margin-left: 200upx;
|
||||
color: #fff;
|
||||
background-color: #A92924;
|
||||
}
|
||||
}
|
||||
}
|
||||
.dialog-select{
|
||||
.item{
|
||||
}
|
||||
}
|
||||
.title {
|
||||
font-size: 50upx;
|
||||
color: #A92924;
|
||||
}
|
||||
|
||||
.p2 {
|
||||
margin-top: 80upx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 30upx;
|
||||
margin-right: 100upx;
|
||||
|
||||
text.red {
|
||||
color: #A92924;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-left: 10upx;
|
||||
padding: 4upx 10upx;
|
||||
border-radius: 10upx;
|
||||
color: #fff;
|
||||
background-color: #ff8100;
|
||||
font-size: 24upx;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.p3 {
|
||||
margin-top: 80upx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
|
||||
.item {
|
||||
width: 250upx;
|
||||
height: 180upx;
|
||||
border-radius: 10upx;
|
||||
box-shadow: 1px 1px 5px 1px #A92924;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24upx;
|
||||
color: #A92924;
|
||||
|
||||
.t {
|
||||
font-size: 30upx;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #A92924;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.p4 {
|
||||
margin-top: 80upx;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
.wrapper {
|
||||
position: relative;
|
||||
height: 30upx;
|
||||
border-radius: 15upx;
|
||||
overflow: hidden;
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.bg {
|
||||
position: absolute;
|
||||
// width: 50%;
|
||||
height: 100%;
|
||||
background-color: #A92924;
|
||||
}
|
||||
|
||||
.tip {
|
||||
position: absolute;
|
||||
// left: 45%;
|
||||
top: -15upx;
|
||||
transform: translateX(-5%);
|
||||
padding: 0 20upx;
|
||||
height: 60upx;
|
||||
line-height: 60upx;
|
||||
border-radius: 30upx;
|
||||
background-color: #A92924;
|
||||
color: #fff;
|
||||
font-size: 26upx;
|
||||
}
|
||||
}
|
||||
|
||||
.btns {
|
||||
margin-top: 80upx;
|
||||
display: flex;
|
||||
|
||||
.btn {
|
||||
width: 360upx;
|
||||
height: 80upx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 30upx;
|
||||
border: 1px solid #A92924;
|
||||
}
|
||||
|
||||
.btn.red {
|
||||
margin-left: 200upx;
|
||||
color: #fff;
|
||||
background-color: #A92924;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-select {
|
||||
.item {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user