| | |
| | | <view class="list-left">{{item.userName}}</view> |
| | | <view class="list-right"><button size="mini" style="float: right;" type="warn" @click="removeFollowers(item.userId)">移除</button></view> |
| | | </view> |
| | | <view class="list-none" v-show="followers.length == 0"> |
| | | <text>暂无跟进人</text> |
| | | </view> |
| | | </view> |
| | | |
| | | </scroll-view> |
| | |
| | | }, |
| | | del(id) { |
| | | let that = this |
| | | var ida ; |
| | | var ids = []; |
| | | id = Number(id) |
| | | ida.push(id) |
| | | console.log(ida); |
| | | ids.push(id) |
| | | uni.request({ |
| | | url: that.baseUrl + '/cstmr/delete/auth', |
| | | header: {'token' : uni.getStorageSync('token'), |
| | | }, |
| | | data: ida, |
| | | url: that.baseUrl + '/cstmr/delete/json', |
| | | header: {'token' : uni.getStorageSync('token'),}, |
| | | data: {ids: [100,20,40]}, |
| | | method: 'POST', |
| | | success(res) { |
| | | console.log(res); |
| | |
| | | // 确认选择工作人 |
| | | confirm() { |
| | | let that = this |
| | | var followerId = [], |
| | | cstmrId = []; |
| | | cstmrId.push(that.cstmrId) |
| | | var followerId |
| | | var followerList = that.addFollower.followerList |
| | | for (var i = 0;i < followerList.length; i++) { |
| | | if (followerList[i].name == this.addFollower.follower) { |
| | | followerId.push(followerList[i].value) |
| | | followerId =followerList[i].value |
| | | } |
| | | } |
| | | uni.request({ |
| | |
| | | // 'content-type':'application/x-www-form-urlencoded', |
| | | }, |
| | | data: { |
| | | cstmrId: cstmrId, |
| | | followerIdList:followerId}, |
| | | cstmrId: that.cstmrId, |
| | | followerIds:followerId}, |
| | | method: 'POST', |
| | | success(result) { |
| | | var res = result.data |
| | | that.getFollowers() |
| | | console.log(res); |
| | | } |
| | | }) |
| | |
| | | console.log(that.cstmrId); |
| | | uni.request({ |
| | | url: that.baseUrl + '/cstmr/followers/remove/auth', |
| | | header:{'token':uni.getStorageSync('token')}, |
| | | header:{ |
| | | 'token':uni.getStorageSync('token'), |
| | | 'content-type': 'application/x-www-form-urlencoded' |
| | | }, |
| | | data: { |
| | | cstmrId:that.cstmrId, |
| | | userId: userId |
| | |
| | | method:'POST', |
| | | success(res) { |
| | | res = res.data |
| | | that.getFollowers() |
| | | console.log(res); |
| | | } |
| | | }) |
| | |
| | | /* background-color: #222; */ |
| | | padding-right: 30rpx; |
| | | } |
| | | .list-none { |
| | | min-height: 60rpx; |
| | | margin-top: 20rpx; |
| | | text-align: center; |
| | | /* background-color: #303133; */ |
| | | color: #b1b3b8; |
| | | grid-column: 1 / 10; |
| | | display: grid; |
| | | position: relative; |
| | | } |
| | | </style> |
| | |
| | | loading: false, |
| | | btnText: '登录' |
| | | }, |
| | | baseUrl: 'http://192.168.4.188:9528' |
| | | baseUrl: 'http://127.0.0.1:9528' |
| | | } |
| | | }, |
| | | onLoad:function(){ |