正在显示
23 个修改的文件
包含
516 行增加
和
359 行删除
@@ -84,9 +84,9 @@ Page({ | @@ -84,9 +84,9 @@ Page({ | ||
84 | }):'' | 84 | }):'' |
85 | }) | 85 | }) |
86 | }, | 86 | }, |
87 | - bannerDetail(e){ | 87 | + bannerDetail(){ |
88 | wx.navigateTo({ | 88 | wx.navigateTo({ |
89 | - url: '/pages/attract/detail/detail?id='+e.currentTarget.id, | 89 | + url: '/pages/attract/list/list', |
90 | }) | 90 | }) |
91 | }, | 91 | }, |
92 | 92 |
@@ -24,6 +24,9 @@ Page({ | @@ -24,6 +24,9 @@ Page({ | ||
24 | }; | 24 | }; |
25 | t.post(url, p).then((r)=>{ | 25 | t.post(url, p).then((r)=>{ |
26 | d.setData({detail:r}) | 26 | d.setData({detail:r}) |
27 | + wx.setNavigationBarTitle({ | ||
28 | + title: r.name, | ||
29 | + }) | ||
27 | WxParse.wxParse('contentHtml', 'html', r.content, d, 5); | 30 | WxParse.wxParse('contentHtml', 'html', r.content, d, 5); |
28 | }) | 31 | }) |
29 | }, | 32 | }, |
1 | <view class='main_container'> | 1 | <view class='main_container'> |
2 | - <!-- <view class='video_box'> | ||
3 | - <video class='vid'></video> | ||
4 | - <view class='video_icon'> | ||
5 | - <image src='/images/shipin@3x.png' mode='widthFix'></image> | ||
6 | - </view> | ||
7 | - </view> --> | ||
8 | - <video class='video_box' src='{{detail.video}}'> | ||
9 | - <cover-view class='video_title'>{{detail.name}}</cover-view> | ||
10 | - </video> | ||
11 | <!-- 招商优势 --> | 2 | <!-- 招商优势 --> |
12 | <view class='single_item_container'> | 3 | <view class='single_item_container'> |
13 | <view class='top_label'> | 4 | <view class='top_label'> |
@@ -27,20 +18,20 @@ | @@ -27,20 +18,20 @@ | ||
27 | </view> | 18 | </view> |
28 | <view class='zixun_container'> | 19 | <view class='zixun_container'> |
29 | <view class='zixun_item'> | 20 | <view class='zixun_item'> |
30 | - <view class='zixun_icon'> | 21 | + <view class='zixun_icon phone'> |
31 | <image src='/images/zuoji@3x.png' mode='aspectFit'></image> | 22 | <image src='/images/zuoji@3x.png' mode='aspectFit'></image> |
32 | </view> | 23 | </view> |
33 | <view class='zixun_content'>{{detail.phone}}</view> | 24 | <view class='zixun_content'>{{detail.phone}}</view> |
34 | </view> | 25 | </view> |
35 | <view class='zixun_item'> | 26 | <view class='zixun_item'> |
36 | - <view class='zixun_icon'> | 27 | + <view class='zixun_icon email'> |
37 | <image src='/images/mail@3x.png' mode='aspectFit'></image> | 28 | <image src='/images/mail@3x.png' mode='aspectFit'></image> |
38 | </view> | 29 | </view> |
39 | <view class='zixun_content'>{{detail.email}}</view> | 30 | <view class='zixun_content'>{{detail.email}}</view> |
40 | </view> | 31 | </view> |
41 | <view class='zixun_item'> | 32 | <view class='zixun_item'> |
42 | - <view class='zixun_icon'> | ||
43 | - <image src='/images/zuoji@3x.png' mode='aspectFit'></image> | 33 | + <view class='zixun_icon '> |
34 | + <image src='/images/erweima@3x.png' mode='aspectFit'></image> | ||
44 | </view> | 35 | </view> |
45 | <view class='zixun_content'> | 36 | <view class='zixun_content'> |
46 | <view class='erwei_code'> | 37 | <view class='erwei_code'> |
1 | -/* pages/attract/detail/detail.wxss */ | ||
2 | -.video_box { | ||
3 | - width: 682rpx; | ||
4 | - height: 430rpx; | ||
5 | - margin: 0 auto; | ||
6 | - background-color: rgba(0,0,0,.6); | ||
7 | - position: relative; | ||
8 | - left: 35rpx; | ||
9 | -} | ||
10 | -.video_icon{ | ||
11 | - width: 96rpx; | ||
12 | - height: 96rpx; | ||
13 | - position: absolute; | ||
14 | - top: 50%; | ||
15 | - left: 50%; | ||
16 | - transform: translate(-50%,-50%); | ||
17 | -} | ||
18 | -.video_icon image{ | ||
19 | - width: 100%; | ||
20 | -} | ||
21 | -.video_title{ | ||
22 | - margin:0 32rpx; | ||
23 | - display: -webkit-box; | ||
24 | - word-break: break-all; | ||
25 | - text-overflow: ellipsis; | ||
26 | - overflow: hidden; | ||
27 | - -webkit-box-orient: vertical; | ||
28 | - -webkit-line-clamp:1; | ||
29 | - color: #FFF; | ||
30 | - font-size: 30rpx; | ||
31 | - margin-top: 30rpx; | ||
32 | -} | 1 | + |
33 | .single_item_container{ | 2 | .single_item_container{ |
34 | margin-top: 30rpx; | 3 | margin-top: 30rpx; |
35 | border-bottom: 2rpx solid #f5f5f5; | 4 | border-bottom: 2rpx solid #f5f5f5; |
@@ -67,11 +36,20 @@ | @@ -67,11 +36,20 @@ | ||
67 | justify-content: flex-start; | 36 | justify-content: flex-start; |
68 | margin: 30rpx 0; | 37 | margin: 30rpx 0; |
69 | } | 38 | } |
39 | + | ||
70 | .zixun_icon{ | 40 | .zixun_icon{ |
71 | - height: 28rpx; | ||
72 | - width: 32rpx; | 41 | + height: 46rpx; |
42 | + width: 60rpx; | ||
73 | align-self: flex-start; | 43 | align-self: flex-start; |
74 | } | 44 | } |
45 | +.email{ | ||
46 | + width: 46rpx; | ||
47 | + height: 30rpx; | ||
48 | +} | ||
49 | +.phone{ | ||
50 | + width: 42rpx; | ||
51 | + height: 42rpx; | ||
52 | +} | ||
75 | .zixun_icon image { | 53 | .zixun_icon image { |
76 | width: 100%; | 54 | width: 100%; |
77 | height: 100%; | 55 | height: 100%; |
@@ -81,7 +59,7 @@ | @@ -81,7 +59,7 @@ | ||
81 | font-size: 28rpx; | 59 | font-size: 28rpx; |
82 | line-height: 1; | 60 | line-height: 1; |
83 | color: #333; | 61 | color: #333; |
84 | - margin-left: 10rpx; | 62 | + margin-left: 20rpx; |
85 | } | 63 | } |
86 | 64 | ||
87 | .erwei_code { | 65 | .erwei_code { |
@@ -89,8 +67,8 @@ | @@ -89,8 +67,8 @@ | ||
89 | margin-bottom: 20rpx; | 67 | margin-bottom: 20rpx; |
90 | } | 68 | } |
91 | .img_box{ | 69 | .img_box{ |
92 | - width: 88rpx; | ||
93 | - height: 88rpx; | 70 | + width: 140rpx; |
71 | + height: 140rpx; | ||
94 | margin-right: 20rpx; | 72 | margin-right: 20rpx; |
95 | } | 73 | } |
96 | .img_box image{ | 74 | .img_box image{ |
pages/attract/list/list.js
0 → 100644
1 | +// pages/attract/detail/detail.js | ||
2 | +const t = getApp(); | ||
3 | +var WxParse = require('../../../wxParse/wxParse.js'); | ||
4 | +Page({ | ||
5 | + | ||
6 | + /** | ||
7 | + * 页面的初始数据 | ||
8 | + */ | ||
9 | + data: { | ||
10 | + | ||
11 | + }, | ||
12 | + | ||
13 | + /** | ||
14 | + * 生命周期函数--监听页面加载 | ||
15 | + */ | ||
16 | + onLoad: function (options) { | ||
17 | + let a = this; | ||
18 | + a.d(), a.l(); | ||
19 | + }, | ||
20 | + d() { | ||
21 | + let d = this, url = '/api/Article/getAttractInvestmentVideo', p = {}; | ||
22 | + t.post(url, p).then((r) => { | ||
23 | + d.setData({ detail: r }) | ||
24 | + }) | ||
25 | + }, | ||
26 | + l(){ | ||
27 | + let d = this, url = '/api/Article/getAttractInvestmentList', p = {}; | ||
28 | + t.post(url, p).then((r) => { | ||
29 | + d.setData({ list: r }) | ||
30 | + }) | ||
31 | + }, | ||
32 | + detail(e){ | ||
33 | + wx.navigateTo({ | ||
34 | + url: '/pages/attract/detail/detail?id='+e.currentTarget.id, | ||
35 | + }) | ||
36 | + }, | ||
37 | + | ||
38 | + /** | ||
39 | + * 生命周期函数--监听页面初次渲染完成 | ||
40 | + */ | ||
41 | + onReady: function () { | ||
42 | + | ||
43 | + }, | ||
44 | + | ||
45 | + /** | ||
46 | + * 生命周期函数--监听页面显示 | ||
47 | + */ | ||
48 | + onShow: function () { | ||
49 | + | ||
50 | + }, | ||
51 | + | ||
52 | + /** | ||
53 | + * 生命周期函数--监听页面隐藏 | ||
54 | + */ | ||
55 | + onHide: function () { | ||
56 | + | ||
57 | + }, | ||
58 | + | ||
59 | + /** | ||
60 | + * 生命周期函数--监听页面卸载 | ||
61 | + */ | ||
62 | + onUnload: function () { | ||
63 | + | ||
64 | + }, | ||
65 | + | ||
66 | + /** | ||
67 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
68 | + */ | ||
69 | + onPullDownRefresh: function () { | ||
70 | + | ||
71 | + }, | ||
72 | + | ||
73 | + /** | ||
74 | + * 页面上拉触底事件的处理函数 | ||
75 | + */ | ||
76 | + onReachBottom: function () { | ||
77 | + | ||
78 | + }, | ||
79 | + | ||
80 | + /** | ||
81 | + * 用户点击右上角分享 | ||
82 | + */ | ||
83 | + onShareAppMessage: function () { | ||
84 | + | ||
85 | + } | ||
86 | +}) |
pages/attract/list/list.json
0 → 100644
pages/attract/list/list.wxml
0 → 100644
1 | +<view class='main_container'> | ||
2 | + <video class='video_box' controls='true' object-fit='cover' poster='{{detail.thumbnail}}' src='{{detail.video}}'> | ||
3 | + </video> | ||
4 | + | ||
5 | + <view class='zhaoshangLists'> | ||
6 | + <view class='zhaoshang_item' wx:for='{{list}}' wx:key='' id='{{item.id}}' bindtap='detail'> | ||
7 | + <image src='{{detail.thumbnail}}' mode='widthFix'></image> | ||
8 | + <text>{{item.name}}</text> | ||
9 | + </view> | ||
10 | + | ||
11 | + | ||
12 | + </view> | ||
13 | +</view> |
pages/attract/list/list.wxss
0 → 100644
1 | +/* pages/attract/detail/detail.wxss */ | ||
2 | +.video_box { | ||
3 | + width: 100%; | ||
4 | + height: 430rpx; | ||
5 | + margin: 0 auto; | ||
6 | + background-color: rgba(0,0,0,.6); | ||
7 | + position: relative; | ||
8 | +} | ||
9 | +.video_icon{ | ||
10 | + width: 96rpx; | ||
11 | + height: 96rpx; | ||
12 | + position: absolute; | ||
13 | + top: 50%; | ||
14 | + left: 50%; | ||
15 | + transform: translate(-50%,-50%); | ||
16 | +} | ||
17 | +.video_icon image{ | ||
18 | + width: 100%; | ||
19 | +} | ||
20 | +.video_title{ | ||
21 | + margin:0 32rpx; | ||
22 | + display: -webkit-box; | ||
23 | + word-break: break-all; | ||
24 | + text-overflow: ellipsis; | ||
25 | + overflow: hidden; | ||
26 | + -webkit-box-orient: vertical; | ||
27 | + -webkit-line-clamp:1; | ||
28 | + color: #FFF; | ||
29 | + font-size: 30rpx; | ||
30 | + margin-top: 30rpx; | ||
31 | +} | ||
32 | +.zhaoshangLists{ | ||
33 | + margin: 20rpx; | ||
34 | +} | ||
35 | +.zhaoshang_item{ | ||
36 | + height: 280rpx; | ||
37 | + border-radius: 10rpx; | ||
38 | + margin-bottom: 30rpx; | ||
39 | + overflow: hidden; | ||
40 | + position: relative; | ||
41 | +} | ||
42 | +.zhaoshang_item image{ | ||
43 | + width: 100%; | ||
44 | +} | ||
45 | +.zhaoshang_item text{ | ||
46 | + position: absolute; | ||
47 | + right: 40rpx; | ||
48 | + bottom: 40rpx; | ||
49 | + color: #FFF; | ||
50 | + font-size: 30rpx; | ||
51 | + font-weight: bold; | ||
52 | +} |
@@ -13,48 +13,66 @@ Page({ | @@ -13,48 +13,66 @@ Page({ | ||
13 | } | 13 | } |
14 | ], | 14 | ], |
15 | zixunList: [], | 15 | zixunList: [], |
16 | - currentTab: 0, | ||
17 | - page: 1 , | 16 | + postList:[], |
17 | + currentTab: 1, | ||
18 | + page: 1, | ||
18 | ifData: !1, | 19 | ifData: !1, |
19 | noMore: !1, | 20 | noMore: !1, |
20 | - show:!0 | 21 | + show: !0 |
21 | }, | 22 | }, |
22 | - | ||
23 | /** | 23 | /** |
24 | * 生命周期函数--监听页面加载 | 24 | * 生命周期函数--监听页面加载 |
25 | */ | 25 | */ |
26 | onLoad: function (options) { | 26 | onLoad: function (options) { |
27 | - let c = this;wx.getSystemInfo({ | ||
28 | - success: function(res) { | 27 | + let c = this; wx.getSystemInfo({ |
28 | + success: function (res) { | ||
29 | c.setData({ | 29 | c.setData({ |
30 | - winHeight:res.windowHeight | 30 | + winHeight: res.windowHeight |
31 | }) | 31 | }) |
32 | }, | 32 | }, |
33 | - }) | 33 | + }), this.postList(); |
34 | }, | 34 | }, |
35 | - getzixun(){ | ||
36 | - let url = '/api/interact/getQuestionList',d = this,params = { | ||
37 | - header:true, | ||
38 | - page: d.data.page | 35 | + getzixun() { |
36 | + let url = '/api/interact/getQuestionList', d = this, params = { | ||
37 | + header: true, | ||
38 | + page: d.data.page | ||
39 | }; | 39 | }; |
40 | - t.post(url,params,false).then((r)=>{ | 40 | + t.post(url, params, false).then((r) => { |
41 | let list = d.data.zixunList.concat(r.data); | 41 | let list = d.data.zixunList.concat(r.data); |
42 | d.setData({ | 42 | d.setData({ |
43 | zixunList: list | 43 | zixunList: list |
44 | }) | 44 | }) |
45 | - list.length==0?d.setData({ | ||
46 | - ifData:!0, | ||
47 | - }):(r.data.length<r.per_page?d.setData({ | ||
48 | - noMore:!0 | ||
49 | - }):"") | ||
50 | - setTimeout(()=>{ | 45 | + list.length == 0 ? d.setData({ |
46 | + ifData: !0, | ||
47 | + }) : (r.data.length < r.per_page ? d.setData({ | ||
48 | + noMore: !0 | ||
49 | + }) : "") | ||
50 | + setTimeout(() => { | ||
51 | d.setData({ | 51 | d.setData({ |
52 | show: !1 | 52 | show: !1 |
53 | - },1200) | 53 | + }, 1200) |
54 | }) | 54 | }) |
55 | }) | 55 | }) |
56 | }, | 56 | }, |
57 | - askQuestion(){ | 57 | + postList() { |
58 | + let url = '/api/interact/getPostsList', d = this, params = { | ||
59 | + page: d.data.page | ||
60 | + }; | ||
61 | + t.post(url, params, false).then((r) => { | ||
62 | + let list = d.data.postList.concat(r.data); | ||
63 | + d.setData({ | ||
64 | + postList: list | ||
65 | + }) | ||
66 | + list.length == 0 ? d.setData({ | ||
67 | + ifData: !0, | ||
68 | + }) : (r.data.length < r.per_page ? d.setData({ | ||
69 | + noMore: !0 | ||
70 | + }) : "") | ||
71 | + | ||
72 | + }) | ||
73 | + }, | ||
74 | + | ||
75 | + askQuestion() { | ||
58 | wx.navigateTo({ | 76 | wx.navigateTo({ |
59 | url: '/pages/question/question', | 77 | url: '/pages/question/question', |
60 | }) | 78 | }) |
@@ -64,29 +82,29 @@ Page({ | @@ -64,29 +82,29 @@ Page({ | ||
64 | header: true | 82 | header: true |
65 | }; | 83 | }; |
66 | t.post(url, params).then((r) => { | 84 | t.post(url, params).then((r) => { |
67 | - b.setData({ | ||
68 | - auth:r | ||
69 | - }); | ||
70 | - r == 2 ? b.getzixun():''; | 85 | + b.setData({ |
86 | + auth: r | ||
87 | + }); | ||
88 | + r == 2 ? b.getzixun() : ''; | ||
71 | }) | 89 | }) |
72 | }, | 90 | }, |
73 | - renzheng(e){ | 91 | + renzheng(e) { |
74 | let type = e.currentTarget.dataset.type; | 92 | let type = e.currentTarget.dataset.type; |
75 | - type==1?wx.showToast({ | 93 | + type == 1 ? wx.showToast({ |
76 | title: '认证审批中请耐心等待', | 94 | title: '认证审批中请耐心等待', |
77 | - icon:'none', | 95 | + icon: 'none', |
78 | duration: 1200 | 96 | duration: 1200 |
79 | - }):wx.navigateTo({ | ||
80 | - url: '/pages/my/approve/approve', | 97 | + }) : wx.navigateTo({ |
98 | + url: '/pages/my/approve/approve', | ||
81 | }) | 99 | }) |
82 | }, | 100 | }, |
83 | navbarTap: function (e) { | 101 | navbarTap: function (e) { |
84 | - let that = this; | 102 | + let t = this, idx = e.currentTarget.dataset.idx; |
85 | this.setData({ | 103 | this.setData({ |
86 | - currentTab: e.currentTarget.dataset.idx, | ||
87 | - }) | 104 | + currentTab: idx, |
105 | + }), idx ? t.postList() : t.getzixun(); | ||
88 | }, | 106 | }, |
89 | - jump(){ | 107 | + jump() { |
90 | wx.navigateTo({ | 108 | wx.navigateTo({ |
91 | url: '', | 109 | url: '', |
92 | }) | 110 | }) |
@@ -95,12 +113,12 @@ Page({ | @@ -95,12 +113,12 @@ Page({ | ||
95 | url: '', | 113 | url: '', |
96 | }) | 114 | }) |
97 | }, | 115 | }, |
98 | - | 116 | + |
99 | /** | 117 | /** |
100 | * 生命周期函数--监听页面初次渲染完成 | 118 | * 生命周期函数--监听页面初次渲染完成 |
101 | */ | 119 | */ |
102 | onReady: function () { | 120 | onReady: function () { |
103 | - | 121 | + |
104 | }, | 122 | }, |
105 | 123 | ||
106 | /** | 124 | /** |
@@ -108,7 +126,7 @@ Page({ | @@ -108,7 +126,7 @@ Page({ | ||
108 | */ | 126 | */ |
109 | onShow: function () { | 127 | onShow: function () { |
110 | this.setData({ | 128 | this.setData({ |
111 | - zixunList:[] | 129 | + zixunList: [] |
112 | }) | 130 | }) |
113 | this.checkstatus() | 131 | this.checkstatus() |
114 | }, | 132 | }, |
@@ -117,34 +135,34 @@ Page({ | @@ -117,34 +135,34 @@ Page({ | ||
117 | * 生命周期函数--监听页面隐藏 | 135 | * 生命周期函数--监听页面隐藏 |
118 | */ | 136 | */ |
119 | onHide: function () { | 137 | onHide: function () { |
120 | - | 138 | + |
121 | }, | 139 | }, |
122 | 140 | ||
123 | /** | 141 | /** |
124 | * 生命周期函数--监听页面卸载 | 142 | * 生命周期函数--监听页面卸载 |
125 | */ | 143 | */ |
126 | onUnload: function () { | 144 | onUnload: function () { |
127 | - | 145 | + |
128 | }, | 146 | }, |
129 | 147 | ||
130 | /** | 148 | /** |
131 | * 页面相关事件处理函数--监听用户下拉动作 | 149 | * 页面相关事件处理函数--监听用户下拉动作 |
132 | */ | 150 | */ |
133 | onPullDownRefresh: function () { | 151 | onPullDownRefresh: function () { |
134 | - | 152 | + |
135 | }, | 153 | }, |
136 | 154 | ||
137 | /** | 155 | /** |
138 | * 页面上拉触底事件的处理函数 | 156 | * 页面上拉触底事件的处理函数 |
139 | */ | 157 | */ |
140 | onReachBottom: function () { | 158 | onReachBottom: function () { |
141 | - | 159 | + |
142 | }, | 160 | }, |
143 | 161 | ||
144 | /** | 162 | /** |
145 | * 用户点击右上角分享 | 163 | * 用户点击右上角分享 |
146 | */ | 164 | */ |
147 | onShareAppMessage: function () { | 165 | onShareAppMessage: function () { |
148 | - | 166 | + |
149 | } | 167 | } |
150 | }) | 168 | }) |
1 | -<scroll-view wx:if='{{auth=="2"}}' style='height:{{winHeight}}px' scroll-y="true"> | 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> | ||
3 | +</view> | ||
4 | + <scroll-view wx:if='{{auth=="2"}}' style='height:{{winHeight}}px' scroll-y="true"> | ||
2 | 5 | ||
3 | - <view class="none-box" hidden="{{!ifData}}"> | ||
4 | - <view>暂无相关咨询</view> | 6 | + <view class="none-box" hidden="{{!ifData}}"> |
7 | + <view>暂无相关咨询</view> | ||
5 | </view> | 8 | </view> |
6 | - <view class='box_left' wx:if="{{currentTab==0}}" > | ||
7 | - <view class='mid' bindtap="jump" hidden='{{ifData}}'> | ||
8 | - <view class='mid_item' wx:for='{{zixunList}}' wx:key=''> | ||
9 | - <view class='mid_item_left'> | ||
10 | - <image src='../../images/tishi@3x.png'></image> | ||
11 | - </view> | ||
12 | - <view class='mid_item_right'> | ||
13 | - <view class='mid_item_right_top'> | ||
14 | - {{item.question}}? | ||
15 | - <view class='mid_label' hidden='{{item.show}}'> | ||
16 | - <image src='../../images/huifujishi@3x.png' wx:if="{{item.state==1}}"></image> | ||
17 | - <image src='../../images/huifuyiban@3x.png' wx:elif='{{item.state==2}}'></image> | ||
18 | - <image src='../../images/huifuzhihuan @3x.png' wx:elif='{{item.state==3}}'></image> | ||
19 | - </view> | ||
20 | - </view> | ||
21 | - <view class='mid_item_right_bottom'> | ||
22 | - 发布时间: {{item.create_time_text}} | ||
23 | - </view> | ||
24 | - <!-- 回复 --> | ||
25 | - <view class='response_box' hidden='{{item.state==0}}'> | ||
26 | - <!-- 回复内容 --> | ||
27 | - <view class='mid_item_right_response'> | ||
28 | - <text class='color_blue'>回复:</text> {{item.reply}} | 9 | + <view class='box_left' wx:if="{{currentTab==0}}"> |
10 | + <view class='mid' bindtap="jump" hidden='{{ifData}}'> | ||
11 | + <view class='mid_item' wx:for='{{zixunList}}' wx:key=''> | ||
12 | + <view class='mid_item_left'> | ||
13 | + <image src='../../images/tishi@3x.png'></image> | ||
14 | + </view> | ||
15 | + <view class='mid_item_right'> | ||
16 | + <view class='mid_item_right_top'> | ||
17 | + {{item.question}}? | ||
18 | + <view class='mid_label' hidden='{{item.is_show_state}}'> | ||
19 | + <image src='../../images/huifujishi@3x.png' wx:if="{{item.state==1}}"></image> | ||
20 | + <image src='../../images/huifuyiban@3x.png' wx:elif='{{item.state==2}}'></image> | ||
21 | + <image src='../../images/huifuzhihuan @3x.png' wx:elif='{{item.state==3}}'></image> | ||
22 | + </view> | ||
29 | </view> | 23 | </view> |
30 | - <!-- 回复时间 --> | ||
31 | <view class='mid_item_right_bottom'> | 24 | <view class='mid_item_right_bottom'> |
32 | - 回复时间:{{item.reply_time_text}} | 25 | + 发布时间: {{item.create_time_text}} |
33 | </view> | 26 | </view> |
34 | - </view> | ||
35 | - <view class='waiting_response' hidden='{{item.state!=0}}'> | ||
36 | - 等待回复中..... | ||
37 | - </view> | ||
38 | - </view> | ||
39 | - </view> | ||
40 | - </view> | ||
41 | - | ||
42 | - <!-- 提问 --> | ||
43 | - <view class='bottom' hidden='{{show}}'> | ||
44 | - <view class='bottom_question' bindtap='askQuestion'> | ||
45 | - 提问 | ||
46 | - </view> | ||
47 | - </view> | ||
48 | - </view> | ||
49 | - <!-- 企话吧 --> | ||
50 | - <view class='box_right' wx:if="{{currentTab==1}}"> | ||
51 | - <view class='mid'> | ||
52 | - <!-- 标题 --> | ||
53 | - <view class='mid_title'> | ||
54 | - 有一条新评论 > | ||
55 | - </view> | ||
56 | - <!-- 条目 --> | ||
57 | - <view class='mid_item'> | ||
58 | - <view class='mid_item_top'> | ||
59 | - <view class='mid_item_top_left'> | ||
60 | - <!-- 图片 --> | ||
61 | - <view class='mid_item_top_left_pic'> | ||
62 | - <image src='../../images/03_nav@2x.png'></image> | 27 | + <!-- 回复 --> |
28 | + <view class='response_box' hidden='{{item.state==0}}'> | ||
29 | + <!-- 回复内容 --> | ||
30 | + <view class='mid_item_right_response'> | ||
31 | + <text class='color_blue'>回复:</text> {{item.reply}} | ||
32 | + </view> | ||
33 | + <!-- 回复时间 --> | ||
34 | + <view class='mid_item_right_bottom'> | ||
35 | + 回复时间:{{item.reply_time_text}} | ||
36 | + </view> | ||
63 | </view> | 37 | </view> |
64 | - <!-- 文字 --> | ||
65 | - <view class='mid_item_top_left_text'> | ||
66 | - 金沃斯英语在线教育 | 38 | + <view class='waiting_response' hidden='{{item.state!=0}}'> |
39 | + 等待回复中..... | ||
67 | </view> | 40 | </view> |
68 | </view> | 41 | </view> |
69 | - <view class='mid_item_top_right'> | ||
70 | - 15分钟前 | ||
71 | - </view> | ||
72 | - </view> | ||
73 | - <!-- 文字内容 --> | ||
74 | - <view class='mid_item_text'> | ||
75 | - 新个人所得税法近日备受关注。关于个人所得税,想必大家都十分关心,让我们通过以下问题! | ||
76 | - </view> | ||
77 | - <!-- 图片 --> | ||
78 | - <view class='mid_pic_box'> | ||
79 | - <view class='mid_pic_box_item'> | ||
80 | - <image src='../../images/weirenzheng@3x.png'></image> | ||
81 | - </view> | ||
82 | - <view class='mid_pic_box_item'> | ||
83 | - <image src='../../images/weirenzheng@3x.png'></image> | ||
84 | - </view> | ||
85 | - <view class='mid_pic_box_item'> | ||
86 | - <image src='../../images/weirenzheng@3x.png'></image> | ||
87 | - </view> | ||
88 | - | ||
89 | </view> | 42 | </view> |
90 | - <!-- 底部 --> | ||
91 | - <view class='mid_item_like'> | ||
92 | - <view class='mid_item_like_left'> | ||
93 | - 删除 | ||
94 | - </view> | ||
95 | - | ||
96 | - <view class='mid_item_like_right'> | ||
97 | - <!-- 点赞 --> | ||
98 | - <view class='mid_like color_blue'> | ||
99 | - <image src='../../images/thumb-up-button@3x.png'></image> | ||
100 | - </view> | ||
101 | - <!-- 数量 --> | ||
102 | - <view class='mid_number color_blue'> | ||
103 | - 46 | ||
104 | - </view> | ||
105 | - | ||
106 | - <!-- 点赞 --> | ||
107 | - <view class='mid_like'> | ||
108 | - <image src='../../images/pinglun@3x.png'></image> | ||
109 | - </view> | ||
110 | - <!-- 数量 --> | ||
111 | - <view class='mid_number'> | ||
112 | - 46 | ||
113 | - </view> | ||
114 | - </view> | 43 | + </view> |
115 | 44 | ||
45 | + <!-- 提问 --> | ||
46 | + <view class='bottom' hidden='{{show}}'> | ||
47 | + <view class='bottom_question' bindtap='askQuestion'> | ||
48 | + 提问 | ||
116 | </view> | 49 | </view> |
117 | - | ||
118 | </view> | 50 | </view> |
119 | - | ||
120 | - <!-- 条目 --> | ||
121 | - <view class='mid_item'> | ||
122 | - <view class='mid_item_top'> | ||
123 | - <view class='mid_item_top_left'> | ||
124 | - <!-- 图片 --> | ||
125 | - <view class='mid_item_top_left_pic'> | ||
126 | - <image src='../../images/03_nav@2x.png'></image> | ||
127 | - </view> | ||
128 | - <!-- 文字 --> | ||
129 | - <view class='mid_item_top_left_text'> | ||
130 | - 金沃斯英语在线教育 | ||
131 | - <view class='icon_tm'> | ||
132 | - <image src='../../images/guangfang@2x.png'></image> | 51 | + </view> |
52 | + <!-- 企话吧 --> | ||
53 | + <view class='box_right' wx:if="{{currentTab==1}}"> | ||
54 | + <view class='mid'> | ||
55 | + <!-- 标题 --> | ||
56 | + <view class='mid_title'> | ||
57 | + 有一条新评论 > | ||
58 | + </view> | ||
59 | + <!-- 条目 --> | ||
60 | + <view class='mid_item' wx:for='{{postList}}' wx:key=''> | ||
61 | + <view class='mid_item_top'> | ||
62 | + <view class='mid_item_top_left'> | ||
63 | + <!-- 图片 --> | ||
64 | + <view class='mid_item_top_left_pic'> | ||
65 | + <image src='{{item.avatar||"../../images/03_nav@2x.png"}}'></image> | ||
66 | + </view> | ||
67 | + <!-- 文字 --> | ||
68 | + <view class='mid_item_top_left_text'> | ||
69 | + {{item.title}} | ||
133 | </view> | 70 | </view> |
134 | </view> | 71 | </view> |
72 | + <view class='mid_item_top_right'> | ||
73 | + {{item.create_time_text}} | ||
74 | + </view> | ||
135 | </view> | 75 | </view> |
136 | - <view class='mid_item_top_right'> | ||
137 | - 15分钟前 | ||
138 | - </view> | ||
139 | - </view> | ||
140 | - <!-- 文字内容 --> | ||
141 | - <view class='mid_item_text'> | ||
142 | - 新个人所得税法近日备受关注。关于个人所得税,想必大家都十分关心,让我们通过以下问题! | ||
143 | - </view> | ||
144 | - <!-- 图片 --> | ||
145 | - <view class='mid_pic_box'> | ||
146 | - <view class='mid_pic_box_item'> | ||
147 | - <image src='../../images/weirenzheng@3x.png'></image> | ||
148 | - </view> | ||
149 | - <view class='mid_pic_box_item'> | ||
150 | - <image src='../../images/weirenzheng@3x.png'></image> | ||
151 | - </view> | ||
152 | - <view class='mid_pic_box_item'> | ||
153 | - <image src='../../images/weirenzheng@3x.png'></image> | ||
154 | - </view> | ||
155 | - | ||
156 | - </view> | ||
157 | - <!-- 底部 --> | ||
158 | - <view class='mid_item_like'> | ||
159 | - <view class='mid_item_like_left'> | ||
160 | - 删除 | 76 | + <!-- 文字内容 --> |
77 | + <view class='mid_item_text'> | ||
78 | + {{item.content}} | ||
161 | </view> | 79 | </view> |
162 | - | ||
163 | - <view class='mid_item_like_right'> | ||
164 | - <!-- 点赞 --> | ||
165 | - <view class='mid_like color_blue'> | ||
166 | - <image src='../../images/zan@3x.png'></image> | 80 | + <!-- 图片 --> |
81 | + <view class='mid_pic_box'> | ||
82 | + <view class='mid_pic_box_item'> | ||
83 | + <image src='../../images/weirenzheng@3x.png'></image> | ||
167 | </view> | 84 | </view> |
168 | - <!-- 数量 --> | ||
169 | - <view class='mid_number '> | ||
170 | - 46 | 85 | + <view class='mid_pic_box_item'> |
86 | + <image src='../../images/weirenzheng@3x.png'></image> | ||
171 | </view> | 87 | </view> |
172 | - | ||
173 | - <!-- 点赞 --> | ||
174 | - <view class='mid_like'> | ||
175 | - <image src='../../images/pinglun_fill@3x.png'></image> | 88 | + <view class='mid_pic_box_item'> |
89 | + <image src='../../images/weirenzheng@3x.png'></image> | ||
176 | </view> | 90 | </view> |
177 | - <!-- 数量 --> | ||
178 | - <view class='mid_number color_blue'> | ||
179 | - 46 | ||
180 | - </view> | ||
181 | - </view> | ||
182 | - | ||
183 | - </view> | ||
184 | 91 | ||
185 | - </view> | ||
186 | - | ||
187 | - <!-- 条目 --> | ||
188 | - <view class='mid_item'> | ||
189 | - <view class='mid_item_top'> | ||
190 | - <view class='mid_item_top_left'> | ||
191 | - <!-- 图片 --> | ||
192 | - <view class='mid_item_top_left_pic'> | ||
193 | - <image src='../../images/03_nav@2x.png'></image> | 92 | + </view> |
93 | + <!-- 底部 --> | ||
94 | + <view class='mid_item_like'> | ||
95 | + <view class='mid_item_like_left' hidden='{{item.is_can_del=="0"}}' id='{{item.id}}' bindtap='delete'> | ||
96 | + 删除 | ||
194 | </view> | 97 | </view> |
195 | - <!-- 文字 --> | ||
196 | - <view class='mid_item_top_left_text'> | ||
197 | - 金沃斯英语在线教育 | ||
198 | - <view class='icon_tm'> | ||
199 | - <image src='../../images/guangfang@2x.png'></image> | 98 | + <view class='mid_item_like_right'> |
99 | + <!-- 点赞 --> | ||
100 | + <view class='mid_like color_blue'> | ||
101 | + <image src='../../images/thumb-up-button@3x.png'></image> | ||
102 | + </view> | ||
103 | + <!-- 数量 --> | ||
104 | + <view class='mid_number color_blue'> | ||
105 | + {{item.likes}} | ||
200 | </view> | 106 | </view> |
201 | - </view> | ||
202 | - </view> | ||
203 | - <view class='mid_item_top_right'> | ||
204 | - 15分钟前 | ||
205 | - </view> | ||
206 | - </view> | ||
207 | - <!-- 文字内容 --> | ||
208 | - <view class='mid_item_text'> | ||
209 | - 新个人所得税法近日备受关注。关于个人所得税,想必大家都十分关心,让我们通过以下问题! | ||
210 | - </view> | ||
211 | - <!-- 底部 --> | ||
212 | - <view class='mid_item_like'> | ||
213 | - <view class='mid_item_like_left'> | ||
214 | - 删除 | ||
215 | - </view> | ||
216 | 107 | ||
217 | - <view class='mid_item_like_right'> | ||
218 | - <!-- 点赞 --> | ||
219 | - <view class='mid_like color_blue'> | ||
220 | - <image src='../../images/zan@3x.png'></image> | ||
221 | - </view> | ||
222 | - <!-- 数量 --> | ||
223 | - <view class='mid_number '> | ||
224 | - 46 | 108 | + <!-- 点赞 --> |
109 | + <view class='mid_like'> | ||
110 | + <image src='../../images/pinglun@3x.png'></image> | ||
111 | + </view> | ||
112 | + <!-- 数量 --> | ||
113 | + <view class='mid_number'> | ||
114 | + {{item.comment_count}} | ||
115 | + </view> | ||
225 | </view> | 116 | </view> |
226 | 117 | ||
227 | - <!-- 点赞 --> | ||
228 | - <view class='mid_like'> | ||
229 | - <image src='../../images/pinglun@3x.png'></image> | ||
230 | - </view> | ||
231 | - <!-- 数量 --> | ||
232 | - <view class='mid_number'> | ||
233 | - 46 | ||
234 | - </view> | ||
235 | </view> | 118 | </view> |
236 | 119 | ||
237 | </view> | 120 | </view> |
238 | - <!-- 回复框 --> | ||
239 | - <view class='mid_item_bottom'> | ||
240 | - <view> | ||
241 | - <span class='color_blue'>宏中科技</span>:非常实用!!!</view> | ||
242 | - <view> | ||
243 | - <span class='color_blue'>宏中科技</span>:非常实用!!!</view> | ||
244 | - <view> | ||
245 | - <span class='color_blue'>查看更多>></span> | ||
246 | - </view> | ||
247 | - </view> | ||
248 | </view> | 121 | </view> |
249 | </view> | 122 | </view> |
250 | - </view> | ||
251 | -</scroll-view> | 123 | + </scroll-view> |
252 | 124 | ||
253 | 125 | ||
254 | -<!-- 没有权限 --> | ||
255 | -<view class='null_data_box' wx:else> | ||
256 | - <view class='data_box'> | ||
257 | - <image src='/images/weirenzheng@2x.png'></image> | ||
258 | - <view class='list_btn' bindtap='open_btn' data-type='auth' bindtap='renzheng'>{{auth=='0'?'开通企业认证 >':auth=='1'?'企业认证中 请等待':""}}</view> | ||
259 | - <view wx:if='{{auth=="0"}}'> ~~ 企业认证后开启更多服务 ~~</view> | ||
260 | - </view> | ||
261 | -</view> | ||
126 | + <!-- 没有权限 --> | ||
127 | + <view class='null_data_box' wx:else> | ||
128 | + <view class='data_box'> | ||
129 | + <image src='/images/weirenzheng@2x.png'></image> | ||
130 | + <view class='list_btn' bindtap='open_btn' data-type='auth' bindtap='renzheng'>{{auth=='0'?'开通企业认证 >':auth=='1'?'企业认证中 请等待':""}}</view> | ||
131 | + <view wx:if='{{auth=="0"}}'> ~~ 企业认证后开启更多服务 ~~</view> | ||
132 | + </view> | ||
133 | + </view> |
@@ -70,6 +70,9 @@ page{ | @@ -70,6 +70,9 @@ page{ | ||
70 | border-bottom: 2px solid #f5f5f5; | 70 | border-bottom: 2px solid #f5f5f5; |
71 | box-sizing: border-box; | 71 | box-sizing: border-box; |
72 | } | 72 | } |
73 | +.box_right .mid_item{ | ||
74 | + flex-flow: column; | ||
75 | +} | ||
73 | .mid_item_left{ | 76 | .mid_item_left{ |
74 | width:42rpx; | 77 | width:42rpx; |
75 | height:40rpx; | 78 | height:40rpx; |
@@ -145,7 +148,7 @@ page{ | @@ -145,7 +148,7 @@ page{ | ||
145 | height: 100%; | 148 | height: 100%; |
146 | } | 149 | } |
147 | .bottom{ | 150 | .bottom{ |
148 | - margin-top: 150rpx; | 151 | + margin: 100rpx 0; |
149 | width: 100%; | 152 | width: 100%; |
150 | /* background: #fff; */ | 153 | /* background: #fff; */ |
151 | display: flex; | 154 | display: flex; |
1 | // pages/interact/interactPost/interactPost.js | 1 | // pages/interact/interactPost/interactPost.js |
2 | +const app = getApp(); | ||
2 | Page({ | 3 | Page({ |
3 | 4 | ||
4 | /** | 5 | /** |
5 | * 页面的初始数据 | 6 | * 页面的初始数据 |
6 | */ | 7 | */ |
7 | data: { | 8 | data: { |
8 | - images: ['/images/huifujishi@2x.png', '/images/huifuyiban@2x.png'], | 9 | + params:{ |
10 | + title:'', | ||
11 | + content:'', | ||
12 | + images:[] | ||
13 | + }, | ||
14 | + images: [], | ||
9 | }, | 15 | }, |
10 | 16 | ||
11 | /** | 17 | /** |
@@ -14,10 +20,138 @@ Page({ | @@ -14,10 +20,138 @@ Page({ | ||
14 | onLoad: function (options) { | 20 | onLoad: function (options) { |
15 | 21 | ||
16 | }, | 22 | }, |
17 | - setTitle(e){ | 23 | + setText(e){ |
24 | + let t = this,s = e.currentTarget.dataset.type; | ||
25 | + s=='title'?(t.setData({ | ||
26 | + 'params.title':e.detail.value | ||
27 | + })):(t.setData({ | ||
28 | + 'params.content': e.detail.value | ||
29 | + })) | ||
30 | + }, | ||
31 | + deleteImg(e){ | ||
32 | + let index = e.currentTarget.dataset.index; | ||
33 | + this.data.images.splice(index,1); | ||
34 | + this.setData({ | ||
35 | + images: this.data.images | ||
36 | + }) | ||
37 | + }, | ||
18 | 38 | ||
39 | + choose: function () { | ||
40 | + let that = this; | ||
41 | + wx.chooseImage({ | ||
42 | + sizeType: ['original', 'compressed'], | ||
43 | + sourceType: ['album', 'camera'], | ||
44 | + success(res) { | ||
45 | + // tempFilePath可以作为img标签的src属性显示图片 | ||
46 | + // console.log(res); | ||
47 | + let successUp = 0; //成功个数 | ||
48 | + let failUp = 0; //失败个数 | ||
49 | + let i = 0; //第几个 | ||
50 | + let tempFilePaths = res.tempFilePaths //总文件 | ||
51 | + let length = res.tempFilePaths.length //总共个数 | ||
52 | + wx.showNavigationBarLoading() | ||
53 | + wx.showLoading({ | ||
54 | + title: '上传中', | ||
55 | + }) | ||
56 | + that.uploadAllfile(tempFilePaths, successUp, failUp, i, length); | ||
57 | + }, | ||
58 | + fail: function (res) { | ||
59 | + console.log(res); | ||
60 | + }, | ||
61 | + | ||
62 | + }) | ||
19 | }, | 63 | }, |
20 | 64 | ||
65 | + // 上传图片至后台 | ||
66 | + uploadAllfile(filePaths, successUp, failUp, i, length) { | ||
67 | + let that = this; | ||
68 | + let url = '/api/common/upload'; | ||
69 | + let headers = { | ||
70 | + "token": wx.getStorageSync("token"), | ||
71 | + 'content-type': 'multipart/form-data' | ||
72 | + } | ||
73 | + wx.uploadFile({ | ||
74 | + url: app.globalData.baseUrl + url, //仅为示例,非真实的接口地址 | ||
75 | + header: headers, | ||
76 | + filePath: filePaths[i], | ||
77 | + name: 'file', | ||
78 | + formData: { | ||
79 | + act: "Index_upload", | ||
80 | + file: '', | ||
81 | + filetype: 'image' | ||
82 | + }, | ||
83 | + success: function (res) { | ||
84 | + // console.log(res) | ||
85 | + wx.hideNavigationBarLoading() | ||
86 | + wx.hideLoading() | ||
87 | + if (res.statusCode == 200) { | ||
88 | + // console.log(res) | ||
89 | + let dat = JSON.parse(res.data); | ||
90 | + // console.log(dat); | ||
91 | + that.setData({ | ||
92 | + images: that.data.images.concat(dat.data.url) | ||
93 | + }) | ||
94 | + // console.log(that.data.proData.images); | ||
95 | + } else { | ||
96 | + wx.showModal({ | ||
97 | + title: '提示', | ||
98 | + content: res.msg, | ||
99 | + showCancel: false | ||
100 | + }) | ||
101 | + } | ||
102 | + }, | ||
103 | + fail: function (res) { | ||
104 | + wx.hideNavigationBarLoading() | ||
105 | + wx.hideLoading() | ||
106 | + | ||
107 | + // console.log(res); | ||
108 | + }, | ||
109 | + complete() { | ||
110 | + i++; | ||
111 | + let img = that.data.img | ||
112 | + if (i == length) { | ||
113 | + // console.log('总共' + successUp + '张上传成功,' + failUp + '张上传失败!'); | ||
114 | + } | ||
115 | + else { //递归调用uploadDIY函数 | ||
116 | + that.uploadAllfile(filePaths, successUp, failUp, i, length); | ||
117 | + } | ||
118 | + } | ||
119 | + | ||
120 | + }) | ||
121 | + | ||
122 | + }, | ||
123 | + subArticle(){ | ||
124 | + let t = this, url ='/api/interact/setPosts',params= t.data.params; | ||
125 | + params.images = params.images.length?params.images.join(','):''; | ||
126 | + !params.title?(wx.showToast({ | ||
127 | + title: '请输入主题', | ||
128 | + icon:'none' | ||
129 | + })) : (!params.content ? wx.showToast({ | ||
130 | + title: '请输入内容', | ||
131 | + icon: 'none' | ||
132 | + }) : (app.post(url, params).then((r) => { | ||
133 | + wx.showToast({ | ||
134 | + title: '发表成功', | ||
135 | + icon: 'none' | ||
136 | + }) | ||
137 | + setTimeout(() => { | ||
138 | + wx.switchTab({ | ||
139 | + url: '/pages/enterprise/enterprise', | ||
140 | + }) | ||
141 | + }, 1100) | ||
142 | + }))) | ||
143 | + // app.post(url,params).then((r)=>{ | ||
144 | + // wx.showToast({ | ||
145 | + // title: '发表成功', | ||
146 | + // icon:'none' | ||
147 | + // }) | ||
148 | + // setTimeout(()=>{ | ||
149 | + // wx.redirectTo({ | ||
150 | + // url: '/pages/enterprise/enterprise', | ||
151 | + // }) | ||
152 | + // },1100) | ||
153 | + // }) | ||
154 | + }, | ||
21 | /** | 155 | /** |
22 | * 生命周期函数--监听页面初次渲染完成 | 156 | * 生命周期函数--监听页面初次渲染完成 |
23 | */ | 157 | */ |
1 | <!--pages/interact/interactPost/interactPost.wxml--> | 1 | <!--pages/interact/interactPost/interactPost.wxml--> |
2 | <view class='box'> | 2 | <view class='box'> |
3 | <view class='banner_box'> | 3 | <view class='banner_box'> |
4 | - <view class='type_box' bindtap="showPicker"> | ||
5 | - <view> | ||
6 | - <input placeholder='输入主题...' placeholder-class='input_size' data-type='title' value='{{title}}' bindinput='setTitle'></input> | ||
7 | - </view> | 4 | + <view class='type_box' > |
5 | + <input placeholder='输入主题...' placeholder-class='input_size' data-type='title' value='{{title}}' bindinput='setText'></input> | ||
8 | </view> | 6 | </view> |
9 | <view class='textarea_box'> | 7 | <view class='textarea_box'> |
10 | - <textarea class='textarea' placeholder='输入内容...' placeholder-class='input_size' maxlength='{{max2}}' value='{{text}}' bindinput='setText'> | 8 | + <textarea class='textarea' placeholder='输入内容...' placeholder-class='input_size' maxlength='{{max2}}' value='{{text}}' bindinput='setText' data-type='content'> |
11 | </textarea> | 9 | </textarea> |
12 | </view> | 10 | </view> |
13 | <view class='upload_box'> | 11 | <view class='upload_box'> |
14 | - <block wx:for="{{images}}" wx:for-item="image" wx:key="index"> | 12 | + <block wx:for="{{params.images}}" wx:for-item="image" wx:key="index"> |
15 | <view class='upload_img'> | 13 | <view class='upload_img'> |
16 | <view class='icon_box'> | 14 | <view class='icon_box'> |
17 | <view class='iconfont icon-shanchu' catchtap="deleteImg" data-index="{{index}}"></view> | 15 | <view class='iconfont icon-shanchu' catchtap="deleteImg" data-index="{{index}}"></view> |
@@ -19,10 +17,10 @@ | @@ -19,10 +17,10 @@ | ||
19 | <image src='{{image}}' data-index="{{index}}" mode="aspectFill" bindtap="previewImg"></image> | 17 | <image src='{{image}}' data-index="{{index}}" mode="aspectFill" bindtap="previewImg"></image> |
20 | </view> | 18 | </view> |
21 | </block> | 19 | </block> |
22 | - <view class='upload_img' bindtap="choose"> | 20 | + <view class='upload_img' bindtap="choose" hidden='{{params.images.length>9}}'> |
23 | <view class='iconfont icon-jia1'></view> | 21 | <view class='iconfont icon-jia1'></view> |
24 | </view> | 22 | </view> |
25 | </view> | 23 | </view> |
26 | </view> | 24 | </view> |
27 | - <view class='bottom_btn'>发表帖子</view> | 25 | + <view class='bottom_btn' bindtap='subArticle'>发表帖子</view> |
28 | </view> | 26 | </view> |
@@ -31,9 +31,13 @@ Page({ | @@ -31,9 +31,13 @@ Page({ | ||
31 | let url ='/api/company/setFollow', params = { | 31 | let url ='/api/company/setFollow', params = { |
32 | id: this.data.id, | 32 | id: this.data.id, |
33 | header: true | 33 | header: true |
34 | - }; app.post(url,params).then((res)=>{ | 34 | + }; app.post(url,params,false).then((r)=>{ |
35 | + wx.showToast({ | ||
36 | + title: r == 2 ? "关注成功" : "已取消", | ||
37 | + icon:'none' | ||
38 | + }) | ||
35 | this.setData({ | 39 | this.setData({ |
36 | - 'detailInfo["focus"]': true | 40 | + 'detailInfo.is_like': r==2?1:0 |
37 | }) | 41 | }) |
38 | }) | 42 | }) |
39 | }, | 43 | }, |
@@ -51,7 +55,9 @@ Page({ | @@ -51,7 +55,9 @@ Page({ | ||
51 | tuijian(){ | 55 | tuijian(){ |
52 | let url ='/api/Company/recommend'; | 56 | let url ='/api/Company/recommend'; |
53 | app.post(url,{header:true}).then((r)=>{ | 57 | app.post(url,{header:true}).then((r)=>{ |
54 | - console.log(r) | 58 | + this.setData({ |
59 | + tuijianList: r.data | ||
60 | + }) | ||
55 | }) | 61 | }) |
56 | }, | 62 | }, |
57 | onReady: function () {}, | 63 | onReady: function () {}, |
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
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}}' bindtap='canclefocus'>已关注</view> | 10 | + <view class='focus_button cancle_focus' wx:if='{{detailInfo.is_like}}' bindtap='onfocus'>已关注</view> |
11 | <view class='focus_button' bindtap='onfocus' wx:else>+ 关注</view> | 11 | <view class='focus_button' bindtap='onfocus' wx:else>+ 关注</view> |
12 | 12 | ||
13 | </view> | 13 | </view> |
@@ -46,12 +46,10 @@ | @@ -46,12 +46,10 @@ | ||
46 | </view> | 46 | </view> |
47 | <!-- 企业推荐 --> | 47 | <!-- 企业推荐 --> |
48 | <view class='tuijian_content'> | 48 | <view class='tuijian_content'> |
49 | - <navigator class='tuijian_item'> | ||
50 | - 企业推荐:网易云 | ||
51 | - </view> | ||
52 | - <view class='tuijian_item'> | ||
53 | - 企业推荐:易云端科技有限公司 | ||
54 | - </view> | 49 | + |
50 | + <navigator open-type='redirect' url='/pages/matrix/company/company?id={{item.id}}' class='tuijian_item' wx:for='{{tuijianList}}' wx:key=''> | ||
51 | + 企业推荐:{{item.name}} | ||
52 | + </navigator> | ||
55 | </view> | 53 | </view> |
56 | </view> | 54 | </view> |
57 | </view> | 55 | </view> |
@@ -119,13 +119,13 @@ Page({ | @@ -119,13 +119,13 @@ Page({ | ||
119 | // 上传图片至后台 | 119 | // 上传图片至后台 |
120 | uploadAllfile(filePaths, successUp, failUp, i, length) { | 120 | uploadAllfile(filePaths, successUp, failUp, i, length) { |
121 | let that = this; | 121 | let that = this; |
122 | - let url = 'http://lqz.w.brotop.cn/api/common/upload'; | 122 | + let url = '/api/common/upload'; |
123 | let headers = { | 123 | let headers = { |
124 | "token": wx.getStorageSync("token"), | 124 | "token": wx.getStorageSync("token"), |
125 | 'content-type': 'multipart/form-data' | 125 | 'content-type': 'multipart/form-data' |
126 | } | 126 | } |
127 | wx.uploadFile({ | 127 | wx.uploadFile({ |
128 | - url: url, //仅为示例,非真实的接口地址 | 128 | + url: app.globalData.baseUrl+url, //仅为示例,非真实的接口地址 |
129 | header: headers, | 129 | header: headers, |
130 | filePath: filePaths[i], | 130 | filePath: filePaths[i], |
131 | name: 'file', | 131 | name: 'file', |
@@ -56,7 +56,7 @@ | @@ -56,7 +56,7 @@ | ||
56 | } | 56 | } |
57 | 57 | ||
58 | .bottom_btn { | 58 | .bottom_btn { |
59 | - width: 352rpx; | 59 | + width: 520rpx; |
60 | height: 80rpx; | 60 | height: 80rpx; |
61 | background: linear-gradient(319deg, rgba(22, 155, 213, 1) 0%, rgba(0, 211, 255, 1) 100%); | 61 | background: linear-gradient(319deg, rgba(22, 155, 213, 1) 0%, rgba(0, 211, 255, 1) 100%); |
62 | border-radius: 8rpx; | 62 | border-radius: 8rpx; |
@@ -66,12 +66,12 @@ | @@ -66,12 +66,12 @@ | ||
66 | display: flex; | 66 | display: flex; |
67 | align-items: center; | 67 | align-items: center; |
68 | justify-content: center; | 68 | justify-content: center; |
69 | - margin: 100rpx auto 0 auto; | 69 | + margin: 200rpx auto 0; |
70 | } | 70 | } |
71 | .add_btn{ | 71 | .add_btn{ |
72 | border: 2rpx solid rgb(236, 201, 201); | 72 | border: 2rpx solid rgb(236, 201, 201); |
73 | - width: 160rpx; | ||
74 | - height: 160rpx; | 73 | + width: 158rpx; |
74 | + height: 158rpx; | ||
75 | display: flex; | 75 | display: flex; |
76 | align-items: center; | 76 | align-items: center; |
77 | justify-content: center; | 77 | justify-content: center; |
@@ -34,14 +34,14 @@ Page({ | @@ -34,14 +34,14 @@ Page({ | ||
34 | b.setData({ | 34 | b.setData({ |
35 | auth: r | 35 | auth: r |
36 | }); | 36 | }); |
37 | - r == 2 ? b.getUserInfo() : ''; | 37 | + b.getUserInfo() |
38 | }) | 38 | }) |
39 | }, | 39 | }, |
40 | getUserInfo(){ | 40 | getUserInfo(){ |
41 | let d = this, url ='/api/user/index',params={ | 41 | let d = this, url ='/api/user/index',params={ |
42 | header: true | 42 | header: true |
43 | }; t.post(url,params,false).then((r)=>{ | 43 | }; t.post(url,params,false).then((r)=>{ |
44 | - d.setData({ userInfo: r.userInfo}) | 44 | + d.setData({ userInfo: r.userInfo, noticeNum: r.noticeNum}) |
45 | }) | 45 | }) |
46 | }, | 46 | }, |
47 | 47 |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
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' wx:if="{{userInfo.company_name}}"> | 6 | + <view class='banner_info'> |
7 | <text>认证企业:{{userInfo.company_name}}</text> | 7 | <text>认证企业:{{userInfo.company_name}}</text> |
8 | <image src='/images/guangfang@2x.png'></image> | 8 | <image src='/images/guangfang@2x.png'></image> |
9 | </view> | 9 | </view> |
@@ -12,7 +12,6 @@ | @@ -12,7 +12,6 @@ | ||
12 | <text>{{userInfo.username}}</text> | 12 | <text>{{userInfo.username}}</text> |
13 | </view> | 13 | </view> |
14 | </view> | 14 | </view> |
15 | - <view wx:else class='banner_label'>授权登录</view> | ||
16 | </view> | 15 | </view> |
17 | </view> | 16 | </view> |
18 | <!-- --> | 17 | <!-- --> |
@@ -59,8 +58,8 @@ | @@ -59,8 +58,8 @@ | ||
59 | </view> | 58 | </view> |
60 | <view class='list_item_box'> | 59 | <view class='list_item_box'> |
61 | <view>发文通知</view> | 60 | <view>发文通知</view> |
62 | - <view class='list_icon2'> | ||
63 | - <view class='list_point'>1</view> | 61 | + <view class='list_icon2' > |
62 | + <view class='list_point' hidden="{{!noticeNum}}">{{noticeNum}}</view> | ||
64 | <view class='iconfont icon-go'></view> | 63 | <view class='iconfont icon-go'></view> |
65 | </view> | 64 | </view> |
66 | </view> | 65 | </view> |
@@ -86,6 +86,7 @@ | @@ -86,6 +86,7 @@ | ||
86 | </scroll-view> | 86 | </scroll-view> |
87 | 87 | ||
88 | <view class="none-box" hidden="{{ifData}}"> | 88 | <view class="none-box" hidden="{{ifData}}"> |
89 | - <view>你还没有帖子,快去<text class='fabiao' bindtap='subArticle'>发表</text>吧!</view> | 89 | + <!-- <view>你还没有帖子,快去<text class='fabiao' bindtap='subArticle'>发表</text>吧!</view> --> |
90 | + <view>你还没有帖子,快去<text class='fabiao' >发表</text>吧!</view> | ||
90 | 91 | ||
91 | </view> | 92 | </view> |
-
请 注册 或 登录 后发表评论