diff --git a/app.json b/app.json
index 33766be..b1772ee 100644
--- a/app.json
+++ b/app.json
@@ -1,56 +1,56 @@
{
- "pages": [
- "pages/index/index",
- "pages/domain/domain",
- "pages/policy/policy",
- "pages/invest/invest",
- "pages/company/company",
- "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",
- "pages/industry-area/industry-area"
- ],
- "window": {
- "navigationBarTextStyle": "black",
- "navigationBarTitleText": "达拉特招商",
- "navigationBarBackgroundColor": "#ffffff"
- },
- "tabBar": {
- "color": "#797979",
- "selectedColor": "#28804F",
- "borderStyle": "white",
- "list": [
- {
- "pagePath": "pages/index/index",
- "selectedIconPath": "/imgs/ic_bottom_index_sel.png",
- "iconPath": "/imgs/ic_bottom_index_normal.png",
- "text": "首页"
- },
- {
- "pagePath": "pages/domain/domain",
- "selectedIconPath": "/imgs/ic_bottom_domain_sel.png",
- "iconPath": "/imgs/ic_bottom_domain_normal.png",
- "text": "产业"
- },
- {
- "pagePath": "pages/policy/policy",
- "selectedIconPath": "/imgs/ic_bottom_policy_sel.png",
- "iconPath": "/imgs/ic_bottom_policy_normal.png",
- "text": "政策"
- }
- ]
- },
- "style": "v2",
- "componentFramework": "glass-easel",
- "sitemapLocation": "sitemap.json",
- "lazyCodeLoading": "requiredComponents",
- "useExtendedLib": {
- "weui": true
- },
- "usingComponents": {
- "page-loading": "/components/page-loading/page-loading"
- }
+ "pages": [
+ "pages/index/index",
+ "pages/domain/domain",
+ "pages/policy/policy",
+ "pages/invest/invest",
+ "pages/company/company",
+ "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",
+ "pages/industry-area/industry-area"
+ ],
+ "window": {
+ "navigationBarTextStyle": "black",
+ "navigationBarTitleText": "达拉特招商",
+ "navigationBarBackgroundColor": "#ffffff"
+ },
+ "tabBar": {
+ "color": "#797979",
+ "selectedColor": "#28804F",
+ "borderStyle": "white",
+ "list": [{
+ "pagePath": "pages/index/index",
+ "selectedIconPath": "/imgs/ic_bottom_index_sel.png",
+ "iconPath": "/imgs/ic_bottom_index_normal.png",
+ "text": "首页"
+ },
+ {
+ "pagePath": "pages/domain/domain",
+ "selectedIconPath": "/imgs/ic_bottom_domain_sel.png",
+ "iconPath": "/imgs/ic_bottom_domain_normal.png",
+ "text": "产业"
+ },
+ {
+ "pagePath": "pages/policy/policy",
+ "selectedIconPath": "/imgs/ic_bottom_policy_sel.png",
+ "iconPath": "/imgs/ic_bottom_policy_normal.png",
+ "text": "政策"
+ }
+ ]
+ },
+ "style": "v2",
+ "componentFramework": "glass-easel",
+ "sitemapLocation": "sitemap.json",
+ "lazyCodeLoading": "requiredComponents",
+ "useExtendedLib": {
+ "weui": true
+ },
+ "usingComponents": {
+ "page-loading": "/components/page-loading/page-loading",
+ "container-loading": "/components/container-loading/container-loading"
+ }
}
\ No newline at end of file
diff --git a/app.wxss b/app.wxss
index 9a5b8f3..cba2cfb 100644
--- a/app.wxss
+++ b/app.wxss
@@ -137,11 +137,18 @@ page::after {
flex-direction: row;
justify-content: center;
align-items: center;
- padding: 20rpx;
+ padding: 30rpx;
background: linear-gradient(0deg, #6AC191 0%, #256742 100%);
border-radius: 7rpx;
}
+.address {
+ font-family: Source Han Sans CN;
+ font-weight: 500;
+ font-size: 24rpx;
+ color: #454545;
+}
+
.full-btn:active {
background: linear-gradient(0deg, #a6eec6 0%, #63bb89 60%);
}
@@ -210,6 +217,14 @@ page::after {
width: 100%;
}
+.desc-font-24 {
+ font-size: 24rpx;
+ font-weight: 400;
+ font-size: 20rpx;
+ color: #6F6F6F;
+ line-height: 32rpx;
+}
+
.expand-btn {
float: right;
@@ -248,6 +263,14 @@ page::after {
justify-content: center;
align-items: flex-start;
padding: 42rpx;
- font-size: 28rpx;
+ font-size: 24rpx;
color: #242424;
+}
+
+.item-loading {
+ min-height: 100rpx;
+ align-items: center;
+ align-self: center;
+ justify-content: center;
+ margin-top: 70rpx;
}
\ No newline at end of file
diff --git a/components/container-loading/container-loading.js b/components/container-loading/container-loading.js
new file mode 100644
index 0000000..a0565e4
--- /dev/null
+++ b/components/container-loading/container-loading.js
@@ -0,0 +1,30 @@
+// components/container-loading/container-loading.js
+Component({
+
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ loadingState: {
+ type: Boolean,
+ value: true
+ }
+ },
+ observers: {
+ 'loadingState': function (newVal) {
+ this.setData({
+ loadingVisible: newVal
+ });
+ }
+ },
+ data: {
+ loadingVisible: true
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+
+ }
+})
\ No newline at end of file
diff --git a/components/container-loading/container-loading.json b/components/container-loading/container-loading.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/components/container-loading/container-loading.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/container-loading/container-loading.wxml b/components/container-loading/container-loading.wxml
new file mode 100644
index 0000000..0060029
--- /dev/null
+++ b/components/container-loading/container-loading.wxml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/container-loading/container-loading.wxss b/components/container-loading/container-loading.wxss
new file mode 100644
index 0000000..9289783
--- /dev/null
+++ b/components/container-loading/container-loading.wxss
@@ -0,0 +1,48 @@
+.container {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: flex-start;
+ width: 100%;
+ min-height: 200rpx;
+}
+
+.loading {
+ position: relative;
+ width: 40px;
+ perspective: 500px;
+ align-self: center;
+ margin-top: 80rpx;
+}
+
+.loading:before,
+.loading:after {
+ position: absolute;
+ width: 15px;
+ height: 15px;
+ 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;
+ }
+}
\ No newline at end of file
diff --git a/pages/company/company.wxml b/pages/company/company.wxml
index dbf7a0f..37f1fd7 100644
--- a/pages/company/company.wxml
+++ b/pages/company/company.wxml
@@ -72,12 +72,12 @@
企业介绍
-
+
联系方式
- 地址:{{bean.lianXi.name}}
- 电话:{{bean.lianXi.phone}}
+ 地址:{{bean.lianXi.name}}
+ 电话:{{bean.lianXi.phone}}
联系我们
diff --git a/pages/domain/domain.js b/pages/domain/domain.js
index c7d34f8..384341d 100644
--- a/pages/domain/domain.js
+++ b/pages/domain/domain.js
@@ -21,7 +21,11 @@ Page({
domainInfo: {}, //产业基础
isAreaExpand: false,
industryAreaList: [], //产业园区
- platesList: [], //产业图谱
+ platesList: [], //产业图谱,
+ domainCategoryLoading: true, //特色产业
+ platesLoading: true, //产业图谱
+ keyEnterpriseLoading: true, //重点企业
+ industryLoading: true, //开发园区
},
/**
@@ -49,7 +53,7 @@ Page({
_self.setData({
showPageLoading: false
})
- }, 2000);
+ }, 500);
},
countWidth() {
var _self = this
@@ -89,8 +93,14 @@ Page({
//特色产业
getDomainCategory() {
var _self = this
+ _self.setData({
+ domainCategoryLoading: true
+ })
DomainService.doGetDomainCategory()
.then(res => {
+ _self.setData({
+ domainCategoryLoading: false
+ })
if (res) {
_self.setData({
domainCategoryList: res
@@ -112,8 +122,14 @@ Page({
//产业图谱
getPlates() {
var _self = this
+ _self.setData({
+ platesLoading: true
+ })
DomainService.doGetPlates()
.then(res => {
+ _self.setData({
+ platesLoading: false
+ })
if (res) {
_self.setData({
platesList: res.rows
@@ -136,8 +152,14 @@ Page({
//重点企业
getKeyEnterprise() {
var _self = this
+ _self.setData({
+ keyEnterpriseLoading: true
+ })
DomainService.doGetKeyEnterprise()
.then(res => {
+ _self.setData({
+ keyEnterpriseLoading: false
+ })
if (res) {
_self.setData({
keyEnterpriseList: res
@@ -153,11 +175,19 @@ Page({
//产业园区
getIndustryArea() {
var _self = this
+ _self.setData({
+ industryLoading: true
+ })
DomainService.doGetIndustryArea()
.then(res => {
_self.setData({
- industryAreaList: res.rows
+ industryLoading: false
})
+ if (res && res.rows) {
+ _self.setData({
+ industryAreaList: res.rows
+ })
+ }
}, err => {
wx.showToast({
icon: "none",
@@ -210,7 +240,7 @@ Page({
_self.setData({
showPageLoading: false
})
- }, 2000);
+ }, 500);
},
//园区详情
showGarden(e) {
diff --git a/pages/domain/domain.wxml b/pages/domain/domain.wxml
index 3192bc5..26515c1 100644
--- a/pages/domain/domain.wxml
+++ b/pages/domain/domain.wxml
@@ -4,7 +4,7 @@
{{domainInfo.newsContentTitle}}
-
+
@@ -20,16 +20,19 @@
特色产业
-
-
-
-
- {{item.directoriesName}}
-
-
-
+
+
+
+
+
+ {{item.directoriesName}}
+
+
+
+
+
@@ -37,19 +40,24 @@
产业图谱
-
-
-
-
-
- {{item.newsContentTitle}}
+
+
+
+
+
+
+
+ {{item.newsContentTitle}}
+
+
-
-
-
-
-
+
+
+
+
+
+
@@ -59,16 +67,20 @@
重点企业
-
-
-
-
- {{item.name}}
- 社会信用代码:{{item.number}}
-
+
+
+
+
+
+
+ {{item.name}}
+ 社会信用代码:{{item.number}}
+
+
+
+
-
-
+
@@ -78,14 +90,16 @@
开发园区
-
-
-
-
- {{item.newsContentTitle}}
-
-
-
+
+
+
+
+
+ {{item.newsContentTitle}}
+
+
+
+
\ No newline at end of file
diff --git a/pages/index/index.js b/pages/index/index.js
index 0c42c82..b63aba5 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -42,6 +42,9 @@ Page({
imgBasePath: app.globalData.imgPath,
superiorityList: [], //投资优势,
investAreaList: [], //投资环境List
+ investLoading: true,
+ isLoading: true,
+ showInvestLoading: true
},
onLoad(e) {
var _self = this
@@ -61,16 +64,6 @@ 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(() => {
_self.setData({
showPageLoading: false
@@ -89,6 +82,15 @@ Page({
//投资环境
this.getSuperiority()
},
+ onReady() {
+ this.videoContext = wx.createVideoContext('descVideo', this); // 创建videoContext实例
+ console.log(this.videoContext)
+ },
+ onShow() {
+ if (this.videoContext) {
+ this.videoContext.pause()
+ }
+ },
//视频介绍
getDescVideo() {
var _self = this
@@ -154,8 +156,14 @@ Page({
//投资机会
getInvest() {
var _self = this
+ _self.setData({
+ showInvestLoading: true
+ })
IndexService.doGetInvest()
.then(res => {
+ _self.setData({
+ showInvestLoading: false
+ })
if (res) {
_self.setData({
investList: res
@@ -177,10 +185,16 @@ Page({
//投资环境详情
getInvestArea(id) {
var _self = this
+ _self.setData({
+ investLoading: true
+ })
IndexService.doGetInvestArea({
newsDirectoriesId: id
})
.then(res => {
+ _self.setData({
+ investLoading: false
+ })
if (res) {
_self.setData({
investAreaBean: res.rows[0]
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 2e08a58..da0d52e 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -2,12 +2,12 @@
-
+
达拉特旗
{{ isExpand ? collapseText : expandText }}
-
+
@@ -65,15 +65,19 @@
-
-
-
+
+
+
+
+
+
+
+
+ {{isAreaExpand?'收取':'查看全部'}}
+
+
-
-
- {{isAreaExpand?'收取':'查看全部'}}
-
-
+
@@ -107,38 +111,42 @@
-->
-
-
-
- {{item.title}}
- 查看详情 >
-
-
-
-
-
-
- 预计总投资
- {{item.money}}{{item.moneyUnit}}
+
+
+
+
+
+ {{item.title}}
+ 查看详情 >
+
+
+
+
+
+
+ 预计总投资
+ {{item.money}}{{item.moneyUnit}}
+
+
+
+ 所属产业
+ {{item.type}}
+
+
+
+ 占地面积
+ {{item.area}}{{item.areaUnit}}
+
+
+
+ 用地类型
+ {{item.landType}}
+
+
-
-
- 所属产业
- {{item.type}}
-
-
-
- 占地面积
- {{item.area}}{{item.areaUnit}}
-
-
-
- 用地类型
- {{item.landType}}
-
-
+
-
+
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index aab6f9d..3b2ae53 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -8,7 +8,7 @@
position: relative;
overflow: hidden;
line-height: 1.5;
- font-size: 24rpx;
+ font-size: 20rpx;
color: #6F6F6F;
text-align: justify;
max-height: calc(3em * 1.5);
@@ -192,6 +192,13 @@
line-height: 40rpx;
text-indent: 2em;
}
+.invest-box{
+ display: flex;
+ flex-direction: column;
+ flex: content;
+ justify-content: center;
+ align-items: flex-start;
+}
.slider-bar-box {
width: 40px;
diff --git a/pages/industry-area/industry-area.wxml b/pages/industry-area/industry-area.wxml
index 51f7c5f..426408c 100644
--- a/pages/industry-area/industry-area.wxml
+++ b/pages/industry-area/industry-area.wxml
@@ -1,8 +1,7 @@
{{bean.title}}
- 发布:{{bean.newsContentAuthor}}
- 发布时间:{{bean.newsContentPublishTime}}
+ {{bean.newsContentPublishTime}} {{bean.newsContentAuthor}}
diff --git a/pages/plates/plates.wxml b/pages/plates/plates.wxml
index 91ad5b8..0e41ae0 100644
--- a/pages/plates/plates.wxml
+++ b/pages/plates/plates.wxml
@@ -1,8 +1,7 @@
{{bean.title}}
- 发布:{{bean.newsContentAuthor}}
- 发布时间:{{bean.newsContentPublishTime}}
+ {{bean.newsContentPublishTime}} {{bean.newsContentAuthor}}
diff --git a/pages/policy-detail/policy-detail.wxml b/pages/policy-detail/policy-detail.wxml
index 91ad5b8..0e41ae0 100644
--- a/pages/policy-detail/policy-detail.wxml
+++ b/pages/policy-detail/policy-detail.wxml
@@ -1,8 +1,7 @@
{{bean.title}}
- 发布:{{bean.newsContentAuthor}}
- 发布时间:{{bean.newsContentPublishTime}}
+ {{bean.newsContentPublishTime}} {{bean.newsContentAuthor}}
diff --git a/pages/superiority-detail/superiority-detail.wxml b/pages/superiority-detail/superiority-detail.wxml
index 91ad5b8..25aa7b8 100644
--- a/pages/superiority-detail/superiority-detail.wxml
+++ b/pages/superiority-detail/superiority-detail.wxml
@@ -1,8 +1,7 @@
{{bean.title}}
- 发布:{{bean.newsContentAuthor}}
- 发布时间:{{bean.newsContentPublishTime}}
+ {{bean.newsContentPublishTime}} {{bean.newsContentAuthor}}
diff --git a/pages/unique-detail/unique-detail.wxml b/pages/unique-detail/unique-detail.wxml
index 62af853..42e6804 100644
--- a/pages/unique-detail/unique-detail.wxml
+++ b/pages/unique-detail/unique-detail.wxml
@@ -1,8 +1,7 @@
{{bean.title}}
- 发布:{{bean.newsContentAuthor}}
- 发布时间:{{bean.newsContentPublishTime}}
+ {{bean.newsContentPublishTime}} {{bean.newsContentAuthor}}
diff --git a/utils/util.js b/utils/util.js
index 0105d2d..0db9dc1 100644
--- a/utils/util.js
+++ b/utils/util.js
@@ -90,6 +90,22 @@ const formatRichText = (html) => {
newContent = newContent.replace(/\
{
+ // 匹配
标签
+ let imgTags = richText.match(/
]*>/g);
+ if (imgTags) {
+ imgTags.forEach((imgTag) => {
+ // 去除 style 属性
+ let newImgTag = imgTag.replace(/ style="[^"]*"/g, '');
+ richText = richText.replace(imgTag, newImgTag);
+ });
+ }
+ return richText;
+}
module.exports = {
formatTime: formatTime,
formatDate: formatDate,
@@ -97,5 +113,6 @@ module.exports = {
randomRgba: randomRgbaColor,
randomDark: randomDarkColor,
randomLight: randomLightColor,
- formatHtml: formatRichText
+ formatHtml: formatRichText,
+ removeImgStyle: removeImgStyleFromRichText
}
\ No newline at end of file