123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- <template>
- <view class="container club clearfix">
-
- </view>
- </template>
- <script>
- import authorize from '@/common/config/authorize.js'
- import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
- import tuiNomore from "@/components/tui-components/nomore/nomore"
- import { queryclubList, deleteclub , updateCode } from "@/api/operator.js"
- export default {
- components:{
- tuiLoadmore,
- tuiNomore,
- },
- data() {
- return {
- clubID:'',
- clubName:'',
- clubImage:'',
- linkman:'',
- clubMobile:'',
- isEmpty:false,
- nomoreText: '上拉显示更多',
- userID:'',
- pageNum:1,
- pageSize:10,
- hasNextPage:false,
- loadding: false,
- pullUpOn: true,
- pullFlag: true,
- allowDataStatus:true,
- wrapperHeight:'100%',
- scrollHeight:'',
- deleteAddressId:'',
- currPage:'',//当前页面
- prevPage:'',//上一个页面
- clubList:[],
- isIphoneX:this.$store.state.isIphoneX,
- }
- },
- onLoad(){
- this.setScrollHeight();
- },
- methods: {
- setScrollHeight() {
- // 窗口高度 - 底部距离
- setTimeout(()=> {
- const query = wx.createSelectorQuery().in(this);
- query.selectAll('.add-btn').boundingClientRect();
- query.exec(res => {
- if(res[0][0]){
- let winHeight = this.$api.getWindowHeight(),
- eleTop = res[0][0].top - 1;
- this.scrollHeight = eleTop;
- }
- })
- }, 500)
- },
- searchOpertor(){
- this.pageNum=1
- this.initclubList()
- },
- initclubList(){
- let params = {clubID:this.clubID,pageNum:1,pageSize:this.pageSize,linkName:this.linkman,mobile:this.clubMobile}
- queryclubList(params).then(response =>{
- let responseData = response.data
- if(responseData.results&&responseData.results.length > 0){
- this.isEmpty = false
- this.hasNextPage = response.data.hasNextPage
- this.clubList =responseData.results
- this.pullFlag = false;
- setTimeout(()=>{this.pullFlag = true;},500)
- if(this.hasNextPage){
- this.pullUpOn = false
- this.nomoreText = '上拉显示更多'
- }else{
- this.pullUpOn = true
- this.loadding = false
- this.nomoreText = '已至底部'
- }
- }else{
- this.isEmpty = true
- }
- }).catch(response =>{
- this.$util.msg(response.msg,2000)
- })
- },
- getOnReachBottomData(){
- this.pageNum+=1
- let params = {pageNum:this.pageNum,pageSize:this.pageSize,linkName:this.linkman,mobile:this.clubMobile}
- queryclubList(params).then(response =>{
- let responseData = response.data
- if(responseData.results&&responseData.results.length > 0){
- this.hasNextPage = response.data.hasNextPage
- this.clubList = this.clubList.concat(responseData.results)
- this.pullFlag = false;// 防上拉暴滑
- setTimeout(()=>{this.pullFlag = true;},500)
- if(this.hasNextPage){
- this.pullUpOn = false
- this.nomoreText = '上拉显示更多'
- }else{
- this.pullUpOn = false
- this.loadding = false
- this.nomoreText = '已至底部'
- }
- }
- }).catch(response =>{
- this.$util.msg(response.msg,2000)
- })
- },
- rexpStautsColor(status) {
- let textColor = ''
- switch (status) {
- case '1':
- textColor = '#55BB00'
- break
- case '2':
- textColor = '#0056BB'
- break
- case '3':
- textColor = '#BB0000'
- break
- }
- return textColor
- },
- iconStautsColor(status) {
- let textColor = ''
- if(status == '2'){
- textColor = '#09BB07'
- }else{
- textColor = '#DDDDDD'
- }
- return textColor
- },
- },
- onReachBottom() {
- if(this.hasNextPage){
- this.loadding = true
- this.pullUpOn = true
- this.getOnReachBottomData()
- }
- },
- onShow() {
- this.$api.getCommonStorage('clubInfo').then(response =>{
- })
- }
- }
- </script>
- <style lang='scss'>
- page {
- height: auto;
- }
- page,.container{
- /* padding-bottom: 120upx; */
- background: #F7F7F7;
- border-top: 1px solid #EBEBEB;
- }
- </style>
|