作者 朱振飞

修改

... ... @@ -55,13 +55,21 @@ App({
resolve(res.data.data);
} else if (res.data.code == '201') {
resolve(res.data);
} else {
}else {
wx.showToast({
title: res.data.msg,
icon:'none',
duration: 1200
})
reject(res.data)
console.log(res.data.code)
if (res.data.code == '401'){
setTimeout(()=>{
wx.navigateTo({
url: '/pages/register/register',
})
},1200)
}
}
(showLoad || showLoad == undefined) ? wx.hideLoading() : "";
wx.hideNavigationBarLoading()
... ...
... ... @@ -11,7 +11,7 @@
"pages/server_1/server_1",
"pages/colleagues_2/colleagues_2",
"pages/colleagues/colleagues",
"pages/enterprise_q&a/enterprise_q&a",
"pages/enterprise/enterprise",
"pages/interact/interactPost/interactPost",
"pages/interact/interact",
"pages/my/myAttention/myAttention",
... ... @@ -19,7 +19,8 @@
"pages/matrix/company/company",
"pages/attract/attract",
"pages/attract/detail/detail",
"pages/register/register"
"pages/register/register",
"pages/question/question"
],
"tabBar": {
"list": [
... ... @@ -36,7 +37,7 @@
"selectedIconPath": "images/02_nav_fill@2x.png"
},
{
"pagePath": "pages/enterprise_q&a/enterprise_q&a",
"pagePath": "pages/enterprise/enterprise",
"text": "政企互动",
"iconPath": "/images/03_nav@2x.png",
"selectedIconPath": "images/03_nav_fill@2x.png"
... ...
let t = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
navbar: [{
name: '企业咨询'
},
{
name: '企话吧'
}
],
zixunList: [],
currentTab: 0,
page: 1 ,
ifData: !1,
noMore: !1,
show:!0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let c = this;wx.getSystemInfo({
success: function(res) {
c.setData({
winHeight:res.windowHeight
})
},
})
},
getzixun(){
let url = '/api/interact/getQuestionList',d = this,params = {
header:true,
page: d.data.page
};
t.post(url,params,false).then((r)=>{
let list = d.data.zixunList.concat(r.data);
d.setData({
zixunList: list
})
list.length==0?d.setData({
ifData:!0,
}):(r.data.length<r.per_page?d.setData({
noMore:!0
}):"")
setTimeout(()=>{
d.setData({
show: !1
},1200)
})
})
},
askQuestion(){
wx.navigateTo({
url: '/pages/question/question',
})
},
checkstatus() {
let b = this, url = '/api/user/getAuthStatus', params = {
header: true
};
t.post(url, params).then((r) => {
b.setData({
auth:r
});
r == 2 ? b.getzixun():'';
})
},
renzheng(e){
let type = e.currentTarget.dataset.type;
type==1?wx.showToast({
title: '认证审批中请耐心等待',
icon:'none',
duration: 1200
}):wx.navigateTo({
url: '/pages/my/approve/approve',
})
},
navbarTap: function (e) {
let that = this;
this.setData({
currentTab: e.currentTarget.dataset.idx,
})
},
jump(){
wx.navigateTo({
url: '',
})
wx.switchTab({
url: '',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.setData({
zixunList:[]
})
this.checkstatus()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "企业问答",
"navigationBarTitleText": "政企服务平台",
"navigationBarBackgroundColor": "#169BD5",
"navigationBarTextStyle": "white"
}
\ No newline at end of file
... ...
<scroll-view wx:if='{{auth=="2"}}' style='height:{{winHeight}}px' scroll-y="true">
<view class='container'>
<!-- <view class='top'>
<view class='top_left'>企业问答</view>
<view class='top_right'>企话吧</view>
</view> -->
<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>
<!-- 企业问答 -->
<view class='box_left' wx:if="{{currentTab==0}}">
<view class='mid' bindtap="jump">
<view class='mid_item'>
<!-- 左边感叹号 -->
<view class='mid_item_left'>
<image src='../../images/tishi@3x.png'></image>
</view>
<!-- 右边标题 -->
<view class='mid_item_right'>
<view class='mid_item_right_top'>
校区门口停车难,镇政府是否可协调交管局规划车位,方便学生家长停车?
<view class='mid_label'>
<image src='../../images/huifujishi@3x.png'></image>
</view>
</view>
<view class='mid_item_right_bottom'>
发布时间: 07-21 21:00
</view>
<!-- 回复 -->
<view class='response_box'>
<!-- 回复内容 -->
<view class='mid_item_right_response'>
<text class='color_blue'>回复:</text>
贵单位的问题已反应到相关单位,具体实施方案将在7个工作日内反馈
</view>
<!-- 回复时间 -->
<view class='mid_item_right_bottom'>
回复时间:07-21 21:00
</view>
</view>
</view>
</view>
<view class='mid_item'>
<!-- 左边感叹号 -->
<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'>
校区门口停车难,镇政府是否可协调交管局规划车位,方便学生家长停车?
<view class='mid_label'>
<image src='../../images/huifuyiban@3x.png'></image>
{{item.question}}?
<view class='mid_label' hidden='{{item.show}}'>
<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'>
发布时间:07-21 21:00
发布时间: {{item.create_time_text}}
</view>
<!-- 回复 -->
<view class='response_box'>
<view class='response_box' hidden='{{item.state==0}}'>
<!-- 回复内容 -->
<view class='mid_item_right_response'>
<text class='color_blue'>回复:</text>
贵单位的问题已反应到相关单位,具体实施方案将在7个工作日内反馈
<text class='color_blue'>回复:</text> {{item.reply}}
</view>
<!-- 回复时间 -->
<view class='mid_item_right_bottom'>
回复时间:07-21 21:00
回复时间:{{item.reply_time_text}}
</view>
</view>
</view>
</view>
<view class='mid_item'>
<!-- 左边感叹号 -->
<view class='mid_item_left'>
<image src='../../images/tishi@3x.png'></image>
</view>
<!-- 右边标题 -->
<view class='mid_item_right'>
<view class='mid_item_right_top'>
校区门口停车难,镇政府是否可协调交管局规划车位,方便学生家长停车?
<view class='mid_label'>
<image src='../../images/huifuzhihuan @3x.png'></image>
</view>
</view>
<view class='mid_item_right_bottom'>
发布时间:07-21 21:00
</view>
<!-- 等待回复 -->
<view class='waiting_response'>
<view class='waiting_response' hidden='{{item.state!=0}}'>
等待回复中.....
</view>
</view>
</view>
</view>
<!-- 提问 -->
<view class='bottom'>
<view class='bottom_question'>
<view class='bottom' hidden='{{show}}'>
<view class='bottom_question' bindtap='askQuestion'>
提问
</view>
</view>
</view>
<!-- 企话吧 -->
<!-- 企话吧 -->
<view class='box_right' wx:if="{{currentTab==1}}">
<view class='mid'>
<!-- 标题 -->
... ... @@ -153,7 +85,7 @@
<view class='mid_pic_box_item'>
<image src='../../images/weirenzheng@3x.png'></image>
</view>
</view>
<!-- 底部 -->
<view class='mid_item_like'>
... ... @@ -220,7 +152,7 @@
<view class='mid_pic_box_item'>
<image src='../../images/weirenzheng@3x.png'></image>
</view>
</view>
<!-- 底部 -->
<view class='mid_item_like'>
... ... @@ -305,11 +237,25 @@
</view>
<!-- 回复框 -->
<view class='mid_item_bottom'>
<view><span class='color_blue'>宏中科技</span>:非常实用!!!</view>
<view><span class='color_blue'>宏中科技</span>:非常实用!!!</view>
<view><span class='color_blue'>查看更多>></span></view>
<view>
<span class='color_blue'>宏中科技</span>:非常实用!!!</view>
<view>
<span class='color_blue'>宏中科技</span>:非常实用!!!</view>
<view>
<span class='color_blue'>查看更多>></span>
</view>
</view>
</view>
</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
... ...
page{
background: #F7F7F7;
}
... ... @@ -10,7 +11,6 @@ page{
.nav_item{
width: 169rpx;
text-align: center
}
.active{
color: #169BD5;
... ... @@ -66,9 +66,9 @@ page{
width: 686rpx;
margin: 0 auto;
display: flex;
flex-flow: column;
justify-content: space-between;
border-bottom: 2px solid #f5f5f5;
box-sizing: border-box;
}
.mid_item_left{
width:42rpx;
... ... @@ -138,21 +138,20 @@ page{
display: flex;
position: absolute;
top: 0;
right: -30rpx;
right: -20rpx;
}
.mid_label image{
width: 100%;
height: 100%;
}
.bottom{
margin-top: 150rpx;
width: 100%;
background: #fff;
/* background: #fff; */
display: flex;
justify-content: center;
}
.bottom_question{
margin: 180rpx 0;
width:304rpx;
height:96rpx;
line-height: 96rpx;
... ... @@ -310,9 +309,9 @@ page{
.mid_item_bottom view:last-child{
margin-top: 10rpx;
}
.box_left{
/* .box_left{
margin-top: 96rpx;
}
} */
.box_right{
margin-top: 96rpx;
}
... ... @@ -331,4 +330,46 @@ page{
.mid_pic_box_item image{
width: 100%;
height: 100%;
}
/* */
.null_data_box {
width: 100%;
height: 100%;
font-size: 22rpx;
color: #ccc;
text-align: center;
position: fixed;
top: 00rpx;
left: 0;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
}
.null_data_box image {
width: 315rpx;
height: 227rpx;
margin: 0 auto;
}
.data_box {
width: 100%;
}
.list_btn {
width: 352rpx;
height: 80rpx;
background: linear-gradient(319deg, rgba(22, 155, 213, 1) 0%, rgba(0, 211, 255, 1) 100%);
border-radius: 8rpx;
font-size: 30rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
margin: 40rpx auto;
}
.none-box{
position: relative
}
\ No newline at end of file
... ...
... ... @@ -14,6 +14,9 @@ Page({
onLoad: function (options) {
},
setTitle(e){
},
/**
* 生命周期函数--监听页面初次渲染完成
... ...
... ... @@ -3,7 +3,7 @@
<view class='banner_box'>
<view class='type_box' bindtap="showPicker">
<view>
<input placeholder='输入主题...' placeholder-class='input_size' value='{{title}}' bindinput='setTitle'></input>
<input placeholder='输入主题...' placeholder-class='input_size' data-type='title' value='{{title}}' bindinput='setTitle'></input>
</view>
</view>
<view class='textarea_box'>
... ...
... ... @@ -7,7 +7,7 @@
<view class='compony_info'>
<view class='compony_title'>
<view class='compony_left'>{{detailInfo.name}}</view>
<view class='focus_button cancle_focus' wx:if='{{detailInfo.focus}}' bindtap='canclefocus'>已关注</view>
<view class='focus_button cancle_focus' wx:if='{{detailInfo.isLikes}}' bindtap='canclefocus'>已关注</view>
<view class='focus_button' bindtap='onfocus' wx:else>+ 关注</view>
</view>
... ... @@ -40,7 +40,7 @@
<view class='company_desc {{open?"openContent":""}}'>
公司简介:{{detailInfo.content}}
</view>
<view class='open' bindtap='openText'>
<view class='open {{!open?"close":""}}' bindtap='openText'>
{{open?"收起":'展开'}}
</view>
</view>
... ...
... ... @@ -87,8 +87,31 @@ page{
display: flex;
align-items: center;
justify-content: center;
position: relative;
width:100rpx;
margin: 0 auto;
}
.open:after{
content: "";
position: absolute;
width: 14rpx;
height: 14rpx;
border-right: 1px solid; border-bottom: 1px solid;
transform: rotate(225deg);
top: 46rpx;
right: 0;
transition: 1s;
}
.open.close:after{
content: "";
position: absolute;
width: 14rpx;
height: 14rpx;
border-right: 1px solid; border-bottom: 1px solid;
transform: rotate(45deg);
top: 36rpx;
right: 0;
}
.tuijian_content{
height: 174rpx;
display: flex;
... ...
... ... @@ -28,7 +28,8 @@ Page({
this.setData({
index:e.detail.value,
park:this.data.areaList[e.detail.value].id,
page:1
page:1,
companyList:[],
})
this.getCompanyList(this.data.category_id,this.data.areaList[e.detail.value].id)
},
... ...
... ... @@ -3,7 +3,7 @@
<!-- 园区选择 -->
<view class='areasChoose'>
<picker class='areaName' mode='selector' range='{{areaList}}' value="{{index}}" range-key="name" bindchange='changeAreas'>
<view>{{areaList[index].name}}</view>
<view class='chooseArea {{choose?"choose":""}}'>园区选择:{{areaList[index].name}}</view>
</picker>
<view class='iconfont icon-gengduo1' bindtap='changeShow'></view>
</view>
... ... @@ -12,7 +12,6 @@
<block wx:for="{{typeList}}" wx:key=''>
<view class="tab_item {{current == item.id?'active':''}}" data-current='{{item.id}}' bindtap='tabCharge' data-index='{{index}}'>{{item.name}}</view>
</block>
</scroll-view>
</view>
<scroll-view bindscroll="scroll" bindscrolltolower="getMore" class="scroll-content" hidden="{{!ifData}}" scrollTop="{{scrollTop}}" scrollY="true" style="height:{{scrollHeight-89}}px;">
... ...
... ... @@ -215,3 +215,28 @@ page {
top: 350rpx;
text-align: center;
}
.chooseArea{
position: relative;
}
.chooseArea:after{
content: "";
position: absolute;
width: 14rpx;
height: 14rpx;
border-right: 1px solid; border-bottom: 1px solid;
transform: rotate(45deg);
top: 10rpx;
right: -30rpx;
transition: 1s;
}
.chooseArea.choose:after{
content: "";
position: absolute;
width: 14rpx;
height: 14rpx;
border-right: 1px solid; border-bottom: 1px solid;
transform: rotate(225deg);
top: 10rpx;
right: -30rpx;
transition: 1s;
}
\ No newline at end of file
... ...
... ... @@ -36,28 +36,25 @@ Page({
seach: true
})
},
// 取消搜索
cancle(){
this.setData({
seach:false
})
},
// 搜索公司名称
seachFun: function() {
let url = '/api/Company/index', b = this;
if(b.data.keyword == "") {
wx.showToast({
title: '请输入要搜索的公司名称',
icon: "none",
duration: 1300
})
return false;
}else {
let params = {
keyword: b.data.keyword
}
app.post(url, params).then((res) => {
// console.log(res);
b.setData({
companyList: res.data
})
})
let url = '/api/Company/index', b = this,params = {
keyword: b.data.keyword
}
b.data.keyword ? (app.post(url, params, false).then((res) => {
b.setData({
companyList: res.data
})
})):b.setData({
companyList: []
})
},
// 公司名称同步到data
... ... @@ -122,11 +119,6 @@ Page({
// 上传图片至后台
uploadAllfile(filePaths, successUp, failUp, i, length) {
let that = this;
// console.log(filePaths)
// console.log(successUp)
// console.log(failUp)
// console.log(i)
// console.log(length)
let url = 'http://lqz.w.brotop.cn/api/common/upload';
let headers = {
"token": wx.getStorageSync("token"),
... ... @@ -198,15 +190,36 @@ Page({
// 上传认证
subFun() {
let b = this;
let reg = /^1([38]\d|5[0-35-9]|7[3678])\d{8}$/
let url = "/api/user/setCertificationInfo";
// console.log(b.data.proData.images.length)
if(b.data.companyName == "" || b.data.proData.name == "" || b.data.proData.mobile == "" || b.data.proData.images.length == 0) {
if(b.data.companyName == "") {
wx.showToast({
title: '请输入必填项',
title: '请选择公司',
icon: "none",
duration: 1300
})
return false;
} else if (b.data.proData.name == ""){
wx.showToast({
title: '请输入姓名',
icon: "none",
duration: 1300
})
return false;
} else if (!reg.test(b.data.proData.mobile)){
wx.showToast({
title: '请输入正确的手机号码',
icon: "none",
duration: 1300
})
return false;
} else if (b.data.proData.images.length == 0){
wx.showToast({
title: '请上传营业执照',
icon: "none",
duration: 1300
})
return false;
}else {
b.setData({
"proData.header": true
... ...
... ... @@ -3,7 +3,7 @@
<view class="item_list" bindtap='companyFun'>
<view class="list_title">公司名称</view>
<view class="list_content">
<view class='input_item {{proData.company_id?"":"color_input"}}'>{{proData.company_id?companyName:'输入公司名称'}}</view>
<view class='input_item {{proData.company_id?"":"color_input"}}'>{{proData.company_id?companyName:'请选择公司'}}</view>
</view>
</view>
<view class="item_list">
... ... @@ -15,7 +15,7 @@
<view class="item_list">
<view class="list_title">联系电话</view>
<view class="list_content">
<input type="number" placeholder='输入联系电话' placeholder-class='pl_style' value="{{proData.mobile}}" class="input_item" bindinput='getPhone'></input>
<input type="number" placeholder='输入联系电话' placeholder-class='pl_style' value="{{proData.mobile}}" class="input_item" bindinput='getPhone'></input>
</view>
</view>
<view class="item_list" style=' align-items: flex-start;'>
... ... @@ -40,7 +40,7 @@
<view class='search_box'>
<input placeholder='请输入公司名称' bindinput='keywordFun' type='search' class='input_item'></input>
<image src='../../../images/del.png'></image>
<view class='cancle_action' bindtap='seachFun'>搜索</view>
<view class='cancle_action' bindtap='cancle'>取消</view>
</view>
</view>
... ...
... ... @@ -8,7 +8,7 @@
</view>
<view class='list_content'>
<view class='list_info'>提交成功!</view>
<view>您已成功提交企业资料,待平台审核...</view>
<view>您已成功提交企业资料,请等待平台审核...</view>
<view class='list_btn list_active' bindtap='post_btn'>发表帖子</view>
<view class='list_btn ' bindtap='goHome'>返回首页</view>
</view>
... ...
... ... @@ -13,23 +13,38 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
renzheng(e) {
let type = e.currentTarget.dataset.type;
console.log(type)
type == 1 ? wx.showToast({
title: '认证审批中请耐心等待',
icon: 'none',
duration: 1200
}) : wx.navigateTo({
url: '/pages/my/approve/approve',
})
},
checkstatus() {
let b = this, url = '/api/user/getAuthStatus', params = {
header: true
};
t.post(url, params, false).then((r) => {
b.setData({
auth: r
});
r == 2 ? b.getUserInfo() : '';
})
},
getUserInfo(){
let d = this, url ='/api/user/index',params={
header: true
}; t.post(url,params).then((r)=>{
}; t.post(url,params,false).then((r)=>{
d.setData({ userInfo: r.userInfo})
})
},
open_btn() {
wx.navigateTo({
url: '/pages/my/approve/approve',
})
this.setData({
status:true
})
},
btn_post() {
wx.navigateTo({
... ... @@ -71,7 +86,8 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getUserInfo();
this.checkstatus();
},
/**
... ...
<!--pages/my/my.wxml-->
<view class='banner_box'>
<view class='banner_box' wx:if='{{auth!=0}}'>
<view class='banner_info_box'>
<image class='head_img' src='{{userInfo.avatar||"/images/weirenzheng@2x.png"}}'></image>
<view class='banner_right' wx:if="{{userInfo}}">
... ... @@ -16,7 +16,7 @@
</view>
</view>
<!-- -->
<view class='content_box' wx:if='{{userInfo.auth_status}}'>
<view class='content_box' hidden='{{auth!=2}}'>
<view class='item_list' bindtap='TB' bindtap="btn_post">
<view class='list_icon'>
<text class='iconfont icon-wodetiezi'></text>
... ... @@ -66,10 +66,10 @@
</view>
</view>
</view>
<view class='null_data_box' wx:else>
<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'>开通企业认证 ></view>
<view> ~~ 企业认证后开启更多服务 ~~</view>
<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
... ...
... ... @@ -6,7 +6,8 @@ Page({
*/
data: {
commentsList: [],
page: 1
page: 1,
ifData:!1
},
/**
... ... @@ -27,8 +28,15 @@ Page({
a.post(url, params).then((res) => {
console.log(res);
b.setData({
commentsList: res.data
commentsList: b.data.commentsList.concat(res.data)
})
b.data.commentsList.length > 0 ? b.setData({
ifData: !0
}) : b.setData({
ifData: !1
}), res.data.length < res.per_page ? b.setData({
noMore: !0,
}) : ''
})
},
... ...
<view class='container'>
<!-- 企话吧 -->
<view class='box_right'>
<scroll-view scroll-y='true'>
<view class='mid'>
<!-- 条目 -->
... ... @@ -100,5 +94,8 @@
</view>
</view>
</view>
</view>
\ No newline at end of file
</scroll-view>
<view class="none-box" hidden="{{ifData}}">
<view>暂无相关评论</view>
</view>
\ No newline at end of file
... ...
... ... @@ -5,8 +5,9 @@ Page({
* 页面的初始数据
*/
data: {
noticeList: [],
page: 1
noticeList: [],
page: 1,
ifData:!1
},
/**
... ... @@ -25,10 +26,16 @@ Page({
page: b.data.page
};
a.post(url, params).then((res) => {
console.log(res);
b.setData({
noticeList: res.data
noticeList: b.data.noticeList.concat(res.data)
})
b.data.noticeList.length > 0 ? b.setData({
ifData: !0
}) : b.setData({
ifData: !1
}), res.data.length < res.per_page ? b.setData({
noMore: !0,
}) : ''
})
},
... ...
<view class='container'>
<!-- 企业问答 -->
<view class='box_left' style='display:none'>
<view class='mid'>
<view class='mid_item'>
<!-- 左边感叹号 -->
<view class='mid_item_left'>
<image src='../../images/tishi@3x.png'></image>
</view>
<!-- 右边标题 -->
<view class='mid_item_right'>
<view class='mid_item_right_top'>
校区门口停车难,镇政府是否可协调交管局规划车位,方便学生家长停车?
<view class='mid_label'>
<image src='../../images/huifujishi@3x.png'></image>
</view>
</view>
<view class='mid_item_right_bottom'>
发布时间: 07-21 21:00
</view>
<!-- 回复 -->
<view class='response_box'>
<!-- 回复内容 -->
<view class='mid_item_right_response'>
<text class='color_blue'>回复:</text> 贵单位的问题已反应到相关单位,具体实施方案将在7个工作日内反馈
</view>
<!-- 回复时间 -->
<view class='mid_item_right_bottom'>
回复时间:07-21 21:00
</view>
</view>
</view>
</view>
<view class='mid_item'>
<!-- 左边感叹号 -->
<view class='mid_item_left'>
<image src='../../images/tishi@3x.png'></image>
</view>
<!-- 右边标题 -->
<view class='mid_item_right'>
<view class='mid_item_right_top'>
校区门口停车难,镇政府是否可协调交管局规划车位,方便学生家长停车?
<view class='mid_label'>
<image src='../../images/huifuyiban@3x.png'></image>
</view>
</view>
<view class='mid_item_right_bottom'>
发布时间:07-21 21:00
</view>
<!-- 回复 -->
<view class='response_box'>
<!-- 回复内容 -->
<view class='mid_item_right_response'>
<text class='color_blue'>回复:</text> 贵单位的问题已反应到相关单位,具体实施方案将在7个工作日内反馈
</view>
<!-- 回复时间 -->
<view class='mid_item_right_bottom'>
回复时间:07-21 21:00
</view>
</view>
</view>
</view>
<view class='mid_item'>
<!-- 左边感叹号 -->
<view class='mid_item_left'>
<image src='../../images/tishi@3x.png'></image>
</view>
<!-- 右边标题 -->
<view class='mid_item_right'>
<view class='mid_item_right_top'>
校区门口停车难,镇政府是否可协调交管局规划车位,方便学生家长停车?
<view class='mid_label'>
<image src='../../images/huifuzhihuan @3x.png'></image>
</view>
</view>
<view class='mid_item_right_bottom'>
发布时间:07-21 21:00
</view>
<!-- 等待回复 -->
<view class='waiting_response'>
等待回复中.....
</view>
</view>
</view>
</view>
<!-- 提问 -->
<view class='bottom'>
<view class='bottom_question'>
提问
</view>
</view>
</view>
<!-- 企话吧 -->
<view class='box_right'>
<view class='mid'>
<!-- 条目 -->
<view class='mid_item' wx:for="{{noticeList}}" wx:key="index">
<view class='mid_item_top'>
<view class='mid_item_top_left'>
<!-- 图片 -->
<view class='mid_item_top_left_pic'>
<image src='../../images/03_nav@2x.png'></image>
</view>
<!-- 文字 -->
<view class='mid_item_top_left_text color_blue'>
牧羊人
<view class='mid_icon' wx:if="{{item.read_switch == 0}}">
未读
<!-- <image src='../../images/weidu@2x.png'></image> -->
</view>
<view class='mid_icon color_read' wx:if="{{item.read_switch == 1}}">
已读
<!-- <image src='../../images/weidu@2x.png'></image> -->
</view>
</view>
</view>
<view class='mid_item_top_right '>
15分钟前
</view>
</view>
<!-- 大标题 -->
<view class='mid_item_title'>
{{item.title}}
</view>
<!-- 文字内容 -->
<view class='mid_item_text'>
{{item.content}}
</view>
</view>
<!-- 条目 -->
<view class='mid_item'>
<view class='mid_item_top'>
<view class='mid_item_top_left'>
<!-- 图片 -->
<view class='mid_item_top_left_pic'>
<image src='../../images/03_nav@2x.png'></image>
</view>
<!-- 文字 -->
<view class='mid_item_top_left_text color_blue'>
牧羊人
<view class='mid_icon color_read'>
已读
<!-- <image src='../../images/weidu@2x.png'></image> -->
</view>
</view>
</view>
<view class='mid_item_top_right '>
15分钟前
</view>
</view>
<!-- 大标题 -->
<view class='mid_item_title'>
交通优势突出停车难问题能否解决?
</view>
<!-- 文字内容 -->
<view class='mid_item_text'>
新个人所得税法近日备受关注。关于个人所得税,想必大家都十分关心,让我们通过以下问题!
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
<scroll-view scroll-y='true' style='height:{{winHeight}}px' hidden='{{!ifData}}'>
<view class='mid'>
<view class='mid_item' wx:for="{{noticeList}}" wx:key="index">
<view class='mid_item_top'>
<view class='mid_item_top_left'>
<!-- 图片 -->
<view class='mid_item_top_left_pic'>
<image src='../../images/03_nav@2x.png'></image>
</view>
<!-- 文字 -->
<view class='mid_item_top_left_text color_blue'>
牧羊人
<view class='mid_icon' wx:if="{{item.read_switch == 0}}">
未读
<!-- <image src='../../images/weidu@2x.png'></image> -->
</view>
<view class='mid_icon color_read' wx:if="{{item.read_switch == 1}}">
已读
<!-- <image src='../../images/weidu@2x.png'></image> -->
</view>
</view>
</view>
<view class='mid_item_top_right '>
15分钟前
</view>
</view>
<!-- 大标题 -->
<view class='mid_item_title'>
{{item.title}}
</view>
<!-- 文字内容 -->
<view class='mid_item_text'>
{{item.content}}
</view>
</view>
</view>
</scroll-view>
<view class="none-box" hidden="{{ifData}}">
<view>暂无相关发文</view>
</view>
\ No newline at end of file
... ...
<view class='container'>
<!-- 企业问答 -->
<view class='box_left' style='display:none'>
<view class='mid'>
<view class='mid_item'>
<!-- 左边感叹号 -->
<view class='mid_item_left'>
<image src='../../images/tishi@3x.png'></image>
</view>
<!-- 右边标题 -->
<view class='mid_item_right'>
<view class='mid_item_right_top'>
校区门口停车难,镇政府是否可协调交管局规划车位,方便学生家长停车?
<view class='mid_label'>
<image src='../../images/huifujishi@3x.png'></image>
</view>
</view>
<view class='mid_item_right_bottom'>
发布时间: 07-21 21:00
</view>
<!-- 回复 -->
<view class='response_box'>
<!-- 回复内容 -->
<view class='mid_item_right_response'>
<text class='color_blue'>回复:</text>
贵单位的问题已反应到相关单位,具体实施方案将在7个工作日内反馈
</view>
<!-- 回复时间 -->
<view class='mid_item_right_bottom'>
回复时间:07-21 21:00
</view>
</view>
</view>
</view>
<view class='mid_item'>
<!-- 左边感叹号 -->
<view class='mid_item_left'>
<image src='../../images/tishi@3x.png'></image>
</view>
<!-- 右边标题 -->
<view class='mid_item_right'>
<view class='mid_item_right_top'>
校区门口停车难,镇政府是否可协调交管局规划车位,方便学生家长停车?
<view class='mid_label'>
<image src='../../images/huifuyiban@3x.png'></image>
</view>
</view>
<view class='mid_item_right_bottom'>
发布时间:07-21 21:00
</view>
<!-- 回复 -->
<view class='response_box'>
<!-- 回复内容 -->
<view class='mid_item_right_response'>
<text class='color_blue'>回复:</text>
贵单位的问题已反应到相关单位,具体实施方案将在7个工作日内反馈
</view>
<!-- 回复时间 -->
<view class='mid_item_right_bottom'>
回复时间:07-21 21:00
</view>
</view>
</view>
</view>
<view class='mid_item'>
<!-- 左边感叹号 -->
<view class='mid_item_left'>
<image src='../../images/tishi@3x.png'></image>
</view>
<!-- 右边标题 -->
<view class='mid_item_right'>
<view class='mid_item_right_top'>
校区门口停车难,镇政府是否可协调交管局规划车位,方便学生家长停车?
<view class='mid_label'>
<image src='../../images/huifuzhihuan @3x.png'></image>
</view>
</view>
<view class='mid_item_right_bottom'>
发布时间:07-21 21:00
</view>
<!-- 等待回复 -->
<view class='waiting_response'>
等待回复中.....
</view>
</view>
</view>
</view>
<!-- 提问 -->
<view class='bottom'>
<view class='bottom_question'>
提问
</view>
</view>
</view>
<!-- 企话吧 -->
<view class='box_right'>
<scroll-view class='box_right' hidden='{{!ifData}}'>
<view class='mid'>
<!-- 条目 -->
<view class='mid_item' wx:for="{{likeList}}" wx:key="index">
<view class='mid_item_top'>
... ... @@ -137,8 +30,8 @@
<!-- <view class='mid_pic_box_p'>
<image src='../../images/weirenzheng@3x.png'></image>
</view> -->
</view>
<!-- 底部 -->
... ... @@ -166,12 +59,13 @@
46
</view>
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
</scroll-view>
<view class="none-box" hidden="{{ifData}}">
<view>暂无相关点赞</view>
</view>
\ No newline at end of file
... ...
... ... @@ -6,7 +6,8 @@ Page({
*/
data: {
articleList:[],
ifData:!1
ifData:!1,
page: 1
},
/**
... ... @@ -20,11 +21,12 @@ Page({
windowHeight: res.windowHeight
})
},
})
}), c.articleList();
},
articleList(){
let b = this, url =' /api/User/getMyPostsList',params={
header:true
let b = this, url ='/api/User/getMyPostsList',params={
header:true,
page: b.data.page
};
a.post(url,params).then((r)=>{
let dataList = b.data.articleList.concat(r.data);
... ... @@ -39,6 +41,34 @@ Page({
})
},
delArticle(e){
console.log(e)
let t = this, id = e.currentTarget.id, url ='/api/interact/deletePosts',params={
id:id,
header:true
};
wx.showModal({
title: '提示',
content: '确认删除这个帖子吗?',
success: (r)=>{
if(r.confirm){
a.post(url,params).then((rt)=>{
wx.showToast({
title: '删除成功',
icon:'none',
duration: 1300
})
t.articleList()
})
}
}
})
},
subArticle(){
wx.navigateTo({
url: '/pages/interact/interactPost/interactPost',
})
},
loadMore(){
},
... ...
<scroll-view class='container' scroll-y='true' hidden='{{!ifData}}' style='height:{{windowHeight}}px'>
<block wx:foe="{{articleList}}" wx:key="">
</block>
<view class='item'>
<view class='item_top'>
{{item.title}}
</view>
<view class='item_mid'>
<view class='item_mid_text'>
{{item.content}}
<block wx:for="{{articleList}}" wx:key="">
<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_mid_box' wx:if="{{item.images}}">
<view class='item_mid_box_pic'>
<image src='{{item.images}}'></image>
<!-- 底部 -->
<view class='item_bottom'>
<view class='item_left' data-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>
<!-- 底部 -->
<view class='item_bottom'>
<view class='item_left' data-id='{{item.id}}' bindtap='delArticle'>
删除
</view>
<view class='item_right'>
<!-- 图片 -->
<view class='item_right_pic'>
<image src='../../images/chakan@3x.png'></image>
<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 class='item_right_number'>
{{item.browse_count}}
</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 class='item_right_pic2'>
<image src='../../images/pinglun@3x.png'></image>
</view>
<!-- 数量 -->
<view class='item_right_number'>
{{item.comment_count}}
</view>
</view>
</view>
</view>
</view>
</block>
<!-- 底部按钮 -->
<!-- <view class='button'>
... ... @@ -52,5 +86,6 @@
</scroll-view>
<view class="none-box" hidden="{{ifData}}">
<view>你还没有帖子,快去发表吧!</view>
<view>你还没有帖子,快去<text class='fabiao' bindtap='subArticle'>发表</text>吧!</view>
</view>
\ No newline at end of file
... ...
... ... @@ -13,6 +13,7 @@ page{
background: #fff;
box-sizing: border-box;
padding: 48rpx 32rpx;
border-bottom:2rpx solid #f7f7f7
}
.item_top{
... ... @@ -140,5 +141,8 @@ page{
position: fixed;
left: 32rpx;
bottom: 30rpx;
}
.fabiao{
color: rgba(0,194,255,1);
text-decoration: underline;
}
\ No newline at end of file
... ...
// pages/question/question.js
let a = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
navbar: [{
name: '企业问答'
},
{
name: '企话吧'
}
],
currentTab: 0,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
navbarTap: function (e) {
console.log(88)
let that = this;
setText(e){
this.setData({
currentTab: e.currentTarget.dataset.idx,
question:e.detail.value
});
},
subQuesition(){
let t = this,params = {
question: t.data.question,
header: true
}, url ='/api/interact/setQuestion';
t.data.question?a.post(url,params).then((r)=>{
wx.showToast({
title: '提交成功,请等待工作人员的审核回复',
icon:'none',
duration: 1300
}),setTimeout(()=>{
wx.navigateBack()
},1100)
}) : wx.showToast({
title: '请输入您要咨询的问题',
icon: 'none'
})
},
jump(){
wx.navigateTo({
url: '',
})
wx.switchTab({
url: '',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--pages/interact/interactPost/interactPost.wxml-->
<view class='box'>
<view class='banner_box'>
<view class='textarea_box'>
<textarea class='textarea' placeholder='请输入您要咨询的问题...' placeholder-class='input_size' maxlength='{{max2}}' value='{{text}}' bindinput='setText'>
</textarea>
</view>
</view>
<view class='bottom_btn' bindtap='subQuesition'>提交咨询</view>
</view>
\ No newline at end of file
... ...
/* pages/interact/interactPost/interactPost.wxss */
page {
background: #f7f7f7;
}
.box {
padding: 30rpx;
box-sizing: border-box;
}
.banner_box {
background: #fff;
padding: 30rpx;
}
.textarea_box {
width: 100%;
min-height: 200rpx;
}
.textarea {
width: 100%;
min-height: 200rpx;
padding: 20rpx 0;
position: relative;
font-size: 28rpx;
}
.number {
position: absolute;
bottom: 0;
right: 0;
color: #a5a6a8;
font-size: 28rpx;
}
.textarea_size {
font-size: 32rpx;
color: #808080;
}
.upload_box {
display: flex;
flex-wrap: wrap;
align-items: center;
}
.upload_img {
width: 187rpx;
height: 187rpx;
border: 1rpx dashed #ebebeb;
display: flex;
align-items: center;
justify-content: center;
position: relative;
margin-right: 20rpx;
margin-bottom: 20rpx;
}
.icon-jia1 {
color: #ebebeb;
font-size: 100rpx;
}
.upload_img:nth-child(5), .upload_img:nth-child(10) {
margin-right: 0;
}
.upload_img image {
width: 100%;
height: 100%;
}
.icon_box {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
right: -12rpx;
top: -12rpx;
}
.icon-shanchu {
font-size: 40rpx;
color: #f70e0e;
}
.type_box {
width: 100%;
height: 86rpx;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1rpx solid #f5f5f5;
}
.type_box input {
font-size: 28rpx;
}
.type_info {
font-size: 32rpx;
color: RGBA(102, 102, 102, 0.6);
}
.list_input {
width: 100%;
height: 86rpx;
display: flex;
align-items: center;
}
.input_box input {
font-size: 32rpx;
}
.add-border {
border-bottom: 1rpx solid #ebebeb;
}
.input_size {
font-size: 32rpx;
color: #ccc;
}
.areas {
width: 100%;
height: 100%;
font-size: 26rpx;
position: relative;
}
.bottom_btn {
width: 100%;
height: 96rpx;
background: #000;
background: linear-gradient(336deg, rgba(0, 128, 255, 1) 0%, rgba(0, 194, 255, 1) 100%);
border-radius: 8rpx;
font-size: 34rpx;
font-weight: bold;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
margin: 150rpx auto 0 auto;
}
... ...
... ... @@ -37,7 +37,7 @@
"list": []
},
"miniprogram": {
"current": 26,
"current": 31,
"list": [
{
"id": 0,
... ... @@ -225,6 +225,42 @@
"id": -1,
"name": "企业认证",
"pathName": "pages/my/approve/approve",
"query": "",
"scene": null
},
{
"id": 27,
"name": "企业问答",
"pathName": "pages/enterprise/enterprise",
"query": "",
"scene": null
},
{
"id": -1,
"name": "发表帖子",
"pathName": "pages/interact/interactPost/interactPost",
"query": "",
"scene": null
},
{
"id": -1,
"name": "提问",
"pathName": "pages/question/question",
"query": "",
"scene": null
},
{
"id": -1,
"name": "发文通知",
"pathName": "pages/myInform/myInform",
"query": "",
"scene": null
},
{
"id": -1,
"name": "我的评论",
"pathName": "pages/myComments/myComments",
"query": "",
"scene": null
}
]
... ...