页面优化

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": {
"page-loading": "/components/page-loading/page-loading",
"container-loading": "/components/container-loading/container-loading",
"mp-html": "/components/mp-html/index"
"container-loading": "/components/container-loading/container-loading"
}
}

View File

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

View File

@ -1,4 +1,6 @@
{
"usingComponents": {},
"usingComponents": {
"mp-html": "/components/mp-html/index"
},
"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;'}}">
<rich-text nodes="{{domainInfo.newsContentContent}}"></rich-text>
</view>
<view class="right-more-bg" bind:tap="areaShowAll">
<view class="right-more-bg mt-20" bind:tap="areaShowAll">
<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>
</view>
@ -40,24 +40,24 @@
<text class="name">产业图谱</text>
</view>
</view>
<view style="width: 100%;">
<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">
<block wx:for="{{platesList}}" wx:key="index">
<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>
</view>
</block>
</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>
</container-loading>
</view>
</container-loading>
</view>
<!-- 重点企业 -->
<view class="func-container mt-20">
@ -67,7 +67,7 @@
<text class="name">重点企业</text>
</view>
</view>
<container-loading loadingState="{{keyEnterpriseLoading}}">
<container-loading loadingState="{{keyEnterpriseLoading}}" class="mt-20">
<view style="width: 100%;">
<block wx:for="{{keyEnterpriseList}}" wx:key="index">
<view class="enterprise-item" bind:tap="showCompany" data-id="{{item.id}}">
@ -91,7 +91,7 @@
</view>
</view>
<container-loading loadingState="{{industryLoading}}">
<view class="area-box mt-20">
<view class="area-box">
<block wx:for="{{industryAreaList}}" wx:key="index">
<view class="area-item" bind:tap="showGarden" data-id="{{item.newsContentId}}">
<image src="{{imgBasePath}}{{item.newsContentCoverList[0].contentCoverId}}" mode="aspectFill"></image>

View File

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

View File

@ -2,7 +2,7 @@
<view class="body">
<!-- 视频简介 -->
<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="text-expansion mt-20">
<view class="text-expansion__text {{ isExpand ? 'text-expansion__text--expand' : '' }}">
@ -37,6 +37,7 @@
<image class="statistics-term-arrow" src="../../imgs/ic_arrow_down_black.png"></image>
</view>
</view>
<container-loading loadingState="{{statisticsLoading}}">
<view class="statistics-content-box">
<block wx:for="{{statisticsList}}" wx:key="index">
<view class="statistics-content-item">
@ -48,6 +49,7 @@
</view>
</block>
</view>
</container-loading>
</view>
<!-- 投资环境 -->
<view class="func-container mt-20">
@ -72,7 +74,7 @@
<rich-text nodes="{{investAreaBean.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>
<image class="icon" src="/imgs/ic_arrow_right_black.png" mode="aspectFill" style="transform: rotate({{isAreaExpand?-90:0}}deg);"></image>
</view>
@ -86,7 +88,7 @@
<text class="name">投资优势</text>
</view>
<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">
<view class="superiority-content">
<block wx:for="{{superiorityList}}" wx:key="index">

View File

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

View File

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

View File

@ -1,4 +1,4 @@
{
"usingComponents": {},
"usingComponents": {"mp-html":"/components/mp-html/index"},
"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": "详情"
}

View File

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

View File

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

View File

@ -1,7 +1,6 @@
// 定义api服务地址
const baseUrl = 'https://www.xzszwhy.cn/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支持链试调用
* @param url 请求地址