首页,产业接口对接
This commit is contained in:
parent
7b4cf17bee
commit
8b80872379
1
app.js
1
app.js
@ -14,5 +14,6 @@ App({
|
|||||||
},
|
},
|
||||||
globalData: {
|
globalData: {
|
||||||
userInfo: null,
|
userInfo: null,
|
||||||
|
imgPath: 'http://106.74.34.136:8084/daqi/route/file/true/'
|
||||||
}
|
}
|
||||||
})
|
})
|
9
app.wxss
9
app.wxss
@ -187,6 +187,14 @@ page::after {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.line-2 {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 3;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.line-noappoint {
|
.line-noappoint {
|
||||||
@ -205,6 +213,7 @@ page::after {
|
|||||||
|
|
||||||
.body {
|
.body {
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.font-18 {
|
.font-18 {
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
// pages/domain/domain.js
|
// pages/domain/domain.js
|
||||||
|
const app = getApp();
|
||||||
|
import DomainService from '../../utils/api/domainApi';
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -12,6 +14,12 @@ Page({
|
|||||||
lastScrollLeft: 0,
|
lastScrollLeft: 0,
|
||||||
lastScrollTop: 0,
|
lastScrollTop: 0,
|
||||||
defaultSliderWidth: 10, //默认指示器宽度
|
defaultSliderWidth: 10, //默认指示器宽度
|
||||||
|
domainCategoryList: [], //特色产业
|
||||||
|
keyEnterpriseList: [], //重点企业
|
||||||
|
showPageLoading: true,
|
||||||
|
imgBasePath: app.globalData.imgPath,
|
||||||
|
domainInfo: {}, //产业基础
|
||||||
|
isAreaExpand: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -23,7 +31,18 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
screenWidth: screenWidth - 34
|
screenWidth: screenWidth - 34
|
||||||
})
|
})
|
||||||
|
var _self = this
|
||||||
|
//产业基础
|
||||||
|
_self.getDomainInfo()
|
||||||
|
//特色产业
|
||||||
|
_self.getDomainCategory()
|
||||||
|
//重点企业
|
||||||
|
_self.getKeyEnterprise()
|
||||||
|
setTimeout(() => {
|
||||||
|
_self.setData({
|
||||||
|
showPageLoading: false
|
||||||
|
})
|
||||||
|
}, 2000);
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
var _self = this
|
var _self = this
|
||||||
@ -43,6 +62,54 @@ Page({
|
|||||||
})
|
})
|
||||||
}, 5)
|
}, 5)
|
||||||
},
|
},
|
||||||
|
//产业基础
|
||||||
|
getDomainInfo() {
|
||||||
|
var _self = this
|
||||||
|
DomainService.doGetDomainInfo()
|
||||||
|
.then(res => {
|
||||||
|
if (res) {
|
||||||
|
_self.setData({
|
||||||
|
domainInfo: res.rows[0]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}, err => {
|
||||||
|
wx.showToast({
|
||||||
|
title: '网络错误(domainInfo)',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//特色产业
|
||||||
|
getDomainCategory() {
|
||||||
|
var _self = this
|
||||||
|
DomainService.doGetDomainCategory()
|
||||||
|
.then(res => {
|
||||||
|
if (res) {
|
||||||
|
_self.setData({
|
||||||
|
domainCategoryList: res
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}, err => {
|
||||||
|
wx.showToast({
|
||||||
|
title: '网络错误(domainCategory)',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//重点企业
|
||||||
|
getKeyEnterprise() {
|
||||||
|
var _self = this
|
||||||
|
DomainService.doGetKeyEnterprise()
|
||||||
|
.then(res => {
|
||||||
|
if (res) {
|
||||||
|
_self.setData({
|
||||||
|
keyEnterpriseList: res
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}, err => {
|
||||||
|
wx.showToast({
|
||||||
|
title: '网络错误(domainEnterprise)',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
//监听scroll-view滚动
|
//监听scroll-view滚动
|
||||||
scrollPlates(e) {
|
scrollPlates(e) {
|
||||||
var _self = this
|
var _self = this
|
||||||
@ -57,12 +124,32 @@ Page({
|
|||||||
lastScrollLeft: scrollLeft
|
lastScrollLeft: scrollLeft
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
areaShowAll() {
|
||||||
|
var _self = this
|
||||||
|
_self.setData({
|
||||||
|
isAreaExpand: !_self.data.isAreaExpand
|
||||||
|
})
|
||||||
|
},
|
||||||
//公司详情
|
//公司详情
|
||||||
showCompany() {
|
showCompany() {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/company/company',
|
url: '/pages/company/company',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
var _self = this
|
||||||
|
_self.setData({
|
||||||
|
showPageLoading: true
|
||||||
|
})
|
||||||
|
_self.getDomainCategory()
|
||||||
|
_self.getKeyEnterprise()
|
||||||
|
setTimeout(() => {
|
||||||
|
wx.stopPullDownRefresh()
|
||||||
|
_self.setData({
|
||||||
|
showPageLoading: false
|
||||||
|
})
|
||||||
|
}, 2000);
|
||||||
|
},
|
||||||
//园区详情
|
//园区详情
|
||||||
showGarden() {
|
showGarden() {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {}
|
"usingComponents": {},
|
||||||
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
@ -3,21 +3,13 @@
|
|||||||
<!-- 产业基础 -->
|
<!-- 产业基础 -->
|
||||||
<view class="func-container">
|
<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>
|
<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 class="desc-title">产业基础</view>
|
<view class="desc-title">{{domainInfo.newsContentTitle}}</view>
|
||||||
<view class="desc-content">达拉特旗位于内蒙古自治区南部,为鄂尔多斯市下辖的一个旗,北与包头市隔河相望,东南西分别与准格尔旗、东胜市、杭锦旗接壤,达拉特旗地处鄂尔多斯高原西部,黄河南岸。</view>
|
<view class="line-noappoint mt-20" style="{{isAreaExpand?'-webkit-line-clamp: 0;':'-webkit-line-clamp: 4;'}}">
|
||||||
<view class="desc-tag-box">
|
<rich-text nodes="{{domainInfo.newsContentContent}}"></rich-text>
|
||||||
<view class="desc-tag">
|
|
||||||
<image src="../../imgs/ic_desc_icon_1.png" />
|
|
||||||
<text>全旗总面积8200平方公里</text>
|
|
||||||
</view>
|
|
||||||
<view class="desc-tag">
|
|
||||||
<image src="../../imgs/ic_desc_icon_2.png" />
|
|
||||||
<text>辖8个苏木镇</text>
|
|
||||||
</view>
|
|
||||||
<view class="desc-tag">
|
|
||||||
<image src="../../imgs/ic_desc_icon_3.png" />
|
|
||||||
<text>总人口34万</text>
|
|
||||||
</view>
|
</view>
|
||||||
|
<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>
|
</view>
|
||||||
<!-- 特色产业 -->
|
<!-- 特色产业 -->
|
||||||
@ -29,35 +21,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="unique-items mb-20">
|
<view class="unique-items mb-20">
|
||||||
|
<block wx:for="{{domainCategoryList}}" wx:key="index">
|
||||||
<view class="unique-item">
|
<view class="unique-item">
|
||||||
<image src="/imgs/ic_desc_icon_3.png" />
|
<image src="{{imgBasePath}}{{item.directoriesPhoto}}" />
|
||||||
<text>新能源产业</text>
|
<text>{{item.directoriesName}}</text>
|
||||||
</view>
|
|
||||||
<view class="unique-item">
|
|
||||||
<image src="/imgs/ic_desc_icon_1.png" />
|
|
||||||
<text>新能源产业</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="unique-item">
|
|
||||||
<image src="/imgs/ic_desc_icon_1.png" />
|
|
||||||
<text>新能源产业</text>
|
|
||||||
</view>
|
|
||||||
<view class="unique-item">
|
|
||||||
<image src="/imgs/ic_desc_icon_1.png" />
|
|
||||||
<text>新能源产业</text>
|
|
||||||
</view>
|
|
||||||
<view class="unique-item">
|
|
||||||
<image src="/imgs/ic_desc_icon_1.png" />
|
|
||||||
<text>新能源产业</text>
|
|
||||||
</view>
|
|
||||||
<view class="unique-item">
|
|
||||||
<image src="/imgs/ic_desc_icon_1.png" />
|
|
||||||
<text>新能源产业</text>
|
|
||||||
</view>
|
|
||||||
<view class="unique-item">
|
|
||||||
<image src="/imgs/ic_desc_icon_1.png" />
|
|
||||||
<text>新能源产业</text>
|
|
||||||
</view>
|
</view>
|
||||||
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 产业图谱 -->
|
<!-- 产业图谱 -->
|
||||||
@ -132,30 +101,15 @@
|
|||||||
<text class="name">重点企业</text>
|
<text class="name">重点企业</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<block>
|
<block wx:for="{{keyEnterpriseList}}" wx:key="index">
|
||||||
<view class="enterprise-item" bind:tap="showCompany">
|
<view class="enterprise-item" bind:tap="showCompany">
|
||||||
<image class="icon" src="/imgs/ic_invest_icon.png" />
|
<image class="icon" src="{{imgBasePath}}{{item.photo}}" />
|
||||||
<view class="enterprise-content">
|
<view class="enterprise-content">
|
||||||
<text class="enterprise-name">企业名称</text>
|
<text class="enterprise-name">{{item.name}}</text>
|
||||||
<text class="enterprise-code">社会信用代码:11010202340</text>
|
<text class="enterprise-code">社会信用代码:{{item.number}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="divider-w"></view>
|
<view class="divider-w"></view>
|
||||||
<view class="enterprise-item">
|
|
||||||
<image class="icon" src="/imgs/ic_invest_icon.png" />
|
|
||||||
<view class="enterprise-content">
|
|
||||||
<text class="enterprise-name">企业名称</text>
|
|
||||||
<text class="enterprise-code">社会信用代码:11010202340</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="divider-w"></view>
|
|
||||||
<view class="enterprise-item">
|
|
||||||
<image class="icon" src="/imgs/ic_invest_icon.png" />
|
|
||||||
<view class="enterprise-content">
|
|
||||||
<text class="enterprise-name">企业名称</text>
|
|
||||||
<text class="enterprise-code">社会信用代码:11010202340</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<!-- 开发园区 -->
|
<!-- 开发园区 -->
|
||||||
@ -190,3 +144,4 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<page-loading wx:if="{{showPageLoading}}"></page-loading>
|
@ -87,10 +87,33 @@
|
|||||||
margin-top: 32rpx;
|
margin-top: 32rpx;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
border-radius: 5rpx;
|
border-radius: 8rpx;
|
||||||
width: calc((100% - 110px) / 4);
|
width: calc((100% - 110px) / 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
.unique-item image {
|
.unique-item image {
|
||||||
width: 66rpx;
|
width: 66rpx;
|
||||||
height: 66rpx;
|
height: 66rpx;
|
||||||
@ -214,6 +237,7 @@
|
|||||||
.enterprise-item .icon {
|
.enterprise-item .icon {
|
||||||
width: 92rpx;
|
width: 92rpx;
|
||||||
height: 92rpx;
|
height: 92rpx;
|
||||||
|
border-radius: 15rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.enterprise-content {
|
.enterprise-content {
|
||||||
|
@ -1,15 +1,11 @@
|
|||||||
import AuthService from '../../utils/api/testapi';
|
import IndexService from '../../utils/api/indexApi';
|
||||||
|
import utils from '../../utils/util';
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
var defaultAvatarUrl = '';
|
var defaultAvatarUrl = '';
|
||||||
const date = new Date()
|
const date = new Date()
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
progress1: '60%',
|
|
||||||
progress2: '80%',
|
|
||||||
progress3: '90%',
|
|
||||||
progress4: '40%',
|
|
||||||
curTab: 1,
|
|
||||||
isExpand: false, //简介展开和收起
|
isExpand: false, //简介展开和收起
|
||||||
collapseText: '收起',
|
collapseText: '收起',
|
||||||
expandText: '查看更多>>',
|
expandText: '查看更多>>',
|
||||||
@ -20,16 +16,6 @@ Page({
|
|||||||
tempYear: '',
|
tempYear: '',
|
||||||
yearValue: [0],
|
yearValue: [0],
|
||||||
showActionsheet: false,
|
showActionsheet: false,
|
||||||
motto: 'Hello World',
|
|
||||||
userInfo: {
|
|
||||||
avatarUrl: defaultAvatarUrl,
|
|
||||||
nickName: '',
|
|
||||||
},
|
|
||||||
hasUserInfo: false,
|
|
||||||
overtop: true, //是否显示收起和展开
|
|
||||||
canIUseGetUserProfile: wx.canIUse('getUserProfile'),
|
|
||||||
canIUseNicknameComp: wx.canIUse('input.type.nickname'),
|
|
||||||
triggered: false,
|
|
||||||
list: [],
|
list: [],
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
count: 1,
|
count: 1,
|
||||||
@ -45,21 +31,27 @@ Page({
|
|||||||
defaultSliderWidth: 20, //默认指示器宽度
|
defaultSliderWidth: 20, //默认指示器宽度
|
||||||
isShowDot: false, //是否显示指示器
|
isShowDot: false, //是否显示指示器
|
||||||
testList: [],
|
testList: [],
|
||||||
showPageLoading: true
|
showPageLoading: true,
|
||||||
|
descVideoUrl: '',
|
||||||
|
descVideoCover: '',
|
||||||
|
descContent: "",
|
||||||
|
statisticsList: [], //数据统计
|
||||||
|
investList: [], //投资机会
|
||||||
|
investAreaId: "b4945b87-fe05-4af3-8453-65451b3137a3", //投资环境
|
||||||
|
investAreaBean: null,
|
||||||
|
imgBasePath: app.globalData.imgPath,
|
||||||
|
superiorityList: [], //投资优势,
|
||||||
|
investAreaList: [], //投资环境List
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
this.setData({
|
var _self = this
|
||||||
list: this.data.list,
|
|
||||||
overtop: false
|
|
||||||
})
|
|
||||||
var temp = []
|
var temp = []
|
||||||
for (let i = 2010; i < 2041; i++) {
|
for (let i = 2010; i <= _self.data.year; i++) {
|
||||||
temp.push(i)
|
temp.push(i)
|
||||||
}
|
}
|
||||||
this.setData({
|
_self.setData({
|
||||||
years: temp
|
years: temp.reverse()
|
||||||
})
|
})
|
||||||
var _self = this
|
|
||||||
_self.setData({
|
_self.setData({
|
||||||
'yearValue[0]': _self.data.years.indexOf(_self.data.year)
|
'yearValue[0]': _self.data.years.indexOf(_self.data.year)
|
||||||
})
|
})
|
||||||
@ -83,7 +75,146 @@ Page({
|
|||||||
_self.setData({
|
_self.setData({
|
||||||
showPageLoading: false
|
showPageLoading: false
|
||||||
})
|
})
|
||||||
}, 5000);
|
}, 300);
|
||||||
|
//获取简介
|
||||||
|
this.getDescVideo()
|
||||||
|
//介绍
|
||||||
|
this.getDesc()
|
||||||
|
//数据统计
|
||||||
|
this.getStatistics()
|
||||||
|
//投资机会
|
||||||
|
this.getInvest()
|
||||||
|
//默认获取地区概况
|
||||||
|
this.getInvestAreaCategory()
|
||||||
|
//投资环境
|
||||||
|
this.getSuperiority()
|
||||||
|
},
|
||||||
|
//视频介绍
|
||||||
|
getDescVideo() {
|
||||||
|
var _self = this
|
||||||
|
IndexService.doGetDescVideo()
|
||||||
|
.then(res => {
|
||||||
|
console.log(res)
|
||||||
|
_self.setData({
|
||||||
|
descVideoUrl: _self.data.imgBasePath + res.rows[0].fileList[0].contentFileFileId,
|
||||||
|
descVideoCover: _self.data.imgBasePath + res.rows[0].fileList[0].contentFileCoverId
|
||||||
|
})
|
||||||
|
}, err => {
|
||||||
|
wx.showToast({
|
||||||
|
title: '网络错误(video)',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//简介
|
||||||
|
getDesc() {
|
||||||
|
var _self = this
|
||||||
|
IndexService.doGetDescInfo()
|
||||||
|
.then(res => {
|
||||||
|
if (res) {
|
||||||
|
_self.setData({
|
||||||
|
descContent: res.rows[0].newsContentContent
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}, err => {
|
||||||
|
console.log(err)
|
||||||
|
wx.showToast({
|
||||||
|
title: '网络错误(简介)',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//数据统计
|
||||||
|
getStatistics() {
|
||||||
|
var _self = this
|
||||||
|
IndexService.doGetStatistics({
|
||||||
|
year: _self.data.year
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (res) {
|
||||||
|
|
||||||
|
res.forEach(item => {
|
||||||
|
var scale = item.value > 100 ? 100 : 1
|
||||||
|
item.progress = `${item.value}%`
|
||||||
|
item.color = utils.randomLight()
|
||||||
|
item.fontColor = utils.randomDark()
|
||||||
|
});
|
||||||
|
|
||||||
|
_self.setData({
|
||||||
|
statisticsList: res
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}, err => {
|
||||||
|
console.log(err)
|
||||||
|
wx.showToast({
|
||||||
|
title: '网络错误(数据统计)',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//投资机会
|
||||||
|
getInvest() {
|
||||||
|
var _self = this
|
||||||
|
IndexService.doGetInvest()
|
||||||
|
.then(res => {
|
||||||
|
if (res) {
|
||||||
|
_self.setData({
|
||||||
|
investList: res
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}, err => {
|
||||||
|
wx.showToast({
|
||||||
|
title: '网络错误(投资机会)',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//地区概况,资源条件,气候条件,基础设施
|
||||||
|
getInvestArea(id) {
|
||||||
|
var _self = this
|
||||||
|
IndexService.doGetInvestArea({
|
||||||
|
newsDirectoriesId: id
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (res) {
|
||||||
|
_self.setData({
|
||||||
|
investAreaBean: res.rows[0]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}, err => {
|
||||||
|
wx.showToast({
|
||||||
|
title: '网络错误(InvestArea)',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getSuperiority() {
|
||||||
|
var _self = this
|
||||||
|
IndexService.doGetSuperiorityList()
|
||||||
|
.then(res => {
|
||||||
|
if (res) {
|
||||||
|
_self.setData({
|
||||||
|
superiorityList: res
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}, err => {
|
||||||
|
wx.showToast({
|
||||||
|
title: '网络错误(superiority)',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//获取投资环境分类
|
||||||
|
getInvestAreaCategory() {
|
||||||
|
var _self = this
|
||||||
|
IndexService.doGetInvestAreaCategory()
|
||||||
|
.then(res => {
|
||||||
|
if (res) {
|
||||||
|
_self.setData({
|
||||||
|
investAreaList: res
|
||||||
|
})
|
||||||
|
_self.getInvestArea(_self.data.investAreaId)
|
||||||
|
}
|
||||||
|
}, err => {
|
||||||
|
wx.showToast({
|
||||||
|
title: '网络错误(InvestCategory)',
|
||||||
|
})
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//计算滚动框的宽度
|
//计算滚动框的宽度
|
||||||
countWidth() {
|
countWidth() {
|
||||||
@ -124,6 +255,7 @@ Page({
|
|||||||
lastScrollLeft: offsetLeft
|
lastScrollLeft: offsetLeft
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//展开或收起简介
|
||||||
expandClick() {
|
expandClick() {
|
||||||
this.setData({
|
this.setData({
|
||||||
isExpand: !this.data.isExpand
|
isExpand: !this.data.isExpand
|
||||||
@ -131,11 +263,11 @@ Page({
|
|||||||
},
|
},
|
||||||
changeTab(e) {
|
changeTab(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
curTab: e.currentTarget.dataset.index
|
investAreaId: e.currentTarget.dataset.id
|
||||||
})
|
})
|
||||||
|
this.getInvestArea(this.data.investAreaId)
|
||||||
},
|
},
|
||||||
showYears() {
|
showYears() {
|
||||||
console.log('点击')
|
|
||||||
this.setData({
|
this.setData({
|
||||||
showActionsheet: !this.data.showActionsheet
|
showActionsheet: !this.data.showActionsheet
|
||||||
})
|
})
|
||||||
@ -151,6 +283,7 @@ Page({
|
|||||||
showActionsheet: !this.data.showActionsheet,
|
showActionsheet: !this.data.showActionsheet,
|
||||||
year: this.data.tempYear
|
year: this.data.tempYear
|
||||||
})
|
})
|
||||||
|
this.getStatistics()
|
||||||
},
|
},
|
||||||
//投资环境查看更多
|
//投资环境查看更多
|
||||||
areaShowAll() {
|
areaShowAll() {
|
||||||
@ -167,135 +300,10 @@ Page({
|
|||||||
tempYear: _self.data.years[index]
|
tempYear: _self.data.years[index]
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
doRefresh() {
|
|
||||||
var _self = this;
|
|
||||||
console.log('刷新中...')
|
|
||||||
setTimeout(() => {
|
|
||||||
var tempList = [];
|
|
||||||
for (var i = 0; i < 30; i++) {
|
|
||||||
tempList.push("ssss")
|
|
||||||
}
|
|
||||||
_self.setData({
|
|
||||||
list: tempList,
|
|
||||||
hasMore: true,
|
|
||||||
triggered: false
|
|
||||||
})
|
|
||||||
}, 3000);
|
|
||||||
},
|
|
||||||
onPageScroll(e) {
|
|
||||||
if (e.scrollTop < 10) {
|
|
||||||
this.setData({
|
|
||||||
opacity: 1
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.setData({
|
|
||||||
opacity: e.scrollTop / 100
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (e.scrollTop >= 130) {
|
|
||||||
this.setData({
|
|
||||||
isFixed: true
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.setData({
|
|
||||||
isFixed: false
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
doLoadMore() {
|
|
||||||
var _self = this;
|
|
||||||
if (_self.data.isLoading || !_self.data.hasMore) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
console.log('触底了')
|
|
||||||
_self.setData({
|
|
||||||
isLoading: true
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
var tempList = []
|
|
||||||
for (let i = 0; i < 20; i++) {
|
|
||||||
tempList.push(`新添加==${i}`)
|
|
||||||
}
|
|
||||||
var c = ++_self.data.count
|
|
||||||
console.log(`页面=${c}`)
|
|
||||||
_self.setData({
|
|
||||||
count: c,
|
|
||||||
hasMore: c < 3
|
|
||||||
})
|
|
||||||
_self.setData({
|
|
||||||
list: _self.data.list.concat(tempList),
|
|
||||||
isLoading: false
|
|
||||||
})
|
|
||||||
}, 3000);
|
|
||||||
},
|
|
||||||
bindViewTap() {
|
|
||||||
AuthService.login({
|
|
||||||
name: '223',
|
|
||||||
pwd: '1234'
|
|
||||||
})
|
|
||||||
.then(res => {
|
|
||||||
console.log(res)
|
|
||||||
}, err => {
|
|
||||||
console.log(err)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
onChooseAvatar(e) {
|
|
||||||
const {
|
|
||||||
avatarUrl
|
|
||||||
} = e.detail
|
|
||||||
const {
|
|
||||||
nickName
|
|
||||||
} = this.data.userInfo
|
|
||||||
this.setData({
|
|
||||||
"userInfo.avatarUrl": avatarUrl,
|
|
||||||
hasUserInfo: nickName && avatarUrl && avatarUrl !== defaultAvatarUrl,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
onInputChange(e) {
|
|
||||||
const nickName = e.detail.value
|
|
||||||
const {
|
|
||||||
avatarUrl
|
|
||||||
} = this.data.userInfo
|
|
||||||
this.setData({
|
|
||||||
"userInfo.nickName": nickName,
|
|
||||||
hasUserInfo: nickName && avatarUrl && avatarUrl !== defaultAvatarUrl,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getUserProfile(e) {
|
|
||||||
// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认,开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
|
|
||||||
wx.getUserProfile({
|
|
||||||
desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
|
||||||
success: (res) => {
|
|
||||||
console.log(res)
|
|
||||||
this.setData({
|
|
||||||
userInfo: res.userInfo,
|
|
||||||
hasUserInfo: true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
onTabClick(e) {
|
|
||||||
const index = e.detail.index
|
|
||||||
this.setData({
|
|
||||||
activeTab: index
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
onChange(e) {
|
|
||||||
const index = e.detail.index
|
|
||||||
this.setData({
|
|
||||||
activeTab: index
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleClick(e) {
|
|
||||||
wx.navigateTo({
|
|
||||||
url: './webview',
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//投资机会-全部
|
//投资机会-全部
|
||||||
showInvest() {
|
showInvest() {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/invest/invest',
|
url: '/pages/invest/invest',
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
})
|
})
|
@ -2,26 +2,26 @@
|
|||||||
<view class="body">
|
<view class="body">
|
||||||
<!-- 视频简介 -->
|
<!-- 视频简介 -->
|
||||||
<view class="func-container">
|
<view class="func-container">
|
||||||
<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" />
|
<video class="desc-video" object-fit="fill" custom-cache="{{false}}" src="{{descVideoUrl}}" poster="{{descVideoCover}}" />
|
||||||
<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' : '' }}">
|
||||||
<view class="text-expansion__button" bindtap="expandClick">{{ isExpand ? collapseText : expandText }}</view>
|
<view class="text-expansion__button" bindtap="expandClick">{{ isExpand ? collapseText : expandText }}</view>
|
||||||
在阳光洒落的清晨推开窗户微风轻拂脸颊带来丝丝凉意远处的山峦在晨雾中若隐若现仿佛一幅水墨画卷鸟儿在枝头欢唱似在诉说着生活的美好人们陆续走出家门开始新一天的忙碌街头巷尾弥漫着烟火气息生活的故事在这平凡又充满希望的日子里不断上演在阳光洒落的清晨推开窗户微风轻拂脸颊带来丝丝凉意远处的山峦在晨雾中若隐若现仿佛一幅水墨画卷鸟儿在枝头欢唱似在诉说着生活的美好人们陆续走出家门开始新一天的忙碌街头巷尾弥漫着烟火气息生活的故事在这平凡又充满希望的日子里不断上演在阳光洒落的清晨推开窗户微风轻拂脸颊带来丝丝凉意远处的山峦在晨雾中若隐若现仿佛一幅水墨画卷鸟儿在枝头欢唱似在诉说着生活的美好人们陆续走出家门开始新一天的忙碌街头巷尾弥漫着烟火气息生活的故事在这平凡又充满希望的日子里不断上演
|
<rich-text nodes="{{descContent}}"></rich-text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="desc-tag-box">
|
<view class="desc-tag-box">
|
||||||
<view class="desc-tag">
|
<view class="desc-tag">
|
||||||
<image src="../../imgs/ic_desc_icon_1.png" />
|
<image src="../../imgs/ic_desc_icon_1.png" />
|
||||||
<text>全旗总面积8200平方公里</text>
|
<text>总面积8188平方千米</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="desc-tag">
|
<view class="desc-tag">
|
||||||
<image src="../../imgs/ic_desc_icon_2.png" />
|
<image src="../../imgs/ic_desc_icon_2.png" />
|
||||||
<text>辖8个苏木镇</text>
|
<text>17个乡镇街道、苏木</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="desc-tag">
|
<view class="desc-tag">
|
||||||
<image src="../../imgs/ic_desc_icon_3.png" />
|
<image src="../../imgs/ic_desc_icon_3.png" />
|
||||||
<text>总人口34万</text>
|
<text>常住33.40万人</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -38,34 +38,15 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="statistics-content-box">
|
<view class="statistics-content-box">
|
||||||
|
<block wx:for="{{statisticsList}}" wx:key="index">
|
||||||
<view class="statistics-content-item">
|
<view class="statistics-content-item">
|
||||||
<text class="statistics-content-item-title">生产总值</text>
|
<text class="statistics-content-item-title">{{item.name}}</text>
|
||||||
<view class="statistics-content-item-content">
|
<view class="statistics-content-item-content">
|
||||||
<view class="progress" style="background-color: #FF5D5D;width: {{progress1}};"></view>
|
<view class="progress" style="background-color:{{item.color}};width: {{item.progress}};"></view>
|
||||||
<view class="text">14亿</view>
|
<view class="text" style="color:{{item.fontColor}};">{{item.value}}{{item.unit}}</view>
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="statistics-content-item">
|
|
||||||
<text class="statistics-content-item-title">工业总产值</text>
|
|
||||||
<view class="statistics-content-item-content">
|
|
||||||
<view class="progress" style="background-color: #FFBC5D;width: {{progress2}};"></view>
|
|
||||||
<view class="text" style="color: #B77920;">1亿</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="statistics-content-item">
|
|
||||||
<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;">1630.99万</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="statistics-content-item">
|
|
||||||
<text class="statistics-content-item-title">招商引资项目</text>
|
|
||||||
<view class="statistics-content-item-content">
|
|
||||||
<view class="progress" style="background-color:#5DFFF2;width: {{progress4}};"></view>
|
|
||||||
<view class="text" style="color:#24B9AD;">40个</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 投资环境 -->
|
<!-- 投资环境 -->
|
||||||
@ -74,28 +55,19 @@
|
|||||||
<image src="../../imgs/ic_invest_icon.png" class="icon" />
|
<image src="../../imgs/ic_invest_icon.png" class="icon" />
|
||||||
<text class="name">投资环境</text>
|
<text class="name">投资环境</text>
|
||||||
</view>
|
</view>
|
||||||
|
<scroll-view scroll-x="{{true}}" class="mt-20">
|
||||||
<view class="invest-tabs">
|
<view class="invest-tabs">
|
||||||
<view class="{{curTab==1? 'tab-select' :'tab-normal'}}" bind:tap="changeTab" data-index="1">
|
<block wx:for="{{investAreaList}}" wx:key="index">
|
||||||
<text>地区概况</text>
|
<view class="{{investAreaId==item.newsDirectoriesId? 'tab-select' :'tab-normal'}} item-margin" bind:tap="changeTab" data-id="{{item.newsDirectoriesId}}">
|
||||||
<image src="../../imgs/ic_arrow_down_circle.png" />
|
<text>{{item.directoriesName}}</text>
|
||||||
</view>
|
|
||||||
<view class="{{curTab==2? 'tab-select' :'tab-normal'}}" bind:tap="changeTab" data-index="2">
|
|
||||||
<text>资源条件</text>
|
|
||||||
<image src="../../imgs/ic_arrow_down_circle.png" />
|
|
||||||
</view>
|
|
||||||
<view class="{{curTab==3? 'tab-select' :'tab-normal'}}" bind:tap="changeTab" data-index="3">
|
|
||||||
<text>气候条件</text>
|
|
||||||
<image src="../../imgs/ic_arrow_down_circle.png" />
|
|
||||||
</view>
|
|
||||||
<view class="{{curTab==4? 'tab-select' :'tab-normal'}}" bind:tap="changeTab" data-index="4">
|
|
||||||
<text>基础设施</text>
|
|
||||||
<image src="../../imgs/ic_arrow_down_circle.png" />
|
<image src="../../imgs/ic_arrow_down_circle.png" />
|
||||||
</view>
|
</view>
|
||||||
|
</block>
|
||||||
</view>
|
</view>
|
||||||
|
</scroll-view>
|
||||||
<view class="invest-content">
|
<view class="invest-content">
|
||||||
<image style="width: 100%;height: 300rpx;" src="../../imgs/ic_data_bg.png" />
|
<view class="line-noappoint mt-20" style="{{isAreaExpand?'-webkit-line-clamp: 0;':'-webkit-line-clamp: 4;'}}">
|
||||||
<view class="line-noappoint mt-20" style="{{isAreaExpand?'-webkit-line-clamp: 0;':'-webkit-line-clamp: 3;'}}">
|
<rich-text nodes="{{investAreaBean.newsContentContent}}"></rich-text>
|
||||||
<text>总占地面积约100亩,总建筑面积约7万平方米。建设内容包括加工车间、展示营销中心、道路建设、地下室、人防、给排水管网、电力通信等,吸引全县小商品、总占地面积约100亩,总建筑面积约7万平方米。建设内容包括加工车间、展示营销中心、道路建设、地下室、人防、给排水管网、电力通信等,吸引全县小商品、小商品、总占地面积约100亩,总建筑面积约7万平方米。建设内容包括加工车间、展示营销中心、道路建设、地下室、人防、给排水管网、电力通信等,吸引全县小商品、</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right-more-bg" bind:tap="areaShowAll">
|
<view class="right-more-bg" bind:tap="areaShowAll">
|
||||||
@ -111,10 +83,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<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="{{testList}}" wx:key="index">
|
<block wx:for="{{superiorityList}}" wx:key="index">
|
||||||
<view class="superiority-item">
|
<view class="superiority-item">
|
||||||
<image class="superiory-icon" src="/imgs/ic_data_bg.png"></image>
|
<image class="superiory-icon" src="{{imgBasePath}}{{item.directoriesPhoto}}"></image>
|
||||||
<text class="superiory-txt">电子信息</text>
|
<text class="superiory-txt">{{item.directoriesName}}</text>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
@ -130,39 +102,39 @@
|
|||||||
<image class="icon" src="/imgs/ic_chance_title_icon.png" />
|
<image class="icon" src="/imgs/ic_chance_title_icon.png" />
|
||||||
<text class="name">投资机会</text>
|
<text class="name">投资机会</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="more" bind:tap="showInvest">
|
<!-- <view class="more" bind:tap="showInvest">
|
||||||
<view>查看全部</view>
|
<view>查看全部</view>
|
||||||
<image class="icon" src="/imgs/ic_arrow_right_black.png"></image>
|
<image class="icon" src="/imgs/ic_arrow_right_black.png"></image>
|
||||||
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<block wx:for="{{investList}}" wx:key="index">
|
||||||
<block>
|
|
||||||
<view class="chance-item-box">
|
<view class="chance-item-box">
|
||||||
<view class="chance-item-title">
|
<view class="chance-item-title">
|
||||||
<view class="title">达拉特旗小商品小食品加工园建设项目</view>
|
<view class="title">{{item.title}}</view>
|
||||||
<view class="more">查看详情 ></view>
|
<view class="more">查看详情 ></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="chance-item-content line-3">
|
<view class="chance-item-content line-3">
|
||||||
总占地面积约100亩,总建筑面积约7万平方米。建设内容包括加工车间、展示营销中心、道路建设、地下室、人防、给排水管网、电力通信等,吸引全县小商品、总占地面积约100亩,总建筑面积约7万平方米。建设内容包括加工车间、展示营销中心、道路建设、地下室、人防、给排水管网、电力通信等,吸引全县小商品、小商品、总占地面积约100亩,总建筑面积约7万平方米。建设内容包括加工车间、展示营销中心、道路建设、地下室、人防、给排水管网、电力通信等,吸引全县小商品、 总占地面积约100亩,总建筑面积约7万平方米。建设内容包括加工车间、展示营销中心、道路建设、地下室、人防、给排水管网、电力通信等,吸引全县小商品、总占地面积约100亩,总建筑面积约7万平方米。建设内容包括加工车间、展示营销中心、道路建设、地下室、人防、给排水管网、电力通信等,吸引全县小商品、小商品、总占地面积约100亩,总建筑面积约7万平方米。建设内容包括加工车间、展示营销中心、道路建设、地下室、人防、给排水管网、电力通信等,吸引全县小商品、
|
<rich-text nodes="{{item.content}}"></rich-text>
|
||||||
</view>
|
</view>
|
||||||
<view class="chance-item-attrs">
|
<view class="chance-item-attrs">
|
||||||
<view class="chance-attr">
|
<view class="chance-attr">
|
||||||
<text class="title">预计总投资</text>
|
<text class="title">预计总投资</text>
|
||||||
<text class="content">5000万元</text>
|
<text class="content">{{item.money}}{{item.moneyUnit}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="divide-line"></view>
|
<view class="divide-line"></view>
|
||||||
<view class="chance-attr">
|
<view class="chance-attr">
|
||||||
<text class="title">所属产业</text>
|
<text class="title">所属产业</text>
|
||||||
<text class="content">生物产业</text>
|
<text class="content">{{item.type}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="divide-line"></view>
|
<view class="divide-line"></view>
|
||||||
<view class="chance-attr">
|
<view class="chance-attr">
|
||||||
<text class="title">占地面积</text>
|
<text class="title">占地面积</text>
|
||||||
<text class="content">1亩</text>
|
<text class="content">{{item.area}}{{item.areaUnit}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="divide-line"></view>
|
<view class="divide-line"></view>
|
||||||
<view class="chance-attr">
|
<view class="chance-attr">
|
||||||
<text class="title">用地类型</text>
|
<text class="title">用地类型</text>
|
||||||
<text class="content">商业用地</text>
|
<text class="content">{{item.landType}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
color: #6F6F6F;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
max-height: calc(3em * 1.5);
|
max-height: calc(3em * 1.5);
|
||||||
}
|
}
|
||||||
@ -131,24 +132,29 @@
|
|||||||
.invest-tabs {
|
.invest-tabs {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
flex-wrap: nowrap;
|
||||||
margin-top: 20rpx;
|
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-select {
|
.item-margin {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-margin:nth-of-type(n+2) {
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-select {
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
color: white;
|
color: white;
|
||||||
font-family: Source Han Sans CN;
|
|
||||||
background-color: #256742;
|
background-color: #256742;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background: #256742;
|
background: #256742;
|
||||||
border-radius: 17rpx;
|
border-radius: 17rpx;
|
||||||
padding: 5rpx 15rpx;
|
padding: 5rpx 15rpx;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-select image {
|
.tab-select image {
|
||||||
@ -159,17 +165,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tab-normal {
|
.tab-normal {
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
color: #3F3F3F;
|
color: #3F3F3F;
|
||||||
font-family: Source Han Sans CN;
|
|
||||||
background: #EAEAEA;
|
background: #EAEAEA;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-radius: 17rpx;
|
border-radius: 17rpx;
|
||||||
padding: 5rpx 30rpx;
|
padding: 5rpx 30rpx;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-normal image {
|
.tab-normal image {
|
||||||
@ -303,6 +305,10 @@
|
|||||||
border-radius: 5rpx;
|
border-radius: 5rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.chance-item-box:nth-of-type(n+2) {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.chance-item-title {
|
.chance-item-title {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
@ -378,7 +384,7 @@
|
|||||||
|
|
||||||
.desc-video {
|
.desc-video {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 315rpx;
|
height: 370rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
23
utils/api/domainApi.js
Normal file
23
utils/api/domainApi.js
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import {
|
||||||
|
request
|
||||||
|
} from "../http";
|
||||||
|
|
||||||
|
// 管理地址
|
||||||
|
const apiPath = {
|
||||||
|
domainCategory: "/news-directories/list?directoriesParentId=b04b4dc3-020a-4a9f-a567-464d27f70b19", //特色产业
|
||||||
|
keyEnterprise: "/query/sql/q2984a0f", //重点企业
|
||||||
|
domainInfo: "/news-content/listpage?newsDirectoriesId=2c76e2a0-37b2-4144-9d92-64376e5a22c3", //产业基础
|
||||||
|
}
|
||||||
|
class DomainService {
|
||||||
|
static doGetDomainCategory() {
|
||||||
|
return request(apiPath.domainCategory, "GET")
|
||||||
|
}
|
||||||
|
static doGetKeyEnterprise() {
|
||||||
|
return request(apiPath.keyEnterprise, "GET")
|
||||||
|
}
|
||||||
|
static doGetDomainInfo() {
|
||||||
|
return request(apiPath.domainInfo, "GET")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default DomainService;
|
42
utils/api/indexApi.js
Normal file
42
utils/api/indexApi.js
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
import {
|
||||||
|
request
|
||||||
|
} from "../http";
|
||||||
|
|
||||||
|
// 管理地址
|
||||||
|
const apiPath = {
|
||||||
|
descVideo: "/news-content/listpage?newsDirectoriesId=9532d411-15c5-4c9c-8d73-e9f68a482702",
|
||||||
|
descInfo: "/news-content/listpage?newsDirectoriesId=91a98b33-1133-4935-8c4c-9b37cc5fe63b&rows=1&page=1",
|
||||||
|
statistics: "/query/sql/q9ce6963",
|
||||||
|
invest: "/query/sql/q428ea76",
|
||||||
|
investAreaInfo: "/news-content/listpage?rows=1&page=1", //地区概况 //资源条件 //气候条件 //基础设施
|
||||||
|
categoryList: "/news-directories/list", //投资优势 投资环境
|
||||||
|
}
|
||||||
|
class IndexService {
|
||||||
|
static doGetDescVideo() {
|
||||||
|
return request(apiPath.descVideo, "GET")
|
||||||
|
}
|
||||||
|
static doGetDescInfo() {
|
||||||
|
return request(apiPath.descInfo, "GET")
|
||||||
|
}
|
||||||
|
static doGetStatistics(data) {
|
||||||
|
return request(apiPath.statistics, "GET", data)
|
||||||
|
}
|
||||||
|
static doGetInvest() {
|
||||||
|
return request(apiPath.invest, "GET")
|
||||||
|
}
|
||||||
|
static doGetInvestArea(data) {
|
||||||
|
return request(apiPath.investAreaInfo, "GET", data)
|
||||||
|
}
|
||||||
|
static doGetSuperiorityList() {
|
||||||
|
return request(apiPath.categoryList, "GET", {
|
||||||
|
directoriesParentId: 'c7fa126e-1fa7-4cdb-b13a-2afb2f7b48e9'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
static doGetInvestAreaCategory() {
|
||||||
|
return request(apiPath.categoryList, "GET", {
|
||||||
|
directoriesParentId: 'd3ba3ff5-6d9e-4aed-9331-73e50b5ac598'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default IndexService;
|
@ -1,6 +1,6 @@
|
|||||||
// 定义api服务地址
|
// 定义api服务地址
|
||||||
const baseUrl = 'http://dev.com:12345';
|
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 请求地址
|
||||||
@ -23,10 +23,10 @@ function request(url, method = "GET", data = {}, params = {}) {
|
|||||||
// if (params) {
|
// if (params) {
|
||||||
// url += "?" + urlEncode(params)
|
// url += "?" + urlEncode(params)
|
||||||
// }
|
// }
|
||||||
wx.showLoading({
|
// wx.showLoading({
|
||||||
title: '加载中...',
|
// title: '加载中...',
|
||||||
mask: true //显示蒙层
|
// mask: true //显示蒙层
|
||||||
})
|
// })
|
||||||
wx.request({
|
wx.request({
|
||||||
url: baseUrl + url,
|
url: baseUrl + url,
|
||||||
timeout: 8000,
|
timeout: 8000,
|
||||||
@ -35,24 +35,24 @@ function request(url, method = "GET", data = {}, params = {}) {
|
|||||||
dataType: "json", // 微信官方文档中介绍会对数据进行一次JSON.parse
|
dataType: "json", // 微信官方文档中介绍会对数据进行一次JSON.parse
|
||||||
header,
|
header,
|
||||||
success(res) {
|
success(res) {
|
||||||
wx.hideLoading();
|
// wx.hideLoading();
|
||||||
console.log(res);
|
|
||||||
// HTTP状态码为200才视为成功
|
// HTTP状态码为200才视为成功
|
||||||
if (res.statusCode === 200) {
|
if (res.statusCode === 200) {
|
||||||
// 真正的数据响应体中还有一层success字段判断业务状态,按实际情况处理
|
// 真正的数据响应体中还有一层success字段判断业务状态,按实际情况处理
|
||||||
if (res.data.success) {
|
resolve(res.data)
|
||||||
resolve(res.data.result)
|
// if (res.data.success) {
|
||||||
} else {
|
// resolve(res.data.result)
|
||||||
// 业务判断错误
|
// } else {
|
||||||
reject(res)
|
// // 业务判断错误
|
||||||
}
|
// reject(res)
|
||||||
|
// }
|
||||||
} else {
|
} else {
|
||||||
// wx.request的特性,只要有响应就会走success回调,所以在这里判断状态,非200的均视为请求失败
|
// wx.request的特性,只要有响应就会走success回调,所以在这里判断状态,非200的均视为请求失败
|
||||||
reject(res)
|
reject(res)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
wx.hideLoading();
|
// wx.hideLoading();
|
||||||
// 断网、服务器挂了都会fail回调,直接reject即可
|
// 断网、服务器挂了都会fail回调,直接reject即可
|
||||||
reject(err)
|
reject(err)
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,61 @@ const formatNumber = n => {
|
|||||||
return n[1] ? n : '0' + n
|
return n[1] ? n : '0' + n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//随机生成暖色系
|
||||||
|
const randomLightColor = () => {
|
||||||
|
// 暖色系的范围通常是红色和黄色较多,所以红色分量范围从 128 到 255
|
||||||
|
let red = Math.floor(Math.random() * 128) + 128;
|
||||||
|
// 绿色分量范围从 64 到 255
|
||||||
|
let green = Math.floor(Math.random() * 192) + 64;
|
||||||
|
// 蓝色分量范围从 0 到 128
|
||||||
|
let blue = Math.floor(Math.random() * 128);
|
||||||
|
|
||||||
|
// 将十进制的 RGB 分量转换为十六进制,并确保长度为 2 位
|
||||||
|
let redHex = red.toString(16).padStart(2, '0');
|
||||||
|
let greenHex = green.toString(16).padStart(2, '0');
|
||||||
|
let blueHex = blue.toString(16).padStart(2, '0');
|
||||||
|
|
||||||
|
// 组合成十六进制颜色代码
|
||||||
|
return '#' + redHex + greenHex + blueHex;
|
||||||
|
}
|
||||||
|
//随机生成冷色系
|
||||||
|
const randomDarkColor = () => {
|
||||||
|
// 冷色系通常蓝色和绿色较多,所以蓝色分量范围从 128 到 255
|
||||||
|
let blue = Math.floor(Math.random() * 128) + 128;
|
||||||
|
// 绿色分量范围从 128 到 255
|
||||||
|
let green = Math.floor(Math.random() * 128) + 128;
|
||||||
|
// 红色分量范围从 0 到 128
|
||||||
|
let red = Math.floor(Math.random() * 128);
|
||||||
|
|
||||||
|
// 将十进制的 RGB 分量转换为十六进制,并确保长度为 2 位
|
||||||
|
let redHex = red.toString(16).padStart(2, '0');
|
||||||
|
let greenHex = green.toString(16).padStart(2, '0');
|
||||||
|
let blueHex = blue.toString(16).padStart(2, '0');
|
||||||
|
|
||||||
|
// 组合成十六进制颜色代码
|
||||||
|
return '#' + redHex + greenHex + blueHex;
|
||||||
|
}
|
||||||
|
|
||||||
|
const randomRgbColor = () => { // 随机生成RGB颜色
|
||||||
|
var r = Math.floor(Math.random() * 256); // 随机生成256以内r值
|
||||||
|
var g = Math.floor(Math.random() * 256); // 随机生成256以内g值
|
||||||
|
var b = Math.floor(Math.random() * 256); // 随机生成256以内b值
|
||||||
|
return `rgb(${r},${g},${b})`; // 返回rgb(r,g,b)格式颜色
|
||||||
|
}
|
||||||
|
const randomRgbaColor = () => { // 随机生成RGBA颜色
|
||||||
|
var r = Math.floor(Math.random() * 256); // 随机生成256以内r值
|
||||||
|
var g = Math.floor(Math.random() * 256); // 随机生成256以内g值
|
||||||
|
var b = Math.floor(Math.random() * 256); // 随机生成256以内b值
|
||||||
|
var alpha = Math.random(); // 随机生成1以内a值
|
||||||
|
return `rgba(${r},${g},${b},${alpha})`; // 返回rgba(r,g,b,a)格式颜色
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
formatTime: formatTime,
|
formatTime: formatTime,
|
||||||
formatDate: formatDate
|
formatDate: formatDate,
|
||||||
|
randomRgb: randomRgbColor,
|
||||||
|
randomRgba: randomRgbaColor,
|
||||||
|
randomDark: randomDarkColor,
|
||||||
|
randomLight: randomLightColor
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user