Browse Source

小程序修改

master
xuxu 5 years ago
parent
commit
adc6f40176
  1. 2
      app.json
  2. 2
      models/topic.js
  3. 1
      pages/article/index.json
  4. 5
      pages/resource/detail/index.js
  5. 1
      pages/resource/list/index.wxml
  6. 9
      pages/resource/list/index.wxss
  7. 9
      pages/topics/interactive/topicArticle/index.js
  8. 3
      pages/topics/loan/index.js
  9. 5
      pages/topics/rent/detail/index.js
  10. 4
      pages/topics/rent/room/index.js
  11. 49
      pages/topics/talents/index.js
  12. 3
      pages/topics/talents/index.json
  13. 9
      pages/topics/talents/index.wxml
  14. 4
      pages/topics/talents/index.wxss
  15. 2
      pages/user/index.wxml
  16. 3
      pages/user/myFavorite/index.js
  17. 4
      pages/user/myFavorite/index.wxml
  18. 2
      pages/user/myWhistle/index.json
  19. 1
      pages/user/myWhistle/index.wxml
  20. 9
      pages/user/myWhistle/index.wxss
  21. 5
      pages/user/myWhistle/whistleDetail/index.wxml

2
app.json

@ -57,7 +57,7 @@
}, },
{ {
"pagePath": "pages/topics/index", "pagePath": "pages/topics/index",
"text": "议事厅", "text": "赋能中心",
"iconPath": "/images/tab/topics.png", "iconPath": "/images/tab/topics.png",
"selectedIconPath": "/images/tab/topics_highlight.png" "selectedIconPath": "/images/tab/topics_highlight.png"
}, },

2
models/topic.js

@ -16,7 +16,7 @@ const TopicBaseUrl = {
topic_streets_url:'/api/whistle/getStreetList',//街道列表 topic_streets_url:'/api/whistle/getStreetList',//街道列表
topic_talents_url:'/api/whistle/save',//添加人才吹哨 topic_talents_url:'/api/whistle/save',//添加人才吹哨
topic_center_url:'/api/content/getListByCode', //赋能中心列表 topic_center_url:'/api/content/getListByCode', //赋能中心列表
resource_type_url:'/api/resources/typelist ', resource_type_url:'/api/resources/typelist',
resource_list_url:'/api/resources/list', resource_list_url:'/api/resources/list',
resource_detail_url:'/api/resources/queryById', resource_detail_url:'/api/resources/queryById',
resource_collect_url:'/api/resources/collectResources/', resource_collect_url:'/api/resources/collectResources/',

1
pages/article/index.json

@ -1,5 +1,4 @@
{ {
"navigationBarTitleText": "赋能中心",
"usingComponents": { "usingComponents": {
"e-ibutton": "/components/image-button/index" "e-ibutton": "/components/image-button/index"
} }

5
pages/resource/detail/index.js

@ -110,6 +110,11 @@ Page({
title: '收藏成功', title: '收藏成功',
icon: 'none' icon: 'none'
}) })
}else{
wx.showToast({
title: '取消收藏',
icon: 'none'
})
} }
}) })

1
pages/resource/list/index.wxml

@ -26,3 +26,4 @@
<view class="right"><text class="fa fa-angle-right fa-lg"></text></view> <view class="right"><text class="fa fa-angle-right fa-lg"></text></view>
</view> </view>
</view> </view>
<view wx:if="{{list.length <= 0}}" class="page_empty">暂无数据</view>

9
pages/resource/list/index.wxss

@ -74,3 +74,12 @@
width: 90%; width: 90%;
height: 90; height: 90;
} }
.page_empty {
width: 100%;
height: 100px;
margin-top: 20px;
font-size: 14px;
color: #aaa;
text-align: center;
}

9
pages/topics/interactive/topicArticle/index.js

