Browse Source

小程序的一些修改

master
xuxu 5 years ago
parent
commit
275b6e4f10
  1. 2
      app.json
  2. 2
      pages/resource/detail/index.js
  3. 4
      pages/resource/list/index.js
  4. 2
      pages/topics/index.js
  5. 1
      pages/topics/index.json
  6. 2
      pages/topics/rent/detail/index.js
  7. 2
      pages/topics/rent/index.js
  8. 2
      pages/topics/rent/index.wxml
  9. 2
      pages/topics/rent/room/index.js
  10. 2
      pages/topics/talents/index.wxml
  11. 2
      pages/topics/talents/index.wxss

2
app.json

@ -36,7 +36,7 @@
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "市北人才",
"navigationBarTitleText": "市北人才赋能平台",
"navigationBarTextStyle": "black"
},
"tabBar": {

2
pages/resource/detail/index.js

@ -20,7 +20,7 @@ Page({
onLoad: function (options) {
var id = options.id;
topicModel.getResourceDetail(id,res=>{
wx.setNavigationBarTitle({ title:res.result.typeName})
if(res.result.isCollection == 1){
this.setData({
isCollect:true,

4
pages/resource/list/index.js

@ -31,7 +31,7 @@ Component({
return;
}
if(this.properties.tp == '1'){
if(this.properties.tp == '1'){ // 资源列表
if(e.currentTarget.dataset.url){
wx.navigateTo({
url: '/pages/resource/navigate/index?url=' + encodeURIComponent(e.currentTarget.dataset.url)
@ -44,7 +44,7 @@ Component({
})
return;
}
}else if(this.properties.tp == '2'){
}else if(this.properties.tp == '2'){ // 房屋列表
wx.navigateTo({
url: '/pages/topics/rent/detail/index?id=' + e.currentTarget.dataset.id
})

2
pages/topics/index.js

@ -247,11 +247,13 @@ Page({
})
},
fetchRent:function(){
if(this.data.apartment.length == 0){
topicModel.getApartment(res=>{
this.setData({
apartment:res.result
})
})
}
},
/**
* 页面上拉触底事件的处理函数

1
pages/topics/index.json

@ -13,5 +13,6 @@
"loan":"./loan/index",
"rent":"./rent/index"
},
"navigationBarTitleText": "赋能中心",
"onReachBottomDistance":50
}

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

@ -20,7 +20,7 @@ Page({
onLoad: function (options) {
var id = options.id;
topicModel.getRoomDetail(id,res=>{
wx.setNavigationBarTitle({ title:res.result.title})
if(res.result.isCollection == 1){
this.setData({
isCollect:true,

2
pages/topics/rent/index.js

@ -26,7 +26,7 @@ Component({
check:function(e){
var id = e.currentTarget.id;
wx.navigateTo({
url: '/pages/topics/rent/room/index?id=' + id
url: '/pages/topics/rent/room/index?id=' + id + '&title=' + e.currentTarget.dataset.title
})
}
}

2
pages/topics/rent/index.wxml

@ -8,7 +8,7 @@
</view>
<view class="content">
<view><text class="fa fa-map-marker fa-lg"></text> <text class="address">{{item.address}}</text></view>
<view><van-button type="danger" size="small" bind:click="check" id="{{item.id}}">查看</van-button></view>
<view><van-button type="danger" size="small" bind:click="check" id="{{item.id}}" data-title="{{item.title}}">查看</van-button></view>
</view>
</view>
</block>

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

@ -18,6 +18,8 @@ Page({
*/
onLoad: function (options) {
var id = options.id;
var title = options.title;
wx.setNavigationBarTitle({ title:title});
this.setData({
apartmentId:id
})

2
pages/topics/talents/index.wxml

@ -19,7 +19,7 @@
<view class="select-view">
<!-- 字体图标 -->
<view class="select-mark">
<text class="fa fa-list fa-lg"></text>
<text class="fa fa-navicon fa-lg"></text>
</view>

2
pages/topics/talents/index.wxss

@ -87,5 +87,5 @@
}
.select-picker{
flex: 1;
margin:0px 10px;
margin:0px 20px;
}

Loading…
Cancel
Save