From b2cee8547714ef8b0318ef7b9cff4a322b42dd4a Mon Sep 17 00:00:00 2001
From: whycq <you@example.com>
Date: 星期三, 21 十二月 2022 23:12:45 +0800
Subject: [PATCH] #
---
pages/login/login.vue | 2 +-
pages/business/cstmr/cstmrDetails.vue | 42 ++++++++++++++++++++++++++++--------------
2 files changed, 29 insertions(+), 15 deletions(-)
diff --git a/pages/business/cstmr/cstmrDetails.vue b/pages/business/cstmr/cstmrDetails.vue
index ce74f77..9e793c5 100644
--- a/pages/business/cstmr/cstmrDetails.vue
+++ b/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>
\ No newline at end of file
diff --git a/pages/login/login.vue b/pages/login/login.vue
index d1ff7e9..ce0b9d9 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -45,7 +45,7 @@
loading: false,
btnText: '鐧诲綍'
},
- baseUrl: 'http://192.168.4.188:9528'
+ baseUrl: 'http://127.0.0.1:9528'
}
},
onLoad:function(){
--
Gitblit v1.9.1