Browse Source

合并代码

zys
杨豪 3 years ago
parent
commit
ccdac8ff1a
  1. 29
      api/business.js
  2. 28
      components/LoadStatus.vue
  3. 4
      config/index.js
  4. 3
      pages.json
  5. 171
      pages/demandHall/business/index.vue
  6. 49
      pages/demandHall/business/newsSwiper.vue
  7. 42
      pages/demandHall/supplyHall/index.vue
  8. 13
      pages/life/articleList/index.vue
  9. 10
      pages/user/editNeeds/index.vue
  10. 2
      pages/user/index.vue
  11. BIN
      static/images/home/top-bg.png
  12. BIN
      static/images/learnMore1.png
  13. BIN
      static/images/learnMore2.png
  14. BIN
      static/images/learnMore3.png
  15. BIN
      static/images/learnMore4.png

29
api/business.js

@ -0,0 +1,29 @@
import request from '@/utils/request'
// 商业简报
export function briefing(data) {
return request.get('/business/briefing', data, {
login: false,
})
}
// 推荐服务里的供应
export function supply(data) {
return request.get('/business/supply', data, {
login: false,
})
}
// 推荐服务里的分类
export function listResourcesCagetory(data) {
return request.get('/ResourcesCagetory/listResourcesCagetory', data, {
login: false,
})
}
// 优质企业列表
export function listEnterprise(data) {
return request.get('/business/listEnterprise ', data, {
login: false,
})
}

28
components/LoadStatus.vue

@ -0,0 +1,28 @@
<template>
<view class="loadStatus-box">{{loadStatus}}</view>
</template>
<script>
export default{
props: {
loadStatus: {
type: String,
default: ''
}
},
data(){
return {
}
},
}
</script>
<style>
.loadStatus-box{
text-align: center;
font-size: 28rpx;
color: #000;
padding: 30rpx 0;
}
</style>

4
config/index.js

@ -1,8 +1,8 @@
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api' // export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api'
// export const VUE_APP_API_URL = 'http://192.168.0.112:8092/api' // export const VUE_APP_API_URL = 'http://192.168.0.112:8092/api'
// export const VUE_APP_API_URL = 'http://10.11.32.103:8092/api' export const VUE_APP_API_URL = 'http://10.11.32.103:8092/api'
export const VUE_APP_API_URL = 'https://cloud.api.cyjyyjy.com/api' // export const VUE_APP_API_URL = 'https://cloud.api.cyjyyjy.com/api'
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://thapi.xinxintuan.co/api' // export const VUE_APP_API_URL = 'https://thapi.xinxintuan.co/api'
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';

3
pages.json

@ -267,8 +267,7 @@
{ {
"path": "pages/demandHall/business/index", "path": "pages/demandHall/business/index",
"style": { "style": {
"navigationBarTitleText": "商业", "navigationBarTitleText": "商业"
"enablePullDownRefresh": true
} }
}, },

171
pages/demandHall/business/index.vue