@ -247,22 +247,21 @@ Page({
// 弹出框 确认 // 弹出框 确认
confirm: function () { confirm: function () {
if(this.data.confirmTag){ if(this.data.confirmTag){
this.setData({
confirmTag:false,
hiddenmodalput:true,
})
if (!this.data.currentComment){ if (!this.data.currentComment){
wx.showToast({ wx.showToast({
title: '请输入评论', title: '请输入评论',
icon: 'none' icon: 'none'
}) })
this.setData({ this.setData({
hiddenmodalput: true,
confirmTag:true, confirmTag:true,
currentComment: '' currentComment: ''
}) })
return return
} }
this.setData({
confirmTag:false,
hiddenmodalput:true,
})
topicModel.topicAddComment(this.data.currentComment, this.data.topicId,res=>{ topicModel.topicAddComment(this.data.currentComment, this.data.topicId,res=>{
if(res.code === 200){ if(res.code === 200){
this.setData({ this.setData({

3
pages/topics/loan/index.js

@ -14,7 +14,8 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
url:'https://m.qdjqt.com/#/enterpriseLoan?xihaian=&VNK=e92927fe' // url:'https://m.qdjqt.com/#/enterpriseLoan?xihaian=&VNK=e92927fe'
url:'https://m.qdjqt.com/#/enterpriseLoan?location=ShiBei&regsource=ShiBeiOrg'
}, },
/** /**

5
pages/topics/rent/detail/index.js

@ -97,6 +97,11 @@ Page({
title: '收藏成功', title: '收藏成功',
icon: 'none' icon: 'none'
}) })
}else{
wx.showToast({
title: '取消收藏',
icon: 'none'
})
} }
}) })

4
pages/topics/rent/room/index.js

@ -72,7 +72,7 @@ Page({
onReachBottom: function () { onReachBottom: function () {
var th = this; var th = this;
var next = th.data.next; var next = th.data.next;
var typeCode = th.data.typeCode; var apartmentId = th.data.apartmentId;
if(!next){ if(!next){
return; return;
} }
@ -80,7 +80,7 @@ Page({
var nextPage = page + 1; var nextPage = page + 1;
var list = th.data.list; var list = th.data.list;
topicModel.getRoomList(typeCode,nextPage,res=>{ topicModel.getRoomList(apartmentId,nextPage,res=>{
if(res.result.records.length > 0){ if(res.result.records.length > 0){
list = list.concat(res.result.records); list = list.concat(res.result.records);

49
pages/topics/talents/index.js

@ -31,7 +31,8 @@ Component({
//选择后获取的街道的I, //选择后获取的街道的I,
streetID:'', streetID:'',
typeCode:'', typeCode:'',
textareaValue:'' textareaValue:'',
error:''
}, },
// lifetimes: { // lifetimes: {
// attached: function () { // attached: function () {
@ -82,7 +83,6 @@ Component({
}) })
//把streett添加第一项设为空 //把streett添加第一项设为空
typeList.unshift('') typeList.unshift('')
console.log(111111111)
console.log(typeList) console.log(typeList)
this.setData({ this.setData({
@ -96,23 +96,34 @@ Component({
}, },
methods: { methods: {
bindPickerStreetsChange: function(e) { bindPickerStreetsChange: function(e) {
// console.log("1"+e.detail.value)
this.setData({ this.setData({
streetsIndex: e.detail.value streetsIndex: e.detail.value
}) })
// console.log("2"+this.data.streetsIndex) if(e.detail.value == '0'){
this.setData({ this.setData({
streetID: this.data.results[this.data.streetsIndex-1].id streetID: ''
}) })
// console.log(this.data.streetID) }else{
this.setData({
streetID: this.data.results[this.data.streetsIndex-1].id
})
}
}, },
bindPickerTypeChange:function(e){ bindPickerTypeChange:function(e){
this.setData({ this.setData({
typeListIndex: e.detail.value typeListIndex: e.detail.value
}) })
this.setData({ if(e.detail.value == '0'){
typeCode: this.data.list[this.data.typeListIndex-1].typeCode this.setData({
}) typeCode: ''
})
}else{
this.setData({
typeCode: this.data.list[this.data.typeListIndex-1].typeCode
})
}
}, },
bindTextInput(e) { bindTextInput(e) {
this.setData({ this.setData({
@ -124,11 +135,15 @@ Component({
this.setData({ this.setData({
messageDetail: e.detail.value, messageDetail: e.detail.value,
}) })
if(e.detail.value.length>200){ console.log(e.detail.value.length)
wx.showToast({ if(e.detail.value.length >= 200){
title: '超过字数', // wx.showToast({
duration: 2000, // title: '超过字数',
icon: 'none' // duration: 2000,
// icon: 'none'
// })
this.setData({
error: '已达最大字数'
}) })
} }
}, },
@ -203,7 +218,7 @@ Component({
if (this.data.typeCode === ''){ if (this.data.typeCode === ''){
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: '请选择赋能类型', content: '请选择需求类型',
showCancel:false showCancel:false
}) })
return return

3
pages/topics/talents/index.json

@ -4,6 +4,7 @@
"e-ibutton": "/components/image-button/index", "e-ibutton": "/components/image-button/index",
"mp-cells": "/components/weui/cells/cells", "mp-cells": "/components/weui/cells/cells",
"mp-cell": "/components/weui/cell/cell", "mp-cell": "/components/weui/cell/cell",
"mp-uploader": "/components/weui/uploader/uploader" "mp-uploader": "/components/weui/uploader/uploader",
"mp-toptips": "/components/weui/toptips/toptips"
} }
} }

9
pages/topics/talents/index.wxml

@ -6,7 +6,7 @@
<view class="question-image"> <view class="question-image">
<!-- 文本框 --> <!-- 文本框 -->
<view class="item"> <view class="item">
<textarea class="textArea" maxlength="210" bindinput="bindTextAreaInput" placeholder="请描述您的问题(200字内)" value="{{textareaValue}}" /> <textarea class="textArea" maxlength="200" bindinput="bindTextAreaInput" placeholder="请描述您的问题(200字内)" value="{{textareaValue}}" />
</view> </view>
<!-- 添加图片 --> <!-- 添加图片 -->
<view style="z-index:10"> <view style="z-index:10">
@ -65,7 +65,8 @@
<text class="fa fa-angle-right fa-lg" style="color:#ACACAE"></text> <text class="fa fa-angle-right fa-lg" style="color:#ACACAE"></text>
</view> </view>
</view> </view>
<view class="btnView">
<e-ibutton title="提交" bind:onTap="submit"/>
</view>
</view> </view>
<view class="btnView">
<e-ibutton title="提交" bind:onTap="submit"/>
</view>
<mp-toptips msg="{{error}}" type="error" show="{{error}}"></mp-toptips>

4
pages/topics/talents/index.wxss

@ -1,7 +1,8 @@
/* pages/topics/talent/message/index.wxss */ /* pages/topics/talent/message/index.wxss */
@import '../../../style/font.wxss'; @import '../../../style/font.wxss';
.container{ .container{
padding: 0px 20px; padding: 0px 20px 90px 20px;
overflow: scroll;
} }
.item{ .item{
display: flex; display: flex;
@ -31,6 +32,7 @@
} }
.btnView{ .btnView{
position: fixed; position: fixed;
height:50px;
padding: 10px 20px 20px 20px; padding: 10px 20px 20px 20px;
bottom: 0; bottom: 0;
left: 0; left: 0;

2
pages/user/index.wxml

@ -49,7 +49,7 @@
<mp-cell <mp-cell
bindtap="onTapItem" data-type="myWhistle" bindtap="onTapItem" data-type="myWhistle"
icon="/images/user/pins.png" icon="/images/user/pins.png"
title="我的吹哨" title="我的需求"
link="true" link="true"
ext-class="cell-item"> ext-class="cell-item">
</mp-cell> </mp-cell>

3
pages/user/myFavorite/index.js

@ -124,7 +124,8 @@ Page({
refresh:function(e){ refresh:function(e){
var type = e.currentTarget.dataset.type; var type = e.currentTarget.dataset.type;
this.setData({ this.setData({
type:type type:type,
currentPage: 1
}); });
this.fetchMyFavoriteList(); this.fetchMyFavoriteList();
} }

4
pages/user/myFavorite/index.wxml

@ -20,10 +20,10 @@
<view class="option" bindtap="refresh" data-type="3"> <view class="option" bindtap="refresh" data-type="3">
<block wx:if="{{type == '3'}}"> <block wx:if="{{type == '3'}}">
<text style="color:#1989fa;">议事厅</text> <text style="color:#1989fa;">赋能中心</text>
</block> </block>
<block wx:else> <block wx:else>
议事厅 赋能中心
</block> </block>
</view> </view>
</view> </view>

2
pages/user/myWhistle/index.json

@ -1,5 +1,5 @@
{ {
"navigationBarTitleText": "我的吹哨", "navigationBarTitleText": "我的需求",
"usingComponents": {}, "usingComponents": {},
"onReachBottomDistance":50 "onReachBottomDistance":50
} }

1
pages/user/myWhistle/index.wxml

@ -15,3 +15,4 @@
</view> </view>
</block> </block>
<view wx:if="{{list.length <= 0}}" class="page_empty">暂无数据</view>

9
pages/user/myWhistle/index.wxss

@ -40,3 +40,12 @@ page{
align-items: center; align-items: center;
justify-content:space-between; justify-content:space-between;
} }
.page_empty {
width: 100%;
height: 100px;
margin-top: 20px;
font-size: 14px;
color: #aaa;
text-align: center;
}

5
pages/user/myWhistle/whistleDetail/index.wxml

@ -71,9 +71,12 @@
</view> </view>
<block wx:for="{{commentList}}"> <block wx:for="{{commentList}}">
<view class="comment"> <view class="comment">
<view style="font-weight:800;">
{{item.departName}}
</view>
<view class="com-top"> <view class="com-top">
<view> <view>
{{item.departName}} <van-rate readonly value="{{ item.score }}" color="#ee0a24"/> <text> {{whistle.getEvaluate(item.score)}}</text> <van-rate readonly value="{{ item.score }}" color="#ee0a24"/> <text> {{whistle.getEvaluate(item.score)}}</text>
</view> </view>
<view>{{item.commentDate}}</view> <view>{{item.commentDate}}</view>
</view> </view>

Loading…
Cancel
Save