|
@@ -7,9 +7,9 @@
|
|
class="input"
|
|
class="input"
|
|
type="text"
|
|
type="text"
|
|
confirm-type="search"
|
|
confirm-type="search"
|
|
- v-model="searchInputVal"
|
|
|
|
|
|
+ v-model="listQuery.name"
|
|
@input="onShowClose"
|
|
@input="onShowClose"
|
|
- @confirm="initclubList()"
|
|
|
|
|
|
+ @confirm="GetSellerClubList()"
|
|
placeholder="机构名称/联系人"
|
|
placeholder="机构名称/联系人"
|
|
maxlength="12"
|
|
maxlength="12"
|
|
/>
|
|
/>
|
|
@@ -47,25 +47,27 @@
|
|
<view class="list-item">
|
|
<view class="list-item">
|
|
<view class="list-title">
|
|
<view class="list-title">
|
|
<text class="list-name">{{ club.name }}</text>
|
|
<text class="list-name">{{ club.name }}</text>
|
|
- <text class="list-hist" @click.stop="_goOperation(5,club)"
|
|
|
|
|
|
+ <text class="list-hist" @click.stop="_goOperation(5, club)"
|
|
><text class="iconfont icon-dingdanxuanzhong"></text>订单列表</text
|
|
><text class="iconfont icon-dingdanxuanzhong"></text>订单列表</text
|
|
>
|
|
>
|
|
</view>
|
|
</view>
|
|
<view class="list-opea">
|
|
<view class="list-opea">
|
|
- <text class="tags" v-if="club.vipFlag == 0 && club.userIdentity === 2 ">VIP</text>
|
|
|
|
|
|
+ <text class="tags" v-if="club.vipFlag == 0 && club.userIdentity === 2">VIP</text>
|
|
<text class="tags sv" v-if="club.vipFlag == 1">SVIP</text>
|
|
<text class="tags sv" v-if="club.vipFlag == 1">SVIP</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="club-list-bot">
|
|
<view class="club-list-bot">
|
|
<view class="list-opea">
|
|
<view class="list-opea">
|
|
- <view class="btn org" @click.stop="_goOperation(1,club)"> <text>立即下单</text> </view>
|
|
|
|
- <view class="btn gre" @click.stop="_goOperation(2,club)"> <text>二手下单</text> </view>
|
|
|
|
- <view class="btn yel" @click.stop="_goOperation(3,club)"> <text>再次购买</text> </view>
|
|
|
|
- <view class="btn yeo" @click.stop="_goOperation(4,club)">
|
|
|
|
|
|
+ <view class="btn org" @click.stop="_goOperation(1, club)"> <text>立即下单</text> </view>
|
|
|
|
+ <view class="btn gre" @click.stop="_goOperation(2, club)"> <text>二手下单</text> </view>
|
|
|
|
+ <view class="btn yel" @click.stop="_goOperation(3, club)"> <text>再次购买</text> </view>
|
|
|
|
+ <view class="btn yeo" @click.stop="_goOperation(4, club)">
|
|
<text>充值/下订金</text>
|
|
<text>充值/下订金</text>
|
|
</view>
|
|
</view>
|
|
- <view class="btn yel" @click.stop="_goOperation(6,club)"> <text>购买优惠券</text> </view>
|
|
|
|
|
|
+ <view class="btn yel" @click.stop="_goOperation(6, club)">
|
|
|
|
+ <text>购买优惠券</text>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -83,6 +85,16 @@
|
|
import authorize from '@/common/config/authorize.js'
|
|
import authorize from '@/common/config/authorize.js'
|
|
import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
|
|
import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
|
|
import tuiNomore from '@/components/tui-components/nomore/nomore'
|
|
import tuiNomore from '@/components/tui-components/nomore/nomore'
|
|
|
|
+const defaultListQuery = {
|
|
|
|
+ userIdentity: '',
|
|
|
|
+ name: '',
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ spId: 0,
|
|
|
|
+ status: 66,
|
|
|
|
+ type: 1,
|
|
|
|
+ groupServiceId: 0
|
|
|
|
+}
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
tuiLoadmore,
|
|
tuiLoadmore,
|
|
@@ -90,14 +102,9 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- serviceProviderId: '',
|
|
|
|
isShowClose: false,
|
|
isShowClose: false,
|
|
- searchInputVal: '',
|
|
|
|
isEmpty: false,
|
|
isEmpty: false,
|
|
nomoreText: '上拉显示更多',
|
|
nomoreText: '上拉显示更多',
|
|
- status: 66,
|
|
|
|
- pageNum: 1,
|
|
|
|
- pageSize: 10,
|
|
|
|
hasNextPage: false,
|
|
hasNextPage: false,
|
|
loadding: false,
|
|
loadding: false,
|
|
pullUpOn: true,
|
|
pullUpOn: true,
|
|
@@ -105,41 +112,25 @@ export default {
|
|
scrollHeight: '',
|
|
scrollHeight: '',
|
|
currPage: '', //当前页面
|
|
currPage: '', //当前页面
|
|
prevPage: '', //上一个页面
|
|
prevPage: '', //上一个页面
|
|
- clubList: []
|
|
|
|
|
|
+ clubList: [],
|
|
|
|
+ listQuery: Object.assign({}, defaultListQuery)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- onLoad() {
|
|
|
|
- this.setScrollHeight()
|
|
|
|
- },
|
|
|
|
|
|
+ onLoad() {},
|
|
methods: {
|
|
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)
|
|
|
|
|
|
+ async initGetStotage() {
|
|
|
|
+ // 初始化
|
|
|
|
+ const userInfo = await this.$api.getStorage()
|
|
|
|
+ this.listQuery.spId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
|
|
|
|
+ this.GetSellerClubList()
|
|
},
|
|
},
|
|
searchClubList() {
|
|
searchClubList() {
|
|
- this.pageNum = 1
|
|
|
|
- this.initclubList()
|
|
|
|
|
|
+ // 搜索
|
|
|
|
+ this.GetSellerClubList()
|
|
},
|
|
},
|
|
- initclubList() {
|
|
|
|
- let params = {
|
|
|
|
- userIdentity: '',
|
|
|
|
- name: this.searchInputVal,
|
|
|
|
- pageNum: 1,
|
|
|
|
- pageSize: this.pageSize,
|
|
|
|
- spId: this.serviceProviderId,
|
|
|
|
- status: this.status
|
|
|
|
- }
|
|
|
|
- this.SellerService.GetSellerClubList(params)
|
|
|
|
|
|
+ GetSellerClubList() {
|
|
|
|
+ this.listQuery.pageNum = 1
|
|
|
|
+ this.SellerService.GetSellerClubList(this.listQuery)
|
|
.then(response => {
|
|
.then(response => {
|
|
let data = response.data
|
|
let data = response.data
|
|
if (data.list && data.list.length > 0) {
|
|
if (data.list && data.list.length > 0) {
|
|
@@ -167,16 +158,8 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getOnReachBottomData() {
|
|
getOnReachBottomData() {
|
|
- this.pageNum += 1
|
|
|
|
- let params = {
|
|
|
|
- userIdentity: '',
|
|
|
|
- name: this.searchInputVal,
|
|
|
|
- pageNum: this.pageNum,
|
|
|
|
- pageSize: this.pageSize,
|
|
|
|
- spId: this.serviceProviderId,
|
|
|
|
- status: this.status
|
|
|
|
- }
|
|
|
|
- this.SellerService.GetSellerClubList(params)
|
|
|
|
|
|
+ this.listQuery.pageNum += 1
|
|
|
|
+ this.SellerService.GetSellerClubList(this.listQuery)
|
|
.then(response => {
|
|
.then(response => {
|
|
let data = response.data
|
|
let data = response.data
|
|
if (data.list && data.list.length > 0) {
|
|
if (data.list && data.list.length > 0) {
|
|
@@ -202,7 +185,7 @@ export default {
|
|
},
|
|
},
|
|
onShowClose() {
|
|
onShowClose() {
|
|
//输入框失去焦点时触发
|
|
//输入框失去焦点时触发
|
|
- if (this.searchInputVal != '') {
|
|
|
|
|
|
+ if (this.listQuery.name != '') {
|
|
this.isShowClose = true
|
|
this.isShowClose = true
|
|
} else {
|
|
} else {
|
|
this.isShowClose = false
|
|
this.isShowClose = false
|
|
@@ -210,12 +193,12 @@ export default {
|
|
},
|
|
},
|
|
delInputText() {
|
|
delInputText() {
|
|
//清除输入框内容
|
|
//清除输入框内容
|
|
- this.searchInputVal = ''
|
|
|
|
|
|
+ this.listQuery.name = ''
|
|
this.isShowClose = false
|
|
this.isShowClose = false
|
|
},
|
|
},
|
|
- _goOperation(type,club){
|
|
|
|
|
|
+ _goOperation(type, club) {
|
|
this.$api.setStorage('orderUserInfo', club)
|
|
this.$api.setStorage('orderUserInfo', club)
|
|
- switch(type){
|
|
|
|
|
|
+ switch (type) {
|
|
case 1:
|
|
case 1:
|
|
this.$api.navigateTo('/pages/seller/cart/immediately')
|
|
this.$api.navigateTo('/pages/seller/cart/immediately')
|
|
break
|
|
break
|
|
@@ -245,11 +228,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- this.$api.getStorage().then(response => {
|
|
|
|
- this.serviceProviderId = response.serviceProviderId
|
|
|
|
- this.pageNum = 1
|
|
|
|
- this.initclubList()
|
|
|
|
- })
|
|
|
|
|
|
+ this.initGetStotage()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|