20261008
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user