157 lines
2.9 KiB
Vue
157 lines
2.9 KiB
Vue
<template>
|
|
<view class="content">
|
|
<view class="container">
|
|
<view class="header-">
|
|
<view class="" @click="goback">
|
|
<u-icon name="arrow-left" color="#fff" size="20"></u-icon>
|
|
</view>
|
|
<view class="input-k">
|
|
<u-icon name="search" size="18"></u-icon>
|
|
<input type="text" placeholder="请输入银行名称" />
|
|
</view>
|
|
<view class=""></view>
|
|
</view>
|
|
<view class="box-" v-for="(item,index) in nextBankList" :key="index" @click="goAgent(item.dotName)">
|
|
{{item.dotName}}
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import request from '../../utils/request.js'
|
|
import headers from '../../components/header/headers.vue'
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
bankId: '',
|
|
page: 1,
|
|
limit: 15,
|
|
totalPage: 0,
|
|
nextBankList: [],
|
|
titles: "默认",
|
|
msg: "1",
|
|
dataList: [],
|
|
show: false,
|
|
status: 'loading',
|
|
}
|
|
},
|
|
onShow() {
|
|
|
|
// this.actList = ["1", "1", "1", "1", "1", ]
|
|
// this.status = "nomore" 底部刷新结束
|
|
},
|
|
onPullDownRefresh() {
|
|
console.log("刷新");
|
|
uni.stopPullDownRefresh()
|
|
},
|
|
onLoad(option) {
|
|
this.bankId = option.id
|
|
console.log("bankId:", this.bankId);
|
|
this.getNextBankList()
|
|
},
|
|
onReachBottom() {
|
|
if (this.nextBankList.length < totalPage) {
|
|
this.page++
|
|
this.getNextBankList()
|
|
} else {
|
|
uni.showToast({
|
|
title: "没有下一页数据",
|
|
icon: 'none'
|
|
})
|
|
}
|
|
// this.show = true
|
|
setTimeout(() => {
|
|
console.log("加载执行");
|
|
}, 2000)
|
|
},
|
|
components: {
|
|
headers
|
|
},
|
|
methods: {
|
|
//二级银列表
|
|
getNextBankList() {
|
|
request({
|
|
url: '/app/salesman/branch',
|
|
method: 'post',
|
|
data: {
|
|
page: this.page,
|
|
bankId: this.bankId
|
|
}
|
|
}).then(res => {
|
|
if (res.bank) {
|
|
if (this.page != 1) {
|
|
this.nextBankList = this.nextBankList.concat(res.bank)
|
|
} else {
|
|
this.nextBankList = res.bank
|
|
}
|
|
this.totalPage = res.total
|
|
console.log("银行列表", this.nextBankList);
|
|
}
|
|
})
|
|
},
|
|
goAgent(bankName) {
|
|
uni.navigateBack({
|
|
delta: 2
|
|
})
|
|
uni.$emit("bankIdzx", bankName)
|
|
},
|
|
goback() {
|
|
uni.navigateBack()
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.content {
|
|
background: #fff;
|
|
height: 100vh;
|
|
}
|
|
|
|
.container {
|
|
width: 100%;
|
|
background: #fff;
|
|
box-sizing: border-box;
|
|
padding-top: 88px;
|
|
}
|
|
|
|
.header- {
|
|
width: 100%;
|
|
height: 88px;
|
|
background: #E4612E;
|
|
position: fixed;
|
|
top: 0px;
|
|
display: flex;
|
|
box-sizing: border-box;
|
|
padding: 15px;
|
|
|
|
padding-top: 50px;
|
|
justify-content: space-between;
|
|
color: white;
|
|
|
|
}
|
|
|
|
.input-k {
|
|
width: 80%;
|
|
height: 24px;
|
|
background: #fff;
|
|
border-radius: 50px;
|
|
box-sizing: border-box;
|
|
padding: 0px 15px;
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
.box- {
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
padding: 15px;
|
|
border-bottom: 1px solid #d9d9d9;
|
|
}
|
|
</style>
|