#
whycq
2022-12-21 b2cee8547714ef8b0318ef7b9cff4a322b42dd4a
pages/business/cstmr/cstmrDetails.vue
@@ -35,6 +35,9 @@
               <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>
@@ -104,15 +107,13 @@
         },
         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);
@@ -138,13 +139,11 @@
         // 确认选择工作人
         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({
@@ -153,11 +152,12 @@
                  // '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);
               }
            })
@@ -207,7 +207,10 @@
            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
@@ -215,6 +218,7 @@
               method:'POST',
               success(res) {
                  res = res.data
                  that.getFollowers()
                  console.log(res);
               }
            })
@@ -304,4 +308,14 @@
      /* 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>