作者 朱振飞

李七庄街

@@ -6,6 +6,8 @@ App({ @@ -6,6 +6,8 @@ App({
6 logs.unshift(Date.now()) 6 logs.unshift(Date.now())
7 this.changeToken(); 7 this.changeToken();
8 // 获取用户信息 8 // 获取用户信息
  9 + console.log(111)
  10 +
9 }, 11 },
10 changeToken() { 12 changeToken() {
11 let url = '/api/user/codeToToken', t = this; 13 let url = '/api/user/codeToToken', t = this;
@@ -26,11 +28,11 @@ App({ @@ -26,11 +28,11 @@ App({
26 * +------------------- 28 * +-------------------
27 * @return {Promise} promise 返回promise供后续操作 29 * @return {Promise} promise 返回promise供后续操作
28 */ 30 */
29 - if (showLoad == undefined || showLoad){ 31 + (showLoad == undefined || showLoad)?
30 wx.showLoading({ 32 wx.showLoading({
31 title: '加载中', 33 title: '加载中',
32 }) 34 })
33 - } 35 + :''
34 wx.showNavigationBarLoading() 36 wx.showNavigationBarLoading()
35 var promise = new Promise((resolve, reject) => { 37 var promise = new Promise((resolve, reject) => {
36 //init 38 //init
@@ -101,6 +103,6 @@ App({ @@ -101,6 +103,6 @@ App({
101 }, 103 },
102 globalData: { 104 globalData: {
103 userInfo: null, 105 userInfo: null,
104 - baseUrl:'https://lqz.w.brotop.cn' 106 + baseUrl:'https://txgyy.jjjtech.cn/'
105 } 107 }
106 }) 108 })
@@ -22,7 +22,8 @@ @@ -22,7 +22,8 @@
22 "pages/register/register", 22 "pages/register/register",
23 "pages/question/question", 23 "pages/question/question",
24 "pages/attract/list/list", 24 "pages/attract/list/list",
25 - "pages/attract/articleDetail/articleDetail" 25 + "pages/attract/articleDetail/articleDetail",
  26 + "pages/detail/detail"
26 ], 27 ],
27 "tabBar": { 28 "tabBar": {
28 "list": [ 29 "list": [
@@ -57,5 +58,6 @@ @@ -57,5 +58,6 @@
57 "navigationBarBackgroundColor": "#169BD5", 58 "navigationBarBackgroundColor": "#169BD5",
58 "navigationBarTitleText": "政企服务平台", 59 "navigationBarTitleText": "政企服务平台",
59 "navigationBarTextStyle": "white" 60 "navigationBarTextStyle": "white"
60 - } 61 + },
  62 + "sitemapLocation": "sitemap.json"
61 } 63 }
@@ -123,3 +123,8 @@ width: 0; @@ -123,3 +123,8 @@ width: 0;
123 height: 0; 123 height: 0;
124 color: transparent; 124 color: transparent;
125 } 125 }
  126 +
  127 +.wxParse-img{
  128 + max-width: 610rpx;
  129 + overflow: hidden;
  130 +}

75.9 KB | 宽: | 高:

98.4 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖
@@ -7,7 +7,9 @@ Page({ @@ -7,7 +7,9 @@ Page({
7 * 页面的初始数据 7 * 页面的初始数据
8 */ 8 */
9 data: { 9 data: {
10 - 10 + comments:[],
  11 + noMore:!0,
  12 + page:1
11 }, 13 },
12 14
13 /** 15 /**
@@ -17,7 +19,7 @@ Page({ @@ -17,7 +19,7 @@ Page({
17 let t = this; 19 let t = this;
18 t.setData({ 20 t.setData({
19 id: options.id 21 id: options.id
20 - }), t.d(options.id) 22 + }), t.d(options.id),t.c();
21 }, 23 },
22 d(id){ 24 d(id){
23 let url = '/api/Article/detail',params={ 25 let url = '/api/Article/detail',params={
@@ -31,6 +33,87 @@ Page({ @@ -31,6 +33,87 @@ Page({
31 }) 33 })
32 }, 34 },
33 35
  36 + comment() {
  37 + this.setData({
  38 + startComment: true
  39 + })
  40 + },
  41 + outFocus() {
  42 + this.setData({
  43 + startComment: false
  44 + })
  45 + },
  46 + c() {
  47 + let url = '/api/Article/getArticleCommentList', t = this, params = {
  48 + id: t.data.id,
  49 + page: t.data.page
  50 + };
  51 + A.post(url, params).then((r) => {
  52 + t.setData({
  53 + comments: t.data.comments.concat(r.data),
  54 + total: r.total,
  55 + noMore: r.last_page == r.current_page ? !0 : !1
  56 + })
  57 + })
  58 + },
  59 + s() {
  60 + let t = this, params = {
  61 + id: t.data.id,
  62 + content: t.data.content
  63 + }, url = '/api/article/setArticleComment';
  64 + t.data.parent_id ? params.parent_id = t.data.parent_id : '';
  65 +
  66 + !t.data.subing ? (params.content ? (t.setData({ subing: true }),A.post(url, params, false).then((r) => {
  67 + t.setData({
  68 + content: '',
  69 + parent_id: '',
  70 + comments: [],
  71 + page: 1,
  72 + startComment: false,
  73 + subing: false
  74 + })
  75 + t.c();
  76 + }).catch(()=>{
  77 + t.setData({ subing: false })
  78 + })) : wx.showToast({
  79 + title: '请输入评论',
  80 + icon: 'none'
  81 + })):""
  82 + },
  83 + zan(e) {
  84 + let url = '/api/interact/setLike', params = {
  85 + object_id: e.currentTarget.id,
  86 + type: e.currentTarget.dataset.type
  87 + }, index = e.currentTarget.dataset.indx, t = this, type = e.currentTarget.dataset.type;
  88 + A.post(url, params).then((r) => {
  89 + r.is_like==1?wx.showToast({
  90 + title: '点赞成功',
  91 + icon:'none'
  92 + }) : wx.showToast({
  93 + title: '已取消点赞',
  94 + icon: 'none'
  95 + })
  96 + type == '2'?(
  97 + t.data.comments[index].is_like = r.is_like,
  98 + t.data.comments[index].likes = r.likes,
  99 + t.setData({
  100 + comments: t.data.comments
  101 + })): t.setData({
  102 + 'detail.is_like': r.is_like
  103 + })
  104 + })
  105 + },
  106 + subComments(e) {
  107 + this.setData({
  108 + content: e.detail.value
  109 + })
  110 + },
  111 + parentSet(e) {
  112 + this.setData({
  113 + parent_id: e.currentTarget.id,
  114 + startComment: true
  115 + })
  116 + },
34 /** 117 /**
35 * 生命周期函数--监听页面初次渲染完成 118 * 生命周期函数--监听页面初次渲染完成
36 */ 119 */
@@ -70,13 +153,26 @@ Page({ @@ -70,13 +153,26 @@ Page({
70 * 页面上拉触底事件的处理函数 153 * 页面上拉触底事件的处理函数
71 */ 154 */
72 onReachBottom: function () { 155 onReachBottom: function () {
73 - 156 + let t = this;
  157 + !t.data.noMore?(t.setData({
  158 + page: t.data.page+1
  159 + }),t.c()):""
74 }, 160 },
75 161
76 /** 162 /**
77 * 用户点击右上角分享 163 * 用户点击右上角分享
78 */ 164 */
79 onShareAppMessage: function () { 165 onShareAppMessage: function () {
80 - 166 + let that = this;
  167 + return {
  168 + title: that.data.detail.title, // 转发后 所显示的title
  169 + path: '/pages/attract/articleDetail/articleDetail?id='+that.data.id, // 相对的路径
  170 + success: (res) => {
  171 + },
  172 + fail: function (res) {
  173 + // 分享失败
  174 + console.log(res)
  175 + }
  176 + }
81 } 177 }
82 }) 178 })
@@ -3,8 +3,68 @@ @@ -3,8 +3,68 @@
3 <view class='content margin_set'> 3 <view class='content margin_set'>
4 <view class='article'> 4 <view class='article'>
5 <view class='from' hidden='{{!detail.source}}'>来源:{{detail.source}}</view> 5 <view class='from' hidden='{{!detail.source}}'>来源:{{detail.source}}</view>
6 - <view class='time'>{{detail.create_time_text}}</view> 6 + <view class='time ar-time'>{{detail.create_time_text}}</view>
7 </view> 7 </view>
8 <import src="/wxParse/wxParse.wxml" /> 8 <import src="/wxParse/wxParse.wxml" />
9 <template is="wxParse" data="{{wxParseData:contentHtml.nodes}}" /> 9 <template is="wxParse" data="{{wxParseData:contentHtml.nodes}}" />
10 </view> 10 </view>
  11 +
  12 +<view class='comment_box' >
  13 + <view class='comment_title' hidden='{{total==0}}'>评论</view>
  14 + <view class='null_box' hidden='{{total>0}}'>暂无相关评论</view>
  15 + <view class='comment_item' wx:for='{{comments}}' wx:key=''>
  16 + <view class='left_box'>
  17 + <image class='head_img' src='{{item.avatar}}'></image>
  18 + </view>
  19 + <view class='comment_content_box' bindtap='parentSet' id='{{item.id}}'>
  20 + <view class='comment_name'>{{item.nickname}}</view>
  21 + <view class='comment_content'>{{item.content}}</view>
  22 + <view class='list_state_box'>
  23 + <view class='time'>{{item.create_time_text}}</view>
  24 + <view class='list_icon'>
  25 + <view catchtap='zan' class='zan_box' data-indx="{{index}}" id='{{item.id}}' data-type='2'>
  26 + <text class='time'>{{item.likes}}</text>
  27 + <text class='iconfont icon-zan zan active' wx:if="{{item.is_like}}"></text>
  28 + <text class='iconfont icon-zan zan' wx:else></text>
  29 + </view>
  30 + </view>
  31 + </view>
  32 + </view>
  33 + <view class='sec_comments' wx:if="{{item.child.length>0}}">
  34 + <view class='sec_comment' wx:for='{{item.child}}' wx:for-item='sec' wx:key=''>
  35 + <view class='text_bottom'>
  36 + <text class='color_blue'>{{sec.nickname}}:</text>{{sec.content}}
  37 + </view>
  38 + </view>
  39 + <view class='underline'></view>
  40 + </view>
  41 + </view>
  42 +</view>
  43 +
  44 +
  45 +<view class='bottom_box' hidden='{{startComment}}'>
  46 + <view class="label_item" bindtap='comment'>
  47 + <text class='iconfont icon-bianji1 icon'></text>
  48 + <view>{{content||"写评论"}}</view>
  49 + </view>
  50 + <view class='label_icon_box'>
  51 + <view class='iconfont icon-pinglun icon pinglun'>
  52 + <text class='count' hidden='{{total==0}}'>{{total}}</text>
  53 + </view>
  54 + <view class='iconfont icon-fenxiang icon fenxiang'>
  55 + <button open-type='share'></button>
  56 + </view>
  57 + <text class='iconfont icon-zan icon active' style='font-size: 48rpx;' wx:if="{{detail.is_like}}" catchtap='zan' id='{{detail.id}}' data-type='3'></text>
  58 + <text class='iconfont icon-zan icon' wx:else style='font-size: 48rpx;' catchtap='zan' id='{{detail.id}}' data-type='3'></text>
  59 + </view>
  60 +</view>
  61 +
  62 +<view class='bottom_box' hidden='{{!startComment}}'>
  63 + <view class='bottom_box_input'>
  64 + <input placeholder='发表评论...' value='{{content}}' focus='{{startComment}}' bindinput='subComments' bindblur='outFocus' cursor-spacing='10' class='comments' />
  65 + <!-- <view class='sub_box comments' bindtap='comment' hidden='{{startComment}}'>{{content||"发表评论..."}}</view> -->
  66 + </view>
  67 + <view class='bottom_box_text' bindtap='s'>
  68 + 发表
  69 + </view>
  70 +</view>
@@ -24,3 +24,262 @@ padding: 52rpx 0 40rpx; @@ -24,3 +24,262 @@ padding: 52rpx 0 40rpx;
24 .from{ 24 .from{
25 margin-right: 30rpx; 25 margin-right: 30rpx;
26 } 26 }
  27 +
  28 +/* */
  29 +.comment_box {
  30 + padding: 30rpx 30rpx 180rpx;
  31 + background: #fff;
  32 + box-sizing: border-box;
  33 + margin-top: 16rpx;
  34 + border-top: 16rpx solid #f5f5f5;
  35 +}
  36 +
  37 +.comment_title {
  38 + font-size: 34rpx;
  39 + font-weight: bold;
  40 + color: #333;
  41 + border-bottom: 1rpx solid #f5f5f5;
  42 + padding-bottom: 30rpx;
  43 + text-align: center;
  44 +}
  45 +
  46 +.comment_item {
  47 + display: flex;
  48 + align-items: flex-start;
  49 + padding: 30rpx 0;
  50 + margin-bottom: 16rpx;
  51 + background: #fff;
  52 + border-bottom: 1rpx solid #f5f5f5;
  53 + flex-wrap: wrap;
  54 +}
  55 +
  56 +.comment_item:last-child {
  57 + border-bottom: 0;
  58 +}
  59 +
  60 +.head_img {
  61 + width: 80rpx;
  62 + height: 80rpx;
  63 + border-radius: 50%;
  64 + display: flex;
  65 + align-items: center;
  66 + justify-content: center;
  67 + margin-right: 20rpx;
  68 +}
  69 +
  70 +.comment_content_box {
  71 + width: 85%;
  72 +}
  73 +
  74 +.comment_content {
  75 + font-size: 28rpx;
  76 + color: #333;
  77 + margin-top: 10rpx;
  78 +}
  79 +
  80 +.comment_name,.color_blue {
  81 + font-size: 24rpx;
  82 + color: #45609f;
  83 +}
  84 +.time {
  85 + font-size: 24rpx;
  86 + color: #999;
  87 +}
  88 +.ar-time{
  89 + display: flex;
  90 + align-items: center;
  91 +}
  92 +.wxParse-img{
  93 + max-width:100%;
  94 + overflow: hidden;
  95 +}
  96 +.zan {
  97 + font-size: 40rpx;
  98 + margin-left: 10rpx;
  99 +}
  100 +
  101 +.list_info_box {
  102 + font-size: 24rpx;
  103 + color: #b3b3b3;
  104 +}
  105 +
  106 +.list_state_box {
  107 + display: flex;
  108 + align-items: center;
  109 + justify-content: space-between;
  110 + font-size: 26rpx;
  111 + color: #999;
  112 + margin-top: 15rpx;
  113 +}
  114 +
  115 +.list_comment_box {
  116 + background: #ebecf0;
  117 + font-size: 24rpx;
  118 + color: #6b7e91;
  119 + margin-top: 28rpx;
  120 +}
  121 +
  122 +.comment_list {
  123 + border-bottom: 1rpx solid #fff;
  124 + padding: 10rpx 17rpx;
  125 +}
  126 +
  127 +/* */
  128 +
  129 +.null_box {
  130 + width: 100%;
  131 + height: 110rpx;
  132 +}
  133 +
  134 +.bottom_box {
  135 + width: 100%;
  136 + height: 96rpx;
  137 + position: fixed;
  138 + left: 0;
  139 + bottom: 0;
  140 + background: #fff;
  141 + display: flex;
  142 + align-items: center;
  143 + padding: 0 30rpx;
  144 + box-shadow:0rpx 0rpx 12rpx rgba(0,0,0,0.05);
  145 +}
  146 +
  147 +.label_item {
  148 + width: 340rpx;
  149 + height: 64rpx;
  150 + background: rgba(247, 247, 247, 1);
  151 + border: 1rpx solid rgba(238, 238, 238, 1);
  152 + border-radius: 206rpx;
  153 + display: flex;
  154 + align-items: center;
  155 + font-size: 28rpx;
  156 + color: #666;
  157 + padding: 5rpx 20rpx;
  158 + margin-left: 30rpx;
  159 +}
  160 +.zan.active{
  161 + color: #45609f;
  162 +}
  163 +
  164 +.icon-bianji1{
  165 + margin-right: 10rpx;
  166 +}
  167 +.label_icon_box{
  168 + width: 40%;
  169 + display: flex;
  170 + align-items: center;
  171 + justify-content: space-around;
  172 + padding: 0 30rpx;
  173 +}
  174 +
  175 +
  176 +.icon {
  177 + font-size: 40rpx;
  178 + color: #666666;
  179 +}
  180 +.icon.active{
  181 + color: #45609f;
  182 +}
  183 +.pinglun{
  184 + position: relative;
  185 +}
  186 +.pinglun .count{
  187 + background: #FF3131;
  188 + color: #FFF;
  189 + font-size: 16rpx;
  190 + position: absolute;
  191 + border-radius: 16rpx;
  192 + padding: 4rpx 10rpx;
  193 + right: 6rpx;
  194 + top: -10rpx;
  195 + transform: translateX(90%);
  196 +}
  197 +.fenxiang{
  198 + position: relative;
  199 +}
  200 +.fenxiang button{
  201 + position: absolute;
  202 + top: 0;
  203 + left: 0;
  204 + width: 100%;
  205 + height: 100%;
  206 + opacity: 0;
  207 +}
  208 +
  209 +.bottom_box{
  210 + width: 750rpx;
  211 + /* min-height: 120rpx; */
  212 + display: flex;
  213 + align-items: center;
  214 + justify-content: center;
  215 + background: #fff;
  216 + position: fixed;
  217 + bottom: 0;
  218 + border-top: 2rpx solid #F5F5F5;
  219 + padding: 20rpx 0;
  220 + z-index: 10;
  221 +}
  222 +.comments{
  223 + border:1rpx solid #F5F5F5;
  224 + font-size: 28rpx;
  225 + padding: 15rpx;
  226 + max-height: 130rpx;
  227 +}
  228 +.bottom_box_input{
  229 + width: 608rpx;
  230 + display: flex;
  231 + background:rgba(247,247,247,1);
  232 + border:2px solid rgba(238,238,238,1);
  233 + opacity:1;
  234 + border-radius:8rpx;
  235 +}
  236 +.bottom_box_input input{
  237 + width: 100%;
  238 + height: 64rpx;
  239 + padding: 0 32rpx;
  240 + font-size: 28rpx;
  241 +}
  242 +.bottom_box_input::placeholder{
  243 + color: #CCCCCC;
  244 +}
  245 +.bottom_box_text{
  246 + margin-left: 16rpx;
  247 + font-size:32rpx;
  248 + font-family:PingFang SC;
  249 + font-weight:600;
  250 + line-height:44rpx;
  251 + color:rgba(51,51,51,1);
  252 + opacity:1;
  253 +}
  254 +.item_box{
  255 + margin-top: 16rpx;
  256 + padding-bottom: 120rpx;
  257 +}
  258 +.sub_box{
  259 + color: #666;
  260 +}
  261 +.sec_comments{
  262 + width: 85%;
  263 + margin-left: auto;
  264 + -webkit-margin-start: auto;
  265 +}
  266 +.text_bottom{
  267 + margin-top: 22rpx;
  268 + background:rgba(245,245,245,1);
  269 + border-radius:8rpx;
  270 + padding: 16rpx;
  271 + font-size:24rpx;
  272 + font-family:PingFang SC;
  273 + font-weight:400;
  274 + line-height:34rpx;
  275 + color:rgba(51,51,51,1);
  276 + opacity:1;
  277 +}
  278 +.null_box{
  279 + height: 120rpx;
  280 + font-size: 28rpx;
  281 + color: #666;
  282 + display: flex;
  283 + align-items: center;
  284 + justify-content: center;
  285 +}
@@ -35,7 +35,15 @@ Page({ @@ -35,7 +35,15 @@ Page({
35 tabWidth: res.windowWidth - 39 35 tabWidth: res.windowWidth - 39
36 }) 36 })
37 } 37 }
38 - }),this.policyType(); 38 + }), this.policyType(), this.getBanner();
  39 + },
  40 + getBanner(){
  41 + let url = '/api/Article/getAttractInvestmentBanner';
  42 + app.post(url,{}).then(r=>{
  43 + this.setData({
  44 + banner: r.banner
  45 + })
  46 + })
39 }, 47 },
40 policyType(){ 48 policyType(){
41 let url = '/api/Article/category',a = this; 49 let url = '/api/Article/category',a = this;
@@ -68,9 +76,9 @@ Page({ @@ -68,9 +76,9 @@ Page({
68 category_id: id, 76 category_id: id,
69 page: page, 77 page: page,
70 header: true 78 header: true
71 - };app.post(url,params).then((res)=>{ 79 + }, list = page == 1 ? [] : t.data.list;app.post(url,params).then((res)=>{
72 e.setData({ 80 e.setData({
73 - list: e.data.list.concat(res.data), 81 + list: list.concat(res.data),
74 page: res.current_page, 82 page: res.current_page,
75 lastPage: res.last_page, 83 lastPage: res.last_page,
76 ifData: !0, 84 ifData: !0,
@@ -121,8 +129,7 @@ Page({ @@ -121,8 +129,7 @@ Page({
121 onPullDownRefresh: function () { 129 onPullDownRefresh: function () {
122 let t = this; 130 let t = this;
123 t.setData({ 131 t.setData({
124 - page:1,  
125 - list:[] 132 + page:1
126 }) 133 })
127 t.getList(t.data.category_id,1) 134 t.getList(t.data.category_id,1)
128 }, 135 },
@@ -133,7 +140,7 @@ Page({ @@ -133,7 +140,7 @@ Page({
133 onReachBottom: function () { 140 onReachBottom: function () {
134 let t = this; 141 let t = this;
135 !t.data.noMore ? (t.setData({ 142 !t.data.noMore ? (t.setData({
136 - page:t.dat.page+1 143 + page:t.data.page+1
137 }),t.getList(t.data.category_id,t.data.page)) : wx.showToast({ 144 }),t.getList(t.data.category_id,t.data.page)) : wx.showToast({
138 title: '没有更多了', 145 title: '没有更多了',
139 }) 146 })
1 <!--pages/attract/attract.wxml--> 1 <!--pages/attract/attract.wxml-->
2 <view class='top_view'> 2 <view class='top_view'>
3 <view class='top_banner'> 3 <view class='top_banner'>
4 - <image src='/images/zhaoshang.png' width='100%' mode='widthFix' bindtap='bannerDetail' id='1'></image> 4 + <image src='{{banner}}' width='100%' mode='widthFix' bindtap='bannerDetail' id='1'></image>
5 </view> 5 </view>
6 6
7 <!-- 菜单按钮 --> 7 <!-- 菜单按钮 -->
@@ -27,11 +27,11 @@ @@ -27,11 +27,11 @@
27 <view class='new_info'> 27 <view class='new_info'>
28 <view class='new_title'><text class='recommond' wx:if='{{item.recommend}}'>推荐</text>{{item.title}}</view> 28 <view class='new_title'><text class='recommond' wx:if='{{item.recommend}}'>推荐</text>{{item.title}}</view>
29 <view class='new_time_address'> 29 <view class='new_time_address'>
30 - <view class='form' wx:if="{{item.from}}">{{item.source}}</view> 30 + <view class='form' wx:if="{{item.keywords}}">{{item.keywords}}</view>
31 <view class='time'>{{item.create_time_text}}</view> 31 <view class='time'>{{item.create_time_text}}</view>
32 </view> 32 </view>
33 </view> 33 </view>
34 - <view class='new_info_image' wx:if="{{item.photos.length>0}}"> 34 + <view class='new_info_image' wx:if="{{item.thumb_image}}">
35 <image src='{{item.thumb_image}}' mode='widthFix'></image> 35 <image src='{{item.thumb_image}}' mode='widthFix'></image>
36 </view> 36 </view>
37 </navigator> 37 </navigator>
1 /* pages/attract/attract.wxss */ 1 /* pages/attract/attract.wxss */
2 page{ 2 page{
3 - background: #F7F7F7; 3 + background: #FFF;
4 } 4 }
5 .top_banner image{ 5 .top_banner image{
6 width: 100%; 6 width: 100%;
7 } 7 }
8 .top_view{ 8 .top_view{
9 background: #F7F7F7; 9 background: #F7F7F7;
  10 + position:fixed;
  11 + top:0;
  12 + left:0;
  13 + width:100%;
  14 + z-index:101;
10 } 15 }
11 -.top_banner{ 16 +/* .top_banner{
12 position: fixed; 17 position: fixed;
13 top: 0; 18 top: 0;
14 left: 0; 19 left: 0;
15 width: 100%; 20 width: 100%;
16 z-index: 101; 21 z-index: 101;
17 -} 22 +} */
18 .menu_content{ 23 .menu_content{
19 display: flex; 24 display: flex;
20 position: fixed; 25 position: fixed;
21 - top: 320rpx; 26 + top: 310rpx;
22 left: 0; 27 left: 0;
23 width: 100%; 28 width: 100%;
24 z-index: 101; 29 z-index: 101;
  30 + border-top: 8rpx solid #f5f5f5;
25 } 31 }
26 .menu_items{ 32 .menu_items{
27 display: flex; 33 display: flex;
@@ -33,18 +39,21 @@ page{ @@ -33,18 +39,21 @@ page{
33 overflow: hidden; 39 overflow: hidden;
34 white-space: nowrap; 40 white-space: nowrap;
35 line-height: 74rpx; 41 line-height: 74rpx;
  42 +
36 } 43 }
37 .menu_item{ 44 .menu_item{
38 - width: 20%; 45 + padding:0 33rpx;
39 display: inline-block; 46 display: inline-block;
40 text-align: center; 47 text-align: center;
41 } 48 }
  49 +/* .menu_item:first-child{
  50 + padding-left: rpx;
  51 +} */
42 .menu_item.active{ 52 .menu_item.active{
43 color: #169BD5; 53 color: #169BD5;
44 } 54 }
45 .paixun{ 55 .paixun{
46 position: relative; 56 position: relative;
47 - height: 100%;  
48 display: flex; 57 display: flex;
49 align-items: center; 58 align-items: center;
50 height: 74rpx; 59 height: 74rpx;
@@ -135,4 +144,6 @@ page{ @@ -135,4 +144,6 @@ page{
135 box-sizing: border-box; 144 box-sizing: border-box;
136 border-radius: 8rpx; 145 border-radius: 8rpx;
137 margin-right: 10rpx; 146 margin-right: 10rpx;
  147 + position: relative;
  148 + top: -4rpx;
138 } 149 }
@@ -30,6 +30,15 @@ Page({ @@ -30,6 +30,15 @@ Page({
30 WxParse.wxParse('contentHtml', 'html', r.content, d, 5); 30 WxParse.wxParse('contentHtml', 'html', r.content, d, 5);
31 }) 31 })
32 }, 32 },
  33 + viewCode(e){
  34 + wx.previewImage({
  35 + current: this.data.detail.wechat[e.currentTarget.id],
  36 + urls: this.data.detail.wechat,
  37 + success: function(res) {},
  38 + fail: function(res) {},
  39 + complete: function(res) {},
  40 + })
  41 + },
33 makePhone(e){ 42 makePhone(e){
34 wx.makePhoneCall({ 43 wx.makePhoneCall({
35 phoneNumber: e.currentTarget.dataset.phone, 44 phoneNumber: e.currentTarget.dataset.phone,
@@ -32,20 +32,17 @@ @@ -32,20 +32,17 @@
32 <view class='zixun_content'>{{detail.email}}</view> 32 <view class='zixun_content'>{{detail.email}}</view>
33 </view> 33 </view>
34 <view class='zixun_item' hidden="{{detail.wechat.length==0}}"> 34 <view class='zixun_item' hidden="{{detail.wechat.length==0}}">
35 - <view class='zixun_icon chat'> 35 + <!-- <view class='zixun_icon chat'>
36 <image src='/images/wechat.png' mode='widthFix'></image> 36 <image src='/images/wechat.png' mode='widthFix'></image>
37 - </view>  
38 - <view class='zixun_content'> 37 + </view> -->
  38 + <!-- <view class='zixun_content'>
39 <view class='erwei_code'> 39 <view class='erwei_code'>
40 <view class='img_box' wx:for='{{detail.wechat}}' wx:key=''> 40 <view class='img_box' wx:for='{{detail.wechat}}' wx:key=''>
41 - <image src='{{item}}' mode='widthFix'></image>  
42 - </view>  
43 - <view class='img_box'>  
44 - <image src='{{item}}' mode='widthFix'></image> 41 + <image src='{{item}}' bindtap='viewCode' id='{{index}}' mode='widthFix'></image>
45 </view> 42 </view>
46 </view> 43 </view>
47 <view>扫描二维码,关注公众号</view> 44 <view>扫描二维码,关注公众号</view>
48 - </view> 45 + </view> -->
49 </view> 46 </view>
50 </view> 47 </view>
51 </view> 48 </view>
@@ -91,6 +91,8 @@ page{ @@ -91,6 +91,8 @@ page{
91 } 91 }
92 .email{ 92 .email{
93 width: 46rpx; 93 width: 46rpx;
  94 + position: relative;
  95 + top: 6rpx;
94 } 96 }
95 .phone{ 97 .phone{
96 width: 46rpx; 98 width: 46rpx;
@@ -118,8 +120,8 @@ page{ @@ -118,8 +120,8 @@ page{
118 width: 100%; 120 width: 100%;
119 } 121 }
120 .zhaoshang_desc{ 122 .zhaoshang_desc{
121 - margin: 0 40rpx;  
122 - padding: 30rpx 0; 123 + margin: 0 46rpx;
  124 + /* padding: 30rpx 0; */
123 } 125 }
124 .note{ 126 .note{
125 display: flex; 127 display: flex;
@@ -136,6 +138,9 @@ page{ @@ -136,6 +138,9 @@ page{
136 .note text{ 138 .note text{
137 position: relative; 139 position: relative;
138 } 140 }
  141 +.zan_box{
  142 + display: flex;
  143 +}
139 .note text:before{ 144 .note text:before{
140 position: absolute; 145 position: absolute;
141 top: 50%; 146 top: 50%;
@@ -154,3 +159,8 @@ page{ @@ -154,3 +159,8 @@ page{
154 background-color:#999; 159 background-color:#999;
155 right: -60rpx; 160 right: -60rpx;
156 } 161 }
  162 +.wxParse-img{
  163 + max-width: 100%;
  164 + overflow: hidden;
  165 + position: relative;
  166 +}
@@ -20,17 +20,7 @@ Page({ @@ -20,17 +20,7 @@ Page({
20 }),t.d(options.id),t.c() 20 }),t.d(options.id),t.c()
21 21
22 }, 22 },
23 - comment(){  
24 - console.log(1)  
25 - this.setData({  
26 - startComment: true  
27 - })  
28 - },  
29 - outFocus(){  
30 - this.setData({  
31 - startComment: false  
32 - })  
33 - }, 23 +
34 d(id){ 24 d(id){
35 let url = '/api/interact/getPostsDetail',params = { 25 let url = '/api/interact/getPostsDetail',params = {
36 id:id 26 id:id
@@ -42,6 +32,17 @@ Page({ @@ -42,6 +32,17 @@ Page({
42 }) 32 })
43 }) 33 })
44 }, 34 },
  35 + comment() {
  36 + console.log(1)
  37 + this.setData({
  38 + startComment: true
  39 + })
  40 + },
  41 + outFocus() {
  42 + this.setData({
  43 + startComment: false
  44 + })
  45 + },
45 c(){ 46 c(){
46 let url = '/api/interact/getPostsCommentList',t = this ,params={ 47 let url = '/api/interact/getPostsCommentList',t = this ,params={
47 id:t.data.id, 48 id:t.data.id,
1 -  
2 <view class='container'> 1 <view class='container'>
3 <view class='item'> 2 <view class='item'>
4 <view class='item_top'>{{detail.title}}</view> 3 <view class='item_top'>{{detail.title}}</view>
@@ -80,7 +79,7 @@ @@ -80,7 +79,7 @@
80 <view class='time_bottom_left'> 79 <view class='time_bottom_left'>
81 {{item.create_time_text}} 80 {{item.create_time_text}}
82 </view> 81 </view>
83 - <view class='time_bottom_left' bindtap='zan' id='{{item.id}}' data-indx = '{{index}}' data-type='{{item.is_like}}'> 82 + <view class='time_bottom_left' bindtap='zan' id='{{item.id}}' data-indx='{{index}}' data-type='{{item.is_like}}'>
84 <view class='time_bottom_left_pic'> 83 <view class='time_bottom_left_pic'>
85 <image src='/images/zan@3x.png' wx:if="{{item.is_like==0}}" mode='widthFix'></image> 84 <image src='/images/zan@3x.png' wx:if="{{item.is_like==0}}" mode='widthFix'></image>
86 <image src='/images/thumb-up-button@3x.png' wx:else mode='widthFix'></image> 85 <image src='/images/thumb-up-button@3x.png' wx:else mode='widthFix'></image>
@@ -92,7 +91,7 @@ @@ -92,7 +91,7 @@
92 <!-- 底部评论 --> 91 <!-- 底部评论 -->
93 <view class='sec_comments' wx:if="{{item.child.length>0}}"> 92 <view class='sec_comments' wx:if="{{item.child.length>0}}">
94 <view class='sec_comment' wx:for='{{item.child}}' wx:for-item='sec' wx:key=''> 93 <view class='sec_comment' wx:for='{{item.child}}' wx:for-item='sec' wx:key=''>
95 - <view class='text_bottom' > 94 + <view class='text_bottom'>
96 <text class='color_blue'>{{sec.nickname}}:</text>{{sec.content}} 95 <text class='color_blue'>{{sec.nickname}}:</text>{{sec.content}}
97 </view> 96 </view>
98 </view> 97 </view>
@@ -107,12 +106,11 @@ @@ -107,12 +106,11 @@
107 <!-- 底部发表按钮 --> 106 <!-- 底部发表按钮 -->
108 <view class='bottom_box'> 107 <view class='bottom_box'>
109 <view class='bottom_box_input'> 108 <view class='bottom_box_input'>
110 - <input placeholder='发表评论...' value='{{content}}' focus='{{startComment}}' bindinput='subComments' bindblur='outFocus' cursor-spacing='10' class='comments'/> 109 + <input placeholder='发表评论...' value='{{content}}' focus='{{startComment}}' bindinput='subComments' bindblur='outFocus' cursor-spacing='10' class='comments' />
111 <!-- <view class='sub_box comments' bindtap='comment' hidden='{{startComment}}'>{{content||"发表评论..."}}</view> --> 110 <!-- <view class='sub_box comments' bindtap='comment' hidden='{{startComment}}'>{{content||"发表评论..."}}</view> -->
112 </view> 111 </view>
113 <view class='bottom_box_text' bindtap='s'> 112 <view class='bottom_box_text' bindtap='s'>
114 发表 113 发表
115 </view> 114 </view>
116 </view> 115 </view>
117 -  
118 </view> 116 </view>
@@ -246,8 +246,6 @@ page{ @@ -246,8 +246,6 @@ page{
246 line-height:34rpx; 246 line-height:34rpx;
247 color:rgba(51,51,51,1); 247 color:rgba(51,51,51,1);
248 opacity:1; 248 opacity:1;
249 -  
250 -  
251 } 249 }
252 .underline{ 250 .underline{
253 margin-top: 16rpx; 251 margin-top: 16rpx;
  1 +// pages/detail/detail.js
  2 +const a = getApp();
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 +
  10 + },
  11 +
  12 + /**
  13 + * 生命周期函数--监听页面加载
  14 + */
  15 + onLoad: function (options) {
  16 + this.setData({
  17 + id: options.id
  18 + }), this.detail();
  19 + },
  20 + detail(){
  21 + let url = '/api/User/getNoticeInfo',params = {
  22 + id: this.data.id
  23 + };
  24 + a.post(url,params).then(r=>{
  25 + this.setData({
  26 + detail: r
  27 + })
  28 + let action = wx.getStorageSync('action');
  29 + action.read = 1
  30 + wx.setStorageSync('action', action)
  31 + })
  32 + },
  33 +
  34 + /**
  35 + * 生命周期函数--监听页面初次渲染完成
  36 + */
  37 + onReady: function () {
  38 +
  39 + },
  40 +
  41 + /**
  42 + * 生命周期函数--监听页面显示
  43 + */
  44 + onShow: function () {
  45 +
  46 + },
  47 +
  48 + /**
  49 + * 生命周期函数--监听页面隐藏
  50 + */
  51 + onHide: function () {
  52 +
  53 + },
  54 +
  55 + /**
  56 + * 生命周期函数--监听页面卸载
  57 + */
  58 + onUnload: function () {
  59 +
  60 + },
  61 +
  62 + /**
  63 + * 页面相关事件处理函数--监听用户下拉动作
  64 + */
  65 + onPullDownRefresh: function () {
  66 +
  67 + },
  68 +
  69 + /**
  70 + * 页面上拉触底事件的处理函数
  71 + */
  72 + onReachBottom: function () {
  73 +
  74 + },
  75 +
  76 + /**
  77 + * 用户点击右上角分享
  78 + */
  79 + onShareAppMessage: function () {
  80 +
  81 + }
  82 +})
  1 +{
  2 + "usingComponents": {},
  3 + "navigationBarTitleText": "发文详情"
  4 +}
  1 +<!--pages/detail/detail.wxml-->
  2 +<view class='main'>
  3 + <view class='title'>{{detail.title}}</view>
  4 + <view class='date'>{{detail.create_time_text}}</view>
  5 + <view class='cotent'>{{detail.content}}</view>
  6 +</view>
  1 +/* pages/detail/detail.wxss */
  2 +.main{
  3 + padding: 30rpx 40rpx;
  4 + font-size: 28rpx;
  5 +}
  6 +.title,.date,.content{
  7 + margin-bottom: 22rpx;
  8 +}
  9 +.title{
  10 + color: #333
  11 +}
  12 +.date{
  13 + color: #999;
  14 +}
  15 +.content{
  16 + color: #666
  17 +}
@@ -24,13 +24,14 @@ Page({ @@ -24,13 +24,14 @@ Page({
24 * 生命周期函数--监听页面加载 24 * 生命周期函数--监听页面加载
25 */ 25 */
26 onLoad: function (options) { 26 onLoad: function (options) {
  27 +
27 let c = this; wx.getSystemInfo({ 28 let c = this; wx.getSystemInfo({
28 success: function (res) { 29 success: function (res) {
29 c.setData({ 30 c.setData({
30 winHeight: res.windowHeight 31 winHeight: res.windowHeight
31 }) 32 })
32 }, 33 },
33 - }), this.postList(); 34 + });
34 }, 35 },
35 subArticle() { 36 subArticle() {
36 wx.navigateTo({ 37 wx.navigateTo({
@@ -70,7 +71,6 @@ Page({ @@ -70,7 +71,6 @@ Page({
70 t.setData({ 71 t.setData({
71 postList: t.data.postList 72 postList: t.data.postList
72 }) 73 })
73 -  
74 }) 74 })
75 } 75 }
76 } 76 }
@@ -93,7 +93,7 @@ Page({ @@ -93,7 +93,7 @@ Page({
93 b.create_time = A.timeFormate(b.create_time, 'YYMMDDHHMM') 93 b.create_time = A.timeFormate(b.create_time, 'YYMMDDHHMM')
94 b.reply_time = A.timeFormate(b.reply_time,'YYMMDDHHMM') 94 b.reply_time = A.timeFormate(b.reply_time,'YYMMDDHHMM')
95 } 95 }
96 - let list = d.data.zixunList.concat(r.data); 96 + let list = d.data.page>1?d.data.zixunList.concat(r.data):r.data;
97 d.setData({ 97 d.setData({
98 zixunList: list 98 zixunList: list
99 }) 99 })
@@ -122,7 +122,7 @@ Page({ @@ -122,7 +122,7 @@ Page({
122 for(let b of r.data){ 122 for(let b of r.data){
123 b.images = b.images.split(',') 123 b.images = b.images.split(',')
124 } 124 }
125 - let list = d.data.postList.concat(r.data); 125 + let list = d.data.page > 1 ?d.data.postList.concat(r.data):r.data;
126 d.setData({ 126 d.setData({
127 postList: list, 127 postList: list,
128 comment: r.new_comment 128 comment: r.new_comment
@@ -150,7 +150,8 @@ Page({ @@ -150,7 +150,8 @@ Page({
150 b.setData({ 150 b.setData({
151 auth: r 151 auth: r
152 }); 152 });
153 - r == 2 ? b.getzixun() : ''; 153 + // r == 2 ? b.getzixun() : '';
  154 + wx.stopPullDownRefresh()
154 }) 155 })
155 }, 156 },
156 renzheng(e) { 157 renzheng(e) {
@@ -199,13 +200,14 @@ Page({ @@ -199,13 +200,14 @@ Page({
199 * 生命周期函数--监听页面显示 200 * 生命周期函数--监听页面显示
200 */ 201 */
201 onShow: function () { 202 onShow: function () {
202 - this.checkstatus() 203 + this.checkstatus();
203 this.setData({ 204 this.setData({
204 zixunList: [], 205 zixunList: [],
205 postList:[], 206 postList:[],
206 page: 1, 207 page: 1,
207 show:!0 208 show:!0
208 }) 209 })
  210 +
209 this.data.currentTab=='0'?this.getzixun():this.postList() 211 this.data.currentTab=='0'?this.getzixun():this.postList()
210 }, 212 },
211 213
@@ -229,8 +231,6 @@ Page({ @@ -229,8 +231,6 @@ Page({
229 onPullDownRefresh: function () { 231 onPullDownRefresh: function () {
230 this.checkstatus() 232 this.checkstatus()
231 this.setData({ 233 this.setData({
232 - zixunList: [],  
233 - postList: [],  
234 page: 1 234 page: 1
235 }) 235 })
236 this.data.currentTab == '0' ? this.getzixun() : this.postList() 236 this.data.currentTab == '0' ? this.getzixun() : this.postList()
1 { 1 {
2 "usingComponents": {}, 2 "usingComponents": {},
3 - "navigationBarTitleText": "政企服务平台", 3 + "navigationBarTitleText": "政企互动",
4 "navigationBarBackgroundColor": "#169BD5", 4 "navigationBarBackgroundColor": "#169BD5",
5 "navigationBarTextStyle": "white", 5 "navigationBarTextStyle": "white",
6 "enablePullDownRefresh": true 6 "enablePullDownRefresh": true
1 -<view class="nav mainindex_nav top"> 1 +<!-- <view class="nav mainindex_nav top">
2 <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> 2 <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>
3 -</view> 3 +</view> -->
4 4
5 5
6 <view wx:if='{{auth=="2"}}' class='main_container' style='height:{{winHeight}}px' > 6 <view wx:if='{{auth=="2"}}' class='main_container' style='height:{{winHeight}}px' >
@@ -16,11 +16,11 @@ @@ -16,11 +16,11 @@
16 <view class='mid_item_right'> 16 <view class='mid_item_right'>
17 <view class='mid_item_right_top'> 17 <view class='mid_item_right_top'>
18 {{item.question}}? 18 {{item.question}}?
19 - <view class='mid_label' hidden='{{!item.is_show_state}}'> 19 + <!-- <view class='mid_label' hidden='{{!item.is_show_state}}'>
20 <image src='../../images/huifujishi@3x.png' wx:if="{{item.state=='1'}}"></image> 20 <image src='../../images/huifujishi@3x.png' wx:if="{{item.state=='1'}}"></image>
21 <image src='../../images/huifuyiban@3x.png' wx:elif='{{item.state=="2"}}'></image> 21 <image src='../../images/huifuyiban@3x.png' wx:elif='{{item.state=="2"}}'></image>
22 <image src='../../images/huifuzhihuan @3x.png' wx:elif='{{item.state=="3"}}'></image> 22 <image src='../../images/huifuzhihuan @3x.png' wx:elif='{{item.state=="3"}}'></image>
23 - </view> 23 + </view> -->
24 </view> 24 </view>
25 <view class='mid_item_right_bottom'> 25 <view class='mid_item_right_bottom'>
26 发布时间: {{item.create_time}} 26 发布时间: {{item.create_time}}
@@ -113,6 +113,7 @@ @@ -113,6 +113,7 @@
113 </view> 113 </view>
114 </view> 114 </view>
115 </view> 115 </view>
  116 +
116 </view> 117 </view>
117 118
118 119
@@ -161,15 +161,16 @@ page{ @@ -161,15 +161,16 @@ page{
161 justify-content: center; 161 justify-content: center;
162 } 162 }
163 .bottom_question{ 163 .bottom_question{
164 - width:304rpx;  
165 - height:96rpx;  
166 - line-height: 96rpx; 164 + width:420rpx;
  165 + height:70rpx;
  166 + line-height: 70rpx;
167 text-align: center; 167 text-align: center;
168 color: #fff; 168 color: #fff;
169 background:linear-gradient(328deg,rgba(0,128,255,1) 0%,rgba(0,194,255,1) 100%); 169 background:linear-gradient(328deg,rgba(0,128,255,1) 0%,rgba(0,194,255,1) 100%);
170 box-shadow:0px 6px 12px rgba(0,128,255,0.16); 170 box-shadow:0px 6px 12px rgba(0,128,255,0.16);
171 opacity:1; 171 opacity:1;
172 border-radius:8rpx; 172 border-radius:8rpx;
  173 + font-size: 28rpx;
173 } 174 }
174 175
175 /* 企话吧 */ 176 /* 企话吧 */
@@ -399,6 +400,6 @@ page{ @@ -399,6 +400,6 @@ page{
399 width: 100%; 400 width: 100%;
400 background-color: #FFF; 401 background-color: #FFF;
401 } 402 }
402 -.main_container{ 403 +/* .main_container{
403 margin-top: 50px; 404 margin-top: 50px;
404 -}  
  405 +} */
@@ -57,3 +57,14 @@ @@ -57,3 +57,14 @@
57 <text class='iconfont icon-zan icon' style='font-size:40rpx;'></text> 57 <text class='iconfont icon-zan icon' style='font-size:40rpx;'></text>
58 </view> 58 </view>
59 </view> 59 </view>
  60 + <!-- 底部发表按钮 -->
  61 +<view class='bottom_box'>
  62 + <view class='bottom_box_input'>
  63 + <input placeholder='发表评论...' value='{{content}}' focus='{{startComment}}' bindinput='subComments' bindblur='outFocus' cursor-spacing='10' class='comments'/>
  64 + <!-- <view class='sub_box comments' bindtap='comment' hidden='{{startComment}}'>{{content||"发表评论..."}}</view> -->
  65 + </view>
  66 + <view class='bottom_box_text' bindtap='s'>
  67 + 发表
  68 + </view>
  69 +</view>
  70 +
@@ -204,7 +204,6 @@ page { @@ -204,7 +204,6 @@ page {
204 } 204 }
205 205
206 /* */ 206 /* */
207 -  
208 .comment_box { 207 .comment_box {
209 padding: 30rpx; 208 padding: 30rpx;
210 background: #fff; 209 background: #fff;
@@ -7,7 +7,10 @@ Page({ @@ -7,7 +7,10 @@ Page({
7 * 页面的初始数据 7 * 页面的初始数据
8 */ 8 */
9 data: { 9 data: {
10 - open:!1 10 + open:!1,
  11 + page:1,
  12 + noMore:!0,
  13 + tuijianList:[]
11 }, 14 },
12 15
13 /** 16 /**
@@ -36,7 +39,7 @@ Page({ @@ -36,7 +39,7 @@ Page({
36 header: true 39 header: true
37 }; app.post(url,params,false).then((r)=>{ 40 }; app.post(url,params,false).then((r)=>{
38 wx.showToast({ 41 wx.showToast({
39 - title: r.is_like == 1 ? "关注成功" : "已取消", 42 + title: r.is_like == '1' ? "关注成功" : "已取消",
40 icon:'none' 43 icon:'none'
41 }) 44 })
42 this.setData({ 45 this.setData({
@@ -54,12 +57,23 @@ Page({ @@ -54,12 +57,23 @@ Page({
54 }) 57 })
55 }) 58 })
56 }, 59 },
  60 + makePhone(){
  61 + wx.makePhoneCall({
  62 + phoneNumber: this.data.detailInfo.phone,
  63 + success: function(res) {},
  64 + fail: function(res) {},
  65 + complete: function(res) {},
  66 + })
  67 + },
57 // 推荐企业 68 // 推荐企业
58 tuijian(){ 69 tuijian(){
59 - let url ='/api/Company/recommend';  
60 - app.post(url,{header:true}).then((r)=>{ 70 + let url ='/api/Company/recommend',t = this,params={
  71 + page: t.data.page
  72 + };
  73 + app.post(url, params).then((r)=>{
61 this.setData({ 74 this.setData({
62 - tuijianList: r.data 75 + tuijianList: t.data.tuijianList.concat(r.data),
  76 + noMore: r.current_page == r.last_page?!0:!1
63 }) 77 })
64 }) 78 })
65 }, 79 },
@@ -73,7 +87,11 @@ Page({ @@ -73,7 +87,11 @@ Page({
73 * 页面上拉触底事件的处理函数 87 * 页面上拉触底事件的处理函数
74 */ 88 */
75 onReachBottom: function () { 89 onReachBottom: function () {
76 - 90 + !this.data.noMore?(
  91 + this.setData({
  92 + page: this.data.page+1
  93 + }), this.tuijian()
  94 + ):""
77 }, 95 },
78 96
79 /** 97 /**
@@ -7,12 +7,12 @@ @@ -7,12 +7,12 @@
7 <view class='compony_info'> 7 <view class='compony_info'>
8 <view class='compony_title'> 8 <view class='compony_title'>
9 <view class='compony_left'>{{detailInfo.name}}</view> 9 <view class='compony_left'>{{detailInfo.name}}</view>
10 - <view class='focus_button cancle_focus' wx:if='{{detailInfo.is_like==0}}' data-like="{{detailInfo.is_like}}" bindtap='onfocus'>已关注</view> 10 + <view class='focus_button cancle_focus' wx:if='{{detailInfo.is_like==1}}' data-like="{{detailInfo.is_like}}" bindtap='onfocus'>已关注</view>
11 <view class='focus_button' bindtap='onfocus' data-like="{{detailInfo.is_like}}" wx:else><text class='add'>+</text>关注</view> 11 <view class='focus_button' bindtap='onfocus' data-like="{{detailInfo.is_like}}" wx:else><text class='add'>+</text>关注</view>
12 </view> 12 </view>
13 13
14 <view class='detailInfo_items'> 14 <view class='detailInfo_items'>
15 - <view class='detailInfo_item'> 15 + <view class='detailInfo_item' bindtap='makePhone' >
16 <view class='detail_icon'> 16 <view class='detail_icon'>
17 <image src='/images/zuoji.png' mode='aspectFit'></image> 17 <image src='/images/zuoji.png' mode='aspectFit'></image>
18 </view> 18 </view>
@@ -36,13 +36,17 @@ @@ -36,13 +36,17 @@
36 <view class='fanwei'> 36 <view class='fanwei'>
37 {{detailInfo.excerpt}} 37 {{detailInfo.excerpt}}
38 </view> 38 </view>
39 - <view class='company_desc {{open?"openContent":""}}'> 39 + <view class='company_desc openContent'>
40 公司简介:<import src="/wxParse/wxParse.wxml"/><template is="wxParse" data="{{wxParseData:contentHtml.nodes}}"/> 40 公司简介:<import src="/wxParse/wxParse.wxml"/><template is="wxParse" data="{{wxParseData:contentHtml.nodes}}"/>
41 </view> 41 </view>
42 - <view class='open {{!open?"close":""}}' bindtap='openText'> 42 + <!-- <view class='open {{!open?"close":""}}' bindtap='openText'>
43 {{open?"收起":'展开'}} 43 {{open?"收起":'展开'}}
  44 + </view> -->
44 </view> 45 </view>
  46 +
45 </view> 47 </view>
  48 +
  49 +</view>
46 <!-- 企业推荐 --> 50 <!-- 企业推荐 -->
47 <view class='tuijian_content'> 51 <view class='tuijian_content'>
48 52
@@ -50,5 +54,3 @@ @@ -50,5 +54,3 @@
50 企业推荐:{{item.name}} 54 企业推荐:{{item.name}}
51 </navigator> 55 </navigator>
52 </view> 56 </view>
53 - </view>  
54 -</view>  
1 /* pages/matrix/company/company.wxss */ 1 /* pages/matrix/company/company.wxss */
2 page{ 2 page{
3 background-color: #f7f7f7; 3 background-color: #f7f7f7;
  4 + padding-bottom: 30rpx;
4 } 5 }
5 .main_container{ 6 .main_container{
6 width: 688rpx; 7 width: 688rpx;
@@ -82,6 +83,14 @@ page{ @@ -82,6 +83,14 @@ page{
82 -webkit-line-clamp:3; 83 -webkit-line-clamp:3;
83 margin-top: 16rpx; 84 margin-top: 16rpx;
84 transition: 1s; 85 transition: 1s;
  86 + padding-bottom: 30rpx;
  87 +}
  88 +.wxParse-img{
  89 + max-width: 610rpx;
  90 + overflow: hidden;
  91 +}
  92 +.wxParse-img image{
  93 + width: 100%;
85 } 94 }
86 .company_desc.openContent{ 95 .company_desc.openContent{
87 overflow: auto; 96 overflow: auto;
@@ -134,3 +143,8 @@ page{ @@ -134,3 +143,8 @@ page{
134 color: #999; 143 color: #999;
135 border: 2rpx solid #999; 144 border: 2rpx solid #999;
136 } 145 }
  146 +.tuijian_content{
  147 + margin: 30rpx;
  148 + background: #FFF;
  149 + padding: 30rpx;
  150 +}
@@ -151,9 +151,8 @@ Page({ @@ -151,9 +151,8 @@ Page({
151 * 页面相关事件处理函数--监听用户下拉动作 151 * 页面相关事件处理函数--监听用户下拉动作
152 */ 152 */
153 onPullDownRefresh: function() { 153 onPullDownRefresh: function() {
154 - console.log(1)  
155 let t = this;t.setData({ 154 let t = this;t.setData({
156 - page: 1 155 + page: 1,
157 }), t.getCompanyList(t.data.category_id, t.data.park); 156 }), t.getCompanyList(t.data.category_id, t.data.park);
158 }, 157 },
159 158
@@ -20,8 +20,8 @@ @@ -20,8 +20,8 @@
20 <navigator class='item_list' wx:for='{{companyList}}' wx:key='' url="/pages/matrix/company/company?id={{item.id}}" 20 <navigator class='item_list' wx:for='{{companyList}}' wx:key='' url="/pages/matrix/company/company?id={{item.id}}"
21 open-type="navigate" 21 open-type="navigate"
22 hover-class="other-navigator-hover"> 22 hover-class="other-navigator-hover">
23 - <image class='label_img' src='/images/zuire@2x.png'></image>  
24 - <text class='label_info' hidden='{{!item.recommend_switch}}'>热门</text> 23 + <image class='label_img' hidden='{{!item.recommend_switch}}' src='/images/zuire@2x.png'></image>
  24 + <text class='label_info' hidden='{{!item.recommend_switch}}'>推荐</text>
25 <image class='list_img' src='{{item.logo_image}}'></image> 25 <image class='list_img' src='{{item.logo_image}}'></image>
26 <view class='list_left'> 26 <view class='list_left'>
27 <view> 27 <view>
@@ -37,10 +37,12 @@ @@ -37,10 +37,12 @@
37 <navigator class='list_item' wx:for='{{companyList}}' wx:key='' url="/pages/matrix/company/company?id={{item.id}}" 37 <navigator class='list_item' wx:for='{{companyList}}' wx:key='' url="/pages/matrix/company/company?id={{item.id}}"
38 open-type="navigate" 38 open-type="navigate"
39 hover-class="other-navigator-hover"> 39 hover-class="other-navigator-hover">
40 - <image src='{{item.banner_image}}'></image> 40 + <image class='label_img' hidden='{{!item.recommend_switch}}' src='/images/zuire@2x.png'></image>
  41 + <text class='label_info' hidden='{{!item.recommend_switch}}'>推荐</text>
  42 + <image src='{{item.logo_image}}' mode='aspectFill' class='top_logo'></image>
41 <view class='list_content_box'> 43 <view class='list_content_box'>
42 <view class='list_title_box'> 44 <view class='list_title_box'>
43 - <image src='{{item.logo_image}}'></image> 45 + <!-- <image src='{{item.logo_image}}'></image> -->
44 <text>{{item.name}}</text> 46 <text>{{item.name}}</text>
45 </view> 47 </view>
46 <view class='list_content'>{{item.excerpt}}</view> 48 <view class='list_content'>{{item.excerpt}}</view>
@@ -27,7 +27,7 @@ page { @@ -27,7 +27,7 @@ page {
27 color: #999; 27 color: #999;
28 display: inline-block; 28 display: inline-block;
29 position: relative; 29 position: relative;
30 - padding: 0 20rpx; 30 + padding: 0 30rpx;
31 height: 100%; 31 height: 100%;
32 text-align: center; 32 text-align: center;
33 } 33 }
@@ -142,13 +142,14 @@ page { @@ -142,13 +142,14 @@ page {
142 background: #fff; 142 background: #fff;
143 margin-bottom: 20rpx; 143 margin-bottom: 20rpx;
144 box-shadow: 0 10rpx 0 0 #62bae0; 144 box-shadow: 0 10rpx 0 0 #62bae0;
  145 + position: relative;
145 } 146 }
146 147
147 .list_content_box { 148 .list_content_box {
148 padding: 20rpx 16rpx; 149 padding: 20rpx 16rpx;
149 } 150 }
150 151
151 -.list_item image { 152 +.list_item .top_logo {
152 width: 100%; 153 width: 100%;
153 height: 336rpx; 154 height: 336rpx;
154 } 155 }
@@ -162,8 +163,8 @@ page { @@ -162,8 +163,8 @@ page {
162 } 163 }
163 164
164 .list_title_box image { 165 .list_title_box image {
165 - width: 32rpx;  
166 - height: 32rpx; 166 + width: 50rpx;
  167 + height: 50rpx;
167 border-radius: 50%; 168 border-radius: 50%;
168 margin-right: 15rpx; 169 margin-right: 15rpx;
169 } 170 }
@@ -37,10 +37,12 @@ Page({ @@ -37,10 +37,12 @@ Page({
37 }) 37 })
38 }, 38 },
39 delAll(){ 39 delAll(){
  40 + this.data.keyword = '';
40 this.setData({ 41 this.setData({
41 keyword: '', 42 keyword: '',
42 companyList:[] 43 companyList:[]
43 }) 44 })
  45 +
44 }, 46 },
45 // 取消搜索 47 // 取消搜索
46 cancle(){ 48 cancle(){
@@ -70,7 +72,8 @@ Page({ @@ -70,7 +72,8 @@ Page({
70 this.setData({ 72 this.setData({
71 keyword: e.detail.value.replace(/\s+/g, ''), 73 keyword: e.detail.value.replace(/\s+/g, ''),
72 }) 74 })
73 - this.seachFun(); 75 + console.log(1)
  76 + this.data.keyword != '' ? this.seachFun():''
74 }, 77 },
75 78
76 // 选择公司名称同步到页面 79 // 选择公司名称同步到页面
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 <input type="number" placeholder='请输入联系电话' placeholder-class='pl_style' value="{{proData.mobile}}" class="input_item" bindinput='getPhone'></input> 18 <input type="number" placeholder='请输入联系电话' placeholder-class='pl_style' value="{{proData.mobile}}" class="input_item" bindinput='getPhone'></input>
19 </view> 19 </view>
20 </view> 20 </view>
21 - <view class="item_list" style=' align-items: flex-start;'> 21 + <!-- <view class="item_list" style=' align-items: flex-start;'>
22 <view class="list_title">营业执照</view> 22 <view class="list_title">营业执照</view>
23 <view class="list_content img_wrap"> 23 <view class="list_content img_wrap">
24 <view class='add_btn img_box' wx:for="{{proData.images}}" wx:key='index'> 24 <view class='add_btn img_box' wx:for="{{proData.images}}" wx:key='index'>
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 <text>+</text> 29 <text>+</text>
30 </view> 30 </view>
31 </view> 31 </view>
32 - </view> 32 + </view> -->
33 </view> 33 </view>
34 34
35 <view class='bottom_btn' bindtap='subFun'>认证</view> 35 <view class='bottom_btn' bindtap='subFun'>认证</view>
@@ -38,8 +38,8 @@ @@ -38,8 +38,8 @@
38 <view class='search_view' wx:if="{{seach}}"> 38 <view class='search_view' wx:if="{{seach}}">
39 <view class='search-top'> 39 <view class='search-top'>
40 <view class='search_box'> 40 <view class='search_box'>
41 - <input placeholder='请输入公司名称' bindinput='keywordFun' value='{{keyword}}' type='search' class='input_item'></input>  
42 - <image src='../../../images/del.png' bindtap='delAll'></image> 41 + <input placeholder='请输入公司名称' bindinput='keywordFun' value='{{keyword}}' class='input_item'></input>
  42 + <image src='../../../images/del.png' catchtap='delAll'></image>
43 <view class='cancle_action' bindtap='cancle'>取消</view> 43 <view class='cancle_action' bindtap='cancle'>取消</view>
44 </view> 44 </view>
45 </view> 45 </view>
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 } 19 }
20 20
21 .pl_style { 21 .pl_style {
22 - font-size: 32rpx; 22 + font-size: 28rpx;
23 color: #ccc; 23 color: #ccc;
24 } 24 }
25 25
@@ -143,6 +143,7 @@ @@ -143,6 +143,7 @@
143 border-radius: 10rpx; 143 border-radius: 10rpx;
144 padding-left: 20rpx; 144 padding-left: 20rpx;
145 font-size: 28rpx; 145 font-size: 28rpx;
  146 + margin-right: 56rpx;
146 } 147 }
147 .cancle_action{ 148 .cancle_action{
148 width: 100rpx; 149 width: 100rpx;
@@ -156,6 +157,9 @@ @@ -156,6 +157,9 @@
156 height: 42rpx; 157 height: 42rpx;
157 display: block; 158 display: block;
158 } 159 }
  160 +.placeh{
  161 + font-size: 28rpx;
  162 +}
159 163
160 /* 公司名称搜索结果 */ 164 /* 公司名称搜索结果 */
161 .adress_list_container { 165 .adress_list_container {
@@ -8,7 +8,6 @@ Page({ @@ -8,7 +8,6 @@ Page({
8 data: { 8 data: {
9 status:false, 9 status:false,
10 }, 10 },
11 -  
12 /** 11 /**
13 * 生命周期函数--监听页面加载 12 * 生命周期函数--监听页面加载
14 */ 13 */
@@ -17,20 +16,19 @@ Page({ @@ -17,20 +16,19 @@ Page({
17 }, 16 },
18 renzheng(e) { 17 renzheng(e) {
19 let type = e.currentTarget.dataset.type; 18 let type = e.currentTarget.dataset.type;
20 - console.log(type)  
21 type == 1 ? wx.showToast({ 19 type == 1 ? wx.showToast({
22 title: '认证审批中请耐心等待', 20 title: '认证审批中请耐心等待',
23 icon: 'none', 21 icon: 'none',
24 duration: 1200 22 duration: 1200
25 - }) : wx.navigateTo({ 23 + }):type == 0?wx.navigateTo({
26 url: '/pages/my/approve/approve', 24 url: '/pages/my/approve/approve',
27 - }) 25 + }):""
28 }, 26 },
29 checkstatus() { 27 checkstatus() {
30 let b = this, url = '/api/user/getAuthStatus', params = { 28 let b = this, url = '/api/user/getAuthStatus', params = {
31 header: true 29 header: true
32 }; 30 };
33 - t.post(url, params, false).then((r) => { 31 + t.post(url, params).then((r) => {
34 b.setData({ 32 b.setData({
35 auth: r 33 auth: r
36 }); 34 });
@@ -40,11 +38,10 @@ Page({ @@ -40,11 +38,10 @@ Page({
40 getUserInfo(){ 38 getUserInfo(){
41 let d = this, url ='/api/user/index',params={ 39 let d = this, url ='/api/user/index',params={
42 header: true 40 header: true
43 - }; t.post(url,params,false).then((r)=>{ 41 + }; t.post(url,params).then((r)=>{
44 d.setData({ userInfo: r.userInfo, noticeNum: r.noticeNum}) 42 d.setData({ userInfo: r.userInfo, noticeNum: r.noticeNum})
45 }) 43 })
46 }, 44 },
47 -  
48 btn_post() { 45 btn_post() {
49 46
50 wx.navigateTo({ 47 wx.navigateTo({
@@ -74,6 +71,7 @@ Page({ @@ -74,6 +71,7 @@ Page({
74 wx.navigateTo({ 71 wx.navigateTo({
75 url: '/pages/myInform/myInform', 72 url: '/pages/myInform/myInform',
76 }) 73 })
  74 + wx.removeStorageSync('action')
77 }, 75 },
78 /** 76 /**
79 * 生命周期函数--监听页面初次渲染完成 77 * 生命周期函数--监听页面初次渲染完成
@@ -81,7 +79,6 @@ Page({ @@ -81,7 +79,6 @@ Page({
81 onReady: function () { 79 onReady: function () {
82 80
83 }, 81 },
84 -  
85 /** 82 /**
86 * 生命周期函数--监听页面显示 83 * 生命周期函数--监听页面显示
87 */ 84 */
@@ -89,35 +86,30 @@ Page({ @@ -89,35 +86,30 @@ Page({
89 86
90 this.checkstatus(); 87 this.checkstatus();
91 }, 88 },
92 -  
93 /** 89 /**
94 * 生命周期函数--监听页面隐藏 90 * 生命周期函数--监听页面隐藏
95 */ 91 */
96 onHide: function () { 92 onHide: function () {
97 93
98 }, 94 },
99 -  
100 /** 95 /**
101 * 生命周期函数--监听页面卸载 96 * 生命周期函数--监听页面卸载
102 */ 97 */
103 onUnload: function () { 98 onUnload: function () {
104 99
105 }, 100 },
106 -  
107 /** 101 /**
108 * 页面相关事件处理函数--监听用户下拉动作 102 * 页面相关事件处理函数--监听用户下拉动作
109 */ 103 */
110 onPullDownRefresh: function () { 104 onPullDownRefresh: function () {
111 105
112 }, 106 },
113 -  
114 /** 107 /**
115 * 页面上拉触底事件的处理函数 108 * 页面上拉触底事件的处理函数
116 */ 109 */
117 onReachBottom: function () { 110 onReachBottom: function () {
118 111
119 }, 112 },
120 -  
121 /** 113 /**
122 * 用户点击右上角分享 114 * 用户点击右上角分享
123 */ 115 */
1 <!--pages/my/my.wxml--> 1 <!--pages/my/my.wxml-->
2 -<view class='banner_box' > 2 +<view class='banner_box'>
3 <view class='banner_info_box'> 3 <view class='banner_info_box'>
4 <image class='head_img' src='{{userInfo.avatar||"/images/weirenzheng@2x.png"}}'></image> 4 <image class='head_img' src='{{userInfo.avatar||"/images/weirenzheng@2x.png"}}'></image>
5 <view class='banner_right' wx:if="{{userInfo}}"> 5 <view class='banner_right' wx:if="{{userInfo}}">
6 - <view class='banner_info'>  
7 - <text>{{auth=='0'?'企业认证:未认证':auth=='1'?'企业认证中':"认证企业"}}</text> <text hidden='{{auth==0}}'>:{{userInfo.company_name}}</text> 6 + <view class='banner_info' bindtap='renzheng' data-type='{{auth}}'>
  7 + <text>{{auth=='0'?'企业认证:未认证':auth=='1'?'企业认证中':"认证企业"}}</text>
  8 + <text hidden='{{auth==0}}'>:{{userInfo.company_name}}</text>
8 <image hidden='{{auth!=2}}' src='/images/guangfang@2x.png'></image> 9 <image hidden='{{auth!=2}}' src='/images/guangfang@2x.png'></image>
9 </view> 10 </view>
10 <view class='banner_label'> 11 <view class='banner_label'>
@@ -16,15 +17,15 @@ @@ -16,15 +17,15 @@
16 </view> 17 </view>
17 <!-- --> 18 <!-- -->
18 <view class='content_box'> 19 <view class='content_box'>
19 - <view class='item_list' bindtap='TB' bindtap="btn_post" hidden='{{auth!=2}}'> 20 + <!-- <view class='item_list' bindtap='TB' bindtap="btn_post" hidden='{{auth!=2}}'>
20 <view class='list_icon'> 21 <view class='list_icon'>
21 <text class='iconfont icon-wodetiezi'></text> 22 <text class='iconfont icon-wodetiezi'></text>
22 </view> 23 </view>
23 <view class='list_item_box'> 24 <view class='list_item_box'>
24 - <view >我的帖子</view> 25 + <view>我的帖子</view>
25 <view class='iconfont icon-go'></view> 26 <view class='iconfont icon-go'></view>
26 </view> 27 </view>
27 - </view> 28 + </view> -->
28 <view class='item_list' bindtap="btn_attention"> 29 <view class='item_list' bindtap="btn_attention">
29 <view class='list_icon'> 30 <view class='list_icon'>
30 <text class='iconfont icon-xing'></text> 31 <text class='iconfont icon-xing'></text>
@@ -34,7 +35,7 @@ @@ -34,7 +35,7 @@
34 <text class='iconfont icon-go'></text> 35 <text class='iconfont icon-go'></text>
35 </view> 36 </view>
36 </view> 37 </view>
37 - <view class='item_list' bindtap='reportList' bindtap='btn_like' hidden='{{auth!=2}}'> 38 + <!-- <view class='item_list' bindtap='reportList' bindtap='btn_like' hidden='{{auth!=2}}'>
38 <view class='list_icon'> 39 <view class='list_icon'>
39 <text class='iconfont icon-zan21'></text> 40 <text class='iconfont icon-zan21'></text>
40 </view> 41 </view>
@@ -42,8 +43,8 @@ @@ -42,8 +43,8 @@
42 <view>我的点赞</view> 43 <view>我的点赞</view>
43 <view class='iconfont icon-go'></view> 44 <view class='iconfont icon-go'></view>
44 </view> 45 </view>
45 - </view>  
46 - <view class='item_list' bindtap='reportList' bindtap='btn_comment' hidden='{{auth!=2}}'> 46 + </view> -->
  47 + <!-- <view class='item_list' bindtap='reportList' bindtap='btn_comment' hidden='{{auth!=2}}'>
47 <view class='list_icon'> 48 <view class='list_icon'>
48 <text class='iconfont icon-pinglun1'></text> 49 <text class='iconfont icon-pinglun1'></text>
49 </view> 50 </view>
@@ -51,14 +52,14 @@ @@ -51,14 +52,14 @@
51 <view>我的评论</view> 52 <view>我的评论</view>
52 <view class='iconfont icon-go'></view> 53 <view class='iconfont icon-go'></view>
53 </view> 54 </view>
54 - </view> 55 + </view> -->
55 <view class='item_list' bindtap='articlList' bindtap='btn_inform'> 56 <view class='item_list' bindtap='articlList' bindtap='btn_inform'>
56 <view class='list_icon'> 57 <view class='list_icon'>
57 <text class='iconfont icon-tongzhi'></text> 58 <text class='iconfont icon-tongzhi'></text>
58 </view> 59 </view>
59 <view class='list_item_box'> 60 <view class='list_item_box'>
60 <view>发文通知</view> 61 <view>发文通知</view>
61 - <view class='list_icon2' > 62 + <view class='list_icon2'>
62 <view class='list_point' hidden="{{!noticeNum}}">{{noticeNum}}</view> 63 <view class='list_point' hidden="{{!noticeNum}}">{{noticeNum}}</view>
63 <view class='iconfont icon-go'></view> 64 <view class='iconfont icon-go'></view>
64 </view> 65 </view>
@@ -2,20 +2,23 @@ @@ -2,20 +2,23 @@
2 2
3 page { 3 page {
4 background: #f5f5fa; 4 background: #f5f5fa;
5 - overflow-x:hidden; 5 + width: 750rpx;
  6 + height: 100%;
  7 + overflow: hidden;
6 } 8 }
7 9
8 .banner_box { 10 .banner_box {
9 - width: 100%;  
10 height: 113rpx; 11 height: 113rpx;
11 background: #169bd5; 12 background: #169bd5;
12 display: flex; 13 display: flex;
13 align-items: center; 14 align-items: center;
14 - padding: 30rpx; 15 + width: 750rpx;
  16 + box-sizing: border;
  17 +
15 } 18 }
16 19
17 .banner_info_box { 20 .banner_info_box {
18 - width: 92%; 21 + width: 690rpx;
19 height: 240rpx; 22 height: 240rpx;
20 background: rgba(255, 255, 255, 1); 23 background: rgba(255, 255, 255, 1);
21 box-shadow: 0rpx 3rpx 20rpx rgba(0, 34, 255, 0.08); 24 box-shadow: 0rpx 3rpx 20rpx rgba(0, 34, 255, 0.08);
@@ -27,6 +30,7 @@ page { @@ -27,6 +30,7 @@ page {
27 display: flex; 30 display: flex;
28 align-items: center; 31 align-items: center;
29 padding: 30rpx; 32 padding: 30rpx;
  33 + margin: 30rpx;
30 box-sizing: border-box; 34 box-sizing: border-box;
31 } 35 }
32 36
@@ -26,7 +26,7 @@ Page({ @@ -26,7 +26,7 @@ Page({
26 }; 26 };
27 a.post(url, params).then((res) => { 27 a.post(url, params).then((res) => {
28 b.setData({ 28 b.setData({
29 - followList: res.data, 29 + followList: b.data.page > 1 ? b.data.followList.concat(res.data):res.data,
30 ifData: res.data.length>0?true:false, 30 ifData: res.data.length>0?true:false,
31 noMore: res.last_page==res.current_page?!0:!1 31 noMore: res.last_page==res.current_page?!0:!1
32 }) 32 })
@@ -93,8 +93,7 @@ Page({ @@ -93,8 +93,7 @@ Page({
93 */ 93 */
94 onPullDownRefresh: function () { 94 onPullDownRefresh: function () {
95 this.setData({ 95 this.setData({
96 - page: 1,  
97 - followList:[] 96 + page: 1
98 }), 97 }),
99 this.getFollowList() 98 this.getFollowList()
100 }, 99 },
1 <!--pages/my/myAttention/myAttention.wxml--> 1 <!--pages/my/myAttention/myAttention.wxml-->
2 <scroll-view class='box' > 2 <scroll-view class='box' >
3 - <view class='item_list' wx:for='{{followList}}' wx:key="index"> 3 + <navigator class='item_list' wx:for='{{followList}}' wx:key="index" url="/pages/matrix/company/company?id={{item.company_id}}"
  4 + open-type="navigate">
4 <image src='{{item.logo_image}}'></image> 5 <image src='{{item.logo_image}}'></image>
5 <view class='list_right'> 6 <view class='list_right'>
6 <view> 7 <view>
@@ -11,9 +12,9 @@ @@ -11,9 +12,9 @@
11 <text>21:00</text> --> 12 <text>21:00</text> -->
12 </view> 13 </view>
13 </view> 14 </view>
14 - <view class='list_btn'bindtap='cancleFocus' id='{{item.id}}' data-indx="{{index}}">取消关注</view>  
15 - </view> 15 + <view class='list_btn' catchtap='cancleFocus' id='{{item.company_id}}' data-indx="{{index}}">取消关注</view>
16 </view> 16 </view>
  17 + </navigator>
17 </scroll-view> 18 </scroll-view>
18 19
19 <view class="none-box" hidden="{{ifData}}"> 20 <view class="none-box" hidden="{{ifData}}">
@@ -28,7 +28,7 @@ Page({ @@ -28,7 +28,7 @@ Page({
28 }; 28 };
29 a.post(url, params).then((res) => { 29 a.post(url, params).then((res) => {
30 b.setData({ 30 b.setData({
31 - noticeList: b.data.noticeList.concat(res.data) 31 + noticeList: b.data.page>1?b.data.noticeList.concat(res.data):res.data
32 }) 32 })
33 b.data.noticeList.length > 0 ? b.setData({ 33 b.data.noticeList.length > 0 ? b.setData({
34 ifData: !0 34 ifData: !0
@@ -38,18 +38,20 @@ Page({ @@ -38,18 +38,20 @@ Page({
38 noMore: !0, 38 noMore: !0,
39 }) : '' 39 }) : ''
40 wx.stopPullDownRefresh(); 40 wx.stopPullDownRefresh();
41 - setTimeout(()=>{  
42 - let noticeList = b.data.noticeList;  
43 - for(let obj of noticeList){  
44 - obj.read_switch = 1  
45 - }  
46 - b.setData({  
47 - noticeList: noticeList  
48 - })  
49 - },2000)  
50 }) 41 })
51 }, 42 },
  43 + getDetail(e){
  44 + let detail = JSON.stringify(this.data.noticeList[e.currentTarget.id])
  45 + wx.navigateTo({
  46 + url: '/pages/detail/detail?id=' + this.data.noticeList[e.currentTarget.id].id,
  47 + })
  48 + let action = {
  49 + read: 0,
  50 + indx: e.currentTarget.id
  51 + }
  52 + wx.setStorageSync('action',action)
52 53
  54 + },
53 55
54 /** 56 /**
55 * 生命周期函数--监听页面初次渲染完成 57 * 生命周期函数--监听页面初次渲染完成
@@ -62,7 +64,13 @@ Page({ @@ -62,7 +64,13 @@ Page({
62 * 生命周期函数--监听页面显示 64 * 生命周期函数--监听页面显示
63 */ 65 */
64 onShow: function() { 66 onShow: function() {
65 - 67 + let action = wx.getStorageSync('action') ;
  68 + if(action){
  69 + this.data.noticeList[action.indx]['read_switch'] = 1;
  70 + this.setData({
  71 + noticeList: this.data.noticeList
  72 + })
  73 + }
66 }, 74 },
67 75
68 /** 76 /**
@@ -84,8 +92,7 @@ Page({ @@ -84,8 +92,7 @@ Page({
84 */ 92 */
85 onPullDownRefresh: function() { 93 onPullDownRefresh: function() {
86 this.setData({ 94 this.setData({
87 - page: 1,  
88 - noticeList:[] 95 + page: 1
89 }) 96 })
90 this.getInformList(); 97 this.getInformList();
91 }, 98 },
1 <view scroll-y='true' style='height:{{winHeight}}px' hidden='{{!ifData}}' bindscrolltolower='getMore'> 1 <view scroll-y='true' style='height:{{winHeight}}px' hidden='{{!ifData}}' bindscrolltolower='getMore'>
2 <view class='mid'> 2 <view class='mid'>
3 - <view class='mid_item' wx:for="{{noticeList}}" wx:key="index"> 3 + <view class='mid_item' bindtap='getDetail' id='{{index}}' wx:for="{{noticeList}}" wx:key="index">
4 <view class='mid_item_top'> 4 <view class='mid_item_top'>
5 <view class='mid_item_top_left'> 5 <view class='mid_item_top_left'>
6 <!-- 图片 --> 6 <!-- 图片 -->
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 </view> 21 </view>
22 </view> 22 </view>
23 <view class='mid_item_top_right '> 23 <view class='mid_item_top_right '>
24 - 15分钟前 24 + {{item.create_time_text}}
25 </view> 25 </view>
26 </view> 26 </view>
27 <!-- 大标题 --> 27 <!-- 大标题 -->
@@ -199,14 +199,15 @@ page{ @@ -199,14 +199,15 @@ page{
199 opacity:1; 199 opacity:1;
200 } 200 }
201 .mid_item_text{ 201 .mid_item_text{
202 - 202 + overflow: hidden;
  203 + text-overflow: ellipsis;
203 font-size:26rpx; 204 font-size:26rpx;
204 font-family:PingFang SC; 205 font-family:PingFang SC;
205 font-weight:400; 206 font-weight:400;
206 - /* line-height:36rpx; */  
207 color:rgba(51,51,51,1); 207 color:rgba(51,51,51,1);
208 opacity:1; 208 opacity:1;
209 margin-top: 16rpx; 209 margin-top: 16rpx;
  210 + white-space:nowrap;
210 } 211 }
211 .mid_item_like{ 212 .mid_item_like{
212 margin-top: 34rpx; 213 margin-top: 34rpx;
@@ -32,7 +32,7 @@ Page({ @@ -32,7 +32,7 @@ Page({
32 for(let b of r.data){ 32 for(let b of r.data){
33 b.images = b.images.split(','); 33 b.images = b.images.split(',');
34 } 34 }
35 - let dataList = b.data.articleList.concat(r.data); 35 + let dataList = b.data.page>1?b.data.articleList.concat(r.data):r.data;
36 b.setData({ 36 b.setData({
37 articleList: dataList, 37 articleList: dataList,
38 ifData:!0, 38 ifData:!0,
@@ -133,8 +133,8 @@ page { @@ -133,8 +133,8 @@ page {
133 } 133 }
134 134
135 .bottom_btn { 135 .bottom_btn {
136 - width: 100%;  
137 - height: 96rpx; 136 + width: 80%;
  137 + height: 70rpx;
138 background: #000; 138 background: #000;
139 background: linear-gradient(336deg, rgba(0, 128, 255, 1) 0%, rgba(0, 194, 255, 1) 100%); 139 background: linear-gradient(336deg, rgba(0, 128, 255, 1) 0%, rgba(0, 194, 255, 1) 100%);
140 border-radius: 8rpx; 140 border-radius: 8rpx;
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 "ignore": [] 4 "ignore": []
5 }, 5 },
6 "setting": { 6 "setting": {
7 - "urlCheck": false, 7 + "urlCheck": true,
8 "es6": true, 8 "es6": true,
9 "postcss": true, 9 "postcss": true,
10 "minified": true, 10 "minified": true,
@@ -19,6 +19,8 @@ @@ -19,6 +19,8 @@
19 "hidedInDevtools": [] 19 "hidedInDevtools": []
20 }, 20 },
21 "isGameTourist": false, 21 "isGameTourist": false,
  22 + "simulatorType": "wechat",
  23 + "simulatorPluginLibVersion": {},
22 "condition": { 24 "condition": {
23 "search": { 25 "search": {
24 "current": -1, 26 "current": -1,
@@ -37,7 +39,7 @@ @@ -37,7 +39,7 @@
37 "list": [] 39 "list": []
38 }, 40 },
39 "miniprogram": { 41 "miniprogram": {
40 - "current": 44, 42 + "current": 50,
41 "list": [ 43 "list": [
42 { 44 {
43 "id": 0, 45 "id": 0,
@@ -351,6 +353,49 @@ @@ -351,6 +353,49 @@
351 "id": -1, 353 "id": -1,
352 "name": "点赞", 354 "name": "点赞",
353 "pathName": "pages/myLike/myLike", 355 "pathName": "pages/myLike/myLike",
  356 + "query": "",
  357 + "scene": null
  358 + },
  359 + {
  360 + "id": -1,
  361 + "name": "tongzhi",
  362 + "pathName": "pages/myInform/myInform",
  363 + "query": "",
  364 + "scene": null
  365 + },
  366 + {
  367 + "id": -1,
  368 + "name": "tongzhi",
  369 + "pathName": "pages/detail/detail",
  370 + "query": "detail={\"id\":36,\"user_id\":12,\"notice_id\":14,\"create_time\":1554104027,\"read_switch\":1,\"read_time\":1554110197,\"title\":\"推送全部\",\"content\":\"推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部推送全部\",\"switch\":\"1\",\"create_time_text\":\"2019-04-01 15:33:47\"}",
  371 + "scene": null
  372 + },
  373 + {
  374 + "id": 47,
  375 + "name": "写评论",
  376 + "pathName": "pages/matrix/article/article",
  377 + "query": "",
  378 + "scene": null
  379 + },
  380 + {
  381 + "id": 48,
  382 + "name": "写评论",
  383 + "pathName": "pages/attract/articleDetail/articleDetail",
  384 + "query": "id=2",
  385 + "scene": null
  386 + },
  387 + {
  388 + "id": -1,
  389 + "name": "写评论",
  390 + "pathName": "pages/my/approve/approve",
  391 + "query": "id=2",
  392 + "scene": null
  393 + },
  394 + {
  395 + "id": -1,
  396 + "name": "写评论",
  397 + "pathName": "pages/attract/detail/detail",
  398 + "query": "id=2",
354 "scene": null 399 "scene": null
355 } 400 }
356 ] 401 ]
  1 +{
  2 + "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
  3 + "rules": [{
  4 + "action": "allow",
  5 + "page": "*"
  6 + }]
  7 +}