123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <template>
- <view>
- <view class="cu-bar search bg-gray">
- <view class="search-form round text-center">
- <text class="cuIcon-search"></text>
- <input v-model="searchval" :adjust-position="false" type="text" placeholder="搜索昵称或手机号" confirm-type="search" @confirm="pageRefresh()"></input>
- </view>
- <view class="action">
- <button class="cu-btn bg-white shadow-blur round" @click="pageRefresh()">搜索</button>
- </view>
- </view>
- <!-- <scroll-view scroll-x class="bg-white nav text-center solid-bottom">
- <block v-for="(item,index) in followstatusarr" :key="index">
- <view class="cu-item" :class="followstatus==index?'text-blue cur':''" @tap="tabSelect" :data-followstatus="index">{{item}}</view>
- </block>
- </scroll-view> -->
-
- <view class="cu-list menu-avatar">
- <view class="cu-item" v-for="(item,index) in plist" :key="index">
- <view class="cu-avatar round lg" :style="'background-image:url('+item.avatar+');'"></view>
- <view class="content">
- <view class="text-grey">{{item.nickname}}<text class="text-sm">({{item.mobile}})</text></view>
- <view class="text-orange text-sm text-cut">{{ item.userFollow.length == 0 ? followstatusarr[item.followstatus] : item.userFollow[0].remark }}</view>
- <view class="text-gray text-sm" v-if="item.userFollow.length == 0">注册时间:{{item.createtime}}</view>
- <view class="text-gray text-sm" v-else>最近跟进:{{item.userFollow[0].createtime}}</view>
- </view>
- <view class="action basis-xs">
- <view class="text-grey text-sm">{{followstatusarr[item.followstatus]}}</view>
- <view class="cu-tag bg-blue margin-top-xs" @tap="goLPage('/pages/broker/setfollow?userid='+item.id)">我要跟进</view>
- </view>
- </view>
- </view>
-
- <uni-load-more :status="pstatus"></uni-load-more>
-
- </view>
- </template>
- <script>
- import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue";
- var _this;
- export default {
- components: {
- uniLoadMore
- },
- data() {
- return {
- brokerinfo: {},
- searchval: "",
-
- pstatus: 'more',
- ppage: 1,
- psize: 20,
- plist: [],
-
- followstatus: 0,
- followstatusarr: ['全部','未跟进', '未面试', '面试通过', '面试未通过', '用户放弃', '已入职', '已离职']
- };
- },
- onLoad: function(){
- _this = this;
- _this.brokerinfo = uni.getStorageSync('brokerinfo') || false;
- if (_this.brokerinfo===false){
- uni.reLaunch({
- url: "/pages/my/my"
- });
- return false;
- }
- _this.getMore();
- },
- onPullDownRefresh: function() {
- _this.ppage = 1;
- _this.pstatus = 'more';
- _this.plist = [];
- _this.getMore();
- },
- onReachBottom: function() {
- if (_this.pstatus !== 'more') {
- return;
- }
- _this.getMore();
- },
- methods: {
- getMore: function() {
- _this.$req.ajax({
- path: "broker/listuser",
- data: {
- ppage: _this.ppage,
- psize: _this.psize,
- brokerid: _this.brokerinfo.id,
- followstatus: _this.followstatus,
- keyword: _this.searchval,
- }
- }).then((data) => {
- _this.pstatus = data.pstatus;
- _this.plist = _this.plist.concat(data.plist);
- _this.ppage += 1;
- uni.stopPullDownRefresh();
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- },
-
- pageRefresh: function() {
- _this.pstatus = 'more';
- _this.ppage = 1;
- _this.plist = [];
- _this.getMore();
- },
- tabSelect: function(e) {
- _this.followstatus = e.currentTarget.dataset.followstatus;
- _this.pageRefresh();
- },
-
- goLPage: function(pageurl) {
- _this.userinfo = _this.checkLogin("/pages/my/my");
- if (_this.userinfo===false){
- return false;
- }
- uni.navigateTo({
- url: pageurl,
- fail: function(){
- uni.switchTab({
- url: pageurl
- });
- }
- });
- },
-
- goNavPage: function(pageurl) {
- _this.userinfo = _this.checkLogin("/pages/my/my");
- if (_this.userinfo===false){
- return false;
- }
- uni.redirectTo({
- url: pageurl
- });
- },
- }
- }
- </script>
- <style>
- .cu-list.menu-avatar .cu-item{ height: 170rpx !important; }
- </style>
|