优化页面
This commit is contained in:
parent
4bbebdf2b5
commit
45e04f27f2
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name" : "供销综合平台",
|
||||
"appid" : "__UNI__EA9FCAF",
|
||||
// "appid" : "__UNI__EA9FCAF",
|
||||
"appid" : "__UNI__3A527D1",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
|
11
pages.json
11
pages.json
@ -19,7 +19,7 @@
|
||||
"navigationBarBackgroundColor": "#3175f9",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
@ -383,6 +383,15 @@
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "companyUnsign/companyUnsign",
|
||||
"style": {
|
||||
"navigationBarTitleText": "未签约公司列表",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#3175f9",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
|
||||
}]
|
||||
}],
|
||||
"globalStyle": {
|
||||
|
181
subpkg/companyUnsign/companyUnsign.vue
Normal file
181
subpkg/companyUnsign/companyUnsign.vue
Normal file
@ -0,0 +1,181 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="company_list">
|
||||
<view class="info_card" v-for="item in companyList" :key="item.id">
|
||||
<view class="top" @click="naviTo('/subpkg/companySign/companySign?id='+item.id)">
|
||||
<view>
|
||||
<view class="info_name" :class="item.is_contract?'have':'no'">{{item.company_name}}</view>
|
||||
<view class="info_type">{{item.company_type_name}}</view>
|
||||
</view>
|
||||
<view class="btn">详情<uni-icons type="forward" color="#666666"></uni-icons></view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="bottom">
|
||||
<image src="../../static/img/contract/company.png"></image>
|
||||
<view class="text">
|
||||
<view>主要联系人:{{item.master_name}}</view>
|
||||
<view @click="copyPhone(item.master_phone)">联系方式:{{item.master_phone}}</view>
|
||||
<view style="display: flex;">
|
||||
<view class="">区县乡镇:</view>
|
||||
<view>{{item.city_name+'/'+item.area_name+'/'+item.street_name}}</view>
|
||||
</view>
|
||||
<!-- <view>片区经理:</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty v-if="loadConfig.status=='nomore'&& companyList.length==0" icon="/static/img/empty/data.png"></u-empty>
|
||||
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
||||
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { companyUnsigned } from "@/api/company.js"
|
||||
import { Toast } from '@/libs/uniApi.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loadConfig: {
|
||||
page: 1,
|
||||
limit: 15,
|
||||
lastpage: '',
|
||||
loadingText: '努力加载中',
|
||||
loadmoreText: '轻轻上拉',
|
||||
nomoreText: '我也是有底线的~~',
|
||||
status: 'loadmore'
|
||||
},
|
||||
companyList: []
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.loadCompanyList();
|
||||
},
|
||||
onReachBottom() {
|
||||
this.loadCompanyList();
|
||||
},
|
||||
methods: {
|
||||
initLoad() {
|
||||
this.loadConfig.page = 1;
|
||||
this.loadConfig.status = "loadmore";
|
||||
this.companyList = [];
|
||||
this.loadCompanyList();
|
||||
},
|
||||
// 加载公司列表
|
||||
async loadCompanyList() {
|
||||
if (this.loadConfig.status == "nomore") return;
|
||||
this.loadConfig.status = "loading";
|
||||
let res = await companyUnsigned({
|
||||
page: this.loadConfig.page,
|
||||
limit: this.loadConfig.limit
|
||||
})
|
||||
this.loadConfig.status = "loadmore"
|
||||
if (res.data.data.length < this.loadConfig.limit) {
|
||||
this.loadConfig.status = "nomore"
|
||||
} else {
|
||||
this.loadConfig.page++;
|
||||
}
|
||||
this.companyList = [...this.companyList, ...res.data?.data]
|
||||
},
|
||||
naviTo(url) {
|
||||
url ?
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
}) : Toast('暂未开放')
|
||||
},
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.company_list {
|
||||
padding-bottom: 32rpx;
|
||||
// margin-top: 190rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.info_card {
|
||||
width: 694rpx;
|
||||
// height: 300rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 21rpx 21rpx 21rpx 21rpx;
|
||||
margin-top: 28rpx;
|
||||
padding: 24rpx;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 28rpx;
|
||||
|
||||
.info_name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.have {
|
||||
&::before {
|
||||
content: "已签约";
|
||||
border-radius: 14rpx;
|
||||
border: 5rpx solid #5ac725;
|
||||
color: #5ac725;
|
||||
padding: 3rpx 6rpx;
|
||||
font-size: 28rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.no {
|
||||
&::before {
|
||||
content: "未签约";
|
||||
border-radius: 14rpx;
|
||||
border: 5rpx solid #f56c6c;
|
||||
color: #f56c6c;
|
||||
padding: 3rpx 6rpx;
|
||||
font-size: 28rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.info_type {
|
||||
font-size: 25rpx;
|
||||
font-weight: 500;
|
||||
color: $theme-oa-color;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
font-size: 25rpx;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
margin-top: 28rpx;
|
||||
|
||||
image {
|
||||
height: 140rpx;
|
||||
width: 140rpx;
|
||||
margin-right: 28rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
Loading…
x
Reference in New Issue
Block a user