This commit is contained in:
itgaojian163 2025-01-18 17:57:49 +08:00
parent c8bbac8c0f
commit 7b4cf17bee
18 changed files with 516 additions and 72 deletions

View File

@ -42,5 +42,8 @@
"lazyCodeLoading": "requiredComponents",
"useExtendedLib": {
"weui": true
},
"usingComponents": {
"page-loading": "/components/page-loading/page-loading"
}
}

View File

@ -8,6 +8,14 @@ page {
display: flex;
flex-direction: column;
justify-content: flex-start;
overflow: hidden;
}
::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
}
page::after {
@ -36,6 +44,7 @@ page::after {
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
overflow: scroll;
}
.mt-10 {
@ -105,7 +114,7 @@ page::after {
.func-title-box .name {
font-family: Source Han Sans CN;
font-weight: bold;
font-size: 24rpx;
font-size: 26rpx;
color: #303030;
margin-left: 20rpx;
text-align: center;
@ -179,8 +188,41 @@ page::after {
}
.line-noappoint {
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
width: 100%;
}
.expand-btn {
float: right;
background-color: chartreuse;
margin-top: 100rpx;
}
.body {
overflow: scroll;
}
.font-18 {
font-size: 18rpx;
}
.font-20 {
font-size: 20rpx;
}
.font-24 {
font-size: 24rpx;
}
.font-40 {
font-size: 40rpx;
}
.font-30 {
font-size: 30rpx;
}

View File

@ -0,0 +1,40 @@
Component({
properties: {
show: {
type: Boolean,
value: false
},
//背景颜色
background: {
type: String,
value: '#fff'
},
//圆角
radius: {
type: Number,
optionalTypes: [String],
value: 24
},
zIndex: {
type: Number,
optionalTypes: [String],
value: 1001
},
//点击遮罩 是否可关闭
maskClosable: {
type: Boolean,
value: true
},
maskBackground: {
type: String,
value: 'rgba(0,0,0,.6)'
}
},
methods: {
handleClose(e) {
if (!this.data.maskClosable) return;
this.triggerEvent('close', {});
},
stop(e) {}
}
})

View File

@ -0,0 +1,3 @@
{
"component": true
}

View File

@ -0,0 +1,5 @@
<view class="fui-bottom__popup-wrap {{show?'fui-bottom__popwrap-show':''}}" style="z-index:{{zIndex}};background:{{maskBackground}}" catchtap="handleClose" catchtouchmove="stop">
<view class="fui-bottom__popup {{show?'fui-bottom__popup-show':''}}" style="border-top-left-radius:{{radius}}rpx;border-top-right-radius:{{radius}}rpx;background:{{background}}" catchtap="stop">
<slot></slot>
</view>
</view>

View File

@ -0,0 +1,36 @@
.fui-bottom__popup-wrap {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 1001;
display: flex;
flex-direction: row;
align-items: flex-end;
justify-content: center;
transition: all ease-in-out .2s;
visibility: hidden;
opacity: 0;
overflow: hidden;
}
.fui-bottom__popwrap-show {
opacity: 1;
visibility: visible;
}
.fui-bottom__popup {
width: 100%;
transform: translate3d(0, 100%, 0);
transition: all 0.3s ease-in-out;
min-height: 20rpx;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
flex: 1;
overflow: hidden;
}
.fui-bottom__popup-show {
transform: translate3d(0, 0, 0);
}

View File

@ -0,0 +1,24 @@
// components/page-loading/page-loading.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})

View File

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@ -0,0 +1,4 @@
<!--components/page-loading/page-loading.wxml-->
<view class="page-body">
<view class="loading"></view>
</view>

View File

@ -0,0 +1,53 @@
/* components/page-loading/page-loading.wxss */
.page-body {
width: 100vw;
height: 100vh;
background-color: rgba(255, 255, 255, 1);
height: 100%;
width: 100%;
position: fixed;
z-index: 1;
margin-top: 0px;
top: 0px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.loading {
position: relative;
width: 50px;
}
.loading:before,
.loading:after {
position: absolute;
width: 20px;
height: 20px;
content: "";
animation: jumping 0.5s infinite alternate;
background: rgba(0, 0, 0, 0);
}
.loading:before {
left: 0;
}
.loading:after {
right: 0;
animation-delay: 0.15s;
}
@keyframes jumping {
0% {
transform: scale(1) translateY(0px) rotateX(0deg);
box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}
100% {
transform: scale(1.2) translateY(-25px) rotateX(45deg);
background: #256742;
box-shadow: 0 25px 40px #256742;
}
}

View File

@ -1,5 +1,5 @@
<!--pages/domain/domain.wxml-->
<view>
<view class="body">
<!-- 产业基础 -->
<view class="func-container">
<image class="desc-video" src="https://ts1.cn.mm.bing.net/th/id/R-C.9e45a633e95179a37c907fa2797999ad?rik=aMuPS4TunAh5ZA&riu=http%3a%2f%2fwww.quazero.com%2fuploads%2fallimg%2f140303%2f1-140303214Q2.jpg&ehk=P%2firfYpARc1fHht%2bWpapYR4W15p6SLABE8CBexoeon4%3d&risl=&pid=ImgRaw&r=0"></image>

View File

@ -16,13 +16,12 @@
}
.desc-content {
width: 683rpx;
height: 99rpx;
font-family: Source Han Sans CN;
font-weight: 400;
font-size: 20rpx;
font-size: 22rpx;
color: #6F6F6F;
margin-top: 33rpx;
text-indent: 2em;
}
.desc-tag-box {

View File

@ -1,19 +1,24 @@
var app = getApp();
var defaultAvatarUrl = '';
import AuthService from '../../utils/api/testapi';
const app = getApp();
var defaultAvatarUrl = '';
const date = new Date()
Page({
data: {
progress1: '60%',
progress2: '80%',
progress3: '30%',
progress3: '90%',
progress4: '40%',
curTab: 1,
isExpand: false, //简介展开和收起
collapseText: '收起',
expandText: '查看更多>>',
years,
isAreaExpand: false, //投资环境展开和收起
isShowAreaExpand: false, //是否显示投资环境展开收起
years: [],
year: date.getFullYear(),
tempYear: '',
yearValue: [0],
showActionsheet: false,
motto: 'Hello World',
userInfo: {
@ -31,40 +36,94 @@ Page({
hasMore: true,
isFixed: false,
opacity: 1,
tabs: [{
title: '测试1'
}, {
title: '测试2'
}, {
title: '测试3'
}, {
title: '测试4'
}, {
title: '测试5'
}, {
title: '测试6'
}, {
title: '测试7'
}, {
title: '测试8'
}, {
title: '测试9'
}, {
title: '测试10'
}],
activeTab: 0
activeTab: 0,
indicatorWidth: 0,
scrollWidth: 0, //滚动视图的总宽度
screenWidth: 0, //屏幕宽度
sliderWidth: 20, //指示器宽度
lastScrollLeft: 0,
defaultSliderWidth: 20, //默认指示器宽度
isShowDot: false, //是否显示指示器
testList: [],
showPageLoading: true
},
onLoad(e) {
for (var i = 0; i < 80; i++) {
this.data.list.push(`ssss==${i}`)
}
this.setData({
list: this.data.list,
overtop: false
})
var temp = []
for (let i = 2010; i < 2041; i++) {
temp.push(i)
}
this.setData({
years: temp
})
var _self = this
_self.setData({
'yearValue[0]': _self.data.years.indexOf(_self.data.year)
})
//屏幕宽度
var window = wx.getWindowInfo()
var screenWidth = window.screenWidth
this.setData({
screenWidth: screenWidth - 34
})
setTimeout(() => {
var temp = []
for (let i = 0; i < 10; i++) {
temp.push(i)
}
_self.setData({
testList: temp
})
_self.countWidth()
}, 2000);
setTimeout(() => {
_self.setData({
showPageLoading: false
})
}, 5000);
},
//计算滚动框的宽度
countWidth() {
var _self = this
//计算滑动区域宽度
setTimeout(_ => {
const query = wx.createSelectorQuery().in(this)
query.selectAll('.superiority-item').boundingClientRect()
query.exec(res => {
let width = 0
let count = 0
if (res) {
res[0].forEach(x => {
width += x.width
})
count = res[0].length - 1
}
//总长度 //剩余宽度
var totalWidth = count * 10 + width
_self.setData({
isShowDot: (totalWidth / 343) > 1
})
var surplus = totalWidth - 343
_self.setData({
scrollWidth: surplus
})
})
}, 5)
},
//监听scroll-view滚动
scrollPlates(e) {
var _self = this
var offsetLeft = e.detail.scrollLeft
var scale = _self.data.scrollWidth / 20 //缩放比例
var offsetX = offsetLeft / scale
_self.setData({
sliderWidth: _self.data.defaultSliderWidth + offsetX,
lastScrollLeft: offsetLeft
})
},
expandClick() {
this.setData({
isExpand: !this.data.isExpand
@ -75,6 +134,39 @@ Page({
curTab: e.currentTarget.dataset.index
})
},
showYears() {
console.log('点击')
this.setData({
showActionsheet: !this.data.showActionsheet
})
},
closeSheet() {
this.setData({
showActionsheet: !this.data.showActionsheet
})
},
//选中日期
confirmSheet() {
this.setData({
showActionsheet: !this.data.showActionsheet,
year: this.data.tempYear
})
},
//投资环境查看更多
areaShowAll() {
var _self = this
_self.setData({
isAreaExpand: !_self.data.isAreaExpand
})
console.log(_self.data.isAreaExpand)
},
bindChange(e) {
var _self = this
var index = e.detail.value[0]
_self.setData({
tempYear: _self.data.years[index]
})
},
doRefresh() {
var _self = this;
console.log('刷新中...')

View File

@ -1,6 +1,7 @@
{
"usingComponents": {
"mp-loading": "weui-miniprogram/loading/loading",
"mp-actionSheet": "weui-miniprogram/actionsheet/actionsheet"
"mp-actionSheet": "weui-miniprogram/actionsheet/actionsheet",
"bottom-sheet": "/components/fui-bottom-popup/fui-bottom-popup"
}
}

View File

@ -1,13 +1,13 @@
<!--index.wxml-->
<view>
<view class="body">
<!-- 视频简介 -->
<view class="func-container">
<video class="desc-video" controls="false" />
<view class="desc-title">达拉特旗</view>
<video class="desc-video" autoplay="{{true}}" object-fit="fill" custom-cache="{{false}}" src="https://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400" />
<view class="desc-title mb-10">达拉特旗</view>
<view class="text-expansion mt-20">
<view class="text-expansion__text {{ isExpand ? 'text-expansion__text--expand' : '' }}">
<view class="text-expansion__button" bindtap="expandClick">{{ isExpand ? collapseText : expandText }}</view>
达拉特旗位于内蒙古自治区南部,为鄂尔多斯市下辖的一个旗,北与包头市隔河相望,东南西分别与准格尔旗、东胜市、杭锦旗接壤,达拉特旗地处鄂尔多斯高原西部,黄河南岸。达拉特旗位于内蒙古自治区南部达拉特旗位于内蒙古自治区南部,为鄂尔多斯市下辖的一个旗,北与包头市隔河相望,东南西分别与准格尔旗、东胜市、杭锦旗接壤,达拉特旗地处鄂尔多斯高原西部,黄河南岸。达拉特旗位于内蒙古自治区南部达拉特旗位于内蒙古自治区南部,为鄂尔多斯市下辖的一个旗,北与包头市隔河相望,东南西分别与准格尔旗、东胜市、杭锦旗接壤,达拉特旗地处鄂尔多斯高原西部,黄河南岸。达拉特旗位于内蒙古自治区南部
在阳光洒落的清晨推开窗户微风轻拂脸颊带来丝丝凉意远处的山峦在晨雾中若隐若现仿佛一幅水墨画卷鸟儿在枝头欢唱似在诉说着生活的美好人们陆续走出家门开始新一天的忙碌街头巷尾弥漫着烟火气息生活的故事在这平凡又充满希望的日子里不断上演在阳光洒落的清晨推开窗户微风轻拂脸颊带来丝丝凉意远处的山峦在晨雾中若隐若现仿佛一幅水墨画卷鸟儿在枝头欢唱似在诉说着生活的美好人们陆续走出家门开始新一天的忙碌街头巷尾弥漫着烟火气息生活的故事在这平凡又充满希望的日子里不断上演在阳光洒落的清晨推开窗户微风轻拂脸颊带来丝丝凉意远处的山峦在晨雾中若隐若现仿佛一幅水墨画卷鸟儿在枝头欢唱似在诉说着生活的美好人们陆续走出家门开始新一天的忙碌街头巷尾弥漫着烟火气息生活的故事在这平凡又充满希望的日子里不断上演
</view>
</view>
<view class="desc-tag-box">
@ -32,8 +32,8 @@
<image class="icon" src="../../imgs/ic_statistics_icon.png" />
<text class="name">数据统计</text>
</view>
<view class="statistics-term">
<text>2024</text>
<view class="statistics-term" bind:tap="showYears">
<text>{{year}}</text>
<image class="statistics-term-arrow" src="../../imgs/ic_arrow_down_black.png"></image>
</view>
</view>
@ -56,7 +56,7 @@
<text class="statistics-content-item-title">固定资产投资</text>
<view class="statistics-content-item-content">
<view class="progress" style="background-color: #5DADFF;width: {{progress3}};"></view>
<view class="text" style="color: #2C76C2;">99亿</view>
<view class="text" style="color: #2C76C2;">1630.99万</view>
</view>
</view>
<view class="statistics-content-item">
@ -94,24 +94,33 @@
</view>
<view class="invest-content">
<image style="width: 100%;height: 300rpx;" src="../../imgs/ic_data_bg.png" />
<view>文字介绍</view>
<view class="line-noappoint mt-20" style="{{isAreaExpand?'-webkit-line-clamp: 0;':'-webkit-line-clamp: 3;'}}">
<text>总占地面积约100亩总建筑面积约7万平方米。建设内容包括加工车间、展示营销中心、道路建设、地下室、人防、给排水管网、电力通信等吸引全县小商品、总占地面积约100亩总建筑面积约7万平方米。建设内容包括加工车间、展示营销中心、道路建设、地下室、人防、给排水管网、电力通信等吸引全县小商品、小商品、总占地面积约100亩总建筑面积约7万平方米。建设内容包括加工车间、展示营销中心、道路建设、地下室、人防、给排水管网、电力通信等吸引全县小商品、</text>
</view>
</view>
<view class="more">
<image class="icon" src="/imgs/ic_arrow_right_black.png"></image>
<view class="right-more-bg" 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>
</view>
<!-- 投资优势 -->
<view class="func-container mt-20">
<view class="func-title-box">
<view class="func-title-box mb-20">
<image src="/imgs/ic_superiority_title.png" class="icon" />
<text class="name">投资优势</text>
</view>
<view class="superiority-content">
<image src="/imgs/ic_desc_icon_3.png" />
<image src="/imgs/ic_desc_icon_3.png" />
<image src="/imgs/ic_desc_icon_3.png" />
<image src="/imgs/ic_desc_icon_3.png" />
<image src="/imgs/ic_desc_icon_3.png" />
<scroll-view id="plates" scroll-x="{{true}}" bindscroll="scrollPlates">
<view class="superiority-content">
<block wx:for="{{testList}}" wx:key="index">
<view class="superiority-item">
<image class="superiory-icon" src="/imgs/ic_data_bg.png"></image>
<text class="superiory-txt">电子信息</text>
</view>
</block>
</view>
</scroll-view>
<view class="slider-bar-box mt-20" wx:if="{{isShowDot}}">
<view class="slider-bar" style="width: {{sliderWidth}}px;"></view>
</view>
</view>
<!-- 投资机会 -->
@ -161,10 +170,17 @@
</view>
</view>
<mp-actionSheet bindactiontap="btnClick" show="{{showActionsheet}}" title="这是一个标题,可以为一行或者两行。">
<picker-view style="width: 100%; height: 300px;" value="{{value}}" bindchange="bindChange">
<bottom-sheet show="{{showActionsheet}}" bind:close="closeSheet">
<view class="sheet-title-box">
<view class="cancel" bind:tap="closeSheet">取消</view>
<view class="title">选择日期</view>
<view class="confirm" bind:tap="confirmSheet">确定</view>
</view>
<picker-view class="picker" value="{{yearValue}}" bindchange="bindChange">
<picker-view-column>
<view wx:for="{{years}}" style="line-height: 30px">{{item}}年</view>
<view wx:for="{{years}}" wx:key="index" class="picker-item" data-i="{{item}}">{{item}}年</view>
</picker-view-column>
</picker-view>
</mp-actionSheet>
</bottom-sheet>
<page-loading wx:if="{{showPageLoading}}"></page-loading>

View File

@ -8,7 +8,7 @@
position: relative;
overflow: hidden;
line-height: 1.5;
font-size: 20rpx;
font-size: 24rpx;
text-align: justify;
max-height: calc(3em * 1.5);
}
@ -31,7 +31,7 @@
.text-expansion__button {
position: relative;
font-size: 16rpx;
font-size: 20rpx;
color: #256742;
float: right;
font-weight: 400;
@ -84,6 +84,42 @@
}
.superiority-item {
display: flex;
flex-direction: column;
position: relative;
}
.superiority-item:nth-of-type(n+2) {
margin-left: 20rpx;
}
.superiory-txt {
position: absolute;
bottom: 0;
background: rgba(0, 0, 0, 0.49);
width: 100%;
text-align: center;
font-size: 20rpx;
color: white;
border-bottom-left-radius: 10rpx;
border-bottom-right-radius: 10rpx;
}
.superiory-icon {
width: 257rpx;
height: 167rpx;
border-radius: 10rpx;
}
.scrollX-nowrap {
width: 100vw;
flex-wrap: nowrap;
white-space: nowrap;
}
.invest-title {
display: flex;
@ -148,17 +184,71 @@
flex-direction: column;
justify-content: center;
margin-top: 20rpx;
font-weight: 400;
font-size: 24rpx;
color: #303030;
line-height: 40rpx;
text-indent: 2em;
}
.slider-bar-box {
width: 40px;
height: 5px;
background-color: #CDCDCD;
border-radius: 2.5px;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
align-self: center;
}
.slider-bar {
height: 5px;
background-color: #256742;
border-radius: 2.5px;
}
.desc-title {
margin-top: 39rpx;
font-family: JiangChengYueHuTi600W;
font-weight: 400;
font-size: 40rpx;
color: #303030;
line-height: 27rpx;
}
.sheet-title-box {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 20rpx 40rpx;
}
.picker {
width: 100vw;
height: 300rpx;
}
.picker-item {
line-height: 30px;
text-align: center;
}
.title {
font-size: 35rpx;
}
.cancel {
font-size: 30rpx;
color: crimson;
}
.confirm {
font-size: 30rpx;
color: #256742;
}
/* .superiority-title-box {
display: flex;
flex-direction: row;
@ -181,13 +271,13 @@
.superiority-content {
display: flex;
flex-direction: row;
margin-top: 20rpx;
flex-wrap: nowrap;
min-height: 120rpx;
}
.superiority-content image {
.superiority-content .item {
width: 150rpx;
height: 150rpx;
margin: 15rpx;
}
.chance-title-box {
@ -302,21 +392,26 @@
.desc-tag-box {
display: flex;
flex-direction: row;
justify-content: space-between;
justify-content: flex-start;
margin-top: 39rpx;
margin-bottom: 30rpx;
}
.desc-tag {
background: rgba(41, 176, 98, 0.08);
border-radius: 13rpx;
padding: 15rpx 10rpx;
padding: 15rpx 20rpx;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.desc-tag:nth-of-type(n+2) {
margin-left: 20rpx;
}
.desc-tag image {
width: 28rpx;
height: 28rpx;
@ -360,7 +455,7 @@
justify-content: center;
align-items: center;
color: black;
font-size: 20rpx;
font-size: 24rpx;
width: 130rpx;
text-align: center;
height: 45rpx;
@ -398,11 +493,11 @@
.statistics-content-item-title {
flex: 0.3;
text-align: end;
font-size: 20rpx;
font-size: 24rpx;
}
.statistics-content-item-content {
flex: 0.7;
flex: 0.8;
margin-left: 20rpx;
font-size: 20rpx;
height: 30rpx;
@ -414,6 +509,7 @@
align-items: center;
border-radius: 6rpx;
padding: 0rpx 5rpx;
position: relative;
}
.statistics-content-item-content .progress {
@ -422,13 +518,39 @@
}
.statistics-content-item-content .text {
width: 54rpx;
font-family: FZZhengHeiS-EB-GB;
font-size: 24rpx;
color: #CB3232;
font-style: italic;
text-align: end;
margin-right: 5rpx;
font-weight: bold;
position: absolute;
right: 0px;
}
.right-more-bg {
background: #E7E7E7;
font-weight: 500;
align-self: flex-end;
display: flex;
flex-direction: row;
justify-content: center;
padding: 5rpx 10rpx;
border-radius: 15rpx;
align-items: center;
}
.right-more-bg .icon {
width: 20rpx;
height: 20rpx;
margin-left: 5rpx;
}
.right-more-bg .txt {
font-size: 16rpx;
color: #256742;
text-align: center;
}
.statistics-box {

View File

@ -1,5 +1,5 @@
<!--pages/invest/invest.wxml-->
<view>
<view class="body">
<scroll-view scroll-x class="scroll-tab-box">
<view class="tabs-container">
<view class="{{curTab==1?'tab-sel':'tab-normal'}}" data-itemId="1" bind:tap="changeTab">全部</view>

View File

@ -1,5 +1,5 @@
<!--pages/policy/policy.wxml-->
<view>
<view class="body">
<!-- 搜索框 -->
<view class="search-box">
<image src="/imgs/ic_search_icon.png"></image>