接口对接完成
This commit is contained in:
parent
8b80872379
commit
1746305c7e
7
app.json
7
app.json
@ -5,7 +5,12 @@
|
||||
"pages/policy/policy",
|
||||
"pages/invest/invest",
|
||||
"pages/company/company",
|
||||
"pages/garden/garden"
|
||||
"pages/garden/garden",
|
||||
"pages/superiority-detail/superiority-detail",
|
||||
"pages/invest-detail/invest-detail",
|
||||
"pages/unique-detail/unique-detail",
|
||||
"pages/plates/plates",
|
||||
"pages/policy-detail/policy-detail"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTextStyle": "black",
|
||||
|
18
app.wxss
18
app.wxss
@ -38,13 +38,10 @@ page::after {
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100vw;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.mt-10 {
|
||||
@ -84,6 +81,7 @@ page::after {
|
||||
width: 90%;
|
||||
height: 3rpx;
|
||||
background-color: #F0F0F0;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.divider-v-100 {
|
||||
@ -195,6 +193,14 @@ page::after {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.line-1 {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.line-noappoint {
|
||||
@ -234,4 +240,10 @@ page::after {
|
||||
|
||||
.font-30 {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.news-content {
|
||||
padding: 42rpx;
|
||||
font-size: 28rpx;
|
||||
color: #242424;
|
||||
}
|
24
components/content-loading/loading.js
Normal file
24
components/content-loading/loading.js
Normal file
@ -0,0 +1,24 @@
|
||||
// components/content-loading/loading.js
|
||||
Component({
|
||||
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
|
||||
}
|
||||
})
|
4
components/content-loading/loading.json
Normal file
4
components/content-loading/loading.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
4
components/content-loading/loading.wxml
Normal file
4
components/content-loading/loading.wxml
Normal file
@ -0,0 +1,4 @@
|
||||
<!--components/page-loading/page-loading.wxml-->
|
||||
<view class="page-body">
|
||||
<view class="loading"></view>
|
||||
</view>
|
52
components/content-loading/loading.wxss
Normal file
52
components/content-loading/loading.wxss
Normal file
@ -0,0 +1,52 @@
|
||||
/* components/content-loading/loading.wxss */
|
||||
/* components/page-loading/page-loading.wxss */
|
||||
.page-body {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
@ -1,66 +1,58 @@
|
||||
// pages/company/company.js
|
||||
import DomainService from '../../utils/api/domainApi';
|
||||
import utils from '../../utils/util'
|
||||
const app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
bean: {}, //详情
|
||||
showPageLoading: true
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
var id = options.id
|
||||
if (id) {
|
||||
this.getDetail(id)
|
||||
} else {
|
||||
wx.navigateBack()
|
||||
}
|
||||
},
|
||||
getDetail(id) {
|
||||
var _self = this
|
||||
DomainService.doGetKeyEnterprise({
|
||||
id: id
|
||||
})
|
||||
.then(res => {
|
||||
if (res.guDongList && res.guDongList.length > 0) {
|
||||
res.guDongList.forEach(item => {
|
||||
item.surname = item.name.substr(0, 1)
|
||||
})
|
||||
}
|
||||
if (res) {
|
||||
res.content = utils.formatHtml(res.content)
|
||||
_self.setData({
|
||||
bean: res
|
||||
})
|
||||
}
|
||||
}, err => {
|
||||
wx.showToast({
|
||||
icon: 'none',
|
||||
title: '网络错误(company)',
|
||||
})
|
||||
})
|
||||
},
|
||||
callPhone() {
|
||||
var _self = this
|
||||
if (_self.data.bean.lianXi.phone) {
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: _self.data.bean.lianXi.phone,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
@ -1,29 +1,29 @@
|
||||
<!--pages/company/company.wxml-->
|
||||
<view class="func-container" style="padding: 45rpx;">
|
||||
<view class="company-name-box">
|
||||
<text class="name">内蒙古好友发科技有限公司</text>
|
||||
<view class="status">状态</view>
|
||||
<text class="name">{{bean.name}}</text>
|
||||
<view class="status">存续</view>
|
||||
</view>
|
||||
<view class="company-tag-box">
|
||||
<!-- <view class="company-tag-box">
|
||||
<text class="tag">实力指数:</text>
|
||||
<view class="tag-num">⭐⭐⭐⭐⭐⭐</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="divider-v-100" style="margin: 20rpx 0rpx;"></view>
|
||||
<view class="company-info-title">
|
||||
<text class="name">工商信息</text>
|
||||
<view class="more">
|
||||
<!-- <view class="more">
|
||||
<text>全部</text>
|
||||
<image src="/imgs/ic_arrow_right_black.png" style="width: 27rpx;height: 27rpx;"></image>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="info-box">
|
||||
<view class="info-item">
|
||||
<view class="title">企业法人</view>
|
||||
<view class="content">企业法人</view>
|
||||
<view class="content">{{bean.faRen}}</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="title">注册资本</view>
|
||||
<view class="content">10000万</view>
|
||||
<view class="content">{{bean.ziBen}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-box">
|
||||
@ -33,7 +33,7 @@
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="title">成立日期</view>
|
||||
<view class="content">2024-23-23</view>
|
||||
<view class="content">{{bean.chengLi}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-box">
|
||||
@ -43,59 +43,43 @@
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="title">注册地址</view>
|
||||
<view class="content">内蒙古呼和浩特市</view>
|
||||
<view class="content">{{bean.zhuCeDiZhi}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="p-tabs">
|
||||
<view class="p-tab-sel">股东信息</view>
|
||||
<view class="p-tab-normal" style="margin-left: 50rpx;">主要人员</view>
|
||||
<!-- <view class="p-tab-normal" style="margin-left: 50rpx;">主要人员</view> -->
|
||||
</view>
|
||||
<scroll-view scroll-x style="margin-top: 20rpx;">
|
||||
<view class="scroll-container">
|
||||
<block>
|
||||
<block wx:for="{{bean.guDongList}}" wx:key="index">
|
||||
<view class="scroll-item">
|
||||
<view class="name">
|
||||
<view class="squ-name">姓</view>
|
||||
<view class="squ-full">姓名</view>
|
||||
<view class="squ-name">{{item.surname}}</view>
|
||||
<view class="squ-full line-1">{{item.name}}</view>
|
||||
</view>
|
||||
<view class="credit">
|
||||
<view class="cre-name">认缴出资额:</view>
|
||||
<view class="cre-content">999.99万人名币</view>
|
||||
<view class="cre-content">{{item.chuZi}}</view>
|
||||
</view>
|
||||
<view class="scale">
|
||||
<view class="sca-name">持股比例:</view>
|
||||
<view class="sca-content">99.99%</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="scroll-item">
|
||||
<view class="name">
|
||||
<view class="squ-name">姓</view>
|
||||
<view class="squ-full">姓名</view>
|
||||
</view>
|
||||
<view class="credit">
|
||||
<view class="cre-name">认缴出资额:</view>
|
||||
<view class="cre-content">999.99万人名币</view>
|
||||
</view>
|
||||
<view class="scale">
|
||||
<view class="sca-name">持股比例:</view>
|
||||
<view class="sca-content">99.99%</view>
|
||||
<view class="sca-content">{{item.biLi}}%</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="desc-title">企业介绍</view>
|
||||
<view class="desc-content">
|
||||
<image src="/imgs/ic_data_bg.png" style="height: 100rpx;"></image>
|
||||
<view>企业简介</view>
|
||||
<view>企业简介</view>
|
||||
<view>企业简介</view>
|
||||
<view>企业简介</view>
|
||||
<view>企业简介</view>
|
||||
<view class="full-btn">
|
||||
<image class="icon" src="/imgs/ic_phone_white_icon.png"></image>
|
||||
<text class="txt">联系我们</text>
|
||||
</view>
|
||||
<view class="desc-content mt-20">
|
||||
<rich-text nodes="{{bean.content}}"></rich-text>
|
||||
</view>
|
||||
<view class="desc-title">联系方式</view>
|
||||
<view class="mt-20">地址:{{bean.lianXi.name}}</view>
|
||||
<view class="mt-10">电话:{{bean.lianXi.phone}}</view>
|
||||
<view class="full-btn mt-20" bind:tap="callPhone">
|
||||
<image class="icon" src="/imgs/ic_phone_white_icon.png"></image>
|
||||
<text class="txt">联系我们</text>
|
||||
</view>
|
||||
</view>
|
@ -95,6 +95,10 @@ page {
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
flex: 1;
|
||||
width: 50%;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.info-item .title {
|
||||
@ -255,9 +259,9 @@ page {
|
||||
|
||||
.desc-title {
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 27rpx;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #303030;
|
||||
line-height: 27rpx;
|
||||
line-height: 32rpx;
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
}
|
@ -20,6 +20,8 @@ Page({
|
||||
imgBasePath: app.globalData.imgPath,
|
||||
domainInfo: {}, //产业基础
|
||||
isAreaExpand: false,
|
||||
industryAreaList: [], //产业园区
|
||||
platesList: [], //产业图谱
|
||||
},
|
||||
|
||||
/**
|
||||
@ -36,15 +38,20 @@ Page({
|
||||
_self.getDomainInfo()
|
||||
//特色产业
|
||||
_self.getDomainCategory()
|
||||
//产业图谱
|
||||
_self.getPlates()
|
||||
//重点企业
|
||||
_self.getKeyEnterprise()
|
||||
//产业园区
|
||||
_self.getIndustryArea()
|
||||
|
||||
setTimeout(() => {
|
||||
_self.setData({
|
||||
showPageLoading: false
|
||||
})
|
||||
}, 2000);
|
||||
},
|
||||
onReady() {
|
||||
countWidth() {
|
||||
var _self = this
|
||||
setTimeout(_ => {
|
||||
const query = wx.createSelectorQuery().in(this)
|
||||
@ -74,6 +81,7 @@ Page({
|
||||
}
|
||||
}, err => {
|
||||
wx.showToast({
|
||||
icon: "none",
|
||||
title: '网络错误(domainInfo)',
|
||||
})
|
||||
})
|
||||
@ -90,10 +98,41 @@ Page({
|
||||
}
|
||||
}, err => {
|
||||
wx.showToast({
|
||||
icon: "none",
|
||||
title: '网络错误(domainCategory)',
|
||||
})
|
||||
})
|
||||
},
|
||||
//特色产业详情
|
||||
goUniqueDetail(e) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/unique-detail/unique-detail?id=' + e.currentTarget.dataset.id,
|
||||
})
|
||||
},
|
||||
//产业图谱
|
||||
getPlates() {
|
||||
var _self = this
|
||||
DomainService.doGetPlates()
|
||||
.then(res => {
|
||||
if (res) {
|
||||
_self.setData({
|
||||
platesList: res.rows
|
||||
})
|
||||
}
|
||||
_self.countWidth()
|
||||
}, err => {
|
||||
wx.showToast({
|
||||
icon: "none",
|
||||
title: '网络错误(plates)',
|
||||
})
|
||||
})
|
||||
},
|
||||
//产业图谱详情
|
||||
goPlates(e) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/plates/plates?id=' + e.currentTarget.dataset.id,
|
||||
})
|
||||
},
|
||||
//重点企业
|
||||
getKeyEnterprise() {
|
||||
var _self = this
|
||||
@ -106,10 +145,26 @@ Page({
|
||||
}
|
||||
}, err => {
|
||||
wx.showToast({
|
||||
icon: "none",
|
||||
title: '网络错误(domainEnterprise)',
|
||||
})
|
||||
})
|
||||
},
|
||||
//产业园区
|
||||
getIndustryArea() {
|
||||
var _self = this
|
||||
DomainService.doGetIndustryArea()
|
||||
.then(res => {
|
||||
_self.setData({
|
||||
industryAreaList: res.rows
|
||||
})
|
||||
}, err => {
|
||||
wx.showToast({
|
||||
icon: "none",
|
||||
title: '网络错误(IndustryArea)',
|
||||
})
|
||||
})
|
||||
},
|
||||
//监听scroll-view滚动
|
||||
scrollPlates(e) {
|
||||
var _self = this
|
||||
@ -131,9 +186,9 @@ Page({
|
||||
})
|
||||
},
|
||||
//公司详情
|
||||
showCompany() {
|
||||
showCompany(e) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/company/company',
|
||||
url: '/pages/company/company?id=' + e.currentTarget.dataset.id,
|
||||
})
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
@ -141,8 +196,15 @@ Page({
|
||||
_self.setData({
|
||||
showPageLoading: true
|
||||
})
|
||||
//产业基础
|
||||
_self.getDomainInfo()
|
||||
//特色产业
|
||||
_self.getDomainCategory()
|
||||
//重点企业
|
||||
_self.getKeyEnterprise()
|
||||
//产业园区
|
||||
_self.getIndustryArea()
|
||||
_self.getPlates()
|
||||
setTimeout(() => {
|
||||
wx.stopPullDownRefresh()
|
||||
_self.setData({
|
||||
|
@ -22,7 +22,7 @@
|
||||
</view>
|
||||
<view class="unique-items mb-20">
|
||||
<block wx:for="{{domainCategoryList}}" wx:key="index">
|
||||
<view class="unique-item">
|
||||
<view class="unique-item" bind:tap="goUniqueDetail" data-id="{{item.newsDirectoriesId}}">
|
||||
<image src="{{imgBasePath}}{{item.directoriesPhoto}}" />
|
||||
<text>{{item.directoriesName}}</text>
|
||||
</view>
|
||||
@ -39,54 +39,12 @@
|
||||
</view>
|
||||
<scroll-view id="plates" scroll-x="true" bindscroll="scrollPlates">
|
||||
<view class="plates-content">
|
||||
<view class="plates-item">
|
||||
<image class="icon" src="/imgs/ic_data_bg.png"></image>
|
||||
<text class="txt">电子信息</text>
|
||||
</view>
|
||||
<view class="plates-item">
|
||||
<image class="icon" src="/imgs/ic_data_bg.png"></image>
|
||||
<text class="txt">电子信息</text>
|
||||
</view>
|
||||
<view class="plates-item">
|
||||
<image class="icon" src="/imgs/ic_data_bg.png"></image>
|
||||
<text class="txt">电子信息</text>
|
||||
</view>
|
||||
<view class="plates-item">
|
||||
<image class="icon" src="/imgs/ic_data_bg.png"></image>
|
||||
<text class="txt">电子信息</text>
|
||||
</view>
|
||||
<view class="plates-item">
|
||||
<image class="icon" src="/imgs/ic_data_bg.png"></image>
|
||||
<text class="txt">电子信息</text>
|
||||
</view>
|
||||
<view class="plates-item">
|
||||
<image class="icon" src="/imgs/ic_data_bg.png"></image>
|
||||
<text class="txt">电子信息</text>
|
||||
</view>
|
||||
<view class="plates-item">
|
||||
<image class="icon" src="/imgs/ic_data_bg.png"></image>
|
||||
<text class="txt">电子信息</text>
|
||||
</view>
|
||||
<view class="plates-item">
|
||||
<image class="icon" src="/imgs/ic_data_bg.png"></image>
|
||||
<text class="txt">电子信息</text>
|
||||
</view>
|
||||
<view class="plates-item">
|
||||
<image class="icon" src="/imgs/ic_data_bg.png"></image>
|
||||
<text class="txt">电子信息</text>
|
||||
</view>
|
||||
<view class="plates-item">
|
||||
<image class="icon" src="/imgs/ic_data_bg.png"></image>
|
||||
<text class="txt">电子信息</text>
|
||||
</view>
|
||||
<view class="plates-item">
|
||||
<image class="icon" src="/imgs/ic_data_bg.png"></image>
|
||||
<text class="txt">电子信息</text>
|
||||
</view>
|
||||
<view class="plates-item">
|
||||
<image class="icon" src="/imgs/ic_data_bg.png"></image>
|
||||
<text class="txt">电子信息</text>
|
||||
</view>
|
||||
<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>
|
||||
<text class="txt line-1">{{item.newsContentTitle}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="slider-bar-box mt-20">
|
||||
@ -102,7 +60,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<block wx:for="{{keyEnterpriseList}}" wx:key="index">
|
||||
<view class="enterprise-item" bind:tap="showCompany">
|
||||
<view class="enterprise-item" bind:tap="showCompany" data-id="{{item.id}}">
|
||||
<image class="icon" src="{{imgBasePath}}{{item.photo}}" />
|
||||
<view class="enterprise-content">
|
||||
<text class="enterprise-name">{{item.name}}</text>
|
||||
@ -121,26 +79,12 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="area-box mt-20">
|
||||
<view class="area-item" bind:tap="showGarden">
|
||||
<image src="/imgs/ic_data_bg.png" mode="aspectFill"></image>
|
||||
<text>内蒙古呼和浩特</text>
|
||||
</view>
|
||||
<view class="area-item">
|
||||
<image src="/imgs/ic_data_bg.png" mode="aspectFill"></image>
|
||||
<text>内蒙古呼和浩特</text>
|
||||
</view>
|
||||
<view class="area-item">
|
||||
<image src="/imgs/ic_data_bg.png" mode="aspectFill"></image>
|
||||
<text>内蒙古呼和浩特</text>
|
||||
</view>
|
||||
<view class="area-item">
|
||||
<image src="/imgs/ic_data_bg.png" mode="aspectFill"></image>
|
||||
<text>内蒙古呼和浩特</text>
|
||||
</view>
|
||||
<view class="area-item">
|
||||
<image src="/imgs/ic_data_bg.png" mode="aspectFill"></image>
|
||||
<text>内蒙古呼和浩特</text>
|
||||
</view>
|
||||
<block wx:for="{{industryAreaList}}" wx:key="index">
|
||||
<view class="area-item" bind:tap="showGarden">
|
||||
<image src="{{imgBasePath}}{{item.newsContentCoverList[0].contentCoverId}}" mode="aspectFill"></image>
|
||||
<text>{{item.newsContentTitle}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -61,21 +61,21 @@ Page({
|
||||
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(() => {
|
||||
// var temp = []
|
||||
// for (let i = 0; i < 10; i++) {
|
||||
// temp.push(i)
|
||||
// }
|
||||
// _self.setData({
|
||||
// testList: temp
|
||||
// })
|
||||
// _self.countWidth()
|
||||
// }, 2000);
|
||||
setTimeout(() => {
|
||||
_self.setData({
|
||||
showPageLoading: false
|
||||
})
|
||||
}, 300);
|
||||
}, 1000);
|
||||
//获取简介
|
||||
this.getDescVideo()
|
||||
//介绍
|
||||
@ -94,13 +94,13 @@ Page({
|
||||
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({
|
||||
icon: "none",
|
||||
title: '网络错误(video)',
|
||||
})
|
||||
})
|
||||
@ -118,6 +118,7 @@ Page({
|
||||
}, err => {
|
||||
console.log(err)
|
||||
wx.showToast({
|
||||
icon: "none",
|
||||
title: '网络错误(简介)',
|
||||
})
|
||||
})
|
||||
@ -145,6 +146,7 @@ Page({
|
||||
}, err => {
|
||||
console.log(err)
|
||||
wx.showToast({
|
||||
icon: "none",
|
||||
title: '网络错误(数据统计)',
|
||||
})
|
||||
})
|
||||
@ -161,11 +163,18 @@ Page({
|
||||
}
|
||||
}, err => {
|
||||
wx.showToast({
|
||||
icon: "none",
|
||||
title: '网络错误(投资机会)',
|
||||
})
|
||||
})
|
||||
},
|
||||
//地区概况,资源条件,气候条件,基础设施
|
||||
goInvestDetail(e) {
|
||||
var id = e.currentTarget.dataset.id
|
||||
wx.navigateTo({
|
||||
url: '/pages/invest-detail/invest-detail?id=' + id,
|
||||
})
|
||||
},
|
||||
//投资环境详情
|
||||
getInvestArea(id) {
|
||||
var _self = this
|
||||
IndexService.doGetInvestArea({
|
||||
@ -179,10 +188,12 @@ Page({
|
||||
}
|
||||
}, err => {
|
||||
wx.showToast({
|
||||
icon: "none",
|
||||
title: '网络错误(InvestArea)',
|
||||
})
|
||||
})
|
||||
},
|
||||
//投资优势
|
||||
getSuperiority() {
|
||||
var _self = this
|
||||
IndexService.doGetSuperiorityList()
|
||||
@ -192,12 +203,20 @@ Page({
|
||||
superiorityList: res
|
||||
})
|
||||
}
|
||||
_self.countWidth()
|
||||
}, err => {
|
||||
wx.showToast({
|
||||
icon: "none",
|
||||
title: '网络错误(superiority)',
|
||||
})
|
||||
})
|
||||
},
|
||||
//投资优势详情
|
||||
goSuperiorityDetail(e) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/superiority-detail/superiority-detail?id=' + e.currentTarget.dataset.id,
|
||||
})
|
||||
},
|
||||
//获取投资环境分类
|
||||
getInvestAreaCategory() {
|
||||
var _self = this
|
||||
@ -211,6 +230,7 @@ Page({
|
||||
}
|
||||
}, err => {
|
||||
wx.showToast({
|
||||
icon: "none",
|
||||
title: '网络错误(InvestCategory)',
|
||||
})
|
||||
console.log(err)
|
||||
@ -306,4 +326,29 @@ Page({
|
||||
url: '/pages/invest/invest',
|
||||
})
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
var _self = this
|
||||
_self.setData({
|
||||
showPageLoading: true
|
||||
})
|
||||
setTimeout(() => {
|
||||
wx.stopPullDownRefresh()
|
||||
_self.setData({
|
||||
showPageLoading: false
|
||||
})
|
||||
}, 2000);
|
||||
//获取简介
|
||||
_self.getDescVideo()
|
||||
//介绍
|
||||
_self.getDesc()
|
||||
//数据统计
|
||||
_self.getStatistics()
|
||||
//投资机会
|
||||
_self.getInvest()
|
||||
//默认获取地区概况
|
||||
_self.getInvestAreaCategory()
|
||||
//投资环境
|
||||
_self.getSuperiority()
|
||||
|
||||
}
|
||||
})
|
@ -3,5 +3,6 @@
|
||||
"mp-loading": "weui-miniprogram/loading/loading",
|
||||
"mp-actionSheet": "weui-miniprogram/actionsheet/actionsheet",
|
||||
"bottom-sheet": "/components/fui-bottom-popup/fui-bottom-popup"
|
||||
}
|
||||
},
|
||||
"enablePullDownRefresh": true
|
||||
}
|
@ -84,7 +84,7 @@
|
||||
<scroll-view id="plates" scroll-x="{{true}}" bindscroll="scrollPlates">
|
||||
<view class="superiority-content">
|
||||
<block wx:for="{{superiorityList}}" wx:key="index">
|
||||
<view class="superiority-item">
|
||||
<view class="superiority-item" bind:tap="goSuperiorityDetail" data-id="{{item.newsDirectoriesId}}">
|
||||
<image class="superiory-icon" src="{{imgBasePath}}{{item.directoriesPhoto}}"></image>
|
||||
<text class="superiory-txt">{{item.directoriesName}}</text>
|
||||
</view>
|
||||
@ -108,7 +108,7 @@
|
||||
</view> -->
|
||||
</view>
|
||||
<block wx:for="{{investList}}" wx:key="index">
|
||||
<view class="chance-item-box">
|
||||
<view class="chance-item-box" data-id="{{item.id}}" bind:tap="goInvestDetail">
|
||||
<view class="chance-item-title">
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="more">查看详情 ></view>
|
||||
|
55
pages/invest-detail/invest-detail.js
Normal file
55
pages/invest-detail/invest-detail.js
Normal file
@ -0,0 +1,55 @@
|
||||
// pages/invest-detail/invest-detail.js
|
||||
import IndexService from '../../utils/api/indexApi';
|
||||
import utils from '../../utils/util';
|
||||
const app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
bean: {},
|
||||
showPageLoading: true,
|
||||
imgBasePath: app.globalData.imgPath
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
var id = options.id
|
||||
if (id) {
|
||||
this.getDetailBean(id)
|
||||
} else {
|
||||
wx.navigateBack()
|
||||
}
|
||||
},
|
||||
getDetailBean(id) {
|
||||
var _self = this
|
||||
IndexService.doGetInvestDetail({
|
||||
id: id
|
||||
})
|
||||
.then(res => {
|
||||
_self.setData({
|
||||
showPageLoading: false
|
||||
})
|
||||
if (res) {
|
||||
wx.setNavigationBarTitle({
|
||||
title: res.title,
|
||||
})
|
||||
res.content = utils.formatHtml(res.content)
|
||||
_self.setData({
|
||||
bean: res
|
||||
})
|
||||
}
|
||||
}, err => {
|
||||
_self.setData({
|
||||
showPageLoading: false
|
||||
})
|
||||
wx.showToast({
|
||||
title: '网络错误',
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
})
|
4
pages/invest-detail/invest-detail.json
Normal file
4
pages/invest-detail/invest-detail.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "详情"
|
||||
}
|
31
pages/invest-detail/invest-detail.wxml
Normal file
31
pages/invest-detail/invest-detail.wxml
Normal file
@ -0,0 +1,31 @@
|
||||
<view class="body">
|
||||
<view class="p-container">
|
||||
<view class="news-title">{{bean.title}}</view>
|
||||
<view class="chance-item-attrs">
|
||||
<view class="chance-attr">
|
||||
<text class="title">预计总投资</text>
|
||||
<text class="content">{{bean.money}}{{bean.moneyUnit}}</text>
|
||||
</view>
|
||||
<view class="divide-line"></view>
|
||||
<view class="chance-attr">
|
||||
<text class="title">所属产业</text>
|
||||
<text class="content">{{bean.type}}</text>
|
||||
</view>
|
||||
<view class="divide-line"></view>
|
||||
<view class="chance-attr">
|
||||
<text class="title">占地面积</text>
|
||||
<text class="content">{{bean.area}}{{bean.areaUnit}}</text>
|
||||
</view>
|
||||
<view class="divide-line"></view>
|
||||
<view class="chance-attr">
|
||||
<text class="title">用地类型</text>
|
||||
<text class="content">{{bean.landType}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="news-content">
|
||||
<rich-text nodes="{{bean.content}}"></rich-text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<page-loading wx:if="{{showPageLoading}}"></page-loading>
|
90
pages/invest-detail/invest-detail.wxss
Normal file
90
pages/invest-detail/invest-detail.wxss
Normal file
@ -0,0 +1,90 @@
|
||||
page {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.news-title {
|
||||
padding: 20rpx 30rpx;
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
color: #242424;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.news-attr-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.news-attr {
|
||||
font-size: 24rpx;
|
||||
color: #949494;
|
||||
}
|
||||
|
||||
.news-attr:nth-of-type(n+2) {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.p-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 28rpx;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
|
||||
.chance-item-attrs {
|
||||
background: #FFFFFF;
|
||||
border-radius: 13rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
background: rgba(240, 240, 240, 0.59);
|
||||
align-items: center;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.chance-attr {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.chance-attr .title {
|
||||
font-size: 16rpx;
|
||||
color: #757575;
|
||||
}
|
||||
|
||||
.chance-attr .content {
|
||||
font-size: 24rpx;
|
||||
margin-top: 10rpx;
|
||||
color: #F99E00;
|
||||
}
|
||||
|
||||
.divide-line {
|
||||
width: 1rpx;
|
||||
height: 33rpx;
|
||||
background: rgba(204, 226, 214, 0.35);
|
||||
}
|
||||
|
||||
.chance-item-content {
|
||||
font-family: STZhongsong;
|
||||
font-weight: 400;
|
||||
font-size: 16rpx;
|
||||
color: #8E8E8E;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.chance-item-title .more {
|
||||
width: 107rpx;
|
||||
height: 36rpx;
|
||||
background: linear-gradient(0deg, #F99E00 0%, #FF8282 100%);
|
||||
border-radius: 3rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 16rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 36rpx;
|
||||
}
|
52
pages/plates/plates.js
Normal file
52
pages/plates/plates.js
Normal file
@ -0,0 +1,52 @@
|
||||
// pages/unique-detail/unique-detail.js
|
||||
import DomainService from '../../utils/api/domainApi';
|
||||
import utils from '../../utils/util';
|
||||
const app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
bean: {},
|
||||
showPageLoading: true
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
var id = options.id
|
||||
if (id) {
|
||||
this.getDetail(id)
|
||||
} else {
|
||||
wx.navigateBack()
|
||||
}
|
||||
},
|
||||
getDetail(id) {
|
||||
var _self = this
|
||||
DomainService.doDetail(id)
|
||||
.then(res => {
|
||||
|
||||
if (res) {
|
||||
wx.setNavigationBarTitle({
|
||||
title: res.newsContentTitle,
|
||||
})
|
||||
res.newsContentContent = utils.formatHtml(res.newsContentContent)
|
||||
_self.setData({
|
||||
bean: res
|
||||
})
|
||||
}
|
||||
_self.setData({
|
||||
showPageLoading: false
|
||||
})
|
||||
}, err => {
|
||||
_self.setData({
|
||||
showPageLoading: false
|
||||
})
|
||||
wx.showToast({
|
||||
title: '网络错误(unique)',
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
3
pages/plates/plates.json
Normal file
3
pages/plates/plates.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
11
pages/plates/plates.wxml
Normal file
11
pages/plates/plates.wxml
Normal file
@ -0,0 +1,11 @@
|
||||
<view class="body">
|
||||
<view class="news-title">{{bean.title}}</view>
|
||||
<view class="news-attr-box">
|
||||
<view class="news-attr">发布:{{bean.newsContentAuthor}}</view>
|
||||
<view class="news-attr">发布时间:{{bean.newsContentPublishTime}}</view>
|
||||
</view>
|
||||
<view class="news-content">
|
||||
<rich-text nodes="{{bean.newsContentContent}}"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
<page-loading wx:if="{{showPageLoading}}"></page-loading>
|
34
pages/plates/plates.wxss
Normal file
34
pages/plates/plates.wxss
Normal file
@ -0,0 +1,34 @@
|
||||
/* pages/superiority-detail/superiority-detail.wxss */
|
||||
page {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.news-title {
|
||||
padding: 20rpx 30rpx;
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
color: #242424;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.news-attr-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.news-attr {
|
||||
font-size: 24rpx;
|
||||
color: #949494;
|
||||
}
|
||||
|
||||
.news-attr:nth-of-type(n+2) {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
margin: 8px 0;
|
||||
}
|
53
pages/policy-detail/policy-detail.js
Normal file
53
pages/policy-detail/policy-detail.js
Normal file
@ -0,0 +1,53 @@
|
||||
// pages/superiority-detail/superiority-detail.js
|
||||
import PolicyService from '../../utils/api/policyApi';
|
||||
import utils from '../../utils/util';
|
||||
const app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
showPageLoading: true,
|
||||
bean: {},
|
||||
imgBasePath: app.globalData.imgPath
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
var id = options.id
|
||||
if (id) {
|
||||
this.getDetailData(id)
|
||||
} else {
|
||||
wx.navigateBack()
|
||||
}
|
||||
},
|
||||
getDetailData(id) {
|
||||
var _self = this
|
||||
PolicyService.doGetDetail(id)
|
||||
.then(res => {
|
||||
_self.setData({
|
||||
showPageLoading: false
|
||||
})
|
||||
if (res) {
|
||||
res.newsContentContent = utils.formatHtml(res.newsContentContent)
|
||||
_self.setData({
|
||||
bean: res
|
||||
})
|
||||
wx.setNavigationBarTitle({
|
||||
title: res.newsContentTitle,
|
||||
})
|
||||
}
|
||||
}, err => {
|
||||
_self.setData({
|
||||
showPageLoading: false
|
||||
})
|
||||
wx.showToast({
|
||||
icon: 'none',
|
||||
title: '网络错误',
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
3
pages/policy-detail/policy-detail.json
Normal file
3
pages/policy-detail/policy-detail.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
11
pages/policy-detail/policy-detail.wxml
Normal file
11
pages/policy-detail/policy-detail.wxml
Normal file
@ -0,0 +1,11 @@
|
||||
<view class="body">
|
||||
<view class="news-title">{{bean.title}}</view>
|
||||
<view class="news-attr-box">
|
||||
<view class="news-attr">发布:{{bean.newsContentAuthor}}</view>
|
||||
<view class="news-attr">发布时间:{{bean.newsContentPublishTime}}</view>
|
||||
</view>
|
||||
<view class="news-content">
|
||||
<rich-text nodes="{{bean.newsContentContent}}"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
<page-loading wx:if="{{showPageLoading}}"></page-loading>
|
28
pages/policy-detail/policy-detail.wxss
Normal file
28
pages/policy-detail/policy-detail.wxss
Normal file
@ -0,0 +1,28 @@
|
||||
/* pages/superiority-detail/superiority-detail.wxss */
|
||||
page {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.news-title {
|
||||
padding: 20rpx 30rpx;
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
color: #242424;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.news-attr-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.news-attr {
|
||||
font-size: 24rpx;
|
||||
color: #949494;
|
||||
}
|
||||
|
||||
.news-attr:nth-of-type(n+2) {
|
||||
margin-left: 20rpx;
|
||||
}
|
@ -1,25 +1,86 @@
|
||||
// pages/policy/policy.js
|
||||
import PolicyService from '../../utils/api/policyApi';
|
||||
const app = getApp();
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
curTab: 1,
|
||||
isLoading: false,
|
||||
hasMore: true,
|
||||
triggered: false,
|
||||
policyList: [], //政策
|
||||
pageShowLoading: true, //显示页面加载
|
||||
currentId: '8e20af26-fed2-4829-a87c-9eddd6311d7c',
|
||||
keywords: '',
|
||||
showContentLoading: true
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
this.getPolicyList(this.data.keywords)
|
||||
},
|
||||
inputValue(e) {
|
||||
var _self = this
|
||||
_self.setData({
|
||||
keywords: e.detail.value
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
var _self = this
|
||||
_self.getPolicyList(_self.data.keywords)
|
||||
_self.setData({
|
||||
keywords: ''
|
||||
})
|
||||
},
|
||||
getPolicyList(k) {
|
||||
var _self = this
|
||||
_self.setData({
|
||||
showContentLoading: true
|
||||
})
|
||||
PolicyService.doGetPolicyList({
|
||||
newsDirectoriesId: _self.data.currentId,
|
||||
keywords: k
|
||||
})
|
||||
.then(res => {
|
||||
_self.setData({
|
||||
showContentLoading: false
|
||||
})
|
||||
if (res) {
|
||||
if (res.rows && res.rows.length <= 0) {
|
||||
wx.showToast({
|
||||
icon: 'none',
|
||||
title: '暂无数据',
|
||||
})
|
||||
} else {
|
||||
_self.setData({
|
||||
policyList: res.rows
|
||||
})
|
||||
}
|
||||
}
|
||||
}, err => {
|
||||
_self.setData({
|
||||
showContentLoading: false
|
||||
})
|
||||
wx.showToast({
|
||||
title: '网络错误(policy)',
|
||||
})
|
||||
})
|
||||
},
|
||||
//详情
|
||||
goDetail(e) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/policy-detail/policy-detail?id=' + e.currentTarget.dataset.id,
|
||||
})
|
||||
},
|
||||
changeTab(e) {
|
||||
this.setData({
|
||||
curTab: e.currentTarget.dataset.index
|
||||
currentId: e.currentTarget.dataset.id
|
||||
})
|
||||
this.getPolicyList(this.data.keywords)
|
||||
}
|
||||
})
|
@ -1,3 +1,5 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {
|
||||
"content-loading": "/components/content-loading/loading"
|
||||
}
|
||||
}
|
@ -1,34 +1,34 @@
|
||||
<!--pages/policy/policy.wxml-->
|
||||
<view class="body">
|
||||
<view class="p-body">
|
||||
<!-- 搜索框 -->
|
||||
<view class="search-box">
|
||||
<image src="/imgs/ic_search_icon.png"></image>
|
||||
<input placeholder="输入关键字查找" placeholder-class="placeholder" />
|
||||
<input placeholder="输入关键字查找" placeholder-class="placeholder" value="{{keywords}}" bindinput="inputValue" confirm-type="search" bindconfirm="doSearch" />
|
||||
</view>
|
||||
<view class="policy-tabs">
|
||||
<view class="policy-tab-box" bind:tap="changeTab" data-index="1">
|
||||
<view class="{{curTab==1? 'policy-tab-select':'policy-tab-normal'}}">国家政策</view>
|
||||
<view class="policy-tab-box" bind:tap="changeTab" data-id="8e20af26-fed2-4829-a87c-9eddd6311d7c">
|
||||
<view class="{{currentId=='8e20af26-fed2-4829-a87c-9eddd6311d7c'? 'policy-tab-select':'policy-tab-normal'}}">国家政策</view>
|
||||
</view>
|
||||
<view class="policy-tab-box" bind:tap="changeTab" data-index="2">
|
||||
<view class="{{curTab==2? 'policy-tab-select':'policy-tab-normal'}}">地方政策</view>
|
||||
<view class="policy-tab-box" bind:tap="changeTab" data-id="1f6c4812-40a2-4a54-955d-85f31b3f4630">
|
||||
<view class="{{currentId=='1f6c4812-40a2-4a54-955d-85f31b3f4630'? 'policy-tab-select':'policy-tab-normal'}}">地方政策</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view class="scrollarea" scroll-y type="list" refresher-enabled="false" refresher-triggered="{{triggered}}" bindrefresherrefresh="doRefresh" bindscrolltolower="doLoadMore" lower-threshold="60">
|
||||
<view class="container">
|
||||
<!-- <block wx:for="{{list}}" wx:key="index"> -->
|
||||
<view class="policy-item">
|
||||
<text class="policy-item-title">锡林郭勒盟惠企政策“大礼包”——奖励补贴类(八)</text>
|
||||
<view class="policy-desc-box">
|
||||
<text class="policy-desc-name">内蒙古自治区锡林郭勒盟发展和改革委员会</text>
|
||||
<text class="policy-desc-date">2024-12-27</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="divider-v"></view>
|
||||
<!-- </block> -->
|
||||
|
||||
<block wx:if="{{hasMore && isLoading}}">
|
||||
<mp-loading show="{{isLoading}}" type="dot-gray" style="width: 100vw;height:40rpx"></mp-loading>
|
||||
</block>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view style="flex:1;position: relative;">
|
||||
<scroll-view class="scrollarea mt-20" scroll-y type="list">
|
||||
<view class="container">
|
||||
<block wx:for="{{policyList}}" wx:key="index">
|
||||
<view class="policy-item" bind:tap="goDetail" data-id="{{item.newsContentId}}">
|
||||
<text class="policy-item-title">{{item.newsContentTitle}}</text>
|
||||
<view class="policy-desc-box">
|
||||
<text class="policy-desc-name">{{item.newsContentAuthor}}</text>
|
||||
<text class="policy-desc-date">{{item.newsContentPublishTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="divider-v"></view>
|
||||
</block>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<content-loading wx:if="{{showContentLoading}}"></content-loading>
|
||||
</view>
|
||||
</view>
|
@ -1,14 +1,20 @@
|
||||
/* pages/policy/policy.wxss */
|
||||
page {
|
||||
background-color: white;
|
||||
|
||||
}
|
||||
|
||||
.p-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.scrollarea {
|
||||
flex: 1;
|
||||
overflow-y: hidden;
|
||||
height: 85vh;
|
||||
width: 100vw;
|
||||
overflow: hidden;
|
||||
height: 85vh;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
@ -87,7 +93,7 @@ page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
padding: 30rpx;
|
||||
margin: 20rpx 40rpx 20rpx 40rpx;
|
||||
}
|
||||
|
||||
.policy-item-title {
|
||||
|
54
pages/superiority-detail/superiority-detail.js
Normal file
54
pages/superiority-detail/superiority-detail.js
Normal file
@ -0,0 +1,54 @@
|
||||
// pages/superiority-detail/superiority-detail.js
|
||||
import IndexService from '../../utils/api/indexApi';
|
||||
import utils from '../../utils/util'
|
||||
const app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
showPageLoading: true,
|
||||
bean: {},
|
||||
imgBasePath: app.globalData.imgPath
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
var id = options.id
|
||||
if (id) {
|
||||
this.getDetailData(id)
|
||||
} else {
|
||||
wx.navigateBack()
|
||||
}
|
||||
},
|
||||
getDetailData(id) {
|
||||
var _self = this
|
||||
IndexService.doGetSuperiorityDetail({
|
||||
newsDirectoriesId: id
|
||||
})
|
||||
.then(res => {
|
||||
_self.setData({
|
||||
showPageLoading: false
|
||||
})
|
||||
if (res && res.rows) {
|
||||
res.rows[0].newsContentContent = utils.formatHtml(res.rows[0].newsContentContent)
|
||||
_self.setData({
|
||||
bean: res.rows[0]
|
||||
})
|
||||
wx.setNavigationBarTitle({
|
||||
title: res.rows[0].newsContentTitle,
|
||||
})
|
||||
}
|
||||
}, err => {
|
||||
_self.setData({
|
||||
showPageLoading: false
|
||||
})
|
||||
wx.showToast({
|
||||
title: '网络错误',
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
4
pages/superiority-detail/superiority-detail.json
Normal file
4
pages/superiority-detail/superiority-detail.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "详情"
|
||||
}
|
11
pages/superiority-detail/superiority-detail.wxml
Normal file
11
pages/superiority-detail/superiority-detail.wxml
Normal file
@ -0,0 +1,11 @@
|
||||
<view class="body">
|
||||
<view class="news-title">{{bean.title}}</view>
|
||||
<view class="news-attr-box">
|
||||
<view class="news-attr">发布:{{bean.newsContentAuthor}}</view>
|
||||
<view class="news-attr">发布时间:{{bean.newsContentPublishTime}}</view>
|
||||
</view>
|
||||
<view class="news-content">
|
||||
<rich-text nodes="{{bean.newsContentContent}}"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
<page-loading wx:if="{{showPageLoading}}"></page-loading>
|
28
pages/superiority-detail/superiority-detail.wxss
Normal file
28
pages/superiority-detail/superiority-detail.wxss
Normal file
@ -0,0 +1,28 @@
|
||||
/* pages/superiority-detail/superiority-detail.wxss */
|
||||
page {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.news-title {
|
||||
padding: 20rpx 30rpx;
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
color: #242424;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.news-attr-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.news-attr {
|
||||
font-size: 24rpx;
|
||||
color: #949494;
|
||||
}
|
||||
|
||||
.news-attr:nth-of-type(n+2) {
|
||||
margin-left: 20rpx;
|
||||
}
|
53
pages/unique-detail/unique-detail.js
Normal file
53
pages/unique-detail/unique-detail.js
Normal file
@ -0,0 +1,53 @@
|
||||
// pages/unique-detail/unique-detail.js
|
||||
import DomainService from '../../utils/api/domainApi';
|
||||
import utils from '../../utils/util'
|
||||
const app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
bean: {},
|
||||
showPageLoading: true
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
var id = options.id
|
||||
if (id) {
|
||||
this.getDetail(id)
|
||||
} else {
|
||||
wx.navigateBack()
|
||||
}
|
||||
},
|
||||
getDetail(id) {
|
||||
var _self = this
|
||||
DomainService.doGetDetail({
|
||||
newsDirectoriesId: id
|
||||
})
|
||||
.then(res => {
|
||||
_self.setData({
|
||||
showPageLoading: false
|
||||
})
|
||||
if (res && res.rows) {
|
||||
wx.setNavigationBarTitle({
|
||||
title: res.rows[0].newsContentTitle,
|
||||
})
|
||||
res.rows[0].newsContentContent = utils.formatHtml(res.rows[0].newsContentContent)
|
||||
_self.setData({
|
||||
bean: res.rows[0]
|
||||
})
|
||||
}
|
||||
}, err => {
|
||||
_self.setData({
|
||||
showPageLoading: false
|
||||
})
|
||||
wx.showToast({
|
||||
title: '网络错误(unique)',
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
4
pages/unique-detail/unique-detail.json
Normal file
4
pages/unique-detail/unique-detail.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "详情"
|
||||
}
|
11
pages/unique-detail/unique-detail.wxml
Normal file
11
pages/unique-detail/unique-detail.wxml
Normal file
@ -0,0 +1,11 @@
|
||||
<view class="body">
|
||||
<view class="news-title">{{bean.title}}</view>
|
||||
<view class="news-attr-box">
|
||||
<view class="news-attr">发布:{{bean.newsContentAuthor}}</view>
|
||||
<view class="news-attr">发布时间:{{bean.newsContentPublishTime}}</view>
|
||||
</view>
|
||||
<view class="news-content">
|
||||
<rich-text nodes="{{bean.newsContentContent}}"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
<page-loading wx:if="{{showPageLoading}}"></page-loading>
|
28
pages/unique-detail/unique-detail.wxss
Normal file
28
pages/unique-detail/unique-detail.wxss
Normal file
@ -0,0 +1,28 @@
|
||||
/* pages/superiority-detail/superiority-detail.wxss */
|
||||
page {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.news-title {
|
||||
padding: 20rpx 30rpx;
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
color: #242424;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.news-attr-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.news-attr {
|
||||
font-size: 24rpx;
|
||||
color: #949494;
|
||||
}
|
||||
|
||||
.news-attr:nth-of-type(n+2) {
|
||||
margin-left: 20rpx;
|
||||
}
|
15
utils/api/commonApi.js
Normal file
15
utils/api/commonApi.js
Normal file
@ -0,0 +1,15 @@
|
||||
import {
|
||||
request
|
||||
} from "../http";
|
||||
|
||||
// 管理地址
|
||||
const apiPath = {
|
||||
investDetail: "/news-content/listpage?rows=1&page=1", //投资优势
|
||||
}
|
||||
class CommonService {
|
||||
static doGetInvestDetail(data) {
|
||||
return request(apiPath.investDetail, "GET", data)
|
||||
}
|
||||
}
|
||||
|
||||
export default CommonService;
|
@ -7,6 +7,10 @@ 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", //产业基础
|
||||
industryArea: "/news-content/listpage?newsDirectoriesId=df975b5b-74bf-4c5d-a4bc-10acb6f32e81", //产业园区
|
||||
plates: "/news-content/listpage?newsDirectoriesId=40d9b2e3-a609-4f45-9833-acbfdb16ce56", //产业图谱
|
||||
newDetail: "/news-content/listpage", //详情
|
||||
detail: "/news-content/get/"
|
||||
}
|
||||
class DomainService {
|
||||
static doGetDomainCategory() {
|
||||
@ -15,9 +19,24 @@ class DomainService {
|
||||
static doGetKeyEnterprise() {
|
||||
return request(apiPath.keyEnterprise, "GET")
|
||||
}
|
||||
static doGetKeyEnterprise(data) {
|
||||
return request(apiPath.keyEnterprise, "GET", data)
|
||||
}
|
||||
static doGetDomainInfo() {
|
||||
return request(apiPath.domainInfo, "GET")
|
||||
}
|
||||
static doGetIndustryArea() {
|
||||
return request(apiPath.industryArea, "GET")
|
||||
}
|
||||
static doGetPlates() {
|
||||
return request(apiPath.plates, "GET")
|
||||
}
|
||||
static doGetDetail(data) {
|
||||
return request(apiPath.newDetail, "GET", data)
|
||||
}
|
||||
static doDetail(url) {
|
||||
return request(apiPath.detail + url, "GET")
|
||||
}
|
||||
}
|
||||
|
||||
export default DomainService;
|
@ -10,6 +10,8 @@ const apiPath = {
|
||||
invest: "/query/sql/q428ea76",
|
||||
investAreaInfo: "/news-content/listpage?rows=1&page=1", //地区概况 //资源条件 //气候条件 //基础设施
|
||||
categoryList: "/news-directories/list", //投资优势 投资环境
|
||||
superiosityDetail: "/news-content/listpage?rows=1&page=1", //投资优势详情
|
||||
investDetail: "", //投资机会详情
|
||||
}
|
||||
class IndexService {
|
||||
static doGetDescVideo() {
|
||||
@ -24,6 +26,9 @@ class IndexService {
|
||||
static doGetInvest() {
|
||||
return request(apiPath.invest, "GET")
|
||||
}
|
||||
static doGetInvestDetail(data) {
|
||||
return request(apiPath.invest, "GET", data)
|
||||
}
|
||||
static doGetInvestArea(data) {
|
||||
return request(apiPath.investAreaInfo, "GET", data)
|
||||
}
|
||||
@ -37,6 +42,9 @@ class IndexService {
|
||||
directoriesParentId: 'd3ba3ff5-6d9e-4aed-9331-73e50b5ac598'
|
||||
})
|
||||
}
|
||||
static doGetSuperiorityDetail(data) {
|
||||
return request(apiPath.superiosityDetail, "GET", data)
|
||||
}
|
||||
}
|
||||
|
||||
export default IndexService;
|
19
utils/api/policyApi.js
Normal file
19
utils/api/policyApi.js
Normal file
@ -0,0 +1,19 @@
|
||||
import {
|
||||
request
|
||||
} from "../http";
|
||||
|
||||
// 管理地址
|
||||
const apiPath = {
|
||||
policyList: "/news-content/listpage", //政策列表
|
||||
policyDetail: "/news-content/get/", //政策详情
|
||||
}
|
||||
class PolicyService {
|
||||
static doGetPolicyList(data) {
|
||||
return request(apiPath.policyList, "GET", data)
|
||||
}
|
||||
static doGetDetail(id) {
|
||||
return request(apiPath.policyDetail + id, "GET")
|
||||
}
|
||||
}
|
||||
|
||||
export default PolicyService;
|
@ -75,12 +75,27 @@ const randomRgbaColor = () => { // 随机生成RGBA颜色
|
||||
return `rgba(${r},${g},${b},${alpha})`; // 返回rgba(r,g,b,a)格式颜色
|
||||
}
|
||||
|
||||
|
||||
const formatRichText = (html) => {
|
||||
let newContent = html.replace(/<img(^>)*>/gi, function (match, capture) {
|
||||
match = match.replace(/style="(^")+"/gi, '').replace(/style='(^')+'/gi, '');
|
||||
match = match.replace(/width="(^")+"/gi, '').replace(/width='(^')+'/gi, '');
|
||||
match = match.replace(/height="(^")+"/gi, '').replace(/height='(^')+'/gi, '');
|
||||
return match;
|
||||
});
|
||||
newContent = newContent.replace(/style="(^")+"/gi, function (match, capture) {
|
||||
match = match.replace(/width:(^;)+;/gi, 'max-width:100%;').replace(/width:(^;)+;/gi, 'max-width:100%;');
|
||||
return match;
|
||||
});
|
||||
newContent = newContent.replace(/<br(^>)*\/>/gi, '');
|
||||
newContent = newContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;margin-top:0;margin-bottom:0;"');
|
||||
return newContent;
|
||||
}
|
||||
module.exports = {
|
||||
formatTime: formatTime,
|
||||
formatDate: formatDate,
|
||||
randomRgb: randomRgbColor,
|
||||
randomRgba: randomRgbaColor,
|
||||
randomDark: randomDarkColor,
|
||||
randomLight: randomLightColor
|
||||
randomLight: randomLightColor,
|
||||
formatHtml: formatRichText
|
||||
}
|
Loading…
Reference in New Issue
Block a user