From a91bfc924f45ffd47367b28c253b5fc144d65ff5 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 28 十二月 2022 14:38:46 +0800
Subject: [PATCH] #
---
pages/business/cstmr/cstmrDetails.vue | 62 +++++++++++++++++++++++++------
1 files changed, 50 insertions(+), 12 deletions(-)
diff --git a/pages/business/cstmr/cstmrDetails.vue b/pages/business/cstmr/cstmrDetails.vue
index b66c980..76ed48a 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,12 @@
},
del(id) {
let that = this
- var ida ;
- id = Number(id)
- ida.push(id)
- console.log(ida);
+ var ids = [];
+ 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: ids},
method: 'POST',
success(res) {
console.log(res);
@@ -137,6 +137,29 @@
},
// 纭閫夋嫨宸ヤ綔浜�
confirm() {
+ let that = this
+ var followerId
+ var followerList = that.addFollower.followerList
+ for (var i = 0;i < followerList.length; i++) {
+ if (followerList[i].name == this.addFollower.follower) {
+ followerId =followerList[i].value
+ }
+ }
+ uni.request({
+ url: that.baseUrl + '/cstmr/followers/add/json',
+ header:{'token':uni.getStorageSync('token'),
+ // 'content-type':'application/x-www-form-urlencoded',
+ },
+ data: {
+ cstmrId: that.cstmrId,
+ followerIds:followerId},
+ method: 'POST',
+ success(result) {
+ var res = result.data
+ that.getFollowers()
+ console.log(res);
+ }
+ })
this.addFollower.follower = ''
},
// 宸ヤ綔浜哄垪琛�
@@ -151,6 +174,7 @@
method: 'POST',
success(result) {
var res = result.data
+ console.log(res);
if (res.code === 200) {
var element;
if (type == 'follower') {
@@ -182,7 +206,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
@@ -190,6 +217,7 @@
method:'POST',
success(res) {
res = res.data
+ that.getFollowers()
console.log(res);
}
})
@@ -202,7 +230,7 @@
.header {
width: auto;
min-height: 110rpx;
- background-color: #f8f8f8;
+ background-color: #fff;
padding: 30px 20px 10px 20px;
}
.cstmr-name {
@@ -226,7 +254,7 @@
.container {
margin-top: 10px;
padding: 10rpx 20rpx 0 20rpx;
- background-color: #f8f8f8;
+ background-color: #fff;
display: grid;
grid-template-columns: 1fr 3fr;
}
@@ -254,7 +282,7 @@
min-height: 100rpx;
bottom: 0;
margin-bottom: 0;
- background-color: #f8f8f8;
+ background-color: #fff;
border-top: 1px solid #efefef;
display: flex;
align-items: center;
@@ -279,4 +307,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
--
Gitblit v1.9.1