接口对接完成
This commit is contained in:
parent
8b80872379
commit
1746305c7e
7
app.json
7
app.json
@ -5,7 +5,12 @@
|
|||||||
"pages/policy/policy",
|
"pages/policy/policy",
|
||||||
"pages/invest/invest",
|
"pages/invest/invest",
|
||||||
"pages/company/company",
|
"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": {
|
"window": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
|
18
app.wxss
18
app.wxss
@ -38,13 +38,10 @@ page::after {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
width: 100vw;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: scroll;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mt-10 {
|
.mt-10 {
|
||||||
@ -84,6 +81,7 @@ page::after {
|
|||||||
width: 90%;
|
width: 90%;
|
||||||
height: 3rpx;
|
height: 3rpx;
|
||||||
background-color: #F0F0F0;
|
background-color: #F0F0F0;
|
||||||
|
align-self: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.divider-v-100 {
|
.divider-v-100 {
|
||||||
@ -195,6 +193,14 @@ page::after {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.line-1 {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.line-noappoint {
|
.line-noappoint {
|
||||||
@ -234,4 +240,10 @@ page::after {
|
|||||||
|
|
||||||
.font-30 {
|
.font-30 {
|
||||||
font-size: 30rpx;
|
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
|
// pages/company/company.js
|
||||||
|
import DomainService from '../../utils/api/domainApi';
|
||||||
|
import utils from '../../utils/util'
|
||||||
|
const app = getApp();
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
|
bean: {}, //详情
|
||||||
|
showPageLoading: true
|
||||||
|
},
|
||||||
|
|
||||||
},
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
/**
|
*/
|
||||||
* 生命周期函数--监听页面加载
|
onLoad(options) {
|
||||||
*/
|
var id = options.id
|
||||||
onLoad(options) {
|
if (id) {
|
||||||
|
this.getDetail(id)
|
||||||
},
|
} else {
|
||||||
|
wx.navigateBack()
|
||||||
/**
|
}
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
},
|
||||||
*/
|
getDetail(id) {
|
||||||
onReady() {
|
var _self = this
|
||||||
|
DomainService.doGetKeyEnterprise({
|
||||||
},
|
id: id
|
||||||
|
})
|
||||||
/**
|
.then(res => {
|
||||||
* 生命周期函数--监听页面显示
|
if (res.guDongList && res.guDongList.length > 0) {
|
||||||
*/
|
res.guDongList.forEach(item => {
|
||||||
onShow() {
|
item.surname = item.name.substr(0, 1)
|
||||||
|
})
|
||||||
},
|
}
|
||||||
|
if (res) {
|
||||||
/**
|
res.content = utils.formatHtml(res.content)
|
||||||
* 生命周期函数--监听页面隐藏
|
_self.setData({
|
||||||
*/
|
bean: res
|
||||||
onHide() {
|
})
|
||||||
|
}
|
||||||
},
|
}, err => {
|
||||||
|
wx.showToast({
|
||||||
/**
|
icon: 'none',
|
||||||
* 生命周期函数--监听页面卸载
|
title: '网络错误(company)',
|
||||||
*/
|
})
|
||||||
onUnload() {
|
})
|
||||||
|
},
|
||||||
},
|
callPhone() {
|
||||||
|
var _self = this
|
||||||
/**
|
if (_self.data.bean.lianXi.phone) {
|
||||||
* 页面相关事件处理函数--监听用户下拉动作
|
wx.makePhoneCall({
|
||||||
*/
|
phoneNumber: _self.data.bean.lianXi.phone,
|
||||||
onPullDownRefresh() {
|
})
|
||||||
|
}
|
||||||
},
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面上拉触底事件的处理函数
|
|
||||||
*/
|
|
||||||
onReachBottom() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户点击右上角分享
|
|
||||||
*/
|
|
||||||
onShareAppMessage() {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
})
|
@ -1,29 +1,29 @@
|
|||||||
<!--pages/company/company.wxml-->
|
<!--pages/company/company.wxml-->
|
||||||
<view class="func-container" style="padding: 45rpx;">
|
<view class="func-container" style="padding: 45rpx;">
|
||||||
<view class="company-name-box">
|
<view class="company-name-box">
|
||||||
<text class="name">内蒙古好友发科技有限公司</text>
|
<text class="name">{{bean.name}}</text>
|
||||||
<view class="status">状态</view>
|
<view class="status">存续</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="company-tag-box">
|
<!-- <view class="company-tag-box">
|
||||||
<text class="tag">实力指数:</text>
|
<text class="tag">实力指数:</text>
|
||||||
<view class="tag-num">⭐⭐⭐⭐⭐⭐</view>
|
<view class="tag-num">⭐⭐⭐⭐⭐⭐</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="divider-v-100" style="margin: 20rpx 0rpx;"></view>
|
<view class="divider-v-100" style="margin: 20rpx 0rpx;"></view>
|
||||||
<view class="company-info-title">
|
<view class="company-info-title">
|
||||||
<text class="name">工商信息</text>
|
<text class="name">工商信息</text>
|
||||||
<view class="more">
|
<!-- <view class="more">
|
||||||
<text>全部</text>
|
<text>全部</text>
|
||||||
<image src="/imgs/ic_arrow_right_black.png" style="width: 27rpx;height: 27rpx;"></image>
|
<image src="/imgs/ic_arrow_right_black.png" style="width: 27rpx;height: 27rpx;"></image>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="info-box">
|
<view class="info-box">
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
<view class="title">企业法人</view>
|
<view class="title">企业法人</view>
|
||||||
<view class="content">企业法人</view>
|
<view class="content">{{bean.faRen}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
<view class="title">注册资本</view>
|
<view class="title">注册资本</view>
|
||||||
<view class="content">10000万</view>
|
<view class="content">{{bean.ziBen}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-box">
|
<view class="info-box">
|
||||||
@ -33,7 +33,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
<view class="title">成立日期</view>
|
<view class="title">成立日期</view>
|
||||||
<view class="content">2024-23-23</view>
|
<view class="content">{{bean.chengLi}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-box">
|
<view class="info-box">
|
||||||
@ -43,59 +43,43 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
<view class="title">注册地址</view>
|
<view class="title">注册地址</view>
|
||||||
<view class="content">内蒙古呼和浩特市</view>
|
<view class="content">{{bean.zhuCeDiZhi}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="p-tabs">
|
<view class="p-tabs">
|
||||||
<view class="p-tab-sel">股东信息</view>
|
<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>
|
</view>
|
||||||
<scroll-view scroll-x style="margin-top: 20rpx;">
|
<scroll-view scroll-x style="margin-top: 20rpx;">
|
||||||
<view class="scroll-container">
|
<view class="scroll-container">
|
||||||
<block>
|
<block wx:for="{{bean.guDongList}}" wx:key="index">
|
||||||
<view class="scroll-item">
|
<view class="scroll-item">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<view class="squ-name">姓</view>
|
<view class="squ-name">{{item.surname}}</view>
|
||||||
<view class="squ-full">姓名</view>
|
<view class="squ-full line-1">{{item.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="credit">
|
<view class="credit">
|
||||||
<view class="cre-name">认缴出资额:</view>
|
<view class="cre-name">认缴出资额:</view>
|
||||||
<view class="cre-content">999.99万人名币</view>
|
<view class="cre-content">{{item.chuZi}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="scale">
|
<view class="scale">
|
||||||
<view class="sca-name">持股比例:</view>
|
<view class="sca-name">持股比例:</view>
|
||||||
<view class="sca-content">99.99%</view>
|
<view class="sca-content">{{item.biLi}}%</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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="desc-title">企业介绍</view>
|
<view class="desc-title">企业介绍</view>
|
||||||
<view class="desc-content">
|
<view class="desc-content mt-20">
|
||||||
<image src="/imgs/ic_data_bg.png" style="height: 100rpx;"></image>
|
<rich-text nodes="{{bean.content}}"></rich-text>
|
||||||
<view>企业简介</view>
|
</view>
|
||||||
<view>企业简介</view>
|
<view class="desc-title">联系方式</view>
|
||||||
<view>企业简介</view>
|
<view class="mt-20">地址:{{bean.lianXi.name}}</view>
|
||||||
<view>企业简介</view>
|
<view class="mt-10">电话:{{bean.lianXi.phone}}</view>
|
||||||
<view>企业简介</view>
|
<view class="full-btn mt-20" bind:tap="callPhone">
|
||||||
<view class="full-btn">
|
<image class="icon" src="/imgs/ic_phone_white_icon.png"></image>
|
||||||
<image class="icon" src="/imgs/ic_phone_white_icon.png"></image>
|
<text class="txt">联系我们</text>
|
||||||
<text class="txt">联系我们</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
@ -95,6 +95,10 @@ page {
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
width: 50%;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-item .title {
|
.info-item .title {
|
||||||
@ -255,9 +259,9 @@ page {
|
|||||||
|
|
||||||
.desc-title {
|
.desc-title {
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
font-weight: 500;
|
font-weight: bold;
|
||||||
font-size: 27rpx;
|
font-size: 32rpx;
|
||||||
color: #303030;
|
color: #303030;
|
||||||
line-height: 27rpx;
|
line-height: 32rpx;
|
||||||
margin-top: 60rpx;
|
margin-top: 60rpx;
|
||||||
}
|
}
|
@ -20,6 +20,8 @@ Page({
|
|||||||
imgBasePath: app.globalData.imgPath,
|
imgBasePath: app.globalData.imgPath,
|
||||||
domainInfo: {}, //产业基础
|
domainInfo: {}, //产业基础
|
||||||
isAreaExpand: false,
|
isAreaExpand: false,
|
||||||
|
industryAreaList: [], //产业园区
|
||||||
|
platesList: [], //产业图谱
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -36,15 +38,20 @@ Page({
|
|||||||
_self.getDomainInfo()
|
_self.getDomainInfo()
|
||||||
//特色产业
|
//特色产业
|
||||||
_self.getDomainCategory()
|
_self.getDomainCategory()
|
||||||
|
//产业图谱
|
||||||
|
_self.getPlates()
|
||||||
//重点企业
|
//重点企业
|
||||||
_self.getKeyEnterprise()
|
_self.getKeyEnterprise()
|
||||||
|
//产业园区
|
||||||
|
_self.getIndustryArea()
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
_self.setData({
|
_self.setData({
|
||||||
showPageLoading: false
|
showPageLoading: false
|
||||||
})
|
})
|
||||||
}, 2000);
|
}, 2000);
|
||||||
},
|
},
|
||||||
onReady() {
|
countWidth() {
|
||||||
var _self = this
|
var _self = this
|
||||||
setTimeout(_ => {
|
setTimeout(_ => {
|
||||||
const query = wx.createSelectorQuery().in(this)
|
const query = wx.createSelectorQuery().in(this)
|
||||||
@ -74,6 +81,7 @@ Page({
|
|||||||
}
|
}
|
||||||
}, err => {
|
}, err => {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
|
icon: "none",
|
||||||
title: '网络错误(domainInfo)',
|
title: '网络错误(domainInfo)',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -90,10 +98,41 @@ Page({
|
|||||||
}
|
}
|
||||||
}, err => {
|
}, err => {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
|
icon: "none",
|
||||||
title: '网络错误(domainCategory)',
|
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() {
|
getKeyEnterprise() {
|
||||||
var _self = this
|
var _self = this
|
||||||
@ -106,10 +145,26 @@ Page({
|
|||||||
}
|
}
|
||||||
}, err => {
|
}, err => {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
|
icon: "none",
|
||||||
title: '网络错误(domainEnterprise)',
|
title: '网络错误(domainEnterprise)',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//产业园区
|
||||||
|
getIndustryArea() {
|
||||||
|
var _self = this
|
||||||
|
DomainService.doGetIndustryArea()
|
||||||
|
.then(res => {
|
||||||
|
_self.setData({
|
||||||
|
industryAreaList: res.rows
|
||||||
|
})
|
||||||
|
}, err => {
|
||||||
|
wx.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: '网络错误(IndustryArea)',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
//监听scroll-view滚动
|
//监听scroll-view滚动
|
||||||
scrollPlates(e) {
|
scrollPlates(e) {
|
||||||
var _self = this
|
var _self = this
|
||||||
@ -131,9 +186,9 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
//公司详情
|
//公司详情
|
||||||
showCompany() {
|
showCompany(e) {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/company/company',
|
url: '/pages/company/company?id=' + e.currentTarget.dataset.id,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
@ -141,8 +196,15 @@ Page({
|
|||||||
_self.setData({
|
_self.setData({
|
||||||
showPageLoading: true
|
showPageLoading: true
|
||||||
})
|
})
|
||||||
|
//产业基础
|
||||||
|
_self.getDomainInfo()
|
||||||
|
//特色产业
|
||||||
_self.getDomainCategory()
|
_self.getDomainCategory()
|
||||||
|
//重点企业
|
||||||
_self.getKeyEnterprise()
|
_self.getKeyEnterprise()
|
||||||
|
//产业园区
|
||||||
|
_self.getIndustryArea()
|
||||||
|
_self.getPlates()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
wx.stopPullDownRefresh()
|
wx.stopPullDownRefresh()
|
||||||
_self.setData({
|
_self.setData({
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="unique-items mb-20">
|
<view class="unique-items mb-20">
|
||||||
<block wx:for="{{domainCategoryList}}" wx:key="index">
|
<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}}" />
|
<image src="{{imgBasePath}}{{item.directoriesPhoto}}" />
|
||||||
<text>{{item.directoriesName}}</text>
|
<text>{{item.directoriesName}}</text>
|
||||||
</view>
|
</view>
|
||||||
@ -39,54 +39,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<scroll-view id="plates" scroll-x="true" bindscroll="scrollPlates">
|
<scroll-view id="plates" scroll-x="true" bindscroll="scrollPlates">
|
||||||
<view class="plates-content">
|
<view class="plates-content">
|
||||||
<view class="plates-item">
|
<block wx:for="{{platesList}}" wx:key="index">
|
||||||
<image class="icon" src="/imgs/ic_data_bg.png"></image>
|
<view class="plates-item" bind:tap="goPlates" data-id="{{item.newsContentId}}">
|
||||||
<text class="txt">电子信息</text>
|
<image class="icon" src="{{imgBasePath}}{{item.newsContentCoverList[0].contentCoverId}}"></image>
|
||||||
</view>
|
<text class="txt line-1">{{item.newsContentTitle}}</text>
|
||||||
<view class="plates-item">
|
</view>
|
||||||
<image class="icon" src="/imgs/ic_data_bg.png"></image>
|
</block>
|
||||||
<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>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="slider-bar-box mt-20">
|
<view class="slider-bar-box mt-20">
|
||||||
@ -102,7 +60,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<block wx:for="{{keyEnterpriseList}}" wx:key="index">
|
<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}}" />
|
<image class="icon" src="{{imgBasePath}}{{item.photo}}" />
|
||||||
<view class="enterprise-content">
|
<view class="enterprise-content">
|
||||||
<text class="enterprise-name">{{item.name}}</text>
|
<text class="enterprise-name">{{item.name}}</text>
|
||||||
@ -121,26 +79,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="area-box mt-20">
|
<view class="area-box mt-20">
|
||||||
<view class="area-item" bind:tap="showGarden">
|
<block wx:for="{{industryAreaList}}" wx:key="index">
|
||||||
<image src="/imgs/ic_data_bg.png" mode="aspectFill"></image>
|
<view class="area-item" bind:tap="showGarden">
|
||||||
<text>内蒙古呼和浩特</text>
|
<image src="{{imgBasePath}}{{item.newsContentCoverList[0].contentCoverId}}" mode="aspectFill"></image>
|
||||||
</view>
|
<text>{{item.newsContentTitle}}</text>
|
||||||
<view class="area-item">
|
</view>
|
||||||
<image src="/imgs/ic_data_bg.png" mode="aspectFill"></image>
|
</block>
|
||||||
<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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -61,21 +61,21 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
screenWidth: screenWidth - 34
|
screenWidth: screenWidth - 34
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
var temp = []
|
// var temp = []
|
||||||
for (let i = 0; i < 10; i++) {
|
// for (let i = 0; i < 10; i++) {
|
||||||
temp.push(i)
|
// temp.push(i)
|
||||||
}
|
// }
|
||||||
_self.setData({
|
// _self.setData({
|
||||||
testList: temp
|
// testList: temp
|
||||||
})
|
// })
|
||||||
_self.countWidth()
|
// _self.countWidth()
|
||||||
}, 2000);
|
// }, 2000);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
_self.setData({
|
_self.setData({
|
||||||
showPageLoading: false
|
showPageLoading: false
|
||||||
})
|
})
|
||||||
}, 300);
|
}, 1000);
|
||||||
//获取简介
|
//获取简介
|
||||||
this.getDescVideo()
|
this.getDescVideo()
|
||||||
//介绍
|
//介绍
|
||||||
@ -94,13 +94,13 @@ Page({
|
|||||||
var _self = this
|
var _self = this
|
||||||
IndexService.doGetDescVideo()
|
IndexService.doGetDescVideo()
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log(res)
|
|
||||||
_self.setData({
|
_self.setData({
|
||||||
descVideoUrl: _self.data.imgBasePath + res.rows[0].fileList[0].contentFileFileId,
|
descVideoUrl: _self.data.imgBasePath + res.rows[0].fileList[0].contentFileFileId,
|
||||||
descVideoCover: _self.data.imgBasePath + res.rows[0].fileList[0].contentFileCoverId
|
descVideoCover: _self.data.imgBasePath + res.rows[0].fileList[0].contentFileCoverId
|
||||||
})
|
})
|
||||||
}, err => {
|
}, err => {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
|
icon: "none",
|
||||||
title: '网络错误(video)',
|
title: '网络错误(video)',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -118,6 +118,7 @@ Page({
|
|||||||
}, err => {
|
}, err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
|
icon: "none",
|
||||||
title: '网络错误(简介)',
|
title: '网络错误(简介)',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -145,6 +146,7 @@ Page({
|
|||||||
}, err => {
|
}, err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
|
icon: "none",
|
||||||
title: '网络错误(数据统计)',
|
title: '网络错误(数据统计)',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -161,11 +163,18 @@ Page({
|
|||||||
}
|
}
|
||||||
}, err => {
|
}, err => {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
|
icon: "none",
|
||||||
title: '网络错误(投资机会)',
|
title: '网络错误(投资机会)',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//地区概况,资源条件,气候条件,基础设施
|
goInvestDetail(e) {
|
||||||
|
var id = e.currentTarget.dataset.id
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pages/invest-detail/invest-detail?id=' + id,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//投资环境详情
|
||||||
getInvestArea(id) {
|
getInvestArea(id) {
|
||||||
var _self = this
|
var _self = this
|
||||||
IndexService.doGetInvestArea({
|
IndexService.doGetInvestArea({
|
||||||
@ -179,10 +188,12 @@ Page({
|
|||||||
}
|
}
|
||||||
}, err => {
|
}, err => {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
|
icon: "none",
|
||||||
title: '网络错误(InvestArea)',
|
title: '网络错误(InvestArea)',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//投资优势
|
||||||
getSuperiority() {
|
getSuperiority() {
|
||||||
var _self = this
|
var _self = this
|
||||||
IndexService.doGetSuperiorityList()
|
IndexService.doGetSuperiorityList()
|
||||||
@ -192,12 +203,20 @@ Page({
|
|||||||
superiorityList: res
|
superiorityList: res
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
_self.countWidth()
|
||||||
}, err => {
|
}, err => {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
|
icon: "none",
|
||||||
title: '网络错误(superiority)',
|
title: '网络错误(superiority)',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//投资优势详情
|
||||||
|
goSuperiorityDetail(e) {
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pages/superiority-detail/superiority-detail?id=' + e.currentTarget.dataset.id,
|
||||||
|
})
|
||||||
|
},
|
||||||
//获取投资环境分类
|
//获取投资环境分类
|
||||||
getInvestAreaCategory() {
|
getInvestAreaCategory() {
|
||||||
var _self = this
|
var _self = this
|
||||||
@ -211,6 +230,7 @@ Page({
|
|||||||
}
|
}
|
||||||
}, err => {
|
}, err => {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
|
icon: "none",
|
||||||
title: '网络错误(InvestCategory)',
|
title: '网络错误(InvestCategory)',
|
||||||
})
|
})
|
||||||
console.log(err)
|
console.log(err)
|
||||||
@ -306,4 +326,29 @@ Page({
|
|||||||
url: '/pages/invest/invest',
|
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-loading": "weui-miniprogram/loading/loading",
|
||||||
"mp-actionSheet": "weui-miniprogram/actionsheet/actionsheet",
|
"mp-actionSheet": "weui-miniprogram/actionsheet/actionsheet",
|
||||||
"bottom-sheet": "/components/fui-bottom-popup/fui-bottom-popup"
|
"bottom-sheet": "/components/fui-bottom-popup/fui-bottom-popup"
|
||||||
}
|
},
|
||||||
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
@ -84,7 +84,7 @@
|
|||||||
<scroll-view id="plates" scroll-x="{{true}}" bindscroll="scrollPlates">
|
<scroll-view id="plates" scroll-x="{{true}}" bindscroll="scrollPlates">
|
||||||
<view class="superiority-content">
|
<view class="superiority-content">
|
||||||
<block wx:for="{{superiorityList}}" wx:key="index">
|
<block wx:for="{{superiorityList}}" wx:key="index">
|
||||||
<view class="superiority-item">
|
<view class="superiority-item" bind:tap="goSuperiorityDetail" data-id="{{item.newsDirectoriesId}}">
|
||||||
<image class="superiory-icon" src="{{imgBasePath}}{{item.directoriesPhoto}}"></image>
|
<image class="superiory-icon" src="{{imgBasePath}}{{item.directoriesPhoto}}"></image>
|
||||||
<text class="superiory-txt">{{item.directoriesName}}</text>
|
<text class="superiory-txt">{{item.directoriesName}}</text>
|
||||||
</view>
|
</view>
|
||||||
@ -108,7 +108,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<block wx:for="{{investList}}" wx:key="index">
|
<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="chance-item-title">
|
||||||
<view class="title">{{item.title}}</view>
|
<view class="title">{{item.title}}</view>
|
||||||
<view class="more">查看详情 ></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
|
// pages/policy/policy.js
|
||||||
|
import PolicyService from '../../utils/api/policyApi';
|
||||||
|
const app = getApp();
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
curTab: 1,
|
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
hasMore: true,
|
hasMore: true,
|
||||||
triggered: false,
|
triggered: false,
|
||||||
|
policyList: [], //政策
|
||||||
|
pageShowLoading: true, //显示页面加载
|
||||||
|
currentId: '8e20af26-fed2-4829-a87c-9eddd6311d7c',
|
||||||
|
keywords: '',
|
||||||
|
showContentLoading: true
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
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) {
|
changeTab(e) {
|
||||||
this.setData({
|
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-->
|
<!--pages/policy/policy.wxml-->
|
||||||
<view class="body">
|
<view class="p-body">
|
||||||
<!-- 搜索框 -->
|
<!-- 搜索框 -->
|
||||||
<view class="search-box">
|
<view class="search-box">
|
||||||
<image src="/imgs/ic_search_icon.png"></image>
|
<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>
|
||||||
<view class="policy-tabs">
|
<view class="policy-tabs">
|
||||||
<view class="policy-tab-box" bind:tap="changeTab" data-index="1">
|
<view class="policy-tab-box" bind:tap="changeTab" data-id="8e20af26-fed2-4829-a87c-9eddd6311d7c">
|
||||||
<view class="{{curTab==1? 'policy-tab-select':'policy-tab-normal'}}">国家政策</view>
|
<view class="{{currentId=='8e20af26-fed2-4829-a87c-9eddd6311d7c'? 'policy-tab-select':'policy-tab-normal'}}">国家政策</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="policy-tab-box" bind:tap="changeTab" data-index="2">
|
<view class="policy-tab-box" bind:tap="changeTab" data-id="1f6c4812-40a2-4a54-955d-85f31b3f4630">
|
||||||
<view class="{{curTab==2? 'policy-tab-select':'policy-tab-normal'}}">地方政策</view>
|
<view class="{{currentId=='1f6c4812-40a2-4a54-955d-85f31b3f4630'? 'policy-tab-select':'policy-tab-normal'}}">地方政策</view>
|
||||||
</view>
|
</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}}">
|
<view style="flex:1;position: relative;">
|
||||||
<mp-loading show="{{isLoading}}" type="dot-gray" style="width: 100vw;height:40rpx"></mp-loading>
|
<scroll-view class="scrollarea mt-20" scroll-y type="list">
|
||||||
</block>
|
<view class="container">
|
||||||
</view>
|
<block wx:for="{{policyList}}" wx:key="index">
|
||||||
</scroll-view>
|
<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>
|
</view>
|
@ -1,14 +1,20 @@
|
|||||||
/* pages/policy/policy.wxss */
|
/* pages/policy/policy.wxss */
|
||||||
page {
|
page {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scrollarea {
|
.scrollarea {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
height: 85vh;
|
|
||||||
width: 100vw;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
height: 85vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-box {
|
.search-box {
|
||||||
@ -87,7 +93,7 @@ page {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
padding: 30rpx;
|
margin: 20rpx 40rpx 20rpx 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.policy-item-title {
|
.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", //特色产业
|
domainCategory: "/news-directories/list?directoriesParentId=b04b4dc3-020a-4a9f-a567-464d27f70b19", //特色产业
|
||||||
keyEnterprise: "/query/sql/q2984a0f", //重点企业
|
keyEnterprise: "/query/sql/q2984a0f", //重点企业
|
||||||
domainInfo: "/news-content/listpage?newsDirectoriesId=2c76e2a0-37b2-4144-9d92-64376e5a22c3", //产业基础
|
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 {
|
class DomainService {
|
||||||
static doGetDomainCategory() {
|
static doGetDomainCategory() {
|
||||||
@ -15,9 +19,24 @@ class DomainService {
|
|||||||
static doGetKeyEnterprise() {
|
static doGetKeyEnterprise() {
|
||||||
return request(apiPath.keyEnterprise, "GET")
|
return request(apiPath.keyEnterprise, "GET")
|
||||||
}
|
}
|
||||||
|
static doGetKeyEnterprise(data) {
|
||||||
|
return request(apiPath.keyEnterprise, "GET", data)
|
||||||
|
}
|
||||||
static doGetDomainInfo() {
|
static doGetDomainInfo() {
|
||||||
return request(apiPath.domainInfo, "GET")
|
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;
|
export default DomainService;
|
@ -10,6 +10,8 @@ const apiPath = {
|
|||||||
invest: "/query/sql/q428ea76",
|
invest: "/query/sql/q428ea76",
|
||||||
investAreaInfo: "/news-content/listpage?rows=1&page=1", //地区概况 //资源条件 //气候条件 //基础设施
|
investAreaInfo: "/news-content/listpage?rows=1&page=1", //地区概况 //资源条件 //气候条件 //基础设施
|
||||||
categoryList: "/news-directories/list", //投资优势 投资环境
|
categoryList: "/news-directories/list", //投资优势 投资环境
|
||||||
|
superiosityDetail: "/news-content/listpage?rows=1&page=1", //投资优势详情
|
||||||
|
investDetail: "", //投资机会详情
|
||||||
}
|
}
|
||||||
class IndexService {
|
class IndexService {
|
||||||
static doGetDescVideo() {
|
static doGetDescVideo() {
|
||||||
@ -24,6 +26,9 @@ class IndexService {
|
|||||||
static doGetInvest() {
|
static doGetInvest() {
|
||||||
return request(apiPath.invest, "GET")
|
return request(apiPath.invest, "GET")
|
||||||
}
|
}
|
||||||
|
static doGetInvestDetail(data) {
|
||||||
|
return request(apiPath.invest, "GET", data)
|
||||||
|
}
|
||||||
static doGetInvestArea(data) {
|
static doGetInvestArea(data) {
|
||||||
return request(apiPath.investAreaInfo, "GET", data)
|
return request(apiPath.investAreaInfo, "GET", data)
|
||||||
}
|
}
|
||||||
@ -37,6 +42,9 @@ class IndexService {
|
|||||||
directoriesParentId: 'd3ba3ff5-6d9e-4aed-9331-73e50b5ac598'
|
directoriesParentId: 'd3ba3ff5-6d9e-4aed-9331-73e50b5ac598'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
static doGetSuperiorityDetail(data) {
|
||||||
|
return request(apiPath.superiosityDetail, "GET", data)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default IndexService;
|
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)格式颜色
|
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 = {
|
module.exports = {
|
||||||
formatTime: formatTime,
|
formatTime: formatTime,
|
||||||
formatDate: formatDate,
|
formatDate: formatDate,
|
||||||
randomRgb: randomRgbColor,
|
randomRgb: randomRgbColor,
|
||||||
randomRgba: randomRgbaColor,
|
randomRgba: randomRgbaColor,
|
||||||
randomDark: randomDarkColor,
|
randomDark: randomDarkColor,
|
||||||
randomLight: randomLightColor
|
randomLight: randomLightColor,
|
||||||
|
formatHtml: formatRichText
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user