Commit e4ae8266 authored by 吴春's avatar 吴春

11

parent 36048e14
...@@ -3,12 +3,7 @@ ...@@ -3,12 +3,7 @@
<!-- Tab 栏 --> <!-- Tab 栏 -->
<view class="tradeIndex-tabs"> <view class="tradeIndex-tabs">
<scroll-view class="tradeIndex-tabs-scroll" scroll-x enable-flex> <scroll-view class="tradeIndex-tabs-scroll" scroll-x enable-flex>
<view <view class="tradeIndex-tab" v-for="(tab, index) in tabs" :key="index" @click="switchTab(index)">
class="tradeIndex-tab"
v-for="(tab, index) in tabs"
:key="index"
@click="switchTab(index)"
>
<text class="tradeIndex-tab-name" :class="{ active: currentTab === index }"> <text class="tradeIndex-tab-name" :class="{ active: currentTab === index }">
{{ tab.name }} {{ tab.name }}
</text> </text>
...@@ -18,71 +13,71 @@ ...@@ -18,71 +13,71 @@
</view> </view>
<!-- 内容区 --> <!-- 内容区 -->
<scroll-view <scroll-view class="tradeIndex-scroll" scroll-y @scrolltolower="loadMore" :lower-threshold="150"
class="tradeIndex-scroll" refresher-enabled :refresher-triggered="refreshing" @refresherrefresh="onRefresh">
scroll-y
@scrolltolower="loadMore"
:lower-threshold="150"
refresher-enabled
:refresher-triggered="refreshing"
@refresherrefresh="onRefresh"
>
<!-- 空状态 --> <!-- 空状态 -->
<view class="tradeIndex-empty" v-if="!loading && listData.length === 0"> <view class="tradeIndex-empty" v-if="!loading && listData.length === 0">
<image <image class="tradeIndex-empty-icon"
class="tradeIndex-empty-icon" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/empty.png" mode="aspectFit" />
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/empty.png"
mode="aspectFit"
/>
<text class="tradeIndex-empty-text">暂无内容</text> <text class="tradeIndex-empty-text">暂无内容</text>
</view> </view>
<!-- 瀑布流 --> <!-- 瀑布流 -->
<view class="tradeIndex-waterfall" v-if="listData.length > 0"> <view class="tradeIndex-waterfall" v-if="listData.length > 0">
<view class="waterfall-left"> <view class="waterfall-left">
<view <view class="waterfall-item" v-for="(item, index) in listData" v-if="index % 2 === 0"
class="waterfall-item" @click="goDetail(item)">
v-for="(item, index) in listData"
v-if="index % 2 === 0"
@click="goDetail(item)"
>
<view class="waterfall-item-img-wrap"> <view class="waterfall-item-img-wrap">
<image <image class="waterfall-item-img" :src="item.CoverImg" mode="widthFix" lazy-load />
class="waterfall-item-img"
:src="item.CoverImg"
mode="widthFix"
lazy-load
/>
<view class="waterfall-item-tag" v-if="item.DataType"> <view class="waterfall-item-tag" v-if="item.DataType">
{{ getTypeName(item.DataType) }} {{ getTypeName(item.DataType) }}
</view> </view>
</view> </view>
<view class="waterfall-item-body"> <view class="waterfall-item-body">
<view class="waterfall-item-name">{{ item.DataName }}</view> <view class="waterfall-item-name">{{ item.DataName }}</view>
<!-- 品牌信息 -->
<view class="waterfall-item-brand" v-if="item.DataType==3">
<view class="brand-icon">
<text class="iconfont icon-shangbiao"></text>
</view>
<text class="brand-name">{{item.FullBrandName}}</text>
</view>
<!-- 项目信息 -->
<view class="waterfall-item-project" v-if="item.DataType==1">
<view class="project-type">
<view class="type-icon">
<text class="iconfont icon-leixing"></text>
</view>
<text class="type-name">{{item.ProjectTypeName}}</text>
</view>
<view class="project-address" v-if="item.Address">
<view class="address-icon">
<text class="iconfont icon-dizhi"></text>
</view>
<text class="address-text">{{item.Address}}</text>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="waterfall-right"> <view class="waterfall-right">
<view <view class="waterfall-item" v-for="(item, index) in listData" v-if="index % 2 === 1"
class="waterfall-item" @click="goDetail(item)">
v-for="(item, index) in listData"
v-if="index % 2 === 1"
@click="goDetail(item)"
>
<view class="waterfall-item-img-wrap"> <view class="waterfall-item-img-wrap">
<image <image class="waterfall-item-img" :src="item.CoverImg" mode="widthFix" lazy-load />
class="waterfall-item-img"
:src="item.CoverImg"
mode="widthFix"
lazy-load
/>
<view class="waterfall-item-tag" v-if="item.DataType"> <view class="waterfall-item-tag" v-if="item.DataType">
{{ getTypeName(item.DataType) }} {{ getTypeName(item.DataType) }}
</view> </view>
</view> </view>
<view class="waterfall-item-body"> <view class="waterfall-item-body">
<view class="waterfall-item-name">{{ item.DataName }}</view> <view class="waterfall-item-name">{{ item.DataName }}</view>
<view v-if="item.DataType==3">
{{item.FullBrandName}}
</view>
<view v-if="item.DataType==1">
{{item.ProjectTypeName}}
地址图标:{{item.Address}}
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -113,12 +108,26 @@ ...@@ -113,12 +108,26 @@
}, },
data() { data() {
return { return {
tabs: [ tabs: [{
{ name: '推荐', type: '0' }, name: '推荐',
{ name: '找品牌', type: '3' }, type: '0'
{ name: '找项目', type: '1' }, },
{ name: '租写字楼', type: '2' }, {
{ name: '服务', type: '4' } name: '找品牌',
type: '3'
},
{
name: '找项目',
type: '1'
},
{
name: '租写字楼',
type: '2'
},
{
name: '服务',
type: '4'
}
], ],
typeMap: { typeMap: {
3: '品牌', 3: '品牌',
...@@ -191,160 +200,158 @@ ...@@ -191,160 +200,158 @@
}, },
goDetail(item) { goDetail(item) {
console.log('[tradeIndex] 点击条目:', item); console.log('[tradeIndex] 点击条目:', item);
let gotoUrl=''; let gotoUrl = '';
//载体项目 //载体项目
if(item.DataType==1) if (item.DataType == 1) {
{ gotoUrl = `/pages/kotra/carrier/detail?id=${item.DataId}`;
gotoUrl=`/pages/kotra/carrier/detail?id=${item.DataId}`;
} }
//楼宇 //楼宇
else if(item.DataType==2) else if (item.DataType == 2) {
{ gotoUrl = `/pages/kotra/carrier/detail_building?id=${item.DataId}`;
gotoUrl=`/pages/kotra/carrier/detail_building?id=${item.DataId}`;
} }
//品牌 //品牌
else if(item.DataType==3) else if (item.DataType == 3) {
{ gotoUrl = `/pages/kotra/brand/detail?id=${item.DataId}`;
gotoUrl=`/pages/kotra/brand/detail?id=${item.DataId}`;
} }
//企业服务 //企业服务
else if(item.DataType==4) else if (item.DataType == 4) {
{ gotoUrl = `/pages/kotra/brand/detail_company?id=${item.DataId}`;
gotoUrl=`/pages/kotra/brand/detail_company?id=${item.DataId}`;
} }
uni.navigateTo({ url: gotoUrl }); uni.navigateTo({
url: gotoUrl
});
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.tradeIndex { .tradeIndex {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #f8f8f8; background-color: #f8f8f8;
} }
/* ========== Tab 栏 ========== */ /* ========== Tab 栏 ========== */
.tradeIndex-tabs { .tradeIndex-tabs {
background-color: #fff; background-color: #fff;
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 10; z-index: 10;
border-bottom: 1rpx solid #f0f0f0; border-bottom: 1rpx solid #f0f0f0;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04); box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
} }
.tradeIndex-tabs-scroll { .tradeIndex-tabs-scroll {
white-space: nowrap; white-space: nowrap;
padding: 0 12rpx; padding: 0 12rpx;
} }
.tradeIndex-tab { .tradeIndex-tab {
display: inline-flex; display: inline-flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
padding: 28rpx 24rpx 20rpx; padding: 28rpx 24rpx 20rpx;
position: relative; position: relative;
} }
.tradeIndex-tab-name { .tradeIndex-tab-name {
font-size: 28rpx; font-size: 28rpx;
color: #b0b0b0; color: #b0b0b0;
font-weight: 500; font-weight: 500;
transition: all 0.25s ease; transition: all 0.25s ease;
} }
.tradeIndex-tab-name.active { .tradeIndex-tab-name.active {
color: #1a1a1a; color: #1a1a1a;
font-weight: 700; font-weight: 700;
font-size: 32rpx; font-size: 32rpx;
} }
.tradeIndex-tab-line { .tradeIndex-tab-line {
width: 0; width: 0;
height: 6rpx; height: 6rpx;
border-radius: 3rpx; border-radius: 3rpx;
background-color: transparent; background-color: transparent;
margin-top: 10rpx; margin-top: 10rpx;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
} }
.tradeIndex-tab-line.active { .tradeIndex-tab-line.active {
width: 48rpx; width: 48rpx;
background: linear-gradient(90deg, #ff6b6b, #ff4544); background: linear-gradient(90deg, #ff6b6b, #ff4544);
} }
/* ========== 滚动区域 ========== */ /* ========== 滚动区域 ========== */
.tradeIndex-scroll { .tradeIndex-scroll {
height: calc(100vh - 120rpx); height: calc(100vh - 120rpx);
} }
/* ========== 空状态 ========== */ /* ========== 空状态 ========== */
.tradeIndex-empty { .tradeIndex-empty {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
padding: 160rpx 0 100rpx; padding: 160rpx 0 100rpx;
} }
.tradeIndex-empty-icon { .tradeIndex-empty-icon {
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;
opacity: 0.35; opacity: 0.35;
margin-bottom: 32rpx; margin-bottom: 32rpx;
} }
.tradeIndex-empty-text { .tradeIndex-empty-text {
font-size: 28rpx; font-size: 28rpx;
color: #c0c0c0; color: #c0c0c0;
letter-spacing: 1rpx; letter-spacing: 1rpx;
} }
/* ========== 瀑布流 ========== */ /* ========== 瀑布流 ========== */
.tradeIndex-waterfall { .tradeIndex-waterfall {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
padding: 20rpx 24rpx 0; padding: 20rpx 24rpx 0;
} }
.waterfall-left { .waterfall-left {
width: calc(50% - 12rpx); width: calc(50% - 12rpx);
margin-right: 24rpx; margin-right: 24rpx;
} }
.waterfall-right { .waterfall-right {
width: calc(50% - 12rpx); width: calc(50% - 12rpx);
} }
.waterfall-item { .waterfall-item {
background-color: #fff; background-color: #fff;
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
margin-bottom: 24rpx; margin-bottom: 24rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.07); box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.07);
transition: box-shadow 0.25s ease, transform 0.25s ease; transition: box-shadow 0.25s ease, transform 0.25s ease;
} }
.waterfall-item:active { .waterfall-item:active {
transform: scale(0.98); transform: scale(0.98);
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
} }
.waterfall-item-img-wrap { .waterfall-item-img-wrap {
position: relative; position: relative;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
border-radius: 20rpx 20rpx 0 0; border-radius: 20rpx 20rpx 0 0;
} }
.waterfall-item-img { .waterfall-item-img {
width: 100%; width: 100%;
display: block; display: block;
background-color: #f0f0f0; background-color: #f0f0f0;
} }
.waterfall-item-tag { .waterfall-item-tag {
position: absolute; position: absolute;
top: 16rpx; top: 16rpx;
left: 16rpx; left: 16rpx;
...@@ -356,13 +363,13 @@ ...@@ -356,13 +363,13 @@
border-radius: 30rpx; border-radius: 30rpx;
letter-spacing: 1rpx; letter-spacing: 1rpx;
box-shadow: 0 2rpx 8rpx rgba(255, 69, 68, 0.4); box-shadow: 0 2rpx 8rpx rgba(255, 69, 68, 0.4);
} }
.waterfall-item-body { .waterfall-item-body {
padding: 20rpx 20rpx 22rpx; padding: 20rpx 20rpx 22rpx;
} }
.waterfall-item-name { .waterfall-item-name {
font-size: 28rpx; font-size: 28rpx;
font-weight: 600; font-weight: 600;
color: #1a1a1a; color: #1a1a1a;
...@@ -373,66 +380,75 @@ ...@@ -373,66 +380,75 @@
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
margin-bottom: 12rpx; margin-bottom: 12rpx;
} }
.waterfall-item-meta { .waterfall-item-meta {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
} }
.waterfall-item-arrow { .waterfall-item-arrow {
font-size: 22rpx; font-size: 22rpx;
color: #c0c0c0; color: #c0c0c0;
letter-spacing: 0.5rpx; letter-spacing: 0.5rpx;
} }
/* ========== 加载更多 ========== */ /* ========== 加载更多 ========== */
.tradeIndex-loading { .tradeIndex-loading {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 32rpx 0; padding: 32rpx 0;
} }
.loading-dot { .loading-dot {
width: 8rpx; width: 8rpx;
height: 8rpx; height: 8rpx;
border-radius: 50%; border-radius: 50%;
background-color: #ff4544; background-color: #ff4544;
margin-right: 12rpx; margin-right: 12rpx;
animation: loadingPulse 1.2s ease-in-out infinite; animation: loadingPulse 1.2s ease-in-out infinite;
} }
.loading-text { .loading-text {
font-size: 26rpx; font-size: 26rpx;
color: #b0b0b0; color: #b0b0b0;
letter-spacing: 1rpx; letter-spacing: 1rpx;
} }
@keyframes loadingPulse {
@keyframes loadingPulse { 0%,
0%, 100% { opacity: 0.4; transform: scale(0.8); } 100% {
50% { opacity: 1; transform: scale(1.2); } opacity: 0.4;
} transform: scale(0.8);
}
50% {
opacity: 1;
transform: scale(1.2);
}
}
.tradeIndex-nomore { .tradeIndex-nomore {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 28rpx 40rpx; padding: 28rpx 40rpx;
} }
.nomore-line { .nomore-line {
flex: 1; flex: 1;
height: 1rpx; height: 1rpx;
background-color: #e8e8e8; background-color: #e8e8e8;
} }
.nomore-text { .nomore-text {
font-size: 24rpx; font-size: 24rpx;
color: #c0c0c0; color: #c0c0c0;
padding: 0 24rpx; padding: 0 24rpx;
letter-spacing: 1rpx; letter-spacing: 1rpx;
white-space: nowrap; white-space: nowrap;
} }
</style> </style>
\ No newline at end of file
...@@ -5,46 +5,31 @@ ...@@ -5,46 +5,31 @@
<brandInformation ref="brandinfo" :datas="dataOne"></brandInformation> <brandInformation ref="brandinfo" :datas="dataOne"></brandInformation>
</view> </view>
<view v-if="ChooseidentityId == 2"> <view v-if="ChooseidentityId == 2">
<carrierInformation <carrierInformation ref="carrierinfo" :datas="dataOne"></carrierInformation>
ref="carrierinfo"
:datas="dataOne"
></carrierInformation>
</view> </view>
</view> </view>
<view class="progressBox" v-if="nowStatus != 4"> <view class="progressBox" v-if="nowStatus != 4">
<view class="progressName"> <view class="progressName">
<text class="cur">{{ stepName }}</text> <text class="cur">{{ stepName }}</text>
<text class="nex">{{ nextSepName }}</text> <!-- <text class="nex">{{ nextSepName }}</text> -->
</view> </view>
<u-line-progress <u-line-progress class="progress" :percent="percent" :show-percent="false" :height="10"
class="progress" inactive-color="#DADCE6" active-color="#F70027"></u-line-progress>
:percent="percent"
:show-percent="false"
:height="10"
inactive-color="#DADCE6"
active-color="#F70027"
></u-line-progress>
</view> </view>
<view> </view> <view> </view>
<view class="stepBox" v-if="nowStatus != 4"> <view class="stepBox" v-if="nowStatus != 4">
<view class="stepItem" v-if="step == 1"> <view class="stepItem" v-if="step == 1">
<view <view style="width: 100%; display: flex" v-if="dataOne.CompanyStatus && dataOne.CompanyStatus == 2">
style="width: 100%; display: flex"
v-if="dataOne.CompanyStatus && dataOne.CompanyStatus == 2"
>
<u-icon name="warning-o" color="#F70027" size="50"></u-icon> <u-icon name="warning-o" color="#F70027" size="50"></u-icon>
<span style="margin-left: 10px; color: #f70027">审核未通过</span> <span style="margin-left: 10px; color: #f70027">审核未通过</span>
</view> </view>
<view <view style="
style="
width: 100%; width: 100%;
display: flex; display: flex;
margin-bottom: 20px; margin-bottom: 20px;
margin-top: 10px; margin-top: 10px;
" " v-if="dataOne.CompanyStatus && dataOne.CompanyStatus == 2">
v-if="dataOne.CompanyStatus && dataOne.CompanyStatus == 2"
>
<span>原因:{{ dataOne.RejectRemark }}</span> <span>原因:{{ dataOne.RejectRemark }}</span>
</view> </view>
<view v-for="(item, index) in stepOneList" :key="index"> <view v-for="(item, index) in stepOneList" :key="index">
...@@ -54,18 +39,10 @@ ...@@ -54,18 +39,10 @@
<text class="tip" v-if="item.tip">{{ item.tip }}</text> <text class="tip" v-if="item.tip">{{ item.tip }}</text>
</view> </view>
<view class="con1" v-if="item.type == 1"> <view class="con1" v-if="item.type == 1">
<input <input class="input" type="text" v-model="dataOne[item.field]" :placeholder="item.text"
class="input"
type="text"
v-model="dataOne[item.field]"
:placeholder="item.text"
:disabled="nowStatus == 3 || nowStatus == 5 ? true : false" :disabled="nowStatus == 3 || nowStatus == 5 ? true : false"
placeholder-style="color: #CECECEFF" placeholder-style="color: #CECECEFF" @focus="inputFcous(item)" />
@focus="inputFcous(item)" <view v-if="nowStatus != 3 && nowStatus != 5" style="
/>
<view
v-if="nowStatus != 3 && nowStatus != 5"
style="
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;
display: flex; display: flex;
...@@ -75,104 +52,68 @@ ...@@ -75,104 +52,68 @@
top: -2rpx; top: -2rpx;
right: 10rpx; right: 10rpx;
z-index: 10; z-index: 10;
" " @click="delInputText(item.field)">
@click="delInputText(item.field)" <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/delete.png"
> v-if="item.delIcon" class="delIcon" mode="widthFix"></image>
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/delete.png"
v-if="item.delIcon"
class="delIcon"
mode="widthFix"
></image>
</view> </view>
</view> </view>
<view class="con2" v-if="item.type == 2"> <view class="con2" v-if="item.type == 2">
<!-- 未上传成功 --> <!-- 未上传成功 -->
<image <image :src="businessLicenseDemo" v-if="!businessLicenseUploadIsSuccess" class="conImage"
:src="businessLicenseDemo" mode="widthFix" @click="chooseImg"></image>
v-if="!businessLicenseUploadIsSuccess"
class="conImage"
mode="widthFix"
@click="chooseImg"
></image>
<!-- 上传成功 --> <!-- 上传成功 -->
<image <image :src="dataOne.BusinessLicense" v-if="businessLicenseUploadIsSuccess" class="conImage"
:src="dataOne.BusinessLicense" mode="heightFix"></image>
v-if="businessLicenseUploadIsSuccess" <view class="reupload" v-if="
class="conImage"
mode="heightFix"
></image>
<view
class="reupload"
v-if="
businessLicenseUploadIsSuccess && businessLicenseUploadIsSuccess &&
nowStatus != 3 && nowStatus != 3 &&
nowStatus != 5 nowStatus != 5
" " @click="chooseImg">
@click="chooseImg"
>
重新上传 重新上传
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="stepItem" v-if="step == 2"> <view class="stepItem" v-if="step == 2" style="display: none;">
<view <view style="
style="
font-size: 21px; font-size: 21px;
font-weight: 800; font-weight: 800;
color: #1f1f1f; color: #1f1f1f;
text-align: center; text-align: center;
" ">请选择您的身份</view>
>请选择您的身份</view <view style="
>
<view
style="
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
margin-top: 180rpx; margin-top: 180rpx;
" ">
>
<view class="chooseidbox" @click="ChooseidentityId = 1"> <view class="chooseidbox" @click="ChooseidentityId = 1">
<view class="chooseidbox_t"> <view class="chooseidbox_t">
<image <image v-if="ChooseidentityId == 1"
v-if="ChooseidentityId == 1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/choice_pp.png">
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/choice_pp.png"
>
</image> </image>
<image <image v-if="ChooseidentityId == 2"
v-if="ChooseidentityId == 2" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/choice_pp_n.png">
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/choice_pp_n.png"
>
</image> </image>
</view> </view>
<view class="chooseidbox_b"> <view class="chooseidbox_b">
<image <image v-if="ChooseidentityId == 1"
v-if="ChooseidentityId == 1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/choice_g.png"></image>
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/choice_g.png"
></image>
</view> </view>
</view> </view>
<view class="chooseidbox" @click="ChooseidentityId = 2"> <view class="chooseidbox" @click="ChooseidentityId = 2">
<view class="chooseidbox_t"> <view class="chooseidbox_t">
<image <image v-if="ChooseidentityId == 2"
v-if="ChooseidentityId == 2" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/choice_zt.png">
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/choice_zt.png"
>
</image> </image>
<image <image v-if="ChooseidentityId == 1"
v-if="ChooseidentityId == 1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/choice_zt_n.png">
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/choice_zt_n.png"
>
</image> </image>
</view> </view>
<view class="chooseidbox_b"> <view class="chooseidbox_b">
<image <image v-if="ChooseidentityId == 2"
v-if="ChooseidentityId == 2" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/choice_g.png"></image>
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/choice_g.png"
></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -182,14 +123,16 @@ ...@@ -182,14 +123,16 @@
<brandInformation ref="brandinfo" :datas="dataOne"></brandInformation> <brandInformation ref="brandinfo" :datas="dataOne"></brandInformation>
</view> </view>
<view v-if="ChooseidentityId == 2"> <view v-if="ChooseidentityId == 2">
<carrierInformation <carrierInformation ref="carrierinfo" :datas="dataOne"></carrierInformation>
ref="carrierinfo"
:datas="dataOne"
></carrierInformation>
</view> </view>
</view> </view>
<view v-if="step != 3"> <view v-if="step ==1">
<view class="butBox" @click="stepOne">
保存
</view>
</view>
<view v-else-if="step != 3">
<view class="butBox" @click="nextStep"> <view class="butBox" @click="nextStep">
<image :src="nextIcon" class="next" mode="widthFix"></image> <image :src="nextIcon" class="next" mode="widthFix"></image>
</view> </view>
...@@ -199,10 +142,10 @@ ...@@ -199,10 +142,10 @@
</template> </template>
<script> <script>
import rangeSlider from "./components/range-slider.vue"; import rangeSlider from "./components/range-slider.vue";
import carrierInformation from "./carrierInformation.vue"; import carrierInformation from "./carrierInformation.vue";
import brandInformation from "./brandInformation.vue"; import brandInformation from "./brandInformation.vue";
export default { export default {
components: { components: {
rangeSlider, rangeSlider,
carrierInformation, carrierInformation,
...@@ -211,10 +154,9 @@ export default { ...@@ -211,10 +154,9 @@ export default {
computed: {}, computed: {},
data() { data() {
return { return {
pageTitle: "企业认证", pageTitle: "企业信息",
step: 1, step: 1,
nextIcon: nextIcon: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/next.png",
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/next.png",
percent: 33.33, percent: 33.33,
ChooseidentityId: 1, ChooseidentityId: 1,
stepName: "第1步 企业基础资料", stepName: "第1步 企业基础资料",
...@@ -256,8 +198,7 @@ export default { ...@@ -256,8 +198,7 @@ export default {
}, },
], ],
//type=1:输入框,2:步进器,3:多选 //type=1:输入框,2:步进器,3:多选
stepTwoList: [ stepTwoList: [{
{
name: "品牌名称", name: "品牌名称",
text: "请输入品牌名称", text: "请输入品牌名称",
field: "BrandName", field: "BrandName",
...@@ -293,8 +234,7 @@ export default { ...@@ -293,8 +234,7 @@ export default {
], ],
customList: [], //客户群体 customList: [], //客户群体
//type=1:输入框,2:单选,3:范围 //type=1:输入框,2:单选,3:范围
stepThreeList: [ stepThreeList: [{
{
name: "扩店区域", name: "扩店区域",
text: "请输入扩店区域", text: "请输入扩店区域",
field: "StoreExpansion", field: "StoreExpansion",
...@@ -317,8 +257,7 @@ export default { ...@@ -317,8 +257,7 @@ export default {
], ],
goodsType: [], //商品性质 goodsType: [], //商品性质
goodsTypeValue: "", goodsTypeValue: "",
businessLicenseDemo: businessLicenseDemo: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/upLoadDemo.png", //营业执照占位图片
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/upLoadDemo.png", //营业执照占位图片
businessLicenseUploadIsSuccess: false, //营业执照是否上传成功 businessLicenseUploadIsSuccess: false, //营业执照是否上传成功
access_token: "", //百度ai平台token access_token: "", //百度ai平台token
dataOne: { dataOne: {
...@@ -341,10 +280,8 @@ export default { ...@@ -341,10 +280,8 @@ export default {
CustomerType: "", CustomerType: "",
CustomerOtherType: "", CustomerOtherType: "",
}, },
reduceIcon: reduceIcon: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/reduceIcon.png",
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/reduceIcon.png", addIcon: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/addIcon.png",
addIcon:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/addIcon.png",
builtArea: [1, 100], //店铺面积 builtArea: [1, 100], //店铺面积
rangeSliderMin: 0, //区间滑块最小值 rangeSliderMin: 0, //区间滑块最小值
rangeSliderMax: 100, //区间滑块最大值 rangeSliderMax: 100, //区间滑块最大值
...@@ -416,13 +353,12 @@ export default { ...@@ -416,13 +353,12 @@ export default {
count: 1, //默认9 count: 1, //默认9
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有 sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
sourceType: ["album"], //从相册选择 sourceType: ["album"], //从相册选择
success: function (res) { success: function(res) {
wx.getFileSystemManager().readFile({ wx.getFileSystemManager().readFile({
filePath: res.tempFilePaths[0], filePath: res.tempFilePaths[0],
encoding: "base64", //编码格式 encoding: "base64", //编码格式
success: (ans) => { success: (ans) => {
that.getImgInfo(ans.data, that.access_token, (_res) => { that.getImgInfo(ans.data, that.access_token, (_res) => {
console.log("getImgInfo", _res);
if (_res.data.direction == 1) { if (_res.data.direction == 1) {
//未定义,图片类型错误 //未定义,图片类型错误
wx.showToast({ wx.showToast({
...@@ -433,13 +369,18 @@ export default { ...@@ -433,13 +369,18 @@ export default {
} else { } else {
let data = _res.data.words_result; let data = _res.data.words_result;
that.upFile(res.tempFilePaths[0], (uploadRes) => { that.upFile(res.tempFilePaths[0], (uploadRes) => {
that.dataOne.BusinessLicense = JSON.parse( that.dataOne.BusinessLicense = JSON
.parse(
uploadRes.data uploadRes.data
).data; ).data;
that.businessLicenseUploadIsSuccess = true; that.businessLicenseUploadIsSuccess =
that.dataOne.CompanyName = data.单位名称.words; true;
that.dataOne.LegalPerson = data.法人.words; that.dataOne.CompanyName = data.单位名称
that.dataOne.UnifiedCode = data.社会信用代码.words; .words;
that.dataOne.LegalPerson = data.法人
.words;
that.dataOne.UnifiedCode = data.社会信用代码
.words;
}); });
} }
}); });
...@@ -453,8 +394,7 @@ export default { ...@@ -453,8 +394,7 @@ export default {
getImgInfo(data, token, resCall) { getImgInfo(data, token, resCall) {
let that = this; let that = this;
uni.request({ uni.request({
url: url: "https://aip.baidubce.com/rest/2.0/ocr/v1/business_license?access_token=" +
"https://aip.baidubce.com/rest/2.0/ocr/v1/business_license?access_token=" +
token, token,
method: "POST", method: "POST",
header: { header: {
...@@ -481,9 +421,9 @@ export default { ...@@ -481,9 +421,9 @@ export default {
wx.showLoading({ wx.showLoading({
title: "上传中", title: "上传中",
}); });
let MallBaseId = uni.getStorageSync("mall_UserInfo").MallBaseId let MallBaseId = uni.getStorageSync("mall_UserInfo").MallBaseId ?
? uni.getStorageSync("mall_UserInfo").MallBaseId uni.getStorageSync("mall_UserInfo").MallBaseId :
: 1; 1;
let action = let action =
that.host2 + "/api/File/UploadTencent?MallBaseId=" + MallBaseId; that.host2 + "/api/File/UploadTencent?MallBaseId=" + MallBaseId;
uni.uploadFile({ uni.uploadFile({
...@@ -497,7 +437,7 @@ export default { ...@@ -497,7 +437,7 @@ export default {
uni.hideLoading(); uni.hideLoading();
resCall(uploadFileRes); resCall(uploadFileRes);
}, },
fail: function (res) { fail: function(res) {
that.businessLicenseUploadIsSuccess = false; that.businessLicenseUploadIsSuccess = false;
wx.showToast({ wx.showToast({
title: "上传失败!", title: "上传失败!",
...@@ -535,13 +475,25 @@ export default { ...@@ -535,13 +475,25 @@ export default {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.dataOne.CompanyId = res.data.CompanyId; this.dataOne.CompanyId = res.data.CompanyId;
this.dataOne.CompanyStatus = -1; this.dataOne.CompanyStatus = -1;
this.showTemplate(res.data.template_message_list); uni.showToast({
title: "操作成功!",
icon: 'success',
duration: 2000
});
this.finish();
//this.showTemplate(res.data.template_message_list);
} else {
uni.showToast({
title: '操作失败!',
position: 'bottom',
icon: 'none',
duration: 2000
});
} }
}); });
}, },
//步骤三
//返回个人中心 //返回个人中心
finish() { finish() {
uni.navigateTo({ uni.navigateTo({
...@@ -609,7 +561,6 @@ export default { ...@@ -609,7 +561,6 @@ export default {
} }
} }
}, },
// 获取公司认证信息 // 获取公司认证信息
getUserCompany() { getUserCompany() {
let that = this; let that = this;
...@@ -653,7 +604,7 @@ export default { ...@@ -653,7 +604,7 @@ export default {
}, },
// 单选 // 单选
radioChange(e) { radioChange(e) {
// console.log(e);
}, },
//显示模板 //显示模板
showTemplate(template) { showTemplate(template) {
...@@ -708,11 +659,11 @@ export default { ...@@ -708,11 +659,11 @@ export default {
title: this.pageTitle, title: this.pageTitle,
}); });
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.page { .page {
background-color: #f6f6f6; background-color: #f6f6f6;
min-height: 100vh; min-height: 100vh;
height: 100%; height: 100%;
...@@ -881,7 +832,7 @@ export default { ...@@ -881,7 +832,7 @@ export default {
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
& :nth-child(4n) > .customName { & :nth-child(4n)>.customName {
margin-right: 0rpx !important; margin-right: 0rpx !important;
} }
} }
...@@ -960,55 +911,55 @@ export default { ...@@ -960,55 +911,55 @@ export default {
font-weight: 500; font-weight: 500;
color: #b7b7b7; color: #b7b7b7;
} }
} }
.chooseType { .chooseType {
background-color: #f95771ff !important; background-color: #f95771ff !important;
color: #f70027 !important; color: #f70027 !important;
border: none !important; border: none !important;
} }
// 修改滑块样式 // 修改滑块样式
/deep/.block { /deep/.block {
background-color: #ffffff; background-color: #ffffff;
border: 4rpx solid #f70027; border: 4rpx solid #f70027;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(232, 76, 100, 0.74); box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(232, 76, 100, 0.74);
border-radius: 10rpx; border-radius: 10rpx;
} }
.rangeSliderNum { .rangeSliderNum {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
color: #000000; color: #000000;
} }
/deep/.u-radio-group { /deep/.u-radio-group {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
/deep/.u-radio-group :nth-child(2n) > .u-radio { /deep/.u-radio-group :nth-child(2n)>.u-radio {
margin-right: 0rpx; margin-right: 0rpx;
} }
/deep/.u-radio { /deep/.u-radio {
position: relative; position: relative;
width: 278rpx; width: 278rpx;
border-radius: 18rpx; border-radius: 18rpx;
margin-right: 30rpx; margin-right: 30rpx;
} }
/deep/.u-radio__icon-wrap { /deep/.u-radio__icon-wrap {
position: absolute; position: absolute;
top: 17rpx; top: 17rpx;
right: 17rpx; right: 17rpx;
z-index: 10; z-index: 10;
} }
.sliderCurNumBox { .sliderCurNumBox {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: baseline; align-items: baseline;
...@@ -1020,5 +971,5 @@ export default { ...@@ -1020,5 +971,5 @@ export default {
font-weight: 800; font-weight: 800;
color: #f70027; color: #f70027;
} }
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment