页面优化

This commit is contained in:
itgaojian163 2025-02-08 17:25:58 +08:00
parent 706a8f069b
commit abfef279db
15 changed files with 71 additions and 40 deletions

View File

@ -51,7 +51,6 @@
}, },
"usingComponents": { "usingComponents": {
"page-loading": "/components/page-loading/page-loading", "page-loading": "/components/page-loading/page-loading",
"container-loading": "/components/container-loading/container-loading", "container-loading": "/components/container-loading/container-loading"
"mp-html": "/components/mp-html/index"
} }
} }

View File

@ -68,6 +68,22 @@ page::after {
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.mt-40 {
margin-top: 40rpx;
}
.mr-40 {
margin-right: 40rpx;
}
.ml-40 {
margin-left: 40rpx;
}
.mb-40 {
margin-bottom: 40rpx;
}
.mg { .mg {
margin: 10rpx; margin: 10rpx;
} }

View File

@ -1,4 +1,6 @@
{ {
"usingComponents": {}, "usingComponents": {
"mp-html": "/components/mp-html/index"
},
"navigationBarTitleText": "公司详情" "navigationBarTitleText": "公司详情"
} }

View File

@ -7,7 +7,7 @@
<view class="line-noappoint mt-20 desc-font-24" style="{{isAreaExpand?'-webkit-line-clamp: 0;':'-webkit-line-clamp: 4;'}}"> <view class="line-noappoint mt-20 desc-font-24" style="{{isAreaExpand?'-webkit-line-clamp: 0;':'-webkit-line-clamp: 4;'}}">
<rich-text nodes="{{domainInfo.newsContentContent}}"></rich-text> <rich-text nodes="{{domainInfo.newsContentContent}}"></rich-text>
</view> </view>
<view class="right-more-bg" bind:tap="areaShowAll"> <view class="right-more-bg mt-20" bind:tap="areaShowAll">
<view class="txt">{{isAreaExpand?'收取':'查看全部'}}</view> <view class="txt">{{isAreaExpand?'收取':'查看全部'}}</view>
<image class="icon" src="/imgs/ic_arrow_right_black.png" mode="aspectFill" style="transform: rotate({{isAreaExpand?-90:0}}deg);"></image> <image class="icon" src="/imgs/ic_arrow_right_black.png" mode="aspectFill" style="transform: rotate({{isAreaExpand?-90:0}}deg);"></image>
</view> </view>
@ -40,24 +40,24 @@
<text class="name">产业图谱</text> <text class="name">产业图谱</text>
</view> </view>
</view> </view>
<view style="width: 100%;">
<container-loading loadingState="{{platesLoading}}"> <container-loading loadingState="{{platesLoading}}">
<scroll-view id="plates" scroll-x="true" bindscroll="scrollPlates"> <view style="display: flex;flex-direction: column;max-width: 100%;">
<scroll-view id="plates" scroll-x="true" bindscroll="scrollPlates" enable-passive="true">
<view class="plates-content"> <view class="plates-content">
<block wx:for="{{platesList}}" wx:key="index"> <block wx:for="{{platesList}}" wx:key="index">
<view class="plates-item" bind:tap="goPlates" data-id="{{item.newsContentId}}"> <view class="plates-item" bind:tap="goPlates" data-id="{{item.newsContentId}}">
<image class="icon" src="{{imgBasePath}}{{item.newsContentCoverList[0].contentCoverId}}"></image> <image class="icon" src="{{imgBasePath}}{{item.newsContentCoverList[0].contentCoverId}}" mode="scaleToFill"></image>
<text class="txt line-1">{{item.newsContentTitle}}</text> <text class="txt line-1">{{item.newsContentTitle}}</text>
</view> </view>
</block> </block>
</view> </view>
</scroll-view> </scroll-view>
<view class="slider-bar-box mt-20"> <view class="slider-bar-box mt-40">
<view class="slider-bar" style="width: {{sliderWidth}}px;"></view> <view class="slider-bar" style="width: {{sliderWidth}}px;"></view>
</view> </view>
</container-loading> </view>
</view> </container-loading>
</view> </view>
<!-- 重点企业 --> <!-- 重点企业 -->
<view class="func-container mt-20"> <view class="func-container mt-20">
@ -67,7 +67,7 @@
<text class="name">重点企业</text> <text class="name">重点企业</text>
</view> </view>
</view> </view>
<container-loading loadingState="{{keyEnterpriseLoading}}"> <container-loading loadingState="{{keyEnterpriseLoading}}" class="mt-20">
<view style="width: 100%;"> <view style="width: 100%;">
<block wx:for="{{keyEnterpriseList}}" wx:key="index"> <block wx:for="{{keyEnterpriseList}}" wx:key="index">
<view class="enterprise-item" bind:tap="showCompany" data-id="{{item.id}}"> <view class="enterprise-item" bind:tap="showCompany" data-id="{{item.id}}">
@ -91,7 +91,7 @@
</view> </view>
</view> </view>
<container-loading loadingState="{{industryLoading}}"> <container-loading loadingState="{{industryLoading}}">
<view class="area-box mt-20"> <view class="area-box">
<block wx:for="{{industryAreaList}}" wx:key="index"> <block wx:for="{{industryAreaList}}" wx:key="index">
<view class="area-item" bind:tap="showGarden" data-id="{{item.newsContentId}}"> <view class="area-item" bind:tap="showGarden" data-id="{{item.newsContentId}}">
<image src="{{imgBasePath}}{{item.newsContentCoverList[0].contentCoverId}}" mode="aspectFill"></image> <image src="{{imgBasePath}}{{item.newsContentCoverList[0].contentCoverId}}" mode="aspectFill"></image>

View File

@ -45,7 +45,8 @@ Page({
investLoading: 'loading', investLoading: 'loading',
isLoading: true, isLoading: true,
showInvestLoading: 'loading', showInvestLoading: 'loading',
superiorityLoading: 'loading' superiorityLoading: 'loading',
statisticsLoading: 'loading'
}, },
onLoad(e) { onLoad(e) {
var _self = this var _self = this
@ -128,12 +129,17 @@ Page({
//数据统计 //数据统计
getStatistics() { getStatistics() {
var _self = this var _self = this
_self.setData({
statisticsLoading: 'loading'
})
IndexService.doGetStatistics({ IndexService.doGetStatistics({
year: _self.data.year year: _self.data.year
}) })
.then(res => { .then(res => {
_self.setData({
statisticsLoading: 'success'
})
if (res) { if (res) {
res.forEach(item => { res.forEach(item => {
var scale = item.value > 100 ? 100 : 1 var scale = item.value > 100 ? 100 : 1
item.progress = `${item.value}%` item.progress = `${item.value}%`
@ -146,7 +152,9 @@ Page({
}) })
} }
}, err => { }, err => {
console.log(err) _self.setData({
statisticsLoading: 'error'
})
wx.showToast({ wx.showToast({
icon: "none", icon: "none",
title: '网络错误(数据统计)', title: '网络错误(数据统计)',

View File

@ -2,7 +2,7 @@
<view class="body"> <view class="body">
<!-- 视频简介 --> <!-- 视频简介 -->
<view class="func-container"> <view class="func-container">
<video id="descVideo" class="desc-video" object-fit="fill" autoplay="{{false}}" src="{{descVideoUrl}}" poster="{{descVideoCover}}" /> <video id="descVideo" class="desc-video" object-fit="fill" auto-pause-if-navigate="{{true}}" autoplay="{{false}}" src="{{descVideoUrl}}" poster="{{descVideoCover}}" controls="{{true}}" enable-play-gesture="{{true}}" show-center-play-btn="{{true}}" />
<view class="desc-title mb-10">达拉特旗</view> <view class="desc-title mb-10">达拉特旗</view>
<view class="text-expansion mt-20"> <view class="text-expansion mt-20">
<view class="text-expansion__text {{ isExpand ? 'text-expansion__text--expand' : '' }}"> <view class="text-expansion__text {{ isExpand ? 'text-expansion__text--expand' : '' }}">
@ -37,17 +37,19 @@
<image class="statistics-term-arrow" src="../../imgs/ic_arrow_down_black.png"></image> <image class="statistics-term-arrow" src="../../imgs/ic_arrow_down_black.png"></image>
</view> </view>
</view> </view>
<view class="statistics-content-box"> <container-loading loadingState="{{statisticsLoading}}">
<block wx:for="{{statisticsList}}" wx:key="index"> <view class="statistics-content-box">
<view class="statistics-content-item"> <block wx:for="{{statisticsList}}" wx:key="index">
<text class="statistics-content-item-title">{{item.name}}</text> <view class="statistics-content-item">
<view class="statistics-content-item-content"> <text class="statistics-content-item-title">{{item.name}}</text>
<view class="progress" style="background-color:{{item.color}};width: {{item.progress}};"></view> <view class="statistics-content-item-content">
<view class="text" style="color:{{item.fontColor}};">{{item.value}}{{item.unit}}</view> <view class="progress" style="background-color:{{item.color}};width: {{item.progress}};"></view>
<view class="text" style="color:{{item.fontColor}};">{{item.value}}{{item.unit}}</view>
</view>
</view> </view>
</view> </block>
</block> </view>
</view> </container-loading>
</view> </view>
<!-- 投资环境 --> <!-- 投资环境 -->
<view class="func-container mt-20"> <view class="func-container mt-20">
@ -72,7 +74,7 @@
<rich-text nodes="{{investAreaBean.newsContentContent}}"></rich-text> <rich-text nodes="{{investAreaBean.newsContentContent}}"></rich-text>
</view> </view>
</view> </view>
<view class="right-more-bg" bind:tap="areaShowAll"> <view class="right-more-bg mt-20" bind:tap="areaShowAll">
<view class="txt">{{isAreaExpand?'收取':'查看全部'}}</view> <view class="txt">{{isAreaExpand?'收取':'查看全部'}}</view>
<image class="icon" src="/imgs/ic_arrow_right_black.png" mode="aspectFill" style="transform: rotate({{isAreaExpand?-90:0}}deg);"></image> <image class="icon" src="/imgs/ic_arrow_right_black.png" mode="aspectFill" style="transform: rotate({{isAreaExpand?-90:0}}deg);"></image>
</view> </view>
@ -86,7 +88,7 @@
<text class="name">投资优势</text> <text class="name">投资优势</text>
</view> </view>
<container-loading loadingState="{{superiorityLoading}}"> <container-loading loadingState="{{superiorityLoading}}">
<view style="display: flex;flex-direction: column;"> <view style="display: flex;flex-direction: column;max-width: 100%;">
<scroll-view id="plates" scroll-x="{{true}}" bindscroll="scrollPlates"> <scroll-view id="plates" scroll-x="{{true}}" bindscroll="scrollPlates">
<view class="superiority-content"> <view class="superiority-content">
<block wx:for="{{superiorityList}}" wx:key="index"> <block wx:for="{{superiorityList}}" wx:key="index">

View File

@ -192,7 +192,8 @@
line-height: 40rpx; line-height: 40rpx;
text-indent: 2em; text-indent: 2em;
} }
.invest-box{
.invest-box {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex: content; flex: content;
@ -405,7 +406,7 @@
.desc-tag-box { .desc-tag-box {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: flex-start; justify-content: space-between;
margin-top: 39rpx; margin-top: 39rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
@ -492,6 +493,7 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
border-radius: 10rpx; border-radius: 10rpx;
padding: 10rpx; padding: 10rpx;
width: 96%;
} }
.statistics-content-item { .statistics-content-item {

View File

@ -1,4 +1,4 @@
{ {
"usingComponents": {}, "usingComponents": {"mp-html":"/components/mp-html/index"},
"navigationBarTitleText": "详情" "navigationBarTitleText": "详情"
} }

View File

@ -1,4 +1,4 @@
{ {
"usingComponents": {}, "usingComponents": {"mp-html":"/components/mp-html/index"},
"navigationBarTitleText": "详情" "navigationBarTitleText": "详情"
} }

View File

@ -1,3 +1,5 @@
{ {
"usingComponents": {} "usingComponents": {
"mp-html": "/components/mp-html/index"
}
} }

View File

@ -1,3 +1,3 @@
{ {
"usingComponents": {} "usingComponents": {"mp-html":"/components/mp-html/index"}
} }

View File

@ -1,4 +1,4 @@
{ {
"usingComponents": {}, "usingComponents": {"mp-html":"/components/mp-html/index"},
"navigationBarTitleText": "详情" "navigationBarTitleText": "详情"
} }

View File

@ -1,4 +1,4 @@
{ {
"usingComponents": {}, "usingComponents": {"mp-html":"/components/mp-html/index"},
"navigationBarTitleText": "详情" "navigationBarTitleText": "详情"
} }

View File

@ -3,6 +3,7 @@
"projectname": "gov_propagandize", "projectname": "gov_propagandize",
"setting": { "setting": {
"compileHotReLoad": true, "compileHotReLoad": true,
"urlCheck": false "urlCheck": false,
"autoAudits": false
} }
} }

View File

@ -1,7 +1,6 @@
// 定义api服务地址 // 定义api服务地址
const baseUrl = 'https://www.xzszwhy.cn/daqi/app'; const baseUrl = 'https://www.xzszwhy.cn/daqi/app';
// const baseUrl = 'http://106.74.34.136:8084/daqi/app'; // const baseUrl = 'http://106.74.34.136:8084/daqi/app';
// https://8182018kg.goho.co/daqi/app/news-content/listpage?newsDirectoriesId=91a98b33-1133-4935-8c4c-9b37cc5fe63b&rows=1&page=1
/** /**
* 传入请求参数返回Promise支持链试调用 * 传入请求参数返回Promise支持链试调用
* @param url 请求地址 * @param url 请求地址