|
@@ -10,7 +10,7 @@
|
|
<!-- 选项列表 -->
|
|
<!-- 选项列表 -->
|
|
<view class="option-list">
|
|
<view class="option-list">
|
|
|
|
|
|
- <view class="list-item">
|
|
|
|
|
|
+ <view class="list-item" @click="scanCode">
|
|
<view class="icon iconfont" style="background-color:#59d96e;">
|
|
<view class="icon iconfont" style="background-color:#59d96e;">
|
|

|
|

|
|
</view>
|
|
</view>
|
|
@@ -124,7 +124,7 @@
|
|
<view class="line" style="margin-top:4px;"></view>新闻公告
|
|
<view class="line" style="margin-top:4px;"></view>新闻公告
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view class="more">更多<view class="more-icon iconfont"> </view>
|
|
|
|
|
|
+ <view class="more" @click="toNewsNotice">更多<view class="more-icon iconfont"> </view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
@@ -160,7 +160,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="bottom">
|
|
|
|
|
|
+ <view class="bottom" v-if="newsList.length ==recordsTotal">
|
|
<view class="bot">
|
|
<view class="bot">
|
|
<view class="bot-line"></view>
|
|
<view class="bot-line"></view>
|
|
<view class="bot-text">已经到底了</view>
|
|
<view class="bot-text">已经到底了</view>
|
|
@@ -195,6 +195,9 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ newsList: [],
|
|
|
|
+ pageIndex: 1,
|
|
|
|
+ recordsTotal: 0,
|
|
longitude: '',
|
|
longitude: '',
|
|
latitude: '',
|
|
latitude: '',
|
|
message: '',
|
|
message: '',
|
|
@@ -226,14 +229,35 @@
|
|
current: 0
|
|
current: 0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ onReachBottom() {
|
|
|
|
+ if (this.newsList.length < this.recordsTotal) {
|
|
|
|
+ this.myLoadmore();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
onReady() {
|
|
onReady() {
|
|
- WxJsApi.getWxConfig(['getLocation','addEventListener']).then((res)=>{
|
|
|
|
|
|
+ WxJsApi.getWxConfig(['getLocation','addEventListener','scanQRCode']).then((res)=>{
|
|
// console.log(res)
|
|
// console.log(res)
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
console.log(res)
|
|
console.log(res)
|
|
- })
|
|
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ this.getPoint();
|
|
|
|
+ this.getNewsList();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ toNewsNotice() {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/article/newsNotice'
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //微信扫二维码
|
|
|
|
+ scanCode() {
|
|
|
|
+ WxJsApi.scanQRCode(1).then(res => {
|
|
|
|
+
|
|
|
|
+ }).catch(error => {
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ },
|
|
getPoint() {
|
|
getPoint() {
|
|
WxJsApi.getLocation().then((res) => {
|
|
WxJsApi.getLocation().then((res) => {
|
|
this.latitude = parseFloat(res.latitude);
|
|
this.latitude = parseFloat(res.latitude);
|
|
@@ -251,6 +275,13 @@
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ getNewsList() {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ myLoadmore() {
|
|
|
|
+ this.pageIndex += 1;
|
|
|
|
+ this.getNewsList()
|
|
|
|
+ },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|