20261008
This commit is contained in:
@@ -0,0 +1,149 @@
|
||||
<template>
|
||||
<u-picker ref="uPicker" :show="show" :columns="columns" @change="change" keyName="name"
|
||||
:defaultIndex="defaultIndex"
|
||||
@cancel="show = false" @close="show = false" closeOnClickOverlay @confirm="confirm">
|
||||
<template slot="more" v-if="addNation">
|
||||
<text @click="selectAll">全国</text>
|
||||
</template>
|
||||
</u-picker>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from '@/util/address/provinces.json'
|
||||
import citys from '@/util/address/citys.json'
|
||||
import areas from '@/util/address/areas.json'
|
||||
|
||||
export default {
|
||||
name: "AddressSelect",
|
||||
data() {
|
||||
return {
|
||||
level: 3,
|
||||
show: false,
|
||||
columns: [],
|
||||
defaultIndex: [0, 0, 0],
|
||||
addNation: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(data, level = 3, addNation = false) {
|
||||
this.show = true
|
||||
this.addNation = addNation
|
||||
if (level) this.level = level
|
||||
if (this.level === 3) {
|
||||
const cityCol = citys[0]
|
||||
if (cityCol[0].name !== '不限区域') {
|
||||
cityCol.unshift({
|
||||
'code': '0',
|
||||
'name': '不限区域',
|
||||
})
|
||||
}
|
||||
const areaCol = areas[0][0]
|
||||
if (areaCol[0].name !== '不限区域') {
|
||||
areaCol.unshift({
|
||||
'code': '0',
|
||||
'name': '不限区域',
|
||||
})
|
||||
}
|
||||
this.columns = [provinces,
|
||||
cityCol,
|
||||
areaCol
|
||||
]
|
||||
} else if (this.level === 2) this.columns = [provinces, citys[0]]
|
||||
else if (this.level === 1) this.columns = [provinces]
|
||||
if (data && data.province && data.province.name) {
|
||||
const provinceIndex = provinces.findIndex(item => item.name === data.province.name)
|
||||
let cityIndex = 0
|
||||
if (this.level > 1) {
|
||||
this.columns[1] = citys[provinceIndex]
|
||||
if (this.columns[1][0].name !== '不限区域') {
|
||||
this.columns[1].unshift({
|
||||
'code': '0',
|
||||
'name': '不限区域',
|
||||
})
|
||||
}
|
||||
this.$refs.uPicker.setColumnValues(1, this.columns[1])
|
||||
if (data.city && data.city.name) {
|
||||
cityIndex = this.columns[1].findIndex(item => item.name === data.city.name)
|
||||
}
|
||||
}
|
||||
if (this.level === 3) {
|
||||
this.columns[2] = areas[provinceIndex][cityIndex - 1]
|
||||
if (this.columns[2][0].name !== '不限区域') {
|
||||
this.columns[2].unshift({
|
||||
'code': '0',
|
||||
'name': '不限区域',
|
||||
})
|
||||
}
|
||||
this.$refs.uPicker.setColumnValues(2, this.columns[2])
|
||||
let areaIndex = 0
|
||||
if (data.area && data.area.name) {
|
||||
areaIndex = this.columns[2].findIndex(item => item.name === data.area.name)
|
||||
}
|
||||
this.defaultIndex = [provinceIndex, cityIndex, areaIndex]
|
||||
} else if (this.level === 2) this.defaultIndex = [provinceIndex, cityIndex]
|
||||
else if (this.level === 1) this.defaultIndex = [provinceIndex]
|
||||
}
|
||||
},
|
||||
change({columnIndex, index, indexs}) {
|
||||
console.log('index', columnIndex, index)
|
||||
console.log('indexs', indexs)
|
||||
// return
|
||||
if (columnIndex === 0 && this.level > 1) {
|
||||
console.log('here1')
|
||||
this.columns[1] = citys[index]
|
||||
if (this.columns[1][0].name !== '不限区域') {
|
||||
this.columns[1].unshift({
|
||||
'code': '0',
|
||||
'name': '不限区域',
|
||||
})
|
||||
}
|
||||
this.$refs.uPicker.setColumnValues(1, this.columns[1])
|
||||
if (this.level === 3) {
|
||||
this.columns[2] = areas[index][0]
|
||||
if (this.columns[2][0].name !== '不限区域') {
|
||||
this.columns[2].unshift({
|
||||
'code': '0',
|
||||
'name': '不限区域',
|
||||
})
|
||||
}
|
||||
this.$refs.uPicker.setColumnValues(2, this.columns[2])
|
||||
}
|
||||
} else if (columnIndex === 1 && this.level === 3 && indexs[1] !== 0) {
|
||||
console.log('here')
|
||||
if (index === 0) {
|
||||
this.columns[2] = [{
|
||||
'code': '0',
|
||||
'name': '不限区域',
|
||||
}]
|
||||
} else {
|
||||
console.log(indexs)
|
||||
this.columns[2] = areas[indexs[0]][indexs[1] - 1]
|
||||
if (this.columns[2][0].name !== '不限区域') {
|
||||
this.columns[2].unshift({
|
||||
'code': '0',
|
||||
'name': '不限区域',
|
||||
})
|
||||
}
|
||||
}
|
||||
this.$refs.uPicker.setColumnValues(2, this.columns[2])
|
||||
}
|
||||
this.defaultIndex = indexs
|
||||
this.$forceUpdate()
|
||||
},
|
||||
confirm({value}) {
|
||||
console.log(value)
|
||||
this.$emit('confirm', {
|
||||
province: value[0],
|
||||
city: this.level > 1 ? value[1] : null,
|
||||
area: this.level === 3 ? value[2] : null
|
||||
})
|
||||
this.show = false
|
||||
},
|
||||
selectAll() {
|
||||
this.confirm({
|
||||
value: [{code: null, name: '全国'}, {code: null, name: '全国'}, {code: null, name: '全国'}]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<u-modal :show="showContact" title="交易方信息" @confirm="showContact = false">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view class="pb-20 border-bottom">
|
||||
<p>对方信息:</p>
|
||||
<p>{{ otherName }}</p>
|
||||
<p>{{ otherPhone }}</p>
|
||||
</view>
|
||||
<view class="mt-10">
|
||||
<p>我方联系方式:</p>
|
||||
<p>{{ mineName }}</p>
|
||||
<p>{{ minePhone }}</p>
|
||||
</view>
|
||||
</view>
|
||||
</u-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "ContactModal",
|
||||
data() {
|
||||
return {
|
||||
showContact: false,
|
||||
otherPhone: '',
|
||||
minePhone: '',
|
||||
otherName: '',
|
||||
mineName: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(otherPhone = null, minePhone = null, otherName = null, mineName = null,) {
|
||||
this.showContact = true;
|
||||
this.otherPhone = otherPhone ?? '未留下联系方式'
|
||||
this.minePhone = minePhone ?? '未留下联系方式'
|
||||
this.otherName = otherName ?? '未留下联系方式'
|
||||
this.mineName = mineName ?? '未留下联系方式'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<el-carousel :height="`${height}rem`" :style="{width: width}" class="m-a">
|
||||
<el-carousel-item v-for="(item, index) in list.swiper" :key="item" :style="{width: width}">
|
||||
<image class="carousel-img" :src="item" mode="scaleToFill" :style="{width: width}" @click="onClick(index)"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "CommonSwiper",
|
||||
props: {
|
||||
page: {
|
||||
type: String,
|
||||
default: "index"
|
||||
},
|
||||
height: {
|
||||
type: String | Number,
|
||||
default: "11"
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: "100%"
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
vk.callFunction({
|
||||
url: 'client/album/pub/list',
|
||||
data: {
|
||||
page: this.page
|
||||
},
|
||||
success: res => {
|
||||
this.list = res
|
||||
console.log(this.list)
|
||||
}
|
||||
})
|
||||
},
|
||||
onClick(index) {
|
||||
if (this.list.companyId) vk.navigateTo(`/pages/yellowPage/info?id=${this.list.companyId}`)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
/deep/ .el-carousel__indicators {
|
||||
height: 30px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<view class="component">
|
||||
<view class="layout-empty">
|
||||
<view class="text">暂无更多内容~</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-empty {
|
||||
padding: 50rpx 30rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
color: #A7A7A7;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<view class="layout layout-fourth flex justify-between align-center">
|
||||
<view class="item" @click="listLink(0)">
|
||||
<view class="icon">
|
||||
<image class="radius" src="/static/img/four-1.png" mode=""></image>
|
||||
</view>
|
||||
<view :class="['text',{red: type === 0}]">拍卖信息</view>
|
||||
</view>
|
||||
<view class="item" @click="listLink(1)">
|
||||
<view class="icon">
|
||||
<image class="radius" src="/static/img/four-2.png" mode=""></image>
|
||||
</view>
|
||||
<view :class="['text',{red: type === 1}]">采购信息</view>
|
||||
</view>
|
||||
<view class="item" @click="listLink(2)">
|
||||
<view class="icon">
|
||||
<image class="radius" src="/static/img/four-3.png" mode=""></image>
|
||||
</view>
|
||||
<view :class="['text',{red: type === 2}]">租赁信息</view>
|
||||
</view>
|
||||
<view class="item" @click="listLink(3)">
|
||||
<view class="icon">
|
||||
<image class="radius" src="/static/img/four-4.png" mode=""></image>
|
||||
</view>
|
||||
<view :class="['text',{red: type === 3}]">物资回收信息</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
props: {
|
||||
type: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
listLink(type) {
|
||||
vk.navigateTo(`/pages/junk/list?type=${type}`);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.type)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-fourth {
|
||||
padding: 20rpx 30rpx;
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.icon {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
.text {
|
||||
margin-top: 8rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #101010;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,86 @@
|
||||
<template>
|
||||
<view class="component">
|
||||
<view class="layout-search flex justify-between align-center">
|
||||
<u-icon name="arrow-left" color="#ffffff" size="22" @click="handBack" v-if="showBack"></u-icon>
|
||||
<view class="search-box flex justify-between align-center">
|
||||
<u-icon name="search" size="24"></u-icon>
|
||||
<input class="flex-1 search-input" type="text" :placeholder="placeholder" v-model="keyword" @input="search"/>
|
||||
<view class="search-btn" @click="search">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
k: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请输入关键词',
|
||||
},
|
||||
showBack: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keyword: ''
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handBack() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
search() {
|
||||
this.$emit('search', this.keyword)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
k: {
|
||||
deep: true,
|
||||
handler(val) {
|
||||
console.log(val)
|
||||
this.keyword = val
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.keyword = this.k
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-search {
|
||||
// width: 690rpx;
|
||||
height: 80rpx;
|
||||
padding: 0 30rpx;
|
||||
background: #ae4f4d;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
width: 560rpx;
|
||||
height: 56rpx;
|
||||
padding: 0 20rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
|
||||
.search-input {
|
||||
padding: 4rpx 10rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<view class="layout layout-swiper">
|
||||
<u-swiper
|
||||
:list="list"
|
||||
radius="0"
|
||||
:indicator="false"
|
||||
:height="height"
|
||||
></u-swiper>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
};
|
||||
},
|
||||
props: {
|
||||
page: {
|
||||
type: String,
|
||||
default: "index"
|
||||
},
|
||||
height: {
|
||||
type: String | Number,
|
||||
default: "150rpx"
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: "100%"
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getSwiperList() {
|
||||
vk.callFunction({
|
||||
url: 'client/album/pub/list',
|
||||
data: {
|
||||
page: this.page
|
||||
},
|
||||
success: res => {
|
||||
this.list = res.swiper
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getSwiperList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.wrap{
|
||||
background-color: white;
|
||||
}
|
||||
.layout-fourth {
|
||||
padding: 20rpx 30rpx;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin-top: 8rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #101010;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<view class="component">
|
||||
<view class="layout-head flex justify-between align-center">
|
||||
<view class="m-left-20">
|
||||
<u-icon name="arrow-left" color="#ffffff" size="22" @click="handBack" v-if="showBack"></u-icon>
|
||||
</view>
|
||||
<view class="text flex-1 text-single p-right-20">
|
||||
{{ title }}
|
||||
</view>
|
||||
<view class="user flex justify-center align-center p-right-30">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/h-user.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text" @click="loginLink">{{
|
||||
(userData && userData.nickname) ? userData.nickname : '未登录'
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isLogin: false,
|
||||
userData: null
|
||||
}
|
||||
},
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: '金久信'
|
||||
},
|
||||
showBack: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
handBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
})
|
||||
},
|
||||
loginLink() {
|
||||
if (this.userData && this.userData.nickname) uni.switchTab({url: '/pages/user/user'})
|
||||
else vk.navigateTo('/pages/login/login')
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.userData = vk.getStorageSync('uni_id_user_info')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-head {
|
||||
// width: 750rpx;
|
||||
height: 80rpx;
|
||||
background: #ae4f4d;
|
||||
.num {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
.img {
|
||||
width: 220rpx;
|
||||
height: 58rpx;
|
||||
}
|
||||
.text {
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
.user {
|
||||
.icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
.text {
|
||||
padding-left: 10rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 32rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<view>
|
||||
<template v-if="['doc', 'docx'].includes(item.split('.').pop())">
|
||||
<file-word @click="openDownload" theme="outline" class="pointer" size="40" fill="#4a90e2" strokeLinecap="square"/>
|
||||
</template>
|
||||
<template v-else-if="['xls', 'xlsx'].includes(item.split('.').pop())">
|
||||
<file-excel @click="openDownload" theme="outline" class="pointer" size="40" fill="#417505" strokeLinecap="square"/>
|
||||
</template>
|
||||
<template v-else-if="['pdf'].includes(item.split('.').pop())">
|
||||
<file-pdf-one @click="openDownload" theme="outline" class="pointer" size="40" fill="#f5a623"
|
||||
strokeLinecap="square"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-image :src="item" style="width: 100px; height: 100px" fit="cover"
|
||||
:preview-src-list="[item]"/>
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {FileExcel, FilePdfOne, FileWord} from "@icon-park/vue";
|
||||
|
||||
export default {
|
||||
name: "file-type",
|
||||
components: {FilePdfOne, FileExcel, FileWord},
|
||||
props: {
|
||||
item: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
openDownload() {
|
||||
window.location.href = this.item
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,195 @@
|
||||
<template> <!-- 买家中心和卖家中心 -->
|
||||
<view class="component">
|
||||
<view class="layout-abc">
|
||||
<!-- 买家入门 -->
|
||||
<view class="abc-box bg-white">
|
||||
<view class="index-h3">
|
||||
<view class="big">买家入门</view>
|
||||
<view class="more" @click="$jump(`/pages/article/list?id=6573d7c3e0ec19b5047ffa8c`)">更多</view>
|
||||
</view>
|
||||
<view class="abc flex justify-between">
|
||||
<view class="abc-left">
|
||||
<image class="full" src="/static/img/abc-1.png" mode=""></image>
|
||||
</view>
|
||||
<view class="abc-right flex-1 p-left-20">
|
||||
<!-- <view class="link">买家中心</view> -->
|
||||
<view class="abc-tab flex justify-start">
|
||||
<view class="tab active">常见问题</view>
|
||||
<!-- <view class="tab">如何采购</view>-->
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="li" v-for="(item, index) in buyerArticleList" :key="index"
|
||||
@click="jump(`/pages/article/info?id=${item._id}`)">{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 卖家入门 -->
|
||||
<view class="abc-box bg-white mt-10">
|
||||
<view class="index-h3">
|
||||
<view class="big">卖家入门</view>
|
||||
<view class="more" @click="$jump(`/pages/article/list?id=6573d7bde0ec19b5047ff941`)">更多</view>
|
||||
</view>
|
||||
<view class="abc flex justify-between">
|
||||
<view class="abc-left">
|
||||
<image class="full" src="/static/img/abc-1.png" mode=""></image>
|
||||
</view>
|
||||
<view class="abc-right flex-1 p-left-20">
|
||||
<!-- <view class="link">卖家中心</view> -->
|
||||
<view class="abc-tab flex justify-start">
|
||||
<view class="tab active">常见问题</view>
|
||||
<!-- <view class="tab">如何采购</view>-->
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="li" v-for="(item, index) in sellerArticleList" :key="index"
|
||||
@click="jump(`/pages/article/info?id=${item._id}`)">{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isLogin: false,
|
||||
sellerArticleList: [],
|
||||
buyerArticleList: [],
|
||||
articleList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
buyerLink() {
|
||||
vk.navigateTo('/pages/user/buyer')
|
||||
},
|
||||
sellerLink() {
|
||||
vk.navigateTo('/pages/user/seller')
|
||||
},
|
||||
jump(url) {
|
||||
vk.navigateTo(url)
|
||||
},
|
||||
getArticleList() {
|
||||
const otherArticleIdList = []
|
||||
this.articleList.forEach((item, index) => {
|
||||
otherArticleIdList.push(item.id)
|
||||
})
|
||||
otherArticleIdList.push('6573d7bde0ec19b5047ff941')
|
||||
otherArticleIdList.push('6573d7c3e0ec19b5047ffa8c')
|
||||
this.sellerArticleList = []
|
||||
this.buyerArticleList = []
|
||||
this.articleList.forEach((item, index) => {
|
||||
this.articleList[index].list = []
|
||||
})
|
||||
vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 200,
|
||||
parentId: otherArticleIdList
|
||||
},
|
||||
success: (data) => {
|
||||
data.rows.forEach(item => {
|
||||
if (item.parentId === '6573d7bde0ec19b5047ff941') this.sellerArticleList.push(item)
|
||||
else if (item.parentId === '6573d7c3e0ec19b5047ffa8c') this.buyerArticleList.push(item)
|
||||
this.articleList.forEach((article, articleIndex) => {
|
||||
if (article.id === item.parentId) {
|
||||
this.articleList[articleIndex].list.push(item)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getArticleList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-abc {
|
||||
padding: 5rpx 30rpx;
|
||||
|
||||
.abc-box {
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.index-h3 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10rpx 0rpx;
|
||||
|
||||
.big {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
line-height: 40rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
|
||||
.more {
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #888888;
|
||||
}
|
||||
}
|
||||
|
||||
.abc {
|
||||
padding: 10rpx 10rpx;
|
||||
|
||||
.abc-left {
|
||||
width: 220rpx;
|
||||
height: 190rpx;
|
||||
}
|
||||
|
||||
.abc-right {
|
||||
position: relative;
|
||||
|
||||
.link {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: 9;
|
||||
font-size: 20rpx;
|
||||
line-height: 32rpx;
|
||||
color: #A92924;
|
||||
padding: 4rpx 8rpx;
|
||||
border: 1px solid #A92924;
|
||||
}
|
||||
|
||||
.abc-tab {
|
||||
width: 100%;
|
||||
height: 40rpx;
|
||||
overflow: hidden;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #666666;
|
||||
|
||||
.tab {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #A92924;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
margin-top: 6rpx;
|
||||
width: 100%;
|
||||
height: 144rpx;
|
||||
overflow: hidden;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #666666;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<view class="layout-advert">
|
||||
<view class="advert">
|
||||
<image class="full" src="/static/img/advert-1.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="advert">
|
||||
<image class="full" src="/static/img/advert-1.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isLogin: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-advert {
|
||||
padding: 10rpx 30rpx;
|
||||
.advert:nth-child(n+2) {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,189 @@
|
||||
<template>
|
||||
<view class="bg-white">
|
||||
<u-collapse accordion>
|
||||
<u-collapse-item title="平台服务">
|
||||
<view class="flex justify-between items-center py-15 border-bottom" v-for="(item, index) in serviceList"
|
||||
:key="index"
|
||||
@click="$jump(`/pages/article/info?id=${item._id}`)">
|
||||
<text class="text-28">{{ item.name }}</text>
|
||||
<u-icon name="arrow-right"/>
|
||||
</view>
|
||||
</u-collapse-item>
|
||||
<u-collapse-item title="交易流程">
|
||||
<view class="flex justify-between items-center py-15 border-bottom" v-for="(item, index) in tradeList"
|
||||
:key="index"
|
||||
@click="$jump(`/pages/article/info?id=${item._id}`)">
|
||||
<text class="text-28">{{ item.name }}</text>
|
||||
<u-icon name="arrow-right"/>
|
||||
</view>
|
||||
</u-collapse-item>
|
||||
<u-collapse-item title="关于金久信">
|
||||
<view class="flex justify-between items-center py-15 border-bottom" v-for="(item, index) in aboutList"
|
||||
:key="index"
|
||||
@click="$jump(`/pages/article/info?id=${item._id}`)">
|
||||
<text class="text-28">{{ item.name }}</text>
|
||||
<u-icon name="arrow-right"/>
|
||||
</view>
|
||||
</u-collapse-item>
|
||||
<u-collapse-item title="旧货交易">
|
||||
<view class="flex justify-between items-center py-15 border-bottom" v-for="(item, index) in oldList"
|
||||
:key="index"
|
||||
@click="$jump(`/pages/article/info?id=${item._id}`)">
|
||||
<text class="text-28">{{ item.name }}</text>
|
||||
<u-icon name="arrow-right"/>
|
||||
</view>
|
||||
</u-collapse-item>
|
||||
<u-collapse-item title="找加工">
|
||||
<view class="flex justify-between items-center py-15 border-bottom" v-for="(item, index) in processList"
|
||||
:key="index"
|
||||
@click="$jump(`/pages/article/info?id=${item._id}`)">
|
||||
<text class="text-28">{{ item.name }}</text>
|
||||
<u-icon name="arrow-right"/>
|
||||
</view>
|
||||
</u-collapse-item>
|
||||
<u-collapse-item title="金久信学堂">
|
||||
<view class="flex justify-between items-center py-15 border-bottom"
|
||||
@click="$jump(`/pages/article/list?id=6574521499c62431df5b562c`)">
|
||||
<text class="text-28">行业动态</text>
|
||||
<u-icon name="arrow-right"/>
|
||||
</view>
|
||||
<view class="flex justify-between items-center py-15 border-bottom"
|
||||
@click="$jump(`/pages/article/list?id=6573d6fcf082105ea4bb5d09`)">
|
||||
<text class="text-28">技术论坛</text>
|
||||
<u-icon name="arrow-right"/>
|
||||
</view>
|
||||
<view class="flex justify-between items-center py-15 border-bottom"
|
||||
@click="$jump(`/pages/school/school`)">
|
||||
<text class="text-28">执行标准</text>
|
||||
<u-icon name="arrow-right"/>
|
||||
</view>
|
||||
<view class="flex justify-between items-center py-15 border-bottom"
|
||||
@click="$jump(`/pages/school/school`)">
|
||||
<text class="text-28">基础知识</text>
|
||||
<u-icon name="arrow-right"/>
|
||||
</view>
|
||||
|
||||
</u-collapse-item>
|
||||
<u-collapse-item title="金久信金融">
|
||||
<view class="flex justify-between items-center mb-10" v-for="(item, index) in jinRongList" :key="index"
|
||||
@click="$jump(`/pages/article/info?id=${item._id}`)">
|
||||
<text class="text-28">{{ item.name }}</text>
|
||||
<u-icon name="arrow-right"/>
|
||||
</view>
|
||||
</u-collapse-item>
|
||||
|
||||
</u-collapse>
|
||||
<div class="text-25 text-gray p-20">
|
||||
<div class="mb-20 flex justify-between items-center">
|
||||
<p class="out-link">
|
||||
<a rel="nofollow" target="_self"
|
||||
href="https://baike.baidu.com/item/%E5%8D%97%E5%AE%81%E4%BA%BF%E5%88%A9%E9%80%9A%E9%92%A2%E7%AE%A1%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8/23408974?fr=ge_ala">亿利通官网</a>
|
||||
|<a rel="nofollow" target="_self"
|
||||
href="https://baike.baidu.com/item/%E5%8D%97%E5%AE%81%E4%BA%BF%E5%88%A9%E9%80%9A%E9%92%A2%E7%AE%A1%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8/23408974?fr=ge_ala">亿利通</a>
|
||||
</p>
|
||||
<span>客服电话:400 686 5559</span>
|
||||
</div>
|
||||
<div class="wuage-copyright">
|
||||
<p>Copyright © 2020-2021 jinjiuxinzg.cn All Rights Reserved </p>
|
||||
<p>版权所有: 南宁亿利通钢管有限公司</p>
|
||||
<div class="flex justify-between items-center">
|
||||
<a href="https://beian.miit.gov.cn" rel="nofollow" target="_blank">桂ICP备19008827号-1</a>
|
||||
<a class="wuage-copyright"
|
||||
href="https://beian.mps.gov.cn/#/query/webSearch?code=45010702002145" rel="noreferrer"
|
||||
target="blank">桂公网安备45010702002145</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "collapse",
|
||||
data() {
|
||||
return {
|
||||
jinRongList: [],
|
||||
tradeList: [],
|
||||
aboutList: [],
|
||||
coopList: [],
|
||||
processList: [],
|
||||
oldList: [],
|
||||
serviceList: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getJinRongList()
|
||||
this.getTradeList()
|
||||
this.getAboutList()
|
||||
this.getCoopList()
|
||||
this.getProcessList()
|
||||
this.getOldList()
|
||||
this.getServiceList()
|
||||
},
|
||||
methods: {
|
||||
async getJinRongList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
data: {
|
||||
parentId: "65761c6a09664c4f4a325a05"
|
||||
}
|
||||
})
|
||||
this.jinRongList = res.rows
|
||||
},
|
||||
async getTradeList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
data: {
|
||||
parentId: "657458db9755e36c09375be8"
|
||||
}
|
||||
})
|
||||
this.tradeList = res.rows
|
||||
},
|
||||
async getAboutList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
data: {
|
||||
parentId: "65761c33e0ec19b504d81f90"
|
||||
}
|
||||
})
|
||||
this.aboutList = res.rows
|
||||
},
|
||||
async getCoopList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
data: {
|
||||
parentId: "65761c53337a9f0756a154ee"
|
||||
}
|
||||
})
|
||||
this.coopList = res.rows
|
||||
},
|
||||
async getProcessList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
data: {
|
||||
parentId: "65761c49a09a9b1767464f4f"
|
||||
}
|
||||
})
|
||||
this.processList = res.rows
|
||||
},
|
||||
async getOldList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
data: {
|
||||
parentId: "65761c40466d41a58495c9ae"
|
||||
}
|
||||
})
|
||||
this.oldList = res.rows
|
||||
},
|
||||
async getServiceList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
data: {
|
||||
parentId: "65761c229755e36c0976fb82"
|
||||
}
|
||||
})
|
||||
this.serviceList = res.rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<view class="component">
|
||||
<view class="layout-facilitator">
|
||||
<view class="index-h2">
|
||||
<view class="big">金久信服务商展示</view>
|
||||
<view class="more">更多</view>
|
||||
</view>
|
||||
<view class="facilitator-box flex justify-start flex-wrap m-top-10">
|
||||
<view class="item flex direction-column align-center justify-center" @click="jump('/pages/article/info?id=65791ccbe0ec19b504538e31')">
|
||||
<image class="img" src="/static/img/god4hover.jpg" mode=""></image>
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/hs-1.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">交易安全</view>
|
||||
</view>
|
||||
<view class="item flex direction-column align-center justify-center" @click="jump('/pages/article/info?id=65791dc98b0da41d316435b7')">
|
||||
<image class="img" src="/static/img/feture-1.jpg" mode=""></image>
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/hs-3.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">优势资源匹配</view>
|
||||
</view>
|
||||
<view class="item flex direction-column align-center justify-center" @click="jump('/pages/article/info?id=65791dd0f082105ea491286f')">
|
||||
<image class="img" src="/static/img/god3hover.jpg" mode=""></image>
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/hs-4.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">交易多元化</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isLogin: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jump(url) {
|
||||
vk.navigateTo(url)
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-facilitator {
|
||||
padding: 10rpx 30rpx;
|
||||
.facilitator-box {
|
||||
.item {
|
||||
position: relative;
|
||||
width: 33%;
|
||||
height: 200rpx;
|
||||
.img {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.icon {
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
.text {
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
font-size: 22rpx;
|
||||
line-height: 40rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,112 @@
|
||||
<template>
|
||||
<view class="component" @click="openClose">
|
||||
<view class="layout-finance bg-white">
|
||||
<view class="title">金久信·金融服务</view>
|
||||
<view class="finance-box flex m-top-20">
|
||||
<view class="finance-left flex-1 p-right-20">
|
||||
<view class="big indent">买家采购更放心</view>
|
||||
<view class="text">
|
||||
先收货后付款,账单最长<text class="red">60</text>天
|
||||
</view>
|
||||
<view class="big indent m-top-20">卖家销售无压力</view>
|
||||
<view class="text">
|
||||
账期交易未到期,资金提前收。
|
||||
</view>
|
||||
</view>
|
||||
<view class="finance-right">
|
||||
<image class="full" src="/static/img/finance-1.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="finance-box flex m-top-20">
|
||||
<view class="finance-left flex-1 p-right-20">
|
||||
<view class="text m-top-20">
|
||||
利率低至年化<text class="red">4.35%</text>
|
||||
</view>
|
||||
<view class="big">赊账卖钢材,回款不担心!</view>
|
||||
</view>
|
||||
<view class="finance-right">
|
||||
<image class="full" src="/static/img/finance-2.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isLogin: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openClose() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '该功能暂未开放',
|
||||
showCancel: false,
|
||||
confirmText: '关闭'
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-finance {
|
||||
margin: 10rpx 30rpx;
|
||||
padding: 20rpx 20rpx;
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
line-height: 40rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
.finance-box {
|
||||
padding: 20rpx 20rpx 10rpx;
|
||||
border: 1px solid #f2f2f2;
|
||||
.finance-left {
|
||||
.big {
|
||||
padding: 6rpx 0;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
line-height: 40rpx;
|
||||
color: #101010;
|
||||
}
|
||||
.indent {
|
||||
position: relative;
|
||||
text-indent: 0.5em;
|
||||
&:before {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
z-index: 9;
|
||||
content: '';
|
||||
width: 2px;
|
||||
height: 2px;
|
||||
border-radius: 50%;
|
||||
background: #333333;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
line-height: 40rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.red {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #A92924;
|
||||
}
|
||||
}
|
||||
.finance-right {
|
||||
width: 250rpx;
|
||||
height: 230rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<view class="component">
|
||||
<view class="layout-goods">
|
||||
<view class="index-h2">
|
||||
<view class="big">现货市场</view>
|
||||
<view class="more" @click="listLink">更多</view>
|
||||
</view>
|
||||
<view class="goods-box">
|
||||
<view class="item" @click="detailLink(item._id)" v-for="(item, index) in spotGoodsData" :key="index">
|
||||
<view class="top" v-if="item.isTop">特别推荐</view>
|
||||
<view class="top" v-if="!item.isTop && index < 10">最新</view>
|
||||
<!-- <view class="link">立即查看</view>-->
|
||||
<view class="title text-single">{{ item.name }}</view>
|
||||
<view class="text m-top-10 flex justify-between align-center">
|
||||
<text class="text-main w-40p">库存:约{{ parseFloat(item.stock) }}吨</text>
|
||||
</view>
|
||||
<view class="text">供货地: {{ item.addressStr }}</view>
|
||||
<view class="flex justify-between align-center">
|
||||
<view class="text" v-if="item.user && item.user.company">{{
|
||||
item.user.company.companyName
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="date">{{ item._add_time_str }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isLogin: false,
|
||||
spotGoodsData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
listLink() {
|
||||
vk.navigateTo('/pages/goods/goods')
|
||||
},
|
||||
detailLink(id) {
|
||||
vk.navigateTo(`/pages/goods/detail?id=${id}`);
|
||||
},
|
||||
getSpotGoods() {
|
||||
vk.callFunction({
|
||||
url: 'client/spot/goods/pub/getList',
|
||||
loading: false,
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
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.spotGoodsData = data.rows
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getSpotGoods()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-goods {
|
||||
// width: 690rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
margin-top: 10rpx;
|
||||
padding: 10rpx 20rpx 20rpx;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 2px 7px 0px rgba(0, 0, 0, 0.12);
|
||||
|
||||
.title {
|
||||
width: 90%;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
line-height: 48rpx;
|
||||
color: #101010;
|
||||
}
|
||||
|
||||
.link, .askfor {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 16rpx;
|
||||
z-index: 9;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #A92924;
|
||||
padding: 4rpx 8rpx;
|
||||
}
|
||||
|
||||
.link {
|
||||
border: 1px solid #A92924;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.red {
|
||||
margin-right: 20rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.company {
|
||||
height: 40rpx;
|
||||
|
||||
.icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
width: 300rpx;
|
||||
height: 40rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #4f4f4f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item:nth-child(1) {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.top {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(169, 41, 36, 1);
|
||||
padding: 2px 5px;
|
||||
border-radius: 5px 0 5px 0;
|
||||
color: #FFFFFF;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,344 @@
|
||||
<template>
|
||||
<view class="component">
|
||||
<!-- <u-sticky offset-top="0" customNavHeight="0"></u-sticky> -->
|
||||
<view class="layout-head flex justify-between align-center" :class="{bgindex: index == 0}">
|
||||
<view class="num" @click="isPopup = true">
|
||||
<image class="full" src="/static/img/h-num.png" mode=""></image>
|
||||
</view>
|
||||
<view class="img flex justify-center items-center">
|
||||
<image class="full" v-if="!title" src="/static/img/h-center.jpg" mode="" @click="toHome"></image>
|
||||
<text class="text-white">{{ title }}</text>
|
||||
</view>
|
||||
<view class="user flex justify-center align-center">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/h-user.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text" @click="loginLink">{{
|
||||
(userData && userData.nickname) ? userData.nickname : '未登录'
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-popup :show="isPopup" mode="top" @close="isPopup = false" :safe-area-inset-bottom="false">
|
||||
<view class="popup-box">
|
||||
<view class="layout-head bgindex flex justify-between align-center">
|
||||
<view class="num" @click="isPopup = false">
|
||||
<image class="full" src="/static/img/h-num.png" mode=""></image>
|
||||
</view>
|
||||
<view class="img">
|
||||
<image class="full" src="/static/img/h-center.jpg" mode=""></image>
|
||||
</view>
|
||||
<view class="user flex justify-center align-center">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/h-user.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text" @click="loginLink">
|
||||
{{ (userData && userData.nickname) ? userData.nickname : '未登录' }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="popup-title" @click="toHome">首页</view>
|
||||
<view class="nav-box flex justify-start flex-wrap">
|
||||
<view class="item" @click="selfLink">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-1.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">金久信自营</view>
|
||||
</view>
|
||||
<view class="item" @click="goodsLink">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-2.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">现货市场</view>
|
||||
</view>
|
||||
<view class="item" @click="workLink">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-3.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">找加工</view>
|
||||
</view>
|
||||
<view class="item" @click="priceLink">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-4.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">找供应</view>
|
||||
</view>
|
||||
<view class="item mt-25" @click="junkLink">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-5.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">旧货交易</view>
|
||||
</view>
|
||||
<view class="item mt-25" @click="yellowLink">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-6.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">金久信黄页</view>
|
||||
</view>
|
||||
<view class="item mt-25" @click="schoolLink">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-7.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">金久信学堂</view>
|
||||
</view>
|
||||
<view class="item mt-25" @click="shopLink">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-8.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">特产商城</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="popup-title" @click="toUser">个人中心</view>
|
||||
<view class="nav-box flex justify-start flex-wrap">
|
||||
<view class="item" @click="buyerLink" style="width: 33%">
|
||||
<view class="icon icon-2">
|
||||
<image class="full" src="/static/img/pu-1.jpg" mode=""></image>
|
||||
</view>
|
||||
<view class="text text-2">买家中心</view>
|
||||
</view>
|
||||
<view class="item" @click="sellerLink" style="width: 33%">
|
||||
<view class="icon icon-2">
|
||||
<image class="full" src="/static/img/pu-2.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text text-2">卖家中心</view>
|
||||
</view>
|
||||
<view class="item" @click="orderLink" style="width: 33%;margin-top: 0">
|
||||
<view class="icon icon-2">
|
||||
<image class="full" src="/static/img/pu-5.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text text-2">订单管理</view>
|
||||
</view>
|
||||
<view class="item mt-25" @click="contractLink" style="width: 33%">
|
||||
<view class="icon icon-2">
|
||||
<image class="full" src="/static/img/pu-3.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text text-2">合同管理</view>
|
||||
</view>
|
||||
<view class="item mt-25" @click="signLink" style="width: 33%">
|
||||
<view class="icon icon-2">
|
||||
<image class="full" src="/static/img/sign.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text text-2">金久信签约宝</view>
|
||||
</view>
|
||||
<view class="item mt-25" @click="uploadLink" style="width: 33%">
|
||||
<view class="icon icon-2">
|
||||
<image class="full" src="/static/img/pu-4.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text text-2">我的上传</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-end items-center" v-if="userData && userData.nickname">
|
||||
<view class="mr-25 mt-30">
|
||||
<u-button size="small" type="primary" @click="logout">退出登录</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uinavr from '@/components/index/nav'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uinavr,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLogin: false,
|
||||
isPopup: false,
|
||||
userData: null
|
||||
}
|
||||
},
|
||||
props: {
|
||||
index: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
selfLink() {
|
||||
this.isPopup = false
|
||||
vk.navigateTo('/pages/self/self')
|
||||
},
|
||||
goodsLink() {
|
||||
this.isPopup = false
|
||||
vk.navigateTo('/pages/goods/goods')
|
||||
},
|
||||
workLink() {
|
||||
vk.navigateTo('/pages/work/work')
|
||||
},
|
||||
priceLink() {
|
||||
this.isPopup = false
|
||||
vk.navigateTo('/pages/price/price')
|
||||
},
|
||||
junkLink() {
|
||||
this.isPopup = false
|
||||
vk.navigateTo('/pages/junk/junk')
|
||||
},
|
||||
yellowLink() {
|
||||
this.isPopup = false
|
||||
vk.navigateTo('/pages/yellow/yellow')
|
||||
},
|
||||
schoolLink() {
|
||||
this.isPopup = false
|
||||
vk.navigateTo('/pages/school/school')
|
||||
},
|
||||
shopLink() {
|
||||
this.isPopup = false
|
||||
vk.navigateTo('/pages/shop/shop')
|
||||
},
|
||||
loginLink() {
|
||||
this.isPopup = false
|
||||
if (this.userData && this.userData.nickname) uni.switchTab({url: '/pages/user/user'})
|
||||
else vk.navigateTo('/pages/login/login')
|
||||
},
|
||||
userLink(index) {
|
||||
this.isPopup = false
|
||||
console.log('按照顺序判断跳转页面')
|
||||
},
|
||||
buyerLink() {
|
||||
this.isPopup = false
|
||||
vk.navigateTo('/pages/user/buyer')
|
||||
},
|
||||
sellerLink() {
|
||||
this.isPopup = false
|
||||
vk.navigateTo('/pages/user/seller')
|
||||
},
|
||||
contractLink() {
|
||||
this.isPopup = false
|
||||
vk.navigateTo('/pages/public/contract')
|
||||
},
|
||||
signLink() {
|
||||
this.isPopup = false
|
||||
vk.navigateTo('/pages/public/sign')
|
||||
},
|
||||
uploadLink() {
|
||||
this.isPopup = false
|
||||
vk.navigateTo('/pages/school/list')
|
||||
},
|
||||
orderLink() {
|
||||
this.isPopup = false
|
||||
vk.navigateTo('/pages/shop/order')
|
||||
},
|
||||
|
||||
logout() {
|
||||
vk.userCenter.logout({
|
||||
success: () => {
|
||||
uni.reLaunch({
|
||||
url: '/'
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
toHome() {
|
||||
uni.switchTab({url: '/pages/index/index'})
|
||||
},
|
||||
toUser() {
|
||||
uni.switchTab({url: '/pages/user/user'})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.userData = vk.getStorageSync('uni_id_user_info')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.bgindex {
|
||||
background: #A92924 !important;
|
||||
}
|
||||
|
||||
.layout-head {
|
||||
height: 80rpx;
|
||||
padding: 0 30rpx;
|
||||
background: #A92924;
|
||||
|
||||
.num {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
|
||||
.img {
|
||||
width: 240rpx;
|
||||
height: 58rpx;
|
||||
}
|
||||
|
||||
.user {
|
||||
.icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
padding-left: 10rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 32rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.popup-box {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding-bottom: 50rpx;
|
||||
background: #ffffff;
|
||||
|
||||
.popup-title {
|
||||
padding: 30rpx 30rpx 10rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
line-height: 40rpx;
|
||||
color: #101010;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-box {
|
||||
margin: 10rpx 30rpx;
|
||||
height: auto;
|
||||
padding: 30rpx 0;
|
||||
background: #F8F8F8;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.item {
|
||||
width: 25%;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
|
||||
.icon {
|
||||
margin: 0 auto;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
.icon-2 {
|
||||
width: 120rpx;
|
||||
height: 110rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin-top: 6rpx;
|
||||
height: 36rpx;
|
||||
overflow: hidden;
|
||||
font-size: 28rpx;
|
||||
line-height: 36rpx;
|
||||
color: #6C6C6C;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.text-2 {
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
//.item:nth-child(n+3) {
|
||||
//margin-top: 20rpx;
|
||||
//}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<view class="component">
|
||||
<view class="layout-model">
|
||||
<view class="index-h2">
|
||||
<view class="big">交易模式</view>
|
||||
<view class="more">更多</view>
|
||||
</view>
|
||||
<view class="model-box flex justify-between flex-wrap">
|
||||
<view class="w-50p">
|
||||
<view class="item" @click="jump('/pages/article/info?id=6583beb165234188b3be6732')">
|
||||
<view class="model flex justify-center align-center">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/abc-1.jpg" mode=""></image>
|
||||
</view>
|
||||
<view class="name">自主交易</view>
|
||||
</view>
|
||||
<view class="text">贷款直付销售商</view>
|
||||
<view class="text">双方平台保证金</view>
|
||||
<view class="link">交易流程></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="w-50p">
|
||||
<view class="item" @click="jump('/pages/article/info?id=6583bec8189f86d49ba8a58a')">
|
||||
<view class="model flex justify-center align-center">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/abc-2.jpg" mode=""></image>
|
||||
</view>
|
||||
<view class="name">金久信公正</view>
|
||||
</view>
|
||||
<view class="text">贷款直付销售商</view>
|
||||
<view class="text">交易成功后支付至销售商</view>
|
||||
<view class="link">交易流程></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="w-50p">
|
||||
<view class="item" @click="jump('/pages/article/info?id=6583bee1fe975f47a5931867')">
|
||||
<view class="model flex justify-center align-center">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-8-0.png" mode=""></image>
|
||||
</view>
|
||||
<view class="name">信誉采购</view>
|
||||
</view>
|
||||
<view class="text">平台接受信誉采购的销售商</view>
|
||||
<view class="text">进行交易、到期后结算</view>
|
||||
<view class="link">交易流程></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="w-50p">
|
||||
<view class="item" @click="jump('/pages/article/info?id=6583bef3f08210d4b8a10e8a')">
|
||||
<view class="model flex justify-center align-center">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-1-0.png" mode=""></image>
|
||||
</view>
|
||||
<view class="name">金久信自营</view>
|
||||
</view>
|
||||
<view class="text">贷款直付平台</view>
|
||||
<view class="text">交易成功后支付至销售商</view>
|
||||
<view class="link">交易流程></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isLogin: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jump(url) {
|
||||
vk.navigateTo(url)
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-model {
|
||||
// width: 690rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
|
||||
.model-box {
|
||||
padding: 10rpx 0;
|
||||
|
||||
.item {
|
||||
margin: 10rpx;
|
||||
//width: 294rpx;
|
||||
// min-height: 160rpx;
|
||||
height: 270rpx;
|
||||
//padding: 20rpx;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 2px 7px 0 rgba(0, 0, 0, 0.12);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
flex-direction: column;
|
||||
|
||||
&:nth-last-of-type(1) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
&:nth-last-of-type(2) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.ing {
|
||||
width: 120rpx;
|
||||
height: 44rpx;
|
||||
padding-left: 6rpx;
|
||||
color: #ffffff;
|
||||
background: url('~@/static/img/ing.png') center no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.link {
|
||||
margin: 10rpx auto 0;
|
||||
width: 140rpx;
|
||||
height: 44rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 44rpx;
|
||||
text-align: center;
|
||||
color: #A92924;
|
||||
border: 1px solid #A92924;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.model {
|
||||
padding: 6rpx 0;
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
.icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
position: relative;
|
||||
padding-left: 20rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
line-height: 48rpx;
|
||||
color: #101010;
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: -1px;
|
||||
z-index: 9;
|
||||
margin-left: -30rpx;
|
||||
content: '';
|
||||
width: 60rpx;
|
||||
height: 2px;
|
||||
background: #A92924;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,139 @@
|
||||
<template>
|
||||
<view class="component">
|
||||
<view class="layout-nav">
|
||||
<view class="nav-box flex justify-start flex-wrap" :class="{bgindex: index != 0}">
|
||||
<view class="item" @click="selfLink">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-1.jpg" mode=""></image>
|
||||
</view>
|
||||
<view class="text">金久信自营</view>
|
||||
</view>
|
||||
<view class="item" @click="goodsLink">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-2.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">现货市场</view>
|
||||
</view>
|
||||
<view class="item" @click="workLink">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-3.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">找加工</view>
|
||||
</view>
|
||||
<view class="item" @click="priceLink">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-4.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">找供应</view>
|
||||
</view>
|
||||
<view class="item" @click="junkLink">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-5.jpg" mode=""></image>
|
||||
</view>
|
||||
<view class="text">旧货交易</view>
|
||||
</view>
|
||||
<view class="item" @click="yellowLink">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-6.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">金久信黄页</view>
|
||||
</view>
|
||||
<view class="item" @click="schoolLink">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-7.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">金久信学堂</view>
|
||||
</view>
|
||||
<view class="item" @click="shopLink">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/nav-8.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">特产商城</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isLogin: false,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
index: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
selfLink() {
|
||||
vk.navigateTo('/pages/self/self')
|
||||
},
|
||||
goodsLink() {
|
||||
vk.navigateTo('/pages/goods/goods')
|
||||
},
|
||||
workLink() {
|
||||
vk.navigateTo('/pages/work/work')
|
||||
},
|
||||
priceLink() {
|
||||
vk.navigateTo('/pages/price/price')
|
||||
},
|
||||
junkLink() {
|
||||
vk.navigateTo('/pages/junk/junk')
|
||||
},
|
||||
yellowLink() {
|
||||
vk.navigateTo('/pages/yellow/yellow')
|
||||
},
|
||||
schoolLink() {
|
||||
vk.navigateTo('/pages/school/school')
|
||||
},
|
||||
shopLink() {
|
||||
vk.navigateTo('/pages/shop/shop')
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.nav-box {
|
||||
padding: 20rpx 0;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.bgindex {
|
||||
background: #F8F8F8;
|
||||
}
|
||||
.layout-nav {
|
||||
// width: 690rpx;
|
||||
height: auto;
|
||||
padding: 30rpx 30rpx;
|
||||
background: #ffffff;
|
||||
.item {
|
||||
width: 25%;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
.icon {
|
||||
margin: 0 auto;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
.text {
|
||||
margin-top: 6rpx;
|
||||
height: 36rpx;
|
||||
overflow: hidden;
|
||||
font-size: 28rpx;
|
||||
line-height: 36rpx;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.item:nth-child(n+5) {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,131 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<view class="layout-news">
|
||||
<view class="index-h2">
|
||||
<view class="big">资讯中心</view>
|
||||
<!-- <view class="more">更多</view>-->
|
||||
</view>
|
||||
<view class="news-box flex justify-between flex-wrap">
|
||||
<view class="w-100p" v-for="(item, index) in articleList" :key="index">
|
||||
<view class="item">
|
||||
<view class="title">{{ item.title }}</view>
|
||||
<view class="text u-line-1" v-for="(article, articleIndex) in item.list" :key="articleIndex"
|
||||
@click="jump(`/pages/article/info?id=${article._id}`)">
|
||||
{{ article.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isLogin: false,
|
||||
articleList: [
|
||||
{
|
||||
id: '657451bb6e5d2d335ab78b3a',
|
||||
title: '市场信息',
|
||||
list: []
|
||||
},
|
||||
{
|
||||
id: '65745200337a9f07565fb08d',
|
||||
title: '期货信息',
|
||||
list: []
|
||||
},
|
||||
{
|
||||
id: '6574520a7ad52d34471a9582',
|
||||
title: '行情分析',
|
||||
list: []
|
||||
},
|
||||
{
|
||||
id: '6574521499c62431df5b562c',
|
||||
title: '行业动态',
|
||||
list: []
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jump(url) {
|
||||
vk.navigateTo(url)
|
||||
},
|
||||
getArticleList() {
|
||||
const otherArticleIdList = []
|
||||
this.articleList.forEach((item, index) => {
|
||||
otherArticleIdList.push(item.id)
|
||||
})
|
||||
this.articleList.forEach((item, index) => {
|
||||
this.articleList[index].list = []
|
||||
})
|
||||
vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 500,
|
||||
parentId: otherArticleIdList
|
||||
},
|
||||
success: (data) => {
|
||||
data.rows.forEach(item => {
|
||||
this.articleList.forEach((article, articleIndex) => {
|
||||
if (article.id === item.parentId) {
|
||||
if (this.articleList[articleIndex].list.length < 5) this.articleList[articleIndex].list.push(item)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getArticleList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-news {
|
||||
padding: 10rpx 30rpx;
|
||||
|
||||
.news-box {
|
||||
padding: 10rpx 0;
|
||||
|
||||
.item {
|
||||
margin: 5rpx 10rpx;
|
||||
//width: 296rpx;
|
||||
//height: 250rpx;
|
||||
padding: 10rpx;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 2px 7px 0px rgba(0, 0, 0, 0.12);
|
||||
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
line-height: 44rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.text {
|
||||
//margin-top: 10rpx;
|
||||
width: 100%;
|
||||
height: 40rpx;
|
||||
overflow: hidden;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-last-of-type(1) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
&:nth-last-of-type(2) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<view class="layout-open bg-white">
|
||||
<view class="title">最新开通</view>
|
||||
<view class="open-box flex justify-between flex-wrap">
|
||||
<view class="li" @click="toCompany(item._id)" v-for="(item, index) in latestCompanyList" :key="index">{{ item.company.companyName }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isLogin: false,
|
||||
latestCompanyList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getLatestCompanyList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/user/pub/getCompany',
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 8,
|
||||
authStatus: 1
|
||||
}
|
||||
})
|
||||
this.latestCompanyList = rows
|
||||
},
|
||||
toCompany(id) {
|
||||
vk.navigateTo(`/pages/yellow/detail?id=${id}`)
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getLatestCompanyList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-open {
|
||||
margin: 10rpx 30rpx;
|
||||
padding: 20rpx 20rpx;
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
line-height: 40rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
.open-box {
|
||||
padding: 10rpx 0;
|
||||
min-height: 80rpx;
|
||||
.li {
|
||||
position: relative;
|
||||
width: 48%;
|
||||
height: 40rpx;
|
||||
overflow: hidden;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
line-height: 40rpx;
|
||||
color: #666666;
|
||||
text-indent: 1em;
|
||||
&:before {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
z-index: 9;
|
||||
content: '';
|
||||
width: 2px;
|
||||
height: 2px;
|
||||
border-radius: 50%;
|
||||
background: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,135 @@
|
||||
<template>
|
||||
<view class="component">
|
||||
<view class="layout-price">
|
||||
<view class="index-h2" style="padding-bottom: 0;">
|
||||
<view class="big">最新询价信息</view>
|
||||
<view class="more" @click="listLink">更多</view>
|
||||
</view>
|
||||
<view class="price-box flex justify-between flex-wrap">
|
||||
<view class="w-50p" @click="detailLink(item._id)" v-for="(item, index) in enquirySheetData"
|
||||
:key="index">
|
||||
<view class="item">
|
||||
<view class="price flex justify-start">
|
||||
<view class="ing">报价中</view>
|
||||
<view class="ed flex-1 p-left-10">{{ item.quoteNum }}家报价</view>
|
||||
</view>
|
||||
<view class="name text-single">{{ item.title.split(' -')[0] }}</view>
|
||||
<view class="name text-single" style="font-size: 24rpx">{{ item.title.split(' -')[1] }}</view>
|
||||
<view class="text-single">
|
||||
{{
|
||||
item.productList.map(product => (product.procureNumber ? product.procureNumber : '') + (product.procureUnit ? product.procureUnit : ''))[0]
|
||||
}}
|
||||
</view>
|
||||
<view class="date">{{ dayjs(item._add_time_str).format('MM/DD HH:mm') }}</view>
|
||||
<view class="company text-single">
|
||||
<template v-if="item.user">
|
||||
<template v-if="item.user.accountType === 1">{{ item.user.person.personName }}
|
||||
</template>
|
||||
<template v-if="item.user.accountType === 2">{{ item.user.company.companyName }}
|
||||
</template>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dayjs from "dayjs";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isLogin: false,
|
||||
enquirySheetData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dayjs,
|
||||
listLink() {
|
||||
vk.navigateTo('/pages/price/price')
|
||||
},
|
||||
detailLink(id) {
|
||||
vk.navigateTo(`/pages/price/detail?id=${id}`);
|
||||
},
|
||||
getEnquirySheetList() {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/pub/getList',
|
||||
loading: false,
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
latest: true
|
||||
},
|
||||
success: (data) => {
|
||||
this.enquirySheetData = data.rows.map(item => {
|
||||
item.fullAddress = ''
|
||||
item.fullAddress = (item.addressRegion && item.addressRegion.province) ? `${item.addressRegion.province.name}${item.addressRegion.city.name}${item.addressRegion.area.name}` : ''
|
||||
if (item.addressDetail) item.fullAddress += item.addressDetail
|
||||
return item
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getEnquirySheetList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-price {
|
||||
// width: 690rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
|
||||
.price-box {
|
||||
padding: 0;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
|
||||
.item {
|
||||
//width: 100%;
|
||||
// min-height: 160rpx;
|
||||
padding: 20rpx;
|
||||
height: 240rpx;
|
||||
margin: 10rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #9a9a9a;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 2px 7px 0px rgba(0, 0, 0, 0.12);
|
||||
|
||||
&:nth-last-of-type(1) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:nth-last-of-type(2) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.name {
|
||||
padding: 8rpx 0;
|
||||
font-size: 28rpx;
|
||||
line-height: 35rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.ing {
|
||||
width: 120rpx;
|
||||
height: 44rpx;
|
||||
padding-left: 6rpx;
|
||||
color: #ffffff;
|
||||
background: url('~@/static/img/ing.png') center no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.ed {
|
||||
color: #A92924;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,196 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="layout-semicircle">
|
||||
<view class="background">
|
||||
<view class="text-25 text-white text-right mb-15">客服电话:400 686 5559</view>
|
||||
<view class="title">
|
||||
<image class="title" src="/static/img/sem.jpg" mode=""></image>
|
||||
</view>
|
||||
<view class="flex justify-start items-center mt-20 type-list ml-10">
|
||||
<text class="item" :class="{active: active === 1}" @click="active = 1">现货</text>
|
||||
<text class="item" :class="{active: active === 2}" @click="active = 2">找供应</text>
|
||||
<text class="item" :class="{active: active === 3}" @click="active = 3">找加工</text>
|
||||
<text class="item" :class="{active: active === 4}" @click="active = 4">旧货</text>
|
||||
<text class="item" :class="{active: active === 0}" @click="active = 0">商品</text>
|
||||
</view>
|
||||
<view class="search-box flex justify-between align-center"
|
||||
:style="{borderTopLeftRadius: active === 0 ? '0' : '10rpx'}">
|
||||
<u-icon name="search" size="20"></u-icon>
|
||||
<input class="flex-1 search-input" type="text" placeholder="请输入关键词" v-model="keyword"/>
|
||||
<view class="search-btn" @click="search">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-white text-25 px-30 flex justify-start items-center" style="background-color: #A92924; padding-bottom: 20rpx">
|
||||
<view class="sort-text mr-10">分类 | </view>
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<view class="mr-10" style="flex-shrink: 0;" v-for="(item,index) in categoryData" :key="index" @click="cateSearch(item.name)">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="tel flex justify-center align-center">-->
|
||||
<!-- <u-icon name="phone" size="16"></u-icon>-->
|
||||
<!-- <view class="text" @click="handTel">咨询热线:100-768-1458</view>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isLogin: false,
|
||||
categoryData: [],
|
||||
active: 1,
|
||||
keyword: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handTel() {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: '100-768-1458'
|
||||
})
|
||||
},
|
||||
getCateList() {
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
loading: false,
|
||||
data: {},
|
||||
success: (data) => {
|
||||
data.rows.map(item => {
|
||||
item.showChild = false
|
||||
return item
|
||||
})
|
||||
this.categoryData = data.rows
|
||||
}
|
||||
});
|
||||
},
|
||||
search() {
|
||||
if (!this.keyword) return
|
||||
this.$emit('search', {
|
||||
keyword: this.keyword,
|
||||
type: this.active
|
||||
})
|
||||
},
|
||||
cateSearch(keyword) {
|
||||
this.$emit('search', {
|
||||
keyword,
|
||||
type: 1
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getCateList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-semicircle {
|
||||
background: #ffffff;
|
||||
|
||||
.title {
|
||||
margin: 0 auto;
|
||||
width: 550rpx;
|
||||
height: 58rpx;
|
||||
}
|
||||
|
||||
.tel {
|
||||
padding: 6rpx 0;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #9A9A9A;
|
||||
}
|
||||
}
|
||||
|
||||
.background {
|
||||
padding: 30rpx 30rpx 24rpx;
|
||||
background: #A92924;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
//margin-top: 30rpx;
|
||||
height: 80rpx;
|
||||
padding: 0 20rpx;
|
||||
background: #ffffff;
|
||||
border-bottom-left-radius: 10rpx;
|
||||
border-bottom-right-radius: 10rpx;
|
||||
border-top-right-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.search-input {
|
||||
padding: 4rpx 10rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.sort-box {
|
||||
position: relative;
|
||||
height: 80rpx;
|
||||
padding: 10rpx 30rpx 0;
|
||||
//background: url(@/static/img/elliptic.png) center no-repeat;
|
||||
background-color: #A92924;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.sort-text {
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
top: 20rpx;
|
||||
z-index: 9;
|
||||
width: 80rpx;
|
||||
height: 28rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
line-height: 28rpx;
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
border-right: 1px solid #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-box {
|
||||
position: absolute;
|
||||
left: 110rpx;
|
||||
top: 10rpx;
|
||||
z-index: 9;
|
||||
width: 600rpx;
|
||||
height: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
|
||||
.item {
|
||||
display: inline-block;
|
||||
padding: 0 12rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.type-list {
|
||||
.item {
|
||||
color: white;
|
||||
margin-right: 10rpx;
|
||||
font-size: 25rpx;
|
||||
padding: 10rpx;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #A92924;
|
||||
background-color: white;
|
||||
border-top-right-radius: 10rpx;
|
||||
border-top-left-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<view class="component" v-if="list.length">
|
||||
<view :style="{padding: padding, height : height}">
|
||||
<swiper class="swiper-box" :indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000">
|
||||
<swiper-item v-for="(item, index) in list" :key="index">
|
||||
<view class="swiper-item">
|
||||
<image class="full" :src="item.swiper" mode="" @click="onClick(item)"></image>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
ad: {
|
||||
type: Number,
|
||||
default: () => {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
padding: {
|
||||
type: String,
|
||||
default: '10rpx 30rpx'
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '115rpx'
|
||||
},
|
||||
categoryId: {
|
||||
type: [String, Number],
|
||||
default: null
|
||||
},
|
||||
categoryIds: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
categoryName: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
categoryNames: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
region: {
|
||||
type: [Object, Array, String, Number],
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getAd() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/ad/pub/getList',
|
||||
data: {
|
||||
adKey: this.ad,
|
||||
categoryId: this.categoryId || null,
|
||||
categoryIds: this.categoryIds && this.categoryIds.length ? this.categoryIds : null,
|
||||
categoryName: this.categoryName || null,
|
||||
categoryNames: this.categoryNames && this.categoryNames.length ? this.categoryNames : null,
|
||||
region: this.region || null,
|
||||
}
|
||||
})
|
||||
this.list = res.data || []
|
||||
},
|
||||
onClick(item){
|
||||
if ((item.type === 'company' || !item.type) && item.companyId)
|
||||
vk.navigateTo(`/pages/yellow/detail?id=${item.companyId}`)
|
||||
else if (item.type === 'goods' && item.goodsId)
|
||||
vk.navigateTo(`/pages/shop/detail?id=${item.goodsId}`)
|
||||
// vk.navigateTo(`/pages/yellow/detail?id=${item.companyId}`)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getAd()
|
||||
},
|
||||
watch: {
|
||||
categoryId() {
|
||||
this.getAd()
|
||||
},
|
||||
categoryName() {
|
||||
this.getAd()
|
||||
},
|
||||
categoryIds: {
|
||||
handler() {
|
||||
this.getAd()
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
categoryNames: {
|
||||
handler() {
|
||||
this.getAd()
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
region: {
|
||||
handler() {
|
||||
this.getAd()
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.swiper-box, .swiper-item {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<view class="layout-work">
|
||||
<view class="index-h2 p-left-30 p-right-30">
|
||||
<view class="big">合作商家</view>
|
||||
<view class="more" @click="listLink()">更多</view>
|
||||
</view>
|
||||
<view class="work-box flex justify-between flex-wrap bg-white">
|
||||
<view class="item" @click="detailLink(item._id)" v-for="(item, index) in companyList" :key="index">
|
||||
<view class="company flex justify-center align-center flex-nowrap">
|
||||
<view class="icon">
|
||||
<image class="radius" :src="item.businessCard.logo" mode=""></image>
|
||||
</view>
|
||||
<view class="text flex-1 p-left-20 text-single">{{ item.company.companyName }}</view>
|
||||
</view>
|
||||
<view class="main text-single m-top-10">
|
||||
主营:{{ item.company.mainSpotCategory.join() }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isLogin: false,
|
||||
companyList: [],
|
||||
allChildCate: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCategoryTreeData() {
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.allChildCate = []
|
||||
data.rows.forEach(item => {
|
||||
item.children.forEach(child => {
|
||||
this.allChildCate.push(child)
|
||||
})
|
||||
})
|
||||
this.getCompanyList()
|
||||
}
|
||||
});
|
||||
},
|
||||
listLink() {
|
||||
vk.navigateTo('/pages/yellow/yellow')
|
||||
},
|
||||
detailLink(id) {
|
||||
vk.navigateTo(`/pages/yellow/detail?id=${id}`);
|
||||
},
|
||||
async getCompanyList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/user/pub/getCompany',
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
isCoop: 1,
|
||||
}
|
||||
})
|
||||
this.companyList = rows.map(info => {
|
||||
info.company.mainSpotCategory = []
|
||||
if (info.company && info.company.mainSpotCategoryIds) {
|
||||
this.allChildCate.forEach(child => {
|
||||
if (info.company.mainSpotCategoryIds.includes(child._id)) {
|
||||
info.company.mainSpotCategory.push(child.name)
|
||||
}
|
||||
})
|
||||
}
|
||||
return info
|
||||
})
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getCategoryTreeData()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.work-box {
|
||||
padding: 20rpx 30rpx;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
width: 50%;
|
||||
height: 136rpx;
|
||||
padding: 10rpx;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
|
||||
.main {
|
||||
height: 36rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.company {
|
||||
width: 100%;
|
||||
height: 64rpx;
|
||||
|
||||
.icon {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
line-height: 48rpx;
|
||||
color: #101010;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item:nth-child(2n+1) {
|
||||
border-right: 1px solid #f2f2f2;
|
||||
}
|
||||
|
||||
.item:nth-last-child(-n+2) {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,189 @@
|
||||
<template>
|
||||
<view>
|
||||
<template v-if="userInfo && userInfo.userLevel < 3">
|
||||
<div class="ml-20 mt-20 text-main font-bold" v-if="!quoteExpiredAt || monthExpired">剩余报价次数:{{
|
||||
remainQuoteNum
|
||||
}}次
|
||||
</div>
|
||||
<div class="ml-20 mt-20 text-main font-bold" v-else-if="quoteExpiredAt && !monthExpired">
|
||||
报价包月过期时间:{{ dayjs(quoteExpiredAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</div>
|
||||
</template>
|
||||
<el-dialog title="报价次数" :visible.sync="dialogVisible" width="100%">
|
||||
<p>请选择购买模式</p>
|
||||
<div class="flex justify-center items-center flex-col">
|
||||
<div class="p-20 rounded m-20 shadow flex flex-col justify-center items-center flex-1 w-100p"
|
||||
:class="[buyQuoteMode === 'single' ? 'buy-quote-mode-active' : '']"
|
||||
@click="buyQuoteMode = 'single'">
|
||||
<p>单次购买</p>
|
||||
<p>{{ amount ? amount : singleQuoteAmount }}元/次</p>
|
||||
</div>
|
||||
<div class="p-20 rounded m-20 shadow flex flex-col justify-center items-center flex-1 w-100p"
|
||||
:class="[buyQuoteMode === item._id ? 'buy-quote-mode-active' : '']"
|
||||
:style="{cursor: 'not-allowed'}"
|
||||
@click="buyQuoteMode = item._id" v-for="(item, index) in monthlyQuoteAmountList" :key="index">
|
||||
<p>{{ item.name }}</p>
|
||||
<p>{{ item.amount }}元</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-20 flex flex-col justify-start items-start"
|
||||
v-if="userInfo.userLevel === 0 && buyQuoteMode !== 'single'">
|
||||
<p>您还未成为会员,仅能单次购买。</p>
|
||||
<div class="mt-25">
|
||||
<span>请</span>
|
||||
<span class="text-main font-bold pointer mx-15 text-35" style="text-decoration: underline"
|
||||
@click="toUpgrade">升级会员</span>
|
||||
<span> ,可享受优惠报价套餐。</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-20 " v-if="!userInfo.quoteExpiredAt">
|
||||
<span>剩余报价次数:</span>
|
||||
<span class="text-main font-bold text-35">{{ remainQuoteNum }}</span>
|
||||
<span>次</span>
|
||||
</div>
|
||||
<div class="mt-20 text-main font-bold" v-else>
|
||||
报价包月过期时间:{{ dayjs(quoteExpiredAt).format('YYYY-MM-DD') }}
|
||||
</div>
|
||||
<div class="mt-20 flex justify-center items-center">
|
||||
<el-button type="primary" :disabled="!buyQuoteMode || disabled" @click.native="doBuyQuote">确定
|
||||
</el-button>
|
||||
<el-button plain @click.native="cancel">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dayjs from "dayjs";
|
||||
|
||||
export default {
|
||||
name: "quote-remain-num",
|
||||
props: {
|
||||
amount: Number,
|
||||
type: String,
|
||||
id: String,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
remainQuoteNum: '',
|
||||
quoteExpiredAt: null,
|
||||
dialogVisible: false,
|
||||
monthExpired: false,
|
||||
buyQuoteMode: null,
|
||||
disabled: false,
|
||||
singleQuoteAmount: 1,
|
||||
monthlyQuoteAmount: 10,
|
||||
monthlyQuoteAmountList: [],
|
||||
userInfo: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dayjs,
|
||||
async getSingleQuoteAmount() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '6587b034466d41a591df881c'
|
||||
},
|
||||
})
|
||||
this.singleQuoteAmount = res.content
|
||||
},
|
||||
async getMonthlyAmount() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/quoteNumConfig/list/pub/list',
|
||||
})
|
||||
this.monthlyQuoteAmountList = rows
|
||||
},
|
||||
async doBuyQuote() {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/enquiry/quoteNum/kh/add',
|
||||
data: {
|
||||
buyQuoteMode: this.buyQuoteMode,
|
||||
type: this.type,
|
||||
id: this.id,
|
||||
},
|
||||
})
|
||||
this.dialogVisible = false
|
||||
vk.navigateTo({
|
||||
url: `/pages/shop/pay?id=${data}`
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
this.dialogVisible = false
|
||||
vk.navigateBack()
|
||||
},
|
||||
toUpgrade() {
|
||||
this.dialogVisible = false
|
||||
uni.setStorageSync('user_tab', 4)
|
||||
vk.navigateTo({
|
||||
url: `/pages/user/user`
|
||||
})
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
await this.getSingleQuoteAmount()
|
||||
await this.getMonthlyAmount()
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: async (data) => {
|
||||
this.userInfo = data.userInfo
|
||||
console.log(data.userInfo)
|
||||
if (this.amount) {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/user/kh/getUserQuoteNumList',
|
||||
data: {
|
||||
type: this.type,
|
||||
sheetId: this.id,
|
||||
},
|
||||
})
|
||||
if (!data.userInfo) this.remainQuoteNum = 0
|
||||
else this.remainQuoteNum = data.userInfo.remainQuoteNum
|
||||
} else {
|
||||
this.remainQuoteNum = data.userInfo.remainQuoteNum ? parseInt(data.userInfo.remainQuoteNum) : 0
|
||||
}
|
||||
this.quoteExpiredAt = data.userInfo.quoteExpiredAt ? dayjs(data.userInfo.quoteExpiredAt).format('YYYY-MM-DD HH:mm:ss') : null
|
||||
this.monthExpired = dayjs(data.userInfo.quoteExpiredAt).isBefore(dayjs())
|
||||
if (this.remainQuoteNum === 0 && (!this.quoteExpiredAt || dayjs(this.quoteExpiredAt).isBefore(dayjs()) && parseInt(data.userInfo) < 3)
|
||||
&& parseInt(data.userInfo.userLevel) < 3) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您的报价次数已用完/已过期,是否立即购买?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.dialogVisible = true
|
||||
}
|
||||
if (res.cancel) {
|
||||
vk.navigateBack()
|
||||
}
|
||||
}
|
||||
})
|
||||
// this.$confirm('您的报价次数已用完/已过期,是否立即购买?', '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'warning'
|
||||
// }).then(async () => {
|
||||
// this.dialogVisible = true
|
||||
// }).catch(() => {
|
||||
// vk.navigateBack()
|
||||
// })
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
buyQuoteMode(val) {
|
||||
if (this.userInfo.userLevel === 0) {
|
||||
if (val === 'single') this.disabled = false
|
||||
else this.disabled = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.buy-quote-mode-active {
|
||||
border: 1px solid #a92924;
|
||||
background-color: #f1c7c7;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<view class="pdf-page">
|
||||
<view class="pdf-wrap" :style="{'height':viewHeight}">
|
||||
<view ref="pdfRef" id="pdfView"></view>
|
||||
</view>
|
||||
<view v-if="showBottom" class="pdf-btn-group">
|
||||
<slot>
|
||||
<button class="btn-readed" size="mini" @click="handleComplete"
|
||||
:disabled="btnDisabled">{{showTimer ? countTimer<=1 ? '':'('+countTimer+'s)':''}}我已阅读</button>
|
||||
</slot>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pdfh5 from "pdfh5";
|
||||
import "pdfh5/css/pdfh5.css";
|
||||
export default {
|
||||
name: "u-pdf",
|
||||
props: {
|
||||
url: {
|
||||
type: String,
|
||||
require: true
|
||||
},
|
||||
viewHeight: {
|
||||
type: String,
|
||||
default: "100%"
|
||||
},
|
||||
showBottom: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
options: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
cMapUrl: "https://unpkg.com/pdfjs-dist@3.8.162/cmaps/",
|
||||
lazy: false,
|
||||
withCredentials: true,
|
||||
// pdfLoaded:false,
|
||||
renderType: "svg",
|
||||
maxZoom: 3, //手势缩放最大倍数 默认3
|
||||
scrollEnable: true, //是否允许pdf滚动
|
||||
zoomEnable: true //是否允许pdf手势缩放
|
||||
})
|
||||
},
|
||||
disabled:{
|
||||
type:Boolean,
|
||||
default:true
|
||||
},
|
||||
showTimer:Boolean
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
totalNum: 0,
|
||||
pdfh5: undefined,
|
||||
countTimer:10,
|
||||
timer:undefined,
|
||||
btnDisabled:true
|
||||
}
|
||||
},
|
||||
|
||||
watch:{
|
||||
disabled(n,o){
|
||||
this.btnDisabled = this.disabled
|
||||
},
|
||||
showTimer(n,o){
|
||||
console.log("showTimer ",n);
|
||||
if(this.showTimer){
|
||||
this.startCountDownTimer()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.loadPdf()
|
||||
})
|
||||
},
|
||||
|
||||
// onPageScroll(scroll) {
|
||||
// console.log(`onPageScroll ${scroll}`,scroll);
|
||||
// },
|
||||
|
||||
// onReachBottom(scroll) {
|
||||
// console.log(`onReachBottom 滚动到底部`);
|
||||
// },
|
||||
|
||||
methods: {
|
||||
handleComplete(){
|
||||
this.$emit("onClickReader")
|
||||
},
|
||||
|
||||
startCountDownTimer(){
|
||||
this.timer= setInterval(()=>{
|
||||
if(this.countTimer<=1){
|
||||
this.btnDisabled=false
|
||||
clearInterval(this.timer)
|
||||
}else{
|
||||
this.countTimer--
|
||||
}
|
||||
},1000)
|
||||
},
|
||||
|
||||
loadPdf() {
|
||||
if (!this.url) {
|
||||
console.error("pdf url is null ");
|
||||
return;
|
||||
}
|
||||
const opts = {
|
||||
pdfurl: this.url,
|
||||
...this.options
|
||||
}
|
||||
console.log(opts);
|
||||
this.pdfh5 = new Pdfh5('#pdfView', opts);
|
||||
// 准备加载pdf
|
||||
this.pdfh5.on("ready", () => {
|
||||
this.$emit("ready")
|
||||
})
|
||||
//pdf 监听完成事件
|
||||
this.pdfh5.on("complete", (status, msg, time) => {
|
||||
console.log(`PDF complete status=${status}, msg =${msg}`);
|
||||
this.$emit("complete", { status, msg })
|
||||
});
|
||||
// pdf 滚动事件 Svg 方式不会执行此方法, 需要在page中监听 onReachBottom,onPageScroll
|
||||
this.pdfh5.on("scroll", (scrollTop, currentNum) => {
|
||||
console.log(`pdf scrollTop =${scrollTop} , currentNum =${currentNum}`);
|
||||
this.$emit("scroll", { scrollTop, currentNum })
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import 'pdfh5/css/pdfh5.css';
|
||||
|
||||
.pdf-page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.pdf-wrap {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.pdf-btn-group {
|
||||
width: 100%;
|
||||
border-top: 2rpx solid #F8F9FC;
|
||||
height: 8%;
|
||||
position: fixed;
|
||||
bottom: -1rpx;
|
||||
z-index: 999;
|
||||
background: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.btn-readed {
|
||||
background: #4E70F6;
|
||||
color: #ffffff;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,189 @@
|
||||
<template> <!-- 账户管理 -->
|
||||
<view>
|
||||
<view class="layout layout-account">
|
||||
<view class="account-title m-top-20">用户名管理</view>
|
||||
<!-- <view class="account-head m-top-30">-->
|
||||
<!-- <view class="flex justify-center direction-column align-center">-->
|
||||
<!-- <u--image :showLoading="true" src="https://cdn.uviewui.com/uview/album/1.jpg" width="100rpx" height="100rpx" radius="10rpx"></u--image>-->
|
||||
<!-- <view class="xiu">修改头像</view>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="tip m-top-30">选择你喜欢的图片,格式为jpg、png、jpeg,大小不超过2M。</view>-->
|
||||
<!-- </view>-->
|
||||
<view class="account-form m-top-30">
|
||||
<view class="group">
|
||||
<u-icon name="account" color="#666" size="26"></u-icon>
|
||||
<view class="lb">用户名</view>
|
||||
<view class="vl">{{ userData.nickname }}</view>
|
||||
<!-- <view class="op">修改</view>-->
|
||||
</view>
|
||||
<view class="group">
|
||||
<u-icon name="phone" color="#666" size="26"></u-icon>
|
||||
<view class="lb">绑定手机号</view>
|
||||
<view class="vl">{{ userData.mobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2") }}</view>
|
||||
<!-- <view class="op">修改</view>-->
|
||||
</view>
|
||||
<!-- <view class="group">-->
|
||||
<!-- <u-icon name="email" color="#666" size="26"></u-icon>-->
|
||||
<!-- <view class="lb">绑定邮箱</view>-->
|
||||
<!-- <view class="vl">649077859@163.com</view>-->
|
||||
<!-- <view class="op">修改</view>-->
|
||||
<!-- </view>-->
|
||||
<view class="group">
|
||||
<u-icon name="lock" color="#666" size="26"></u-icon>
|
||||
<view class="lb">登录密码</view>
|
||||
<view class="vl">已设置</view>
|
||||
<view class="op" @click="showPopup = true">修改</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-popup closeable :show="showPopup"
|
||||
round="10"
|
||||
mode="center"
|
||||
:custom-style="{width: '80%'}"
|
||||
@close="showPopup = false">
|
||||
<view class="p-20 m-20 flex flex-center">
|
||||
<u-text text="修改登录密码" size="17" align="center"/>
|
||||
</view>
|
||||
<view class="mt-15">
|
||||
<u-cell-group :border="false">
|
||||
<u-cell title="原密码">
|
||||
<u-input v-model="formData.oldPassword" slot="value" placeholder="请输入原密码"/>
|
||||
</u-cell>
|
||||
<u-cell title="新密码">
|
||||
<u-input v-model="formData.newPassword" slot="value" placeholder="请输入新密码"/>
|
||||
</u-cell>
|
||||
<u-cell title="确认密码" :border="false">
|
||||
<u-input v-model="formData.passwordConfirmation" slot="value" placeholder="请输入确认密码"/>
|
||||
</u-cell>
|
||||
|
||||
</u-cell-group>
|
||||
</view>
|
||||
<view class="mt-15">
|
||||
<u-button type="primary" shapre="circle" @click="submit"
|
||||
:disabled="!formData.oldPassword || !formData.newPassword || !formData.passwordConfirmation">
|
||||
确定
|
||||
</u-button>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
props: {
|
||||
userData: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showPopup: false,
|
||||
formData: {
|
||||
oldPassword: null,
|
||||
newPassword: null,
|
||||
passwordConfirmation: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
if (!this.formData.oldPassword) return this.$message.error('请输入原密码');
|
||||
if (!this.formData.newPassword) return this.$message.error('请输入原密码');
|
||||
if (!this.formData.passwordConfirmation) return this.$message.error('请输入原密码');
|
||||
if (this.formData.newPassword !== this.formData.passwordConfirmation) return this.$message.error('两次输入的密码不一致!');
|
||||
if (this.formData.newPassword === this.formData.oldPassword) return this.$message.error('新密码不能与原密码相同!');
|
||||
if (this.formData.newPassword.length < 6 || this.formData.newPassword.length > 20) return this.$message.error('密码长度在 6 到 20 个字符');
|
||||
const reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]+$/
|
||||
if (!reg.test(this.formData.newPassword)) {
|
||||
return this.$message({
|
||||
message: '密码必须由数字和字母组成',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
vk.callFunction({
|
||||
url: 'user/kh/updatePwd',
|
||||
data: this.formData
|
||||
}).then(res => {
|
||||
this.$message.success('修改成功')
|
||||
this.formData = {
|
||||
oldPassword: null,
|
||||
newPassword: null,
|
||||
passwordConfirmation: null,
|
||||
}
|
||||
this.showPopup = false
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-account {
|
||||
padding: 10rpx 30rpx;
|
||||
|
||||
.account-title {
|
||||
position: relative;
|
||||
padding-left: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
line-height: 48rpx;
|
||||
color: #A92924;
|
||||
|
||||
&:before {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
z-index: 9;
|
||||
margin-top: -14rpx;
|
||||
content: '';
|
||||
width: 6rpx;
|
||||
height: 28rpx;
|
||||
background: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.tip {
|
||||
font-size: 24rpx;
|
||||
line-height: 48rpx;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.xiu {
|
||||
font-size: 24rpx;
|
||||
line-height: 48rpx;
|
||||
color: #A92924;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.group {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
|
||||
.lb {
|
||||
width: 150rpx;
|
||||
padding: 0 20rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 48rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.vl {
|
||||
flex: 1;
|
||||
font-size: 24rpx;
|
||||
line-height: 48rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.op {
|
||||
font-size: 24rpx;
|
||||
line-height: 48rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,131 @@
|
||||
<template>
|
||||
<view class="p-30">
|
||||
<view class="flex justify-end items-center">
|
||||
<u-button type="primary" @click="isAdd = !isAdd" v-if="!isAdd">新增业务联系人</u-button>
|
||||
</view>
|
||||
<view class="mt-20" v-if="isAdd">
|
||||
<el-form ref="form" :model="form" label-width="120px">
|
||||
<el-form-item label="姓名" required>
|
||||
<el-input v-model="form.name" placeholder="请输入姓名"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" required>
|
||||
<el-input v-model="form.phone" placeholder="请输入手机号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱" required>
|
||||
<el-input v-model="form.email" placeholder="请输入邮箱"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="职位" required>
|
||||
<el-input v-model="form.position" placeholder="请输入职位"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<view class="mt-30 flex justify-center items-center">
|
||||
<view class="flex-1 px-20">
|
||||
<u-button plain @click="isAdd = !isAdd">取消</u-button>
|
||||
</view>
|
||||
<view class="flex-1 px-20">
|
||||
<u-button type="primary" @click="addContact">确定</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="p-20 my-20 shadow rounded flex justify-between items-center" v-for="(item, index) in list"
|
||||
:key="index">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view>
|
||||
<text class="font-bold text-40">{{ item.name }}</text>
|
||||
<text class="ml-20 text-gray">({{ item.position }})</text>
|
||||
</view>
|
||||
<view class="my-20">手机号:{{ item.phone }}</view>
|
||||
<view class="my-20">邮箱:{{ item.email }}</view>
|
||||
</view>
|
||||
<view class="flex flex-col justify-end">
|
||||
<u-button type="primary" size="small" @click="edit(item)">编辑</u-button>
|
||||
<view class="mt-20">
|
||||
<u-button type="primary" size="small" @click="del(item._id)" plain>删除</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "business-contact",
|
||||
data() {
|
||||
return {
|
||||
isAdd: false,
|
||||
form: {
|
||||
_id: null,
|
||||
phone: '',
|
||||
name: '',
|
||||
email: '',
|
||||
position: '',
|
||||
},
|
||||
list: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async addContact() {
|
||||
if (!this.form.name) {
|
||||
this.$message.error('请输入姓名')
|
||||
return
|
||||
}
|
||||
if (!this.form.phone) {
|
||||
this.$message.error('请输入手机号')
|
||||
return
|
||||
}
|
||||
if (!this.form.email) {
|
||||
this.$message.error('请输入邮箱')
|
||||
return
|
||||
}
|
||||
if (!this.form.position) {
|
||||
this.$message.error('请输入职位')
|
||||
return
|
||||
}
|
||||
await vk.callFunction({
|
||||
url: 'client/businessContact/kh/action',
|
||||
data: this.form
|
||||
})
|
||||
this.$message.success(this.form._id ? '修改成功' : '新增成功')
|
||||
await this.getList()
|
||||
this.isAdd = false
|
||||
this.form = {
|
||||
_id: null,
|
||||
phone: '',
|
||||
name: '',
|
||||
email: '',
|
||||
position: '',
|
||||
}
|
||||
},
|
||||
async getList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/businessContact/kh/getList',
|
||||
})
|
||||
this.list = rows
|
||||
},
|
||||
del(_id) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认删除该业务联系人吗?',
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
await vk.callFunction({
|
||||
url: 'client/businessContact/kh/delete',
|
||||
data: {_id}
|
||||
})
|
||||
await this.getList()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
edit(item) {
|
||||
for (let key in this.form) this.form[key] = item[key]
|
||||
this.isAdd = true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,309 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="layout layout-equity">
|
||||
<view class="equity-title">
|
||||
尊敬的平台商家您好,目前您是我们平台的
|
||||
<text class="vip">{{ userLevelStr }}</text>
|
||||
客户,可享受相应的会员权益~
|
||||
</view>
|
||||
<view class="equity-main m-top-30">
|
||||
<!-- <view class="rule">会员规则</view>-->
|
||||
<view class="title flex justify-start align-center">
|
||||
<view class="vip">
|
||||
{{ userLevelStr }}
|
||||
<!-- <text class="lv m-left-10 m-right-20">LV1</text>-->
|
||||
</view>
|
||||
<u-tag text="当前等级" plain size="mini" color="#999" borderColor="#999"></u-tag>
|
||||
</view>
|
||||
<view class="date m-top-30" v-if="userInfo.upgradeExpiredAt">有效期至:{{ dayjs(userInfo.upgradeExpiredAt).format('YYYY-MM-DD HH:mm:ss') }}</view>
|
||||
<view class="m-top-30">
|
||||
<u--text suffixIcon="play-right-fill" color="#bfbfbf" iconStyle="font-size: 14px;color:#bfbfbf"
|
||||
text="当前交易总额"></u--text>
|
||||
<view class="text-30 font-bold text-white mt-20">{{ userInfo.transactionAmount }}</view>
|
||||
</view>
|
||||
<view class="flex justify-between align-center m-top-20">
|
||||
<view class="custom-style" @click="jump('/pages/user/grade')">去续费</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 保证金 -->
|
||||
<view class="equity-bail m-top-30 p-top-20">
|
||||
<view class="title">
|
||||
当前缴纳保证金
|
||||
<text class="strong">{{ userInfo.paidEnsure ? userInfo.paidEnsure.toFixed(2) : '0.00' }}</text>
|
||||
元
|
||||
</view>
|
||||
<view class="text m-top-20">
|
||||
<u--text type="info"
|
||||
text="金久信携手千万采购商和供应商,承诺为买家和卖家打造更优质的服务平台,缴纳诚信保证金会冻结在平台,最低保证金额度5000.00元 。"></u--text>
|
||||
</view>
|
||||
<view class="op flex justify-center m-top-30">
|
||||
<view class="o active" @click="jump('/pages/user/grade')">升级会员 ></view>
|
||||
<!-- <view class="o active" @click="jump('/pages/user/grade')">去缴纳保证金 ></view>-->
|
||||
<!-- <view class="o" @click="jump('/pages/user/grade')">购买增值权益 ></view>-->
|
||||
</view>
|
||||
</view>
|
||||
<!-- 权益 -->
|
||||
<view class="equity-info m-top-30 p-top-30">
|
||||
<view class="divider">
|
||||
<u-divider text="可享受一下权益"></u-divider>
|
||||
</view>
|
||||
<view class="divider-box flex justify-start flex-wrap">
|
||||
<view class="item">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/di-1.png" mode=""></image>
|
||||
</view>
|
||||
<view class="big m-top-10">9折报价</view>
|
||||
<view class="small">精准寻找买家</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/di-2.png" mode=""></image>
|
||||
</view>
|
||||
<view class="big m-top-10">10次/月询价</view>
|
||||
<view class="small">每成交50万送10次</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/di-3.png" mode=""></image>
|
||||
</view>
|
||||
<view class="big m-top-10">可自主交易</view>
|
||||
<view class="small">交易更方便</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/di-1.png" mode=""></image>
|
||||
</view>
|
||||
<view class="big m-top-10">黄页展示更丰富</view>
|
||||
<view class="small">让买家快速了解我</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/di-2.png" mode=""></image>
|
||||
</view>
|
||||
<view class="big m-top-10">平台增值服务享9折</view>
|
||||
<view class="small">交易更划算</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="icon">
|
||||
<image class="full" src="/static/img/di-3.png" mode=""></image>
|
||||
</view>
|
||||
<view class="big m-top-10">9折购买广告位</view>
|
||||
<view class="small">平台广告位购买</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dayjs from "dayjs";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
userData: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userInfo: {
|
||||
userLevel: -1,
|
||||
userGrade: 0,
|
||||
upgradeExpiredAt: '',
|
||||
transactionAmount: 0,
|
||||
paidEnsure: 0,
|
||||
},
|
||||
userLevelList: [],
|
||||
userLevelStr: '普通用户',
|
||||
userPayEnsureList: [],
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
dayjs,
|
||||
async getUserLevelList() {
|
||||
vk.callFunction({
|
||||
url: 'client/userLevel/pub/getList',
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 200
|
||||
},
|
||||
success: async (data) => {
|
||||
this.userLevelList = data.rows
|
||||
const {userInfo} = await vk.userCenter.getCurrentUserInfo()
|
||||
this.userInfo = userInfo
|
||||
if (this.userInfo.userLevel > -1) {
|
||||
this.userLevelStr = this.userLevelList.find(level => parseInt(level.level) === parseInt(this.userInfo.userLevel)).name
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
async getUserPayEnsureList(pageIndex = 1) {
|
||||
const {rows} = vk.callFunction({
|
||||
url: 'client/order/kh/getList',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: 500,
|
||||
type: [2, 3]
|
||||
},
|
||||
});
|
||||
this.userPayEnsureList = rows
|
||||
},
|
||||
jump(url) {
|
||||
vk.navigateTo({url})
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
await this.getUserLevelList()
|
||||
await this.getUserPayEnsureList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-equity {
|
||||
padding: 20rpx 30rpx;
|
||||
|
||||
.equity-title {
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #101010;
|
||||
|
||||
.vip {
|
||||
font-weight: 600;
|
||||
color: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.equity-main {
|
||||
position: relative;
|
||||
height: 300rpx;
|
||||
padding: 30rpx 30rpx;
|
||||
border-radius: 10rpx;
|
||||
background: url('~@/static/img/equity.png') center no-repeat;
|
||||
background-size: 100% 100%;
|
||||
box-shadow: 0px 5px 10px 0px rgba(145, 145, 145, 1);
|
||||
|
||||
.rule {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 20rpx;
|
||||
z-index: 9;
|
||||
font-size: 24rpx;
|
||||
line-height: 32rpx;
|
||||
color: rgba(255, 255, 255, 0.68);
|
||||
}
|
||||
|
||||
.vip {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
line-height: 32rpx;
|
||||
color: #DFBA8B;
|
||||
|
||||
.lv {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 26rpx;
|
||||
line-height: 32rpx;
|
||||
color: rgba(223, 186, 139, 0.5);
|
||||
}
|
||||
|
||||
.baibi {
|
||||
width: 420rpx;
|
||||
|
||||
.lv {
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #bfbfbf;
|
||||
}
|
||||
|
||||
.w {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
line-height: 44rpx;
|
||||
color: #bfbfbf;
|
||||
}
|
||||
}
|
||||
|
||||
.custom-style {
|
||||
width: 140rpx;
|
||||
height: 60rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
color: #9B7341;
|
||||
border-radius: 10rpx;
|
||||
background: linear-gradient(rgba(223, 186, 139, 1), rgba(255, 243, 207, 1));
|
||||
}
|
||||
}
|
||||
|
||||
.equity-bail {
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
line-height: 44rpx;
|
||||
color: #101010;
|
||||
|
||||
.strong {
|
||||
font-weight: 600;
|
||||
color: #A92924;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.o {
|
||||
width: 210rpx;
|
||||
height: 68rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 68rpx;
|
||||
color: #A92924;
|
||||
text-align: center;
|
||||
border: 1px solid #A92924;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #ffffff;
|
||||
background: #A92924;
|
||||
}
|
||||
|
||||
.divider {
|
||||
margin: 0 auto;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.divider-box {
|
||||
padding: 20rpx 0;
|
||||
|
||||
.item {
|
||||
width: 33.333%;
|
||||
height: auto;
|
||||
padding: 20rpx 0;
|
||||
overflow: hidden;
|
||||
|
||||
.icon {
|
||||
margin: 0 auto;
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
}
|
||||
|
||||
.big {
|
||||
font-size: 26rpx;
|
||||
line-height: 44rpx;
|
||||
color: #5a5a5a;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 24rpx;
|
||||
line-height: 32rpx;
|
||||
color: #bfbfbf;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,484 @@
|
||||
<template>
|
||||
<view class="layout layout-ident">
|
||||
<text class="text-main font-bold mb-20">加工商状态: {{
|
||||
(isNaN(factoryStatus) || factoryStatus === -1) ? '未提交审核' : (factoryStatus === 0 ? '审核中' : (factoryStatus === 1 ? '审核通过' : `审核不通过:${refuseReason}`))
|
||||
}}
|
||||
</text>
|
||||
<view class="form-box">
|
||||
<el-divider>
|
||||
<text class="text-50 text-main font-bold">工厂信息</text>
|
||||
</el-divider>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">成立年限</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:readonly="factoryStatus === 0"
|
||||
:dis="factoryStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.year"
|
||||
>
|
||||
<template #suffix>年</template>
|
||||
</u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">年产值</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:readonly="factoryStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.yearsIncome"
|
||||
>
|
||||
<template #suffix>万元</template>
|
||||
</u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">员工人数</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:readonly="factoryStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.employeeNum"
|
||||
>
|
||||
<template #suffix>人</template>
|
||||
</u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">流水线数量</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:readonly="factoryStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.flowNum"
|
||||
>
|
||||
<template #suffix>条</template>
|
||||
</u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">厂房归属</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:readonly="factoryStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.blongTo"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">厂房面积</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:readonly="factoryStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.size"
|
||||
>
|
||||
<template #suffix>平方米</template>
|
||||
</u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30" @click="showAddress">
|
||||
<view class="lb need">所在地</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请选择公司所在地"
|
||||
v-model="addressRegion"
|
||||
suffixIcon="arrow-down"
|
||||
suffixIconStyle="color: #909399"
|
||||
disabled
|
||||
disabledColor="#fff"
|
||||
style="pointer-events:none"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">主营工艺和业务范围</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:readonly="factoryStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.mainProcess"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">服务信息</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:readonly="factoryStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.serviceInfo"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<el-divider>
|
||||
<text class="text-50 text-main font-bold">视频</text>
|
||||
</el-divider>
|
||||
<view class="m-top-20">
|
||||
<u-upload
|
||||
accept="video"
|
||||
:fileList="form.video"
|
||||
@afterRead="afterReadVideo"
|
||||
@delete="deletePicVideo"
|
||||
:maxCount="1"
|
||||
width="70"
|
||||
height="70"
|
||||
></u-upload>
|
||||
</view>
|
||||
<el-divider>
|
||||
<text class="text-50 text-main font-bold">设备信息</text>
|
||||
</el-divider>
|
||||
<view v-for="(item, index) in form.deviceList" :key="index" class="rounded shadow p-30 mb-20">
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">设备名称</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:readonly="factoryStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.deviceList[index].name"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">设备数量</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:readonly="factoryStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.deviceList[index].num"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">设备来源</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:readonly="factoryStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.deviceList[index].source"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">设备类型</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:readonly="factoryStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.deviceList[index].type"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">品牌</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:readonly="factoryStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.deviceList[index].brand"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">型号</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:readonly="factoryStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.deviceList[index].model"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">投产年限</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:readonly="factoryStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.deviceList[index].year"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">特点描述</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:readonly="factoryStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.deviceList[index].desc"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-center mt-20">
|
||||
<view class="flex-1 px-20">
|
||||
<u-button size="small" color="#A92924" :plain="true" text="删除"
|
||||
@click="remove(index)"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-button size="small" color="#A92924" text="添加设备"
|
||||
@click="addDevice"></u-button>
|
||||
<el-divider>
|
||||
<text class="text-50 text-main font-bold">工厂实景</text>
|
||||
</el-divider>
|
||||
<view class="m-top-20">
|
||||
<u-upload
|
||||
:fileList="album"
|
||||
@afterRead="afterRead"
|
||||
@delete="deletePic"
|
||||
multiple
|
||||
:maxCount="10"
|
||||
width="70"
|
||||
height="70"
|
||||
></u-upload>
|
||||
</view>
|
||||
<u-button size="small" color="#A92924" text="提交"
|
||||
@click="submit"></u-button>
|
||||
</view>
|
||||
<AddressSelect ref="AddressSelect" @confirm="regionConfirm"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddressSelect from "@/components/AddressSelect.vue";
|
||||
import dayjs from "dayjs";
|
||||
import md5 from "js-md5";
|
||||
|
||||
export default {
|
||||
name: "factory",
|
||||
components: {AddressSelect},
|
||||
props: {
|
||||
userData: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
test: ''
|
||||
},
|
||||
form: {
|
||||
year: null,
|
||||
yearsIncome: null,
|
||||
employeeNum: null,
|
||||
flowNum: null,
|
||||
blongTo: null,
|
||||
size: null,
|
||||
addressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
},
|
||||
mainProcess: null,
|
||||
serviceInfo: null,
|
||||
deviceList: [],
|
||||
album: [],
|
||||
video: [],
|
||||
},
|
||||
options: [],
|
||||
addressRegion: '',
|
||||
deviceSource: ['国产', '进口'],
|
||||
deviceType: ['生产设备', '维护设备'],
|
||||
userLevel: {
|
||||
factoryPicNum: 0
|
||||
},
|
||||
factoryStatus: this.userData.factoryStatus,
|
||||
refuseReason: '',
|
||||
album: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showAddress() {
|
||||
this.$refs.AddressSelect.open(this.form.addressRegion, 2);
|
||||
},
|
||||
regionConfirm({province, city}) {
|
||||
this.form.addressRegion = {province, city}
|
||||
this.addressRegion = `${province.name}${city.name}`
|
||||
},
|
||||
addDevice() {
|
||||
this.form.deviceList.push({
|
||||
name: null,
|
||||
num: null,
|
||||
source: null,
|
||||
type: null,
|
||||
brand: null,
|
||||
model: null,
|
||||
year: null,
|
||||
desc: null
|
||||
})
|
||||
},
|
||||
remove(index) {
|
||||
this.form.deviceList.splice(index, 1)
|
||||
},
|
||||
async getUserLevelInfo() {
|
||||
const res = await vk.callFunction({
|
||||
url: "client/userLevel/kh/getInfoByUser",
|
||||
})
|
||||
if (res) {
|
||||
if (!res.data) {
|
||||
this.$message.error('请先完成认证')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
return
|
||||
}
|
||||
}
|
||||
},
|
||||
async submit() {
|
||||
if (!this.form.year) return this.$message.error('请输入投产年限')
|
||||
if (!this.form.yearsIncome) return this.$message.error('请输入年收入')
|
||||
if (!this.form.employeeNum) return this.$message.error('请选输入员工人数')
|
||||
if (!this.form.flowNum) return this.$message.error('请输入流水线数量')
|
||||
if (!this.form.blongTo) return this.$message.error('请输入厂房归属')
|
||||
if (!this.form.size) return this.$message.error('请输入厂房面积')
|
||||
if (!this.addressRegion) return this.$message.error('请选择所在地')
|
||||
if (this.form.deviceList.length === 0) return this.$message.error('请添加设备信息')
|
||||
if (this.form.album.length === 0) return this.$message.error('请上传工厂实景图')
|
||||
if (this.form.video.length > 0) this.form.video = this.form.video.map(item => item.url)
|
||||
await vk.callFunction({
|
||||
url: "client/factory/kh/addUpdate",
|
||||
data: this.form
|
||||
})
|
||||
this.$message.success('提交成功')
|
||||
this.factoryStatus = 0
|
||||
},
|
||||
async getInfo() {
|
||||
const res = await vk.callFunction({
|
||||
url: "client/factory/kh/getInfo",
|
||||
})
|
||||
if (res) {
|
||||
for (let key in this.form) this.form[key] = res[key]
|
||||
this.addressRegion = `${res.addressRegion.province.name}${res.addressRegion.city.name}`
|
||||
if (res.status === 2) this.refuseReason = res.refuseReason
|
||||
if (this.form.album && this.form.album.length > 0) {
|
||||
this.album = this.form.album.map(url => {
|
||||
return {
|
||||
url
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this.form.video) this.form.video = [{url: this.form.video[0]}]
|
||||
console.log(this.form.video)
|
||||
}
|
||||
},
|
||||
afterRead({file}) {
|
||||
file.forEach(item => {
|
||||
console.log(item)
|
||||
uniCloud.uploadFile({
|
||||
filePath: item.url,
|
||||
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + item.name,
|
||||
success: ({fileID}) => {
|
||||
uniCloud.getTempFileURL({
|
||||
fileList: [fileID]
|
||||
}).then(res => {
|
||||
this.album.push({url: res.fileList[0].tempFileURL})
|
||||
this.form.album.push(res.fileList[0].tempFileURL)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
deletePic({index}) {
|
||||
this.album.splice(index, 1)
|
||||
this.form.album.splice(index, 1)
|
||||
},
|
||||
afterReadVideo({file}) {
|
||||
console.log(file.type)
|
||||
if (file.type !== 'video/mp4' && file.type !== 'video') {
|
||||
uni.showToast({
|
||||
title: '请上传MP4文件',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
uniCloud.uploadFile({
|
||||
filePath: file.url,
|
||||
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(file.name + Date.now().toString()) + '.mp4',
|
||||
success: ({fileID}) => {
|
||||
uniCloud.getTempFileURL({
|
||||
fileList: [fileID]
|
||||
}).then(res => {
|
||||
this.form.video = [{url: res.fileList[0].tempFileURL}]
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
deletePicVideo() {
|
||||
this.form.video = []
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getUserLevelInfo()
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
const factoryStatus = parseInt(data.userInfo.factoryStatus)
|
||||
this.factoryStatus = (isNaN(factoryStatus) || factoryStatus === -1) ? -1 : factoryStatus
|
||||
if (this.factoryStatus > -1) this.getInfo()
|
||||
}
|
||||
})
|
||||
},
|
||||
computed: {
|
||||
deviceNum() {
|
||||
let num = 0
|
||||
this.form.deviceList.forEach(item => {
|
||||
if (item.num && !isNaN(parseInt(item.num))) num += parseInt(item.num)
|
||||
})
|
||||
return num
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
.layout-ident {
|
||||
padding: 20rpx 30rpx;
|
||||
|
||||
.group {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.lb, .fix {
|
||||
position: relative;
|
||||
min-width: 150rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.lbx {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.download {
|
||||
padding: 8rpx 20rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #ffffff;
|
||||
background: #A92924;
|
||||
}
|
||||
|
||||
.need::before {
|
||||
position: absolute;
|
||||
left: -16rpx;
|
||||
top: 50%;
|
||||
z-index: 9;
|
||||
margin-top: -12rpx;
|
||||
content: '*';
|
||||
color: #A92924;
|
||||
font-size: 32rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.public-btn {
|
||||
width: 100%;
|
||||
margin-top: 60rpx;
|
||||
color: #ffffff;
|
||||
background: #A92924;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,879 @@
|
||||
<template> <!-- 企业认证 -->
|
||||
<view>
|
||||
<view class="layout layout-ident">
|
||||
<!-- 企业认证 -->
|
||||
<u--text prefixIcon="calendar" iconStyle="font-size: 28px;color:#A92924" size="20" color="#A92924"
|
||||
:text="userInfo.accountType === 2 ? '企业认证' : '个人认证'"></u--text>
|
||||
<u--text prefixIcon="checkmark-circle" iconStyle="font-size: 18px;color:#A92924" size="15" color="#A92924"
|
||||
:text="statusLabel" v-if="userInfo.authStatus > -1 || userInfo.fadadaConfirm"></u--text>
|
||||
<view style="margin: 30rpx 0">
|
||||
<el-radio-group v-model="userType" @change="changeUserType">
|
||||
<el-radio :label="0">
|
||||
<text class="text-28">平台交易功能用户注册</text>
|
||||
</el-radio>
|
||||
<view class="mt-15">
|
||||
<el-radio :label="1">
|
||||
<text class="text-28">金久信签约宝用户、特产商城用户注册</text>
|
||||
</el-radio>
|
||||
</view>
|
||||
</el-radio-group>
|
||||
</view>
|
||||
<view class="mt-15 flex justify-center items-center">
|
||||
<view class="mx-15">
|
||||
<u-button @click="getCertUrl()" type="primary" size="small" v-if="!userInfo.fadadaConfirm">去认证
|
||||
</u-button>
|
||||
</view>
|
||||
<!-- <view class="mx-15">-->
|
||||
<!-- <u-button @click="getCertUrl()" type="primary" size="small" v-if="userInfo.authStatus > -1">-->
|
||||
<!-- 获取认证结果-->
|
||||
<!-- </u-button>-->
|
||||
<!-- </view>-->
|
||||
<view class="mx-15">
|
||||
<u-button @click="getCertUrl(true)" plain type="primary" size="small" v-if="userInfo.authStatus > -1">
|
||||
信息变更
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="userType === 0">
|
||||
<view class="form-box" v-if="userInfo.authStatus > -1 || userInfo.fadadaConfirm">
|
||||
<template v-if="userInfo.accountType === 2">
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">公司名称</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
disabled
|
||||
placeholder="请输入内容"
|
||||
v-model="userInfo.company.companyName"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">信用代码</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请输入内容"
|
||||
v-model="form.company.organization"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30" @click="showAddress">
|
||||
<view class="lb need">公司所在地</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请选择公司所在地"
|
||||
v-model="addressRegion"
|
||||
suffixIcon="arrow-down"
|
||||
suffixIconStyle="color: #909399"
|
||||
disabled
|
||||
disabledColor="#fff"
|
||||
style="pointer-events:none"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">详细地址</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请输入内容"
|
||||
v-model="form.company.addressDetail"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">法定代表人</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请输入内容"
|
||||
v-model="form.company.legalName"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">公司电话</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请输入内容"
|
||||
v-model="form.company.mobile"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">有效通信地址</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请输入内容"
|
||||
v-model="form.company.mailAddress"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">邮箱地址</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请输入内容"
|
||||
v-model="form.company.contactEmail"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">对公账户</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请输入内容"
|
||||
v-model="form.company.companyAccount"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">开户行</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请输入内容"
|
||||
v-model="form.company.companyBankName"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30" @click="showIndustry = true">
|
||||
<view class="lb need">行业分类</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
style="pointer-events:none"
|
||||
placeholder="请选择公司行业分类"
|
||||
v-model="form.company.businessType"
|
||||
suffixIcon="arrow-down"
|
||||
suffixIconStyle="color: #909399"
|
||||
disabled
|
||||
disabledColor="#fff"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex flex-col items-start justify-start m-top-30" style="align-items: flex-start">
|
||||
<view class="lb need mb-15">主营商品</view>
|
||||
<view class="vl flex-1">
|
||||
<!-- <u-checkbox-group v-model="form.company.mainSpotCategoryIds">-->
|
||||
<!-- <view class="u-flex u-flex-wrap justify-start items-start w-100p">-->
|
||||
<!-- <view class="w-50p" v-for="(item, index) in goodsCate" :key="index">-->
|
||||
<!-- <u-checkbox-->
|
||||
<!-- :customStyle="{marginBottom: '8px'}"-->
|
||||
<!-- :label="item.name"-->
|
||||
<!-- :name="item._id"-->
|
||||
<!-- >-->
|
||||
<!-- </u-checkbox>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </u-checkbox-group>-->
|
||||
<view class="flex justify-start items-start flex-wrap">
|
||||
<text class="text-25 mb-25 w-33p" @click="changeMainSpot(item._id)"
|
||||
:class="{'text-main': form.company.mainSpotCategoryIds.includes(item._id)}"
|
||||
v-for="(item, index) in goodsCate" :key="index">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group m-top-30">
|
||||
<view class="lb need">上传营业执照</view>
|
||||
</view>
|
||||
<view class="flex justify-between align-center m-top-10">
|
||||
<view class="lbx flex-1">请您上传盖章的扫描件或者复印件</view>
|
||||
</view>
|
||||
<view class="m-top-20">
|
||||
<u-upload
|
||||
:fileList="organizationPath"
|
||||
@afterRead="afterRead($event, 'organizationPath', 'company')"
|
||||
@delete="deletePic($event, 'organizationPath', 'company')"
|
||||
:maxCount="1"
|
||||
width="70"
|
||||
height="70"
|
||||
></u-upload>
|
||||
</view>
|
||||
<view class="group m-top-30">
|
||||
<view class="lb need">上传开票资料</view>
|
||||
</view>
|
||||
<view class="flex justify-between align-center m-top-10">
|
||||
<view class="lbx flex-1">加盖公章</view>
|
||||
</view>
|
||||
<view class="m-top-20">
|
||||
<u-upload
|
||||
:fileList="invoiceInfo"
|
||||
@afterRead="afterRead($event, 'invoiceInfo', 'company')"
|
||||
@delete="deletePic($event, 'invoiceInfo', 'company')"
|
||||
:maxCount="1"
|
||||
width="70"
|
||||
height="70"
|
||||
></u-upload>
|
||||
</view>
|
||||
<!-- <view class="group m-top-30">-->
|
||||
<!-- <view class="lb need">纳税资格</view>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="m-top-20">-->
|
||||
<!-- <el-radio-group v-model="form.company.taxType">-->
|
||||
<!-- <el-radio label="一般纳税人">一般纳税人</el-radio>-->
|
||||
<!-- <el-radio label="小规模纳税人">小规模纳税人</el-radio>-->
|
||||
<!-- <el-radio label="其他">其他</el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="group m-top-30">-->
|
||||
<!-- <view class="lb">纳税人资格</view>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="flex justify-between align-center m-top-10">-->
|
||||
<!-- <view class="lbx flex-1">加盖公章</view>-->
|
||||
<!-- <!– <view class="download">电子版文件下载</view>–>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="m-top-20">-->
|
||||
<!-- <u-upload-->
|
||||
<!-- :fileList="taxImage"-->
|
||||
<!-- @afterRead="afterRead($event, 'taxImage', 'company', true)"-->
|
||||
<!-- @delete="deletePic($event, 'taxImage', 'company', true)"-->
|
||||
<!-- multiple-->
|
||||
<!-- :maxCount="10"-->
|
||||
<!-- width="70"-->
|
||||
<!-- height="70"-->
|
||||
<!-- ></u-upload>-->
|
||||
<!-- </view>-->
|
||||
<view class="group m-top-30">
|
||||
<view class="lb">管理员授权委托书</view>
|
||||
</view>
|
||||
<view class="m-top-20">
|
||||
<u-upload
|
||||
:fileList="taxImage"
|
||||
@afterRead="afterRead($event, 'taxImage', 'company', true)"
|
||||
@delete="deletePic($event, 'taxImage', 'company', true)"
|
||||
multiple
|
||||
:maxCount="10"
|
||||
width="70"
|
||||
height="70"
|
||||
></u-upload>
|
||||
</view>
|
||||
<!-- 企业授权人信息 -->
|
||||
<view class="m-top-30">
|
||||
<u--text prefixIcon="calendar" iconStyle="font-size: 28px;color:#A92924" size="20" color="#A92924"
|
||||
text="企业授权人信息"></u--text>
|
||||
</view>
|
||||
|
||||
<view class="group flex align-center m-top-30" @click="showManageType = true">
|
||||
<view class="lb need">{{ `${form.manager.type === 1 ? '法人姓名' : '授权人'}` }}类型</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请选择授权人类型"
|
||||
v-model="managerType"
|
||||
suffixIcon="arrow-down"
|
||||
suffixIconStyle="color: #909399"
|
||||
disabled
|
||||
disabledColor="#fff"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">{{ `${form.manager.type === 1 ? '法人姓名' : '授权人'}` }}姓名</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input v-model="form.manager.personName" placeholder="请输入内容"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="group flex align-center m-top-30" @click="showCertType = true">
|
||||
<view class="lb need">证件类型</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请选择证件类型"
|
||||
v-model="certType"
|
||||
suffixIcon="arrow-down"
|
||||
suffixIconStyle="color: #909399"
|
||||
disabled
|
||||
disabledColor="#fff"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">{{ `${form.manager.type === 1 ? '法人姓名' : '授权人'}` }}证件号</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input v-model="form.manager.idCard" placeholder="请输入内容"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">{{ `${form.manager.type === 1 ? '法人姓名' : '授权人'}` }}电话</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input v-model="form.manager.mobile" placeholder="请输入内容"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="group m-top-30">
|
||||
<view class="lb need">身份证头像面</view>
|
||||
</view>
|
||||
<view class="m-top-20">
|
||||
<u-upload
|
||||
:fileList="headPhotoPath"
|
||||
@afterRead="afterRead($event,'headPhotoPath', 'manager')"
|
||||
@delete="deletePic($event, 'headPhotoPath', 'company')"
|
||||
:maxCount="1"
|
||||
width="70"
|
||||
height="70"
|
||||
></u-upload>
|
||||
</view>
|
||||
<view class="group m-top-30">
|
||||
<view class="lb need">身份证国徽面</view>
|
||||
</view>
|
||||
<view class="m-top-20">
|
||||
<u-upload
|
||||
:fileList="backgroundIdCardPath"
|
||||
@afterRead="afterRead($event,'backgroundIdCardPath', 'manager')"
|
||||
@delete="deletePic($event, 'backgroundIdCardPath', 'company')"
|
||||
:maxCount="1"
|
||||
width="70"
|
||||
height="70"
|
||||
></u-upload>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">真实姓名</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:disabled="userInfo.authStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="userInfo.person.personName"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30" @click="showIndustry = true">
|
||||
<view class="lb need">行业分类</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
style="pointer-events:none"
|
||||
placeholder="请选择行业分类"
|
||||
v-model="form.person.businessType"
|
||||
suffixIcon="arrow-down"
|
||||
suffixIconStyle="color: #909399"
|
||||
disabled
|
||||
disabledColor="#fff"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30" @click="showAddress">
|
||||
<view class="lb need">现居住所在地</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请选择现居住所在地"
|
||||
v-model="addressRegion"
|
||||
suffixIcon="arrow-down"
|
||||
suffixIconStyle="color: #909399"
|
||||
disabled
|
||||
disabledColor="#fff"
|
||||
style="pointer-events:none"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">详细地址</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:disabled="userInfo.authStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.person.addressDetail"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">有效通信地址</view>
|
||||
<text class="ml-10 text-25">{{ form.person.address }}</text>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">个人账号</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:disabled="userInfo.authStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.person.personAccount"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">个人开户行</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:disabled="userInfo.authStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.person.personBankName"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">个人账户名</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:disabled="userInfo.authStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.person.accountName"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">手机号码</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:disabled="userInfo.authStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.person.mobile"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb">QQ号</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:disabled="userInfo.authStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.person.qq"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb">邮箱地址</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
:disabled="userInfo.authStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.person.contactEmail"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">短信验证码</view>
|
||||
<view class="vl flex-1 flex justify-start items-center">
|
||||
<u--input
|
||||
:disabled="userInfo.authStatus === 0"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.smsCode"
|
||||
></u--input>
|
||||
<view class="ml-20">
|
||||
<u-button type="primary" :disabled="!form.person.mobile || codeDisabled || userInfo.authStatus === 0"
|
||||
@click="sendSmsCode">
|
||||
{{ smsTips }}
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
<u-button class="public-btn" text="提交认证" @click="submitAuth"
|
||||
:disabled="userInfo.authStatus === 0"></u-button>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
<AddressSelect ref="AddressSelect" @confirm="regionConfirm"/>
|
||||
<u-picker :show="showIndustry" :columns="[industryList]" keyName="name"
|
||||
:default-index="defaultIndustryIndex"
|
||||
@cancel="showIndustry = false" @close="showIndustry = false" closeOnClickOverlay
|
||||
@confirm="confirmIndustry"></u-picker>
|
||||
|
||||
<u-picker :show="showManageType" :columns="[managerTypeList]" keyName="label"
|
||||
:default-index="defaultManagerTypeIndex"
|
||||
@cancel="showManageType = false" @close="showManageType = false" closeOnClickOverlay
|
||||
@confirm="confirmManagerType"></u-picker>
|
||||
|
||||
<u-picker :show="showCertType" :columns="[certTypeList]"
|
||||
:default-index="defaultCertTypeIndex"
|
||||
@cancel="showCertType = false" @close="showCertType = false" closeOnClickOverlay
|
||||
@confirm="confirmCertType"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddressSelect from "@/components/AddressSelect.vue";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
let timer = null
|
||||
let timeS = 60
|
||||
export default {
|
||||
components: {AddressSelect},
|
||||
props: {
|
||||
userData: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
statusLabel: '',
|
||||
|
||||
userInfo: {
|
||||
company: {
|
||||
organization: '',
|
||||
addressRegion: {},
|
||||
addressDetail: '',
|
||||
mobile: '',
|
||||
legalName: '',
|
||||
mailAddress: '',
|
||||
contactEmail: '',
|
||||
companyAccount: '',
|
||||
companyBankName: '',
|
||||
personAccount: '',
|
||||
personBankName: '',
|
||||
accountName: '',
|
||||
businessType: '',
|
||||
invoiceInfo: '',
|
||||
taxType: '',
|
||||
taxImage: [],
|
||||
mainSpotCategoryIds: [],
|
||||
},
|
||||
},
|
||||
form: {
|
||||
authType: 2,
|
||||
company: {
|
||||
organization: '',
|
||||
addressRegion: {},
|
||||
addressDetail: '',
|
||||
mobile: '',
|
||||
legalName: '',
|
||||
mailAddress: '',
|
||||
contactEmail: '',
|
||||
companyAccount: '',
|
||||
companyBankName: '',
|
||||
personAccount: '',
|
||||
personBankName: '',
|
||||
accountName: '',
|
||||
businessType: '',
|
||||
invoiceInfo: '',
|
||||
taxType: '',
|
||||
taxImage: [],
|
||||
mainSpotCategoryIds: [],
|
||||
organizationPath: ''
|
||||
},
|
||||
manager: {
|
||||
type: null,
|
||||
personName: '',
|
||||
certType: '',
|
||||
idCard: '',
|
||||
mobile: '',
|
||||
headPhotoPath: '',
|
||||
backgroundIdCardPath: '',
|
||||
},
|
||||
smsCode: null,
|
||||
},
|
||||
addressRegion: '',
|
||||
industryList: [],
|
||||
defaultIndustryIndex: [0],
|
||||
showIndustry: false,
|
||||
goodsCate: [],
|
||||
organizationPath: [],
|
||||
invoiceInfo: [],
|
||||
taxImage: [],
|
||||
checked: [],
|
||||
showManageType: false,
|
||||
managerTypeList: [
|
||||
{
|
||||
value: 1,
|
||||
label: '法人'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '授权人'
|
||||
}
|
||||
],
|
||||
defaultManagerTypeIndex: [0],
|
||||
managerType: '',
|
||||
certTypeList: ['身份证', '护照'],
|
||||
showCertType: false,
|
||||
certType: '',
|
||||
defaultCertTypeIndex: [0],
|
||||
headPhotoPath: [],
|
||||
backgroundIdCardPath: [],
|
||||
codeDisabled: false,
|
||||
smsTips: '点击获取',
|
||||
userType: 0
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getCertUrl(reset = false) {
|
||||
vk.callFunction({
|
||||
url: 'client/fadada.getVerifyUrl',
|
||||
data: {
|
||||
reset,
|
||||
isMobile: true
|
||||
},
|
||||
success: (res) => {
|
||||
window.location.href = res.data.url
|
||||
// window.open(res.data.url)
|
||||
}
|
||||
});
|
||||
},
|
||||
async getIndustryList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/industry/pub/getList'
|
||||
})
|
||||
this.industryList = rows
|
||||
},
|
||||
async getGoodsCate() {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/spot/category/pub/getList',
|
||||
data: {
|
||||
whereJson: {
|
||||
level: 2
|
||||
}
|
||||
}
|
||||
});
|
||||
this.goodsCate = data
|
||||
},
|
||||
showAddress() {
|
||||
const addressRegion = this.userInfo.accountType === 2 ? this.form.company.addressRegion : this.form.person.addressRegion
|
||||
this.$refs.AddressSelect.open(addressRegion);
|
||||
},
|
||||
regionConfirm({province, city, area}) {
|
||||
if (this.userInfo.accountType === 2) this.form.company.addressRegion = {province, city, area}
|
||||
else this.form.person.addressRegion = {province, city, area}
|
||||
this.addressRegion = `${province.name}${city.name}${area.name}`
|
||||
},
|
||||
confirmIndustry({value}) {
|
||||
if (this.userInfo.accountType === 2) {
|
||||
this.form.company.businessType = value[0].name
|
||||
} else {
|
||||
this.form.person.businessType = value[0].name
|
||||
}
|
||||
this.showIndustry = false
|
||||
},
|
||||
confirmManagerType({value}) {
|
||||
this.form.manager.type = value[0].value
|
||||
this.showManageType = false
|
||||
},
|
||||
confirmCertType({value}) {
|
||||
this.form.manager.certType = value[0]
|
||||
this.showCertType = false
|
||||
},
|
||||
afterRead({file}, field, formField, multi = false) {
|
||||
if (multi) {
|
||||
file.forEach(item => {
|
||||
uniCloud.uploadFile({
|
||||
filePath: item.url,
|
||||
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + item.name,
|
||||
success: ({fileID}) => {
|
||||
uniCloud.getTempFileURL({
|
||||
fileList: [fileID]
|
||||
}).then(res => {
|
||||
this[field].push({url: res.fileList[0].tempFileURL})
|
||||
this.form[formField][field].push(res.fileList[0].tempFileURL)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
uniCloud.uploadFile({
|
||||
filePath: file.url,
|
||||
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + file.name,
|
||||
success: ({fileID}) => {
|
||||
uniCloud.getTempFileURL({
|
||||
fileList: [fileID]
|
||||
}).then(res => {
|
||||
this[field].push({url: res.fileList[0].tempFileURL})
|
||||
this.form[formField][field] = res.fileList[0].tempFileURL
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
deletePic({index}, field, formFiled, multi = false) {
|
||||
if (multi) {
|
||||
this[field].splice(index, 1)
|
||||
this.form[formFiled][field].splice(index, 1)
|
||||
} else {
|
||||
this[field] = []
|
||||
this.form[formFiled][field] = null
|
||||
}
|
||||
},
|
||||
async submitAuth(authStatus = 0) {
|
||||
if (this.userInfo.accountType === 2) {
|
||||
if (!this.form.company.addressDetail) return this.$message.error('请完善公司所在地')
|
||||
if (this.form.company.mainSpotCategoryIds.length === 0) return this.$message.error('请选择主营商品')
|
||||
if (this.form.company.mainSpotCategoryIds.length > 10) return this.$message.error('主营商品最多只能选择10个')
|
||||
if (!this.form.company.mailAddress) return this.$message.error('请完善有效通信地址')
|
||||
if (!this.form.company.contactEmail) return this.$message.error('请完善联系邮箱')
|
||||
if (!this.form.company.legalName) return this.$message.error('请完善法人姓名')
|
||||
if (!this.form.company.addressRegion) this.form.company.addressRegion = {}
|
||||
} else {
|
||||
if (!this.form.person.personName) return this.$message.error('请输入真实姓名')
|
||||
if (!this.form.person.mobile) return this.$message.error('请输入联系方式')
|
||||
if (!this.form.person.personAccount) return this.$message.error('请填写个人账号')
|
||||
if (!this.form.person.personBankName) return this.$message.error('请选择个人开户行')
|
||||
if (!this.form.person.accountName) return this.$message.error('请选择个人账户名')
|
||||
if (!this.form.smsCode) return this.$message.error('请输入短信验证码')
|
||||
}
|
||||
|
||||
await vk.callFunction({
|
||||
url: 'client/user/kh/addAuth',
|
||||
title: '提交中...',
|
||||
data: {...this.form, ...{authStatus}, isBusinessCard: false},
|
||||
})
|
||||
this.$message.success('提交成功')
|
||||
this.iniData()
|
||||
// setTimeout(() => {
|
||||
// window.location.reload()
|
||||
// }, 1500)
|
||||
},
|
||||
changeMainSpot(id) {
|
||||
const index = this.form.company.mainSpotCategoryIds.findIndex(item => item === id)
|
||||
if (index > -1) this.form.company.mainSpotCategoryIds.splice(index, 1)
|
||||
else {
|
||||
if (this.form.company.mainSpotCategoryIds.length >= 10) {
|
||||
this.$message.error('主营商品最多只能选择10个')
|
||||
return
|
||||
}
|
||||
this.form.company.mainSpotCategoryIds.push(id)
|
||||
}
|
||||
},
|
||||
sendSmsCode() {
|
||||
if (timer != null) return
|
||||
this.codeDisabled = true
|
||||
vk.userCenter.sendSmsCode({
|
||||
loading: true,
|
||||
data: {
|
||||
mobile: this.form.person.mobile,
|
||||
type: 'verify',
|
||||
},
|
||||
success: (data) => {
|
||||
this.codeDisabled = false
|
||||
this.$message({
|
||||
message: "验证码已发送",
|
||||
type: 'success'
|
||||
})
|
||||
timeS = 60
|
||||
timer = setInterval(() => {
|
||||
timeS--
|
||||
if (timeS <= 0) {
|
||||
this.smsTips = "重新发送"
|
||||
this.stopTimer()
|
||||
} else {
|
||||
this.smsTips = timeS + "秒"
|
||||
}
|
||||
|
||||
}, 1000)
|
||||
},
|
||||
fail: () => {
|
||||
this.codeDisabled = false
|
||||
}
|
||||
})
|
||||
},
|
||||
stopTimer() {
|
||||
if (timer != null) {
|
||||
clearInterval(timer)
|
||||
timer = null
|
||||
}
|
||||
},
|
||||
iniData() {
|
||||
this.userInfo = JSON.parse(JSON.stringify(this.userData))
|
||||
if (this.userInfo.fadadaConfirm && (this.userInfo.authStatus === null || this.userInfo.authStatus === -1))
|
||||
this.statusLabel = '您已完成法大大认证,请在下方完善资料提交平台审核'
|
||||
if (this.userInfo.authStatus === 0) this.statusLabel = '平台审核中'
|
||||
else if (this.userInfo.authStatus === 1) this.statusLabel = '恭喜您已通过已通过金久信平台认证'
|
||||
else if (this.userInfo.authStatus === 2) this.statusLabel = `审核不通过:${this.userInfo.refuseReason}`
|
||||
if (!this.userInfo.userType) this.userType = 0
|
||||
else this.userType = parseInt(this.userInfo.userType)
|
||||
this.form = this.userData
|
||||
if (this.userInfo.accountType === 2) {
|
||||
if (this.userInfo.company.addressRegion)
|
||||
this.addressRegion = `${this.userInfo.company.addressRegion.province.name}${this.userInfo.company.addressRegion.city.name}${this.userInfo.company.addressRegion.area.name}`
|
||||
if (this.userInfo.company.businessType) {
|
||||
const defaultIndustryIndex = this.industryList.findIndex(item => item.name === this.userInfo.company.businessType)
|
||||
if (defaultIndustryIndex > -1) this.defaultIndustryIndex = [defaultIndustryIndex]
|
||||
}
|
||||
if (this.form.company.organizationPath) this.organizationPath = [{
|
||||
url: this.form.company.organizationPath,
|
||||
}]
|
||||
if (this.form.company.invoiceInfo) this.invoiceInfo = [{
|
||||
url: this.form.company.invoiceInfo,
|
||||
}]
|
||||
if (this.form.company.taxImage && this.form.company.taxImage.length > 0) {
|
||||
this.taxImage = this.form.company.taxImage.map(url => {
|
||||
return {
|
||||
url
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this.form.manager.type !== null) {
|
||||
const defaultManagerTypeIndex = this.managerTypeList.findIndex(item => item.value === this.form.manager.type)
|
||||
if (defaultManagerTypeIndex > -1) {
|
||||
this.defaultManagerTypeIndex = [defaultManagerTypeIndex]
|
||||
this.managerType = this.managerTypeList[defaultManagerTypeIndex].label
|
||||
}
|
||||
}
|
||||
if (this.form.manager.certType !== null) {
|
||||
this.defaultCertTypeIndex = [this.form.manager.certType]
|
||||
this.certType = this.certTypeList[this.form.manager.certType]
|
||||
}
|
||||
if (this.form.manager.headPhotoPath) {
|
||||
this.headPhotoPath = [{url: this.form.manager.headPhotoPath}]
|
||||
}
|
||||
if (this.form.manager.backgroundIdCardPath) {
|
||||
this.backgroundIdCardPath = [{url: this.form.manager.backgroundIdCardPath}]
|
||||
}
|
||||
} else {
|
||||
if (this.userInfo.person.addressRegion)
|
||||
this.addressRegion = `${this.userInfo.person.addressRegion.province.name}${this.userInfo.person.addressRegion.city.name}${this.userInfo.person.addressRegion.area.name}`
|
||||
}
|
||||
},
|
||||
changeUserType() {
|
||||
vk.callFunction({
|
||||
url: 'client/user/kh/changeUserType',
|
||||
data: {
|
||||
userType: this.userType
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
await this.getIndustryList()
|
||||
await this.getGoodsCate()
|
||||
this.iniData()
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-ident {
|
||||
padding: 20rpx 30rpx;
|
||||
|
||||
.group {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.lb, .fix {
|
||||
position: relative;
|
||||
min-width: 150rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.lbx {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.download {
|
||||
padding: 8rpx 20rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #ffffff;
|
||||
background: #A92924;
|
||||
}
|
||||
|
||||
.need::before {
|
||||
position: absolute;
|
||||
left: -16rpx;
|
||||
top: 50%;
|
||||
z-index: 9;
|
||||
margin-top: -12rpx;
|
||||
content: '*';
|
||||
color: #A92924;
|
||||
font-size: 32rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.public-btn {
|
||||
width: 100%;
|
||||
margin-top: 60rpx;
|
||||
color: #ffffff;
|
||||
background: #A92924;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,236 @@
|
||||
<template> <!-- 我的邀请 -->
|
||||
<view>
|
||||
<view class="layout layout-invite">
|
||||
<template v-if="isInvite">
|
||||
<view class="flex justify-between align-center p-top-20">
|
||||
<view class="invite-title">邀请新用户免费兑换会员</view>
|
||||
<!-- <u-button class="rule" text="活动规则"></u-button>-->
|
||||
</view>
|
||||
<view class="gong flex align-center m-top-30">
|
||||
<view class="m-right-20">共邀请
|
||||
<text class="red">{{ userData.inviteNum }}</text>
|
||||
人
|
||||
</view>
|
||||
<u-tag text="邀请列表" type="warning" size="mini"></u-tag>
|
||||
<view class="flex-1"></view>
|
||||
<view>我的邀请码:
|
||||
<text class="red">{{ userData.my_invite_code }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="invite-info flex flex-col justify-start items-start m-top-20 w-100p">
|
||||
<view class="item w-90p" v-if="item.recommendUpgrade && parseInt(item.recommendUpgrade) > 0"
|
||||
v-for="(item, index) in userLevelList" :key="index">
|
||||
<view class="b">{{ item.name }}</view>
|
||||
<view class="s">{{ item.upgradeDesc }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="invite-progress m-top-30">
|
||||
<u-line-progress :percentage="progress" activeColor="#A92924" height="16"></u-line-progress>
|
||||
<view class="flex justify-between m-top-10">
|
||||
<view class="lv red">已邀请{{ userData.inviteNum }}人</view>
|
||||
<!-- <view class="lv red">9人</view>-->
|
||||
</view>
|
||||
</view>
|
||||
<view class="invite-btn flex justify-center">
|
||||
<u-button class="btn-style" color="#A92924" :plain="true" text="复制邀请码" @click="copy"></u-button>
|
||||
<u-button class="btn-style" color="#A92924" text="兑换会员" @click="isInvite = false"></u-button>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="!isInvite">
|
||||
<view class="flex justify-between align-center p-top-20">
|
||||
<view class="invite-title">请选择要兑换的会员!</view>
|
||||
<view class="invited text-right">
|
||||
<text>已邀请
|
||||
<text class="red">10</text>
|
||||
人
|
||||
</text>
|
||||
,
|
||||
<text>已兑换
|
||||
<text class="red">10</text>
|
||||
人
|
||||
</text>
|
||||
,
|
||||
<text>剩余
|
||||
<text class="red">10</text>
|
||||
人可兑换
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="invite-info flex justify-between m-top-20">
|
||||
<view v-for="(item, index) in userLevelList" :key="index"
|
||||
v-if="item.recommendUpgrade && parseInt(item.recommendUpgrade) > 0"
|
||||
:class="['item', {active: inviteIndex === index}]" @click="onSelect(item, index)">
|
||||
<view class="b">{{ item.name }}</view>
|
||||
<view class="s">{{ item.upgradeDesc }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="invite-btn flex justify-center">
|
||||
<u-button
|
||||
class="btn-style"
|
||||
color="#A92924"
|
||||
:plain="true"
|
||||
text="取消兑换"
|
||||
@click="isInvite = true"
|
||||
></u-button>
|
||||
<u-button
|
||||
class="btn-style"
|
||||
color="#A92924"
|
||||
text="确认"
|
||||
@click="exchangeUpgrade"
|
||||
></u-button>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
userData: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isInvite: true,
|
||||
inviteIndex: null,
|
||||
userLevelList: [],
|
||||
maxUpgradeNum: 100,
|
||||
progress: 0,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onSelect(item, index) {
|
||||
if (parseInt(this.userData.inviteNum) >= item.recommendUpgrade && item.level > parseInt(this.userData.userLevel))
|
||||
this.inviteIndex = index
|
||||
else this.$message.error('您的邀请人数不足')
|
||||
},
|
||||
copy() {
|
||||
const url = window.location.origin + `/#/pages/auth/register/register?code=${this.userData.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: '邀请码已复制'
|
||||
})
|
||||
},
|
||||
async getUserLevelList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/userLevel/pub/getList',
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 200
|
||||
},
|
||||
});
|
||||
this.userLevelList = rows
|
||||
this.userLevelList.forEach(item => {
|
||||
if (item.recommendUpgrade && parseInt(item.recommendUpgrade) > 0)
|
||||
this.maxUpgradeNum = Math.max(this.maxUpgradeNum, item.recommendUpgrade)
|
||||
})
|
||||
console.log(this.userLevelList)
|
||||
this.progress = parseInt(this.userData.inviteNum) / this.maxUpgradeNum * 100
|
||||
},
|
||||
async exchangeUpgrade() {
|
||||
await vk.callFunction({
|
||||
url: 'client/user/kh/exchangeUpgrade',
|
||||
data: {
|
||||
id: this.userLevelList[this.inviteIndex]._id
|
||||
}
|
||||
});
|
||||
this.$message.success('兑换成功')
|
||||
this.isInvite = true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getUserLevelList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-invite {
|
||||
padding: 20rpx 30rpx;
|
||||
|
||||
.invite-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
line-height: 48rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
|
||||
.rule {
|
||||
margin: 0;
|
||||
font-size: 24rpx;
|
||||
width: 130rpx;
|
||||
height: 48rpx;
|
||||
color: #101010;
|
||||
border-radius: 8rpx;
|
||||
background: #dedede;
|
||||
}
|
||||
|
||||
.gong {
|
||||
font-size: 28rpx;
|
||||
line-height: 48rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.invite-info {
|
||||
padding: 30rpx 0;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
//width: 210rpx;
|
||||
//height: 150rpx;
|
||||
line-height: 48rpx;
|
||||
color: #A92924;
|
||||
border-radius: 12rpx;
|
||||
box-shadow: 0px 2px 6px 0px rgba(169, 41, 36, 1);
|
||||
margin: 0 10rpx;
|
||||
padding: 10rpx;
|
||||
text-align: center;
|
||||
|
||||
.b {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.s {
|
||||
font-size: 24rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #ffffff;
|
||||
background: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.lv {
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.invite-btn {
|
||||
margin-top: 80rpx;
|
||||
padding: 20rpx 20rpx;
|
||||
|
||||
.btn-style {
|
||||
margin: 0 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.invited {
|
||||
font-size: 24rpx;
|
||||
color: #101010;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,226 @@
|
||||
<template>
|
||||
<view class="p-30">
|
||||
<view class="text-main text-30 font-bold">金久信公正银联资料</view>
|
||||
<view class="mt-20 text-main text-25" style="line-height: 42rpx;">
|
||||
<view>银联提供资料明细</view>
|
||||
<view>根据银联交易要求,为防止网络犯罪,金久信公正交易您需向银联提供以下资料:</view>
|
||||
<view>1、营业执照(原件手机拍照或复印件加盖公章);</view>
|
||||
<view>2、法人身份证正反面(原件手机拍照或复印件加盖公章);</view>
|
||||
<view>3、结算账户信息(结算账户信息需要开户许可证或银行回单等盖有银行印章的证明文件);</view>
|
||||
<view>4.店铺/办公地址照片(门头+门牌+经营场所的照片,收银台照片);</view>
|
||||
<view>5.法人手机号(用于电子签約)</view>
|
||||
<view>如由授权代理人负责,需要加收代理人身份证+代理人签约授权书,授权书我司提供模板;</view>
|
||||
<view>6、金久信平台入驻协议、授权书(请联系平台工作人员签约)</view>
|
||||
<view>7、审核时间2-3天,建议注册提前开通。</view>
|
||||
<view>8、如果您完成审核请联系平台客服开通。</view>
|
||||
</view>
|
||||
<view class="mt-20">
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<view v-if="extraInfo.agreementUrl" class="mr-20 mb-20">
|
||||
<u-button size="small" color="#A92924" text="金久信平台入驻协议下载" @click="openLink(extraInfo.agreementUrl)"></u-button>
|
||||
</view>
|
||||
<view v-if="extraInfo.authorizationUrl" class="mb-20">
|
||||
<u-button size="small" color="#A92924" text="授权书下载" @click="openLink(extraInfo.authorizationUrl)"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-start items-start mt-20">
|
||||
<view v-if="extraInfo.unionWechat" class="mr-30">
|
||||
<view class="text-25 mb-10">银联工作人员微信</view>
|
||||
<u--image :src="extraInfo.unionWechat" width="160rpx" height="160rpx"></u--image>
|
||||
</view>
|
||||
<view v-if="extraInfo.platformWechat">
|
||||
<view class="text-25 mb-10">金久信工作人员微信</view>
|
||||
<u--image :src="extraInfo.platformWechat" width="160rpx" height="160rpx"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-20 text-25">审核状态:{{ statusText }}</view>
|
||||
<view class="group m-top-30"><view class="lb need">营业执照</view></view>
|
||||
<u-upload class="m-top-20" :fileList="businessLicenseFile" @afterRead="afterRead($event, 'businessLicenseFile')" @delete="deletePic($event, 'businessLicenseFile')" :disabled="isLocked" :maxCount="1" width="70" height="70"></u-upload>
|
||||
<view class="group m-top-30"><view class="lb need">法人身份证正面</view></view>
|
||||
<u-upload class="m-top-20" :fileList="legalIdCardFront" @afterRead="afterRead($event, 'legalIdCardFront')" @delete="deletePic($event, 'legalIdCardFront')" :disabled="isLocked" :maxCount="1" width="70" height="70"></u-upload>
|
||||
<view class="group m-top-30"><view class="lb need">法人身份证反面</view></view>
|
||||
<u-upload class="m-top-20" :fileList="legalIdCardBack" @afterRead="afterRead($event, 'legalIdCardBack')" @delete="deletePic($event, 'legalIdCardBack')" :disabled="isLocked" :maxCount="1" width="70" height="70"></u-upload>
|
||||
<view class="group m-top-30"><view class="lb need">结算账户证明</view></view>
|
||||
<u-upload class="m-top-20" :fileList="settlementAccountFiles" @afterRead="afterRead($event, 'settlementAccountFiles', true)" @delete="deletePic($event, 'settlementAccountFiles', true)" :disabled="isLocked" multiple :maxCount="10" width="70" height="70"></u-upload>
|
||||
<view class="group m-top-30"><view class="lb need">店铺/办公照片</view></view>
|
||||
<u-upload class="m-top-20" :fileList="shopPhotos" @afterRead="afterRead($event, 'shopPhotos', true)" @delete="deletePic($event, 'shopPhotos', true)" :disabled="isLocked" multiple :maxCount="10" width="70" height="70"></u-upload>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb need">法人手机号</view>
|
||||
<view class="vl flex-1"><u--input v-model="form.legalMobile" placeholder="请输入法人手机号" :disabled="isLocked"></u--input></view>
|
||||
</view>
|
||||
<view class="group m-top-30"><view class="lb">是否有代理人</view></view>
|
||||
<view class="m-top-20"><u-switch v-model="form.hasAgent" activeColor="#A92924" :disabled="isLocked"></u-switch></view>
|
||||
<template v-if="form.hasAgent">
|
||||
<view class="group m-top-30"><view class="lb need">代理人身份证正面</view></view>
|
||||
<u-upload class="m-top-20" :fileList="agentIdCardFront" @afterRead="afterRead($event, 'agentIdCardFront')" @delete="deletePic($event, 'agentIdCardFront')" :disabled="isLocked" :maxCount="1" width="70" height="70"></u-upload>
|
||||
<view class="group m-top-30"><view class="lb need">代理人身份证反面</view></view>
|
||||
<u-upload class="m-top-20" :fileList="agentIdCardBack" @afterRead="afterRead($event, 'agentIdCardBack')" @delete="deletePic($event, 'agentIdCardBack')" :disabled="isLocked" :maxCount="1" width="70" height="70"></u-upload>
|
||||
<view class="group m-top-30"><view class="lb need">代理人授权书</view></view>
|
||||
<u-upload class="m-top-20" :fileList="agentAuthorizationFiles" @afterRead="afterRead($event, 'agentAuthorizationFiles', true)" @delete="deletePic($event, 'agentAuthorizationFiles', true)" :disabled="isLocked" multiple :maxCount="10" width="70" height="70"></u-upload>
|
||||
</template>
|
||||
<view class="group m-top-30"><view class="lb need">平台入驻协议</view></view>
|
||||
<u-upload class="m-top-20" :fileList="platformAgreementFiles" @afterRead="afterRead($event, 'platformAgreementFiles', true)" @delete="deletePic($event, 'platformAgreementFiles', true)" :disabled="isLocked" multiple :maxCount="10" width="70" height="70"></u-upload>
|
||||
<view class="group m-top-30"><view class="lb need">平台授权书</view></view>
|
||||
<u-upload class="m-top-20" :fileList="platformAuthorizationFiles" @afterRead="afterRead($event, 'platformAuthorizationFiles', true)" @delete="deletePic($event, 'platformAuthorizationFiles', true)" :disabled="isLocked" multiple :maxCount="10" width="70" height="70"></u-upload>
|
||||
<u-button class="public-btn" text="提交资料" @click="submit" :disabled="isLocked"></u-button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dayjs from "dayjs";
|
||||
|
||||
export default {
|
||||
name: "notary-union-pay",
|
||||
props: {
|
||||
userData: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
businessLicenseFile: '',
|
||||
legalIdCardFront: '',
|
||||
legalIdCardBack: '',
|
||||
settlementAccountFiles: [],
|
||||
shopPhotos: [],
|
||||
legalMobile: '',
|
||||
hasAgent: false,
|
||||
agentIdCardFront: '',
|
||||
agentIdCardBack: '',
|
||||
agentAuthorizationFiles: [],
|
||||
platformAgreementFiles: [],
|
||||
platformAuthorizationFiles: []
|
||||
},
|
||||
profile: null,
|
||||
extraInfo: {
|
||||
agreementUrl: '',
|
||||
authorizationUrl: '',
|
||||
unionWechat: '',
|
||||
platformWechat: '',
|
||||
},
|
||||
businessLicenseFile: [],
|
||||
legalIdCardFront: [],
|
||||
legalIdCardBack: [],
|
||||
settlementAccountFiles: [],
|
||||
shopPhotos: [],
|
||||
agentIdCardFront: [],
|
||||
agentIdCardBack: [],
|
||||
agentAuthorizationFiles: [],
|
||||
platformAgreementFiles: [],
|
||||
platformAuthorizationFiles: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
statusText() {
|
||||
if (!this.profile) return '未提交'
|
||||
if (this.profile.status === 1) return '已通过'
|
||||
if (this.profile.status === 2) return `已拒绝${this.profile.refuseReason ? `:${this.profile.refuseReason}` : ''}`
|
||||
if (this.profile.status === 0) return '审核中'
|
||||
return '未提交'
|
||||
},
|
||||
isLocked() {
|
||||
return this.profile && [0, 1].includes(this.profile.status)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async refresh() {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/user/kh/getNotaryUnionPayProfile',
|
||||
})
|
||||
this.profile = data
|
||||
const profile = data || {}
|
||||
this.form = {
|
||||
businessLicenseFile: profile.businessLicenseFile || '',
|
||||
legalIdCardFront: profile.legalIdCardFront || '',
|
||||
legalIdCardBack: profile.legalIdCardBack || '',
|
||||
settlementAccountFiles: profile.settlementAccountFiles || [],
|
||||
shopPhotos: profile.shopPhotos || [],
|
||||
legalMobile: profile.legalMobile || '',
|
||||
hasAgent: !!profile.hasAgent,
|
||||
agentIdCardFront: profile.agentIdCardFront || '',
|
||||
agentIdCardBack: profile.agentIdCardBack || '',
|
||||
agentAuthorizationFiles: profile.agentAuthorizationFiles || [],
|
||||
platformAgreementFiles: profile.platformAgreementFiles || [],
|
||||
platformAuthorizationFiles: profile.platformAuthorizationFiles || []
|
||||
}
|
||||
this.resetFileList()
|
||||
if (!this.extraInfo.agreementUrl && !this.extraInfo.authorizationUrl && !this.extraInfo.unionWechat && !this.extraInfo.platformWechat) {
|
||||
this.getExtraInfo()
|
||||
}
|
||||
},
|
||||
async getExtraInfo() {
|
||||
const dictIds = {
|
||||
agreementUrl: 'd6a300ae6a2f6d98009a50e36a4f0766',
|
||||
authorizationUrl: 'ed693ef16a2f6db00036fcd95c9dabf8',
|
||||
unionWechat: 'ed693ef16a2f6dcf0037006c1e6aec14',
|
||||
platformWechat: 'd6a300ae6a2f6dda009a81bc6b8b1fab'
|
||||
}
|
||||
const entries = await Promise.all(Object.entries(dictIds).map(async ([key, id]) => {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {id}
|
||||
})
|
||||
return [key, res.content || '']
|
||||
}))
|
||||
this.extraInfo = Object.fromEntries(entries)
|
||||
},
|
||||
resetFileList() {
|
||||
const singleFields = ['businessLicenseFile', 'legalIdCardFront', 'legalIdCardBack', 'agentIdCardFront', 'agentIdCardBack']
|
||||
const multiFields = ['settlementAccountFiles', 'shopPhotos', 'agentAuthorizationFiles', 'platformAgreementFiles', 'platformAuthorizationFiles']
|
||||
singleFields.forEach(field => {
|
||||
this[field] = this.form[field] ? [{url: this.form[field]}] : []
|
||||
})
|
||||
multiFields.forEach(field => {
|
||||
this[field] = (this.form[field] || []).map(url => ({url}))
|
||||
})
|
||||
},
|
||||
afterRead({file}, field, multi = false) {
|
||||
const list = multi ? file : [file]
|
||||
list.forEach(item => {
|
||||
uniCloud.uploadFile({
|
||||
filePath: item.url,
|
||||
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + item.name,
|
||||
success: ({fileID}) => {
|
||||
uniCloud.getTempFileURL({
|
||||
fileList: [fileID]
|
||||
}).then(res => {
|
||||
const url = res.fileList[0].tempFileURL
|
||||
if (multi) {
|
||||
this[field].push({url})
|
||||
this.form[field].push(url)
|
||||
} else {
|
||||
this[field] = [{url}]
|
||||
this.form[field] = url
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
deletePic({index}, field, multi = false) {
|
||||
if (multi) {
|
||||
this[field].splice(index, 1)
|
||||
this.form[field].splice(index, 1)
|
||||
} else {
|
||||
this[field] = []
|
||||
this.form[field] = ''
|
||||
}
|
||||
},
|
||||
async submit() {
|
||||
await vk.callFunction({
|
||||
url: 'client/user/kh/saveNotaryUnionPayProfile',
|
||||
title: '提交中...',
|
||||
data: this.form
|
||||
})
|
||||
this.$message.success('提交成功')
|
||||
await this.refresh()
|
||||
},
|
||||
openLink(url) {
|
||||
window.location.href = url
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.refresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,525 @@
|
||||
<template> <!-- 消息 -->
|
||||
<view>
|
||||
<view class="layout-notice">
|
||||
<template v-if="!isNotice">
|
||||
<view class="notice-head flex justify-between align-center">
|
||||
<view class="text">
|
||||
有
|
||||
<text class="red">{{ unreadNum }}</text>
|
||||
条系统通知消息未读
|
||||
</view>
|
||||
<view class="read flex justify-center align-center" @click="allRead">
|
||||
<u-icon name="eye" color="#666666" size="20"></u-icon>
|
||||
<text>全部标为已读</text>
|
||||
</view>
|
||||
<view class="push flex justify-center align-center" @click="isNotice = true">
|
||||
<u-icon name="setting" color="#666666" size="20"></u-icon>
|
||||
<text>消息推送设置</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="notice-body">
|
||||
<!-- 未读消息使用unread -->
|
||||
<view class="item" :class="{'unread': !item.hasRead}" v-for="(item, index) in noticeList"
|
||||
:key="index">
|
||||
<view class="info flex justify-between align-center">
|
||||
<view class="title text-single" @click="toDetail(item, index)">{{ item.title }}</view>
|
||||
<view class="date flex-1 m-left-20" @click="toDetail(item, index)">{{
|
||||
item._add_time_str
|
||||
}}
|
||||
</view>
|
||||
<view class="flex justify-center align-center" v-if="!item.hasRead" @click="setRead(index)">
|
||||
<u-icon name="eye" color="#A92924" size="18"></u-icon>
|
||||
<text class="read">标为已读</text>
|
||||
</view>
|
||||
<view class="flex justify-center align-center" @click="del(index)">
|
||||
<u-icon name="trash" color="#A92924" size="18"></u-icon>
|
||||
<text class="delete">删除</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detail m-top-10" @click="toDetail(item, index)">
|
||||
{{ item.content }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="account-title m-top-20">消息推送设置</view>
|
||||
<u--text color="#626262" margin="20rpx 0 40rpx"
|
||||
text="注!我们将针对您的选择,为您精准推送询价信息"></u--text>
|
||||
<u-line color="#bbb"></u-line>
|
||||
<!-- 开关遍历容器 -->
|
||||
<view class="switch-list m-top-20">
|
||||
<view class="switch-box flex justify-between align-center" v-for="(item,index) in settingList"
|
||||
:key="index">
|
||||
<view class="text">
|
||||
<text class="red">*</text>
|
||||
{{ item.title }}
|
||||
</view>
|
||||
<u-switch v-model="item.status" activeColor="#be2a28" size="20"
|
||||
@change="handSwitchChange($event,index)"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-top-30">
|
||||
<u-line color="#bbb"></u-line>
|
||||
</view>
|
||||
<view class="account-title m-top-20">选择产品</view>
|
||||
<!-- 产品遍历容器 -->
|
||||
<view class="goods-list">
|
||||
<view class="goods-box flex" v-for="(item, index) in productList" :key="index">
|
||||
<view class="lb">{{ item.name }}</view>
|
||||
<view class="flex-1">
|
||||
<view class="flex justify-start flex-wrap">
|
||||
<view class="m-right-20 m-top-20" v-for="(productItem, productIndex) in item.children"
|
||||
:key="productIndex">
|
||||
<u-tag size="mini"
|
||||
:text="productItem.name"
|
||||
:plain="!productList[index].idList.includes(productItem.name)"
|
||||
type="error"
|
||||
:name="productItem.name"
|
||||
@click="handCheckboxClick"
|
||||
></u-tag>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 已选 -->
|
||||
<div class="form">
|
||||
<view class="account-title m-top-20">请选择服务地区</view>
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view class="w-100p">
|
||||
<el-select size="small" v-model="addressIndex[0]" placeholder="请选择省" class="w-100p">
|
||||
<el-option v-for="(item, index) in provinceData" :key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</view>
|
||||
<view class="my-10 w-100p">
|
||||
<el-select size="small" v-model="addressIndex[1]" placeholder="请选择市" class="w-100p"
|
||||
:disabled="!addressIndex[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>
|
||||
</view>
|
||||
<view class="my-10 w-100p">
|
||||
<el-select size="small" v-model="addressIndex[2]" placeholder="请选择区" class="w-100p"
|
||||
:disabled="!addressIndex[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>
|
||||
</view>
|
||||
</view>
|
||||
<u-button type="primary" size="mini" @click="addAddress">添加</u-button>
|
||||
</div>
|
||||
<div class="flex justify-start items-start flex-wrap mt-20 text-25">
|
||||
<div class="flex justify-start items-center pointer" @click="deleteAddress(item)"
|
||||
v-for="(item, index) in addressList"
|
||||
:key="index" style="margin: 10px 10px 0 0">
|
||||
<image src="/static/img/check.png" style="width: 12px; height: 12px; margin-right: 5px"/>
|
||||
<span style="line-height: 18px">{{ item.province.name }}-{{
|
||||
item.city ? item.city.name : '不限'
|
||||
}}-{{ item.area ? item.area.name : '不限' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="form">
|
||||
<view class="account-title m-top-20">请选择单笔交易额</view>
|
||||
<div class="flex justify-start items-center">
|
||||
<el-input size="small" v-model="tradeAmount[0]" placeholder="请输入金额" style="width: 200px">
|
||||
<template #suffix>元</template>
|
||||
</el-input>
|
||||
<span class="mx-20">~</span>
|
||||
<el-input size="small" v-model="tradeAmount[1]" placeholder="请输入金额" style="width: 200px">
|
||||
<template #suffix>元</template>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="form text-25">
|
||||
<view class="account-title m-top-20">请选择交易方式</view>
|
||||
|
||||
<div class="flex justify-start items-center pointer" @click="changeItemCheck('tradeSelf')"
|
||||
style="margin: 10px 10px 0 0">
|
||||
<image :src="tradeSelf ? '/static/img/check.png' : '/static/img/uncheck.png'"
|
||||
style="width: 12px; height: 12px; margin-right: 5px"/>
|
||||
<span style="line-height: 18px">自主交易</span>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-start items-center pointer"
|
||||
@click="changeItemCheck('tradePlatform')"
|
||||
style="margin: 10px 10px 0 0">
|
||||
<image :src="tradePlatform ? '/static/img/check.png' : '/static/img/uncheck.png'"
|
||||
style="width: 12px; height: 12px; margin-right: 5px"/>
|
||||
<span style="line-height: 18px">金久信公证</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="form">
|
||||
<view class="account-title m-top-20">请设置免打扰时间段</view>
|
||||
<div class="flex justify-start items-center">
|
||||
<el-time-picker v-model="doNotDisturbRange" range-separator="~" is-range style="width: 200px"/>
|
||||
</div>
|
||||
</div>
|
||||
<view class="flex justify-between items-center">
|
||||
<view class="mx-15 flex-1">
|
||||
<u-button class="public-btn" text="保存设置" @click="handSubmit"></u-button>
|
||||
</view>
|
||||
<view class="mx-15 flex-1">
|
||||
<u-button class="public-btn-plain" text="取消" @click="isNotice = false"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/util/address/provinces.json";
|
||||
import citys from "@/util/address/citys.json";
|
||||
import areas from "@/util/address/areas.json";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
isNotice: false,
|
||||
settingList: {
|
||||
article: {
|
||||
title: '现货推送服务',
|
||||
status: false
|
||||
},
|
||||
process: {
|
||||
title: '找加工信息推送服务',
|
||||
status: false
|
||||
},
|
||||
old: {
|
||||
title: '旧货交易信息推送服务',
|
||||
status: false
|
||||
},
|
||||
enquiry: {
|
||||
title: '询价单和选项推送服务',
|
||||
status: false
|
||||
},
|
||||
},
|
||||
value: false,
|
||||
unreadNum: 0,
|
||||
noticeList: [],
|
||||
productList: [],
|
||||
addressRegion: {},
|
||||
tradeSelf: false,
|
||||
tradePlatform: false,
|
||||
doNotDisturbRange: [new Date(2024, 1, 1, 0, 0), new Date(2024, 1, 1, 0, 0)],
|
||||
tradeAmount: [],
|
||||
addressIndex: [null, null, null],
|
||||
addressList: []
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handCheckboxClick(name) {
|
||||
this.checkboxs[name].checked = !this.checkboxs[name].checked
|
||||
},
|
||||
handSwitchChange(val, index) {
|
||||
this.settingList[index].status = val
|
||||
},
|
||||
async getList(pageIndex = 1) {
|
||||
const {rows, total} = await vk.callFunction({
|
||||
url: 'client/message/kh/getList',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: 500,
|
||||
}
|
||||
})
|
||||
this.total = total
|
||||
this.noticeList = rows
|
||||
},
|
||||
async getUnreadNum() {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/message/kh/getUnreadCount',
|
||||
});
|
||||
this.unreadNum = data
|
||||
},
|
||||
async setRead(index) {
|
||||
this.noticeList[index].hasRead = true
|
||||
await vk.callFunction({
|
||||
url: 'client/message/kh/setRead',
|
||||
data: {
|
||||
id: this.noticeList[index]._id
|
||||
}
|
||||
})
|
||||
},
|
||||
del(index) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定清空内容吗?',
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
await vk.callFunction({
|
||||
url: 'client/message/kh/delete',
|
||||
data: {
|
||||
id: this.noticeList[index]._id
|
||||
}
|
||||
})
|
||||
this.$message.success('删除成功')
|
||||
await this.getList()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
toDetail(item, index) {
|
||||
if (!item.hasRead) this.setRead(index)
|
||||
let url = null
|
||||
if (item.type === 'old') url = `/pages/junk/detail?id=${item.pk}`
|
||||
else if (item.type === 'enquiry') url = `/pages/price/detail?id=${item.pk}`
|
||||
else if (item.type === 'process') url = `/pages/work/detail?id=${item.pk}`
|
||||
else if (item.type === 'contract') url = `/pages/public/contract?tab=1`
|
||||
else if (item.type === 'self-support') url = `/pages/self/makeQuote?id=${item.pk}`
|
||||
else if (item.type === 'self-product') url = `/pages/user/seller`
|
||||
else if (item.type === 'spot') url = `/pages/goods/detail?id=${item.pk}`
|
||||
else if (item.type === 'self-support-quote') {
|
||||
this.getQuoteDetail(item.pk)
|
||||
}
|
||||
if (url) vk.navigateTo({url})
|
||||
},
|
||||
async allRead() {
|
||||
await vk.callFunction({
|
||||
url: 'client/message/kh/setAllRead'
|
||||
})
|
||||
await this.getList(1)
|
||||
await this.getUnreadNum()
|
||||
},
|
||||
async getQuoteDetail(_id) {
|
||||
await vk.callFunction({
|
||||
url: 'client/selfSupport/kh/getQuoteDetail',
|
||||
data: {
|
||||
_id
|
||||
},
|
||||
success: ({rows}) => {
|
||||
this.sheet = rows
|
||||
this.dialogVisible = true
|
||||
}
|
||||
});
|
||||
},
|
||||
toContract() {
|
||||
this.dialogVisible = false
|
||||
vk.navigateTo({url: '/pages/public/contract?tab=1'})
|
||||
},
|
||||
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.name)) {
|
||||
this.productList[index].idList.push(productItem.name)
|
||||
}
|
||||
})
|
||||
})
|
||||
this.tradeSelf = res.tradeSelf ?? false
|
||||
this.tradePlatform = res.tradePlatform ?? false
|
||||
if (res.addressList) this.addressList = res.addressList
|
||||
else {
|
||||
this.addressList = []
|
||||
}
|
||||
this.doNotDisturbRange = res.doNotDisturbRange ?? []
|
||||
this.tradeAmount = res.tradeAmount ?? []
|
||||
},
|
||||
async getCate() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
});
|
||||
this.productList = rows.map(item => {
|
||||
item.idList = []
|
||||
return item
|
||||
})
|
||||
},
|
||||
async handSubmit() {
|
||||
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,
|
||||
addressList: this.addressList,
|
||||
tradeSelf: this.tradeSelf,
|
||||
tradePlatform: this.tradePlatform,
|
||||
doNotDisturbRange: this.doNotDisturbRange,
|
||||
tradeAmount: this.tradeAmount,
|
||||
}
|
||||
})
|
||||
this.$message.success('保存成功')
|
||||
this.isNotice = false
|
||||
},
|
||||
addAddress() {
|
||||
if (!this.addressIndex[0]) return
|
||||
this.addressList.push({
|
||||
province: this.provinceData[this.addressIndex[0]],
|
||||
city: this.addressIndex[1] ? this.cityData[this.addressIndex[0]][this.addressIndex[1]] : null,
|
||||
area: this.addressIndex[2] ? this.areaData[this.addressIndex[0]][this.addressIndex[1]][this.addressIndex[2]] : null
|
||||
})
|
||||
this.addressIndex = [null, null, null]
|
||||
},
|
||||
deleteAddress(index) {
|
||||
this.addressList.splice(index, 1)
|
||||
},
|
||||
changeItemCheck(field) {
|
||||
this[field] = !this[field]
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
await this.getList()
|
||||
await this.getUnreadNum()
|
||||
await this.getCate()
|
||||
await this.getConfig()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout-notice {
|
||||
padding: 10rpx 30rpx;
|
||||
}
|
||||
|
||||
.notice-head {
|
||||
height: 80rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 32rpx;
|
||||
color: #333333;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
}
|
||||
|
||||
.notice-body {
|
||||
.item {
|
||||
position: relative;
|
||||
padding: 20rpx 0 40rpx 20rpx;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
|
||||
.detail {
|
||||
font-size: 24rpx;
|
||||
line-height: 32rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.unread::before {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 30rpx;
|
||||
z-index: 9;
|
||||
content: '';
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
border-radius: 50%;
|
||||
background: #A92924;
|
||||
}
|
||||
|
||||
.title {
|
||||
max-width: 280rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 22rpx;
|
||||
line-height: 32rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.read, .delete {
|
||||
font-size: 24rpx;
|
||||
line-height: 32rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.account-title {
|
||||
position: relative;
|
||||
padding-left: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
line-height: 48rpx;
|
||||
color: #A92924;
|
||||
|
||||
&:before {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
z-index: 9;
|
||||
margin-top: -14rpx;
|
||||
content: '';
|
||||
width: 6rpx;
|
||||
height: 28rpx;
|
||||
background: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.public-btn {
|
||||
width: 100%;
|
||||
margin-top: 60rpx;
|
||||
color: #ffffff;
|
||||
background: #A92924;
|
||||
}
|
||||
|
||||
.public-btn-plain {
|
||||
width: 100%;
|
||||
margin-top: 60rpx;
|
||||
color: #A92924;
|
||||
border: 1px solid #A92924;
|
||||
}
|
||||
|
||||
.lb {
|
||||
width: 160rpx;
|
||||
height: auto;
|
||||
padding-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 48rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.goods-box {
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1px dashed #f2f2f2;
|
||||
}
|
||||
|
||||
.switch-box {
|
||||
padding: 16rpx 0;
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
|
||||
/deep/ .i-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/deep/ .el-input__suffix {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,163 @@
|
||||
<template>
|
||||
<view class="p-30">
|
||||
<view class="flex justify-end items-center">
|
||||
<u-button size="small" color="#A92924" text="新增收款账户"
|
||||
@click="showAdd" v-if="!isAdd"></u-button>
|
||||
</view>
|
||||
<view class="mt-20" v-if="isAdd">
|
||||
<el-form ref="form" :model="form" label-width="120px">
|
||||
<el-form-item label="类型" required v-if="userData.accountType === 2">
|
||||
<el-select v-model="form.type" placeholder="请选择账号类型">
|
||||
<el-option label="对公账号" value="company"/>
|
||||
<el-option label="个人账号" value="person"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="开户行" required>
|
||||
<el-input v-model="form.bankName" placeholder="请输入开户行"
|
||||
:readonly="userData.accountType === 2 && form.type === 'company' "/>
|
||||
</el-form-item>
|
||||
<el-form-item label="账号名称" required>
|
||||
<el-input v-model="form.accountName" placeholder="请输入账号名称"
|
||||
:readonly="userData.accountType === 2 && form.type === 'company'"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="账号" required>
|
||||
<el-input v-model="form.account" placeholder="请输入邮箱"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="默认账号">
|
||||
<el-switch v-model="form.isDefault" active-color="#a92924"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<view class="mt-30 flex justify-center items-center">
|
||||
<view class="flex-1 px-20">
|
||||
<u-button plain @click="isAdd = !isAdd">取消</u-button>
|
||||
</view>
|
||||
<view class="flex-1 px-20">
|
||||
<u-button type="primary" @click="addContact">确定</u-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-30 text-main text-25">温馨提示:请详细、慎重核查账户信息的正确性,以免给您造成不必要损失。账户信息错误平台不承担付款错误责任。</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="p-20 shadow flex justify-between items-center my-20 rounded" v-for="(item, index) in list"
|
||||
:key="index">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view class="flex justify-start items-center">
|
||||
<u-tag type="primary" size="mini" class="mr-25" text="默认" v-if="item.isDefault"></u-tag>
|
||||
<u-tag type="success" size="mini" class="mr-25"
|
||||
:text="item.type === 'company' ? '对公' : '个人'"></u-tag>
|
||||
<text class="font-bold text-25">{{ item.account }}</text>
|
||||
</view>
|
||||
<view class="my-20">{{ item.accountName }}</view>
|
||||
<view class="my-20">{{ item.bankName }}</view>
|
||||
</view>
|
||||
<view class="flex flex-col justify-end">
|
||||
<u-button type="primary" size="small" @click="edit(item)">编辑</u-button>
|
||||
<view class="mt-20">
|
||||
<u-button type="primary" size="small" @click="del(item._id)" plain>删除</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "payeeAccount",
|
||||
props: {
|
||||
userData: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isAdd: false,
|
||||
form: {
|
||||
_id: null,
|
||||
bankName: '',
|
||||
accountName: '',
|
||||
account: '',
|
||||
type: '',
|
||||
isDefault: false,
|
||||
},
|
||||
list: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async addContact() {
|
||||
if (!this.form.bankName) {
|
||||
this.$message.error('请输入开户行')
|
||||
return
|
||||
}
|
||||
if (!this.form.accountName) {
|
||||
this.$message.error('请输入账号名称')
|
||||
return
|
||||
}
|
||||
if (!this.form.account) {
|
||||
this.$message.error('请输入账号')
|
||||
return
|
||||
}
|
||||
if (!this.form.type && parseInt(this.userData.accountType) === 2) {
|
||||
this.$message.error('请选择类型')
|
||||
return
|
||||
}
|
||||
await vk.callFunction({
|
||||
url: 'client/account/kh/action',
|
||||
data: this.form
|
||||
})
|
||||
this.$message.success(this.form._id ? '修改成功' : '新增成功')
|
||||
await this.getList()
|
||||
this.isAdd = false
|
||||
this.form = {
|
||||
_id: null,
|
||||
bankName: '',
|
||||
accountName: '',
|
||||
account: '',
|
||||
type: '',
|
||||
isDefault: false,
|
||||
}
|
||||
},
|
||||
async getList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/account/kh/getList',
|
||||
})
|
||||
this.list = rows
|
||||
},
|
||||
del(_id) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认删除该账号吗?',
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
await vk.callFunction({
|
||||
url: 'client/account/kh/delete',
|
||||
data: {_id}
|
||||
})
|
||||
await this.getList()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
edit(item) {
|
||||
for (let key in this.form) this.form[key] = item[key]
|
||||
this.isAdd = true
|
||||
},
|
||||
showAdd() {
|
||||
if (this.userData.accountType === 2) {
|
||||
this.form.account = this.userData.company.companyAccount
|
||||
this.form.bankName = this.userData.company.companyBankName
|
||||
this.form.accountName = this.userData.company.companyName
|
||||
}
|
||||
this.isAdd = true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (parseInt(this.userData.authStatus) !== 1) {
|
||||
this.$message.error('请先完成实名认证')
|
||||
uni.navigateBack()
|
||||
return
|
||||
}
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user