@ -24,36 +24,13 @@
<view class="news-con acea-row row-middle"> <view class="news-con acea-row row-middle">
<image src="../../../static/images/hot-icon.png"></image> <image src="../../../static/images/hot-icon.png"></image>
<view class="notice-swiper"> <view class="notice-swiper">
<swiper <NewsSwiper :list="isHotList" :interval="4000" @toArticleDetail="toArticleDetail"></NewsSwiper>
:autoplay="true"
:interval="5000"
:circular="true"
style="height: 34rpx;"
:duration="1500"
:vertical="true"
>
<swiper-item v-for="(item,i) in 3" :key="i">
<view> 2021中国酒店与商用厨具行业品牌盛即将召开 </view>
</swiper-item>
</swiper>
</view> </view>
</view> </view>
<view class="news-con acea-row row-middle"> <view class="news-con acea-row row-middle">
<image src="../../../static/images/rem-icon.png"></image> <image src="../../../static/images/rem-icon.png"></image>
<view class="notice-swiper"> <view class="notice-swiper">
<swiper <NewsSwiper :list="isRecommend" :interval="4000" @toArticleDetail="toArticleDetail"></NewsSwiper>
:autoplay="true"
:interval="5000"
:circular="true"
style="height: 34rpx;"
:duration="1500"
:vertical="true"
>
<swiper-item v-for="(item,i) in 3" :key="i">
<view> 如何具有商业思维 </view>
</swiper-item>
</swiper>
</view> </view>
</view> </view>
</view> </view>
@ -63,21 +40,21 @@
<view class="company-box"> <view class="company-box">
<view class="title-con acea-row"> <view class="title-con acea-row">
<image src="../../../static/images/business-title1.png" class="title-img"></image> <image src="../../../static/images/business-title1.png" class="title-img"></image>
<view class="update-icon acea-row row-center-wrapper"> <view class="update-icon acea-row row-center-wrapper" @click="replaceClick">
<image src="../../../static/images/update-icon.png" mode=""></image>换一批 <image src="../../../static/images/update-icon.png" :class="showCirc ? 'circ' : ''"></image>换一批
</view> </view>
</view> </view>
<scroll-view class="scroll-view_H acea-row" scroll-x="true"> <scroll-view class="scroll-view_H acea-row" scroll-x="true">
<view class="company-list" v-for="(item,index) in 6"> <view class="company-list" v-for="(item,index) in enterpriseList" :key="index">
<view class="title">楚象科技有限公司</view> <view class="title">{{item.enterpriseName}}</view>
<view class="category-box acea-row"> <view class="category-box acea-row">
<view class="tag-item-b tag">持续盈利</view> <view class="tag" :class="index%2 == 0 ? 'tag-item-b' : 'tag-item-y' ">{{item.cname}}</view>
<view class="tag-item-y tag">财务规范</view> <!-- <view class="tag-item-y tag">财务规范</view>
<view class="tag-item-p tag">零负债</view> <view class="tag-item-p tag">零负债</view> -->
</view> </view>
<view class="title-s">以领先科技致力于推动客户成功</view> <view class="title-s line1">{{item.enterpriseTitle}}</view>
<view class="acea-row"> <view class="acea-row">
<image src="../../../static/images/business-img1.png" class="company-logo"></image> <image :src="item.enterpriseLogo" class="company-logo" mode="aspectFill"></image>
<view class="todetails">了解详情</view> <view class="todetails">了解详情</view>
</view> </view>
@ -93,46 +70,36 @@
</view> </view>
<view class="service-top acea-row row-between"> <view class="service-top acea-row row-between">
<view class="service-nub-left acea-row row-column-between"> <view class="service-nub-left acea-row row-column-between">
<view class="tips">我要开发小程序</view> <view class="tips line1">{{supplyList[0].title}}</view>
<view class="tips-item">最快一个月进入测试阶段</view> <view class="tips-item line1">{{supplyList[0].detailedDescription}}</view>
<image src="../../../static/images/business-img1.png" mode=""></image> <image :src="supplyList[0].resourceImgs[0]" mode="aspectFill"></image>
</view> </view>
<view class="acea-row row-between service-nub-right"> <view class="acea-row row-between service-nub-right">
<view class="acea-row row-center-wrapper module-nub"> <view class="acea-row row-center-wrapper module-nub">
<view class="tips">我要H5定制</view> <view class="tips line1">{{supplyList[1].title}}</view>
<view class="tips-item">最快半个月进入测试阶段</view> <view class="tips-item line1">{{supplyList[1].detailedDescription}}</view>
</view>
<view class="module-box acea-row row-center-wrapper">
<view class="tips">装修服务</view>
<view class="tips-item">房屋装修</view>
</view> </view>
<view class="module-box acea-row row-center-wrapper"> <view class="acea-row row-center-wrapper module-nub">
<view class="tips">装修服务</view> <view class="tips">{{supplyList[2].title || '广告位招租'}}</view>
<view class="tips-item">房屋装修</view> <view class="tips-item">{{supplyList[2].detailedDescription}}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="service-bottom acea-row row-between"> <view class="service-bottom acea-row row-between">
<view class="module-box bg-red acea-row row-center-wrapper"> <view v-for="(item,index) in cagetoryList" :key="index">
<view class="tips">装修服务</view> <view class="module-box bg-red acea-row row-center-wrapper" v-if="index <= 2 ">
<view class="tips-item">房屋装修</view> <view class="tips">{{item.cagetoryName}}</view>
</view> <!-- <view class="tips-item">房屋装修</view> -->
<view class="module-box bg-blue acea-row row-center-wrapper"> </view>
<view class="tips">装修服务</view>
<view class="tips-item">房屋装修</view>
</view>
<view class="module-box bg-yellow acea-row row-center-wrapper">
<view class="tips">装修服务</view>
<view class="tips-item">房屋装修</view>
</view> </view>
<view class="tolearn acea-row row-center-wrapper">装修服务</view> <view class="tolearn acea-row row-center-wrapper">查看更多</view>
</view> </view>
</view> </view>
<!-- 优质项目 --> <!-- 优质项目 -->
<view class="project-box"> <view class="project-box">
<image src="../../../static/images/business-title3.png" class="title-img"></image> <image src="../../../static/images/business-title3.png" class="title-img"></image>
<view class="project-list acea-row" v-for="(item,index) in 3"> <view class="project-list acea-row" v-for="(item,index) in 3" :key="index">
<image src="../../../static/images/business-img1.png" mode="" class="project-img"></image> <image src="../../../static/images/business-img1.png" mode="" class="project-img"></image>
<view class="right-con acea-row row-column-between"> <view class="right-con acea-row row-column-between">
<view class="acea-row row-middle title"> <view class="acea-row row-middle title">
@ -154,16 +121,69 @@
</template> </template>
<script> <script>
import { getArticle } from "@/api/home";
import { briefing, supply, listResourcesCagetory, listEnterprise } from "@/api/business"
import NewsSwiper from "./newsSwiper.vue"
export default { export default {
components:{ NewsSwiper },
data() { data() {
return { return {
showCirc: false,
isHotList: [],
isRecommend: [],
supplyList: [],
cagetoryList: [],
enterpriseList: []
}; };
}, },
mounted(){
this.getArticleList()
this.getSupplyList()
this.getCagetoryList()
this.getEnterpriseList()
},
methods:{ methods:{
//
getArticleList(){
briefing().then((res)=>{
const articleList= res.data
this.isHotList = articleList.filter(item=> item.isHot == 1)
this.isRecommend = articleList.filter(item=> item.isRecommend == 1)
})
},
toArticleDetail(id){
uni.navigateTo({
url:"/pages/life/articleDetail/index?id=" + id
})
},
//
getSupplyList(){
supply().then((res)=>{
this.supplyList = res.data
})
},
//
getCagetoryList(){
listResourcesCagetory().then((res)=>{
this.cagetoryList = res.data
})
},
//
getEnterpriseList(){
listEnterprise().then((res)=>{
this.enterpriseList = res.data
this.showCirc = false
})
},
//
replaceClick(){
if(!this.showCirc){
this.showCirc = true;
this.getEnterpriseList()
}
},
// //
toSupplyHall(e){ toSupplyHall(e){
// let id = e.currentTarget.dataset.id;
uni.navigateTo({ uni.navigateTo({
url:"/pages/demandHall/supplyHall/index" url:"/pages/demandHall/supplyHall/index"
}) })
@ -176,9 +196,14 @@
}, },
// //
toDemoInvestment(e){ toDemoInvestment(e){
uni.navigateTo({ uni.showModal({
url:"/pages/demandHall/demoInvestment/index" title:'提示!',
content: '模块开发中,请等待...',
showCancel: false
}) })
// uni.navigateTo({
// url:"/pages/demandHall/demoInvestment/index"
// })
}, },
// //
toAuthentication(e){ toAuthentication(e){
@ -217,7 +242,7 @@
.search { .search {
margin-left: auto; margin-left: auto;
width: 132rpx; width: 132rpx;
height: 68rpx; height: 66rpx;
background: linear-gradient(39deg, #FF5100 0%, #FFA074 100%); background: linear-gradient(39deg, #FF5100 0%, #FFA074 100%);
border-radius: 8rpx; border-radius: 8rpx;
color: #fff; color: #fff;
@ -297,6 +322,15 @@
width: 134rpx; width: 134rpx;
height: 46rpx; height: 46rpx;
} }
@keyframes doCric{
0% {
transform: rotate(0deg);
}
100%{
transform: rotate(360deg);
}
}
.company-box { .company-box {
height: 380rpx; height: 380rpx;
@ -311,6 +345,7 @@
line-height: 26rpx; line-height: 26rpx;
color: #666666; color: #666666;
margin-left: auto; margin-left: auto;
} }
.update-icon image { .update-icon image {
@ -319,6 +354,9 @@
background: rgba(0, 0, 0, 0); background: rgba(0, 0, 0, 0);
margin-right: 10rpx; margin-right: 10rpx;
} }
.update-icon .circ{
animation: doCric 1s ease;
}
.scroll-view_H { .scroll-view_H {
width: 100%; width: 100%;
@ -370,6 +408,7 @@
} }
.title-s { .title-s {
height: 32rpx;
font-weight: 400; font-weight: 400;
color: #6E6E6E; color: #6E6E6E;
margin: 16rpx 0 10rpx 0; margin: 16rpx 0 10rpx 0;
@ -378,6 +417,7 @@
.company-logo { .company-logo {
width: 176rpx; width: 176rpx;
height: 128rpx; height: 128rpx;
border-radius: 8rpx;
} }
.todetails { .todetails {
@ -423,6 +463,7 @@
.service-nub-left image { .service-nub-left image {
width: 288rpx; width: 288rpx;
height: 162rpx; height: 162rpx;
border-radius: 8rpx;
} }
.service-nub-right { .service-nub-right {
@ -434,7 +475,7 @@
height: 128rpx; height: 128rpx;
background: #FFEFE8; background: #FFEFE8;
border-radius: 12rpx; border-radius: 12rpx;
padding: 18rpx 0 32rpx 0; padding: 18rpx 12rpx 32rpx;
} }
} }
} }

49
pages/demandHall/business/newsSwiper.vue

@ -0,0 +1,49 @@
<template>
<swiper
:autoplay="autoplay"
:interval="interval"
:circular="circular"
style="height: 34rpx;"
:duration="duration"
:vertical="true"
>
<swiper-item v-for="(item,i) in list" :key="i">
<view @click="toArticleDetail(item.id)">{{item.title}}</view>
</swiper-item>
</swiper>
</template>
<script>
export default{
props:{
list: {
type: Array,
default: []
},
duration: {
type: Number,
default: 1500
},
interval: {
type: Number,
default: 5000
},
circular: {
type: Boolean,
default: true
},
autoplay: {
type: Boolean,
default: true
},
},
methods:{
toArticleDetail(id){
this.$emit('toArticleDetail',id)
}
}
}
</script>
<style>
</style>

42
pages/demandHall/supplyHall/index.vue

@ -22,7 +22,7 @@
<view class="supplyHall-box"> <view class="supplyHall-box">
<view class="resource-box" v-if="active == 1"> <view class="resource-box" v-if="active == 1">
<!-- 个人 --> <!-- 个人 -->
<view class="personal-list" v-for="(item,index) in 2" :key="index"> <!-- <view class="personal-list" v-for="(item,index) in 2" :key="index">
<view :class="'tips-item ' + (item.enterpriseType == 2 ? 'bg2' : '' )"> <view :class="'tips-item ' + (item.enterpriseType == 2 ? 'bg2' : '' )">
{{item.enterpriseType == 1 ? '企业' : '个人'}} {{item.enterpriseType == 1 ? '企业' : '个人'}}
</view> </view>
@ -41,7 +41,7 @@
<view class="time-end">2021.8.30截止报名</view> <view class="time-end">2021.8.30截止报名</view>
</view> </view>
<view class="todetails">查看详情</view> <view class="todetails">查看详情</view>
</view> </view> -->
<!-- 企业 --> <!-- 企业 -->
<view class="enterprise-list" v-for="(item, index) in list" :key="index" @tap="toNeedsDetail" <view class="enterprise-list" v-for="(item, index) in list" :key="index" @tap="toNeedsDetail"
:data-id="item.id"> :data-id="item.id">
@ -65,6 +65,7 @@
<view class="todetails">查看详情</view> <view class="todetails">查看详情</view>
</view> </view>
<LoadStatus :loadStatus="loadStatus"></LoadStatus>
</view> </view>
<view class="company-box" v-if="active == 2"> <view class="company-box" v-if="active == 2">
<view class="personal-list"> <view class="personal-list">
@ -108,6 +109,7 @@
</view> </view>
<view class="todetails">查看详情</view> <view class="todetails">查看详情</view>
</view> </view>
<LoadStatus :loadStatus="loadStatus"></LoadStatus>
</view> </view>
</view> </view>
<view class="mask-box" v-if="showScreenDialog"> <view class="mask-box" v-if="showScreenDialog">
@ -142,7 +144,9 @@
<script> <script>
const app = getApp(); const app = getApp();
import LoadStatus from "@/components/LoadStatus.vue"
export default { export default {
components:{ LoadStatus },
data() { data() {
return { return {
active: '1', active: '1',
@ -160,8 +164,9 @@
list: [], list: [],
pageNumber: 0, pageNumber: 0,
pageSize: 5, pageSize: 10,
loading: true, loading: true,
loadStatus: '加载更多...'
} }
}, },
onShow: function() { onShow: function() {
@ -191,7 +196,6 @@
cagetoryActive: null, cagetoryActive: null,
resourceCagetoryId: '' resourceCagetoryId: ''
}); });
console.log(this.active)
this.getPageData(); this.getPageData();
}, },
@ -245,6 +249,7 @@
getPageData() { getPageData() {
if (this.loading) { if (this.loading) {
this.loadStatus = '正在加载中...'
app.http('post', `Resources/listResources?page=${this.pageNumber}&size=${this.pageSize}`, { app.http('post', `Resources/listResources?page=${this.pageNumber}&size=${this.pageSize}`, {
resourceType: this.active, resourceType: this.active,
resourceCagetoryId: this.resourceCagetoryId, resourceCagetoryId: this.resourceCagetoryId,
@ -252,22 +257,21 @@
}).then(res => { }).then(res => {
if (res.data.success) { if (res.data.success) {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
if (res.data.data.content.length < this.pageSize) { if (res.data.data.content.length < this.pageSize) {
this.setData({ this.loading = false;
loading: false this.loadStatus = '没有更多了...'
}); } else{
} this.loadStatus = '上拉加载更多...'
if (this.pageNumber > 0) {
this.setData({
list: this.list.concat(res.data.data.content)
});
} else {
this.setData({
list: res.data.data.content
});
} }
this.list = this.list.concat(res.data.data.content)
// if (this.pageNumber > 0) {
// this.list = this.list.concat(res.data.data.content)
// } else {
// this.setData({
// list: res.data.data.content
// });
// }
} }
}); });
} else { } else {
@ -312,7 +316,7 @@
.search { .search {
margin-left: auto; margin-left: auto;
width: 132rpx; width: 132rpx;
height: 68rpx; height: 64rpx;
background: linear-gradient(39deg, #FF5100 0%, #FFA074 100%); background: linear-gradient(39deg, #FF5100 0%, #FFA074 100%);
border-radius: 8rpx; border-radius: 8rpx;
color: #fff; color: #fff;

13
pages/life/articleList/index.vue

@ -32,14 +32,17 @@
</view> </view>
</view> </view>
</view> </view>
<LoadStatus :loadStatus="loadStatus"></LoadStatus>
<view class="loadStatus-box">{{loadStatus}}</view>
</view> </view>
</template> </template>
<script> <script>
import { getArticle } from "@/api/home"; import { getArticle } from "@/api/home";
import LoadStatus from '@/components/LoadStatus.vue'
export default{ export default{
components: {
LoadStatus
},
data(){ data(){
return{ return{
articleList: [], articleList: [],
@ -182,11 +185,5 @@
} }
} }
} }
.loadStatus-box{
text-align: center;
font-size: 28rpx;
color: #000;
padding: 30rpx 0;
}
} }
</style> </style>

10
pages/user/editNeeds/index.vue

@ -33,7 +33,7 @@
</view> </view>
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="label">补充内容/添加图片</view> <view class="label">补充内容/添加图片<text style="font-size: 20rpx; color: #666;">(建议图片尺寸200X116)</text></view>
<view class="upload-box acea-row"> <view class="upload-box acea-row">
<image v-for="(item, index) in form.resourceImgs" :key="index" :src="item" mode="aspectFill"></image> <image v-for="(item, index) in form.resourceImgs" :key="index" :src="item" mode="aspectFill"></image>
<image src="/static/images/upload.png" @tap="upImgs"></image> <image src="/static/images/upload.png" @tap="upImgs"></image>
@ -397,13 +397,13 @@ export default {
} }
.upload-box{ .upload-box{
width: 100%; width: 100%;
height: 140rpx; /* height: 140rpx; */
margin-top: 26rpx; margin-top: 26rpx;
} }
.upload-box image{ .upload-box image{
width: 140rpx; width: 216rpx;
height: 140rpx; height: 216rpx;
margin-right: 12rpx; margin-right: 22rpx;
} }
.tab-item{ .tab-item{

2
pages/user/index.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="home-page"> <view class="home-page">
<view class="page-top-box"> <view class="page-top-box">
<image src="/static/images/home/top-bg.png" class="top-bg"></image> <image src="https://download.cyjyyjy.com/top-bg.png" class="top-bg"></image>
<view class="page-title" :style="'top:' + menuTop + 'px;height:' + menuHeight + 'px;line-height: ' + menuHeight + 'px;'">禅易云生态</view> <view class="page-title" :style="'top:' + menuTop + 'px;height:' + menuHeight + 'px;line-height: ' + menuHeight + 'px;'">禅易云生态</view>
<view class="top-box-content" :style="'top: ' + (CustomBar + 10) + 'rpx;'"> <view class="top-box-content" :style="'top: ' + (CustomBar + 10) + 'rpx;'">
<view class="top-set-box acea-row row-between row-middle"> <view class="top-set-box acea-row row-between row-middle">

BIN
static/images/home/top-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

BIN
static/images/learnMore1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 839 KiB

BIN
static/images/learnMore2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 738 KiB

BIN
static/images/learnMore3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 714 KiB

BIN
static/images/learnMore4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 477 KiB

Loading…
Cancel
Save