作者 朱振飞

修改

... ... @@ -82,6 +82,25 @@ App({
});
return promise;
},
timeFormate(timestamp, timeType) {
if (timestamp) {
var timeStamp = timestamp.length == 13 ? timestamp : timestamp * 1000
var date = new Date(timeStamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
var Y = date.getFullYear() + '-';
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
var D = date.getDate() + ' ';
var h = date.getHours() + ':';
var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes());
var s = date.getSeconds();
if (timeType == 'YYMMDD') {
return Y + M + D;
} else if (timeType == 'YYMMDDHHMM') {
return Y + M + D + " " + h + m;
} else {
return h + m;
}
}
},
globalData: {
userInfo: null,
baseUrl:'https://lqz.w.brotop.cn'
... ...
<!--pages/attract/articleDetail/articleDetail.wxml-->
<view class='title margin_set'>{{detail.title}}</view>
<view class='content margin_set'>
<view class='article'>
<view class='from' hidden='{{!detail.source}}'>来源:{{detail.source}}</view>
<view class='time'>{{detail.create_time_text}}</view>
</view>
<import src="/wxParse/wxParse.wxml" />
<template is="wxParse" data="{{wxParseData:contentHtml.nodes}}" />
</view>
\ No newline at end of file
... ...
... ... @@ -13,4 +13,14 @@ padding: 52rpx 0 40rpx;
}
.content{
padding-bottom: 40rpx;
}
.article{
margin-bottom: 20rpx;
display: flex;
font-size: 28rpx;
color: #666;
font-weight: normal;
}
.form{
margin-right: 30rpx;
}
\ No newline at end of file
... ...
... ... @@ -33,8 +33,8 @@ Page({
windowWidth: res.windowWidth,
tabWidth: res.windowWidth - 39
})
},
});
}
}),this.policyType();
},
policyType(){
let url = '/api/Article/category',a = this;
... ... @@ -46,7 +46,6 @@ Page({
a.getList(res[0].id,1)
})
},
chooseLocation(){
wx.chooseLocation({
success: function(res) {},
... ... @@ -96,7 +95,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.policyType()
},
/**
... ...
<!--pages/attract/attract.wxml-->
<view class='top_banner'>
<view class='top_view'>
<view class='top_banner'>
<image src='/images/zhaoshang.png' width='100%' mode='widthFix' bindtap='bannerDetail' id='1'></image>
</view>
... ... @@ -12,10 +13,12 @@
</view>
</block>
</scroll-view>
<view class='paixun'>
<!-- <view class='paixun'>
<image src='/images/shaixuan@3x.png' mode='widthFix'></image>
</view>
</view> -->
</view>
</view>
<!-- 新闻 -->
<scroll-view bindscroll="scroll" bindscrolltolower="getMore" class="news_detail_container" hidden='{{!ifData}}' scrollTop="{{scrollTop}}" scrollY="true" style="height:{{windowHeight-200}}px;">
<view class='news_detail_items'>
... ... @@ -24,12 +27,12 @@
<view class='new_info'>
<view class='new_title'><text class='recommond' wx:if='{{item.recommend}}'>推荐</text>{{item.title}}</view>
<view class='new_time_address'>
<view class='form' wx:if="{{item.from}}">{{item.from}}</view>
<view class='form' wx:if="{{item.from}}">{{item.source}}</view>
<view class='time'>{{item.create_time_text}}</view>
</view>
</view>
<view class='new_info_image' wx:if="{{item.photos.length>0}}">
<image src='{{item.photos[0]}}' mode='widthFix'></image>
<image src='{{item.thumb_image}}' mode='widthFix'></image>
</view>
</navigator>
</block>
... ...
... ... @@ -5,11 +5,15 @@ page{
.top_banner image{
width: 100%;
}
.top_view{
background: #F7F7F7;
}
.top_banner{
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 101;
}
.menu_content{
display: flex;
... ... @@ -17,6 +21,7 @@ page{
top: 320rpx;
left: 0;
width: 100%;
z-index: 101;
}
.menu_items{
display: flex;
... ... @@ -62,7 +67,8 @@ page{
}
.news_detail_container{
background: #FFF;
margin-top: 390rpx;
margin-top: 195px;
position: relative;
}
.news_detail_items{
margin: 0 32rpx;
... ...
... ... @@ -30,7 +30,14 @@ Page({
WxParse.wxParse('contentHtml', 'html', r.content, d, 5);
})
},
makePhone(e){
wx.makePhoneCall({
phoneNumber: e.currentTarget.dataset.phone,
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
... ...
... ... @@ -21,27 +21,27 @@
<view class='zixun_container'>
<view class='zixun_item'>
<view class='zixun_icon phone'>
<image src='/images/zuoji@3x.png' mode='aspectFit'></image>
<image src='/images/zuoji@3x.png' mode='widthFix'></image>
</view>
<view class='zixun_content'>{{detail.phone}}</view>
<view class='zixun_content' bindtap='makePhone' data-phone='{{detail.phone}}'>{{detail.phone}}</view>
</view>
<view class='zixun_item'>
<view class='zixun_icon email'>
<image src='/images/mail@3x.png' mode='aspectFit'></image>
<image src='/images/mail@3x.png' mode='widthFix'></image>
</view>
<view class='zixun_content'>{{detail.email}}</view>
</view>
<view class='zixun_item'>
<view class='zixun_icon '>
<image src='/images/erweima@3x.png' mode='aspectFit'></image>
<view class='zixun_item' hidden="{{detail.wechat.length==0}}">
<view class='zixun_icon chat'>
<image src='/images/wechat.png' mode='widthFix'></image>
</view>
<view class='zixun_content'>
<view class='erwei_code'>
<view class='img_box'>
<image src='/images/erwer_code.png' mode='widthFix'></image>
<view class='img_box' wx:for='{{detail.wechat}}' wx:key=''>
<image src='{{item}}' mode='widthFix'></image>
</view>
<view class='img_box'>
<image src='/images/erwer_code.png' mode='widthFix'></image>
<image src='{{item}}' mode='widthFix'></image>
</view>
</view>
<view>扫描二维码,关注公众号</view>
... ... @@ -49,4 +49,7 @@
</view>
</view>
</view>
<view class='note'>
<text>李七庄街的产能价值,期待归企业的挖掘!</text>
</view>
</view>
\ No newline at end of file
... ...
/* pages/attract/detail/detail.wxss */
page{
height: 100%;
}
.video_box {
width: 100%;
height: 430rpx;
... ... @@ -7,6 +10,10 @@
background-color: rgba(0,0,0,.6);
position: relative;
}
.main_container{
position: relative;
min-height: 100%;
}
.video_icon{
width: 96rpx;
height: 96rpx;
... ... @@ -33,8 +40,9 @@
.single_item_container{
margin-top: 30rpx;
border-bottom: 2rpx solid #f5f5f5;
min-height: 400rpx;
}
.main_container .single_item_container::last-child{
height: auto;
}
.top_label{
padding: 20rpx 0;
... ... @@ -62,30 +70,33 @@
}
.zixun_container{
padding-left: 56rpx;
padding-bottom: 70rpx;
}
.zixun_item{
display: flex;
justify-content: flex-start;
margin: 30rpx 0;
align-items: center;
}
.zixun_icon{
width: 46rpx;
height: 46rpx;
width: 60rpx;
align-self: flex-start;
}
.chat{
width: 54rpx;
position: relative;
left: -4rpx;
}
.email{
width: 46rpx;
height: 30rpx;
}
.phone{
width: 42rpx;
height: 42rpx;
width: 46rpx;
}
.zixun_icon image {
width: 100%;
height: 100%;
display: block;
}
.zixun_content{
font-size: 28rpx;
... ... @@ -108,4 +119,38 @@
}
.zhaoshang_desc{
margin: 0 40rpx;
padding: 30rpx 0;
}
.note{
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: #666;
height: 120rpx;
position: absolute;
left: 0;
bottom: 0;
width: 100%;
}
.note text{
position: relative;
}
.note text:before{
position: absolute;
top: 50%;
width: 50rpx;
height: 2rpx;
content: '';
background-color:#999;
left: -60rpx;
}
.note text:after{
position: absolute;
top: 50%;
width: 50rpx;
height: 2rpx;
content: '';
background-color:#999;
right: -60rpx;
}
\ No newline at end of file
... ...
... ... @@ -15,13 +15,14 @@ Page({
t.setData({
id:options.id
}),t.d(options.id),t.c()
},
d(id){
let url = '/api/interact/getPostsDetail',params = {
id:id
},t = this;
A.post(url,params).then((r)=>{
console.log(r)
r.images = r.images.split(',');
t.setData({
detail:r
})
... ... @@ -78,6 +79,30 @@ Page({
startComment: true
})
},
delArticle(e) {
let t = this, id = e.currentTarget.id, url = '/api/interact/deletePosts', params = {
id: id
}, index = e.currentTarget.dataset.indx;
wx.showModal({
title: '提示',
content: '确认删除这个帖子吗?',
success: (r) => {
if (r.confirm) {
A.post(url, params).then((rt) => {
wx.showToast({
title: '删除成功',
icon: 'none',
duration: 1300
})
setTimeout(() => {
wx.navigateBack({ })
}, 1000);
})
}
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
... ...
... ... @@ -29,7 +29,7 @@
{{detail.create_time_text}}
</view>
<!-- 删除 -->
<view class='item_delete' hidden='{{detail.is_mine==0}}' bindtap='del'>
<view class='item_delete' hidden='{{detail.is_mine==0}}' bindtap='delArticle' id='{{detail.id}}'>
删除
</view>
</view>
... ... @@ -81,9 +81,9 @@
<view class='time_bottom_left'>
{{item.create_time_text}}
</view>
<view class='time_bottom_left'>
<view class='time_bottom_left' bindtap='zan' id='{{item.id}}' data-indx = '{{index}}' data-type='{{item.is_like}}'>
<view>{{item.likes}}</view>
<view class='time_bottom_left_pic' bindtap='zan' id='{{item.id}}' data-indx = '{{index}}' data-type='{{item.is_like}}'>
<view class='time_bottom_left_pic'>
<image src='/images/zan@3x.png' wx:if="{{item.is_like==0}}"></image>
<image src='/images/thumb-up-button@3x.png' wx:else></image>
</view>
... ...
... ... @@ -31,8 +31,8 @@ page{
opacity:1;
}
.item_mid_box_pic{
width:256rpx;
height:256rpx;
width:216rpx;
height:216rpx;
background:rgba(0,0,0,0);
opacity:1;
display: flex;
... ...
... ... @@ -32,6 +32,11 @@ Page({
},
}), this.postList();
},
subArticle() {
wx.navigateTo({
url: '/pages/interact/interactPost/interactPost',
})
},
zan(e){
let url = '/api/interact/setLike',params = {
object_id: e.currentTarget.id,
... ... @@ -45,6 +50,32 @@ Page({
})
})
},
delArticle(e) {
console.log(e)
let t = this, id = e.currentTarget.id, url = '/api/interact/deletePosts', params = {
id: id
}, index = e.currentTarget.dataset.indx;
wx.showModal({
title: '提示',
content: '确认删除这个帖子吗?',
success: (r) => {
if (r.confirm) {
A.post(url, params).then((rt) => {
wx.showToast({
title: '删除成功',
icon: 'none',
duration: 1300
})
t.data.postList.splice(index, 1);
t.setData({
postList: t.data.postList
})
})
}
}
})
},
navdetail(e) {
wx.navigateTo({
url: '/pages/colleagues_2/colleagues_2?id='+e.currentTarget.id,
... ... @@ -52,10 +83,13 @@ Page({
},
getzixun() {
let url = '/api/interact/getQuestionList', d = this, params = {
header: true,
page: d.data.page
};
A.post(url, params, false).then((r) => {
for(let b of r.data){
b.create_time = A.timeFormate(b.create_time, 'YYMMDDHHMM')
b.reply_time = A.timeFormate(b.reply_time,'YYMMDDHHMM')
}
let list = d.data.zixunList.concat(r.data);
d.setData({
zixunList: list
... ... @@ -77,17 +111,33 @@ Page({
page: d.data.page
};
A.post(url, params, false).then((r) => {
for(let b of r.data){
b.images = b.images.split(',')
}
let list = d.data.postList.concat(r.data);
d.setData({
postList: list
postList: list,
comment: r.new_comment
})
list.length == 0 ? d.setData({
ifData: !0,
}) : (r.data.length < r.per_page ? d.setData({
noMore: !0
}) : "")
wx.stopPullDownRefresh()
})
},
getMore(){
console.log(1)
let t = this;
t.setData({
page: t.data.page++
})
!t.data.noMore ? (t.data.currentTab == '0' ? t.getzixun():t.postList()):wx.showToast({
title: '没有更多了',
icon:'none'
})
},
askQuestion() {
... ... @@ -145,10 +195,13 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.checkstatus()
this.setData({
zixunList: []
zixunList: [],
postList:[],
page: 1
})
this.checkstatus()
this.data.currentTab=='0'?this.getzixun():this.postList()
},
/**
... ... @@ -169,14 +222,19 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.checkstatus()
this.setData({
zixunList: [],
postList: [],
page: 1
})
this.data.currentTab == '0' ? this.getzixun() : this.postList()
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
... ...
... ... @@ -2,5 +2,6 @@
"usingComponents": {},
"navigationBarTitleText": "政企服务平台",
"navigationBarBackgroundColor": "#169BD5",
"navigationBarTextStyle": "white"
"navigationBarTextStyle": "white",
"enablePullDownRefresh": true
}
\ No newline at end of file
... ...
<view class="nav mainindex_nav top">
<view wx:for="{{navbar}}" data-idx="{{index}}" class="nav_item {{currentTab==index ? 'active' : ''}}" wx:key="unique" bindtap="navbarTap" data-categoryid="{{item.id}}">{{item.name}}</view>
</view>
<scroll-view wx:if='{{auth=="2"}}' style='height:{{winHeight}}px' scroll-y="true">
<view class="none-box" hidden="{{!ifData}}">
<view>暂无相关咨询</view>
</view>
<view class='box_left' wx:if="{{currentTab==0}}">
<view class='mid' bindtap="jump" hidden='{{ifData}}'>
<view class='mid_item' wx:for='{{zixunList}}' wx:key=''>
<view class='mid_item_left'>
<image src='../../images/tishi@3x.png'></image>
<scroll-view wx:if='{{auth=="2"}}' class='main_container' style='height:{{winHeight}}px' scroll-y="true" bindscrolltolower='getMore'>
<view class="none-box" hidden="{{!ifData}}">
<view>暂无相关咨询</view>
</view>
<view class='box_left' wx:if="{{currentTab==0}}">
<view class='mid' bindtap="jump" hidden='{{ifData}}'>
<view class='mid_item' wx:for='{{zixunList}}' wx:key=''>
<view class='mid_item_left'>
<image src='../../images/tishi@3x.png'></image>
</view>
<view class='mid_item_right'>
<view class='mid_item_right_top'>
{{item.question}}?
<view class='mid_label' hidden='{{item.is_show_state}}'>
<image src='../../images/huifujishi@3x.png' wx:if="{{item.state==1}}"></image>
<image src='../../images/huifuyiban@3x.png' wx:elif='{{item.state==2}}'></image>
<image src='../../images/huifuzhihuan @3x.png' wx:elif='{{item.state==3}}'></image>
</view>
</view>
<view class='mid_item_right_bottom'>
发布时间: {{item.create_time}}
</view>
<view class='mid_item_right'>
<view class='mid_item_right_top'>
{{item.question}}?
<view class='mid_label' hidden='{{item.is_show_state}}'>
<image src='../../images/huifujishi@3x.png' wx:if="{{item.state==1}}"></image>
<image src='../../images/huifuyiban@3x.png' wx:elif='{{item.state==2}}'></image>
<image src='../../images/huifuzhihuan @3x.png' wx:elif='{{item.state==3}}'></image>
</view>
<!-- 回复 -->
<view class='response_box' hidden='{{item.state==0}}'>
<!-- 回复内容 -->
<view class='mid_item_right_response'>
<text class='color_blue'>回复:</text> {{item.reply}}
</view>
<!-- 回复时间 -->
<view class='mid_item_right_bottom'>
发布时间: {{item.create_time_text}}
</view>
<!-- 回复 -->
<view class='response_box' hidden='{{item.state==0}}'>
<!-- 回复内容 -->
<view class='mid_item_right_response'>
<text class='color_blue'>回复:</text> {{item.reply}}
</view>
<!-- 回复时间 -->
<view class='mid_item_right_bottom'>
回复时间:{{item.reply_time_text}}
</view>
</view>
<view class='waiting_response' hidden='{{item.state!=0}}'>
等待回复中.....
回复时间:{{item.reply_time}}
</view>
</view>
<view class='waiting_response' hidden='{{item.state!=0}}'>
等待回复中.....
</view>
</view>
</view>
</view>
<!-- 提问 -->
<view class='bottom' hidden='{{show}}'>
<view class='bottom_question' bindtap='askQuestion'>
提问
</view>
<!-- 提问 -->
<view class='bottom' hidden='{{show}}'>
<view class='bottom_question' bindtap='askQuestion'>
提问
</view>
</view>
<!-- 企话吧 -->
<view class='box_right' wx:if="{{currentTab==1}}">
<view class='mid'>
<!-- 标题 -->
<view class='mid_title'>
有一条新评论 >
</view>
<!-- 条目 -->
<view class='mid_item' wx:for='{{postList}}' wx:key=''>
<view class='mid_item_top' bindtap='navdetail' id='{{item.id}}'>
<view class='mid_item_top_left'>
<!-- 图片 -->
<view class='mid_item_top_left_pic'>
<image src='{{item.avatar||"../../images/03_nav@2x.png"}}'></image>
</view>
<!-- 文字 -->
<view class='mid_item_top_left_text'>
{{item.title}}
</view>
</view>
<!-- 企话吧 -->
<view class='box_right' wx:if="{{currentTab==1}}">
<view class='add_notice' bindtap='subArticle'>
<image src='../../images/add.png' mode='widthFix'></image>
</view>
<view class='mid'>
<!-- 标题 -->
<view class='mid_title' hidden='{{!comment}}'>
有{{comment.length}}条新评论 >
</view>
<!-- 条目 -->
<view class='mid_item' wx:for='{{postList}}' wx:key=''>
<view class='mid_item_top' bindtap='navdetail' id='{{item.id}}'>
<view class='mid_item_top_left'>
<!-- 图片 -->
<view class='mid_item_top_left_pic'>
<image src='{{item.avatar||"../../images/03_nav@2x.png"}}'></image>
</view>
<view class='mid_item_top_right'>
{{item.create_time_text}}
<!-- 文字 -->
<view class='mid_item_top_left_text'>
{{item.title}}
</view>
</view>
<!-- 文字内容 -->
<view class='mid_item_text' bindtap='navdetail' id='{{item.id}}'>
{{item.content}}
<view class='mid_item_top_right'>
{{item.create_time_text}}
</view>
<!-- 图片 -->
<view class='mid_pic_box' wx:if='{{item.images}}'>
<view class='mid_pic_box_item' wx:for="{{item.images}}" wx:key='' wx:for-item='sec'>
<image src='{{sec}}'></image>
</view>
</view>
<!-- 文字内容 -->
<view class='mid_item_text' bindtap='navdetail' id='{{item.id}}'>
{{item.content}}
</view>
<!-- 图片 -->
<view class='mid_pic_box' wx:if='{{item.images}}' bindtap='navdetail' id='{{item.id}}'>
<view class='mid_pic_box_item' wx:for="{{item.images}}" wx:key='' wx:for-item='sec'>
<image src='{{sec}}'></image>
</view>
</view>
<!-- 底部 -->
<view class='mid_item_like'>
<view class='mid_item_like_left'>
<text hidden='{{item.is_can_del=="0"}}' id='{{item.id}}' bindtap='delArticle' data-indx='{{index}}'>删除</text>
</view>
<!-- 底部 -->
<view class='mid_item_like'>
<view class='mid_item_like_left' >
<text hidden='{{item.is_can_del=="0"}}' id='{{item.id}}' bindtap='delete'>删除</text>
<view class='mid_item_like_right'>
<!-- 点赞 -->
<view class='mid_like color_blue' bindtap='zan' id='{{item.id}}' data-idx='{{index}}' data-type='{{item.is_like}}'>
<image src='../../images/thumb-up-button@3x.png' wx:if='{{item.is_like==1}}'></image>
<image src='../../images/dainzan@3x.png' wx:else></image>
</view>
<view class='mid_number color_blue'>
{{item.likes}}
</view>
<!-- 评论 -->
<view class='mid_like' bindtap='navdetail' id='{{item.id}}'>
<image src='../../images/pinglun@3x.png'></image>
</view>
<view class='mid_item_like_right'>
<!-- 点赞 -->
<view class='mid_like color_blue' bindtap='zan' id='{{item.id}}' data-idx='{{index}}' data-type='{{item.is_like}}'>
<image src='../../images/thumb-up-button@3x.png' wx:if='{{item.is_like==1}}'></image>
<image src='../../images/dainzan@3x.png' wx:else></image>
</view>
<view class='mid_number color_blue'>
{{item.likes}}
</view>
<!-- 评论 -->
<view class='mid_like' bindtap='navdetail' id='{{item.id}}'>
<image src='../../images/pinglun@3x.png'></image>
</view>
<view class='mid_number'>
{{item.comment_count}}
</view>
<view class='mid_number'>
{{item.comment_count}}
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</scroll-view>
<!-- 没有权限 -->
<view class='null_data_box' wx:else>
<view class='data_box'>
<image src='/images/weirenzheng@2x.png'></image>
<view class='list_btn' bindtap='open_btn' data-type='{{auth}}' bindtap='renzheng'>{{auth=='0'?'开通企业认证 >':auth=='1'?'企业认证中 请等待':""}}</view>
<view wx:if='{{auth=="0"}}'> ~~ 企业认证后开启更多服务 ~~</view>
</view>
</view>
\ No newline at end of file
<!-- 没有权限 -->
<view class='null_data_box' wx:else>
<view class='data_box'>
<image src='/images/weirenzheng@2x.png'></image>
<view class='list_btn' bindtap='open_btn' data-type='{{auth}}' bindtap='renzheng'>{{auth=='0'?'开通企业认证 >':auth=='1'?'企业认证中 请等待':""}}</view>
<view wx:if='{{auth=="0"}}'> ~~ 企业认证后开启更多服务 ~~</view>
</view>
</view>
... ...
... ... @@ -34,7 +34,6 @@ page{
line-height: 80rpx;
display: flex;
justify-content: space-between;
font-size:26rpx;
font-family:PingFang SC;
font-weight:600;
... ... @@ -45,6 +44,8 @@ page{
padding: 0 150rpx;
position: fixed;
z-index: 999;
top: 0;
left: 0;
}
.top_left{
width: 169rpx;
... ... @@ -315,9 +316,7 @@ page{
/* .box_left{
margin-top: 96rpx;
} */
.box_right{
margin-top: 96rpx;
}
.mid_pic_box{
display: flex;
flex-wrap: wrap;
... ... @@ -375,4 +374,20 @@ page{
}
.none-box{
position: relative
}
.add_notice{
width: 80rpx;
height: 80rpx;
position: fixed;
border-radius: 50%;
overflow: hidden;
bottom: 200rpx;
right: 30rpx;
z-index: 10000;
}
.add_notice image{
width: 100%
}
.main_container{
margin-top: 50px;
}
\ No newline at end of file
... ...
... ... @@ -122,7 +122,7 @@ Page({
},
subArticle(){
let t = this, url ='/api/interact/setPosts',params= t.data.params;
params.images = params.images.length?params.images.join(','):'';
params.images = t.data.images.length ? t.data.images:'';
!params.title?(wx.showToast({
title: '请输入主题',
icon:'none'
... ... @@ -191,7 +191,7 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
... ...
... ... @@ -9,7 +9,7 @@
</textarea>
</view>
<view class='upload_box'>
<block wx:for="{{params.images}}" wx:for-item="image" wx:key="index">
<block wx:for="{{images}}" wx:for-item="image" wx:key="index">
<view class='upload_img'>
<view class='icon_box'>
<view class='iconfont icon-shanchu' catchtap="deleteImg" data-index="{{index}}"></view>
... ... @@ -17,7 +17,7 @@
<image src='{{image}}' data-index="{{index}}" mode="aspectFill" bindtap="previewImg"></image>
</view>
</block>
<view class='upload_img' bindtap="choose" hidden='{{params.images.length>9}}'>
<view class='upload_img' bindtap="choose" hidden='{{images.length>9}}'>
<view class='iconfont icon-jia1'></view>
</view>
</view>
... ...
... ... @@ -63,7 +63,7 @@ page {
font-size: 100rpx;
}
.upload_img:nth-child(5), .upload_img:nth-child(10) {
.upload_img:nth-child(3n){
margin-right: 0;
}
... ...
<!--pages/matrix/company/company.wxml-->
<view class='main_container'>
<view class='banner_top'>
<image src='/images/company_banner.png' mode='widthFix'></image>
<image src='{{detailInfo.banner_image}}' mode='widthFix'></image>
</view>
<!-- detailInfo -->
<view class='compony_info'>
<view class='compony_title'>
<view class='compony_left'>{{detailInfo.name}}</view>
<view class='focus_button cancle_focus' wx:if='{{detailInfo.is_like}}' bindtap='onfocus'>已关注</view>
<view class='focus_button' bindtap='onfocus' wx:else>+ 关注</view>
<view class='focus_button cancle_focus' wx:if='{{detailInfo.is_like==0}}' data-like="{{detailInfo.is_like}}" bindtap='onfocus'>已关注</view>
<view class='focus_button' bindtap='onfocus' data-like="{{detailInfo.is_like}}" wx:else><text class='add'>+</text>关注</view>
</view>
<view class='detailInfo_items'>
<view class='detailInfo_item'>
<view class='detail_icon'>
<image src='/images/dianhua_hui@3x.png' mode='aspectFit'></image>
<image src='/images/zuoji.png' mode='aspectFit'></image>
</view>
<view class='detail_text'>{{detailInfo.phone}}</view>
</view>
<view class='detailInfo_item'>
<view class='detail_icon'>
<image src='/images/mail@3x.png' mode='aspectFit'></image>
<image src='/images/mail.png' mode='aspectFit'></image>
</view>
<view class='detail_text'>{{detailInfo.email}}</view>
</view>
<view class='detailInfo_item'>
<view class='detail_icon'>
<image src='/images/dingwei@3x.png' mode='aspectFit'></image>
<image src='/images/map.png' mode='aspectFit'></image>
</view>
<view class='detail_text'>{{detailInfo.address}}</view>
</view>
... ...
... ... @@ -8,7 +8,7 @@ page{
background-color: #FFF;
}
.banner_top{
height: 236rpx;
height: auto;
}
.banner_top image{
width: 100%
... ... @@ -26,6 +26,9 @@ page{
font-size: 30rpx;
font-weight: bold;
}
.tuijian_item{
padding: 12rpx 0;
}
.focus_button{
width: 128rpx;
height: 48rpx;
... ... @@ -61,6 +64,8 @@ page{
}
.detail_icon image{
height: 100%;
-webkit-filter: grayscale(60%); /* Chrome, Safari, Opera */
filter: grayscale(60%);
}
.detailInfo_desc{
color: #999;
... ... @@ -113,7 +118,6 @@ page{
right: 0;
}
.tuijian_content{
height: 174rpx;
display: flex;
align-items: flex-start;
flex-flow: column;
... ... @@ -122,6 +126,10 @@ page{
font-size: 26rpx;
border-top: 2rpx solid #F5F5F5;
}
.add{
position:relative;
top:-2rpx;
}
.cancle_focus{
color: #999;
border: 2rpx solid #999;
... ...
... ... @@ -17,7 +17,8 @@ Page({
companyList:[],
page:1,
ifData:!1,
navScrollLeft:0
navScrollLeft:0,
noMore:!0
},
changeShow(){
this.setData({
... ... @@ -59,18 +60,16 @@ Page({
park:park||'',
page: b.data.page
}
let companylist = b.data.page == 1 ? []:b.data.companylist;
app.post(url,params).then((res)=>{
b.setData({
companyList: b.data.companyList.concat(res.data),
companyList: companylist.concat(res.data),
totalPage: res.total,
currpage: res.current_page,
}), b.data.companyList.length > 0 ? b.setData({
ifData: !0
}) : b.setData({
ifData: !1
}), res.data.length < res.per_page ? b.setData({
noMore: !0,
}) : ''
ifData: companylist.concat(res.data).length>0?!0:!1,
noMore: res.last_page>res.current_page?!1:!0
})
wx.stopPullDownRefresh();
})
},
// 更新token
... ... @@ -88,11 +87,14 @@ Page({
getMore(){
let t = this;
!t.data.noMore?(t.setData({
page:t.data.page++
}), t.getCompanyList(t.data.category_id,t.data.park)):""
page:t.data.page+1
}), t.getCompanyList(t.data.category_id,t.data.park)):wx.showToast({
title: '没有更多了',
icon:'none'
})
},
tabCharge(e) {
let s = this, singleWidth = s.data.windowWidth / 5, cur = e.currentTarget.dataset.index+1;
let s = this, singleWidth = s.data.windowWidth / 7, cur = e.currentTarget.dataset.index+1;
s.setData({
companyList:[],
page:1,
... ... @@ -103,6 +105,8 @@ Page({
s.getCompanyList(e.currentTarget.dataset.current, s.data.park)
},
scroll(){
},
reload(){
},
... ... @@ -153,14 +157,17 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
console.log(1)
let t = this;t.setData({
page: 1
}), t.getCompanyList(t.data.category_id, t.data.park);
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
... ...
... ... @@ -2,5 +2,6 @@
"usingComponents": {},
"navigationBarTitleText": "政企服务平台",
"navigationBarBackgroundColor": "#169BD5",
"navigationBarTextStyle": "white"
"navigationBarTextStyle": "white",
"enablePullDownRefresh": true
}
\ No newline at end of file
... ...
... ... @@ -15,7 +15,7 @@
</scroll-view>
<view class='iconfont icon-gengduo1' bindtap='changeShow'></view>
</view>
<scroll-view bindscroll="scroll" bindscrolltolower="getMore" class="scroll-content" hidden="{{!ifData}}" scrollTop="{{scrollTop}}" scrollY="true" style="height:{{scrollHeight}}px;">
<scroll-view bindscroll="scroll" bindscrolltolower="getMore" class="scroll-content" hidden="{{!ifData}}" scrollTop="{{scrollTop}}" scrollY="true" style="height:{{scrollHeight}}px;">
<view class='content_box' wx:if='{{showType}}'>
<navigator class='item_list' wx:for='{{companyList}}' wx:key='' url="/pages/matrix/company/company?id={{item.id}}"
open-type="navigate"
... ...
... ... @@ -26,7 +26,7 @@ page {
color: #999;
display: inline-block;
position: relative;
width: 20%;
padding: 0 20rpx;
height: 100%;
text-align: center;
}
... ... @@ -175,6 +175,7 @@ page {
.list_content {
font-size: 26rpx;
color: #666;
height: 68rpx;
margin-top: 4rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
... ... @@ -212,7 +213,7 @@ page {
}
.scroll-content{
margin-top: 45px;
background: #FFF;
background: #f5f5f5;
}
.none-box {
... ...
... ... @@ -147,13 +147,10 @@ Page({
wx.hideNavigationBarLoading()
wx.hideLoading()
if (res.statusCode == 200) {
// console.log(res)
let dat = JSON.parse(res.data);
// console.log(dat);
that.setData({
"proData.images": that.data.proData.images.concat(dat.data.url)
})
// console.log(that.data.proData.images);
} else {
wx.showModal({
... ... @@ -221,14 +218,16 @@ Page({
duration: 1300
})
return false;
} else if (b.data.proData.images.length == 0){
wx.showToast({
title: '请上传营业执照',
icon: "none",
duration: 1300
})
return false;
}else {
}
// else if (b.data.proData.images.length == 0){
// wx.showToast({
// title: '请上传营业执照',
// icon: "none",
// duration: 1300
// })
// return false;
// }
else {
b.setData({
"proData.header": true
})
... ...
... ... @@ -12,7 +12,7 @@
.list_title {
width: 140rpx;
font-size: 32rpx;
font-size: 28rpx;
color: #333;
margin-right: 26rpx;
text-align: center;
... ... @@ -81,6 +81,10 @@
color: rgb(236, 201, 201);
box-sizing: border-box;
}
.add_btn text{
position: relative;
top: -12rpx;
}
.img_box {
/* position: relative; */
border: none;
... ... @@ -138,6 +142,7 @@
height: 100%;
border-radius: 10rpx;
padding-left: 20rpx;
font-size: 28rpx;
}
.cancle_action{
width: 100rpx;
... ... @@ -158,6 +163,7 @@
flex: 1;
width: 100%;
background: #fff;
overflow-y: scroll;
}
.adress_list {
width: 100%;
... ...
... ... @@ -9,7 +9,7 @@
<view class='list_content'>
<view class='list_info'>提交成功!</view>
<view>您已成功提交企业资料,请等待平台审核...</view>
<view class='list_btn list_active' bindtap='post_btn'>发表帖子</view>
<view class='list_btn ' bindtap='goHome'>返回首页</view>
<!-- <view class='list_btn list_active' bindtap='post_btn'>发表帖子</view> -->
<view class='list_btn list_active' bindtap='goHome'>返回首页</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -38,12 +38,12 @@
.list_btn {
width: 464rpx;
height: 96rpx;
height: 88rpx;
border: 1rpx solid #e6e6e6;
border-radius: 8rpx;
font-size: 34rpx;
font-size: 30rpx;
color: #333;
line-height: 96rpx;
line-height: 88rpx;
text-align: center;
margin-top: 50rpx;
margin: 40rpx auto;
... ...
... ... @@ -15,8 +15,8 @@
</view>
</view>
<!-- -->
<view class='content_box' hidden='{{auth!=2}}'>
<view class='item_list' bindtap='TB' bindtap="btn_post">
<view class='content_box'>
<view class='item_list' bindtap='TB' bindtap="btn_post" hidden='{{auth!=2}}'>
<view class='list_icon'>
<text class='iconfont icon-wodetiezi'></text>
</view>
... ... @@ -25,7 +25,7 @@
<view class='iconfont icon-go'></view>
</view>
</view>
<view class='item_list' bindtap='vipCharge' bindtap="btn_attention">
<view class='item_list' bindtap="btn_attention">
<view class='list_icon'>
<text class='iconfont icon-xing'></text>
</view>
... ... @@ -34,7 +34,7 @@
<text class='iconfont icon-go'></text>
</view>
</view>
<view class='item_list' bindtap='reportList' bindtap='btn_like'>
<view class='item_list' bindtap='reportList' bindtap='btn_like' hidden='{{auth!=2}}'>
<view class='list_icon'>
<text class='iconfont icon-zan21'></text>
</view>
... ... @@ -43,7 +43,7 @@
<view class='iconfont icon-go'></view>
</view>
</view>
<view class='item_list' bindtap='reportList' bindtap='btn_comment'>
<view class='item_list' bindtap='reportList' bindtap='btn_comment' hidden='{{auth!=2}}'>
<view class='list_icon'>
<text class='iconfont icon-pinglun1'></text>
</view>
... ... @@ -52,7 +52,7 @@
<view class='iconfont icon-go'></view>
</view>
</view>
<view class='item_list' bindtap='articlList' bindtap='btn_inform'>
<view class='item_list' bindtap='articlList' bindtap='btn_inform'>
<view class='list_icon'>
<text class='iconfont icon-tongzhi'></text>
</view>
... ... @@ -65,10 +65,10 @@
</view>
</view>
</view>
<view class='null_data_box' hidden='{{auth==2}}'>
<!-- <view class='null_data_box' hidden='{{auth==2}}'>
<view class='data_box'>
<image src='/images/weirenzheng@2x.png'></image>
<view class='list_btn' bindtap='open_btn' data-type='{{auth}}' bindtap='renzheng'>{{auth=='0'?'开通企业认证 >':auth=='1'?'企业认证中 请等待':""}}</view>
<view wx:if='{{auth=="0"}}'> ~~ 企业认证后开启更多服务 ~~</view>
</view>
</view>
\ No newline at end of file
</view> -->
\ No newline at end of file
... ...
... ... @@ -2,6 +2,7 @@
page {
background: #f5f5fa;
overflow-x:hidden;
}
.banner_box {
... ... @@ -52,16 +53,16 @@ page {
}
.banner_label {
width: 160rpx;
font-size: 22rpx;
color: #169bd5;
background: rgba(22, 155, 213, 0.2);
border-radius: 24rpx;
padding: 5rpx 10rpx;
display: flex;
display: inline-flex;
align-items: center;
justify-content: center;
margin-top: 14rpx;
min-width: 160rpx;
}
.banner_label image {
... ...
... ... @@ -27,10 +27,20 @@ Page({
console.log(res);
b.setData({
followList: res.data,
ifData: res.data.length>0?true:false
ifData: res.data.length>0?true:false,
noMore: res.last_page==res.current_page?!0:!1
})
})
},
getMore(){
this.setData({
page: this.data.page++
})
!this.data.noMore?this.getFollowList():wx.showToast({
title: '没有更多了',
icon:'none'
})
},
/**
* 生命周期函数--监听页面初次渲染完成
... ...
<!--pages/my/myAttention/myAttention.wxml-->
<scroll-view class='box' scroll-y='true' hidden='{{!ifData}}'>
<scroll-view class='box' scroll-y='true' hidden='{{!ifData}}' bindscrolltolower='getMore'>
<view class='item_list' wx:for='{{followList}}' wx:key="index">
<image src='{{item.logo_image}}'></image>
<view class='list_right'>
... ...
... ... @@ -26,7 +26,9 @@ Page({
page: b.data.page
};
a.post(url, params).then((res) => {
console.log(res);
for(let b of res.data){
b.images = b.images.split(',')
}
b.setData({
commentsList: b.data.commentsList.concat(res.data)
})
... ...
... ... @@ -51,7 +51,7 @@
<!-- 图片内容 -->
<view class='mid_pic_box'>
<view class='mid_pic_item' wx:for="{{item.images}}" wx:key="index">
<image src='{{item}}'></image>
<image src='{{item}}' mode='widthFix'></image>
</view>
</view>
</view>
... ...
... ... @@ -305,8 +305,8 @@ page{
height: 100%;
}
.mid_pic_item{
width:352rpx;
height:352rpx;
width:218rpx;
height:218rpx;
background:rgba(0,0,0,0);
opacity:1;
display: flex;
... ... @@ -315,7 +315,6 @@ page{
}
.mid_pic_item image{
width: 100%;
height: 100%;
}
.mid_item_content{
margin-top: 24rpx;
... ...
... ... @@ -38,6 +38,15 @@ Page({
}) : ''
})
},
getMore() {
this.setData({
page: this.data.page++
})
!this.data.noMore ? this.getInformList() : wx.showToast({
title: '没有更多了',
icon: 'none'
})
},
/**
* 生命周期函数--监听页面初次渲染完成
... ...
<scroll-view scroll-y='true' style='height:{{winHeight}}px' hidden='{{!ifData}}'>
<scroll-view scroll-y='true' style='height:{{winHeight}}px' hidden='{{!ifData}}' bindscrolltolower='getMore'>
<view class='mid'>
<view class='mid_item' wx:for="{{noticeList}}" wx:key="index">
<view class='mid_item_top'>
... ...
... ... @@ -8,7 +8,8 @@ Page({
data: {
likeList: [],
page: 1,
ifData: !1
ifData: !1,
noMore:!1
},
/**
... ... @@ -25,10 +26,13 @@ Page({
page: b.data.page
};
a.post(url, params).then((res) => {
console.log(res);
for(let b of res.data){
b.images = b.images.split(',')
}
b.setData({
likeList: res.data,
ifData: res.data.length>0?true:false
likeList: b.data.likeList.concat(res.data),
ifData: res.data.length>0?true:false,
noMore: res.data.length < res.per_page?!0:!1
})
})
},
... ... @@ -73,10 +77,13 @@ Page({
*/
onReachBottom: function() {
let that = this;
that.setData({
page: that.data.page + 1,
});
that.getLikeList();
!this.data.noMore ? (that.setData({
page: that.data.page + 1,
}), that.getLikeList()):wx.showToast({
title: '没有更多了',
icon: 'none'
})
},
/**
... ...
... ... @@ -292,13 +292,16 @@ page{
}
.mid_pic_box_p{
margin-top: 16rpx;
margin-right: 18rpx;
margin-right: 16rpx;
width:218rpx;
height:218rpx;
background:rgba(0,0,0,0);
opacity:1;
display: flex;
}
.mid_pic_box_p:nth-child(3n){
margin-right: 0;
}
.mid_pic_box_p image{
width: 100%;
height: 100%;
... ...
... ... @@ -29,6 +29,9 @@ Page({
page: b.data.page
};
a.post(url,params).then((r)=>{
for(let b of r.data){
b.images = b.images.split(',');
}
let dataList = b.data.articleList.concat(r.data);
b.setData({
articleList: dataList,
... ... @@ -41,12 +44,16 @@ Page({
})
},
navdetail(e) {
wx.navigateTo({
url: '/pages/colleagues_2/colleagues_2?id=' + e.currentTarget.id,
})
},
delArticle(e){
console.log(e)
let t = this, id = e.currentTarget.id, url ='/api/interact/deletePosts',params={
id:id,
header:true
};
id:id
},index = e.currentTarget.dataset.indx;
wx.showModal({
title: '提示',
content: '确认删除这个帖子吗?',
... ... @@ -58,7 +65,11 @@ Page({
icon:'none',
duration: 1300
})
t.articleList()
t.data.articleList.splice(index,1);
t.setData({
articleList: t.data.articleList
})
})
}
}
... ...
... ... @@ -3,17 +3,17 @@
<view class='item'>
<view class='item_top'>{{item.title}}</view>
<view class='item_mid'>
<view class='item_mid_text'>{{item.content}}</view>
<view class='item_mid_text' bindtap='navdetail' id='{{item.id}}'>{{item.content}}</view>
<!-- 图片盒子 -->
<view class='item_mid_box' wx:if="{{item.images}}">
<view class='item_mid_box_pic'>
<image src='{{item.images}}'></image>
<view class='item_mid_box' hidden='{{item.images.length==0}}' bindtap='navdetail' id='{{item.id}}'>
<view class='item_mid_box_pic' wx:for="{{item.images}}" wx:for-item="sec" wx:key=''>
<image src='{{sec}}' mode='widthFix'></image>
</view>
</view>
</view>
<!-- 底部 -->
<view class='item_bottom'>
<view class='item_left' data-id='{{item.id}}' bindtap='delArticle'>
<view class='item_left' id='{{item.id}}' bindtap='delArticle' data-indx = "{{index}}">
删除
</view>
<view class='item_right'>
... ... @@ -38,44 +38,7 @@
</view>
</view>
</view>
<view class='item'>
<view class='item_top'>{{item.title}}</view>
<view class='item_mid'>
<view class='item_mid_text'>{{item.content}}</view>
<!-- 图片盒子 -->
<view class='item_mid_box' wx:if="{{item.images}}">
<view class='item_mid_box_pic'>
<image src='{{item.images}}'></image>
</view>
</view>
</view>
<!-- 底部 -->
<view class='item_bottom'>
<view class='item_left' id='{{item.id}}' bindtap='delArticle'>
删除
</view>
<view class='item_right'>
<!-- 图片 -->
<view class='item_right_pic'>
<image src='../../images/chakan@3x.png'></image>
</view>
<!-- 数量 -->
<view class='item_right_number'>
{{item.browse_count}}
</view>
<!-- 图片 -->
<view class='item_right_pic2'>
<image src='../../images/pinglun@3x.png'></image>
</view>
<!-- 数量 -->
<view class='item_right_number'>
{{item.comment_count}}
</view>
</view>
</view>
</view>
</block>
... ...
... ... @@ -41,17 +41,15 @@ page{
background:rgba(0,0,0,0);
opacity:1;
display: flex;
align-items: center;
overflow: hidden;
}
.item_mid_box{
display: flex;
flex-wrap: wrap;
}
.item_mid_box_pic image{
width: 100%;
height: 100%;
}
.item_bottom{
margin-top: 18rpx;
display: flex;
... ...
... ... @@ -4,7 +4,7 @@
"ignore": []
},
"setting": {
"urlCheck": true,
"urlCheck": false,
"es6": true,
"postcss": true,
"minified": true,
... ... @@ -13,7 +13,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.6.2",
"appid": "wx75855734b0730d64",
"appid": "wx6956a8b092f2f247",
"projectname": "%E6%9D%8E%E4%B8%83%E5%BA%84",
"debugOptions": {
"hidedInDevtools": []
... ... @@ -37,7 +37,7 @@
"list": []
},
"miniprogram": {
"current": 36,
"current": 40,
"list": [
{
"id": 0,
... ... @@ -297,6 +297,34 @@
"pathName": "pages/colleagues_2/colleagues_2",
"query": "id=1",
"scene": null
},
{
"id": -1,
"name": "text_17",
"pathName": "pages/attract/attract",
"query": "",
"scene": null
},
{
"id": -1,
"name": "text_17",
"pathName": "pages/attract/detail/detail",
"query": "",
"scene": null
},
{
"id": -1,
"name": "text_17",
"pathName": "pages/my/approveInfo/approveInfo",
"query": "",
"scene": null
},
{
"id": -1,
"name": "text_17",
"pathName": "pages/enterprise/enterprise",
"query": "",
"scene": null
}
]
}
... ...